/* ============================================================================
   site-v3.css — Hlido unified design system (2026-07-13, DARK-DEFAULT)
   ----------------------------------------------------------------------------
   Global base layer loaded AFTER site-v2.css on every page. v2 supplies the
   structural layout + component classes; v3 (a) remaps the shared design
   tokens (--paper/--ink/--line/--accent/…, identical names in v2) so every
   v2 component inherits the new palette, and (b) refines specific surfaces.

   Design intent (founder brief, Resend-craft reference):
   - DARK is the DEFAULT for every visitor, regardless of OS prefers-color-scheme.
     Deep near-black surfaces, high-contrast (not pure-white) ink, one restrained
     terracotta accent tuned for AA on dark, hairline borders, gradients only
     where they earn it. Resend/Linear/Vercel dark-mode finish.
   - LIGHT is OPT-IN ONLY via [data-theme="light"] (a future toggle) — it is NOT
     driven by prefers-color-scheme, so a light-mode machine still gets dark.
   - System-fallback-safe font stacks; no new external assets; no JS required.
   - WCAG AA contrast verified for every token pair in both themes.
   ========================================================================== */

/* ----------------------------------------------------------------
   1. TOKENS — DARK (default, applies to every page with no opt-out)
   ---------------------------------------------------------------- */
:root {
  color-scheme: dark;

  /* surfaces — warm near-black, layered */
  --paper: #0b0b0d;              /* page */
  --paper-alt: #101013;          /* subtle band */
  --surface: #151519;            /* cards */
  --surface-raise: #1c1c21;      /* raised cards / popovers */

  /* ink — warm off-white, never pure #fff */
  --ink: #f4f2ee;                /* 16.8:1 on --paper */
  --ink-soft: #bcbab4;           /* 9.2:1 on --paper */
  --muted: #8b8983;              /* 5.1:1 on --paper — small-text AA */

  /* hairlines */
  --line: rgba(244, 242, 238, 0.10);
  --line-strong: rgba(244, 242, 238, 0.20);

  /* brand accent (terracotta — lightened for AA on dark) */
  --accent: #e28a63;             /* fills, borders, hovers */
  --accent-strong: #f0a986;      /* small text / eyebrows on dark: 8.4:1 on --paper */
  --accent-soft: rgba(226, 138, 99, 0.15);
  --accent-ink: #1a0d07;         /* dark text on an accent fill: 6.0:1 on --accent */

  /* status (tuned for dark) */
  --green: #5cbf87;
  --amber: #d8a24a;
  --red: #e37b6d;

  /* tier bands (public thresholds only) */
  --tier-vital: #5cc286;
  --tier-steady: #7fb2ea;
  --tier-fading: #dd9d58;
  --tier-flatline: #e37b6d;

  /* "deep" contrast blocks (footer, scorecard summary, dev/terminal panels).
     On a near-black page these read as a distinct TRUE-black panel. */
  --deep: #060608;
  --deep-2: #030304;
  --deep-ink: #f4f2ee;
  --deep-ink-soft: rgba(244, 242, 238, 0.70);
  --deep-line: rgba(244, 242, 238, 0.12);

  /* gradient tokens — restrained, subtle on dark */
  --grad-hero:
    radial-gradient(900px 480px at 12% -12%, rgba(226, 138, 99, 0.14), transparent 60%),
    radial-gradient(820px 460px at 88% -18%, rgba(127, 178, 234, 0.08), transparent 62%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-alt) 100%);
  --grad-band:
    linear-gradient(180deg, var(--paper-alt) 0%, var(--paper) 100%);
  --grad-accent-line:
    linear-gradient(90deg, var(--accent) 0%, #e9a03b 55%, rgba(226, 138, 99, 0) 100%);

  /* elevation — deeper on dark */
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.45);
  --shadow-2: 0 1px 2px rgba(0, 0, 0, 0.45), 0 12px 32px -12px rgba(0, 0, 0, 0.6);
  --shadow-3: 0 2px 4px rgba(0, 0, 0, 0.45), 0 24px 56px -16px rgba(0, 0, 0, 0.7);

  /* radii */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 24px;

  /* spacing rhythm */
  --space-1: 8px;
  --space-2: 14px;
  --space-3: 22px;
  --space-4: 36px;
  --space-5: 56px;
  --space-6: 88px;

  /* type scale (minor third-ish, clamped) */
  --text-xs: 0.78rem;
  --text-sm: 0.9rem;
  --text-md: 1rem;
  --text-lg: 1.14rem;
  --text-xl: clamp(1.35rem, 2.2vw, 1.7rem);
  --text-2xl: clamp(1.7rem, 3vw, 2.3rem);
  --text-3xl: clamp(2.3rem, 4.4vw, 3.4rem);
  --text-hero: clamp(2.6rem, 5.4vw, 4.4rem);

  /* fonts — same families as v2 with hardened system fallbacks */
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;

  --max: 1080px;
}

/* ----------------------------------------------------------------
   1b. TOKENS — LIGHT (OPT-IN ONLY via a future [data-theme="light"] toggle;
       NOT driven by prefers-color-scheme, so dark stays default everywhere)
   ---------------------------------------------------------------- */
:root[data-theme="light"] {
  color-scheme: light;

  --paper: #fbfaf8;
  --paper-alt: #f4f2ed;
  --surface: #ffffff;
  --surface-raise: #ffffff;

  --ink: #17181c;
  --ink-soft: #3f434b;
  --muted: #63666e;

  --line: rgba(23, 24, 28, 0.09);
  --line-strong: rgba(23, 24, 28, 0.18);

  --accent: #d97757;
  --accent-strong: #a3472a;      /* darker terracotta — small-text safe on light */
  --accent-soft: #f7ece4;
  --accent-ink: #1a0f0a;

  --green: #2e7d4f;
  --amber: #97650f;
  --red: #b23b3b;

  --tier-vital: #1a7a43;
  --tier-steady: #2461a8;
  --tier-fading: #9a5a20;
  --tier-flatline: #b23b3b;

  /* deep blocks stay dark in light mode too — a premium contrast panel */
  --deep: #14151a;
  --deep-2: #0e0f13;
  --deep-ink: #f2f0ec;
  --deep-ink-soft: rgba(242, 240, 236, 0.72);
  --deep-line: rgba(242, 240, 236, 0.12);

  --grad-hero:
    radial-gradient(900px 480px at 12% -10%, rgba(217, 119, 87, 0.10), transparent 60%),
    radial-gradient(820px 460px at 88% -18%, rgba(36, 97, 168, 0.08), transparent 60%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-alt) 100%);
  --grad-band:
    linear-gradient(180deg, var(--paper-alt) 0%, var(--paper) 100%);
  --grad-accent-line:
    linear-gradient(90deg, var(--accent) 0%, #e9a03b 55%, rgba(217, 119, 87, 0) 100%);

  --shadow-1: 0 1px 2px rgba(23, 24, 28, 0.05), 0 1px 1px rgba(23, 24, 28, 0.03);
  --shadow-2: 0 1px 2px rgba(23, 24, 28, 0.05), 0 12px 32px -12px rgba(23, 24, 28, 0.14);
  --shadow-3: 0 2px 4px rgba(23, 24, 28, 0.05), 0 24px 56px -16px rgba(23, 24, 28, 0.18);
}

/* ----------------------------------------------------------------
   2. BASE REFINEMENTS
   ---------------------------------------------------------------- */
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  text-rendering: optimizeLegibility;
}
::selection { background: rgba(217, 119, 87, 0.24); }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

/* Normalise components that carried hardcoded light-theme hexes in v2 so
   the dark token remap reaches them. */
.story-section p,
.home-step-card p,
.use-case-tile p,
.trust-strip span,
.use-case-top,
.claim-evidence { color: var(--ink-soft); }
.signal-section .section-head p,
.signal-section .eyebrow { color: var(--ink-soft); }

/* ----------------------------------------------------------------
   3. HEADER — glassy, hairline, both themes
   ---------------------------------------------------------------- */
.site-header {
  background: rgba(11, 11, 13, 0.72);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  backdrop-filter: blur(14px) saturate(1.5);
  border-bottom: 1px solid var(--line);
}
.nav-links a { color: var(--ink-soft); }
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.site-header__inner nav a { color: var(--ink-soft); }
.site-header__inner nav a:hover,
.site-header__inner nav a[aria-current="page"] { color: var(--accent-strong); }
.site-brand,
.site-header__brand { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; color: var(--ink); text-decoration: none; }

/* ----------------------------------------------------------------
   4. BUTTONS
   ---------------------------------------------------------------- */
.button {
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: -0.005em;
  transition: transform 0.14s ease, background 0.18s ease, border-color 0.18s ease,
              color 0.18s ease, box-shadow 0.18s ease;
}
.button:active { transform: translateY(0) scale(0.99); }
.button-primary {
  background: var(--ink);
  color: var(--paper);
  border-color: transparent;
  box-shadow: var(--shadow-1);
}
.button-primary:hover {
  background: var(--accent-strong);
  color: var(--paper);   /* light text on dark accent (light theme) OR dark text on light accent (dark theme) — AA both ways */
  transform: translateY(-1px);
  box-shadow: var(--shadow-2);
}
.button-secondary { border-color: var(--line-strong); color: var(--ink); border-radius: 999px; }
.button-secondary:hover { border-color: var(--ink); }
.button-ghost { color: var(--accent-strong); }
.button-ghost:hover { border-bottom-color: var(--accent-strong); }
.inline-link { color: var(--accent-strong); }
.inline-link:hover { border-bottom-color: var(--accent-strong); }
.eyebrow { color: var(--accent-strong); }

/* ============================================================================
   5. HOMEPAGE — light-first re-expression (overrides the v2 dark-navy hero)
   ========================================================================== */
body.homepage {
  color: var(--ink);
  background: var(--paper);
}
body.homepage .site-header {
  background: rgba(11, 11, 13, 0.72);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  border-bottom-color: var(--line);
}
body.homepage .brand-copy strong { color: var(--ink); }
body.homepage .brand-copy span { color: var(--muted); }
body.homepage .nav-links a { color: var(--ink-soft); }
body.homepage .nav-links a[aria-current="page"],
body.homepage .nav-links a:hover { color: var(--ink); }
body.homepage .nav-toggle { color: var(--ink); border-color: var(--line); }
body.homepage .mobile-nav { background: var(--surface); border-color: var(--line); }
body.homepage .mobile-nav a { color: var(--ink-soft); border-bottom-color: var(--line); }
body.homepage .mobile-nav a[aria-current="page"],
body.homepage .mobile-nav a:hover { background: var(--paper-alt); color: var(--ink); }

/* --- hero: open, light, subtle animated gradient --- */
body.homepage .home-hero {
  position: relative;
  overflow: hidden;
  padding: 84px 0 56px;
  background: var(--grad-hero);
  border-bottom: 1px solid var(--line);
}
body.homepage .home-hero::before {
  /* slow-drifting aurora — the "alive" Resend touch, kept faint */
  content: "";
  position: absolute;
  inset: -40% -20% auto -20%;
  height: 130%;
  pointer-events: none;
  background:
    radial-gradient(560px 320px at 22% 30%, rgba(217, 119, 87, 0.09), transparent 70%),
    radial-gradient(620px 360px at 78% 22%, rgba(36, 97, 168, 0.07), transparent 70%);
  animation: v3-drift 26s ease-in-out infinite alternate;
}
@keyframes v3-drift {
  from { transform: translate3d(-2.5%, 0, 0) scale(1); }
  to   { transform: translate3d(2.5%, 3%, 0) scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
  body.homepage .home-hero::before { animation: none; }
}
body.homepage .home-hero .container { position: relative; }
body.homepage .home-hero-grid { gap: 48px; align-items: center; }

body.homepage .home-hero-copy {
  background: none;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  color: var(--ink);
}
body.homepage .home-hero-copy .eyebrow {
  background: transparent;
  border: 0;
  padding: 0;
  margin-bottom: 14px;
  color: var(--accent-strong);
}
.homepage #hero-title {
  color: var(--ink);
  font-size: var(--text-hero);
  line-height: 1.02;
  letter-spacing: -0.028em;
  max-width: 13ch;
}
.homepage #hero-title em { color: var(--accent-strong); font-style: italic; }
body.homepage .home-hero-copy .hero-subtitle,
body.homepage .home-hero-copy p,
body.homepage .hero-subtitle {
  color: var(--ink-soft);
  max-width: 54ch;
}
body.homepage .hero-subtitle--strong strong { color: var(--ink); font-weight: 650; }
body.homepage .home-hero-copy .home-proof-strip { border-top: 1px solid var(--line); }
body.homepage .home-hero-copy .home-proof-strip span {
  background: transparent;
  border: 0;
  min-height: 0;
  padding: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}
body.homepage .home-hero .hero-actions .button-primary {
  background: var(--ink);
  color: var(--paper);
  font-weight: 650;
}
body.homepage .home-hero .hero-actions .button-primary:hover { background: var(--accent-strong); color: var(--paper); }
body.homepage .home-hero .hero-actions .button-ghost { color: var(--accent-strong); }
body.homepage .home-hero .hero-actions .button-ghost:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* --- hero right panel: white product card --- */
body.homepage .home-hero-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-3);
  color: var(--ink);
  padding: 28px;
}
body.homepage .home-hero-panel .kicker,
body.homepage .agent-find-panel .kicker {
  color: var(--accent-strong);
  background: transparent;
  margin-bottom: 4px;
}
body.homepage .agent-find-panel h2 {
  color: var(--ink);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.08;
  max-width: none;
}
body.homepage .home-hero-panel span,
body.homepage .home-hero-panel p { color: var(--ink-soft); }
body.homepage .home-hero-panel a { color: var(--accent-strong); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
body.homepage .home-hero-panel a:hover { border-bottom-color: var(--accent-strong); }
body.homepage .home-hero .agent-search-form input {
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--paper);
  color: var(--ink);
}
body.homepage .home-hero .agent-search-form input::placeholder { color: var(--muted); }
body.homepage .home-hero .agent-search-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 119, 87, 0.18);
}
body.homepage .home-hero .agent-search-form button {
  border-radius: var(--r-sm);
  background: var(--accent-strong);
  color: var(--paper);
  font-weight: 650;
  transition: background 0.18s ease, transform 0.14s ease;
}
body.homepage .home-hero .agent-search-form button:hover { background: var(--accent); color: var(--accent-ink); transform: translateY(-1px); }

/* scarcity chip inside the hero panel */
.hero-scarcity {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--paper-alt);
  font-size: var(--text-sm);
  line-height: 1.5;
}
body.homepage .hero-scarcity strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.tier-chip {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.tier-chip--vital { color: var(--tier-vital); }
.tier-chip--steady { color: var(--tier-steady); }
.tier-chip--fading { color: var(--tier-fading); }
.tier-chip--flatline { color: var(--tier-flatline); }

/* --- live stats row (registry-driven; numbers hydrate client-side) --- */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
}
.stat-tile {
  display: grid;
  gap: 4px;
  align-content: start;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}
a.stat-tile:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-2); }
.stat-tile strong {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 600;
  line-height: 1.05;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.stat-tile span { color: var(--muted); font-size: var(--text-xs); line-height: 1.45; }
.stat-tile--vital strong { color: var(--tier-vital); }
@media (max-width: 860px) { .hero-stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .hero-stats { grid-template-columns: 1fr; } }

/* --- tier-band explanation --- */
.tier-section { background: var(--paper); }
.tier-scale {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.tier-card {
  position: relative;
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 22px 20px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--tier-color, var(--line-strong));
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.tier-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.tier-card--vital { --tier-color: var(--tier-vital); }
.tier-card--steady { --tier-color: var(--tier-steady); }
.tier-card--fading { --tier-color: var(--tier-fading); }
.tier-card--flatline { --tier-color: var(--tier-flatline); }
.tier-card .tier-name {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tier-color);
}
.tier-card .tier-range {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.tier-card p { margin: 0; color: var(--ink-soft); font-size: var(--text-sm); line-height: 1.55; }
.tier-card p strong { color: var(--ink); }
.tier-scale-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: var(--text-sm);
  max-width: 70ch;
}
@media (max-width: 900px) { .tier-scale { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .tier-scale { grid-template-columns: 1fr; } }

/* --- section rhythm + card finish on the cream storyline --- */
body.homepage .section { padding: var(--space-6) 0; }
body.homepage .story-section { background: var(--paper); }
body.homepage .story-section.alt,
body.homepage .audience-section { background: var(--paper-alt); }
.story-head .section-title.serif { letter-spacing: -0.022em; }
.homepage .top-card,
.audience-card,
.how-step,
.verdict-sample,
.cat-panel,
.tp-panel { box-shadow: var(--shadow-1); }
.homepage .top-card:hover,
.audience-card:hover,
.verdict-sample:hover { box-shadow: var(--shadow-2); border-color: var(--accent); }
.audience-card { border-radius: var(--r-md); }
.verdict-score-col { background: var(--deep); color: var(--deep-ink); }
.verdict-tier { background: var(--accent); color: var(--accent-ink); }

/* FixMyProblem promo band CTA — inline style sets white-on-accent; in dark the
   accent lightens, so pin readable ink. */
#fixmyproblem-band a[href="/fixmyproblem/"] { color: var(--paper) !important; background: var(--accent-strong) !important; }

/* --- footer: fixed deep surface in BOTH themes (premium contrast block) --- */
.footer,
body.homepage .footer {
  background: var(--deep);
  color: var(--deep-ink);
  border-top: 0;
}
.footer strong { color: var(--deep-ink); }
.footer a { color: var(--deep-ink-soft); border-bottom: 1px solid var(--deep-line); }
.footer a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.footer .muted,
.footer-entity,
.footer-contact .muted,
body.homepage .footer .muted,
body.homepage .footer-contact span,
body.homepage .footer-entity { color: rgba(242, 240, 236, 0.6); }
body.homepage .footer-grid { border-top-color: var(--deep-line); }
.fnf-group a { color: var(--deep-ink-soft); }
.fnf-group a:hover { color: var(--accent); }
.fnf-label { color: rgba(242, 240, 236, 0.45); }
.footer-nav-flat { border-top-color: var(--deep-line); }

/* strips between sections */
.api-cta-strip { background: var(--paper-alt); border-color: var(--line); color: var(--ink); }
.api-cta-strip .eyebrow { color: var(--accent-strong); }
.in-flight-strip { background: var(--accent-soft); }

/* ----------------------------------------------------------------
   5b. NEWSLETTER — re-expressed on the --deep contrast family so it stops
   being a bespoke cool-navy card clashing with the footer. v2 owns the
   grid layout; v3 owns the palette. Applies on homepage + reviews index. */
.newsletter-inline {
  background:
    radial-gradient(circle at top left, var(--accent-soft), transparent 46%),
    var(--deep);
  border: 1px solid var(--deep-line);
  border-radius: var(--r-lg);
}
.newsletter-inline h2 { color: var(--deep-ink); }
.newsletter-inline p { color: var(--deep-ink-soft); }
.newsletter-inline .input,
.newsletter-form input[type="email"] {
  background: rgba(244, 242, 238, 0.06);
  border: 1px solid var(--deep-line);
  color: var(--deep-ink);
}
.newsletter-inline .input::placeholder,
.newsletter-form input[type="email"]::placeholder { color: rgba(244, 242, 238, 0.5); }
.newsletter-form input[type="email"]:focus {
  outline: 3px solid var(--accent-soft);
  outline-offset: 1px;
  border-color: var(--accent);
}
.newsletter-form button { background: var(--accent); color: var(--accent-ink); font-weight: 650; }
.newsletter-form button:hover { background: var(--accent-strong); color: var(--paper); filter: none; }
.newsletter-status { color: var(--deep-ink-soft); }
.newsletter-status.is-success { color: var(--green); }
.newsletter-status.is-error { color: var(--red); }

/* ----------------------------------------------------------------
   5c. REVIEW-PAGE "premium dark" blocks — v2 hardcoded these as cool navy
   (#0b141f / #050a11). On a near-black page that navy tint clashes with
   --paper. Re-map their SURFACES to the --deep family (light text inside v2
   already reads correctly on a dark surface). Global so review/compare/etc.
   pick them up; unaffected page types simply don't contain these classes. */
.scorecard-summary,
.developer-section {
  background:
    radial-gradient(120% 140% at 0% 0%, var(--accent-soft), transparent 55%),
    var(--deep);
  border-color: var(--deep-line);
}
.developer-section { color: var(--deep-ink); }
.developer-section .section-title,
.developer-section h3,
.scorecard-summary h3,
.scorecard-summary,
.scorecard-score { color: var(--deep-ink); }
.scorecard-summary .inline-link,
.developer-section .inline-link { color: var(--accent-strong); }
.developer-link-card {
  background: rgba(244, 242, 238, 0.05);
  border-color: var(--deep-line);
  color: var(--deep-ink);
}
.developer-link-card:hover { border-color: var(--accent); color: var(--deep-ink); }
.mcp-code {
  background: var(--deep-2);
  border-color: var(--deep-line);
  color: var(--deep-ink);
}
/* trust-strip / claim-evidence body copy that v2 pinned to dark navy hexes */
.trust-strip span { color: var(--ink-soft); }
.claim-evidence { color: var(--ink-soft); }

/* dark touch-ups for v2 components whose hover/badge tints were authored as
   dark-on-light rgba and vanish on dark surfaces. Dark is the default, so these
   apply unless the light theme is explicitly opted in. */
:root:not([data-theme="light"]) .cp-tab:hover,
:root:not([data-theme="light"]) .tp-tab:hover { background: rgba(242, 240, 236, 0.07); color: var(--ink); }
:root:not([data-theme="light"]) .cp-count { background: rgba(242, 240, 236, 0.1); color: var(--ink-soft); }
:root:not([data-theme="light"]) .freshness-callout { background: rgba(242, 240, 236, 0.07); }

/* ============================================================================
   6. CHECK PAGE (/check/) — flagship treatment
   ========================================================================== */
.check-tool { max-width: 800px; }
.check-hero {
  position: relative;
  margin: 0 -16px;
  padding: 52px 16px 8px;
}
.check-hero .eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: 12px;
}
.check-tool h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-3xl);
  letter-spacing: -0.025em;
  line-height: 1.04;
  margin: 0 0 14px;
  color: var(--ink);
}
.check-tool .review-lead {
  color: var(--ink-soft);
  font-size: var(--text-lg);
  line-height: 1.6;
  max-width: 58ch;
  margin: 0 0 8px;
}
/* the page body sits on the hero gradient */
body.check-page {
  background-color: var(--paper);
  background-image: var(--grad-hero);
  background-attachment: fixed;
  background-repeat: no-repeat;
}
.check-search input {
  border: 1px solid var(--line-strong) !important;
  border-radius: var(--r-md) !important;
  background: var(--surface) !important;
  color: var(--ink) !important;
  box-shadow: var(--shadow-2);
  font-size: 1.2rem !important;
  padding: 1rem 1.15rem !important;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.check-search input::placeholder { color: var(--muted); }
.check-search input:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 4px rgba(217, 119, 87, 0.16), var(--shadow-2);
}
.check-ac {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-3);
}
.check-ac button { border-bottom: 1px solid var(--line); color: var(--ink); }
.check-ac button:hover, .check-ac button.active { background: var(--accent-soft); }
.check-ac .ac-cat { color: var(--muted); opacity: 1; }
.check-hint { color: var(--muted); opacity: 1; font-family: var(--font-mono); font-size: var(--text-xs); }
.check-hint b, .check-hint span { font-variant-numeric: tabular-nums; }
.check-try {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 2px 0 22px;
  font-size: var(--text-sm);
  color: var(--muted);
}
.check-try a {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.check-try a:hover { border-color: var(--accent); color: var(--accent-strong); transform: translateY(-1px); }

.check-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  padding: 1.6rem 1.7rem;
}
.check-score {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 3.2rem;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.check-card__name { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; }
.check-card__cat { color: var(--muted); opacity: 1; }
.check-tier { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.08em; }
.t-VITAL { color: var(--tier-vital); }
.t-STEADY { color: var(--tier-steady); }
.t-FADING { color: var(--tier-fading); }
.t-FLATLINE { color: var(--tier-flatline); }
.b-COMMERCE-READY { color: var(--tier-vital); }
.b-INTEGRABLE { color: var(--tier-steady); }
.b-SURFACE-ONLY { color: var(--tier-fading); }
.b-CLOSED { color: var(--tier-flatline); }
.check-acr { background: var(--paper-alt); border-color: var(--line); border-radius: var(--r-sm); }
.check-grid h4 { color: var(--muted); opacity: 1; }
.check-red { background: rgba(178, 59, 59, 0.09); border: 1px solid rgba(178, 59, 59, 0.28); border-radius: var(--r-sm); }
.check-red b { color: var(--red); }
.check-cap { border-color: var(--line-strong); color: var(--ink-soft); }
.check-cap.on { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.check-cta {
  background: var(--ink) !important;
  color: var(--paper) !important;
  border-radius: 999px !important;
  font-weight: 650;
  transition: background 0.18s ease, transform 0.14s ease;
}
.check-cta:hover { background: var(--accent-strong) !important; color: var(--paper) !important; transform: translateY(-1px); }
.check-miss { border: 1px dashed var(--line-strong); background: var(--surface); color: var(--ink-soft); }
.check-agentbox { color: var(--ink-soft); border-top-color: var(--line); }
.check-agentbox code,
.check-embed__row code { background: var(--paper-alt); border: 1px solid var(--line); border-radius: 6px; color: var(--ink); }
.check-embed__row button { background: var(--surface); border-color: var(--line-strong); color: var(--ink); border-radius: 8px; }
.check-embed__row button:hover { background: var(--accent-soft); border-color: var(--accent); }
.site-footer { border-top: 1px solid var(--line); margin-top: 64px; padding: 28px 0 40px; color: var(--muted); font-size: var(--text-sm); }
.site-footer__inner { width: min(calc(100% - 32px), var(--max)); margin: 0 auto; }
.site-footer a { color: var(--ink-soft); }

/* ============================================================================
   7. REVIEWS INDEX (/reviews/) — header + card finish
   (page-level <style> loads before this file, so equal-specificity rules here
   win; a couple use the html-prefix to outrank page rules where needed)
   ========================================================================== */
html body.reviews-page .page-hero {
  position: relative;
  overflow: hidden;
  background: var(--grad-hero);
  border-bottom: 1px solid var(--line);
}
html body.reviews-page .page-hero h1 {
  letter-spacing: -0.028em;
  font-weight: 600;
}
html body.reviews-page .page-hero p { color: var(--ink-soft); }
html body.reviews-page [data-reviewed-grid] .score-table tr {
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}
html body.reviews-page [data-reviewed-grid] .score-table tr:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}
html body.reviews-page .review-view-toggle .view-toggle-buttons {
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
}
html body.reviews-page .view-toggle-btn { border: 0; }
html body.reviews-page .view-toggle-btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
html body.reviews-page .review-search input,
html body.reviews-page .review-sort select,
html body.reviews-page .review-page-size select {
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}
html body.reviews-page .review-search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 119, 87, 0.16);
}
html body.reviews-page .facet-chip {
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-soft);
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
html body.reviews-page .facet-chip:hover { border-color: var(--accent); color: var(--ink); }
html body.reviews-page .facet-chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }

/* ============================================================================
   8. 404 PAGE — on-brand, useful
   ========================================================================== */
body.nf-page { background: var(--grad-hero); background-color: var(--paper); color: var(--ink); min-height: 100vh; margin: 0; }
.nf-wrap { max-width: 800px; margin: 0 auto; padding: 72px 24px 72px; }
.nf-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-strong);
}
.nf-code {
  font-family: var(--font-display);
  font-size: clamp(4.4rem, 11vw, 7rem);
  font-weight: 600;
  line-height: 0.95;
  margin: 12px 0 6px;
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, var(--ink) 30%, var(--accent-strong) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nf-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 8px 0 14px;
  color: var(--ink);
}
.nf-lead { font-size: var(--text-lg); line-height: 1.6; color: var(--ink-soft); max-width: 56ch; margin: 0 0 26px; }
.nf-search { display: flex; gap: 10px; margin: 0 0 30px; max-width: 560px; }
.nf-search input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 1.05rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-1);
}
.nf-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(217, 119, 87, 0.16); }
.nf-search button {
  font: inherit;
  font-weight: 650;
  padding: 0 1.3rem;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  transition: background 0.18s ease;
}
.nf-search button:hover { background: var(--accent-strong); color: var(--paper); }
.nf-grid { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
@media (max-width: 600px) { .nf-grid { grid-template-columns: 1fr; } }
.nf-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px 20px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-1);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.nf-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-2); }
.nf-card-title { font-weight: 600; font-size: 0.98rem; margin: 0 0 4px; color: var(--ink); }
.nf-card-meta { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--muted); margin: 0; }
.nf-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 650;
  text-decoration: none;
  transition: background 0.18s ease, transform 0.14s ease;
}
.nf-cta:hover { background: var(--accent-strong); color: var(--paper); transform: translateY(-1px); }
.nf-machine { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); font-size: var(--text-sm); color: var(--muted); }
.nf-machine code { background: var(--paper-alt); border: 1px solid var(--line); padding: 2px 6px; border-radius: 4px; font-size: 0.85em; color: var(--ink-soft); }
