/*
 * nab.gg theme — Vercel design language, dark-only at launch.
 * Tokens first; everything else consumes tokens. No raw hex in feature views.
 */

/* ---------- Fonts (self-hosted, variable) ---------- */
@font-face {
  font-family: "Geist";
  src: url("/assets/geist-sans-var-90ac0fe7.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/assets/geist-mono-var-a272a922.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
  --bg: #000000;
  --bg-elevated: #0a0a0a;
  --bg-card: #111111;
  --bg-hover: #1a1a1a;
  --border: #262626;
  --border-strong: #333333;
  --fg: #ededed;
  --fg-secondary: #a1a1a1;
  --fg-muted: #8f8f8f; /* ≥4.5:1 on #000 — .subtle carries trust/legal copy (WCAG AA) */
  --accent: #ffffff;            /* primary CTAs are white pills, per Vercel */
  --accent-fg: #000000;
  --link: #52a8ff;
  --success: #0ac97f;
  --success-dim: rgba(10, 201, 127, 0.12);
  --warning: #f5a623;
  --warning-dim: rgba(245, 166, 35, 0.12);
  --danger: #f4433c;
  --danger-dim: rgba(244, 67, 60, 0.12);
  --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 8px;
  --radius-pill: 9999px;
  --maxw: 1080px;
  --focus-ring: 0 0 0 2px var(--bg), 0 0 0 4px #52a8ff;

  /* Motion — entrances ease out, on-screen movement eases both ways.
     --t-reveal is the LOCKED card-pop ceiling (docs/incidents/2026-07-16);
     --t-ceremony is the Justin-authorized total-reveal ceiling (evidence-
     calibrated: Nielsen 1s flow limit, interruptible via reveal-stagger). */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-pop: cubic-bezier(0.34, 1.2, 0.64, 1);
  --t-fast: 120ms;
  --t-med: 200ms;
  --t-entrance: 400ms;
  --t-reveal: 450ms;
  --t-ceremony: 800ms;

  /* Material — 1px inset top highlight + layered ambient shadows */
  --highlight: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.55), 0 30px 70px rgba(0, 0, 0, 0.35);

  /* Spacing (8px base) */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px; --space-9: 96px;

  /* Type scale */
  --text-xs: 0.75rem;
  --text-sm: 0.85rem;
  --text-base: 1rem;
  --text-lg: 1.15rem;
  --text-xl: 1.4rem;
  --text-title: clamp(1.7rem, 3.5vw, 2.1rem);
  --text-price: clamp(1.6rem, 4vw, 2.4rem);
  --text-hero: clamp(2.4rem, 7vw, 4.2rem);

  /* Aurora / accent — single swap point for accent intensity (holo-noir).
     Desaturated indigo/teal/violet echoing --link and the holo-foil sheen. */
  --aurora-1: rgba(82, 168, 255, 0.09);
  --aurora-2: rgba(94, 234, 212, 0.05);
  --aurora-3: rgba(139, 92, 246, 0.05);
  --accent-ring: rgba(82, 168, 255, 0.3);
  --hairline-hi: rgba(255, 255, 255, 0.14);
  --hairline-lo: rgba(255, 255, 255, 0.02);
  --grid-dot: rgba(255, 255, 255, 0.035);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; width: 100%; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5em; font-weight: 600; }
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); letter-spacing: -0.04em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); text-wrap: balance; }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1em; }
code, .mono { font-family: var(--font-mono); font-size: 0.9em; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 760px; }
.container-tight { max-width: 640px; }
.container-form { max-width: 460px; }
.page-title { font-size: var(--text-title); }
.price {
  font-family: var(--font-mono);
  font-size: var(--text-price);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.price-sm { font-size: 1.6rem; }
.price-currency { font-size: 0.45em; color: var(--fg-muted); font-weight: 400; }
.lede-narrow { max-width: 620px; }
.text-sm { font-size: var(--text-sm); }
.text-xs { font-size: var(--text-xs); }
.prose-body { white-space: pre-wrap; color: var(--fg-secondary); }
.w-full { width: 100%; }
.skip-link {
  position: absolute; left: -9999px; top: 12px; z-index: 200;
}
.skip-link:focus {
  left: 12px;
  background: var(--accent); color: var(--accent-fg);
  border-radius: var(--radius-pill); padding: 10px 22px;
  text-decoration: none;
}
main:focus { outline: none; box-shadow: none; }
.muted { color: var(--fg-secondary); }
.subtle { color: var(--fg-muted); }
.overline {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--fg-secondary);
}
/* Homepage overlines: quieter tracking, faint cool tint (aurora accent) */
.home-canvas .overline {
  letter-spacing: 0.12em;
  color: color-mix(in srgb, var(--link) 28%, var(--fg-secondary));
}

/* ---------- Buttons (pills) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--radius-pill);
  padding: 10px 22px;
  font: 500 0.95rem/1 var(--font-sans);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out),
              border-color var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out),
              box-shadow var(--t-fast) var(--ease-out);
  text-decoration: none !important;
}
.btn-primary:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: var(--accent-fg); }
.btn-primary:hover { background: #cccccc; box-shadow: 0 0 24px -8px rgba(255, 255, 255, 0.35); }
.btn-secondary { background: transparent; color: var(--fg); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--fg-secondary); background: var(--bg-hover); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger-dim); }
.btn-lg { padding: 14px 30px; font-size: 1.05rem; }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }

/* Sign in with Google — Google dark-theme brand spec (fill #131314, 1px
   stroke #8E918F, text #E3E3E3; multicolor G on a white tile). Pill shape is
   a Google-approved variant, so the geometry matches our .btn. */
.btn-google { background: #131314; color: #e3e3e3; border-color: #8e918f; }
.btn-google:hover { background: #1e1f20; border-color: #c4c7c5; box-shadow: 0 0 24px -10px rgba(255, 255, 255, 0.25); }
.btn-google:active { transform: scale(0.98); }
.google-g {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; flex: none;
  background: #fff; border-radius: 50%;
}
.google-g svg { width: 13px; height: 13px; display: block; }

/* Divider with a centred label ("or") between the OAuth button and the form. */
.divider-labeled {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0;
  color: var(--fg-muted); font-size: 0.8rem; text-transform: lowercase;
}
.divider-labeled::before,
.divider-labeled::after { content: ""; flex: 1; border-top: 1px solid var(--border); }

/* ---------- Cards ---------- */
/* Gradient hairline border: card fill painted to padding-box, hairline
   gradient to border-box — the 1px border itself is transparent. */
.card {
  background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
              linear-gradient(180deg, var(--hairline-hi), var(--hairline-lo)) border-box;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--highlight), var(--shadow-sm);
  transition: background var(--t-med) var(--ease-out),
              box-shadow var(--t-med) var(--ease-out),
              transform var(--t-med) var(--ease-out);
}
.card h3 { margin-top: 0; }
.card-link { display: block; text-decoration: none !important; color: inherit; }
.card-link:hover {
  background: linear-gradient(var(--bg-hover), var(--bg-card)) padding-box,
              linear-gradient(180deg, var(--accent-ring), var(--hairline-lo)) border-box;
  transform: translateY(-2px);
  box-shadow: var(--highlight), var(--shadow-md), 0 0 44px -14px var(--accent-ring);
}
.card-media {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: 8px; margin-bottom: 10px;
  border: 1px solid var(--border);
}
.card-form { max-width: 560px; }
.checkbox-row-strong label { color: var(--fg); font-size: 1rem; }
/* Vault: whole card reflects its checkbox's selection — pure CSS, degrades
   silently. Border is painted via the border-box gradient (the physical
   border is transparent), so selection repaints that gradient, not border-color. */
.card:has(> .checkbox-row input[type="checkbox"]:checked) {
  background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
              linear-gradient(var(--fg-secondary), var(--fg-secondary)) border-box;
  box-shadow: var(--highlight), var(--shadow-md);
}

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: var(--radius-pill);
  padding: 3px 12px;
  font: 500 0.75rem/1.6 var(--font-mono);
  letter-spacing: 0.04em;
  border: 1px solid var(--border-strong);
  color: var(--fg-secondary);
}
.badge-success { color: var(--success); border-color: var(--success); background: var(--success-dim); }
.badge-warning { color: var(--warning); border-color: var(--warning); background: var(--warning-dim); }
.badge-danger  { color: var(--danger);  border-color: var(--danger);  background: var(--danger-dim); }

/* ---------- Top nav ---------- */
/* Glass bar tuned for the dark canvas: high opacity so the blurred aurora
   can't bleed through as a grey haze (the "washed out" bug), moderate
   saturation. -webkit- prefix required for Safari. */
.topnav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(5, 5, 5, 0.85);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.topnav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 28px; height: 64px;
}
.brand {
  font: 600 1.15rem/1 var(--font-sans);
  letter-spacing: -0.03em;
  color: var(--fg) !important;
  text-decoration: none !important;
  display: inline-flex; align-items: center; gap: 10px;
}
.brand .brand-dot {
  width: 22px; height: 22px; border-radius: 6px;
  background: linear-gradient(135deg, #ffffff 0%, #b7d4ff 55%, #7ee8d4 100%);
  box-shadow: 0 0 12px rgba(82, 168, 255, 0.35);
}
.topnav-links { display: flex; gap: 20px; align-items: center; }
/* :not(.btn) is load-bearing: the bare `a` selector out-specifies
   .btn-primary (0,1,1 > 0,1,0), which used to paint the Sign up pill's
   text grey (and near-white ON white at hover) and override its btn-sm
   font size — the "washed up" signup button. Pills style themselves. */
.topnav-links a:not(.btn) {
  color: color-mix(in srgb, var(--fg) 30%, var(--fg-secondary));
  font-size: 0.92rem;
  transition: color var(--t-fast) var(--ease-out);
}
.topnav-links a:not(.btn):hover { color: var(--fg); text-decoration: none; }
.topnav-links a[aria-current="page"] { color: var(--fg); }
.topnav-spacer { flex: 1; }
/* Phone widths: 7+ nav items (signed in, worse in French) overflow a fixed
   64px single row — let the nav wrap instead. */
@media (max-width: 720px) {
  .topnav-inner { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 8px 16px; }
  .topnav-links { gap: 14px; }
}

/* ---------- Footer ---------- */
.footer {
  border-top: 0;
  background: linear-gradient(90deg, transparent, var(--border) 20% 80%, transparent) top / 100% 1px no-repeat;
  padding: 40px 0;
  margin-top: 80px;
  color: var(--fg-muted);
  font-size: 0.85rem;
}
.footer-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
  display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between;
}
.footer a { color: var(--fg-secondary); }

/* ---------- Flash / toasts ---------- */
/* pointer-events: the wrap is a fixed overlay — it must never block clicks on
   content beneath it (a persisting alert used to). Flashes re-enable their own. */
.flash-wrap { position: fixed; top: 76px; left: 50%; transform: translateX(-50%); z-index: 100; width: min(560px, calc(100vw - 32px)); pointer-events: none; }
.flash {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  padding: 12px 18px;
  margin-bottom: 10px;
  font-size: 0.92rem;
  box-shadow: var(--highlight), var(--shadow-md);
  pointer-events: auto;
  animation: flash-in var(--t-med) var(--ease-out);
}
@keyframes flash-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}
.flash-notice { border-color: var(--success); }
.flash-alert  { border-color: var(--danger); }
.flash-close {
  background: none; border: none; padding: 0 2px; cursor: pointer;
  color: var(--fg-secondary); font-size: 1.1rem; line-height: 1.4;
}
.flash-close:hover { color: var(--fg); }

/* ---------- Forms ---------- */
label { display: block; font-size: 0.88rem; color: var(--fg-secondary); margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="date"], select, textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--fg);
  font: 400 16px/1.4 var(--font-sans); /* 16px floor: no iOS zoom */
  padding: 10px 12px;
  margin-bottom: 16px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: #555; box-shadow: var(--focus-ring); }
.field-error { color: var(--danger); font-size: 0.82rem; margin: -10px 0 14px; }
.form-errors {
  border: 1px solid var(--danger); background: var(--danger-dim);
  border-radius: var(--radius); padding: 12px 16px; margin-bottom: 20px; font-size: 0.9rem;
}
/* Hint text tucked under a field (-10px counteracts the input's 16px margin) */
.field-hint { font-size: 0.8rem; margin-top: -10px; }
.checkbox-row { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; }
.checkbox-row input[type="checkbox"] { width: auto; margin: 4px 0 0; }
.checkbox-row label { margin: 0; color: var(--fg-secondary); font-size: 0.85rem; }

/* ---------- Home canvas (homepage-scoped aurora field) ---------- */
/* Body stays #000 sitewide; the aurora concentrates at the top of the
   homepage and fades to black — depth without touching any other page. */
.home-canvas {
  background:
    radial-gradient(1100px 620px at 50% -80px, var(--aurora-1), transparent 62%),
    radial-gradient(900px 540px at 78% 60px, var(--aurora-2), transparent 60%),
    radial-gradient(820px 520px at 22% 140px, var(--aurora-3), transparent 60%);
}

/* ---------- Hero (landing) ---------- */
/* 3-column grid: packs live in their own side tracks, so they can NEVER
   collide with the copy column at any viewport width (the pre-grid absolute
   layout overlapped the lede at 1200-1440px). */
.hero {
  position: relative; text-align: center; padding: 120px 24px 100px;
  overflow: hidden; isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(auto, 660px) minmax(0, 1fr);
  column-gap: 32px;
  align-items: center;
}
.hero > * { grid-column: 2; }
/* Dot grid, radially masked so it fades before the section edges */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1.5px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 32%, #000 25%, transparent 74%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 32%, #000 25%, transparent 74%);
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}
/* closest-side ellipses ONLY: each gradient must reach full transparency
   INSIDE the box, or the box edge prints as a hard vertical line over the
   dark canvas (the 2026-07-17 "black line" bug — farthest-corner ellipses
   with a 65% stop were still half-opaque at the edge). */
.hero-glow {
  position: absolute; left: 50%; top: 34%;
  width: 1080px; height: 700px; transform: translate(-50%, -50%);
  background:
    radial-gradient(closest-side at 50% 45%, rgba(255, 255, 255, 0.1), transparent),
    radial-gradient(closest-side at 38% 60%, var(--aurora-1), transparent),
    radial-gradient(closest-side at 64% 55%, var(--aurora-2), transparent);
  pointer-events: none;
}
/* Hero backdrop: generic trading-card silhouettes, dim + static. House IP
   rule: never character artwork/mascots (copyrighted expression + implied
   affiliation) — TCG is conveyed by card geometry and a faint foil sheen. */
/* Boxless wrapper: children become grid items directly. pointer-events
   INHERITS through it; z-index/animation can't live here (no box) — they
   sit on .hero-card below. */
.hero-cards { display: contents; pointer-events: none; }
/* z-index -1 (inside .hero's isolated stacking context): the packs are a
   BACKDROP — positioned grid items would otherwise paint over the copy.
   Rotation uses the independent `rotate:` property so the entrance
   animation's translate/opacity can never override or erase it. */
.hero-card {
  position: relative; z-index: -1;
  width: min(150px, 100%); aspect-ratio: 5 / 7;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: linear-gradient(160deg, var(--bg-card), var(--bg-elevated));
  box-shadow: var(--highlight), var(--shadow-md);
  animation: hero-cards-in var(--t-entrance) var(--ease-out) both;
}
/* Side tracks, spanning the 5 copy rows (overline/h1/lede/ctas/trust),
   tucked against the copy column with a staggered vertical offset. */
.hero-card-1 { grid-column: 1; grid-row: 1 / 6; justify-self: end; margin-top: 12px; rotate: -6deg; }
.hero-card-2 { grid-column: 3; grid-row: 1 / 6; justify-self: start; margin-top: -12px; rotate: 6deg; }
/* Photo slot: the frame disappears — a transparent pack render, grounded by
   shadows, kept BEHIND the headline (z-index -1 above), never louder than it. */
.hero-card--photo {
  border: none; background: none; box-shadow: none;
  /* Reserves the box before the image loads (CLS): 480x879 webp variant of
     the current 780x1429 pack sources. EQUAL widths: mirrored symmetric
     composition needs equal visual weight (unequal reads as a mistake). */
  aspect-ratio: 546 / 1000; width: min(225px, 100%);
}
/* Contact shadow grounds the pack (premium product-shot standard — floating
   or dissolving cutouts read cheap). closest-side: must reach transparent
   inside the box or its edge prints (the hero-glow seam lesson). */
.hero-card--photo::after {
  content: ""; position: absolute; left: 10%; right: 10%; bottom: -3.5%; height: 6%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.6), transparent);
  z-index: -1;
}
/* Pedestal glow behind each pack — ties it to the aurora field */
.hero-card--photo::before {
  content: ""; position: absolute; inset: -16% -30% -10%; z-index: -1;
  background: radial-gradient(ellipse 60% 45% at 50% 74%, var(--aurora-1), transparent 70%);
}
.hero-card-photo {
  width: 100%; height: auto; object-fit: contain; display: block;
  /* Cast shadows (tight + diffuse) pair with the ::after contact shadow */
  filter: saturate(1) brightness(0.96)
          drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5))
          drop-shadow(0 22px 44px rgba(0, 0, 0, 0.6));
}
/* Faint holographic-foil sheen (generic TCG cue) — blue/teal echoing --link/--success */
.hero-card-holo::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(120deg, transparent 30%, var(--aurora-1) 45%, var(--aurora-2) 55%, transparent 70%);
}
/* Below 1024px: packs off, hero back to flow — keeping the grid would give
   phones two empty 32px gutters and squeeze the copy column. */
@media (max-width: 1024px) {
  .hero { display: block; }
  .hero-cards { display: none; }
}

.hero h1 { margin-bottom: 18px; font-size: var(--text-hero); letter-spacing: -0.045em; text-wrap: balance; }
/* Copy column entrance — pure CSS (JS-off safe), settles by 560ms, all
   entrances disabled together under reduced motion below. */
.hero .overline, .hero h1, .hero .lede, .hero-ctas, .hero-trust {
  animation: hero-rise var(--t-entrance) var(--ease-out) both;
}
.hero h1 { animation-delay: 40ms; }
.hero .lede { animation-delay: 80ms; }
.hero-ctas { animation-delay: 120ms; }
.hero-trust { animation-delay: 160ms; }
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
/* translate/opacity ONLY — a `transform` keyframe here would override the
   cards' rotate at fill time and un-rotate them permanently. */
@keyframes hero-cards-in {
  from { opacity: 0; translate: 0 10px; }
  to { opacity: 1; translate: none; }
}
/* The promise subline renders as its own block at ~half scale — a long
   phrase can never overflow the viewport at any zoom level. */
.hero h1 .text-gradient {
  display: block;
  font-size: 0.52em;
  margin-top: 10px;
  letter-spacing: -0.02em;
}
.hero .lede { font-size: 1.2rem; color: color-mix(in srgb, var(--fg) 60%, var(--fg-secondary)); max-width: 620px; margin: 0 auto 34px; text-wrap: pretty; }
.hero-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
/* Static gradient headline — no motion, end stop ≥4.5:1 on #000; faint cool
   mid-stop is the holo cue. Coupled to allow_browser :modern (storefront lock). */
.text-gradient {
  background: linear-gradient(180deg, #ffffff 0%, #e4ecff 45%, var(--fg-muted) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* Trust strip under the hero CTAs — structural claims only, never social proof */
.hero-trust {
  list-style: none; margin: 22px 0 0; padding: 0;
  display: flex; gap: 8px 18px; justify-content: center; flex-wrap: wrap;
  font-family: var(--font-sans); font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--fg-muted);
}
.hero-trust li { display: flex; align-items: center; gap: 18px; }
.hero-trust li + li::before { content: "·"; color: var(--border-strong); }

/* ---------- How it works (landing) ---------- */
.step { text-align: center; padding: 0 12px; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, var(--bg-hover), var(--bg-card));
  font: 500 0.9rem/1 var(--font-mono);
  color: var(--fg);
  margin-bottom: 14px;
  box-shadow: var(--highlight), 0 0 24px var(--aurora-1);
}
/* Hairline connectors between steps — desktop only (grid collapses at 860px) */
@media (min-width: 861px) {
  .step { position: relative; }
  .step + .step::before {
    content: ""; position: absolute; top: 18px; left: -32px; width: 64px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
  }
}
.step h3 { margin-bottom: 0.35em; }
.step p { font-size: 0.95rem; }

/* Tier teaser cards — price-forward */
.card-tier { text-align: center; padding: 32px 24px; }
.card-tier .price { margin: 10px 0 14px; }
.card-tier.card-link:hover {
  box-shadow: var(--highlight), var(--shadow-md), 0 0 44px -14px var(--accent-ring),
              0 0 0 1px var(--accent-ring) inset;
}

/* Closing CTA band — glow panel */
.cta-band {
  position: relative; overflow: hidden;
  border-top: 1px solid var(--border);
  padding: 88px 24px;
  text-align: center;
}
.cta-band::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(720px 320px at 50% 118%, var(--aurora-1), transparent 70%),
              radial-gradient(560px 260px at 50% -30%, var(--aurora-2), transparent 70%);
}
.cta-band .container { position: relative; }
.cta-band .lede-narrow { margin: 0 auto 26px; }

/* ---------- Sections / grids ---------- */
.section { padding: 56px 0; }
.grid-3 { display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); }
.grid-2 { display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.data th {
  text-align: left; font: 500 0.72rem/1.4 var(--font-mono);
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--fg-muted); padding: 12px 16px; border-bottom: 1px solid var(--border);
}
table.data td { padding: 12px 16px; border-bottom: 1px solid var(--border); }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr { transition: background var(--t-fast) var(--ease-out); }
table.data tbody tr:hover { background: var(--bg-elevated); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Stacked card reflow for account tables on phones (opt-in via .data-stack).
   thead is display:none — the td::before data-labels replace the headers
   (generated content is exposed to the AX tree in evergreen browsers). */
@media (max-width: 640px) {
  .table-wrap:has(> table.data-stack) { border: none; border-radius: 0; overflow: visible; }
  table.data.data-stack, table.data.data-stack tbody { display: block; }
  table.data.data-stack thead { display: none; }
  table.data.data-stack tr {
    display: block;
    border: 1px solid var(--border); border-radius: 12px;
    padding: 4px 0;
    background: var(--bg-card);
  }
  table.data.data-stack tr + tr { margin-top: 12px; }
  table.data.data-stack tbody tr:hover { background: var(--bg-card); }
  table.data.data-stack td {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 8px 16px; border-bottom: none;
  }
  table.data.data-stack td[data-label]::before {
    content: attr(data-label);
    font: 500 var(--text-xs)/1.4 var(--font-mono);
    text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--fg-muted);
    flex-shrink: 0;
  }
  /* Action cell (no data-label): align its lone link with the value column */
  table.data.data-stack td:not([data-label]) { justify-content: flex-end; }
}

/* ---------- Odds bars ---------- */
.odds-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.odds-row:last-child { border-bottom: none; }
.odds-label { flex: 2; min-width: 0; }
.odds-thumb {
  width: 56px; height: 56px; object-fit: cover; flex-shrink: 0;
  border-radius: 6px; border: 1px solid var(--border);
}
.odds-bar { flex: 1; height: 6px; background: var(--bg-hover); border-radius: 3px; overflow: hidden; }
.odds-bar-fill { height: 100%; background: linear-gradient(90deg, #dddddd, #ffffff); border-radius: 3px; }
.odds-pct { font-family: var(--font-mono); font-size: 0.85rem; min-width: 64px; text-align: right; }

/* ---------- Verifier ---------- */
tr.walk-hit td { background: var(--bg-hover); }
tr.walk-hit td:first-child { box-shadow: inset 2px 0 0 var(--success); }

/* ---------- Reveal ---------- */
.reveal-stage { text-align: center; padding: 70px 24px; position: relative; }
.reveal-card {
  display: inline-block; position: relative;
  background: var(--bg-card); border: 1px solid var(--border-strong);
  border-radius: 16px; padding: 40px 48px; min-width: min(420px, 90vw);
  box-shadow: var(--highlight), var(--shadow-lg);
}
@keyframes reveal-pop {
  0% { transform: scale(0.92); opacity: 0; }
  60% { transform: scale(1.03); }
  100% { transform: scale(1); opacity: 1; }
}
.reveal-enter { animation: reveal-pop var(--t-reveal) var(--ease-pop); }
@keyframes pulse-glow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}
.reveal-waiting { animation: pulse-glow 1.6s ease-in-out infinite; }

/* The ceremony: card pops in 450ms (--t-reveal, LOCKED); children rise in a
   trailing stagger whose last step completes ≤ var(--t-ceremony) (800ms —
   Justin-authorized, evidence-calibrated: < Nielsen's 1s flow limit,
   interruptible below). Reduced motion: everything instant. */
.reveal-card h2 { margin-bottom: 6px; }
.reveal-stagger > * { animation: reveal-rise 300ms var(--ease-out) both; }
.reveal-stagger > *:nth-child(2) { animation-delay: 80ms; }
.reveal-stagger > *:nth-child(3) { animation-delay: 160ms; }
.reveal-stagger > *:nth-child(4) { animation-delay: 240ms; }
.reveal-stagger > *:nth-child(5) { animation-delay: 320ms; }
.reveal-stagger > *:nth-child(6) { animation-delay: 400ms; }
.reveal-stagger > *:nth-child(n+7) { animation-delay: 480ms; }
@keyframes reveal-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
/* Interruption: any click/keypress snaps the ceremony to its end state */
.reveal-finish, .reveal-finish > * { animation: none !important; opacity: 1; transform: none; }

.reveal-photo {
  width: min(300px, 70vw);
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  box-shadow: var(--highlight), var(--shadow-lg);
}

.reveal-dots { display: flex; gap: 6px; justify-content: center; margin-top: 18px; }
.reveal-dots span {
  width: 4px; height: 4px; border-radius: 50%; background: var(--fg-secondary);
  animation: pulse-glow 1.6s ease-in-out infinite;
}
.reveal-dots span:nth-child(2) { animation-delay: 0.25s; }
.reveal-dots span:nth-child(3) { animation-delay: 0.5s; }

.state-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 8px; vertical-align: middle;
}
.state-dot-warning { background: var(--warning); }
.state-dot-danger { background: var(--danger); }

/* ---------- Utility ---------- */
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-center { justify-content: center; }
.empty-state {
  text-align: center;
  padding: var(--space-8) var(--space-5);
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
}
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.divider { border: none; border-top: 1px solid var(--border); margin: 28px 0; }
.kbd {
  font-family: var(--font-mono); font-size: 0.78rem;
  background: var(--bg-elevated); border: 1px solid var(--border-strong);
  border-radius: 6px; padding: 2px 8px; word-break: break-all;
}
.kbd-block { display: block; padding: 10px 12px; overflow-wrap: anywhere; }

/* ---------- Scroll reveal (JS-armed; visible by default without JS) ---------- */
.sr-armed { opacity: 0; transform: translateY(16px); }
.sr-in {
  opacity: 1; transform: none;
  transition: opacity var(--t-entrance) var(--ease-out),
              transform var(--t-entrance) var(--ease-out);
}
.sr-in:nth-child(2) { transition-delay: 60ms; }
.sr-in:nth-child(3) { transition-delay: 120ms; }

/* ---------- View transitions (Turbo 8 cross-fade) ---------- */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: var(--t-med);
  animation-timing-function: var(--ease-in-out);
}

/* ---------- Reduced motion (WCAG 2.3.3) ---------- */
/* A11y override only — the default 0.45s reveal-pop stays per the
   "deliberately NOT changed" list in docs/incidents/2026-07-16-end-to-end-audit.md
   (ceremony calibration Justin-authorized 2026-07-16 — see that doc). */
@media (prefers-reduced-motion: reduce) {
  .reveal-enter { animation: none; }
  .reveal-waiting { animation: none; }
  .reveal-stagger > * { animation: none; }
  .reveal-dots span { animation: none; opacity: 1; }
  .flash { animation: none; }
  .btn, input, select, textarea { transition: none; }
  .btn-primary:active { transform: none; }
  .card, .card-link { transition: border-color var(--t-med) var(--ease-out); }
  .card-link:hover { transform: none; }
  table.data tbody tr { transition: none; }
  .sr-armed { opacity: 1; transform: none; }
  .hero-card { animation: none; }
  .hero .overline, .hero h1, .hero .lede, .hero-ctas, .hero-trust { animation: none; }
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) { animation: none !important; }
}

/* ---------- Admin analytics (Odds Lab) ---------- */
/* Verdict banner: icon + text carry the meaning; color reinforces (WCAG 1.4.1). */
.verdict { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 18px 22px; border-radius: var(--radius); border: 1px solid var(--border-strong); margin-top: 16px; }
.verdict-ok { background: var(--success-dim); border-color: var(--success); }
.verdict-bad { background: var(--danger-dim); border-color: var(--danger); }
.verdict-icon { font-family: var(--font-mono); font-weight: 700; font-size: 1.15rem; }
.verdict-ok .verdict-icon { color: var(--success); }
.verdict-bad .verdict-icon { color: var(--danger); }
.verdict-title { font-weight: 700; letter-spacing: 0.02em; }
.verdict-note { color: var(--fg-secondary); }

/* Uncertainty range bar: gray track, P5-P95 span, P50 marker, target tick. */
.range-track { position: relative; height: 10px; background: var(--bg-hover); border-radius: 5px; margin: 18px 0 6px; }
.range-fill { position: absolute; top: 0; height: 100%; background: linear-gradient(90deg, #555555, #dddddd); border-radius: 5px; }
.range-marker { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; background: #ffffff; border: 2px solid var(--bg-card); transform: translate(-50%, -50%); box-shadow: var(--shadow-sm); }
.range-tick { position: absolute; top: -5px; bottom: -5px; width: 2px; background: var(--warning); transform: translateX(-50%); border-radius: 1px; }
.range-scale { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--fg-muted); }

/* Advanced-options disclosure (details/summary). */
.adv { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elevated); margin-bottom: 16px; }
.adv > summary { cursor: pointer; padding: 12px 16px; font: 500 0.85rem/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-secondary); }
.adv > summary:hover { color: var(--fg); }
.adv[open] > summary { border-bottom: 1px solid var(--border); }
.adv-body { padding: 16px; }

/* Scrollable table with a header that stays put (opaque bg + inset shadow
   replace the collapsed border, which does not travel with sticky cells). */
.table-wrap--scroll { max-height: 60vh; overflow-y: auto; }
.table-wrap--scroll table.data th { position: sticky; top: 0; z-index: 2; background: var(--bg-card); border-bottom: none; box-shadow: inset 0 -1px 0 var(--border); }

/* Money/percent input adornments. */
.input-affix { display: flex; align-items: center; gap: 6px; background: var(--bg-elevated); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 0 12px; margin-bottom: 16px; }
.input-affix:focus-within { box-shadow: var(--focus-ring); }
.input-affix > span { font-family: var(--font-mono); color: var(--fg-muted); flex-shrink: 0; }
.input-affix > input { border: none; background: transparent; margin-bottom: 0; padding-left: 0; box-shadow: none; }
.input-affix > input:focus { outline: none; box-shadow: none; }

/* Odds Lab form grouping (scoped so global fieldset defaults stay untouched). */
.mix-form fieldset { border: none; padding: 0; margin: 0 0 var(--space-5) 0; min-width: 0; }
.mix-form legend { font: 500 0.85rem/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-secondary); margin-bottom: 12px; padding: 0; }
.mix-form .field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 20px; }

/* In-cell proportion bar (weight column). */
.cell-bar { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.cell-bar .odds-bar { flex: 1; }
.cell-bar .odds-pct { min-width: 76px; }
