/*
 * AuthDrift design system — hand-built, no build step.
 * Authored in cascade-layer order: reset -> tokens -> base -> utilities -> components.
 * Served from internal/web/static/app.css (go:embed) with a content-hash query for cache-busting.
 * Aesthetic: precision-instrument monitoring tool — neutral ink surfaces, one confident
 * indigo accent, soft tinted status badges, monospace for anything that is a DNS record.
 */
@layer reset, tokens, base, utilities, components;

/* ------------------------------------------------------------------ fonts */
/* Self-hosted (no Google Fonts CDN). woff2 only; system stack is the fallback. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("/static/fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("/static/fonts/inter-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("/static/fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("/static/fonts/inter-700.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 500; font-display: swap; src: url("/static/fonts/space-grotesk-500.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 600; font-display: swap; src: url("/static/fonts/space-grotesk-600.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 700; font-display: swap; src: url("/static/fonts/space-grotesk-700.woff2") format("woff2"); }

/* ------------------------------------------------------------------ reset */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }
  html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
  body { min-height: 100dvh; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
  img, svg, video { display: block; max-width: 100%; }
  input, button, textarea, select { font: inherit; color: inherit; }
  button { background: none; border: none; cursor: pointer; }
  a { color: inherit; }
  ul, ol { list-style: none; padding: 0; }
  :where(h1, h2, h3, h4) { line-height: 1.15; }
  :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
}

/* ------------------------------------------------------------------ tokens */
@layer tokens {
  :root {
    /* brand */
    --accent: #4f46e5;
    --accent-strong: #4338ca;
    --accent-soft: #edecfd;
    --accent-2: #0891b2;
    --gradient: linear-gradient(135deg, #4f46e5 0%, #7c6cf0 60%, #0ea5c8 130%);
    --gradient-text: linear-gradient(110deg, #4f46e5 0%, #0891b2 100%);

    /* surfaces + text */
    --bg: #fcfcfd;
    --bg-soft: #f4f4f7;
    --bg-elev: #ffffff;
    --bg-inset: #f7f7fa;
    --fg: #15171d;
    --fg-muted: #5d6472;
    --border: #e6e7ec;
    --border-strong: #d2d5dd;

    /* "ink" block — the dark surface used on both themes (CTA band, hero mock) */
    --ink: #101219;
    --ink-soft: #181b25;
    --ink-border: #2a2e3d;
    --ink-fg: #f0f1f5;
    --ink-muted: #9aa1b2;

    /* status (canonical four buckets the Go helpers emit) */
    --pass: #0a7d4f;    --pass-soft: #e4f5ec;   --pass-border: #b5e2cb;
    --warn: #9f6504;    --warn-soft: #fbf1dc;   --warn-border: #ecd6a4;
    --fail: #d1293e;    --fail-soft: #fdeaed;   --fail-border: #f5c1c9;
    --unknown: #5d6472; --unknown-soft: #eef0f4; --unknown-border: #d8dbe2;

    /* space scale */
    --sp-1: .25rem; --sp-2: .5rem; --sp-3: .75rem; --sp-4: 1rem;
    --sp-5: 1.5rem; --sp-6: 2rem; --sp-7: 3rem; --sp-8: 4.5rem;

    /* radius */
    --r-sm: 7px; --r-md: 10px; --r-lg: 14px; --r-xl: 20px; --r-pill: 999px;

    /* type */
    --font-display: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
    --fs-1: .76rem; --fs-2: .875rem; --fs-3: 1rem; --fs-4: 1.15rem;
    --fs-5: 1.45rem; --fs-6: 1.9rem; --fs-display: clamp(2.4rem, 5vw, 3.7rem);

    /* shadow */
    --shadow-sm: 0 1px 2px rgba(16, 18, 25, .05);
    --shadow-md: 0 2px 4px rgba(16, 18, 25, .04), 0 8px 24px rgba(16, 18, 25, .07);
    --shadow-lg: 0 4px 8px rgba(16, 18, 25, .05), 0 20px 50px rgba(16, 18, 25, .12);
    --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);

    color-scheme: light;
  }

  /* Dark mode: system preference is the default, unless an explicit light choice is set. */
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --accent: #7b73f0;
      --accent-strong: #948df5;
      --accent-soft: #232040;
      --accent-2: #38bdf8;
      --gradient: linear-gradient(135deg, #6a61ee 0%, #8d7ff5 60%, #22a8cf 130%);
      --gradient-text: linear-gradient(110deg, #948df5 0%, #38bdf8 100%);

      --bg: #0c0d12;
      --bg-soft: #111319;
      --bg-elev: #15171f;
      --bg-inset: #0f1117;
      --fg: #eef0f4;
      --fg-muted: #99a0ad;
      --border: #23262f;
      --border-strong: #343844;

      --ink: #101219;
      --ink-soft: #181b25;
      --ink-border: #2a2e3d;
      --ink-fg: #f0f1f5;
      --ink-muted: #9aa1b2;

      --pass: #46c98c;    --pass-soft: #122a1e;   --pass-border: #1f4a34;
      --warn: #e3a44b;    --warn-soft: #2b2210;   --warn-border: #51401e;
      --fail: #f27284;    --fail-soft: #311419;   --fail-border: #58242d;
      --unknown: #99a0ad; --unknown-soft: #1c1f27; --unknown-border: #31353f;

      --shadow-sm: 0 1px 2px rgba(0, 0, 0, .45);
      --shadow-md: 0 2px 4px rgba(0, 0, 0, .35), 0 10px 28px rgba(0, 0, 0, .45);
      --shadow-lg: 0 4px 8px rgba(0, 0, 0, .4), 0 24px 60px rgba(0, 0, 0, .55);
      --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);

      color-scheme: dark;
    }
  }

  /* Manual override (theme toggle) wins regardless of system preference. */
  [data-theme="dark"] {
    --accent: #7b73f0;
    --accent-strong: #948df5;
    --accent-soft: #232040;
    --accent-2: #38bdf8;
    --gradient: linear-gradient(135deg, #6a61ee 0%, #8d7ff5 60%, #22a8cf 130%);
    --gradient-text: linear-gradient(110deg, #948df5 0%, #38bdf8 100%);

    --bg: #0c0d12;
    --bg-soft: #111319;
    --bg-elev: #15171f;
    --bg-inset: #0f1117;
    --fg: #eef0f4;
    --fg-muted: #99a0ad;
    --border: #23262f;
    --border-strong: #343844;

    --ink: #101219;
    --ink-soft: #181b25;
    --ink-border: #2a2e3d;
    --ink-fg: #f0f1f5;
    --ink-muted: #9aa1b2;

    --pass: #46c98c;    --pass-soft: #122a1e;   --pass-border: #1f4a34;
    --warn: #e3a44b;    --warn-soft: #2b2210;   --warn-border: #51401e;
    --fail: #f27284;    --fail-soft: #311419;   --fail-border: #58242d;
    --unknown: #99a0ad; --unknown-soft: #1c1f27; --unknown-border: #31353f;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .45);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, .35), 0 10px 28px rgba(0, 0, 0, .45);
    --shadow-lg: 0 4px 8px rgba(0, 0, 0, .4), 0 24px 60px rgba(0, 0, 0, .55);
    --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);

    color-scheme: dark;
  }
}

/* ------------------------------------------------------------------ base */
@layer base {
  body {
    font-family: var(--font-body);
    font-size: var(--fs-3);
    line-height: 1.6;
    color: var(--fg);
    background: var(--bg);
    overflow-x: hidden;
  }
  h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.015em; color: var(--fg); }
  h1 { font-size: var(--fs-6); }
  h2 { font-size: var(--fs-5); }
  h3 { font-size: var(--fs-4); }
  a { color: var(--accent); text-decoration: none; }
  a:hover { text-decoration: underline; }
  code, pre, kbd { font-family: var(--font-mono); font-size: .92em; }
  ::selection { background: color-mix(in srgb, var(--accent) 24%, transparent); }
}

/* ------------------------------------------------------------------ utilities */
@layer utilities {
  .container { width: 100%; max-width: 68rem; margin-inline: auto; padding-inline: 1.5rem; }
  .container--narrow { max-width: 46rem; }
  .muted { color: var(--fg-muted); }
  .lead { font-size: var(--fs-4); color: var(--fg-muted); line-height: 1.65; }
  .hint { font-size: var(--fs-2); color: var(--fg-muted); }
  .gradient-text {
    background: var(--gradient-text); -webkit-background-clip: text; background-clip: text; color: transparent;
  }
  .icon { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
  [hidden] { display: none !important; }
}

/* ------------------------------------------------------------------ components */
@layer components {

  /* ---- buttons ---------------------------------------------------- */
  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .62rem 1.2rem; font-family: var(--font-body); font-size: var(--fs-2); font-weight: 600;
    border-radius: var(--r-md); border: 1px solid transparent; white-space: nowrap; line-height: 1.45;
    transition: background .14s ease, border-color .14s ease, color .14s ease, box-shadow .14s ease;
  }
  .btn:hover { text-decoration: none; }
  .btn:disabled { opacity: .6; cursor: progress; }
  .btn--primary {
    color: #fff; background: var(--accent);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), var(--shadow-sm);
  }
  .btn--primary:hover { background: var(--accent-strong); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), var(--shadow-md); }
  .btn--ghost { color: var(--fg); background: var(--bg-elev); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
  .btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
  /* solid status buttons pair the status color with the page background, which
     stays readable in both themes (dark text on the pastel dark-mode red) */
  .btn--danger { color: var(--bg); background: var(--fail); }
  .btn--danger:hover { box-shadow: var(--shadow-md); }
  .btn--lg { padding: .8rem 1.6rem; font-size: var(--fs-3); border-radius: var(--r-md); }

  /* legacy button hooks mapped onto the system (templates keep these class names) */
  .check-form button, .waitlist-row button,
  .invite-form button, .client-form button, .domain-form button {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .62rem 1.2rem; font-size: var(--fs-2); font-weight: 600; color: #fff; background: var(--accent);
    border: 1px solid transparent; border-radius: var(--r-md); line-height: 1.45;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), var(--shadow-sm);
    transition: background .14s ease, box-shadow .14s ease; white-space: nowrap;
  }
  .check-form button:hover, .waitlist-row button:hover,
  .invite-form button:hover, .client-form button:hover, .domain-form button:hover { background: var(--accent-strong); }
  .check-form button:disabled, .waitlist-row button:disabled { opacity: .6; cursor: progress; }

  .logout, .btn-quiet {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .42rem .85rem; font-size: var(--fs-2); font-weight: 600; color: var(--fg);
    background: var(--bg-elev); border: 1px solid var(--border-strong); border-radius: var(--r-sm);
    box-shadow: var(--shadow-sm); line-height: 1.45;
    transition: border-color .14s ease, color .14s ease;
  }
  .logout:hover, .btn-quiet:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
  .btn-danger {
    color: var(--fail); border-color: color-mix(in srgb, var(--fail) 45%, var(--border-strong));
  }
  .btn-danger:hover { background: var(--fail); border-color: var(--fail); color: var(--bg); }

  /* ---- inputs ----------------------------------------------------- */
  .check-form input[type=text], .waitlist-row input[type=email],
  .invite-form input[type=email], .invite-form input[type=url], .client-form input[type=text],
  .domain-form input[type=text], .domain-form select,
  .filter-bar input[type=search], .filter-bar select,
  .delete-form input[type=text], .client-rename input[type=text],
  .invite-form select, .inline-form select, .client-rename select {
    padding: .6rem .8rem; font-size: var(--fs-2); color: var(--fg);
    background: var(--bg-elev); border: 1px solid var(--border-strong); border-radius: var(--r-md);
    transition: border-color .14s ease, box-shadow .14s ease;
  }
  input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
  ::placeholder { color: var(--fg-muted); opacity: .65; }

  /* ---- cards / panels --------------------------------------------- */
  .card, .panel {
    background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-lg);
    padding: 1.5rem; box-shadow: var(--shadow-sm);
  }
  .panel { margin: 1.25rem 0; }
  .panel h2 { font-size: 1.05rem; margin-bottom: .5rem; }
  .panel .hint { margin-top: 0; margin-bottom: .35rem; }

  /* ---- badges (soft tinted pill with a status dot) ----------------- */
  .badge {
    display: inline-flex; align-items: center; gap: .42rem;
    padding: .14rem .6rem .14rem .5rem; border-radius: var(--r-pill);
    font-size: var(--fs-1); font-weight: 600; letter-spacing: .01em;
    white-space: nowrap; line-height: 1.6; border: 1px solid transparent;
  }
  .badge::before { content: ""; width: .44em; height: .44em; border-radius: 50%; background: currentColor; flex: none; }
  .badge-pass { color: var(--pass); background: var(--pass-soft); border-color: var(--pass-border); }
  .badge-warn { color: var(--warn); background: var(--warn-soft); border-color: var(--warn-border); }
  .badge-fail { color: var(--fail); background: var(--fail-soft); border-color: var(--fail-border); }
  .badge-unknown { color: var(--unknown); background: var(--unknown-soft); border-color: var(--unknown-border); }

  /* ---- HTMX loading indicator ------------------------------------- */
  .htmx-indicator { display: none; color: var(--fg-muted); margin: .6rem 0 0; font-size: var(--fs-2); }
  .htmx-request .htmx-indicator, .htmx-request.htmx-indicator { display: inline-flex; align-items: center; gap: .5rem; }
  .htmx-indicator::before {
    content: ""; width: .85em; height: .85em; border-radius: 50%; flex: none;
    border: 2px solid color-mix(in srgb, var(--accent) 30%, transparent); border-top-color: var(--accent);
    animation: ad-spin .7s linear infinite;
  }
  @keyframes ad-spin { to { transform: rotate(360deg); } }

  /* ---- public check result --------------------------------------- */
  .result {
    margin-top: 1.5rem; background: var(--bg-elev);
    border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-md);
    text-align: left;
  }
  .result-head {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1rem 1.3rem; background: var(--bg-inset); border-bottom: 1px solid var(--border);
  }
  .result-head h2 { word-break: break-all; font-size: 1.15rem; font-family: var(--font-mono); font-weight: 600; letter-spacing: 0; }
  .cats { margin: 0; }
  .cats li { padding: .95rem 1.3rem; border-bottom: 1px solid var(--border); }
  .cats li:last-child { border-bottom: none; }
  .cat-row { display: flex; align-items: center; gap: .75rem; }
  .cat-name {
    font-family: var(--font-mono); font-weight: 600; font-size: var(--fs-2);
    min-width: 5.5rem; letter-spacing: .02em;
  }
  .cat-summary { margin-top: .4rem; color: var(--fg-muted); font-size: var(--fs-2); }
  .cat-fix { margin-top: .5rem; color: var(--fg-muted); font-size: var(--fs-2); }
  .cat-fix strong { color: var(--fg); }

  /* ---- posture surfaces (email auth / web config) ----------------- */
  .surface-title {
    margin: 0; padding: .55rem 1.3rem; background: var(--bg-inset);
    border-bottom: 1px solid var(--border); border-top: 1px solid var(--border);
    font-family: var(--font-mono); font-size: .72rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .06em; color: var(--fg-muted);
  }
  .surface:first-child .surface-title { border-top: none; }

  /* ---- web-config detail (TLS / HSTS facts, header findings) ------ */
  .web-detail { margin-top: .6rem; display: flex; flex-wrap: wrap; gap: .35rem 1.4rem; }
  .web-detail > div { display: flex; gap: .4rem; align-items: baseline; font-size: var(--fs-2); }
  .web-detail dt { color: var(--fg-muted); }
  .web-detail dd { margin: 0; font-family: var(--font-mono); word-break: break-all; }
  .header-findings { margin-top: .4rem; padding-left: 1rem; border-left: 2px solid var(--border); }
  .header-findings li { padding: .3rem 0; }
  .header-finding-head { display: flex; align-items: center; gap: .5rem; }
  .header-name { font-family: var(--font-mono); font-size: var(--fs-2); word-break: break-all; }
  .header-findings .record { margin-top: .25rem; }

  /* ---- waitlist CTA ----------------------------------------------- */
  .cta { padding: 1.2rem 1.3rem; background: var(--accent-soft); border-top: 1px solid color-mix(in srgb, var(--accent) 18%, var(--border)); }
  .cta-lead { margin-bottom: .7rem; color: var(--fg); font-size: var(--fs-2); }
  .cta-lead strong { color: var(--fg); }
  .cta-lead code { word-break: break-all; }
  .waitlist-row { display: flex; gap: .5rem; }
  .waitlist-row input[type=email] { flex: 1; min-width: 0; }
  .waitlist-confirm { margin: 0; font-weight: 600; color: var(--pass); font-size: var(--fs-2); }

  /* ---- SPF detail (the headline differentiator) ------------------- */
  .spf-detail { margin-top: .7rem; }
  .spf-counter { margin-bottom: .5rem; font-size: var(--fs-2); color: var(--fg-muted); }
  .count {
    display: inline-block; padding: .08rem .5rem; border-radius: var(--r-sm);
    font-weight: 700; font-variant-numeric: tabular-nums; font-family: var(--font-mono); font-size: var(--fs-2);
  }
  .count-ok { background: var(--pass-soft); color: var(--pass); }
  .count-near { background: var(--warn-soft); color: var(--warn); }
  .count-over { background: var(--fail-soft); color: var(--fail); }
  .record {
    display: block; padding: .6rem .75rem; background: var(--bg-inset);
    border: 1px solid var(--border); border-radius: var(--r-sm);
    font-size: var(--fs-2); word-break: break-all; white-space: pre-wrap;
  }
  .chain-wrap { margin-top: .5rem; font-size: var(--fs-2); }
  .chain-wrap summary { cursor: pointer; color: var(--fg-muted); }
  .chain { margin-top: .4rem; padding-left: 1rem; border-left: 2px solid var(--border); }
  .chain .chain { margin-top: .25rem; }
  .chain li { padding: .15rem 0; }
  .chain-via { color: var(--fg-muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; margin-right: .4rem; }
  .chain-domain { font-family: var(--font-mono); word-break: break-all; }
  .chain-all { margin-left: .4rem; font-family: var(--font-mono); font-size: .8rem; color: var(--fg-muted); }
  .chain-note { display: block; font-size: var(--fs-2); color: var(--warn); margin-top: .1rem; }

  .error { color: var(--fail); margin-top: 1rem; font-weight: 600; font-size: var(--fs-2); }

  /* ---- site header (marketing) ------------------------------------ */
  .site-header {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1rem 0; margin-bottom: .25rem;
  }
  .site-header .brand { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--fg); }
  .site-header .brand:hover { text-decoration: none; }
  .header-actions { display: flex; align-items: center; gap: .35rem; }
  .header-actions .btn { margin-left: .5rem; }
  .header-link {
    padding: .45rem .75rem; font-size: var(--fs-2); font-weight: 500; color: var(--fg-muted);
    border-radius: var(--r-sm); transition: color .14s ease, background .14s ease;
  }
  .header-link:hover { color: var(--fg); background: var(--bg-soft); text-decoration: none; }
  @media (max-width: 40rem) { .header-link { display: none; } }

  /* logo mark: gradient rounded square with a shield glyph */
  .logo-mark { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 8px; background-image: var(--gradient); color: #fff; box-shadow: var(--shadow-sm); }
  .logo-mark-sm { width: 1.7rem; height: 1.7rem; }
  .logo-mark svg { width: 62%; height: 62%; stroke: #fff; }

  /* ---- theme toggle (floating, every page) ------------------------ */
  .theme-toggle {
    display: inline-grid; place-items: center; width: 2.3rem; height: 2.3rem;
    border: 1px solid var(--border-strong); border-radius: var(--r-pill); background: var(--bg-elev); color: var(--fg-muted);
    transition: border-color .14s ease, color .14s ease;
  }
  .theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
  .theme-toggle--floating { position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 50; box-shadow: var(--shadow-md); }
  .theme-toggle .icon-sun { display: none; }
  .theme-toggle .icon-moon { display: block; }
  [data-theme="dark"] .theme-toggle .icon-sun { display: block; }
  [data-theme="dark"] .theme-toggle .icon-moon { display: none; }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
    :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
  }

  /* ---- authenticated app shell ------------------------------------ */
  .app-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 0 .9rem; }
  .brand-block { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
  .app-head .brand { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--fg); }
  .app-head .brand:hover { text-decoration: none; }
  .account-name {
    font-size: var(--fs-1); font-weight: 600; padding: .18rem .65rem;
    border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--bg-soft);
  }
  .app-nav {
    display: flex; gap: .15rem; flex-wrap: nowrap; overflow-x: auto; margin: .25rem 0 1.75rem;
    padding: .3rem; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--r-md);
    scrollbar-width: none;
  }
  .app-nav::-webkit-scrollbar { display: none; }
  .nav-link {
    display: inline-flex; align-items: center; gap: .45rem;
    padding: .42rem .85rem; text-decoration: none; color: var(--fg-muted);
    font-weight: 600; font-size: var(--fs-2); border-radius: var(--r-sm); white-space: nowrap;
    transition: color .14s ease, background .14s ease;
  }
  .nav-link:hover { color: var(--fg); text-decoration: none; }
  .nav-link-active { color: var(--fg); background: var(--bg-elev); box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
  .page-title { font-size: clamp(1.5rem, 3vw, 1.9rem); margin: .25rem 0 1.25rem; }

  /* ---- flash banner ----------------------------------------------- */
  .app-notice {
    display: flex; align-items: center; gap: .6rem;
    padding: .7rem 1rem; border-radius: var(--r-md); font-size: var(--fs-2); font-weight: 600; margin-bottom: 1.25rem;
  }
  .app-notice::before { content: ""; width: .5em; height: .5em; border-radius: 50%; background: currentColor; flex: none; }
  .app-notice-notice { background: var(--pass-soft); color: var(--pass); border: 1px solid var(--pass-border); }
  .app-notice-error { background: var(--fail-soft); color: var(--fail); border: 1px solid var(--fail-border); }

  /* ---- inline forms ----------------------------------------------- */
  .invite-form, .client-form { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .8rem; }
  .invite-form input[type=email], .invite-form input[type=url], .client-form input[type=text] { flex: 1; min-width: 12rem; }
  .inline-form { display: inline; margin: 0; }

  /* ---- row lists -------------------------------------------------- */
  .rows { margin-top: .5rem; }
  .row {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    padding: .85rem .6rem; border-bottom: 1px solid var(--border);
    margin-inline: -.6rem; border-radius: var(--r-sm);
    transition: background .12s ease;
  }
  .row:hover { background: var(--bg-inset); }
  .row:last-child { border-bottom: none; }
  .row-main { display: flex; align-items: center; gap: .6rem; }
  .row-title { font-weight: 600; word-break: break-all; }
  .row-meta { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; color: var(--fg-muted); font-size: var(--fs-2); }
  .channel-secret { flex-direction: column; align-items: flex-start; gap: .3rem; }
  .channel-secret .record { width: 100%; }
  .client-rename { display: flex; gap: .5rem; align-items: center; flex: 1; min-width: 14rem; }
  .client-rename input[type=text] { flex: 1; min-width: 8rem; }

  /* ---- domains: add form + rows ----------------------------------- */
  .domain-form { display: flex; flex-direction: column; gap: .9rem; margin-top: .8rem; max-width: 34rem; }
  .domain-form label { display: flex; flex-direction: column; gap: .35rem; font-size: var(--fs-2); font-weight: 600; }
  .domain-form .hint { font-weight: 400; margin: 0; }
  .domain-form button { align-self: flex-start; }
  .domain-row { align-items: center; }
  .domain-main { display: flex; align-items: center; gap: .6rem; flex: 1; min-width: 14rem; }
  .domain-name { font-weight: 600; word-break: break-all; font-family: var(--font-mono); font-size: var(--fs-2); }
  a.domain-name { color: var(--fg); }
  a.domain-name:hover { color: var(--accent); text-decoration: none; }
  .domain-meta { display: flex; flex-direction: column; gap: .2rem; font-size: var(--fs-2); color: var(--fg-muted); }
  .domain-meta code { word-break: break-all; }
  .scan-status { display: inline-flex; }

  /* ---- dashboard stat cards --------------------------------------- */
  .stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: .8rem; margin: 1.5rem 0; }
  .stat-card {
    display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: .1rem;
    padding: .95rem 1.1rem; background: var(--bg-elev); border: 1px solid var(--border);
    border-radius: var(--r-lg); box-shadow: var(--shadow-sm); --stat-color: var(--accent);
  }
  .stat-count { font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.15; }
  .stat-label {
    display: inline-flex; align-items: center; gap: .45rem;
    font-size: var(--fs-1); font-weight: 600; color: var(--fg-muted);
    text-transform: uppercase; letter-spacing: .05em;
  }
  .stat-label::before { content: ""; width: .5em; height: .5em; border-radius: 50%; background: var(--stat-color); flex: none; }
  .stat-card-pass { --stat-color: var(--pass); }
  .stat-card-warn { --stat-color: var(--warn); }
  .stat-card-fail { --stat-color: var(--fail); }
  .stat-card-unknown { --stat-color: var(--unknown); }

  /* ---- dashboard filter + groups ---------------------------------- */
  .filter-bar { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1.5rem 0; }
  .filter-bar input[type=search] { flex: 1; min-width: 12rem; }
  .client-group { margin: 1.5rem 0; }
  .group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-bottom: .45rem; margin-bottom: .3rem; border-bottom: 1px solid var(--border-strong); }
  .group-head h2 { font-size: .95rem; word-break: break-word; text-transform: uppercase; letter-spacing: .04em; color: var(--fg-muted); }
  .group-head .muted { font-size: var(--fs-1); }

  /* ---- drift feed ------------------------------------------------- */
  .drift-panel { margin-top: 2.5rem; }
  .drift-row { align-items: flex-start; flex-direction: column; gap: .3rem; }
  .drift-main { display: flex; align-items: center; gap: .6rem; }
  .drift-body { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
  .drift-change { color: var(--fg-muted); font-size: var(--fs-2); }
  .drift-when { font-size: var(--fs-1); color: var(--fg-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

  /* ---- domain detail ---------------------------------------------- */
  .breadcrumb { display: flex; align-items: center; gap: .5rem; margin: .25rem 0 1.25rem; font-size: var(--fs-2); color: var(--fg-muted); }
  .breadcrumb .current { color: var(--fg); font-weight: 600; word-break: break-all; }
  .rua-overview { margin-bottom: 1rem; }
  .rua-sources { width: 100%; border-collapse: collapse; font-size: var(--fs-2); margin-top: .75rem; }
  .rua-sources th, .rua-sources td { padding: .55rem .6rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
  .rua-sources th { font-size: var(--fs-1); text-transform: uppercase; letter-spacing: .04em; color: var(--fg-muted); font-weight: 600; }
  .rua-sources tr:last-child td { border-bottom: none; }
  .rua-host { display: block; font-size: var(--fs-1); }
  .domain-detail-head { padding: 0; overflow: hidden; }
  .domain-detail-head .result-head { margin: 0 0 1.25rem; border-radius: 0; }
  .domain-detail-head > *:not(.result-head) { padding-inline: 1.5rem; }
  .domain-detail-head > *:last-child { padding-bottom: 1.5rem; }
  .detail-meta { margin-bottom: 1rem; display: grid; gap: .5rem; }
  .detail-meta > div { display: flex; gap: .5rem; flex-wrap: wrap; align-items: baseline; }
  .detail-meta dt { min-width: 8rem; font-weight: 600; font-size: var(--fs-2); color: var(--fg-muted); }
  .detail-meta dd { font-size: var(--fs-2); word-break: break-word; }
  .detail-meta code { word-break: break-all; }
  .domain-detail-head .inline-form { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
  .domain-detail-head .inline-form .hint { margin: 0; }

  /* ---- posture history timeline ----------------------------------- */
  .history-list .history-row { flex-direction: column; align-items: flex-start; gap: .45rem; }
  .history-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
  .history-when { font-size: var(--fs-2); color: var(--fg-muted); font-variant-numeric: tabular-nums; }
  .history-baseline {
    font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent);
    background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
    border-radius: var(--r-pill); padding: .08rem .55rem;
  }
  .history-cells { display: flex; flex-wrap: wrap; gap: .4rem .9rem; }
  .history-cell { display: inline-flex; align-items: center; gap: .35rem; }
  .history-cat { font-size: .7rem; font-weight: 600; color: var(--fg-muted); font-family: var(--font-mono); letter-spacing: .02em; }
  .history-cell .badge { font-size: .64rem; padding: .02rem .45rem .02rem .4rem; }
  .history-spf { font-size: var(--fs-2); color: var(--fg-muted); font-variant-numeric: tabular-nums; }

  /* ---- tables ----------------------------------------------------- */
  .table { width: 100%; border-collapse: collapse; font-size: var(--fs-2); }
  .table th, .table td { padding: .6rem .7rem; text-align: left; border-bottom: 1px solid var(--border); }
  .table th { font-size: var(--fs-1); text-transform: uppercase; letter-spacing: .04em; color: var(--fg-muted); font-weight: 600; }
  .table tr:last-child td { border-bottom: none; }

  /* ---- empty states ----------------------------------------------- */
  .empty { padding: 2rem 1rem; text-align: center; color: var(--fg-muted); }

  /* page heading (legal/static pages) */
  .page-head { margin: 1.5rem 0; }
  .page-head h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); letter-spacing: -.02em; }

  /* centered page state (invalid invite, etc.) */
  .page-state { max-width: 34rem; margin: 4rem auto; text-align: center; }
  .page-state-ico { display: inline-grid; place-items: center; width: 3.5rem; height: 3.5rem; margin-bottom: 1.25rem; border-radius: var(--r-lg); color: var(--warn); background: var(--warn-soft); border: 1px solid var(--warn-border); }
  .page-state-ico .icon { width: 1.6rem; height: 1.6rem; }
  .page-state h1 { font-size: 1.5rem; margin-bottom: .5rem; }
  .page-state .btn { margin-top: 1.5rem; }

  /* ---- legal pages ------------------------------------------------ */
  .legal { max-width: 48rem; }
  .legal h2 { font-size: 1.15rem; margin: 1.8rem 0 .5rem; }
  .legal p, .legal li { color: var(--fg); }
  .legal ul { padding-left: 1.2rem; list-style: disc; }
  .legal li { margin: .35rem 0; }

  /* ---- footer ------------------------------------------------------ */
  .site-footer { margin-top: 4rem; border-top: 1px solid var(--border); background: var(--bg-soft); }
  .site-footer__inner { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; padding: 1.75rem 0; font-size: var(--fs-2); color: var(--fg-muted); }
  .site-footer a { color: var(--fg-muted); }
  .site-footer a:hover { color: var(--accent); }
  .site-footer .brand { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-display); font-weight: 700; color: var(--fg); }
  .site-footer .footer-spacer { margin-left: auto; }

  /* ---- danger zone ------------------------------------------------ */
  .panel-danger { border-color: color-mix(in srgb, var(--fail) 35%, var(--border)); }
  .panel-danger h2 { color: var(--fail); }
  .delete-form { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .8rem; }
  .delete-form input[type=text] { flex: 1; min-width: 12rem; }
  .delete-form button {
    padding: .62rem 1.2rem; font-size: var(--fs-2); font-weight: 600; color: var(--bg); background: var(--fail);
    border: 1px solid var(--fail); border-radius: var(--r-md); white-space: nowrap;
  }

  /* ============================================================ landing */
  .hero { position: relative; padding: 3.5rem 0 4.5rem; overflow: hidden; }
  /* faint dotted grid + a single soft accent glow — quiet, technical backdrop */
  .hero::before {
    content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background-image: radial-gradient(color-mix(in srgb, var(--fg) 9%, transparent) 1px, transparent 1px);
    background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(42rem 30rem at 28% 18%, #000 0%, transparent 75%);
    mask-image: radial-gradient(42rem 30rem at 28% 18%, #000 0%, transparent 75%);
  }
  .hero::after {
    content: ""; position: absolute; inset: -20% -10% auto auto; width: 46rem; height: 32rem; z-index: 0; pointer-events: none;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 13%, transparent), transparent);
    filter: blur(10px);
  }
  .hero > * { position: relative; z-index: 1; }
  .hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3rem; align-items: center; }
  @media (min-width: 62rem) { .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 4rem; } }
  .hero-eyebrow {
    display: inline-flex; align-items: center; gap: .5rem; padding: .3rem .8rem; margin-bottom: 1.25rem;
    font-size: var(--fs-2); font-weight: 600; color: var(--accent);
    background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); border-radius: var(--r-pill);
  }
  .hero h1 { font-size: var(--fs-display); letter-spacing: -.03em; max-width: 17ch; line-height: 1.06; }
  .hero .lead { margin-top: 1.25rem; max-width: 48ch; font-size: 1.15rem; }
  .hero-checker { margin-top: 2rem; max-width: 36rem; }

  /* the check form is a single "command bar": fused input + button in one bordered shell */
  .check-form {
    display: flex; gap: .4rem; flex-wrap: wrap; align-items: center;
    padding: .4rem; background: var(--bg-elev); border: 1px solid var(--border-strong);
    border-radius: var(--r-lg); box-shadow: var(--shadow-md);
    transition: border-color .14s ease, box-shadow .14s ease;
  }
  .check-form:focus-within { border-color: var(--accent); box-shadow: var(--ring), var(--shadow-md); }
  .check-form input[type=text] {
    flex: 1; min-width: 12rem; padding: .65rem .8rem; font-size: var(--fs-3);
    font-family: var(--font-mono); background: transparent; border: none; box-shadow: none;
  }
  .check-form input[type=text]:focus { box-shadow: none; }
  .check-form > button { padding: .65rem 1.3rem; font-size: var(--fs-2); }
  .check-advanced { flex-basis: 100%; padding: 0 .5rem .35rem; font-size: var(--fs-2); }
  .check-advanced summary { cursor: pointer; color: var(--fg-muted); width: max-content; }
  .check-advanced summary:hover { color: var(--accent); }
  .check-advanced input[type=text] {
    margin-top: .5rem; width: 100%; padding: .55rem .7rem; font-size: var(--fs-2);
    background: var(--bg-inset); border: 1px solid var(--border); border-radius: var(--r-sm);
  }
  .check-advanced .hint { margin-top: .4rem; }
  .hero-checker > .hint { margin-top: .6rem; padding-left: .25rem; }

  /* hero visual: a mock confirmed-drift alert with a record diff */
  .hero-visual { display: grid; grid-template-columns: minmax(0, 1fr); gap: .9rem; min-width: 0; }
  .mock {
    min-width: 0; border-radius: var(--r-lg); border: 1px solid var(--ink-border);
    background: var(--ink); color: var(--ink-fg); box-shadow: var(--shadow-lg);
  }
  .mock-bar {
    display: flex; align-items: center; flex-wrap: wrap; gap: .3rem .6rem; padding: .65rem 1rem;
    border-bottom: 1px solid var(--ink-border); font-family: var(--font-mono); font-size: var(--fs-1); color: var(--ink-muted);
  }
  .mock-bar .mock-dots { display: inline-flex; gap: .3rem; }
  .mock-bar .mock-dots i { width: .55rem; height: .55rem; border-radius: 50%; background: var(--ink-border); }
  .mock-bar .mock-spacer { margin-left: auto; }
  .mock-body { padding: 1rem 1.1rem 1.1rem; }
  .mock-title { display: flex; align-items: center; gap: .35rem .6rem; flex-wrap: wrap; margin-bottom: .35rem; min-width: 0; }
  .mock-title strong { font-family: var(--font-display); font-size: 1.02rem; letter-spacing: -.01em; }
  .mock-when { margin-left: auto; font-size: var(--fs-1); color: var(--ink-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .mock-domain { font-family: var(--font-mono); font-size: var(--fs-2); color: var(--ink-muted); margin-bottom: .85rem; }
  .mock-diff {
    margin: 0; padding: .75rem .9rem; border-radius: var(--r-sm);
    background: var(--ink-soft); border: 1px solid var(--ink-border);
    font-size: .8rem; line-height: 1.7; overflow-x: auto;
  }
  .mock-diff code { display: block; white-space: pre; font-size: 1em; }
  .diff-del { display: block; color: #f9939f; }
  .diff-del::before { content: "- "; opacity: .7; }
  .diff-add { display: block; color: #5fdc9e; }
  .diff-add::before { content: "+ "; opacity: .7; }
  .mock-foot { display: flex; align-items: center; gap: .5rem; margin-top: .85rem; font-size: var(--fs-1); color: var(--ink-muted); }
  .mock-foot .icon { width: 1em; height: 1em; color: #5fdc9e; }
  /* the quiet "all clear" strip above the alert card */
  .mock-quiet {
    display: flex; align-items: center; flex-wrap: wrap; gap: .35rem .65rem; padding: .7rem 1rem; min-width: 0;
    border-radius: var(--r-md); border: 1px solid var(--border);
    background: var(--bg-elev); box-shadow: var(--shadow-sm);
    font-size: var(--fs-2); color: var(--fg-muted);
  }
  .mock-quiet .pulse-dot { position: relative; display: inline-block; width: .55rem; height: .55rem; margin-right: .15rem; border-radius: 50%; background: var(--pass); }
  .mock-quiet .pulse-dot::after {
    content: ""; position: absolute; inset: -4px; border-radius: 50%;
    border: 2px solid var(--pass); opacity: 0; animation: ad-pulse 2.4s ease-out infinite;
  }
  @keyframes ad-pulse { 0% { transform: scale(.4); opacity: .7; } 70% { transform: scale(1); opacity: 0; } 100% { opacity: 0; } }
  .mock-quiet code { font-size: .85em; }
  .mock-quiet .mock-when { margin-left: auto; }

  /* ---- sections ---------------------------------------------------- */
  .section { padding: 4.5rem 0; }
  .section--soft { background: var(--bg-soft); border-block: 1px solid var(--border); }
  .section-head { max-width: 42rem; margin: 0 auto 2.75rem; text-align: center; }
  .section-head h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); letter-spacing: -.025em; }
  .section-head p { margin-top: .75rem; color: var(--fg-muted); font-size: var(--fs-4); }
  .section-eyebrow {
    display: block; margin-bottom: .75rem; font-family: var(--font-mono); font-size: var(--fs-1);
    font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent);
  }

  /* the six checks */
  .card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }
  .feature-card {
    padding: 1.4rem; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm); transition: border-color .15s ease, box-shadow .15s ease;
  }
  .feature-card:hover { box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
  .feature-card .feature-ico {
    display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; margin-bottom: .9rem;
    border-radius: var(--r-md); color: var(--accent); background: var(--accent-soft);
    border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  }
  .feature-card h3 { font-size: 1rem; margin-bottom: .35rem; font-family: var(--font-mono); font-weight: 600; letter-spacing: .02em; }
  .feature-card p { color: var(--fg-muted); font-size: var(--fs-2); }

  /* numbered "how it works" steps — number sits in its own grid column,
     so it can never overlap the copy */
  .steps { counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; }
  .step {
    display: grid; grid-template-columns: auto 1fr; column-gap: 1rem; align-items: start;
    padding: 1.4rem; background: var(--bg-elev); border: 1px solid var(--border);
    border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  }
  .step::before {
    counter-increment: step; content: counter(step);
    grid-row: 1 / -1; display: grid; place-items: center; width: 2rem; height: 2rem; margin-top: .1rem;
    font-family: var(--font-mono); font-weight: 700; font-size: var(--fs-2);
    color: var(--accent); background: var(--accent-soft);
    border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); border-radius: var(--r-pill);
  }
  .step h3 { grid-column: 2; font-size: 1.02rem; margin-bottom: .35rem; align-self: center; min-height: 2rem; display: flex; align-items: center; }
  .step p { grid-column: 2; color: var(--fg-muted); font-size: var(--fs-2); }

  /* two-column split (monitoring / agency sections) */
  .split { display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: center; }
  @media (min-width: 52rem) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 3.5rem; } }
  .split h2 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.02em; }
  .split .lead { margin-top: .75rem; font-size: var(--fs-3); }
  .value-list { display: grid; gap: .6rem; }
  .value-list li {
    display: flex; align-items: flex-start; gap: .65rem;
    padding: .8rem 1rem; background: var(--bg-elev); border: 1px solid var(--border);
    border-radius: var(--r-md); font-size: var(--fs-2); box-shadow: var(--shadow-sm);
  }
  .value-list li .icon { color: var(--pass); margin-top: .2rem; }

  /* pricing */
  .pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; align-items: stretch; }
  .pricing-grid--single { max-width: 34rem; margin-inline: auto; }
  .pricing-note { text-align: center; margin-top: 1.25rem; }
  .price-card {
    display: flex; flex-direction: column; padding: 1.75rem;
    background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-sm);
  }
  .price-card--featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-lg); position: relative; }
  .price-card .plan-name { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
  .price-card .plan-price { margin: .5rem 0 1.1rem; font-family: var(--font-display); font-size: 2.1rem; font-weight: 700; letter-spacing: -.02em; }
  .price-card .plan-price span { font-size: var(--fs-2); font-weight: 500; color: var(--fg-muted); letter-spacing: 0; }
  .price-card ul { display: grid; gap: .55rem; margin-bottom: 1.5rem; font-size: var(--fs-2); }
  .price-card li { display: flex; align-items: flex-start; gap: .5rem; color: var(--fg-muted); }
  .price-card li .icon { color: var(--pass); margin-top: .15rem; }
  .price-card .btn { margin-top: auto; }
  .plan-tag {
    position: absolute; top: -.78rem; left: 50%; transform: translateX(-50%);
    padding: .18rem .8rem; font-size: var(--fs-1); font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
    color: #fff; background: var(--accent); border-radius: var(--r-pill); white-space: nowrap;
  }

  /* FAQ */
  .faq { max-width: 46rem; margin: 0 auto; display: grid; gap: .65rem; }
  .faq-item { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-md); padding: 1rem 1.25rem; box-shadow: var(--shadow-sm); }
  .faq-item summary { cursor: pointer; font-weight: 600; font-size: var(--fs-2); list-style: none; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
  .faq-item summary::-webkit-details-marker { display: none; }
  .faq-item summary::after { content: "+"; color: var(--accent); font-family: var(--font-mono); font-size: 1.2rem; line-height: 1; flex: none; }
  .faq-item[open] summary::after { content: "\2212"; }
  .faq-item p { margin-top: .75rem; color: var(--fg-muted); font-size: var(--fs-2); }

  /* big closing CTA band — the dark "ink" block, both themes */
  .cta-band { padding: 4.5rem 0; }
  .cta-band .panel {
    position: relative; overflow: hidden; text-align: center;
    background: var(--ink); border: 1px solid var(--ink-border); color: var(--ink-fg);
    padding: 3.25rem 1.5rem; box-shadow: var(--shadow-lg);
  }
  .cta-band .panel::before {
    content: ""; position: absolute; inset: auto -20% -70% -20%; height: 120%;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 32%, transparent), transparent);
    pointer-events: none;
  }
  .cta-band .panel > * { position: relative; }
  .cta-band h2 { color: var(--ink-fg); font-size: clamp(1.6rem, 3.2vw, 2.2rem); letter-spacing: -.025em; }
  .cta-band p { margin: .75rem auto 1.75rem; max-width: 44ch; color: var(--ink-muted); }
  .cta-band .btn--primary { background: #fff; color: #15171d; box-shadow: var(--shadow-md); }
  .cta-band .btn--primary:hover { background: #e8e9ee; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
