/* OptSEO — landing page.
   ------------------------------------------------------------------------
   CSP: the site's policy (vercel.json) sets `style-src 'self'
   https://fonts.googleapis.com` with no 'unsafe-inline', so every rule lives
   in this file. There are zero style="" attributes in index.html and there
   must stay zero.

   DESIGN DIRECTION
   - Same family as the main site (descent.css): Archivo for display, Geist
     for text, Geist Mono for data; the obsidian ground and crystalline cyan
     accent in dark; pill buttons; the ring brand mark.
   - One addition the main site doesn't have, because this page is read by
     business owners rather than engineers: a STATUS palette. Green = good,
     amber = needs work, red = fix first. Those three colours are used for
     status and nothing else, so they keep meaning something. Brand/info
     colour is the cyan accent.
   - COLOUR IS NEVER THE ONLY SIGNAL. Every coloured status carries a word
     and a glyph (✓ / ! / ✕) as well, for colour-blind readers and for
     screen readers, which don't see colour at all.
   - TWO THEMES. Dark is the default (the brand's own face); light follows
     the visitor's system setting, and the toggle in the nav overrides both.
     theme-boot.js applies a saved choice before first paint. Components only
     ever use the tokens below, so they switch with the theme automatically.

   CONTRAST: every text token clears WCAG AA (4.5:1) on every surface token
   it is painted on, in both themes. The quietest text token, --text-dim, is
   the floor; nothing dimmer carries text.
   ======================================================================== */

/* ========================================================================
   TOKENS — dark (default)
   ======================================================================== */

:root {
  color-scheme: dark;

  --bg: #050608;
  --bg-alt: #090b0e;
  --surface: #0d1013;
  --surface-raised: #11151a;
  --surface-inset: #161b21;
  --surface-bar: #1a2027;
  --surface-bar-strong: #222a32;

  --border: #222a31;
  --border-soft: #171c22;
  --border-hair: #1d242b;
  --border-input: #2c3640;

  --text-bright: #f7fafb;
  --text: #eef2f4;
  --text-soft: #c7d0d5;
  --text-muted: #a9b4ba;
  --text-dim: #8d999f;

  /* Brand / info: the main site's crystalline cyan. */
  --accent: #bfe9f5;
  --accent-strong: #8fd9ee;
  --accent-soft: rgba(191, 233, 245, 0.07);
  --accent-line: rgba(191, 233, 245, 0.35);

  /* Status. Text colour, tinted fill, and outline for each. */
  --good: #45dd9b;
  --good-bg: rgba(69, 221, 155, 0.11);
  --good-line: rgba(69, 221, 155, 0.38);
  --warn: #ffbd5c;
  --warn-bg: rgba(255, 189, 92, 0.11);
  --warn-line: rgba(255, 189, 92, 0.38);
  --bad: #ff7a73;
  --bad-bg: rgba(255, 122, 115, 0.11);
  --bad-line: rgba(255, 122, 115, 0.38);
  /* Fills for graphics (gauge, bars). In dark they equal the text colours; in
     light they are brighter, since those only need to read as a colour and
     the text beside them carries the value. */
  --good-fill: var(--good);
  --warn-fill: var(--warn);
  --bad-fill: var(--bad);

  /* Primary action: the main site's white pill on the dark ground. */
  --btn-bg: #f4f7f8;
  --btn-bg-hover: #ffffff;
  --btn-ink: #050608;
  --btn-glow: rgba(191, 233, 245, 0.45);

  --nav-bg: rgba(5, 6, 8, 0.82);
  --shadow-card: 0 24px 60px -30px rgba(0, 0, 0, 0.9);

  /* Kept as names the page already uses: --positive for success text. */
  --positive: var(--good);

  --font-display: "Archivo", system-ui, sans-serif;
  --font-text: "Geist", system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, monospace;

  --gutter: 32px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 999px;

  --duration-fast: 140ms;
  --duration-normal: 240ms;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  /* ---- BRIDGE TO audit-report.css ------------------------------------
     The report rendered into #audit-results-mount reads the site-wide --sc-*
     names. They are bound here to this page's palette so the report follows
     the page's theme instead of pulling in two more stylesheets. */
  --sc-canvas: var(--bg);
  --sc-surface: var(--surface);
  --sc-ink: var(--text);
  --sc-ink-soft: var(--text-muted);
  --sc-accent: var(--accent);

  --sc-font-display: var(--font-display);
  --sc-font-text: var(--font-text);
  --sc-font-mono: var(--font-mono);

  --sc-1: 0.25rem;
  --sc-2: 0.5rem;
  --sc-3: 0.75rem;
  --sc-4: 1rem;
  --sc-5: 1.5rem;
  --sc-6: 2rem;
  --sc-7: 3rem;

  --sc-track-tight: -0.035em;
  --sc-track-snug: -0.02em;
  --sc-track-normal: -0.005em;
  --sc-track-wide: 0.08em;
  --sc-leading-none: 0.94;

  --sc-d-fast: var(--duration-fast);
  --sc-d-base: var(--duration-normal);
  --sc-d-slow: 420ms;
  --sc-ease-out: var(--ease-out);
}

/* ========================================================================
   TOKENS — light. Declared twice on purpose: once for visitors whose system
   is set to light and who haven't chosen, once for an explicit choice. The
   values must stay identical in both blocks.
   ======================================================================== */

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f6f8f9;
    --bg-alt: #eef2f4;
    --surface: #ffffff;
    --surface-raised: #ffffff;
    --surface-inset: #f2f5f7;
    --surface-bar: #e7ecef;
    --surface-bar-strong: #d9e1e6;
    --border: #d8e0e5;
    --border-soft: #e3e9ed;
    --border-hair: #e0e6ea;
    --border-input: #c3ced5;
    --text-bright: #030405;
    --text: #0c1317;
    --text-soft: #26333a;
    --text-muted: #3e4c54;
    --text-dim: #56646c;
    --accent: #0a6a82;
    --accent-strong: #08586c;
    --accent-soft: rgba(10, 106, 130, 0.07);
    --accent-line: rgba(10, 106, 130, 0.35);
    --good: #0b7148;
    --good-bg: #e6f6ee;
    --good-line: #9fd8bd;
    --warn: #8a5000;
    --warn-bg: #fdf1dc;
    --warn-line: #efc98c;
    --bad: #b8261f;
    --bad-bg: #fdeceb;
    --bad-line: #f1b1ad;
    --good-fill: #17a36b;
    --warn-fill: #eba123;
    --bad-fill: #dc3b33;
    --btn-bg: #0b1114;
    --btn-bg-hover: #000000;
    --btn-ink: #ffffff;
    --btn-glow: rgba(10, 106, 130, 0.35);
    --nav-bg: rgba(246, 248, 249, 0.86);
    --shadow-card: 0 20px 50px -28px rgba(12, 19, 23, 0.35);
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f8f9;
  --bg-alt: #eef2f4;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-inset: #f2f5f7;
  --surface-bar: #e7ecef;
  --surface-bar-strong: #d9e1e6;
  --border: #d8e0e5;
  --border-soft: #e3e9ed;
  --border-hair: #e0e6ea;
  --border-input: #c3ced5;
  --text-bright: #030405;
  --text: #0c1317;
  --text-soft: #26333a;
  --text-muted: #3e4c54;
  --text-dim: #56646c;
  --accent: #0a6a82;
  --accent-strong: #08586c;
  --accent-soft: rgba(10, 106, 130, 0.07);
  --accent-line: rgba(10, 106, 130, 0.35);
  --good: #0b7148;
  --good-bg: #e6f6ee;
  --good-line: #9fd8bd;
  --warn: #8a5000;
  --warn-bg: #fdf1dc;
  --warn-line: #efc98c;
  --bad: #b8261f;
  --bad-bg: #fdeceb;
  --bad-line: #f1b1ad;
  --good-fill: #17a36b;
  --warn-fill: #eba123;
  --bad-fill: #dc3b33;
  --btn-bg: #0b1114;
  --btn-bg-hover: #000000;
  --btn-ink: #ffffff;
  --btn-glow: rgba(10, 106, 130, 0.35);
  --nav-bg: rgba(246, 248, 249, 0.86);
  --shadow-card: 0 20px 50px -28px rgba(12, 19, 23, 0.35);
}

/* ========================================================================
   BASE
   ======================================================================== */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* `clip`, not `hidden`: stops stray horizontal overflow without creating a
     scroll container, which would break the sticky nav. */
  overflow-x: clip;
  transition: background-color var(--duration-normal) var(--ease-out), color var(--duration-normal) var(--ease-out);
}

a { color: inherit; text-decoration: none; }
input::placeholder { color: var(--text-dim); opacity: 1; }

figure.dashboard-card,
.eyebrow,
.chip-row,
.channel__clock,
.stat-card > p,
.step > p,
.anatomy-item p,
.lead-magnet > p { margin: 0; }

.chip-row,
.find-list,
.legend { list-style: none; padding-left: 0; margin: 0; }

code {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.92em;
  color: var(--text-soft);
}
::selection { background: var(--accent); color: var(--bg); }
img, svg { max-width: 100%; }

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -200%;
  z-index: 100;
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
}
.skip-link:focus-visible { top: 12px; }

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.wrap--flush { padding-left: 0; padding-right: 0; }

section { width: 100%; }
.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.pad-72 { padding: 72px var(--gutter); }
.pad-88 { padding: 88px var(--gutter); }
.pad-96 { padding: 96px var(--gutter); }

.mono { font-family: var(--font-mono); font-weight: 500; }

/* ========================================================================
   FOCUS — a visible accent ring on everything interactive. The accent clears
   3:1 against every surface in both themes.
   ======================================================================== */

:where(a, button, input, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.btn-accent:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-pill);
  box-shadow: 0 0 28px -4px var(--btn-glow);
}

.text-input:focus-visible,
.text-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), 0 0 0 1px var(--accent);
}

.faq-question:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  border-radius: var(--radius-sm);
}

/* ========================================================================
   NAV — the main site's wordmark: a ring and the name in Archivo.
   ======================================================================== */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  backdrop-filter: blur(12px);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border-soft);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px var(--gutter);
  max-width: 1160px;
  margin: 0 auto;
}
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
  font-size: 14.5px;
  color: var(--text-soft);
  transition: color var(--duration-fast) var(--ease-out);
}
.nav-links a:hover { color: var(--text-bright); }
.nav-actions { display: flex; align-items: center; gap: 12px; }

.brand { display: flex; align-items: center; gap: 10px; }
.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.035em;
  color: var(--text-bright);
}
.brand__name--sm { font-size: 16px; }

/* The ring from the main site's wordmark (descent.css .descent-mark__ring). */
.brand-ring {
  width: 1.1em;
  height: 1.1em;
  font-size: 19px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  flex: 0 0 auto;
}
.brand-ring--sm { font-size: 16px; }

/* ---- theme toggle ------------------------------------------------------- */

.theme-toggle {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
}
.theme-toggle:hover { color: var(--text-bright); border-color: var(--border-input); }
.theme-toggle svg { width: 18px; height: 18px; display: block; }
/* Shows the theme you'd switch TO: a sun while dark, a moon while light. */
.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="dark"]) .theme-toggle .icon-moon { display: block; }
}

/* ========================================================================
   BUTTONS + INPUTS — the main site's pill.
   ======================================================================== */

.btn-accent {
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: -0.005em;
  padding: 10px 20px;
  min-height: 44px;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 36px -10px var(--btn-glow);
  transition:
    background var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-normal) var(--ease-out);
}
.btn-accent:hover {
  background: var(--btn-bg-hover);
  box-shadow: 0 0 52px -6px var(--btn-glow);
  transform: translateY(-1px);
}
.btn-accent:active { transform: scale(0.975); }
.btn-accent[disabled] { cursor: progress; opacity: 0.6; }
.btn-accent[disabled]:hover { background: var(--btn-bg); box-shadow: none; transform: none; }

.btn-accent--md { padding: 12px 22px; font-size: 15px; }
.btn-accent--lg { padding: 14px 24px; }

.text-input {
  flex: 1 1 260px;
  min-width: 0;
  min-height: 52px;
  padding: 14px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-input);
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
  transition:
    border-color var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-normal) var(--ease-out);
}
.text-input:hover { border-color: var(--text-dim); }
.text-input:read-only { color: var(--text-muted); border-style: dashed; }

/* ========================================================================
   STATUS — the colour-coded vocabulary used across the page. Always a glyph
   and a word alongside the colour.
   ======================================================================== */

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 4px 10px 4px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid;
  font-family: var(--font-text);
  font-weight: 600;
  font-size: 12.5px;
  line-height: 1.3;
}
.status__glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
  flex: 0 0 auto;
}
.status--good { color: var(--good); background: var(--good-bg); border-color: var(--good-line); }
.status--warn { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-line); }
.status--bad { color: var(--bad); background: var(--bad-bg); border-color: var(--bad-line); }
.status--good .status__glyph { background: var(--good); color: var(--surface); }
.status--warn .status__glyph { background: var(--warn); color: var(--surface); }
.status--bad .status__glyph { background: var(--bad); color: var(--surface); }

.legend { display: flex; flex-wrap: wrap; gap: 8px; }

/* ========================================================================
   HERO
   ======================================================================== */

.hero {
  padding: 96px var(--gutter) 88px;
  position: relative;
  overflow: hidden;
}
/* A quiet cyan haze behind the hero, the page's one atmospheric flourish. */
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: 60%;
  height: 90%;
  background: radial-gradient(closest-side, var(--accent-soft), transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; display: flex; gap: 64px; align-items: center; flex-wrap: wrap; }
.hero-copy {
  flex: 1 1 520px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 6px 14px 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
}
.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 3px var(--good-bg);
  flex: 0 0 auto;
}
.eyebrow span { font-size: 13px; color: var(--text-soft); }

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 1.5rem + 3.4vw, 3.75rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--text-bright);
}
.hero-title__line { display: block; }

/* Hero emphasis. The one place a status colour is used for tone rather than
   a measurement: red on the competition, the thing to beat. Clears AA as
   large text in both themes. */
.hl-bad { color: var(--bad); }

/* The rotator is decorative and aria-hidden: the h1's accessible name comes
   from the .sr-only line beside it. */
.rotator {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  padding: 4px 18px 4px 10px;
  border-radius: var(--radius-lg);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  max-width: 100%;
  opacity: 1;
  filter: blur(0);
}
.rotator-icon { display: inline-flex; width: 44px; height: 44px; flex: 0 0 auto; }
.rotator-icon svg { display: none; }
.rotator-icon svg.active { display: block; }
.rotator-name {
  min-width: 240px;
  display: inline-block;
  font-weight: 700;
  color: var(--accent);
}
.rotator-name span { display: none; }
.rotator-name span.active { display: inline; }
.rotator-name .claude-word { font-family: Georgia, "Times New Roman", serif; font-weight: 700; }
.rotator-name .perplexity-word { text-transform: lowercase; }

.hero-sub { margin: 0; max-width: 500px; font-size: 18px; line-height: 1.6; color: var(--text-muted); }

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 6px; }
.chip {
  font-size: 13px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
}

.hero-visual {
  flex: 1 1 400px;
  min-width: 0;
  display: flex;
  justify-content: center;
}

/* ---- the sample scorecard ---------------------------------------------- */

.dashboard-card {
  width: 100%;
  max-width: 440px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--surface-raised);
  box-shadow: var(--shadow-card);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.dashboard-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dash-domain { font-size: 12.5px; color: var(--text-muted); }
.dash-sample {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
}

/* The gauge: red / amber / green bands and a marker at the sample score.
   Numbers are HTML over the SVG so they use the page's fonts. */
.gauge { position: relative; width: 100%; max-width: 260px; margin: 0 auto; }
.gauge svg { display: block; width: 100%; height: auto; }
.gauge__track { fill: none; stroke: var(--surface-bar); stroke-width: 14; stroke-linecap: round; }
.gauge__band { fill: none; stroke-width: 14; stroke-linecap: round; }
.gauge__band--bad { stroke: var(--bad-fill); }
.gauge__band--warn { stroke: var(--warn-fill); }
.gauge__band--good { stroke: var(--good-fill); }
.gauge__marker { fill: var(--surface-raised); stroke: var(--text-bright); stroke-width: 3; }
.gauge__readout {
  position: absolute;
  inset: auto 0 2px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.gauge__score {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 48px;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--text-bright);
}
.gauge__label { font-size: 12.5px; color: var(--text-muted); }
.gauge__verdict { display: flex; justify-content: center; }

.dash-bars { width: 100%; height: auto; display: block; }
.dash-bars__row text {
  font-family: var(--font-mono);
  font-size: 11px;
  fill: var(--text-muted);
}
.dash-bars__row .dash-bars__value { fill: var(--text-soft); font-weight: 600; }
.dash-bars__track { fill: var(--surface-bar); }
.dash-bars__fill { fill: var(--accent); }
.dash-bars__fill--good { fill: var(--good-fill); }
.dash-bars__fill--warn { fill: var(--warn-fill); }
.dash-bars__fill--bad { fill: var(--bad-fill); }

.find-list { display: flex; flex-wrap: wrap; gap: 8px; }
.find-list .status { font-weight: 500; }

.dash-note {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-weight: 500;
}

/* ========================================================================
   SECTION FURNITURE
   ======================================================================== */

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}
.section-head__aside { display: flex; flex-direction: column; gap: 10px; max-width: 38ch; }

.kicker {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text-bright);
}
.h2--28 { font-size: clamp(1.6rem, 1.25rem + 1.3vw, 2.1rem); }
.h2--30 { font-size: clamp(1.7rem, 1.3rem + 1.5vw, 2.25rem); }
.h2--32 { font-size: clamp(1.8rem, 1.35rem + 1.8vw, 2.5rem); }

.measure-420 { max-width: 460px; }
.measure-520 { max-width: 600px; }
.measure-560 { max-width: 620px; }

.section-note { margin: 0; font-size: 13px; color: var(--text-dim); }
.section-note strong { color: var(--text-muted); font-weight: 600; }

.section-lede {
  margin: 14px 0 0;
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 560px;
}

/* ========================================================================
   THE FOUR-NUMBER STRIP — each card colour-coded by status, with the word.
   Per-category maxima are the ones in CATEGORY_MAXIMA (@aiv/contracts); the
   overall maximum is computed per scan, never presented as a fixed number.
   ======================================================================== */

.stat-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}
/* The status stripe down the card's edge. */
.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--accent);
}
.stat-card--good::before { background: var(--good-fill); }
.stat-card--warn::before { background: var(--warn-fill); }
.stat-card--bad::before { background: var(--bad-fill); }

.stat-card .value {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 1.5rem + 1.2vw, 2.4rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--text-bright);
}
.stat-card--good .value { color: var(--good); }
.value--text { color: var(--text-bright); }
.value--positive { color: var(--good); }
/* The denominator is quieter but never hidden. */
.value .of { color: var(--text-dim); font-weight: 500; font-size: 0.62em; letter-spacing: -0.01em; }

.stat-card .label { font-size: 15px; color: var(--text); font-weight: 600; }
.stat-card .detail { font-size: 13px; line-height: 1.55; color: var(--text-muted); }

/* ========================================================================
   STEPS
   ======================================================================== */

.steps-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 44px; }
.step {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}
.step .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
}
.step h3 { margin: 4px 0 0; font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: -0.025em; color: var(--text-bright); }
.step p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text-muted); }

/* ========================================================================
   PAGE ANATOMY
   ======================================================================== */

.anatomy-inner { display: flex; gap: 56px; align-items: center; flex-wrap: wrap; }
.anatomy-left { flex: 1 1 380px; min-width: 0; }
.anatomy-right { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }

.mock-browser {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.mock-browser-bar { display: flex; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--border-soft); }
.mock-browser-bar span { width: 9px; height: 9px; border-radius: 50%; background: var(--surface-bar-strong); }
.mock-browser-bar span:nth-child(1) { background: var(--bad); }
.mock-browser-bar span:nth-child(2) { background: var(--warn); }
.mock-browser-bar span:nth-child(3) { background: var(--good); }
.mock-browser-body { padding: 24px; display: flex; flex-direction: column; gap: 14px; }

.mock-line { background: var(--surface-bar); border-radius: 4px; }
.mock-line--head { height: 14px; width: 60%; background: var(--surface-bar-strong); }
.mock-line--w85 { height: 9px; width: 85%; }
.mock-line--w75 { height: 9px; width: 75%; }

.mock-schema {
  height: 60px;
  width: 100%;
  background: var(--good-bg);
  border: 1px solid var(--good-line);
  border-radius: var(--radius-sm);
  margin-top: 8px;
  display: flex;
  align-items: center;
  padding: 0 14px;
}
.mock-schema__code { font-size: 12px; color: var(--good); }

.anatomy-item { display: flex; gap: 14px; align-items: flex-start; }
/* A green check: each item is something an optimized page HAS. */
.anatomy-dot {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  margin-top: 1px;
  background: var(--good-bg);
  border: 1px solid var(--good-line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.anatomy-dot::after {
  content: "\2713";
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--good);
}
.anatomy-item .title { font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: -0.015em; margin-bottom: 4px; color: var(--text-bright); }
.anatomy-item .body { font-size: 15px; color: var(--text-muted); line-height: 1.55; }

/* ========================================================================
   PERSONAS + PROOF
   ======================================================================== */

.persona-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 44px;
  margin-bottom: 40px;
}
.persona-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  background: var(--surface);
  transition: border-color var(--duration-normal) var(--ease-out), transform var(--duration-normal) var(--ease-out);
}
.persona-card:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.persona-card h3 { margin: 0 0 8px; font-family: var(--font-display); font-weight: 600; font-size: 18px; letter-spacing: -0.02em; color: var(--text-bright); }
.persona-card p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text-muted); }

.persona-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.persona-card--lead { border-color: var(--accent); }
.waitlist-line { margin: 24px 0 0; font-size: 15px; color: var(--text-muted); }
.waitlist-line a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.waitlist-line a:hover { color: var(--text-bright); }

.proof {
  border-radius: var(--radius-lg);
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  padding: 28px 32px;
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.proof__title { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: -0.02em; color: var(--text-bright); }
.proof__list { margin: 0; padding-left: 1.3em; display: grid; gap: 8px; max-width: 680px; }
.proof__list li { font-size: 16px; line-height: 1.5; color: var(--text); }
.proof__list a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.proof__note { color: var(--text-muted); font-size: 14.5px; }

/* ========================================================================
   LEAD MAGNET
   ======================================================================== */

.lead-magnet {
  max-width: 660px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.lead-magnet p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--text-muted); max-width: 500px; }
.lead-magnet .lead-fine { font-size: 13.5px; color: var(--text-dim); max-width: 460px; }

.lead-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  max-width: 480px;
  padding-top: 8px;
}

/* landing.js writes the submit outcome here. min-height reserves the line so
   a result appearing doesn't shift the section. */
.lead-status {
  margin: 4px 0 0;
  min-height: 1.4em;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--text-muted);
  text-align: center;
}
.lead-status[data-state="ok"] { color: var(--good); }
.lead-status[data-state="error"] { color: var(--warn); }

/* ========================================================================
   FAQ
   ======================================================================== */

.faq-wrap { max-width: 760px; margin: 0 auto; }
.faq-title { margin-bottom: 32px; }

#faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 0 22px;
  transition: border-color var(--duration-fast) var(--ease-out);
}
.faq-item:has(.faq-question[aria-expanded="true"]) { border-color: var(--accent-line); }
.faq-heading { margin: 0; font-size: inherit; font-weight: inherit; }
.faq-question {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  color: var(--text);
  font-family: inherit;
}
.faq-question .q-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.015em;
}
.faq-question:hover .q-text { color: var(--text-bright); }
.faq-question .mark {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-soft);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 17px;
  color: var(--accent);
}

.faq-answer {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 640px;
  display: none;
}
/* Open state, driven two ways on purpose: aria-expanded via :has(), and the
   class fallback as a SEPARATE rule (one unsupported selector in a comma
   list invalidates the whole block). */
.faq-item.open > .faq-answer,
.faq-item.is-open > .faq-answer { display: block; }
.faq-item:has(.faq-question[aria-expanded="true"]) > .faq-answer { display: block; }

/* ========================================================================
   THE AUDIT FLOW
   Markup contract: audit-boot.js, reused unchanged. IDs are load-bearing.
   ======================================================================== */

.audit-form { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.audit-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: stretch;
  padding: 6px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  max-width: 560px;
}
.audit-row .text-input { border-color: transparent; background: transparent; }
.audit-row .text-input:focus,
.audit-row .text-input:focus-visible { border-color: var(--accent); }
.btn-audit { flex: 0 0 auto; padding: 12px 24px; }
/* Website field + button in one rounded panel: field and button share a
   row, the field with its own border and icon. Stacks on phones. */
.audit-row--one {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 8px;
  max-width: 560px;
  border-radius: var(--radius-lg);
}
.audit-field { position: relative; min-width: 0; }
.audit-field__icon {
  position: absolute; left: 16px; top: 50%; width: 18px; height: 18px;
  transform: translateY(-50%); color: var(--text-dim); pointer-events: none;
  transition: color var(--duration-fast) var(--ease-out);
}
.audit-field:focus-within .audit-field__icon { color: var(--accent); }
.audit-row--one .text-input {
  width: 100%;
  padding-left: 44px;
  border-radius: var(--radius-md);
  border-color: var(--border-input);
  background: var(--bg);
}
.audit-row--one .text-input:hover { border-color: var(--text-dim); }
.audit-row--one .btn-audit {
  justify-content: center;
  min-height: 52px;
  padding: 12px 26px;
  border-radius: var(--radius-md);
  font-size: 15.5px;
}
/* The button's focus ring and the field's focus glow both paint outside
   their boxes. Inside the panel they get room of their own: the ring is
   pulled in to 2px, and field and button sit 10px apart side by side and
   12px apart stacked on a phone, so neither control ever paints over the other's edge.
   dev/site.checks.mjs S11 measures this at 320-1440px, focused and not. */
.audit-row--one { align-items: stretch; }
.audit-row--one .text-input { -webkit-appearance: none; appearance: none; }
.audit-row--one .btn-audit:focus-visible { outline-offset: 2px; }
@media (max-width: 560px) {
  .audit-row--one { grid-template-columns: 1fr; gap: 12px; }
  .audit-row--one .btn-audit { width: 100%; }
}
.price-line { margin: 10px 0 0; padding-left: 8px; font-size: 14px; line-height: 1.5; color: var(--text-muted); }
.price-line a { margin-left: 6px; color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.price-line a:hover { color: var(--text-bright); }
.hint { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-dim); max-width: 50ch; padding-left: 8px; }

.audit-error {
  margin: 10px 0 0;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--warn-line);
  background: var(--warn-bg);
  color: var(--warn);
  font-size: 14px;
  line-height: 1.5;
}

.audit-stage { padding: 0 var(--gutter); }
.audit-stage > *:not([hidden]) { margin-bottom: 72px; }

.channel {
  max-width: 720px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 24px;
}
.channel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-soft);
}
.audit-kicker {
  margin: 0;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.channel__clock { margin: 0; font-family: var(--font-mono); font-weight: 600; font-size: 18px; color: var(--text); }
.channel__unit { color: var(--text-dim); font-size: 13px; margin-left: 2px; }

.stages { list-style: none; margin: 0; padding: 16px 0 0; display: flex; flex-direction: column; gap: 2px; }
.stage {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border-soft);
}
.stage:last-child { border-bottom: 0; }
.stage__mark {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border-input);
  color: var(--text-dim);
}
.stage__icon { width: 12px; height: 12px; display: block; }
.stage__label { flex: 1 1 auto; font-size: 15px; color: var(--text-muted); }
.stage__state {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  color: var(--text-dim);
}

/* State is never colour alone — audit-boot.js writes the state WORD into
   [data-state-text] and swaps the glyph in .stage__mark at the same time. */
.stage[data-state="active"] .stage__label { color: var(--text-bright); }
.stage[data-state="active"] .stage__state { color: var(--accent); }
.stage[data-state="active"] .stage__mark { border-color: var(--accent); color: var(--accent); }
.stage[data-state="done"] .stage__mark { border-color: var(--good); color: var(--good); background: var(--good-bg); }
.stage[data-state="done"] .stage__state { color: var(--good); }
.stage[data-state="skipped"] .stage__mark { border-style: dashed; }
.stage[data-state="skipped"] .stage__label { color: var(--text-dim); }

.channel__live { margin: 16px 0 0; font-size: 14px; color: var(--text-muted); min-height: 1.2em; }

.results { max-width: 900px; margin: 0 auto; }
.results:focus { outline: none; }
.results:focus-visible { outline: 2px solid var(--accent); outline-offset: 8px; border-radius: var(--radius-lg); }

/* ========================================================================
   FOOTER
   ======================================================================== */

footer { padding: 56px var(--gutter) 40px; border-top: 1px solid var(--border-soft); background: var(--bg-alt); }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer-brand { display: flex; flex-direction: column; gap: 10px; max-width: 280px; }
.footer-brand-row { display: flex; align-items: center; gap: 8px; }
.footer-brand__blurb { margin: 0; font-size: 13.5px; color: var(--text-dim); line-height: 1.5; }
.footer-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 10px; min-width: 140px; }
.footer-col .col-title { font-family: var(--font-display); font-weight: 600; font-size: 13.5px; color: var(--text); }
.footer-col a {
  font-size: 14px;
  color: var(--text-dim);
  transition: color var(--duration-fast) var(--ease-out);
}
.footer-col a:hover { color: var(--text); }
.footer-legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border-soft); }
.footer-note { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--text-dim); }

/* ========================================================================
   RESPONSIVE — the gutter never drops below 16px.
   ======================================================================== */

@media (max-width: 1080px) {
  .stat-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-inner { gap: 48px; }
  .anatomy-inner { gap: 40px; }
  .footer-cols { gap: 40px; }
}

@media (max-width: 900px) {
  :root { --gutter: 24px; }
  .steps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .persona-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pad-96 { padding: 72px var(--gutter); }
  .pad-88 { padding: 64px var(--gutter); }
  .pad-72 { padding: 56px var(--gutter); }
  .hero { padding: 64px var(--gutter) 64px; }
  .nav-links { gap: 22px; }
}

@media (max-width: 720px) {
  .stat-grid-4,
  .steps-grid,
  .persona-grid { grid-template-columns: 1fr; }
  .section-head { margin-bottom: 22px; }
  .proof { padding: 24px; }
  .lead-magnet { text-align: left; align-items: flex-start; }
  .lead-form { justify-content: flex-start; max-width: none; }
  .lead-status { text-align: left; }
  .footer-inner { gap: 32px; }
}

/* Phone — the nav links wrap under the brand, and the audit row stacks so
   the input keeps a usable width. */
@media (max-width: 560px) {
  .nav-inner { flex-wrap: wrap; gap: 12px 16px; padding: 12px var(--gutter); }
  .nav-links { order: 3; width: 100%; gap: 20px; flex-wrap: wrap; }
  .nav-links a { font-size: 13.5px; }

  .audit-row { flex-direction: column; align-items: stretch; border-radius: var(--radius-lg); }
  .text-input { flex: 1 1 auto; width: 100%; }
  .btn-audit { width: 100%; }
  .btn-accent--lg { width: 100%; }

  /* 44 (icon) + 14 (gap) + a 240px reservation overflows a 288px content box
     at 320 CSS px; on a phone the line wraps anyway, so drop it. */
  .rotator-name { min-width: 0; }
  .rotator-icon { width: 34px; height: 34px; }
  .rotator-icon svg { width: 34px; height: 34px; }
  .rotator { gap: 10px; padding: 4px 14px 4px 8px; }

  .dashboard-card { padding: 18px; }
  .gauge__score { font-size: 40px; }
  .proof { padding: 20px; }
  .channel { padding: 18px; }
  .stage { flex-wrap: wrap; row-gap: 4px; }
  .stage__label { flex: 1 1 60%; }
}

@media (max-width: 400px) {
  :root { --gutter: 16px; }
  .hero { padding: 48px var(--gutter) 48px; }
  .footer-cols { gap: 28px; }
  .footer-col { min-width: 0; }
  .nav-actions { gap: 8px; }
  .nav-actions .btn-accent { padding: 10px 14px; font-size: 13.5px; }
}

/* ========================================================================
   REDUCED MOTION
   The rotator's blur/opacity loop is the one piece of perpetual motion on
   this page. landing.js stops the loop; this is the CSS half, with
   !important so it also beats what landing.js has written to element.style.
   ======================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .rotator {
    opacity: 1 !important;
    filter: none !important;
    transition: none !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .btn-accent:hover,
  .btn-accent:active,
  .persona-card:hover { transform: none; }
}

/* Windows High Contrast / forced-colors: glows disappear there, so focus
   rings become real outlines in a system colour, and status chips keep a
   visible border. */
@media (forced-colors: active) {
  :where(a, button, input, [tabindex]):focus-visible,
  .btn-accent:focus-visible,
  .text-input:focus-visible {
    outline: 3px solid Highlight;
    outline-offset: 2px;
    box-shadow: none;
  }
  .stage__mark { border-color: CanvasText; }
  .status { border-color: CanvasText; }
}
