:root {
  --bg: #060D1E;
  --bg-raised: #0C1B3A;
  --bg-card: #0F2247;
  --ink: #EDF1FA;
  --ink-soft: #C4CCE5;
  --muted: #8B96B8;
  --rule: rgba(255, 255, 255, 0.12);
  --accent: #5B8CFF;
  --accent-soft: rgba(91, 140, 255, 0.14);
  --accent-ink: #9DB8FF;
  --violet: #B389F7;
  --scoreboard: #050B18;
  --scoreboard-ink: #EDF1FA;
  --focus: #7CA2FF;
  --font-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-ink);
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-color: currentColor;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

img {
  max-width: 100%;
}

/* ---------- Header ---------- */
header.site {
  background: var(--scoreboard);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--scoreboard-ink);
  text-decoration: none;
}
.wordmark::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5B8CFF, #B389F7);
  box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.18);
  flex-shrink: 0;
}
nav.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
nav.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 600;
}
nav.site-nav a:hover {
  color: var(--ink);
}
nav.site-nav a.current {
  color: var(--accent-ink);
}

/* ---------- Scoreboard hero (used on inner pages) ---------- */
.scoreboard {
  background: var(--scoreboard);
  color: var(--scoreboard-ink);
  padding: 44px 24px 40px;
}
.scoreboard-inner {
  max-width: 700px;
  margin: 0 auto;
}
h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
  margin: 18px 0 14px;
  text-wrap: balance;
}
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: #9FACCE;
}
.meta-row b {
  color: var(--scoreboard-ink);
  font-weight: 600;
}
.dek {
  max-width: 54ch;
  margin: 20px 0 0;
  color: #B9C3E2;
  font-size: 16px;
  line-height: 1.6;
}

/* ---------- Content shell ---------- */
main {
  max-width: 700px;
  margin: 0 auto;
  padding: 46px 24px 100px;
}
main.wide {
  max-width: 1080px;
}

nav.toc {
  background: var(--bg-raised);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 20px 22px;
  margin-bottom: 48px;
}
nav.toc p {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
nav.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 20px;
}
nav.toc li a {
  display: flex;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-soft);
  text-decoration: none;
}
nav.toc li a span {
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
}
nav.toc li a:hover {
  color: var(--accent-ink);
}

section {
  padding-top: 44px;
  scroll-margin-top: 20px;
}
section + section {
  border-top: 1px solid var(--rule);
}

.section-label {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 10px;
}
.section-num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-radius: 5px;
  padding: 2px 7px;
}
h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.7rem;
  letter-spacing: -0.005em;
  margin: 0;
  text-wrap: balance;
}
h3 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  margin: 26px 0 8px;
  color: var(--ink);
}

p {
  margin: 0 0 14px;
  max-width: 62ch;
  color: var(--ink-soft);
}
p:last-child {
  margin-bottom: 0;
}
strong {
  color: var(--ink);
  font-weight: 600;
}

ul.data-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
ul.data-list li {
  border: 1px solid var(--rule);
  background: var(--bg-raised);
  border-radius: 8px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 4px 16px;
  font-size: 14.5px;
}
ul.data-list .k {
  font-weight: 600;
  color: var(--ink);
}
ul.data-list .v {
  color: var(--ink-soft);
}

ul.plain {
  margin: 0 0 14px;
  padding-left: 20px;
  color: var(--ink-soft);
}
ul.plain li {
  margin-bottom: 6px;
  max-width: 60ch;
}
ul.plain li::marker {
  color: var(--accent-ink);
}

.callout {
  border-left: 3px solid var(--violet);
  background: var(--accent-soft);
  border-radius: 0 8px 8px 0;
  padding: 14px 16px;
  margin: 18px 0;
  font-size: 14.5px;
}
.callout p {
  color: var(--ink-soft);
  margin: 0;
  max-width: 58ch;
}
.callout strong {
  color: var(--ink);
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--accent-soft);
  color: var(--accent-ink);
  padding: 1px 5px;
  border-radius: 4px;
}

/* ---------- Landing page ---------- */
.hero {
  background: radial-gradient(120% 140% at 15% -10%, rgba(91, 140, 255, 0.22), transparent 55%),
    radial-gradient(100% 120% at 100% 0%, rgba(179, 137, 247, 0.16), transparent 50%), var(--scoreboard);
  padding: 84px 24px 76px;
  text-align: center;
}
.hero-inner {
  max-width: 720px;
  margin: 0 auto;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border: 1px solid rgba(91, 140, 255, 0.3);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 22px;
}
.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.6rem, 7vw, 4.4rem);
}
.hero .dek {
  margin: 0 auto 34px;
  color: #B9C3E2;
  font-size: 18px;
}
.cta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
}
.btn-primary {
  background: linear-gradient(135deg, #5B8CFF, #7C6CF0);
  color: #060D1E;
}
.btn-primary[aria-disabled="true"] {
  opacity: 0.55;
  pointer-events: none;
}
.btn-ghost {
  background: transparent;
  border-color: var(--rule);
  color: var(--ink);
}
.store-note {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.section-wide {
  max-width: 1080px;
  margin: 0 auto;
  padding: 76px 24px;
}
.section-wide + .section-wide {
  border-top: 1px solid var(--rule);
}
.section-head {
  max-width: 620px;
  margin: 0 auto 44px;
  text-align: center;
}
.section-head .eyebrow {
  margin-bottom: 18px;
}
.section-head h2 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}
.section-head p {
  margin: 12px auto 0;
  color: var(--ink-soft);
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 26px 22px;
}
.card .icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 19px;
}
.card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}
.card p {
  font-size: 14.5px;
  margin: 0;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
  counter-reset: step;
}
.step {
  position: relative;
  padding-left: 46px;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step h3 {
  margin: 2px 0 6px;
  font-size: 16px;
}
.step p {
  font-size: 14.5px;
  margin: 0;
}

.faq-item {
  border-bottom: 1px solid var(--rule);
  padding: 20px 0;
}
.faq-item:first-child {
  padding-top: 0;
}
.faq-item h3 {
  margin: 0 0 8px;
  font-size: 16px;
}
.faq-item p {
  margin: 0;
  font-size: 14.5px;
}

.closing {
  text-align: center;
  background: var(--scoreboard);
  padding: 72px 24px;
}
.closing h2 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  margin: 0 0 16px;
}
.closing p {
  margin: 0 auto 30px;
  color: var(--ink-soft);
}

/* ---------- Footer ---------- */
footer.site {
  border-top: 1px solid var(--rule);
  background: var(--scoreboard);
}
.site-footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 24px 50px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.site-footer-inner .wordmark {
  font-size: 13px;
}
.footer-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13.5px;
}
.footer-links a:hover {
  color: var(--ink-soft);
}
.footer-copy {
  width: 100%;
  color: var(--muted);
  font-size: 12.5px;
  font-family: var(--font-mono);
  margin-top: 6px;
}

@media (max-width: 560px) {
  nav.toc ol {
    grid-template-columns: 1fr;
  }
  ul.data-list li {
    grid-template-columns: 1fr;
  }
  nav.site-nav {
    gap: 16px;
  }
  .site-header-inner {
    flex-wrap: wrap;
  }
}
