:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --text: #0f1b2d;
  --muted: #53627a;
  --border: #dde3eb;
  --brand: #0b5cff;
  --brand-ink: #ffffff;
  --brand-soft: #e6eeff;
  --accent: #0a8f6a;
  --warn-bg: #fff6e5;
  --warn-border: #f0c36d;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 27, 45, .06), 0 8px 24px rgba(15, 27, 45, .06);
  --max: 1120px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1220;
    --surface: #111a2b;
    --surface-2: #17223a;
    --text: #e8edf5;
    --muted: #9aa8bf;
    --border: #243250;
    --brand: #5b8cff;
    --brand-ink: #0b1220;
    --brand-soft: #16264a;
    --accent: #3fd3a4;
    --warn-bg: #2a2212;
    --warn-border: #7a5a1c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

:root[data-theme="dark"] {
  --bg: #0b1220;
  --surface: #111a2b;
  --surface-2: #17223a;
  --text: #e8edf5;
  --muted: #9aa8bf;
  --border: #243250;
  --brand: #5b8cff;
  --brand-ink: #0b1220;
  --brand-soft: #16264a;
  --accent: #3fd3a4;
  --warn-bg: #2a2212;
  --warn-border: #7a5a1c;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); padding: 8px 12px; z-index: 10; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); text-decoration: none; letter-spacing: -.01em; }
.logo svg { width: 28px; height: 28px; flex: none; }
.logo span small { color: var(--muted); font-weight: 500; }
.nav-links { display: flex; align-items: center; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); color: var(--text); border-radius: 10px; padding: 8px 10px; font: inherit; cursor: pointer; }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--border); padding: 8px 20px 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links li a { display: block; padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav-links li:last-child a { border-bottom: 0; margin-top: 12px; text-align: center; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px; font-weight: 600; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; font: inherit; font-weight: 600;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); }
.nav-links .btn { color: var(--brand-ink); padding: 8px 14px; }

/* Hero */
.hero { padding: 72px 0 56px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--brand-soft); color: var(--brand);
  font-weight: 600; font-size: .85rem; padding: 6px 12px; border-radius: 999px;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.1; letter-spacing: -.02em; margin: 18px 0 16px; max-width: 16ch; }
.hero .lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted); max-width: 60ch; margin: 0 0 28px; }
.hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.countdown-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px;
}
.countdown-card h2 { font-size: 1rem; margin: 0 0 4px; }
.countdown-card p { margin: 0; color: var(--muted); font-size: .9rem; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 18px 0; }
.countdown div { background: var(--surface-2); border-radius: 10px; padding: 12px 6px; text-align: center; }
.countdown strong { display: block; font-size: 1.8rem; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.countdown span { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

/* Sections */
section { padding: 56px 0; }
.section-head { max-width: 720px; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -.015em; margin: 0 0 10px; line-height: 1.2; }
.section-head p { color: var(--muted); margin: 0; font-size: 1.05rem; }
.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px;
}
.alt .card { background: var(--bg); }
.card h3 { margin: 10px 0 8px; font-size: 1.08rem; line-height: 1.3; }
.card p { margin: 0; color: var(--muted); font-size: .96rem; }
.icon {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand);
}
.icon svg { width: 22px; height: 22px; }

/* Table */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; min-width: 640px; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: top; font-size: .95rem; }
th { background: var(--surface-2); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.timeline li { position: relative; padding: 0 0 26px 40px; }
.timeline li::before {
  content: ""; position: absolute; left: 4px; top: 6px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--brand);
}
.timeline li.done::before { background: var(--brand); }
.timeline li.key::before { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 25%, transparent); }
.timeline time { font-weight: 700; display: block; }
.timeline p { margin: 4px 0 0; color: var(--muted); }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); margin-left: 8px; vertical-align: middle; }

/* Callouts */
.callout { border: 1px solid var(--warn-border); background: var(--warn-bg); border-radius: var(--radius); padding: 18px 20px; }
.callout strong { display: block; margin-bottom: 4px; }
.callout p { margin: 0; }

.cta-band {
  background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 60%, var(--accent)));
  color: #fff; border-radius: 20px; padding: 40px; display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; align-items: center;
}
.cta-band h2 { margin: 0 0 8px; font-size: clamp(1.4rem, 3vw, 1.9rem); line-height: 1.2; }
.cta-band p { margin: 0; opacity: .92; }
.cta-band .btn { background: #fff; color: #0b2a6b; justify-self: end; }
@media (max-width: 760px) { .cta-band { grid-template-columns: 1fr; padding: 28px; } .cta-band .btn { justify-self: start; } }

/* Prose (guide pages) */
.page-hero { padding: 56px 0 24px; }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); letter-spacing: -.02em; line-height: 1.15; margin: 14px 0 12px; }
.page-hero p { color: var(--muted); font-size: 1.1rem; max-width: 65ch; margin: 0; }
.prose { max-width: 760px; }
.prose h2 { font-size: 1.5rem; margin: 44px 0 12px; letter-spacing: -.01em; line-height: 1.25; }
.prose h3 { font-size: 1.15rem; margin: 28px 0 8px; }
.prose p, .prose li { color: var(--text); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 6px 0; }
.meta { color: var(--muted); font-size: .9rem; }
.toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; margin: 24px 0; }
.toc strong { display: block; margin-bottom: 6px; }
.toc ol { margin: 0; }

/* FAQ */
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 4px 20px; margin-bottom: 12px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; color: var(--muted); }

/* Forms */
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }
label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: 10px; padding: 11px 12px;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .9rem; color: var(--muted); }
.check input { width: auto; margin-top: 4px; }
.hidden { display: none; }
.form-note { font-size: .85rem; color: var(--muted); margin-top: 12px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0; margin-top: 40px; color: var(--muted); font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin: 6px 0; }
.footer-grid a { color: var(--muted); text-decoration: none; }
.footer-grid a:hover { color: var(--text); }
.footer-grid h4 { color: var(--text); margin: 0 0 8px; font-size: .95rem; }
.disclaimer { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); font-size: .82rem; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }
