/* ═══════════════════════════════════════════════════════════════════
   HexCoded · Conversion Intelligence — Production Design System
   ═══════════════════════════════════════════════════════════════════ */

/* ── Tokens ────────────────────────────────────────────────────── */
:root {
  --bg: #0a0f0d;
  --surface: #111916;
  --surface-2: #161f19;
  --surface-3: #1c2720;

  --border: rgba(74, 222, 128, .08);
  --border-hl: rgba(74, 222, 128, .18);

  --accent: #4ade80;
  --accent-dim: #2e6b48;
  --accent-glow: rgba(74, 222, 128, .22);

  --warn: #f4b740;
  --danger: #f2555a;

  --text: #e8f0eb;
  --text-2: #a3b8ab;
  --text-3: #7d9488;


  /* ── role tokens (light theme overrides these below) ───────────── */
  --accent-fill: #4ade80;      /* green that carries --on-accent ink */
  --accent-hover: #5ce898;
  --on-accent: #0a0f0d;        /* ink on a green fill */

  --grad-a: #4ade80;
  --grad-b: #22d3ee;
  --cyan: #22d3ee;
  --cyan-wash: rgba(34,211,238,.09);
  --cyan-wash-2: rgba(34,211,238,.16);

  --line-faint: rgba(255,255,255,.05);
  --line:       rgba(255,255,255,.08);
  --line-2:     rgba(255,255,255,.10);
  --line-3:     rgba(255,255,255,.12);
  --line-4:     rgba(255,255,255,.14);
  --fill-subtle: rgba(255,255,255,.04);
  --track:       rgba(255,255,255,.07);
  --track-fill:  rgba(255,255,255,.35);
  --track-fill-2: rgba(255,255,255,.16);
  --key-usage:   rgba(255,255,255,.30);
  --inset:       rgba(0,0,0,.18);

  --shadow-c:        rgba(0,0,0,.4);
  --shadow-c-soft:   rgba(0,0,0,.3);
  --shadow-c-strong: rgba(0,0,0,.55);

  --verdict-warm-fg: #c7f5d8;
  --verdict-cold-fg: #ffd4d5;
  --header-bg: rgba(10, 15, 13, .82);

  --hero-wash: rgba(74,222,128,.07);
  --hv-silhouette: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 132'%3E%3Ccircle cx='50' cy='38' r='21'/%3E%3Cpath d='M6 132c0-29.5 19.7-50 44-50s44 20.5 44 50z'/%3E%3C/svg%3E");

  --mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
}

/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  /* sticky header is ~57-70px; keep anything scrolled-to clear of it.
     Global scroll-padding replaces the per-element scroll-margin-top rules
     that used to be sprinkled on .flow / .section / .rail / .for-actors. */
  scroll-padding-top: 96px;
}
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding: 0 0 100px;
  /* single subtle top glow — not over-produced */
  background-image:
    radial-gradient(ellipse 900px 440px at 20% -6%, var(--hero-wash), transparent 60%);
}

/* ── Layout ────────────────────────────────────────────────────── */
/* .wrap is the WIDE container for hero / transparency / footer.
   .flow is the NARROW, centred container for the linear step panels. */
.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}
.flow {
  max-width: 800px;
  margin: 0 auto;
}
/* Long-form text never runs the full 1280px measure. */
.sub, .notice, footer { max-width: 660px; }

/* ── Keyframes ─────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}
@keyframes scorePulse {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74,222,128,.55); }
  60%      { box-shadow: 0 0 0 5px rgba(74,222,128,0); }
}
@keyframes toastUp {
  from { opacity: 0; transform: translateX(-50%) translateY(16px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ══════════════════════════════════════════════════════════════════
   LIGHT THEME
   Same token names, re-pointed. Dark stays the default; light is opt-in
   via data-theme="light" on <html>. On white the dark theme's tricks
   invert: green-tinted glows become grey hairlines, and depth comes
   from soft shadows instead of border luminance.
   ══════════════════════════════════════════════════════════════════ */
html[data-theme="light"] {
  --bg: #f4f9f6;
  --surface: #ffffff;
  --surface-2: #fbfdfc;
  --surface-3: #f1f7f3;

  --border: rgba(13, 42, 30, .10);
  --border-hl: rgba(22, 163, 74, .32);

  --accent: #15803d;          /* green that must stay readable AS TEXT on white */
  --accent-fill: #22c55e;     /* vivid green that carries --on-accent ink */
  --accent-hover: #16a34a;
  --accent-dim: #86efac;
  --accent-glow: rgba(34, 197, 94, .20);
  --on-accent: #04240f;

  --grad-a: #16a34a;
  --grad-b: #0891b2;
  --cyan: #0e7490;
  --cyan-wash: rgba(14, 116, 144, .08);
  --cyan-wash-2: rgba(14, 116, 144, .14);

  --warn: #b45309;
  --danger: #dc2626;

  --text:   #0a1710;   /* headings: near-black */
  --text-2: #3a4a42;   /* body copy: confidently dark, ~9.4:1 on white */
  --text-3: #4e5d55;   /* muted labels, ~7:1 on white */

  --line-faint:   rgba(13, 42, 30, .06);
  --line:         rgba(13, 42, 30, .09);
  --line-2:       rgba(13, 42, 30, .12);
  --line-3:       rgba(13, 42, 30, .15);
  --line-4:       rgba(13, 42, 30, .20);
  --fill-subtle:  rgba(13, 42, 30, .04);
  --track:        rgba(13, 42, 30, .08);
  --track-fill:   rgba(13, 42, 30, .42);
  --track-fill-2: rgba(13, 42, 30, .20);
  --key-usage:    rgba(13, 42, 30, .34);
  --inset:        rgba(13, 42, 30, .025);

  --shadow-c:        rgba(16, 44, 32, .10);
  --shadow-c-soft:   rgba(16, 44, 32, .07);
  --shadow-c-strong: rgba(16, 44, 32, .15);

  --verdict-warm-fg: #14532d;
  --verdict-cold-fg: #7f1d1d;
  --header-bg: rgba(255, 255, 255, .88);

  --hero-wash: rgba(34, 197, 94, .10);
}

/* Depth on white comes from shadow, not from a luminous border. */
html[data-theme="light"] .panel,
html[data-theme="light"] .tool-card,
html[data-theme="light"] .lib-card,
html[data-theme="light"] .econ-cell,
html[data-theme="light"] .how-card,
html[data-theme="light"] .evidence,
html[data-theme="light"] .for-actors,
html[data-theme="light"] .notice,
html[data-theme="light"] .stat,
html[data-theme="light"] .lib-verdict {
  box-shadow: 0 1px 2px rgba(16,44,32,.04), 0 6px 18px rgba(16,44,32,.06);
}
html[data-theme="light"] .panel {
  box-shadow: 0 1px 2px rgba(16,44,32,.04), 0 10px 30px rgba(16,44,32,.07);
}
html[data-theme="light"] .tool-card:hover,
html[data-theme="light"] .lib-card:hover,
html[data-theme="light"] .econ-cell:hover,
html[data-theme="light"] .how-card:hover,
html[data-theme="light"] .stat:hover {
  box-shadow: 0 2px 4px rgba(16,44,32,.05), 0 12px 28px rgba(16,44,32,.11);
}

/* The green washes that read as "tint" on black go muddy on white —
   lighten them and lean on the border instead. */
html[data-theme="light"] .badge {
  background: rgba(34,197,94,.07);
  border-color: rgba(22,163,74,.30);
}
html[data-theme="light"] .actor-card.sel,
html[data-theme="light"] .tool-card--new {
  background: linear-gradient(180deg, rgba(34,197,94,.09) 0%, var(--surface) 70%);
}
html[data-theme="light"] .drop {
  background: var(--surface-3);
}
html[data-theme="light"] .drop:hover {
  background: rgba(34,197,94,.06);
  border-color: var(--accent);
}
html[data-theme="light"] .lib-stat {
  background: var(--surface-3);
}
html[data-theme="light"] .lib-card.has-fit .lib-stat--fit {
  background: rgba(34,197,94,.09);
  border-color: rgba(22,163,74,.30);
}
html[data-theme="light"] .verdict.warm,
html[data-theme="light"] .lib-verdict.on {
  background: rgba(34,197,94,.08);
  border-color: rgba(22,163,74,.28);
}
html[data-theme="light"] .verdict.cold {
  background: rgba(220,38,38,.05);
  border-color: rgba(220,38,38,.22);
}
html[data-theme="light"] .btn-ghost {
  border-color: var(--line-2);
}
html[data-theme="light"] .btn-ghost:hover {
  border-color: var(--border-hl);
  background: rgba(34,197,94,.06);
}
html[data-theme="light"] .conf-pill.med,
html[data-theme="light"] .conf-pill.high,
html[data-theme="light"] .how-num--real {
  background: rgba(34,197,94,.11);
}
html[data-theme="light"] .conf-pill.low { background: rgba(180,83,9,.11); }
html[data-theme="light"] .conf-pill.none,
html[data-theme="light"] .err-box { background: rgba(220,38,38,.07); }
html[data-theme="light"] .how-num--standin { background: rgba(180,83,9,.11); }
html[data-theme="light"] .ev-note code,
html[data-theme="light"] .how-p code,
html[data-theme="light"] footer code {
  background: rgba(34,197,94,.11);
}
html[data-theme="light"] .lb-item:hover { background: rgba(34,197,94,.05); }
html[data-theme="light"] .logBtn { background: var(--surface-3); }
html[data-theme="light"] ::selection { background: rgba(34,197,94,.24); color: var(--text); }
html[data-theme="light"] ::-webkit-scrollbar-track { background: var(--surface-3); }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(13,42,30,.22); }
html[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: rgba(13,42,30,.34); }

/* ── Theme toggle button ────────────────────────────────────────── */
.theme-toggle {
  width: 34px; height: 34px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px; cursor: pointer;
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--text-2);
  transition: color .2s, border-color .2s, background .2s, transform .2s;
}
.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--border-hl);
  background: var(--fill-subtle);
  transform: translateY(-1px);
}
.theme-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.theme-toggle svg { width: 16px; height: 16px; display: block; }
/* show the icon for the theme you would switch TO */
.theme-toggle .icon-sun  { display: none; }
.theme-toggle .icon-moon { display: block; }
html[data-theme="light"] .theme-toggle .icon-sun  { display: block; }
html[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* ══════════════════════════════════════════════════════════════════
   HEADER / BRAND
   ══════════════════════════════════════════════════════════════════ */
/* The bar itself is full-viewport-width; only .header-inner is capped. */
.site-header {
  position: sticky; top: 0; z-index: 40;
  width: 100%;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--border);
  margin-bottom: 56px;
}
.header-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 14px 32px;
  display: flex; align-items: center; gap: 24px;
}
.brand {
  display: flex; align-items: center; gap: 14px;
  text-decoration: none; color: inherit;
  margin-right: auto;
  transition: opacity .2s;
}
.brand:hover { opacity: .82; }

/* ── centre-right nav links ── */
.site-nav {
  display: flex; align-items: center; gap: 28px;
}
.site-nav a {
  font-size: 13px; font-weight: 500;
  color: var(--text-2); text-decoration: none;
  position: relative; padding: 4px 0;
  transition: color .2s;
}
.site-nav a::after {
  content: ""; position: absolute;
  left: 0; right: 0; bottom: -2px; height: 1.5px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .25s cubic-bezier(.4,0,.2,1);
}
.site-nav a:hover { color: var(--text); }
.site-nav a:hover::after { transform: scaleX(1); }

/* ── far-right actions ── */
.header-actions {
  display: flex; align-items: center; gap: 14px;
  flex-shrink: 0;
}
.btn-sm {
  padding: 9px 16px; font-size: 12.5px;
  text-decoration: none; white-space: nowrap;
}
.brand-mark {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--surface);
  border: 1.5px solid var(--border-hl);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 14px;
  color: var(--accent);
  letter-spacing: -.5px;
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(74,222,128,.06);
}
.brand-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 19px;
  letter-spacing: -.4px;
  display: flex; align-items: baseline; gap: 0;
}
.brand-name span {
  color: var(--text-3); font-weight: 400;
  margin-left: 2px;
}

/* badge — live-indicator chip */
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase;
  font-weight: 600; color: var(--accent);
  border: 1px solid rgba(74,222,128,.20);
  background: rgba(74,222,128,.05);
  padding: 6px 14px 6px 11px; border-radius: 100px;
}
.badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: dotPulse 2.4s ease-out infinite;
}

/* ══════════════════════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════════════════════ */
/* Mobile-first: single column. Two-column kicks in at >=900px (see below). */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
  padding-bottom: 8px;
}
.hero-cta {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-top: 26px;
}
.hero-cta .btn { text-decoration: none; }

.eyebrow {
  font-size: 10.5px; letter-spacing: 2.8px; text-transform: uppercase;
  color: var(--text-3); font-weight: 600;
  margin-bottom: 16px;
}
h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(32px, 4.8vw, 52px);
  line-height: 1.08; font-weight: 700;
  letter-spacing: -.02em;
  max-width: 740px;
  margin-bottom: 4px;
}
h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.sub {
  color: var(--text-2); font-size: 16px;
  line-height: 1.7; max-width: 660px;
  margin-top: 16px;
}

/* ── Notice ─────────────────────────────────────────────────────── */
.notice {
  margin-top: 24px; font-size: 13px; color: var(--text-2);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 16px;
  background: var(--surface);
  display: flex; gap: 10px; align-items: flex-start;
  line-height: 1.65;
}
.notice b { color: var(--text-2); }

/* ══════════════════════════════════════════════════════════════════
   HERO VISUAL — stacked portrait cards with a live-feeling front card
   All motion is CSS. No video or image files, original artwork only.
   The card CHROME follows the theme; the small preview STAGE stays dark
   in both themes (like a video thumbnail inside a white card), which is
   what keeps the green sweep legible on a light background.
   ══════════════════════════════════════════════════════════════════ */
.hero-visual { display: none; }          /* hidden until the wide breakpoint */

.hv-stack {
  position: relative;
  height: 430px;
  /* one knob drives rest + hover spread so narrow columns can shrink it */
  --hv-spread: 130px;
  display: flex; align-items: center; justify-content: center;
}
.hv-glow {
  position: absolute; inset: 6% 2% 10%;
  border-radius: 44px;
  background:
    radial-gradient(ellipse at 66% 28%, var(--cyan-wash-2), transparent 62%),
    radial-gradient(ellipse at 30% 72%, var(--accent-glow), transparent 62%);
  filter: blur(30px);
  pointer-events: none;
}

.hv-card {
  position: absolute;
  width: 176px;
  aspect-ratio: 9 / 16;
  border-radius: 18px;
  overflow: hidden;
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border-hl);
  box-shadow: 0 22px 52px var(--shadow-c-strong);
  transition: transform .5s cubic-bezier(.4,0,.2,1), box-shadow .5s;
}
.hv-card--left  { transform: translateX(calc(var(--hv-spread) * -1)) rotate(-9deg) scale(.86); z-index: 1; }
.hv-card--right { transform: translateX(var(--hv-spread)) rotate( 9deg) scale(.86); z-index: 1; }
.hv-card--front {
  width: 200px;
  z-index: 3;
  transform: translateY(-8px);
  border-color: var(--border-hl);
  box-shadow: 0 30px 64px var(--shadow-c-strong);
}
.hv-stack:hover .hv-card--left  { transform: translateX(calc(var(--hv-spread) * -1.14)) rotate(-11deg) scale(.88); }
.hv-stack:hover .hv-card--right { transform: translateX(calc(var(--hv-spread) * 1.14)) rotate( 11deg) scale(.88); }
.hv-stack:hover .hv-card--front { transform: translateY(-14px); }

/* ── the preview stage: deliberately dark in BOTH themes ─────────── */
.hv-scene {
  position: relative;
  flex: 1;
  background:
    radial-gradient(ellipse at 50% 120%, #17251f 0%, transparent 70%),
    linear-gradient(170deg, #101b16 0%, #0a120f 100%);
  overflow: hidden;
}

/* animated silhouette: a masked element with a gradient sweeping across */
.hv-figure {
  position: absolute; inset: 12% 0 0;
  -webkit-mask-image: var(--hv-silhouette);
          mask-image: var(--hv-silhouette);
  -webkit-mask-size: 74% auto;    mask-size: 74% auto;
  -webkit-mask-position: center bottom; mask-position: center bottom;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  background-image:
    linear-gradient(108deg, transparent 26%, var(--grad-a) 43%, var(--grad-b) 54%, transparent 72%),
    linear-gradient(0deg, #2a3d34, #2a3d34);
  background-size: 260% 100%, 100% 100%;
  background-repeat: no-repeat;
  animation: hvSweep 3.6s linear infinite;
}
@keyframes hvSweep {
  from { background-position: 170% 0, 0 0; }
  to   { background-position: -70% 0, 0 0; }
}

/* a faint horizontal scan line drifting down the stage */
.hv-scan {
  position: absolute; left: 0; right: 0; height: 34%;
  background: linear-gradient(180deg, transparent, rgba(74,222,128,.10), transparent);
  animation: hvScan 4.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes hvScan {
  0%, 100% { transform: translateY(-40%); opacity: 0; }
  40%      { opacity: 1; }
  60%      { opacity: 1; }
  50%      { transform: translateY(190%); }
}

/* ── LIVE PREVIEW chip — fixed light colours, it sits on the dark stage */
.hv-live {
  position: absolute; top: 10px; left: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 8px; font-weight: 700;
  letter-spacing: 1.1px; text-transform: uppercase;
  color: #d6f5e2;
  background: rgba(8,14,11,.62);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border: 1px solid rgba(74,222,128,.30);
  padding: 4px 9px 4px 7px; border-radius: 100px;
  z-index: 2;
}
.hv-live-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: #4ade80; flex-shrink: 0;
  animation: hvRec 1.6s ease-in-out infinite;
}
@keyframes hvRec {
  0%, 100% { opacity: 1;  box-shadow: 0 0 0 0 rgba(74,222,128,.6); }
  50%      { opacity: .45; box-shadow: 0 0 0 4px rgba(74,222,128,0); }
}

/* ── card chrome below the stage — fully theme-aware ─────────────── */
.hv-readout {
  padding: 11px 12px 12px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.hv-cap {
  font-size: 8px; letter-spacing: 1.3px; text-transform: uppercase;
  font-weight: 700; color: var(--text-3);
  margin-bottom: 7px;
}
.hv-score {
  display: flex; align-items: baseline; gap: 3px;
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1;
}
.hv-score b {
  font-size: 30px; font-weight: 700; letter-spacing: -1.4px;
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hv-score span { font-size: 11px; color: var(--text-3); font-weight: 500; }

/* looping waveform — reads as "computing", not as audio */
.hv-wave {
  display: flex; align-items: flex-end; gap: 2.5px;
  height: 18px; margin-top: 9px;
}
.hv-wave i {
  flex: 1; height: 100%; border-radius: 2px;
  background: linear-gradient(180deg, var(--grad-a), var(--grad-b));
  transform-origin: bottom;
  animation: hvWave 1.25s ease-in-out infinite;
}
.hv-wave i:nth-child(1) { animation-delay: -.00s }
.hv-wave i:nth-child(2) { animation-delay: -.14s }
.hv-wave i:nth-child(3) { animation-delay: -.28s }
.hv-wave i:nth-child(4) { animation-delay: -.42s }
.hv-wave i:nth-child(5) { animation-delay: -.56s }
.hv-wave i:nth-child(6) { animation-delay: -.70s }
.hv-wave i:nth-child(7) { animation-delay: -.84s }
.hv-wave i:nth-child(8) { animation-delay: -.98s }
.hv-wave i:nth-child(9) { animation-delay: -1.12s }
@keyframes hvWave {
  0%, 100% { transform: scaleY(.20); opacity: .55; }
  50%      { transform: scaleY(1);   opacity: 1; }
}

.hv-prog {
  height: 3px; margin-top: 9px; border-radius: 100px;
  background: var(--track); overflow: hidden;
}
.hv-prog i {
  display: block; height: 100%; border-radius: 100px;
  background: linear-gradient(90deg, var(--grad-a), var(--grad-b));
  animation: hvProg 3.2s cubic-bezier(.5,0,.3,1) infinite;
}
@keyframes hvProg {
  0%       { width: 3%;  opacity: 1; }
  72%      { width: 84%; opacity: 1; }
  90%,100% { width: 84%; opacity: .25; }
}

/* ── side card contents ─────────────────────────────────────────── */
.hv-swatches {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
}
.hv-swatches span { flex: 1; background: var(--c); }
.hv-foot {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 8.5px; color: var(--text-3); margin-top: 6px;
}
.hv-mono { font-family: var(--mono); color: var(--accent); font-size: 8px; }

.hv-portrait {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.hv-portrait svg {
  width: 62%; height: auto; display: block;
  border-radius: 50%;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,.45));
}
.hv-name { font-weight: 600; font-size: 11.5px; color: var(--text); }
.hv-tag  { font-size: 8.5px; color: var(--text-3); margin-top: 2px; }

/* the hero column narrows fast between 900-1120px - pull the stack in
   so the outer cards cannot push past the viewport edge */
@media (max-width: 1120px) {
  .hv-stack { --hv-spread: 92px; height: 400px; }
  .hv-card { width: 158px; }
  .hv-card--front { width: 180px; }
}

.hv-caption {
  margin-top: 16px; text-align: center;
  font-size: 10.5px; color: var(--text-3);
  letter-spacing: .2px;
}

/* Motion is decoration — kill it when the viewer asks. */
@media (prefers-reduced-motion: reduce) {
  .hv-figure, .hv-scan, .hv-live-dot, .hv-wave i, .hv-prog i { animation: none; }
  .hv-prog i { width: 84%; }
  .hv-wave i { transform: scaleY(.6); }
  .hv-stack:hover .hv-card--left,
  .hv-stack:hover .hv-card--right,
  .hv-stack:hover .hv-card--front { transform: none; }
  .hv-stack:hover .hv-card--left  { transform: translateX(calc(var(--hv-spread) * -1)) rotate(-9deg) scale(.86); }
  .hv-stack:hover .hv-card--right { transform: translateX(var(--hv-spread)) rotate( 9deg) scale(.86); }
  .hv-stack:hover .hv-card--front { transform: translateY(-8px); }
}

/* ══════════════════════════════════════════════════════════════════
   STEP RAIL
   ══════════════════════════════════════════════════════════════════ */
.rail {
  display: flex; align-items: center;
  margin: 40px 0 32px;
}
.step-pt {
  display: flex; align-items: center; gap: 10px;
}
.dot {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
  border: 1.5px solid var(--line-3);
  color: var(--text-3); background: var(--surface);
  transition: all .35s cubic-bezier(.4,0,.2,1);
  flex-shrink: 0;
}
.dot.active {
  border-color: var(--accent);
  color: var(--on-accent); background: var(--accent-fill);
  box-shadow: 0 0 0 4px var(--accent-glow);
  transform: scale(1.08);
}
.dot.done {
  border-color: var(--accent);
  color: var(--accent); background: rgba(74,222,128,.10);
}
.step-label {
  font-size: 12.5px; color: var(--text-3);
  font-weight: 500; white-space: nowrap;
  transition: color .3s;
}
.step-label.on { color: var(--text); }
.rail-line {
  flex: 1; height: 1px;
  background: var(--line);
  margin: 0 12px; min-width: 14px;
}

/* ══════════════════════════════════════════════════════════════════
   PANELS
   ══════════════════════════════════════════════════════════════════ */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 34px;
  min-height: 280px;
  box-shadow: 0 18px 44px var(--shadow-c);
  animation: panelIn .4s ease-out both;
}
.panel-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 17px;
  margin-bottom: 7px;
  letter-spacing: -.2px;
}
.panel-desc {
  color: var(--text-2); font-size: 14.5px;
  margin-bottom: 26px; line-height: 1.65;
}

/* ══════════════════════════════════════════════════════════════════
   UPLOAD / DROP ZONE
   ══════════════════════════════════════════════════════════════════ */
.drop {
  border: 1.5px dashed var(--line-4);
  border-radius: 14px; padding: 34px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  cursor: pointer; text-align: center;
  background: var(--surface-2);
  transition: border-color .25s, background .25s, box-shadow .25s, transform .25s;
}
.drop:hover {
  border-color: var(--accent-dim);
  background: rgba(74,222,128,.03);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px var(--shadow-c-soft);
}
.drop.filled {
  border-style: solid;
  border-color: var(--accent-dim);
  padding: 16px;
}
.drop-title { font-weight: 600; font-size: 13.5px; }
.drop-sub   { font-size: 11.5px; color: var(--text-3); }
.preview-img {
  max-height: 150px; border-radius: 10px;
  object-fit: cover;
}
input[type=file] { display: none; }

/* ── Category chips ────────────────────────────────────────────── */
.samples {
  display: flex; gap: 9px;
  margin-top: 14px; flex-wrap: wrap;
}
.sample-chip {
  font-size: 11.5px; padding: 7px 13px;
  border-radius: 100px;
  border: 1px solid var(--line-2);
  color: var(--text-2); cursor: pointer;
  background: transparent;
  transition: all .2s ease;
}
.sample-chip:hover {
  border-color: var(--accent-dim);
  color: var(--accent);
}
.sample-chip.on {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(74,222,128,.06);
}

/* ══════════════════════════════════════════════════════════════════
   ACTOR GRID
   ══════════════════════════════════════════════════════════════════ */
.actor-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
@media (max-width: 820px) { .actor-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .actor-grid { grid-template-columns: repeat(2, 1fr); } }

.actor-card {
  border: 1.5px solid var(--border);
  border-radius: 14px; padding: 16px 12px;
  cursor: pointer; text-align: center;
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  transition: all .25s cubic-bezier(.4,0,.2,1);
}
.actor-card:hover {
  border-color: var(--border-hl);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 24px var(--shadow-c);
}
.actor-card.sel {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(74,222,128,.07) 0%, var(--surface) 100%);
  box-shadow:
    0 0 0 3px var(--accent-glow),
    0 8px 28px var(--shadow-c);
}
.actor-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  margin: 0 auto 8px;
  position: relative; overflow: hidden;
  transition: transform .25s;
}
.actor-card:hover .actor-avatar { transform: scale(1.06); }
.actor-avatar svg { width: 100%; height: 100%; display: block; }
.actor-name { font-weight: 600; font-size: 13px; }
.actor-tag  { font-size: 10.5px; color: var(--text-3); margin-top: 2px; }
.actor-delivery {
  font-size: 9.5px; margin-top: 5px;
  color: var(--accent); opacity: .85;
  letter-spacing: .2px;
}

/* ══════════════════════════════════════════════════════════════════
   FORM HELPERS
   ══════════════════════════════════════════════════════════════════ */
.field { margin-bottom: 14px; }
.field label {
  display: block; font-size: 10.5px; color: var(--text-3);
  margin-bottom: 7px; font-weight: 600;
  letter-spacing: .6px; text-transform: uppercase;
}
select {
  width: 100%; background: var(--surface-2);
  border: 1px solid var(--line-3);
  color: var(--text); padding: 11px 12px;
  border-radius: 9px; font-size: 14px;
  font-family: 'Inter', sans-serif; cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}
select:focus {
  outline: none;
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ══════════════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════════════ */
.row {
  display: flex; justify-content: space-between;
  align-items: center; margin-top: 28px;
  gap: 12px; flex-wrap: wrap;
}
.btn {
  font-family: 'Inter', sans-serif;
  font-weight: 600; font-size: 13.5px;
  border: none; border-radius: 10px;
  padding: 12px 22px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all .2s cubic-bezier(.4,0,.2,1);
}
.btn-primary {
  background: var(--accent-fill);
  color: var(--on-accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 18px var(--accent-glow);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled {
  background: var(--surface-2);
  color: var(--text-3);
  cursor: not-allowed; box-shadow: none;
}
.btn-primary:disabled:hover { transform: none; }

.btn-ghost {
  background: transparent; color: var(--text-2);
  border: 1px solid rgba(74,222,128,.15);
}
.btn-ghost:hover {
  color: var(--text);
  border-color: rgba(74,222,128,.30);
  background: rgba(74,222,128,.04);
  transform: translateY(-1px);
}

/* ── Error ──────────────────────────────────────────────────────── */
.err-box {
  margin-top: 14px; font-size: 12.5px;
  color: var(--danger);
  background: rgba(242,85,90,.06);
  border: 1px solid rgba(242,85,90,.25);
  border-radius: 9px; padding: 10px 13px;
  display: none;
}
.err-box.show { display: block; }

/* ══════════════════════════════════════════════════════════════════
   RESULT — STEP 3
   ══════════════════════════════════════════════════════════════════ */
.result-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px; align-items: start;
}
@media (max-width: 700px) { .result-grid { grid-template-columns: 1fr; } }

/* ── Evidence (diagnostics card) ───────────────────────────────── */
.evidence {
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid var(--border);
  border-radius: 14px; padding: 22px 20px;
}
.ev-title {
  font-size: 10px; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 1px;
  font-weight: 700; margin-bottom: 16px;
}
.ev-row {
  display: flex; align-items: center;
  gap: 12px; margin-bottom: 12px;
}
.swatch {
  width: 24px; height: 24px; border-radius: 6px;
  border: 1px solid var(--line-2);
  flex-shrink: 0;
}
.ev-label { font-size: 13px; color: var(--text-2); }
.ev-val {
  font-family: var(--mono);
  font-size: 13px; font-weight: 600;
  color: var(--text); margin-left: auto;
  letter-spacing: -.3px;
}
.ev-note {
  font-size: 12.5px; color: var(--text-2);
  margin-top: 16px; line-height: 1.65;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.ev-note code {
  font-family: var(--mono);
  font-size: 10.5px;
  background: rgba(74,222,128,.08);
  color: var(--accent);
  padding: 2px 6px; border-radius: 4px;
}

/* ── Score block ───────────────────────────────────────────────── */
.score-block {
  display: flex; flex-direction: column; gap: 16px;
}
.score-head {
  display: flex; align-items: baseline;
  gap: 6px; flex-wrap: wrap;
}
.score-num {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 56px;
  letter-spacing: -2px;
  color: var(--text);
  line-height: 1;
  transition: transform .3s ease;
}
/* pulse class — toggled by main.js on score update */
.score-num.pulse {
  animation: scorePulse .45s cubic-bezier(.4,0,.2,1);
}
.score-den {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--text-3); font-size: 18px;
  font-weight: 500;
}

/* ── Confidence pill ───────────────────────────────────────────── */
.conf-pill {
  font-size: 10px; padding: 4px 11px;
  border-radius: 100px; font-weight: 700;
  letter-spacing: .8px; text-transform: uppercase;
  margin-left: 6px;
  transition: background .35s, color .35s;
}
.conf-pill.none { background: rgba(242,85,90,.10); color: var(--danger); }
.conf-pill.low  { background: rgba(244,183,64,.10); color: var(--warn); }
.conf-pill.med  { background: rgba(74,222,128,.10); color: var(--accent); }
.conf-pill.high { background: rgba(74,222,128,.16); color: var(--accent); }

/* ── Verdict ───────────────────────────────────────────────────── */
.verdict {
  padding: 15px 17px; border-radius: 10px;
  font-size: 13.5px; line-height: 1.65;
  border: 1px solid var(--border);
  transition: background .35s, border-color .35s, color .35s;
}
.verdict.cold {
  background: rgba(242,85,90,.05);
  border-color: rgba(242,85,90,.20);
  color: var(--verdict-cold-fg);
}
.verdict.warm {
  background: rgba(74,222,128,.05);
  border-color: rgba(74,222,128,.18);
  color: var(--verdict-warm-fg);
}

/* ── Log section ───────────────────────────────────────────────── */
.logSection p {
  font-size: 12.5px; color: var(--text-2);
  margin-bottom: 12px; line-height: 1.6;
}
.logBtns { display: flex; gap: 8px; }
.logBtn {
  flex: 1; font-size: 12px; padding: 10px 6px;
  border-radius: 9px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--text); cursor: pointer;
  font-weight: 600;
  transition: all .2s ease;
}
.logBtn:hover { transform: translateY(-1px); }
.logBtn.high:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 4px 14px rgba(74,222,128,.12);
}
.logBtn.avg:hover {
  border-color: var(--warn);
  color: var(--warn);
  box-shadow: 0 4px 14px rgba(244,183,64,.10);
}
.logBtn.low:hover {
  border-color: var(--danger);
  color: var(--danger);
  box-shadow: 0 4px 14px rgba(242,85,90,.10);
}
.logged-tag {
  font-size: 11px; color: var(--accent);
  display: none; align-items: center; gap: 6px;
}
.logged-tag.show { display: flex; }

/* ══════════════════════════════════════════════════════════════════
   FLYWHEEL STATS + LEADERBOARD
   ══════════════════════════════════════════════════════════════════ */
.flywheel {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.fly-stats {
  display: flex; gap: 12px;
  margin: 22px 0 18px;
}
.stat {
  flex: 1; border: 1px solid var(--border);
  border-radius: 12px; padding: 16px;
  background: var(--surface-2); text-align: center;
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.stat:hover {
  border-color: var(--border-hl);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--shadow-c);
}
.stat-num {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 22px;
  color: var(--accent);
}
.stat-lbl {
  font-size: 9px; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .8px;
  margin-top: 4px; font-weight: 600;
}
.lb-title {
  font-size: 10px; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 1px;
  font-weight: 700; margin-bottom: 8px;
}
.lb-item {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  border-radius: 6px;
  transition: background .15s;
}
.lb-item:last-child { border-bottom: none; }
.lb-item:hover { background: rgba(74,222,128,.03); }
.lb-meta {
  color: var(--text-3); font-size: 10.5px;
  margin-top: 1px;
}
.lb-score {
  font-family: var(--mono);
  font-weight: 700; font-size: 13px;
  color: var(--accent);
}
.lb-empty {
  color: var(--text-3); font-size: 12px;
  text-align: center; padding: 20px 0;
}
.resetBtn {
  margin-top: 14px; font-size: 10.5px;
  color: var(--text-3); background: none;
  border: none; cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .2s;
}
.resetBtn:hover { color: var(--accent); }

/* ══════════════════════════════════════════════════════════════════
   "WHAT'S REAL" — TRANSPARENCY SECTION
   ══════════════════════════════════════════════════════════════════ */
.how { padding-top: 40px; border-top: 1px solid var(--border); }
.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 14px;
  align-items: start;   /* cards size to their content, no dead space */
}
@media (max-width: 1100px) { .how-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px)  { .how-grid { grid-template-columns: 1fr; } }

.how-card {
  border: 1px solid var(--border);
  border-radius: 14px; padding: 22px 20px;
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  transition: border-color .25s, box-shadow .25s, transform .25s;
  position: relative;
}
.how-card:hover {
  border-color: var(--border-hl);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--shadow-c);
}
.how-num {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 10px;
  letter-spacing: 1.2px; text-transform: uppercase;
  margin-bottom: 10px;
  padding: 3px 8px;
  border-radius: 4px;
}
/* REAL = green, STAND-IN = amber, GROUNDED = cyan */
.how-num--real     { color: var(--accent); background: rgba(74,222,128,.08); }
.how-num--standin  { color: var(--warn);   background: rgba(244,183,64,.08); }
.how-num--grounded { color: var(--cyan);       background: var(--cyan-wash); }
.how-h {
  font-weight: 700; font-size: 14.5px;
  margin-bottom: 8px; letter-spacing: -.1px;
}
.how-p {
  font-size: 13.5px; color: var(--text-2);
  line-height: 1.65;
}
.how-list {
  list-style: none;
  margin-top: 12px;
  display: flex; flex-direction: column; gap: 9px;
}
.how-list li {
  position: relative;
  padding-left: 14px;
  font-size: 13px; line-height: 1.65;
  color: var(--text-2);
}
.how-list li::before {
  content: "";
  position: absolute; left: 0; top: 8px;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--cyan); opacity: .75;
}
.how-list b { color: var(--text); font-weight: 600; }

.how-p code {
  font-family: var(--mono);
  font-size: 11px;
  background: rgba(74,222,128,.08);
  color: var(--accent);
  padding: 1px 5px; border-radius: 3px;
}

/* ══════════════════════════════════════════════════════════════════
   SECTION SCAFFOLD — shared rhythm for every section below the hero
   ══════════════════════════════════════════════════════════════════ */
.section { margin-top: 96px; }
.section-head { max-width: 680px; margin-bottom: 34px; }
.section-eyebrow {
  font-size: 10px; letter-spacing: 2.4px; text-transform: uppercase;
  color: var(--text-3); font-weight: 700; margin-bottom: 14px;
}
.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 700; letter-spacing: -.02em;
  line-height: 1.18; margin-bottom: 13px;
}
.section-sub {
  color: var(--text-2); font-size: 15px; line-height: 1.7;
}

/* ══════════════════════════════════════════════════════════════════
   PRICING / CREDIT ECONOMICS STRIP
   ══════════════════════════════════════════════════════════════════ */
.econ { margin-top: 64px; }
.econ-strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.econ-cell {
  border: 1px solid var(--border);
  border-radius: 14px; padding: 20px 18px;
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.econ-cell:hover {
  border-color: var(--border-hl);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--shadow-c);
}
.econ-cell--free { border-color: rgba(74,222,128,.22); }
.econ-num {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 26px; letter-spacing: -1px;
  color: var(--text); line-height: 1;
}
.econ-cell--free .econ-num { color: var(--accent); }
.econ-lbl {
  font-size: 12px; color: var(--text-2);
  margin-top: 9px; line-height: 1.6;
}
.econ-note {
  margin-top: 20px; max-width: 780px;
  font-size: 14px; line-height: 1.7; color: var(--text-2);
}
.econ-note b { color: var(--text); }

/* ══════════════════════════════════════════════════════════════════
   TOOLSET GRID
   ══════════════════════════════════════════════════════════════════ */
.tool-grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.tool-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 14px; padding: 22px 20px 20px;
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  transition: border-color .25s, transform .25s, box-shadow .25s;
  display: block; text-decoration: none; color: inherit;
}
.tool-card:hover {
  border-color: var(--border-hl);
  transform: translateY(-3px);
  box-shadow: 0 10px 28px var(--shadow-c);
}
.tool-icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--fill-subtle);
  border: 1px solid var(--border);
  color: var(--text-2);
  margin-bottom: 14px;
  transition: color .25s, border-color .25s, background .25s;
}
.tool-icon svg { width: 20px; height: 20px; }
.tool-card:hover .tool-icon { color: var(--accent); border-color: var(--border-hl); }
.tool-name {
  font-weight: 700; font-size: 14.5px;
  letter-spacing: -.1px; margin-bottom: 6px;
}
.tool-desc { font-size: 13px; color: var(--text-2); line-height: 1.6; }
.tool-tag {
  position: absolute; top: 16px; right: 16px;
  font-size: 8.5px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  padding: 3px 8px; border-radius: 100px;
  color: var(--text-3); background: var(--line-faint);
  border: 1px solid var(--border);
}
/* the one card that is actually this prototype */
.tool-card--new {
  border-color: rgba(74,222,128,.28);
  background: linear-gradient(180deg, rgba(74,222,128,.06) 0%, var(--surface) 70%);
}
.tool-card--new .tool-icon {
  color: var(--accent);
  border-color: rgba(74,222,128,.24);
  background: rgba(74,222,128,.07);
}
.tool-tag--new {
  color: var(--on-accent); background: var(--accent-fill);
  border-color: transparent;
}
.tool-go {
  margin-top: 12px; font-size: 11.5px;
  font-weight: 600; color: var(--accent);
}
.tool-card--new:hover { box-shadow: 0 10px 30px rgba(74,222,128,.14); }

/* ══════════════════════════════════════════════════════════════════
   ACTOR LIBRARY — the usage-vs-fit comparison
   ══════════════════════════════════════════════════════════════════ */
.lib-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.lib-card {
  border: 1px solid var(--border);
  border-radius: 14px; padding: 20px;
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.lib-card:hover {
  border-color: var(--border-hl);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px var(--shadow-c);
}
/* an actor that has real logged outcomes earns a visible ring */
.lib-card.has-fit {
  border-color: rgba(74,222,128,.26);
  box-shadow: 0 0 0 1px rgba(74,222,128,.05);
}
.lib-head { display: flex; align-items: center; gap: 12px; }
.lib-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  overflow: hidden; flex-shrink: 0;
}
.lib-avatar svg { width: 100%; height: 100%; display: block; }
.lib-name { font-weight: 700; font-size: 14.5px; letter-spacing: -.2px; }
.lib-tier { font-size: 10.5px; color: var(--text-3); margin-top: 2px; }
.lib-informal {
  margin: 14px 0 16px;
  font-size: 12.5px; color: var(--text-3);
  font-style: italic; line-height: 1.6;
  padding-left: 10px;
  border-left: 2px solid var(--line);
}
.lib-stats {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.lib-stat {
  border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 12px 11px;
  background: var(--inset);
}
.lib-card.has-fit .lib-stat--fit {
  border-color: rgba(74,222,128,.22);
  background: rgba(74,222,128,.05);
}
.lib-stat-lbl {
  font-size: 8.5px; letter-spacing: 1.1px;
  text-transform: uppercase; font-weight: 700;
  color: var(--text-3); margin-bottom: 8px;
}
.lib-val {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 22px;
  letter-spacing: -.8px; line-height: 1; color: var(--text);
}
.lib-val--fit { color: var(--accent); }
.lib-val--empty {
  font-size: 12px; font-weight: 500;
  color: var(--text-3); letter-spacing: 0;
  font-family: 'Inter', sans-serif;
  padding: 4px 0 3px;
}
.lib-den { font-size: 11px; color: var(--text-3); font-weight: 500; margin-left: 1px; }
.lib-bar {
  height: 4px; border-radius: 100px; margin-top: 9px;
  background: var(--track); overflow: hidden;
}
.lib-bar i {
  display: block; height: 100%; border-radius: 100px;
  background: linear-gradient(90deg, var(--track-fill), var(--track-fill-2));
}
.lib-meta {
  font-size: 9.5px; color: var(--text-3);
  margin-top: 7px; line-height: 1.45;
}
.lib-meta--best { color: var(--accent); opacity: .8; }

/* the punchline under the grid */
.lib-verdict {
  margin-top: 20px; padding: 16px 20px;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface);
  font-size: 14px; line-height: 1.7; color: var(--text-2);
  transition: background .35s, border-color .35s;
}
.lib-verdict.on {
  border-color: rgba(74,222,128,.20);
  background: rgba(74,222,128,.05);
  color: var(--verdict-warm-fg);
}
.lib-verdict b { color: var(--text); }
.lib-verdict.on b { color: var(--accent); }

.lib-legend {
  display: flex; flex-wrap: wrap; gap: 10px 28px;
  margin-top: 16px;
}
/* block, not flex: the label and the text after it must flow as one
   paragraph rather than becoming separate flex items */
.lib-legend-item {
  display: block;
  font-size: 12px; color: var(--text-2); line-height: 1.65;
  max-width: 470px;
}
.lib-legend-item b { color: var(--text-2); font-weight: 600; }
.lib-key {
  display: inline-block;
  width: 9px; height: 9px; border-radius: 3px;
  margin-right: 8px; transform: translateY(1px);
}
.lib-key--usage { background: var(--key-usage); }
.lib-key--fit   { background: var(--accent-fill); }

/* ── For actors ─────────────────────────────────────────────────── */
.for-actors {
  margin-top: 28px; padding: 22px 24px;
  border: 1px solid var(--border); border-radius: 14px;
  background: var(--surface);
}
.fa-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 13.5px;
  color: var(--text); margin-bottom: 8px;
  letter-spacing: .2px;
}
.fa-p {
  font-size: 14px; line-height: 1.7;
  color: var(--text-2); max-width: 760px;
}

/* ══════════════════════════════════════════════════════════════════
   NEW-SECTION RESPONSIVE
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .tool-grid { grid-template-columns: repeat(3, 1fr); }
  .lib-grid  { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .econ-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .section   { margin-top: 68px; }
}
@media (max-width: 520px) {
  .tool-grid, .lib-grid { grid-template-columns: 1fr; }
  .econ-strip { grid-template-columns: 1fr; }
  .for-actors { padding: 18px 16px; }
}

/* ══════════════════════════════════════════════════════════════════
   MODELS STRIP + LANGUAGE PILLS
   Both are token-only: every colour resolves through the existing
   theme variables, so light/dark come for free. The single hardcoded
   colour is each vendor mark's --mc, which is a deliberate brand-ish
   accent that reads on both grounds and carries white text.
   ══════════════════════════════════════════════════════════════════ */
.section-head--center {
  margin-left: auto; margin-right: auto;
  text-align: center;
  max-width: 620px;
}
.section-eyebrow--accent {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 2.6px;
}

/* ── model marquee ──────────────────────────────────────────────────
   The badge set is rendered twice. The track is therefore exactly 2x the
   content width, so translating it by -50% lands the duplicate precisely
   where the original started - the loop restarts on an identical frame
   and the seam is invisible. gap is on the track, so the padding-free
   duplicate butts up against the original at the same rhythm. */
.model-marquee {
  /* hidden still makes this a scroll container (scrollable programmatically,
     and a focus-scroll inside the clipped half would offset the strip).
     clip does not create one at all; hidden is the fallback. */
  overflow: hidden;
  overflow: clip;
  padding: 4px 0 14px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 60px, #000 calc(100% - 60px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 60px, #000 calc(100% - 60px), transparent 100%);
}
.model-track {
  display: flex;
  gap: 12px;
  width: max-content;
  padding-left: 12px;        /* matches gap, so the seam spacing is even */
  animation: modelMarquee 34s linear infinite;
  will-change: transform;
}
/* let a viewer stop and actually read a badge */
.model-marquee:hover .model-track,
.model-marquee:focus-within .model-track { animation-play-state: paused; }

@keyframes modelMarquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.model-badge {
  display: flex; align-items: center; gap: 11px;
  flex: 0 0 auto;
  scroll-snap-align: none;
  padding: 11px 18px 11px 12px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.model-badge:hover {
  border-color: var(--border-hl);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px var(--shadow-c);
}
.model-mark {
  width: 30px; height: 30px; border-radius: 50%;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--mc, var(--accent-fill));
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 13px;
  letter-spacing: -.3px;
}
.model-meta { display: flex; flex-direction: column; gap: 2px; }
.model-name {
  font-weight: 700; font-size: 13.5px;
  color: var(--text); letter-spacing: -.1px;
  white-space: nowrap;
}
.model-vendor {
  font-size: 11.5px; color: var(--text-3);
  line-height: 1.5;
  white-space: nowrap;
}
.model-note {
  margin-top: 4px; text-align: center;
  font-size: 10.5px; color: var(--text-3);
}

/* ── language pills ─────────────────────────────────────────────── */
.lang-pills {
  display: flex; flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  max-width: 860px; margin: 0 auto;
}
.lang-pill {
  padding: 9px 17px;
  line-height: 1.5;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px; font-weight: 500;
  transition: border-color .2s, transform .2s, box-shadow .2s, color .2s;
}
.lang-pill:hover {
  border-color: var(--border-hl);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--shadow-c-soft);
}
.lang-pill--more {
  background: transparent;
  border-style: dashed;
  border-color: var(--line-3);
  color: var(--text-3);
}
.lang-pill--more:hover { color: var(--text-2); }

/* light mode: the pills and badges are cards, so they get the same
   soft-shadow depth treatment as every other card on white */
html[data-theme="light"] .model-badge,
html[data-theme="light"] .lang-pill {
  box-shadow: 0 1px 2px rgba(16,44,32,.04), 0 4px 12px rgba(16,44,32,.05);
}
html[data-theme="light"] .lang-pill--more { box-shadow: none; }

@media (max-width: 700px) {
  .model-marquee {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
  }
  .model-track { animation-duration: 26s; }
  .lang-pill { font-size: 11.5px; padding: 7px 13px; }
}

/* ══════════════════════════════════════════════════════════════════
   ILLUSTRATIVE RENDER PREVIEW MODAL
   Native <dialog> + showModal(), which brings focus trapping, Esc to
   close and an inert background for free. Every colour resolves through
   the existing tokens, so both themes are handled without a second set
   of rules. --rp-tone is set per-open from the actor's brand hue.
   ══════════════════════════════════════════════════════════════════ */
.rp {
  padding: 0;
  border: none;
  background: transparent;
  /* the global reset sets margin:0 on every element, which kills the
     margin:auto a native <dialog> relies on to centre itself */
  margin: auto;
  max-width: min(660px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: visible;
  color: var(--text);
}
.rp::backdrop {
  background: rgba(6, 11, 9, .62);
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
}
html[data-theme="light"] .rp::backdrop { background: rgba(16, 34, 26, .38); }

.rp-panel {
  background: var(--surface);
  border: 1px solid var(--border-hl);
  border-radius: 18px;
  box-shadow: 0 30px 80px var(--shadow-c-strong);
  padding: 26px 28px 24px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  animation: rpIn .28s cubic-bezier(.4, 0, .2, 1) both;
}
@keyframes rpIn {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to   { opacity: 1; transform: none; }
}

/* ── head ───────────────────────────────────────────────────────── */
.rp-head {
  display: flex; align-items: flex-start; gap: 16px;
  margin-bottom: 22px;
}
.rp-eyebrow {
  font-size: 10px; letter-spacing: 2.2px; text-transform: uppercase;
  font-weight: 700; color: var(--accent);
  margin-bottom: 9px;
}
.rp-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px; font-weight: 700;
  letter-spacing: -.02em; line-height: 1.2;
}
.rp-sub {
  font-size: 12.5px; color: var(--text-3);
  margin-top: 5px;
}
.rp-close {
  margin-left: auto; flex-shrink: 0;
  width: 32px; height: 32px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; cursor: pointer;
  border: 1px solid var(--line-2);
  color: var(--text-3);
  transition: color .2s, border-color .2s, background .2s;
}
.rp-close:hover {
  color: var(--text);
  border-color: var(--border-hl);
  background: var(--fill-subtle);
}
.rp-close svg { width: 15px; height: 15px; }

/* ── the composite ──────────────────────────────────────────────── */
.rp-stage {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 24px 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  /* the shared accent is the actor's own brand tone */
  background:
    radial-gradient(ellipse at 18% 50%, color-mix(in srgb, var(--rp-tone) 14%, transparent), transparent 62%),
    var(--surface-2);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rp-tone) 16%, transparent);
}
.rp-cell {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; text-align: center; min-width: 0;
}
.rp-avatar {
  width: 96px; height: 96px; border-radius: 50%;
  overflow: hidden; flex-shrink: 0;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--rp-tone) 42%, transparent),
              0 10px 26px var(--shadow-c);
}
.rp-avatar svg { width: 100%; height: 100%; display: block; }
.rp-shot {
  width: 128px; height: 96px; border-radius: 12px;
  overflow: hidden; flex-shrink: 0;
  background: var(--surface-3);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--rp-tone) 42%, transparent),
              0 10px 26px var(--shadow-c);
}
.rp-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rp-cell figcaption { display: flex; flex-direction: column; gap: 3px; }
.rp-cell-name { font-weight: 700; font-size: 13.5px; letter-spacing: -.1px; }
.rp-cell-meta { font-size: 11px; color: var(--text-3); }

.rp-link {
  display: flex; align-items: center; gap: 6px;
  color: var(--rp-tone);
  flex-shrink: 0;
}
.rp-link svg { width: 20px; height: 20px; flex-shrink: 0; }
.rp-link-line {
  width: 16px; height: 2px; border-radius: 2px;
  background: currentColor; opacity: .45;
}

/* ── the honest label, styled like the STAND-IN tags elsewhere ───── */
.rp-standin {
  display: inline-block;
  margin-top: 14px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px; font-weight: 700;
  letter-spacing: 1.2px; text-transform: uppercase;
  padding: 5px 11px; border-radius: 5px;
  color: var(--warn);
  background: color-mix(in srgb, var(--warn) 12%, transparent);
}

/* ── score + model line ─────────────────────────────────────────── */
.rp-meta {
  display: flex; align-items: flex-end;
  flex-wrap: wrap; gap: 14px 24px;
  margin-top: 22px; padding-top: 20px;
  border-top: 1px solid var(--border);
}
.rp-score-lbl {
  font-size: 9.5px; letter-spacing: 1.2px; text-transform: uppercase;
  font-weight: 700; color: var(--text-3); margin-bottom: 8px;
}
.rp-score-row { display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap; }
.rp-score {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 34px; letter-spacing: -1.5px;
  line-height: 1; color: var(--accent);
}
.rp-den { font-family: 'Space Grotesk', sans-serif; font-size: 13px; color: var(--text-3); }
.rp-model {
  flex: 1 1 240px;
  font-size: 13px; line-height: 1.65; color: var(--text-2);
}
.rp-model b { color: var(--text); font-weight: 700; }

.rp-note {
  margin-top: 16px;
  font-size: 12.5px; line-height: 1.7; color: var(--text-3);
}
.rp-actions {
  display: flex; justify-content: flex-end;
  margin-top: 20px;
}

@media (max-width: 560px) {
  .rp-panel { padding: 20px 18px 18px; border-radius: 14px; }
  .rp-stage {
    grid-template-columns: 1fr;
    gap: 16px; padding: 20px 14px;
  }
  .rp-link { transform: rotate(90deg); justify-self: center; }
  .rp-title { font-size: 19px; }
  .rp-meta { gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .rp-panel { animation: none; }
}

/* ══════════════════════════════════════════════════════════════════
   MARIA — guided actor helper (floating widget)
   Token-only: every colour, radius and font here already exists in the
   design system, so light/dark and the card treatment come for free.
   Sits bottom-right; the toast is bottom-centre, so they never collide.
   ══════════════════════════════════════════════════════════════════ */
.maria {
  position: fixed;
  right: 24px; bottom: 24px;
  z-index: 45;                     /* under the toast (50), over the page */
  display: flex; flex-direction: column;
  align-items: flex-end; gap: 12px;
}

/* ── first-load introduction card ───────────────────────────────────
   Bigger sibling of the pill, same tokens/radius/shadow. The pill is the
   CSS default state; .is-intro swaps to the card, and .is-collapsing keeps
   the card mounted just long enough to shrink away. */
.maria-intro {
  display: none;
  width: 260px;
  padding: 0;
  border: none; background: none;
  cursor: pointer;
  text-align: left;
  font-family: 'Inter', sans-serif;
}
.maria.is-intro .maria-intro,
.maria.is-collapsing .maria-intro { display: block; }

.maria.is-intro .maria-intro {
  animation: mariaIntroIn .42s cubic-bezier(.16, .84, .44, 1) both;
}
.maria.is-collapsing .maria-intro {
  animation: mariaIntroOut .3s cubic-bezier(.4, 0, 1, 1) both;
  pointer-events: none;
}
@keyframes mariaIntroIn {
  from { opacity: 0; transform: translateY(24px) scale(.95); }
  to   { opacity: 1; transform: none; }
}
/* shrink toward the pill's corner as it goes */
@keyframes mariaIntroOut {
  from { opacity: 1; transform: none; }
  to   { opacity: 0; transform: translateY(14px) scale(.72); }
}

.maria-bubble {
  display: block;
  padding: 13px 15px;
  border-radius: 16px 16px 16px 4px;
  border: 1px solid var(--border-hl);
  background: var(--surface);
  box-shadow: 0 14px 36px var(--shadow-c);
  font-size: 13.5px; line-height: 1.5; font-weight: 500;
  color: var(--text);
}
.maria-intro-avatar {
  display: block; margin: 10px 0 0 auto;
  width: 76px; height: 76px; border-radius: 50%;
  overflow: hidden;
  background: var(--surface-2);
  border: 2px solid var(--accent);
  box-shadow: 0 12px 30px var(--shadow-c);
}
.maria-intro-avatar img {
  width: 100%; height: 100%; display: block;
  object-fit: cover;
  object-position: 32% center;
}
.maria-intro:hover .maria-bubble { border-color: var(--accent); }
.maria-intro:focus-visible { outline: none; }
.maria-intro:focus-visible .maria-bubble { box-shadow: 0 0 0 3px var(--accent-glow); }

/* the pill yields to the card while the intro is on screen */
.maria.is-intro .maria-fab,
.maria.is-collapsing .maria-fab {
  opacity: 0;
  transform: scale(.85);
  pointer-events: none;
}

/* ── trigger ────────────────────────────────────────────────────── */
.maria-fab {
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 20px 7px 7px;
  border-radius: 100px;
  border: 1px solid var(--border-hl);
  background: var(--surface);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-weight: 600; font-size: 13px;
  cursor: pointer;
  box-shadow: 0 10px 30px var(--shadow-c);
  transition: transform .3s cubic-bezier(.16,.84,.44,1), opacity .3s ease,
              box-shadow .2s, border-color .2s, color .2s;
}
/* idle "breathing" glow — a separate layer so the button itself never
   moves, and the accent only ever appears at low opacity */
.maria-fab::before {
  content: '';
  position: absolute; inset: -3px;
  border-radius: 100px;
  background: var(--accent);
  opacity: .10;
  z-index: -1;
  animation: mariaBreathe 3.6s ease-in-out infinite;
}
@keyframes mariaBreathe {
  0%, 100% { transform: scale(1);    opacity: .08; }
  50%      { transform: scale(1.03); opacity: .16; }
}

/* 44px to match .lib-avatar in the actor library */
.maria-fab-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  overflow: hidden; flex-shrink: 0; display: block;
  background: var(--surface-2);
}
.maria-fab-avatar img {
  width: 100%; height: 100%; display: block;
  object-fit: cover;
  /* 239x180 landscape source: the face sits at ~42% across, so shift the
     cover window left of centre to bring it into the middle of the circle
     while keeping the waving hand in frame */
  object-position: 32% center;
  transform-origin: 50% 85%;
}
/* one-time hello, timed to when the pill is actually visible — during the
   intro the selector does not match, so it starts as the pill arrives */
.maria:not(.is-intro):not(.is-collapsing) .maria-fab-avatar img {
  animation: mariaWave 1.4s ease-in-out .5s 1 both;
}
@keyframes mariaWave {
  0%              { transform: rotate(0deg); }
  15%             { transform: rotate(-8deg); }
  30%             { transform: rotate(8deg); }
  45%             { transform: rotate(-6deg); }
  60%             { transform: rotate(6deg); }
  75%             { transform: rotate(-3deg); }
  90%, 100%       { transform: rotate(0deg); }
}
.maria-fab-label { white-space: nowrap; }
.maria-fab:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 14px 34px var(--shadow-c-strong);
}
.maria-fab:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-glow); }

/* ── panel ──────────────────────────────────────────────────────── */
.maria-panel {
  width: min(340px, calc(100vw - 40px));
  max-height: min(560px, calc(100vh - 130px));
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border-hl);
  border-radius: 16px;
  box-shadow: 0 26px 64px var(--shadow-c-strong);
  padding: 18px;
  /* same easing + duration as the render-preview modal (rpIn) */
  animation: mariaIn .28s cubic-bezier(.4, 0, .2, 1) both;
}
.maria-panel[hidden] { display: none; }
@keyframes mariaIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.maria-head { position: relative; display: flex; align-items: center; gap: 13px; }
.maria-avatar {
  width: 68px; height: 68px; border-radius: 50%;
  flex-shrink: 0; overflow: hidden;
  background: var(--surface-2);
  /* same accent used by .actor-card.sel and other active states */
  border: 2px solid var(--accent);
  /* one-time arrival each time the panel opens, with a slight overshoot */
  animation: mariaArrive .4s cubic-bezier(.34, 1.56, .64, 1) both;
}
.maria-avatar img {
  width: 100%; height: 100%; display: block;
  object-fit: cover;
  object-position: 32% center;
}
@keyframes mariaArrive {
  from { transform: scale(.9); opacity: 0; }
  to   { transform: scale(1);  opacity: 1; }
}
.maria-id { min-width: 0; }
.maria-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 15px; letter-spacing: -.2px;
}
.maria-role { font-size: 11px; color: var(--text-3); margin-top: 1px; }
.maria-x {
  margin-left: auto; flex-shrink: 0;
  width: 28px; height: 28px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; cursor: pointer;
  border: 1px solid var(--line-2);
  color: var(--text-3);
  transition: color .2s, border-color .2s, background .2s;
}
.maria-x:hover { color: var(--text); border-color: var(--border-hl); background: var(--fill-subtle); }
.maria-x svg { width: 13px; height: 13px; }

/* the honesty note, same spirit as the stand-in labels on the page —
   still shown in full, now behind the (i) beside Maria's name */
.maria-info-wrap { display: inline-flex; vertical-align: middle; }
.maria-info {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; padding: 0; margin-left: 6px;
  border: none; background: none; cursor: pointer;
  color: var(--text-3);
  transition: color .2s;
}
.maria-info svg { width: 14px; height: 14px; display: block; }
.maria-info:hover, .maria-info[aria-expanded="true"] { color: var(--accent); }
.maria-info:focus-visible {
  outline: none; border-radius: 50%;
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.maria-tip {
  /* spans the header, so it always sits inside the panel */
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  z-index: 2;
  padding: 9px 11px;
  border: 1px solid var(--border-hl);
  border-radius: 9px;
  background: var(--surface-2);
  box-shadow: 0 10px 26px var(--shadow-c);
  font-family: 'Inter', sans-serif;
  font-size: 10.5px; line-height: 1.55; font-weight: 400;
  letter-spacing: 0;
  color: var(--text-2);
  opacity: 0; visibility: hidden;
  transform: translateY(-3px);
  transition: opacity .18s ease, visibility .18s, transform .18s ease;
}
.maria-info:hover + .maria-tip,
.maria-info:focus-visible + .maria-tip,
.maria-info[aria-expanded="true"] + .maria-tip {
  opacity: 1; visibility: visible; transform: none;
}

/* ── conversation ───────────────────────────────────────────────── */
.maria-body { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.maria-msg {
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 13px; line-height: 1.6;
  color: var(--text-2);
}
.maria-msg b { color: var(--text); font-weight: 700; }
.maria-msg--you {
  align-self: flex-end;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-color: var(--border-hl);
  color: var(--text);
  font-weight: 600;
}
.maria-conf { margin-top: 9px; }

.maria-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.maria-chip {
  font-size: 12px; padding: 7px 13px;
  border-radius: 100px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all .2s ease;
}
.maria-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.maria-chip:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-glow); }

.maria-actions {
  display: flex; flex-direction: column; align-items: stretch; gap: 9px;
  margin-top: 2px;
}
.maria-actions .btn-sm { justify-content: center; text-align: center; }
.maria-again {
  background: none; border: none; cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 11.5px; color: var(--text-3);
  text-decoration: underline; text-underline-offset: 3px;
  transition: color .2s;
}
.maria-again:hover { color: var(--accent); }

@media (max-width: 560px) {
  .maria { right: 14px; bottom: 14px; }
  .maria-fab-label { display: none; }        /* avatar-only on small screens */
  .maria-fab { padding: 7px; }
  .maria-intro { width: min(240px, calc(100vw - 40px)); }
  .maria-intro-avatar { width: 64px; height: 64px; }
  /* tip spans the header, so it needs no width override on small screens */
}

@media (prefers-reduced-motion: reduce) {
  .maria-panel,
  .maria-fab::before,
  .maria:not(.is-intro):not(.is-collapsing) .maria-fab-avatar img,
  .maria-intro,
  .maria.is-intro .maria-intro,
  .maria.is-collapsing .maria-intro,
  .maria-avatar { animation: none; }
  /* the intro sequence is skipped in JS as well; belt and braces */
  .maria-intro { display: none !important; }
  .maria.is-intro .maria-fab,
  .maria.is-collapsing .maria-fab { opacity: 1; transform: none; pointer-events: auto; }
  .maria-fab { transition: none; }
  .maria-tip { transition: none; }
  .maria-fab::before { transform: none; opacity: .10; }
  .maria-fab-avatar img { transform: none; }
  .maria-avatar { transform: none; opacity: 1; }
  .maria-fab:hover { transform: none; }
}

/* ══════════════════════════════════════════════════════════════════
   CONFIDENCE SHRINKAGE SPARKLINE (result panel, step 3)
   Matches the .evidence card treatment so it reads as part of the panel.
   Token-only: no new colours.
   ══════════════════════════════════════════════════════════════════ */
.cc {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
}
.cc[hidden] { display: none; }
.cc-row { display: flex; align-items: center; gap: 14px; }
.cc-svg { width: 130px; height: 38px; flex-shrink: 0; overflow: visible; }
.cc-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cc-dots circle { fill: var(--accent); opacity: .45; }
.cc-end { fill: var(--accent); }
.cc-legend { min-width: 0; }
.cc-ends {
  display: flex; align-items: baseline; gap: 5px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 15px;
  color: var(--text-3);
  letter-spacing: -.3px;
}
.cc-arrow { color: var(--text-3); font-weight: 400; }
.cc-now { color: var(--accent); }
.cc-sub {
  font-size: 10px; color: var(--text-3);
  margin-top: 3px; letter-spacing: .2px;
}
.cc-cap {
  margin-top: 10px;
  font-size: 11px; line-height: 1.6;
  color: var(--text-3);
}

/* ══════════════════════════════════════════════════════════════════
   COMPETITORS PAGE (competitors.html only)
   Everything here is .compare- prefixed so it cannot reach the main
   page. Colours, radii and spacing all resolve through existing tokens.
   ══════════════════════════════════════════════════════════════════ */
.compare-hero { margin-top: 56px; }
.compare-h1 { font-size: clamp(28px, 3.4vw, 40px); }

/* horizontal scroll only where the table genuinely needs it */
.compare-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.compare-scroll:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-glow); }

.compare-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  font-size: 12.5px;
  line-height: 1.6;
}
.compare-caption {
  caption-side: bottom;
  padding: 12px 18px 14px;
  text-align: left;
  font-size: 11px;
  color: var(--text-3);
}
.compare-table th,
.compare-table td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}
.compare-table thead th {
  font-size: 9.5px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-3);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border-hl);
  white-space: nowrap;
}
.compare-table tbody th { font-weight: 400; }
.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td { border-bottom: none; }
.compare-table td { color: var(--text-2); }

.compare-name {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 14px;
  color: var(--text);
  letter-spacing: -.2px;
}
.compare-note {
  display: block;
  font-size: 10.5px; color: var(--text-3);
  margin-top: 3px;
}

/* the row for the platform this prototype targets */
.compare-row--us { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.compare-row--us td, .compare-row--us th { border-bottom-color: var(--border-hl); }
.compare-tick {
  display: inline-block;
  margin-top: 5px;
  font-size: 9.5px; font-weight: 700;
  letter-spacing: .8px; text-transform: uppercase;
  padding: 3px 8px; border-radius: 4px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.compare-yes, .compare-no { white-space: nowrap; font-size: 17px; font-weight: 700; }
/* "Not publicly confirmed" is a gap in what the research could find, not a
   confirmed absence — muted, deliberately not marked as harshly as a cross. */
/* needs the td qualifier: .compare-table td already sets colour at (0,1,1),
   so a bare class at (0,1,0) loses and the cell renders like any other. */
.compare-table td.compare-unknown { color: var(--text-3); font-style: italic; }
.compare-yes { color: var(--accent); }
.compare-no  { color: var(--text-3); opacity: .7; }
.compare-yes-label {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 9.5px; font-weight: 700;
  letter-spacing: .8px; text-transform: uppercase;
  color: var(--accent);
  margin-top: 4px;
}

.compare-foot {
  margin-top: 18px;
  max-width: 780px;
  font-size: 13px; line-height: 1.7;
  color: var(--text-2);
}
.compare-foot b { color: var(--text); font-weight: 700; }

.compare-grid { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }

/* two cards stretched across the full grid run ~83 characters a line; capping
   the measure keeps them readable. Scoped to the behind section only. */
.compare-behind {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 900px;
}
@media (max-width: 700px) { .compare-behind { grid-template-columns: 1fr; } }

.compare-gap { padding: 24px 26px; }
.compare-p {
  font-size: 14px; line-height: 1.75;
  color: var(--text-2);
}
.compare-p + .compare-p { margin-top: 16px; }
.compare-p b { color: var(--text); font-weight: 700; }
.compare-p em { color: var(--text); font-style: italic; }

.compare-back {
  display: inline-block;
  margin-top: 10px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.compare-back:hover { text-decoration: underline; text-underline-offset: 3px; }

/* visually hidden, still announced by screen readers */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

@media (max-width: 700px) {
  .compare-gap { padding: 18px 16px; }
  .compare-p { font-size: 13.5px; }
}


/* ══════════════════════════════════════════════════════════════════
   TOAST
   ══════════════════════════════════════════════════════════════════ */
.toast {
  position: fixed; bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--accent-fill); color: var(--on-accent);
  padding: 11px 22px; border-radius: 100px;
  font-size: 13px; font-weight: 600;
  opacity: 0; pointer-events: none;
  z-index: 50;
  box-shadow: 0 6px 24px rgba(74,222,128,.25);
  transition: opacity .3s, transform .3s cubic-bezier(.4,0,.2,1);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ══════════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════════ */
footer {
  margin: 56px auto 0;
  padding: 28px 0;
  text-align: center;
  color: var(--text-2);
  font-size: 13px;
  letter-spacing: .1px;
  border-top: 1px solid var(--border);
  line-height: 1.7;
}

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE
   Below 900px everything reverts to the original single-column,
   stacked, mobile-friendly behaviour. Above it, the hero goes wide.
   ══════════════════════════════════════════════════════════════════ */
@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
    gap: 56px;
    padding: 12px 0 24px;
  }
  .hero-visual { display: block; }
  .hero-copy   { max-width: 620px; }
}

/* Nav links collapse before the hero does — the CTA + chip stay. */
@media (max-width: 1080px) {
  .site-nav { gap: 20px; }
  .brand-name span { display: none; }
}
@media (max-width: 900px) {
  .site-nav { display: none; }
  .header-inner { padding: 12px 24px; }
  .wrap { padding: 0 24px; }
  .site-header { margin-bottom: 40px; }
}
@media (max-width: 720px) {
  .header-actions .btn-sm { display: none; }
}
@media (max-width: 600px) {
  .wrap  { padding: 0 14px; }
  .header-inner { padding: 11px 14px; gap: 12px; }
  .site-header { margin-bottom: 32px; }
  .brand-mark { width: 34px; height: 34px; border-radius: 9px; font-size: 12.5px; }
  .brand-name { font-size: 16px; }
  .badge { font-size: 9px; letter-spacing: 1.1px; padding: 5px 11px 5px 9px; }
  h1     { font-size: clamp(28px, 7vw, 40px); }
  .panel { padding: 22px 18px; border-radius: 14px; }
  .fly-stats { flex-direction: column; }
  .result-grid { gap: 16px; }
  /* full-width stacked CTAs read better than two cramped half-buttons */
  .hero-cta .btn { flex: 1 1 100%; justify-content: center; }
}
@media (max-width: 430px) {
  /* keep the status chip — it is the point of the header at this size */
  .badge { font-size: 8.5px; letter-spacing: .7px; padding: 5px 9px 5px 8px; gap: 5px; }
  .brand-mark { width: 30px; height: 30px; border-radius: 8px; font-size: 11.5px; }
  .brand-name { font-size: 15px; }
  .header-inner { gap: 10px; }
}

/* Very small phones: the step rail and status chip both need to give way. */
@media (max-width: 380px) {
  .badge { display: none; }
  .dot { width: 24px; height: 24px; font-size: 10px; }
  .step-pt { gap: 7px; }
  .step-label { font-size: 10.5px; }
  .rail-line { margin: 0 6px; min-width: 8px; }
  .rail { margin: 32px 0 26px; }
}

/* Respect reduced-motion for the decorative hero + chip animation. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .model-track { animation: none; transform: none; }
  .badge-dot { animation: none; }
  .hv-stage:hover .hv-card { transform: var(--rest); }
}

/* ── Scrollbar ─────────────────────────────────────────────────── */
::-webkit-scrollbar       { width: 6px; }
::-webkit-scrollbar-track  { background: var(--bg); }
::-webkit-scrollbar-thumb  { background: var(--accent-dim); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── Selection ─────────────────────────────────────────────────── */
::selection { background: rgba(74,222,128,.20); color: var(--text); }
