:root {
  color-scheme: dark;
  --bg: #08111f;
  --bg-elevated: #0e1b2e;
  --panel: #12243b;
  --panel-soft: #0b1728;
  --line: #243a55;
  --text: #f3f7fb;
  --muted: #a9b8c9;
  --accent: #70e1cf;
  --accent-strong: #9af0e2;
  --accent-ink: #06211d;
  --blue: #82b8ff;
  --max: 72rem;
  --radius: 1.2rem;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: radial-gradient(circle at 85% 4%, #102b47 0, transparent 28rem), var(--bg); color: var(--text); font-size: 1rem; }
img { max-width: 100%; }
a { color: var(--accent-strong); text-underline-offset: .2em; }
a:hover { color: #fff; }
:focus-visible { outline: .2rem solid var(--accent); outline-offset: .2rem; border-radius: .2rem; }
.shell { width: min(calc(100% - 2rem), var(--max)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 100; top: .75rem; left: .75rem; transform: translateY(-180%); padding: .65rem .9rem; color: var(--accent-ink); background: var(--accent); font-weight: 800; }
.skip-link:focus { transform: translateY(0); }

.site-header { border-bottom: 1px solid rgba(112,225,207,.15); background: rgba(8,17,31,.92); }
.header-inner { min-height: 5rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--text); text-decoration: none; font-size: 1.05rem; white-space: nowrap; }
.brand img { width: 2rem; height: 2rem; }
.brand strong { color: var(--accent); }
.nav-list { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .2rem; list-style: none; padding: 0; margin: 0; }
.nav-list a { display: block; padding: .55rem .7rem; color: var(--muted); text-decoration: none; font-size: .92rem; border-radius: .55rem; }
.nav-list a:hover, .nav-list a[aria-current="page"] { color: var(--text); background: var(--bg-elevated); }

.hero { min-height: 39rem; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: clamp(2rem, 7vw, 6rem); padding-block: clamp(4rem, 10vw, 8rem); }
.eyebrow { margin: 0 0 .75rem; color: var(--accent); font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.025em; }
h1 { margin: 0; font-size: clamp(2.8rem, 7vw, 5.7rem); max-width: 12ch; }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); margin: 0 0 1rem; }
h3 { font-size: 1.25rem; }
.lede { max-width: 42rem; margin: 1.5rem 0 0; color: #c9d5e2; font-size: clamp(1.1rem, 2vw, 1.32rem); }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.button { display: inline-flex; min-height: 3rem; align-items: center; justify-content: center; padding: .7rem 1.1rem; border: 1px solid var(--line); border-radius: .7rem; font-weight: 800; text-decoration: none; }
.button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.button.primary:hover { background: #fff; color: var(--accent-ink); border-color: #fff; }
.button.secondary { color: var(--text); background: rgba(14,27,46,.75); }
.path-card { background: linear-gradient(145deg, rgba(18,36,59,.94), rgba(11,23,40,.96)); border: 1px solid var(--line); border-radius: 1.5rem; padding: clamp(1.3rem, 4vw, 2rem); box-shadow: 0 2rem 5rem rgba(0,0,0,.2); }
.path-title { margin: 0 0 1rem; color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; }
.request-path { list-style: none; padding: 0; margin: 0; }
.request-path li { display: grid; grid-template-columns: 2.5rem 1fr; gap: .75rem; padding: 1rem 0; border-top: 1px solid var(--line); }
.request-path li > span { color: var(--accent); font: 700 .82rem ui-monospace, monospace; }
.request-path strong, .request-path small { display: block; }
.request-path small { margin-top: .2rem; color: var(--muted); font-size: .9rem; }

.section { padding-block: clamp(4rem, 9vw, 7rem); border-top: 1px solid rgba(36,58,85,.6); }
.section-heading { display: grid; grid-template-columns: .75fr 1fr; column-gap: 4rem; margin-bottom: 2rem; }
.section-heading .eyebrow { grid-column: 1 / -1; }
.section-heading h2 { max-width: 14ch; }
.section-heading > p:last-child { color: var(--muted); font-size: 1.08rem; margin-top: .3rem; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.topic-card { min-height: 20rem; display: flex; flex-direction: column; align-items: flex-start; padding: 1.5rem; background: var(--bg-elevated); border: 1px solid var(--line); border-radius: var(--radius); }
.topic-card:hover { border-color: #3e627f; transform: translateY(-.12rem); }
.topic-card h3 { margin: 2rem 0 .7rem; font-size: 1.5rem; }
.topic-card h3 a { color: var(--text); text-decoration: none; }
.topic-card p { color: var(--muted); }
.topic-mark { display: inline-flex; align-items: center; justify-content: center; min-width: 3.3rem; min-height: 2rem; padding: .2rem .55rem; border: 1px solid rgba(112,225,207,.4); border-radius: 2rem; color: var(--accent); font: 800 .78rem ui-monospace, monospace; letter-spacing: .08em; }
.tag-list { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: auto 0 0; }
.tag-list li { padding: .25rem .5rem; color: var(--muted); background: var(--panel-soft); border-radius: .35rem; font-size: .78rem; }
.split-section { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2rem, 8vw, 7rem); }
.body-large { color: var(--muted); font-size: 1.12rem; }
.method-list, .steps { list-style: none; counter-reset: steps; padding: 0; margin: 0; }
.method-list li, .steps li { counter-increment: steps; position: relative; display: grid; grid-template-columns: 2rem 1fr; gap: .8rem; padding: 1rem 0; border-top: 1px solid var(--line); }
.method-list li::before, .steps li::before { content: counter(steps, decimal-leading-zero); color: var(--accent); font: 700 .78rem ui-monospace, monospace; margin-top: .2rem; }
.method-list strong, .method-list span, .steps strong, .steps span { grid-column: 2; }
.method-list span, .steps span { color: var(--muted); margin-top: -.45rem; }
.callout { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.callout p:not(.eyebrow) { color: var(--muted); }

.page-main { padding-block: clamp(3.5rem, 8vw, 6rem); min-height: 70vh; }
.page-main.narrow { width: min(calc(100% - 2rem), 50rem); }
.page-hero { max-width: 48rem; margin-bottom: 3rem; }
.page-hero h1, .prose h1, .error-main h1 { max-width: none; font-size: clamp(2.5rem, 6vw, 4.6rem); }
.guide-list { border-top: 1px solid var(--line); }
.guide-list article { display: grid; grid-template-columns: 11rem 1fr; gap: 2rem; padding: 2rem 0; border-bottom: 1px solid var(--line); }
.guide-list h2 { font-size: 1.7rem; margin-bottom: .5rem; }
.guide-list h2 a { color: var(--text); text-decoration: none; }
.guide-list p { color: var(--muted); margin: 0; }
.guide-list .meta { margin-top: .65rem; font-size: .78rem; }

.article-layout { display: grid; grid-template-columns: 13rem minmax(0, 45rem); gap: clamp(2rem, 7vw, 6rem); align-items: start; padding-block: clamp(3.5rem, 8vw, 6rem); }
.article-nav { position: sticky; top: 2rem; display: flex; flex-direction: column; gap: .5rem; padding: 1rem 0; border-top: 1px solid var(--line); }
.article-nav p { margin: 0 0 .5rem; color: var(--text); font-weight: 800; }
.article-nav a { color: var(--muted); text-decoration: none; font-size: .9rem; }
.article-nav a:hover { color: var(--accent); }
.prose { min-width: 0; }
.prose > h2 { margin-top: 3.5rem; scroll-margin-top: 2rem; }
.prose > h3 { margin-top: 2rem; }
.prose > p, .prose > ul { color: #c3cfdd; font-size: 1.05rem; }
.prose li + li { margin-top: .7rem; }
.prose code { color: #d6f8f1; background: var(--panel); border: 1px solid var(--line); border-radius: .3rem; padding: .08rem .3rem; }
.note { margin: 2rem 0; padding: 1.2rem 1.3rem; background: rgba(112,225,207,.08); border-left: .22rem solid var(--accent); border-radius: .25rem .8rem .8rem .25rem; }
.note p { margin: .35rem 0 0; color: #c9d5e2; }
.steps { margin: 1.5rem 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: .8rem; }
table { width: 100%; border-collapse: collapse; min-width: 38rem; }
th, td { padding: .85rem 1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--accent); background: var(--panel-soft); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
td { color: #c3cfdd; }
tr:last-child td { border-bottom: 0; }
.definition-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.definition-grid > div { padding: 1.1rem; background: var(--bg-elevated); border: 1px solid var(--line); border-radius: .8rem; }
.definition-grid h3 { margin-top: 0; }
.definition-grid p { color: var(--muted); margin-bottom: 0; }
.next-card { margin-top: 4rem; padding: 1.6rem; background: linear-gradient(135deg, var(--panel), var(--panel-soft)); border: 1px solid var(--line); border-radius: var(--radius); }
.next-card > p:first-child { margin: 0 0 .5rem; color: var(--accent); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.next-card h2 { margin: 0; font-size: 1.7rem; }
.next-card p { color: var(--muted); }
.text-link { font-weight: 800; }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.faq-list summary { cursor: pointer; color: var(--text); font-size: 1.12rem; font-weight: 800; }
.faq-list summary::marker { color: var(--accent); }
.faq-list p { color: var(--muted); max-width: 44rem; }

.site-footer { margin-top: 3rem; border-top: 1px solid var(--line); background: #060d17; }
.footer-inner { min-height: 10rem; display: flex; justify-content: space-between; align-items: center; gap: 2rem; }
.footer-inner p { margin: 0; }
.footer-inner span { color: var(--muted); }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.footer-inner a { color: var(--muted); text-decoration: none; }
.error-page { min-height: 100vh; }
.error-main { min-height: calc(100vh - 5rem); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; max-width: 50rem; }
.error-code { margin: 0; color: rgba(112,225,207,.18); font-size: clamp(6rem, 22vw, 14rem); font-weight: 900; line-height: .75; letter-spacing: -.08em; }
.error-main > p:not(.eyebrow):not(.error-code) { color: var(--muted); font-size: 1.12rem; }

@media (max-width: 800px) {
  .header-inner { align-items: flex-start; flex-direction: column; padding-block: 1rem; }
  .nav-list { justify-content: flex-start; }
  .nav-list a { padding-left: 0; padding-right: .8rem; }
  .hero, .split-section, .section-heading, .article-layout { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .card-grid { grid-template-columns: 1fr; }
  .topic-card { min-height: 17rem; }
  .article-nav { position: static; display: none; }
  .guide-list article { grid-template-columns: 1fr; gap: 1rem; }
  .callout, .footer-inner { align-items: flex-start; flex-direction: column; }
  .footer-inner { justify-content: center; padding-block: 2rem; }
}

@media (max-width: 520px) {
  .shell { width: min(calc(100% - 1.25rem), var(--max)); }
  .nav-list { gap: 0 .45rem; }
  .nav-list a { font-size: .83rem; }
  .definition-grid { grid-template-columns: 1fr; }
  .actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@media print {
  body { background: #fff; color: #111; }
  .site-header, .site-footer, .article-nav, .actions { display: none; }
  .article-layout { display: block; width: 100%; }
  .prose p, .prose ul, .lede { color: #222; }
  a { color: #111; text-decoration: underline; }
}
