:root {
  --ink: #201244;
  --muted: #5f5c68;
  --aqua: #76d5d0;
  --paper: #f6f7fb;
  --line: #dadce3;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Instrument Sans", "Avenir Next", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; }

.shell { width: min(1100px, calc(100% - 48px)); margin-inline: auto; }

.hc-header {
  color: #fff;
  background: var(--ink);
}

.nav {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand img { width: 112px; height: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 42px;
  color: rgba(255,255,255,.72);
  font-size: 15px;
}
.nav-links > a { text-decoration: none; }
.nav-links > a:not(.app-store) { transition: color .2s ease; }
.nav-links > a:not(.app-store):hover,
.nav-links > a[aria-current="page"] { color: #fff; }
.app-store {
  display: block;
  width: 170px;
  height: 50px;
}
.app-store img { width: 100%; height: 100%; }

.hc-hero {
  padding: 64px 0 48px;
  color: #fff;
  background: var(--ink);
}
.hc-hero h1 { margin: 0 0 10px; font-size: clamp(36px, 4vw, 48px); }
.hc-hero p { margin: 0; color: rgba(255,255,255,.72); font-size: 19px; }

.hc-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 56px;
  padding-block: 48px 80px;
  align-items: start;
}

.hc-sidebar { position: sticky; top: 24px; }
.hc-nav-cat {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.hc-nav-group { margin-bottom: 28px; }
.hc-nav ul { margin: 0; padding: 0; list-style: none; }
.hc-nav li a {
  display: block;
  padding: 6px 0;
  color: #45424f;
  font-size: 15px;
  text-decoration: none;
  transition: color .15s ease;
}
.hc-nav li a:hover { color: var(--ink); }
.hc-nav li a.is-active { color: var(--ink); font-weight: 700; }

.hc-main { min-width: 0; }

.hc-crumb { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.hc-crumb a { text-decoration: none; }
.hc-crumb a:hover { color: var(--ink); }

.hc-main > h1 { margin: 0 0 12px; font-size: clamp(32px, 3.4vw, 44px); line-height: 1.12; }
.hc-desc { margin: 0 0 8px; color: #45424f; font-size: 19px; line-height: 1.5; }
.hc-meta { margin: 0 0 36px; color: var(--muted); font-size: 14px; }

.hc-body { font-size: 17px; line-height: 1.65; color: #26232d; }
.hc-body h2 { margin: 40px 0 14px; font-size: 27px; line-height: 1.2; }
.hc-body h3 { margin: 32px 0 12px; font-size: 21px; line-height: 1.3; }
.hc-body h4 { margin: 28px 0 10px; font-size: 18px; line-height: 1.35; }
.hc-body p { margin: 0 0 16px; }
.hc-body ul, .hc-body ol { margin: 0 0 16px; padding-left: 26px; }
.hc-body li { margin-bottom: 10px; }
.hc-body li > p { margin-bottom: 0; }
.hc-body a { color: #0a7f79; text-decoration: underline; text-underline-offset: 2px; }
.hc-body img { margin: 20px 0; border: 1px solid var(--line); border-radius: 10px; }
.hc-body br + br { display: none; }
.hc-body blockquote {
  margin: 20px 0;
  padding: 4px 20px;
  border-left: 3px solid var(--aqua);
  color: var(--muted);
}
.hc-body code {
  padding: 2px 6px;
  border-radius: 5px;
  background: #eceef4;
  font-size: .9em;
}
.hc-body table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.hc-body td, .hc-body th { padding: 10px 12px; border: 1px solid var(--line); text-align: left; }

.hc-prevnext {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.hc-pn {
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.hc-pn:hover { border-color: var(--aqua); box-shadow: 0 2px 10px rgba(32,18,68,.08); }
.hc-pn small { display: block; margin-bottom: 6px; color: var(--muted); font-size: 13px; }
.hc-pn strong { font-size: 16px; }
.hc-pn.next { text-align: right; }

.hc-h { margin: 0 0 20px; font-size: 24px; }
.hc-h + .hc-cards { margin-bottom: 44px; }
.hc-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}
.hc-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.hc-card:hover { border-color: var(--aqua); box-shadow: 0 4px 16px rgba(32,18,68,.09); transform: translateY(-2px); }
.hc-card strong { font-size: 17px; }
.hc-card span { color: var(--muted); font-size: 14px; }

.footer {
  color: rgba(255,255,255,.34);
  background: var(--ink);
}
.footer-inner { padding-top: 64px; padding-bottom: 72px; }
.footer-top, .footer-bottom { display: flex; align-items: center; justify-content: space-between; }
.footer-top { padding-bottom: 55px; }
.socials { display: flex; align-items: center; gap: 22px; color: var(--aqua); font-weight: 700; font-size: 20px; }
.socials a { text-decoration: none; }
.footer-bottom { padding-top: 26px; border-top: 2px solid rgba(255,255,255,.08); font-size: 14px; }
.footer-bottom p { margin: 0; }
.footer-bottom a { text-decoration: none; }
.footer-bottom a:hover { color: rgba(255,255,255,.6); }

@media (max-width: 900px) {
  .hc-layout { grid-template-columns: 1fr; gap: 32px; }
  .hc-sidebar { position: static; }
  .hc-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 32px; }
  .hc-nav-group { margin-bottom: 8px; }
  .hc-prevnext { grid-template-columns: 1fr; }
  .hc-pn.next { text-align: left; }
}

@media (max-width: 640px) {
  .shell { width: min(100% - 32px, 680px); }
  .nav { height: 72px; }
  .nav-links { gap: 20px; font-size: 14px; }
  .app-store { width: 140px; height: 41px; }
  .hc-hero { padding: 44px 0 36px; }
  .hc-nav { grid-template-columns: 1fr; }
  .footer-top { padding-bottom: 35px; }
  .footer-bottom { align-items: flex-start; flex-direction: column; gap: 14px; }
}
