

/* ---------- Layer 1: primitives ---------------------------------------- */
:root {
  /* Navy ramp — authority, trust. 900 is the brand ink. */
  --navy-50:  #F1F5FB;
  --navy-100: #E2E9F5;
  --navy-200: #C6D3EB;
  --navy-300: #9CB0DC;
  --navy-400: #6B86C7;
  --navy-500: #4761AE;
  --navy-600: #31489A;
  --navy-700: #1E3A8A;  /* primary */
  --navy-800: #1B3073;
  --navy-900: #0F172A;  /* foreground ink */
  --navy-950: #080D18;

  /* Amber ramp — used only for the single primary action. */
  --amber-50:  #FEF6EC;
  --amber-100: #FCE9CF;
  --amber-200: #F8D09B;
  --amber-300: #F0AE5C;
  --amber-400: #DF8B2C;
  --amber-500: #B45309;  /* accent */
  --amber-600: #94430A;
  --amber-700: #76360B;

  /* Neutrals */
  --slate-50:  #F8FAFC;
  --slate-100: #F1F5F9;
  --slate-200: #E9EEF5;
  --slate-300: #CBD5E1;
  --slate-400: #94A3B8;
  --slate-500: #64748B;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1E293B;
  --slate-900: #0F172A;

  /* Status */
  --red-500:   #DC2626;
  --red-400:   #F87171;
  --green-600: #047857;
  --green-400: #34D399;
  --white:     #FFFFFF;

  /* ---------- Type scale — 1.200 minor third, 16px base ---------------- */
  --font-serif: "Newsreader", ui-serif, Georgia, "Times New Roman", serif;
  --font-sans: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --text-xs:   0.75rem;   /* 12px — never body copy */
  --text-sm:   0.875rem;  /* 14px */
  --text-base: 1rem;      /* 16px — body minimum */
  --text-lg:   1.125rem;  /* 18px — long-form body */
  --text-xl:   1.375rem;  /* 22px */
  --text-2xl:  1.75rem;   /* 28px */
  --text-3xl:  2.125rem;  /* 34px */
  --text-4xl:  2.625rem;  /* 42px */
  --text-5xl:  3.25rem;   /* 52px */

  --leading-tight: 1.15;
  --leading-snug: 1.3;
  --leading-normal: 1.5;
  --leading-relaxed: 1.7;  /* long-form reading */

  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.04em;

  /* ---------- Spacing — spacious scale (density 3/10) ------------------ */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --space-10: 8rem;

  /* ---------- Radii, shadow, layout ----------------------------------- */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-full: 999px;

  /* Swiss style: sharp, minimal shadow. Depth comes from borders. */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 2px 8px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 8px 24px rgba(15, 23, 42, 0.10);

  --measure: 68ch;          /* long-form line length */
  --container: 1120px;
  --container-narrow: 760px;
  --gutter: var(--space-5);

  --duration-fast: 150ms;
  --duration-base: 220ms;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  --header-h: 64px;
}

/* ---------- Layer 2: semantic — light (default) ------------------------ */
:root {
  color-scheme: light;

  --bg: var(--slate-50);
  --bg-raised: var(--white);
  --bg-sunken: var(--slate-100);
  --bg-muted: var(--slate-200);

  --fg: var(--navy-900);
  --fg-muted: var(--slate-600);
  --fg-subtle: var(--slate-500);
  --fg-on-primary: var(--white);
  --fg-on-accent: var(--white);

  --primary: var(--navy-700);
  --primary-hover: var(--navy-800);
  --primary-subtle: var(--navy-50);
  --primary-border: var(--navy-200);

  --accent: var(--amber-500);
  --accent-hover: var(--amber-600);
  --accent-subtle: var(--amber-50);

  --border: var(--slate-300);
  --border-subtle: var(--slate-200);
  --border-strong: var(--slate-400);

  --danger: var(--red-500);
  --danger-subtle: #FEF2F2;
  --success: var(--green-600);
  --success-subtle: #ECFDF5;

  --ring: var(--navy-700);
  --link: var(--navy-700);
  --link-hover: var(--navy-800);
}

/* ---------- Layer 2: semantic — dark ----------------------------------- */

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --bg: #0B1120;
    --bg-raised: #121A2C;
    --bg-sunken: #070C16;
    --bg-muted: #1C2740;

    --fg: #ECF1F8;
    --fg-muted: #A8B6CC;
    --fg-subtle: #7C8CA6;
    --fg-on-primary: #0B1120;
    --fg-on-accent: #1A0F02;

    --primary: var(--navy-300);
    --primary-hover: var(--navy-200);
    --primary-subtle: #152040;
    --primary-border: #2A3A63;

    --accent: var(--amber-300);
    --accent-hover: var(--amber-200);
    --accent-subtle: #2A1C06;

    --border: #2A3A5C;
    --border-subtle: #1C2740;
    --border-strong: #3E5280;

    --danger: var(--red-400);
    --danger-subtle: #2A1215;
    --success: var(--green-400);
    --success-subtle: #06251C;

    --ring: var(--navy-300);
    --link: #A9C0EC;
    --link-hover: #CBD9F5;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0B1120;
  --bg-raised: #121A2C;
  --bg-sunken: #070C16;
  --bg-muted: #1C2740;

  --fg: #ECF1F8;
  --fg-muted: #A8B6CC;
  --fg-subtle: #7C8CA6;
  --fg-on-primary: #0B1120;
  --fg-on-accent: #1A0F02;

  --primary: var(--navy-300);
  --primary-hover: var(--navy-200);
  --primary-subtle: #152040;
  --primary-border: #2A3A63;

  --accent: var(--amber-300);
  --accent-hover: var(--amber-200);
  --accent-subtle: #2A1C06;

  --border: #2A3A5C;
  --border-subtle: #1C2740;
  --border-strong: #3E5280;

  --danger: var(--red-400);
  --danger-subtle: #2A1215;
  --success: var(--green-400);
  --success-subtle: #06251C;

  --ring: var(--navy-300);
  --link: #A9C0EC;
  --link-hover: #CBD9F5;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
}



*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

/* ---------- Typography -------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--fg);
  margin: 0 0 var(--space-4);
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, var(--text-5xl)); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.3vw, var(--text-3xl)); margin-top: var(--space-7); }
h3 { font-size: var(--text-xl); margin-top: var(--space-6); }
h4 { font-size: var(--text-lg); font-family: var(--font-sans); font-weight: 600; margin-top: var(--space-5); }

p, li { line-height: var(--leading-relaxed); }
p { margin: 0 0 var(--space-4); }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--link-hover); }

strong { font-weight: 600; color: var(--fg); }
small { font-size: var(--text-sm); }

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-muted);
  padding: 0.1em 0.35em;
  border-radius: var(--radius-sm);
}

hr { border: 0; border-top: 1px solid var(--border-subtle); margin: var(--space-7) 0; }

/* Focus: never removed. WCAG 2.2 — visible and not obscured. */
:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
:focus:not(:focus-visible) { outline: none; }

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 200;
  background: var(--primary);
  color: var(--fg-on-primary);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: top var(--duration-fast) var(--ease);
}
.skip-link:focus { top: var(--space-4); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Layout ------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container-narrow { max-width: var(--container-narrow); }

.prose { max-width: var(--measure); }
.prose > p, .prose > ul, .prose > ol { font-size: var(--text-lg); }
.prose ul, .prose ol { padding-left: var(--space-5); margin-bottom: var(--space-4); }
.prose li { margin-bottom: var(--space-2); }

.section { padding-block: var(--space-8); }
.section-tight { padding-block: var(--space-7); }

.stack > * + * { margin-top: var(--space-4); }
.stack-lg > * + * { margin-top: var(--space-6); }

.grid { display: grid; gap: var(--space-5); }
@media (min-width: 640px)  { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px)  { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }

.lede {
  font-size: clamp(1.0625rem, 1rem + 0.5vw, var(--text-xl));
  line-height: var(--leading-normal);
  color: var(--fg-muted);
  max-width: 60ch;
}

.muted { color: var(--fg-muted); }
.subtle { color: var(--fg-subtle); }
.text-sm { font-size: var(--text-sm); }
.center { text-align: center; }

/* ---------- Buttons — 44x44 minimum touch target ----------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--duration-base) var(--ease),
              border-color var(--duration-base) var(--ease),
              color var(--duration-base) var(--ease);
}
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }

.btn-primary { background: var(--accent); color: var(--fg-on-accent); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); color: var(--fg-on-accent); }

.btn-secondary { background: var(--primary); color: var(--fg-on-primary); }
.btn-secondary:hover:not(:disabled) { background: var(--primary-hover); color: var(--fg-on-primary); }

.btn-outline { background: transparent; color: var(--fg); border-color: var(--border-strong); }
.btn-outline:hover:not(:disabled) { background: var(--bg-muted); color: var(--fg); }

.btn-ghost { background: transparent; color: var(--link); padding-inline: var(--space-3); }
.btn-ghost:hover:not(:disabled) { background: var(--bg-muted); }

.btn-lg { min-height: 52px; font-size: var(--text-lg); padding: var(--space-4) var(--space-6); }
.btn-block { width: 100%; }

/* ---------- Cards, callouts -------------------------------------------- */
.card {
  background: var(--bg-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.card-link { text-decoration: none; color: inherit; display: block; transition: border-color var(--duration-base) var(--ease); }
.card-link:hover { border-color: var(--border-strong); color: inherit; }
.card h3, .card h4 { margin-top: 0; }

.callout {
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--primary);
  background: var(--primary-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  margin-block: var(--space-5);
}
.callout > :last-child { margin-bottom: 0; }
.callout-title { font-weight: 600; font-family: var(--font-sans); margin-bottom: var(--space-2); }
.callout-warn { border-left-color: var(--accent); background: var(--accent-subtle); }
.callout-danger { border-left-color: var(--danger); background: var(--danger-subtle); }

.badge {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  padding: 0.25em 0.6em;
  border-radius: var(--radius-full);
  background: var(--bg-muted);
  color: var(--fg-muted);
  white-space: nowrap;
}
.badge-accent { background: var(--accent-subtle); color: var(--accent-hover); }

/* ---------- Tables ----------------------------------------------------- */
.table-wrap { overflow-x: auto; margin-block: var(--space-5); }
table { width: 100%; border-collapse: collapse; font-size: var(--text-base); }
th, td {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}
th { font-weight: 600; font-size: var(--text-sm); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--fg-muted); }
tbody tr:last-child td { border-bottom: 0; }

/* ---------- Forms ------------------------------------------------------- */
label { display: block; font-weight: 600; font-size: var(--text-sm); margin-bottom: var(--space-2); }
.field { margin-bottom: var(--space-5); }
.field-hint { font-size: var(--text-sm); color: var(--fg-muted); margin-top: var(--space-2); }
.field-error { font-size: var(--text-sm); color: var(--danger); margin-top: var(--space-2); font-weight: 500; }

input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="tel"], input[type="date"], select, textarea {
  width: 100%;
  min-height: 44px;
  padding: var(--space-3);
  font-family: inherit;
  font-size: var(--text-base);
  color: var(--fg);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--duration-fast) var(--ease);
}
input:hover, select:hover, textarea:hover { border-color: var(--border-strong); }
textarea { min-height: 120px; resize: vertical; line-height: var(--leading-normal); }
[aria-invalid="true"] { border-color: var(--danger); }

/* ---------- Header / footer -------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-subtle);
}
.site-header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  min-height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; gap: var(--space-2); text-decoration: none; color: var(--fg); font-weight: 600; }
.brand:hover { color: var(--fg); }
.brand-mark { width: 28px; height: 28px; flex: none; }
.brand-name { font-family: var(--font-serif); font-size: var(--text-lg); letter-spacing: var(--tracking-tight); }

.nav { display: none; gap: var(--space-5); margin-left: auto; align-items: center; }
.nav a { color: var(--fg-muted); text-decoration: none; font-size: var(--text-sm); font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--fg); }
@media (min-width: 880px) { .nav { display: flex; } .nav-toggle { display: none; } }

.nav-toggle {
  margin-left: auto;
  min-width: 44px; min-height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border); border-radius: var(--radius-md);
  color: var(--fg); cursor: pointer;
}
.nav-mobile {
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-4) 0 var(--space-5);
  display: grid; gap: var(--space-1);
}
.nav-mobile a {
  display: block; padding: var(--space-3) var(--space-2);
  color: var(--fg); text-decoration: none; font-weight: 500;
  border-radius: var(--radius-md);
}
.nav-mobile a:hover { background: var(--bg-muted); }
@media (min-width: 880px) { .nav-mobile { display: none !important; } }

.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-sunken);
  padding-block: var(--space-7) var(--space-6);
  margin-top: var(--space-9);
  font-size: var(--text-sm);
}
.site-footer h2 { font-family: var(--font-sans); font-size: var(--text-sm); font-weight: 600;
  text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--fg-muted);
  margin: 0 0 var(--space-3); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-2); }
.site-footer a { color: var(--fg-muted); text-decoration: none; }
.site-footer a:hover { color: var(--fg); text-decoration: underline; }
.footer-grid { display: grid; gap: var(--space-6); }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1.4fr repeat(3, 1fr); } }
.footer-legal { border-top: 1px solid var(--border-subtle); margin-top: var(--space-6); padding-top: var(--space-5); color: var(--fg-subtle); }

/* The compliance line. Appears on every page; must never be subtle enough to miss. */
.disclaimer-bar {
  background: var(--bg-muted);
  border-bottom: 1px solid var(--border-subtle);
  font-size: var(--text-sm);
  color: var(--fg-muted);
  padding-block: var(--space-2);
  text-align: center;
}
.disclaimer-bar strong { color: var(--fg); }

/* ---------- Breadcrumbs ------------------------------------------------- */
.breadcrumbs { font-size: var(--text-sm); color: var(--fg-subtle); padding-block: var(--space-5) 0; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-2); padding: 0; margin: 0; }
.breadcrumbs li::after { content: "/"; margin-left: var(--space-2); color: var(--border-strong); }
.breadcrumbs li:last-child::after { content: ""; }
.breadcrumbs a { color: var(--fg-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--fg); text-decoration: underline; }

/* ---------- Hero -------------------------------------------------------- */
.hero { padding-block: var(--space-8) var(--space-7); }
.hero h1 { max-width: 20ch; }
.hero .lede { margin-bottom: var(--space-6); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.hero-note { font-size: var(--text-sm); color: var(--fg-subtle); margin-top: var(--space-4); }

/* ---------- FAQ (details/summary — no JS needed) ----------------------- */
.faq { border-top: 1px solid var(--border-subtle); }
.faq details { border-bottom: 1px solid var(--border-subtle); }
.faq summary {
  cursor: pointer;
  padding: var(--space-4) 0;
  font-weight: 600;
  font-size: var(--text-lg);
  display: flex; justify-content: space-between; gap: var(--space-4);
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--fg-subtle); font-weight: 400; font-size: 1.4em; line-height: 1; flex: none; }
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding-bottom: var(--space-4); }
.faq details > div > :last-child { margin-bottom: 0; }

/* ---------- Pricing ----------------------------------------------------- */
.plan { display: flex; flex-direction: column; gap: var(--space-4); height: 100%; }
.plan-featured { border-color: var(--primary); border-width: 2px; }
.plan-price { font-family: var(--font-serif); font-size: var(--text-3xl); line-height: 1; }
.plan-price span { font-family: var(--font-sans); font-size: var(--text-sm); color: var(--fg-muted); font-weight: 400; }
.plan-features { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-2); font-size: var(--text-sm); }
.plan-features li { display: flex; gap: var(--space-2); align-items: flex-start; line-height: var(--leading-normal); }
.plan-features svg { flex: none; margin-top: 0.2em; }
.plan .btn { margin-top: auto; }

/* ---------- Link lists (hubs, related pages) --------------------------- */
.link-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-1); }
.link-list a {
  display: block; padding: var(--space-3); border-radius: var(--radius-md);
  text-decoration: none; color: var(--fg); border: 1px solid transparent;
}
.link-list a:hover { background: var(--bg-raised); border-color: var(--border-subtle); color: var(--fg); }
.link-list .link-meta { display: block; font-size: var(--text-sm); color: var(--fg-subtle); }

.columns { columns: 2; column-gap: var(--space-6); }
@media (min-width: 900px) { .columns { columns: 3; } }
.columns > * { break-inside: avoid; }

/* ---------- Steps ------------------------------------------------------- */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: var(--space-5); }
.steps > li { counter-increment: step; display: grid; grid-template-columns: 36px 1fr; gap: var(--space-4); }
.steps > li::before {
  content: counter(step);
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: var(--radius-full);
  background: var(--primary-subtle); color: var(--primary);
  border: 1px solid var(--primary-border);
  font-weight: 600; font-size: var(--text-sm);
}
.steps h3 { margin: 0 0 var(--space-2); font-size: var(--text-lg); font-family: var(--font-sans); }
.steps p:last-child { margin-bottom: 0; }

/* ---------- Utility ----------------------------------------------------- */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.nowrap { white-space: nowrap; }
.theme-toggle {
  min-width: 44px; min-height: 44px;
  display: inline-grid; place-items: center;
  background: transparent; border: 1px solid var(--border);
  border-radius: var(--radius-md); color: var(--fg-muted); cursor: pointer;
}
.theme-toggle:hover { color: var(--fg); background: var(--bg-muted); }
