/*
 * CommerceTrace — marketing site
 *
 * Design direction: "Two Ledgers".
 *
 * The page opens on the merchant's actual experience — two records of the same
 * sales that do not agree — rather than on a diagram of our architecture. The
 * ledger is the signature: hairline-ruled rows, strict tabular figures, and the
 * blank cells in the GA4 column carrying the visual weight. Absence is the
 * product's subject, so absence is what the hero renders.
 *
 * Colour is a status vocabulary, never decoration. Blue means signal/telemetry,
 * green healthy, amber suspected, red confirmed — the same meanings the product
 * itself uses in feednivo-app/public/index.html. A blue that also appeared as a
 * gradient or a glow behind a card would stop meaning anything.
 *
 * Every foreground/background pair here was contrast-checked before being used:
 * body text 16.4:1, muted 7.7:1, blue 6.0:1, green 8.2:1, amber 9.0:1, red 5.7:1.
 * All clear WCAG AA; most clear AAA.
 */

/* ---------------------------------------------------------------- tokens -- */

:root {
  /* Surfaces. Graphite rather than pure black: pure black against bright text
     produces halation, and this page is read at length. */
  --bg: #0a0c10;
  --bg-raised: #12151c;
  --bg-sunken: #070910;
  --hairline: #1e2430;
  --hairline-bright: #2b3341;

  /* Text */
  --text: #e8ebf0;
  --text-muted: #9aa3b2;
  --text-dim: #6b7488;

  /* Status vocabulary — meanings fixed, matching the product UI */
  --signal: #4d8df6;      /* telemetry / the thing being traced */
  /* The same blue, deep enough to carry white text at 5.08:1. --signal itself
     is a 3.25:1 backdrop for white and must never be a button fill. */
  --signal-strong: #2f6ad4;
  --signal-deep: #1d4ed8;
  --healthy: #3dbd7d;     /* proven */
  --suspected: #e5a34d;   /* evidence points one way, mechanism unproven */
  --confirmed: #f0555a;   /* proven broken */

  /* Type. Two families only.
     - Display: a tall, tight grotesk for headlines.
     - Mono: tabular figures for every number, code, and evidence line. The
       tension between the two IS the identity, so neither is decorative. */
  --font-display: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Spacing scale */
  --s1: 0.25rem; --s2: 0.5rem;  --s3: 0.75rem; --s4: 1rem;
  --s5: 1.5rem;  --s6: 2rem;    --s7: 3rem;    --s8: 4rem;
  --s9: 6rem;    --s10: 8rem;

  --measure: 68ch;
  --page: 1180px;
  --radius: 6px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ------------------------------------------------------------- baseline -- */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Anchored sections must not hide behind the sticky header. */
  scroll-padding-top: 6.5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* The one guard that prevents a wide child anywhere from scrolling the page
     sideways on mobile. */
  overflow-x: hidden;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

/* Focus is never removed, only restyled. Two-tone so it stays visible against
   both the page background and a raised panel. */
:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: 3px;
}

::selection { background: rgba(77, 141, 246, 0.3); color: #fff; }

/* ------------------------------------------------------------- utility --- */

.wrap { width: 100%; max-width: var(--page); margin-inline: auto; padding-inline: var(--s5); }

.skip-link {
  position: absolute; left: var(--s4); top: -100px;
  background: var(--signal); color: #fff; padding: var(--s3) var(--s5);
  border-radius: var(--radius); z-index: 100; font-weight: 600;
  transition: top 0.15s var(--ease);
}
.skip-link:focus { top: var(--s4); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 var(--s4);
  display: flex; align-items: center; gap: var(--s3);
}
/* The rule after an eyebrow encodes section boundaries; it is the ledger's
   hairline reappearing, not ornament. */
.eyebrow::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--hairline), transparent);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h3 { font-size: 1.125rem; letter-spacing: -0.01em; line-height: 1.3; }

p { margin: 0 0 var(--s4); max-width: var(--measure); }
.lede { font-size: clamp(1rem, 1.6vw, 1.175rem); color: var(--text-muted); }
/* Headings carry margin:0, so a lede introduced by one would otherwise sit
   flush against it. The gap is what separates a claim from its elaboration. */
h2 + .lede, h1 + .lede { margin-top: var(--s4); }

section { padding-block: clamp(var(--s8), 10vw, var(--s10)); }

/* ---------------------------------------------------------------- header -- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 12, 16, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.site-header .wrap {
  display: flex; align-items: center; gap: var(--s5);
  min-height: 4rem;
}

.brand {
  display: flex; align-items: center; gap: var(--s3);
  font-family: var(--font-display); font-weight: 600; font-size: 1.0625rem;
  letter-spacing: -0.01em; text-decoration: none; color: var(--text);
  white-space: nowrap;
}
.brand-mark { flex: none; }

.site-nav { display: flex; gap: var(--s2); margin-left: auto; align-items: center; }
.site-nav a {
  color: var(--text-muted); text-decoration: none; font-size: 0.9375rem;
  padding: var(--s2) var(--s3); border-radius: var(--radius);
  transition: color 0.18s var(--ease);
}
.site-nav a:hover { color: var(--text); }

/*
 * Mobile header.
 *
 * The section links are dropped rather than folded into a hamburger: they are
 * in-page anchors that the reader passes through anyway by scrolling, so a menu
 * would add a control that duplicates the scroll. What must survive is the one
 * action the header exists for, so the CTA stays and simply gets tighter.
 *
 * Measured, not assumed: five links in a row rendered 683px wide inside a 375px
 * viewport and scrolled the whole page sideways.
 */
@media (max-width: 720px) {
  .site-nav a:not(.btn) { display: none; }
  .site-nav .btn { padding-inline: var(--s4); font-size: 0.875rem; }
  .site-header .wrap { gap: var(--s3); }
}

/* Very narrow phones: the brand wordmark alone can crowd the CTA. */
@media (max-width: 360px) {
  .brand { font-size: 0.9375rem; }
  .site-nav .btn { padding-inline: var(--s3); }
}

/* ---------------------------------------------------------------- button -- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  font-family: var(--font-body); font-size: 0.9375rem; font-weight: 600;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius); border: 1px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  /* 44px minimum touch target. */
  min-height: 44px;
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease),
              transform 0.18s var(--ease);
}
/*
 * The label colour is defended against inheritance on purpose.
 *
 * `.site-nav a` sets a muted grey for the section links, and the header CTA is
 * also an anchor inside that nav. The two selectors have equal specificity, so
 * the cascade decided it by source order — and the narrow-screen block that
 * re-declares `.site-nav .btn` (two classes) outranks both. The result on
 * production was grey-on-blue at about 2.3:1: a WCAG failure on the single most
 * important button on the site.
 *
 * Measured, not read: getComputedStyle reported rgb(154,163,178) against
 * rgb(77,141,246). Anything that sets a colour on a nav anchor can reintroduce
 * this, so the button states below all state their own colour explicitly.
 */
.site-nav a.btn-primary,
.btn-primary {
  /* A deeper blue than --signal. White on --signal (#4d8df6) measures 3.25:1,
     which fails AA for the page's primary action. #2f6ad4 holds 5.08:1 against
     white while still reading as the same blue, so the fill darkens rather than
     the label greying off. --signal keeps its meaning elsewhere as the trace
     colour, where it sits on the dark ground at 6:1 and is not a text backdrop. */
  background: var(--signal-strong); color: #fff;
  border-color: var(--signal-strong);
}
.btn-primary:hover { background: #3b7ae8; border-color: #3b7ae8; }
.btn-primary:active { transform: translateY(1px); }

.btn-ghost { color: var(--text); border-color: var(--hairline-bright); background: transparent; }
.btn-ghost:hover { border-color: var(--text-dim); background: rgba(255,255,255,0.03); }

.btn-lg { font-size: 1rem; padding: 0.85rem 1.6rem; }

/* ------------------------------------------------------------------ hero -- */

.hero { padding-top: clamp(var(--s7), 7vw, var(--s9)); padding-bottom: var(--s8); position: relative; }

/* The grid is the substrate the ledger sits on: technical, quiet, and it stops
   before the content so it never competes with text. */
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--hairline) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.7;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 20%, transparent 75%);
  pointer-events: none;
}

.hero .wrap { position: relative; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s8);
  align-items: start;
}
@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: var(--s7); }
}

/*
 * Mobile hero: headline → the ask → evidence → the elaboration.
 *
 * The previous order put the visual directly under the headline, on the
 * reasoning that a merchant should see the evidence before being asked for
 * anything. Right instinct, but measured against the taller audit console it
 * put the primary button at 1552px on a 390px phone — past the fold by a full
 * screen and a half, so in practice the ask was never seen at all.
 *
 * Moving the buttons up costs nothing: the headline already states the claim,
 * and the console still sits high enough to be the first thing scrolled to. The
 * lede becomes the elaboration for a reader who wants it after the evidence,
 * which is the order that argument actually wants anyway.
 *
 * Source order stays headline → copy → console, so this is a visual reorder
 * only and the DOM sequence a screen reader follows is unchanged.
 */
@media (max-width: 1023px) {
  .hero-grid { display: flex; flex-direction: column; gap: var(--s5); }
  .hero-copy { display: contents; }
  .hero-copy .hero-kicker { order: 1; }
  .hero-copy h1 { order: 2; }
  .hero-copy .hero-actions { order: 3; }
  .hero-visual { order: 4; }
  .hero-copy .lede { order: 5; }
  .hero-copy .hero-note { order: 6; }
  /* The headline's own bottom margin would double the flex gap above the CTA. */
  .hero-copy h1 { margin-bottom: 0; }
  .hero-copy .lede { margin-bottom: 0; }
}

/* Sets the category before the headline makes its claim: a visitor who does not
   yet know what this is reads three words and has the frame for the rest. */
.hero-kicker {
  font-family: var(--font-mono); font-size: 0.75rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--signal); margin: 0 0 var(--s4);
}

.hero h1 {
  /* Sized so the headline holds three lines at desktop and the primary CTA
     stays inside the first viewport on a 390px phone. A larger size read more
     dramatically and pushed the button below the fold, which costs more than
     the drama is worth. */
  font-size: clamp(2.125rem, 5.2vw, 3.5rem);
  margin-bottom: var(--s5);
  /* Long words in a tight display face cannot spill the viewport on narrow
     screens. */
  overflow-wrap: break-word;
}
/*
 * The second line of the headline — the one that falls short.
 *
 * Dimmed rather than reddened. Red is the Confirmed verdict, and using it as
 * typographic emphasis here spent the one colour that is supposed to mean
 * "proven broken" on a line that is merely quieter. The drop in weight and
 * brightness carries the same "this one is lower" reading without borrowing
 * from the status vocabulary.
 */
.hero h1 .counted {
  color: var(--text-muted);
}

.hero .lede { margin-bottom: var(--s6); max-width: 46ch; }

.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-bottom: var(--s6); }

.hero-note {
  font-family: var(--font-mono); font-size: 0.8125rem; color: var(--text-dim);
  display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4);
  margin: 0;
}
.hero-note span { display: inline-flex; align-items: center; gap: var(--s2); }

/* --------------------------------------------------------------- console -- */
/*
 * The hero visual: an audit running, not a dashboard rendering.
 *
 * This replaced a two-number scoreboard. The scoreboard was honest but passive —
 * it restated the symptom the merchant already knows ("my numbers disagree")
 * rather than showing what this product does about it. The console shows the
 * work: stages resolving one by one, one of them failing, and a graded verdict
 * at the end. That is the difference between "another analytics dashboard" and
 * "a system that went and checked".
 *
 * The stage list is the storytelling device. It reads top to bottom like a test
 * run, and the failing row is the only one carrying --confirmed, so the eye
 * lands on the fault without any glow or decoration doing the pointing.
 */

.console {
  background: var(--bg-raised);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  overflow: hidden;
  /* Reserves height so the staged reveal cannot shift the hero. */
  min-height: 420px;
  display: flex; flex-direction: column;
}

.console-bar {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--hairline);
  background: var(--bg-sunken);
  font-family: var(--font-mono); font-size: 0.75rem;
}
.console-title { color: var(--text-muted); letter-spacing: 0.04em; }
.console-store {
  margin-left: auto; color: var(--text-dim);
  /* The store name is the least important thing in the bar; it truncates first. */
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* The one piece of ambient motion on the page. It marks "this is live" — the
   single idea the static scoreboard could not express. */
.console-pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--signal); flex: none;
  box-shadow: 0 0 0 0 rgba(77, 141, 246, 0.5);
}
.js-on .console-pulse { animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(77, 141, 246, 0.5); }
  70%  { box-shadow: 0 0 0 7px rgba(77, 141, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(77, 141, 246, 0); }
}

.probe { list-style: none; margin: 0; padding: 0; flex: 1; }

.probe-step {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center; gap: var(--s3);
  padding: var(--s4);
  border-bottom: 1px solid var(--hairline);
  font-family: var(--font-mono); font-size: 0.875rem;
}

.probe-mark {
  width: 18px; height: 18px; border-radius: 50%; flex: none;
  border: 1.5px solid currentColor;
  display: grid; place-items: center;
  position: relative;
}
/* Shape carries the state as well as colour, so the meaning survives both
   colour blindness and a greyscale print. */
.probe-mark::after {
  content: ""; position: absolute;
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}

.probe-name { color: var(--text); letter-spacing: -0.01em; }
.probe-note { color: var(--text-dim); font-size: 0.75rem; }

.probe-step[data-state="pass"]    { color: var(--healthy); }
.probe-step[data-state="unknown"] { color: var(--text-dim); }
.probe-step[data-state="fail"]    { color: var(--confirmed); }

/* The failing row is the subject of the whole visual, so it gets the only
   background tint in the list — the same tint the product uses for a missing
   cell, not a decorative one. */
.probe-step[data-state="fail"] {
  background: rgba(240, 85, 90, 0.06);
}
.probe-step[data-state="fail"] .probe-name { color: var(--confirmed); font-weight: 600; }
.probe-step[data-state="unknown"] .probe-mark::after { display: none; }

.console-result {
  padding: var(--s4);
  display: flex; flex-direction: column; gap: var(--s3);
  background: var(--bg-sunken);
}

.result-counts {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: var(--s3);
}
.rc { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.rc-num {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 2.75rem); line-height: 1;
  letter-spacing: -0.03em; color: var(--text);
  font-variant-numeric: tabular-nums;
}
.rc.is-low .rc-num { color: var(--confirmed); }
.rc-label {
  font-family: var(--font-mono); font-size: 0.6875rem;
  color: var(--text-dim); letter-spacing: 0.04em;
}
.rc-sep { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-dim); padding-bottom: 0.75rem; }

/* The gap is stated in words and money, because "4" alone is a number and
   "4 sales missing" is a problem. */
.result-gap {
  border-top: 1px solid var(--hairline);
  padding-top: var(--s3);
  display: flex; align-items: baseline; justify-content: center;
  gap: var(--s3); flex-wrap: wrap; text-align: center;
}
.gap-count {
  font-family: var(--font-display); font-size: 1.125rem; font-weight: 600;
  color: var(--confirmed);
}
.gap-value { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--text-muted); }

/*
 * Staged reveal: the stages resolve one after another, so the visual performs
 * the audit instead of describing it. Everything is visible without JS (the
 * class is only added when JS runs) and reduced-motion jumps to the end state.
 */
.js-on .probe-step { opacity: 0; }
.js-on .console-result { opacity: 0; }
.js-on .console.is-running .probe-step { animation: probeIn 0.42s var(--ease) forwards; }
.js-on .console.is-running .probe-step:nth-child(1) { animation-delay: 0.20s; }
.js-on .console.is-running .probe-step:nth-child(2) { animation-delay: 0.46s; }
.js-on .console.is-running .probe-step:nth-child(3) { animation-delay: 0.72s; }
.js-on .console.is-running .probe-step:nth-child(4) { animation-delay: 0.98s; }
/* The failure gets a longer beat before it lands. The pause is the point. */
.js-on .console.is-running .probe-step:nth-child(5) { animation-delay: 1.42s; }
.js-on .console.is-running .console-result { animation: fadeUp 0.5s var(--ease) 1.95s forwards; }

@keyframes probeIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
@keyframes numIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (max-width: 520px) {
  .console { min-height: 0; }
  .probe-step { padding: var(--s3) var(--s4); font-size: 0.8125rem; }
  .console-store { display: none; }
  .rc-num { font-size: clamp(1.75rem, 9vw, 2.25rem); }
}

/* ---------------------------------------------------------------- ledger -- */

.ledger {
  background: var(--bg-raised);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  overflow: hidden;
  /* Reserves height before the rows animate in, so the hero cannot shift. */
  min-height: 420px;
}

.ledger-head {
  display: grid; grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--hairline);
  background: var(--bg-sunken);
}
.ledger-head > div {
  padding: var(--s3) var(--s4);
  font-family: var(--font-mono); font-size: 0.75rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  display: flex; align-items: center; gap: var(--s2);
}
.ledger-head > div + div { border-left: 1px solid var(--hairline); }
.ledger-src { color: var(--text-muted); }
.ledger-src b { color: var(--text); font-weight: 600; letter-spacing: 0; text-transform: none; font-size: 0.8125rem; }

.ledger-rows { display: grid; }

.lrow {
  display: grid; grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--font-mono); font-size: 0.8125rem;
  /* Tabular figures so the columns align like a real ledger. */
  font-variant-numeric: tabular-nums;
}
.lrow:last-child { border-bottom: 0; }

.lcell {
  padding: 0.7rem var(--s4);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  min-height: 42px;
}
.lcell + .lcell { border-left: 1px solid var(--hairline); }

.lorder { color: var(--text-muted); }
.lval { color: var(--text); }

/* The GA4 side of a broken row. The dash is the loudest element in the hero:
   it is what the merchant is actually looking at in their own reports. */
.lcell.missing { background: rgba(240, 85, 90, 0.07); }
.lcell.missing .lval { color: var(--confirmed); font-weight: 600; }

.lcell.pending .lval { color: var(--text-dim); }

/* Rows arrive one at a time. The GA4 column fills in slightly behind Shopify,
   which is what makes the four blanks read as *failures to arrive* rather than
   as empty cells that were always empty. */
.lrow { opacity: 0; }
.js-on .lrow { animation: rowIn 0.4s var(--ease) forwards; }
.js-on .lrow:nth-child(1) { animation-delay: 0.15s; }
.js-on .lrow:nth-child(2) { animation-delay: 0.28s; }
.js-on .lrow:nth-child(3) { animation-delay: 0.41s; }
.js-on .lrow:nth-child(4) { animation-delay: 0.54s; }
.js-on .lrow:nth-child(5) { animation-delay: 0.67s; }
.js-on .lrow:nth-child(6) { animation-delay: 0.80s; }
.js-on .lrow:nth-child(7) { animation-delay: 0.93s; }

@keyframes rowIn { from { opacity: 0; } to { opacity: 1; } }

.ledger-foot {
  padding: var(--s4);
  border-top: 1px solid var(--hairline-bright);
  background: var(--bg-sunken);
  display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--s1) var(--s3);
  font-family: var(--font-mono); font-size: 0.8125rem;
}
/* The count must never split across two lines — it is the number the whole
   hero is making. */
.ledger-foot .delta { color: var(--confirmed); font-weight: 600; white-space: nowrap; flex: none; }
.ledger-foot .rest { color: var(--text-muted); }

/* Small screens: tighten the ledger's rhythm rather than shrinking the type
   below a readable size. */
@media (max-width: 520px) {
  .ledger { min-height: 0; }
  .lcell { padding: 0.55rem var(--s3); min-height: 38px; }
  .lrow, .ledger-head > div { font-size: 0.75rem; }
  .ledger-head > div { padding: var(--s2) var(--s3); }
  .verdict { padding: var(--s4); }
  .verdict dl > div { flex-direction: column; gap: var(--s1); }
  .verdict dt { min-width: 0; }
}

/* --------------------------------------------------------------- verdict -- */
/* The diagnostic card that resolves the hero. It is the product's actual output
   shape: chain → finding → confidence. */

.verdict {
  margin-top: var(--s4);
  background: var(--bg-raised);
  border: 1px solid var(--hairline);
  border-left: 2px solid var(--confirmed);
  border-radius: 8px;
  padding: var(--s5);
  opacity: 0;
}
.js-on .verdict { animation: fadeUp 0.5s var(--ease) 1.5s forwards; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.verdict-head { display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s3); }
.verdict-title { font-family: var(--font-display); font-size: 1.0625rem; font-weight: 600; }
.verdict p { font-size: 0.875rem; color: var(--text-muted); margin: 0 0 var(--s3); max-width: none; }
.verdict dl { margin: 0; display: grid; gap: var(--s2); font-family: var(--font-mono); font-size: 0.8125rem; }
.verdict dl > div { display: flex; gap: var(--s3); }
.verdict dt { color: var(--text-dim); min-width: 8.5rem; flex: none; }
.verdict dd { margin: 0; color: var(--text-muted); }

/* ----------------------------------------------------------------- badge -- */

.badge {
  display: inline-flex; align-items: center; gap: 0.4em;
  font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.25em 0.6em; border-radius: 3px; white-space: nowrap;
}
/* Status is never carried by colour alone — each badge also has a distinct
   glyph, so the vocabulary survives colour-blindness and greyscale printing. */
.badge::before { font-size: 0.9em; line-height: 1; }
.badge-confirmed   { background: rgba(240,85,90,0.13);  color: var(--confirmed); }
.badge-confirmed::before { content: "\2715"; }            /* ✕ */
.badge-suspected   { background: rgba(229,163,77,0.13); color: var(--suspected); }
.badge-suspected::before { content: "\0021"; }            /* ! */
/*
 * Inconclusive is grey, not blue.
 *
 * Blue means signal everywhere else on this page — the trace, the links, the
 * thing being followed. Spending it on a verdict made two of the four verdicts
 * read as the same family, and the one it collided with was Expected: the only
 * good-news verdict, sitting in a neutral grey that said "unknown".
 *
 * Grey is right for Inconclusive on its own terms: the verdict means the
 * evidence did not resolve, which is the absence of signal rather than a state
 * of it.
 */
.badge-inconclusive{ background: rgba(138,148,163,0.15); color: #97a2b0; }
.badge-inconclusive::before { content: "\003F"; }         /* ? */
.badge-healthy     { background: rgba(61,189,125,0.13); color: var(--healthy); }
.badge-healthy::before { content: "\2713"; }              /* ✓ */
/* Green, because Expected IS the good outcome: a difference that is real and
   fully accounted for. Dimmer than healthy so the two are not confused — a
   proven-correct step and an explainable difference are not the same claim —
   and a tilde rather than a tick, so it reads as "reconciled", not "passed". */
.badge-expected    { background: rgba(61,189,125,0.10); color: #7fcfa6; }
.badge-expected::before { content: "\007E"; }             /* ~ */

/* --------------------------------------------------------------- problem -- */

.problem-grid {
  display: grid; gap: var(--s5);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  margin-top: var(--s7);
}
.problem-card {
  border: 1px solid var(--hairline);
  border-radius: 8px; padding: var(--s5);
  background: var(--bg-raised);
}
.problem-card .q {
  font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-dim);
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: var(--s3);
}
.problem-card p { font-size: 0.9375rem; color: var(--text-muted); margin: 0; }
.problem-card strong { color: var(--text); font-weight: 600; }

/* ---------------------------------------------------------------- impact -- */
/*
 * Two halves with deliberately different weights: a ledger stating the measured
 * gap, and two consequence cards reading it in both directions. The asymmetry is
 * the composition — a symmetrical pair would imply the two are equally likely,
 * when the point is that either direction leads to a wrong decision.
 *
 * The delta figure is the only --confirmed thing here. It is a measurement, and
 * the note under it says so explicitly, because "119.96 USD" beside a product
 * logo invites exactly the "you saved me this" reading the product cannot claim.
 */

.impact-grid {
  display: grid; gap: var(--s6); margin-top: var(--s7);
  align-items: start;
}
@media (min-width: 900px) {
  /* The ledger is narrower: it is evidence, and the consequences are the
     argument built on it. */
  .impact-grid { grid-template-columns: 0.85fr 1fr; gap: var(--s7); }
}

.impact-ledger {
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: var(--bg-raised);
  padding: var(--s5);
}
.il-period {
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-dim); margin: 0 0 var(--s4);
}
.il-rows { display: grid; }
.il-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s4); padding: var(--s4) 0;
  border-bottom: 1px solid var(--hairline);
}
.il-row.is-delta { border-bottom: 0; }
.il-label { font-size: 0.9375rem; color: var(--text-muted); }
.il-value {
  font-family: var(--font-mono); font-size: 1.125rem; font-weight: 600;
  color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.il-value.is-low { color: var(--suspected); }
.il-value.is-delta { color: var(--confirmed); font-size: 1.375rem; }
.il-note {
  font-size: 0.8125rem; color: var(--text-dim); margin: var(--s4) 0 0;
  padding-top: var(--s4); border-top: 1px solid var(--hairline);
}

.impact-cases { display: grid; gap: var(--s5); }

.icase {
  border: 1px solid var(--hairline);
  border-left: 2px solid var(--hairline-bright);
  border-radius: 8px; padding: var(--s5);
  background: var(--bg-raised);
}
/* The left rule carries the direction of the error: under-reporting reads
   suspected, over-reporting reads confirmed-severity, matching how the product
   grades the two faults. */
.icase[data-dir="under"] { border-left-color: var(--suspected); }
.icase[data-dir="over"]  { border-left-color: var(--confirmed); }

.icase-tag {
  display: block; font-family: var(--font-mono); font-size: 0.75rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: var(--s4);
}
.icase ul { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s2); }
.icase li {
  font-size: 0.9375rem; color: var(--text-muted);
  padding-left: var(--s4); position: relative;
}
.icase li::before {
  content: ""; position: absolute; left: 0; top: 0.7em;
  width: 5px; height: 1px; background: var(--text-dim);
}
/* The consequence sentence is the payload of the card, so it is the only
   full-contrast text in it. */
.icase-end {
  margin: var(--s4) 0 0; padding-top: var(--s4);
  border-top: 1px solid var(--hairline);
  font-family: var(--font-display); font-size: 1rem; font-weight: 600;
  color: var(--text); line-height: 1.4;
}

/* -------------------------------------------------------------- pipeline -- */

.pipeline {
  margin-top: var(--s7);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: var(--bg-raised);
  padding: var(--s6) var(--s5);
  position: relative;
  overflow: hidden;
}

.chain { display: grid; gap: 0; list-style: none; margin: 0; padding: 0; }
@media (min-width: 860px) {
  .chain { grid-template-columns: repeat(5, 1fr); }
}

.node { position: relative; padding: var(--s4) var(--s3); }

/* The connector between stages. On desktop it runs horizontally through the
   row; on mobile the layout goes vertical and the connector follows. This is
   the Signal Line — the recurring motif. */
.node::after {
  content: "";
  position: absolute;
  background: var(--hairline-bright);
}
@media (min-width: 860px) {
  /* The connector leaves the dot's centre and stops at the next dot's centre.
     Aligned to the dot rather than to a guessed offset, so the line reads as one
     continuous trace through the nodes instead of a rule floating above them. */
  .node::after {
    top: calc(var(--s4) + 7px - 1px);
    left: calc(50% + 7px);
    width: calc(100% - 14px);
    height: 2px;
  }
  .node:last-child::after { display: none; }
  /* Centre the dot in its column so the connector meets it symmetrically. */
  .node-dot { margin-inline: auto; }
  .node { text-align: center; }
  .node-detail { text-align: left; }
}
@media (max-width: 859px) {
  .node::after { left: 1.15rem; top: 50%; width: 2px; height: 100%; }
  .node:last-child::after { display: none; }
}

.node-dot {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--hairline-bright);
  background: var(--bg-raised);
  position: relative; z-index: 2;
  margin-bottom: var(--s3);
}
.node-name {
  font-family: var(--font-mono); font-size: 0.8125rem; font-weight: 600;
  color: var(--text); margin-bottom: var(--s1);
}
.node-detail { font-size: 0.8125rem; color: var(--text-dim); line-height: 1.45; }

@media (max-width: 859px) {
  .node { padding-left: 2.75rem; padding-block: var(--s3); }
  .node-dot { position: absolute; left: 0.6rem; top: 1.05rem; margin: 0; }
}

/* Proven stages. */
.node.proven .node-dot { border-color: var(--healthy); background: var(--healthy); }
.node.proven::after { background: var(--healthy); opacity: 0.45; }

/* The stage where it died. */
.node.broken .node-dot { border-color: var(--confirmed); background: var(--confirmed); }
.node.broken .node-name { color: var(--confirmed); }
.node.broken::after { background: var(--hairline-bright); }

/* Downstream of the break: nothing is claimed, because nothing is known. */
.node.unknown .node-dot { border-color: var(--text-dim); border-style: dashed; }
.node.unknown .node-name { color: var(--text-muted); }

.pipeline-verdict {
  margin-top: var(--s6); padding-top: var(--s5);
  border-top: 1px solid var(--hairline);
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5);
  font-family: var(--font-mono); font-size: 0.8125rem; color: var(--text-muted);
}

/* -------------------------------------------------------------- recovery -- */
/*
 * The recovery track. Numbering is legitimate here: the states really do occur in
 * this order, and the order carries the information — the whole point is that
 * "resolved" comes two confirmations after "looks fixed".
 *
 * The Break reappears as the connector: solid through what is proven, dashed
 * through what is still being confirmed.
 */

.recovery-track {
  list-style: none; margin: var(--s7) 0 0; padding: 0;
  display: grid; gap: var(--s5);
}
@media (min-width: 860px) { .recovery-track { grid-template-columns: repeat(4, 1fr); gap: 0; } }

.rstep {
  position: relative; padding: var(--s4) var(--s4) var(--s4) 2.5rem;
  display: flex; flex-direction: column; gap: var(--s1);
}
@media (min-width: 860px) {
  .rstep { padding: 2.75rem var(--s4) 0 0; }
}

.rstep-mark {
  position: absolute; left: 0.35rem; top: 1.35rem;
  width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid var(--hairline-bright); background: var(--bg);
  z-index: 2;
}
@media (min-width: 860px) { .rstep-mark { left: 0; top: 1.1rem; } }

/* Connector: solid where confirmed, dashed where still unproven. */
.rstep::after {
  content: ""; position: absolute; background: var(--hairline-bright);
  left: 0.85rem; top: 2.4rem; width: 2px; height: calc(100% - 1rem);
}
@media (min-width: 860px) {
  .rstep::after { left: 13px; top: calc(1.1rem + 5px); width: calc(100% - 13px); height: 2px; }
}
.rstep:last-child::after { display: none; }

.rstep.is-done .rstep-mark { border-color: var(--healthy); background: var(--healthy); }
.rstep.is-done::after { background: var(--healthy); opacity: 0.5; }

.rstep.is-active .rstep-mark { border-color: var(--suspected); background: var(--suspected); }
/* Dashed: this is the stretch where the outcome is not yet established. */
.rstep.is-active::after {
  background: none;
  border-top: 2px dashed var(--hairline-bright);
  height: 0;
}
@media (max-width: 859px) {
  .rstep.is-active::after {
    border-top: 0; border-left: 2px dashed var(--hairline-bright); width: 0;
  }
}
.rstep.is-active .rstep-name { color: var(--suspected); }

.rstep.is-resolved .rstep-mark { border-color: var(--healthy); background: var(--healthy); }
.rstep.is-resolved .rstep-name { color: var(--healthy); }

.rstep-name { font-family: var(--font-display); font-size: 1.0625rem; font-weight: 600; }
.rstep-detail { font-size: 0.875rem; color: var(--text-muted); line-height: 1.45; }

.recovery-note {
  margin-top: var(--s6); padding-top: var(--s5);
  border-top: 1px solid var(--hairline);
  font-size: 0.9375rem; color: var(--text-muted); max-width: none;
}

/* ------------------------------------------------------------- findings --- */

.findings { display: grid; gap: var(--s4); margin-top: var(--s7); }
@media (min-width: 760px) { .findings { grid-template-columns: 1fr 1fr; } }

.finding {
  border: 1px solid var(--hairline);
  border-radius: 8px; padding: var(--s5);
  background: var(--bg-raised);
  display: flex; flex-direction: column; gap: var(--s3);
}
.finding-code {
  font-family: var(--font-mono); font-size: 0.6875rem;
  color: var(--text-dim); letter-spacing: 0.06em;
}
.finding h3 { color: var(--text); }
.finding p { font-size: 0.9375rem; color: var(--text-muted); margin: 0; max-width: none; }

/* --------------------------------------------------------- interrogation -- */
/*
 * Six questions, each answering itself.
 *
 * Deliberately pure type on hairlines rather than cards: this is the section the
 * product is really about, and a row of boxes would make it look like every other
 * feature grid. The questions read down the left, the answers align hard right, so
 * the eye can run the answer column alone and land on the one that says "can't see".
 *
 * Numbering is legitimate — a sale genuinely has to clear these in order, and the
 * order is why the fourth answer does not license blaming the fourth step.
 */

.interrogation {
  list-style: none; margin: var(--s7) 0 0; padding: 0;
  border-top: 1px solid var(--hairline);
  counter-reset: iq;
}

.iq {
  counter-increment: iq;
  display: grid;
  grid-template-columns: 2.25rem 1fr auto;
  align-items: baseline;
  gap: var(--s3);
  padding: var(--s4) 0;
  border-bottom: 1px solid var(--hairline);
}

.iq::before {
  content: counter(iq, decimal-leading-zero);
  font-family: var(--font-mono); font-size: 0.75rem;
  color: var(--text-dim); letter-spacing: 0.06em;
}

.iq-q {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.0625rem, 2.2vw, 1.375rem);
  line-height: 1.25; letter-spacing: -0.01em;
  color: var(--text);
}

.iq-a {
  font-family: var(--font-mono); font-weight: 600;
  font-size: 0.9375rem; white-space: nowrap;
  justify-self: end;
}

/* The answer column is the whole point, so each state is unmistakable at a glance
   and carries a glyph as well as a colour. */
.iq.is-yes .iq-a { color: var(--healthy); }
.iq.is-yes .iq-a::before { content: "✓ "; }

.iq.is-unknown .iq-q { color: var(--text); }
.iq.is-unknown .iq-a { color: var(--suspected); }
.iq.is-unknown .iq-a::before { content: "? "; }

.iq.is-no .iq-a { color: var(--confirmed); }
.iq.is-no .iq-a::before { content: "✕ "; }

/* The last row is the verdict, not another observation. */
.iq.is-verdict { border-bottom: 0; padding-top: var(--s5); }
.iq.is-verdict .iq-q { color: var(--text); }

/* The unknown row is the one the section exists for: a hairline accent marks it
   without turning it into an alarm. */
.iq.is-unknown {
  border-left: 2px solid var(--suspected);
  padding-left: var(--s4);
  margin-left: -1rem;
  background: rgba(229, 163, 77, 0.04);
}
@media (max-width: 600px) { .iq.is-unknown { margin-left: 0; padding-left: var(--s3); } }

.interrogation-note {
  margin-top: var(--s6);
  padding-left: var(--s4);
  border-left: 2px solid var(--hairline-bright);
  font-size: 0.9375rem; color: var(--text-muted);
  max-width: 62ch;
}

.tiers-heading {
  margin-top: var(--s9); margin-bottom: 0;
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim);
}

@media (max-width: 600px) {
  .iq { grid-template-columns: 1.75rem 1fr; row-gap: var(--s2); }
  /* On a narrow screen the answer drops under its question rather than
     squeezing the question to two words per line. */
  .iq-a { grid-column: 2; justify-self: start; }
}

/* -------------------------------------------------------------- evidence -- */

.evidence-band { background: var(--bg-sunken); border-block: 1px solid var(--hairline); }

.tiers { display: grid; gap: var(--s4); margin-top: var(--s7); }
/* Four evidence states. Two-up before four-up so the cards never compress to an
   unreadable width on a tablet. */
@media (min-width: 700px)  { .tiers { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .tiers { grid-template-columns: repeat(4, 1fr); } }
/* The access section carries three guarantees, not four states, so it keeps its
   own three-column rule. */
@media (min-width: 900px) { #access .tiers { grid-template-columns: repeat(3, 1fr); } }

.tier {
  border: 1px solid var(--hairline); border-radius: 8px;
  padding: var(--s5); background: var(--bg);
  border-top: 2px solid var(--tier-color, var(--hairline));
}
.tier[data-tier="confirmed"]    { --tier-color: var(--confirmed); }
.tier[data-tier="suspected"]    { --tier-color: var(--suspected); }
.tier[data-tier="inconclusive"] { --tier-color: var(--signal); }
/* Used by the access section: these are guarantees, so they carry the healthy
   colour rather than a fourth meaning. */
.tier[data-tier="healthy"]      { --tier-color: var(--healthy); }

.tier h3 { margin-bottom: var(--s3); }
.tier p { font-size: 0.9375rem; color: var(--text-muted); margin: 0 0 var(--s4); max-width: none; }
.tier .example {
  font-family: var(--font-mono); font-size: 0.8125rem;
  color: var(--text-dim); border-left: 2px solid var(--hairline-bright);
  padding-left: var(--s3); line-height: 1.5;
}

.evidence-rule {
  /* p{max-width:68ch} applies here too and was cutting the box short of the grid
     above it, which read as a misalignment rather than a choice. */
  max-width: none;
  margin-top: var(--s7); padding: var(--s6) var(--s5);
  border: 1px solid var(--hairline-bright); border-radius: 8px;
  background: var(--bg);
  font-family: var(--font-display); font-size: clamp(1.0625rem, 2.2vw, 1.375rem);
  line-height: 1.4; text-align: center; color: var(--text);
}

/* -------------------------------------------------------------- showcase -- */

.shot {
  margin-top: var(--s7);
  border: 1px solid var(--hairline-bright);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-raised);
  position: relative;
}
/* A restrained window chrome: it frames the screenshot as an application
   without pretending to be a browser we do not control. */
.shot-bar {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--hairline);
  background: var(--bg-sunken);
  font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-dim);
}
.shot-dots { display: flex; gap: 6px; }
.shot-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--hairline-bright); display: block; }
.shot img { width: 100%; display: block; }

/* The capture is taller than the frame shows. Fading the bottom edge makes the
   crop deliberate instead of looking like a row sliced in half. */
.shot::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 90px;
  background: linear-gradient(transparent, var(--bg-raised));
  pointer-events: none;
}

.shot-caption {
  font-family: var(--font-mono); font-size: 0.8125rem; color: var(--text-dim);
  margin-top: var(--s4); text-align: center;
}

/* ------------------------------------------------------------------ steps -- */

.steps { display: grid; gap: var(--s5); margin-top: var(--s7); counter-reset: step; list-style: none; padding: 0; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .steps { grid-template-columns: repeat(4, 1fr); } }

/* Numbering here is legitimate: connecting, establishing a baseline, and
   detecting a change genuinely happen in that order, and the order is the
   information. */
.step { counter-increment: step; border-top: 1px solid var(--hairline); padding-top: var(--s4); }
.step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono); font-size: 0.75rem; color: var(--signal);
  display: block; margin-bottom: var(--s3); letter-spacing: 0.08em;
}
.step h3 { margin-bottom: var(--s2); }
.step p { font-size: 0.9375rem; color: var(--text-muted); margin: 0; max-width: none; }

/* ------------------------------------------------------------------- who -- */

.who { display: grid; gap: var(--s4); margin-top: var(--s7); }
@media (min-width: 760px) { .who { grid-template-columns: repeat(2, 1fr); } }
.who-item { border-left: 2px solid var(--hairline-bright); padding-left: var(--s4); }
.who-item h3 { margin-bottom: var(--s2); }
.who-item p { font-size: 0.9375rem; color: var(--text-muted); margin: 0; max-width: none; }

/* ------------------------------------------------------------ regression -- */
/*
 * Two known-good points with an unobserved change between them. The middle
 * column is deliberately the emptiest thing in the composition: the change is
 * what nobody watched, and the layout says that before the copy does.
 */

.regression {
  margin-top: var(--s7);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: var(--bg-raised);
  overflow: hidden;
}

.reg-track {
  display: grid; gap: 0;
  border-bottom: 1px solid var(--hairline);
}
@media (min-width: 760px) {
  .reg-track { grid-template-columns: 1fr auto 1fr; align-items: stretch; }
}

.reg-point {
  padding: var(--s5);
  display: flex; flex-direction: column; gap: var(--s2);
  border-bottom: 1px solid var(--hairline);
}
@media (min-width: 760px) { .reg-point { border-bottom: 0; } }

.reg-when {
  font-family: var(--font-mono); font-size: 0.75rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim);
}
.reg-state { font-family: var(--font-display); font-size: 1.0625rem; font-weight: 600; }
.reg-point.is-ok  .reg-state { color: var(--healthy); }
.reg-point.is-bad .reg-state { color: var(--confirmed); }

/* The unobserved change. Dashed because nothing watched it happen — the same
   dash the logo uses for a signal that stops. */
.reg-event {
  padding: var(--s5) var(--s4);
  display: grid; place-items: center; text-align: center;
  border-bottom: 1px solid var(--hairline);
  background: var(--bg-sunken);
}
@media (min-width: 760px) {
  .reg-event {
    border-bottom: 0;
    border-inline: 1px dashed var(--hairline-bright);
    max-width: 15rem;
  }
}
.reg-event-label {
  font-family: var(--font-mono); font-size: 0.75rem; line-height: 1.6;
  color: var(--text-dim); letter-spacing: 0.02em;
}

.reg-verdict { padding: var(--s5); display: grid; gap: var(--s3); justify-items: start; }
.reg-verdict p { margin: 0; font-size: 0.9375rem; color: var(--text-muted); }
/* The honesty note is set apart rather than buried: it is a limitation, and a
   limitation stated plainly is the reason the rest of the page is credible. */
.reg-honest {
  border-left: 2px solid var(--suspected);
  padding-left: var(--s4);
  font-size: 0.875rem !important;
}
.reg-honest strong { color: var(--text); font-weight: 600; }

/* -------------------------------------------------------------- agencies -- */

.portfolio {
  margin-top: var(--s7);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: var(--bg-raised);
  padding: var(--s6) var(--s5) var(--s5);
}

.pf-summary {
  display: grid; gap: var(--s4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
}
.pf-stat {
  display: flex; flex-direction: column; align-items: center; gap: var(--s1);
  text-align: center; padding: var(--s4);
  border: 1px solid var(--hairline); border-radius: 8px;
  background: var(--bg-sunken);
}
.pf-num {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2rem, 5vw, 2.75rem); line-height: 1;
  letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
}
.pf-label {
  font-family: var(--font-mono); font-size: 0.6875rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim);
}
.pf-stat[data-tone="healthy"]   .pf-num { color: var(--healthy); }
.pf-stat[data-tone="suspected"] .pf-num { color: var(--suspected); }
.pf-stat[data-tone="confirmed"] .pf-num { color: var(--confirmed); }

/* Says outright that this is a sketch. An unlabelled mock of an unbuilt screen
   is the kind of small lie that makes a reader doubt the parts that are true. */
.pf-caption {
  margin: var(--s5) 0 0; padding-top: var(--s4);
  border-top: 1px solid var(--hairline);
  font-size: 0.8125rem; color: var(--text-dim); text-align: center;
}

.agency-points {
  display: grid; gap: var(--s5); margin-top: var(--s6);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}
.ap h3 { margin-bottom: var(--s2); font-size: 1.0625rem; }
.ap p { font-size: 0.9375rem; color: var(--text-muted); margin: 0; max-width: none; }

/* ------------------------------------------------------------------- faq -- */

.faq { margin-top: var(--s7); border-top: 1px solid var(--hairline); }
.faq details { border-bottom: 1px solid var(--hairline); }
.faq summary {
  cursor: pointer; padding: var(--s5) 3rem var(--s5) 0;
  font-family: var(--font-display); font-size: 1.0625rem; font-weight: 600;
  position: relative; list-style: none;
  min-height: 44px; display: flex; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: var(--s3); top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono); font-size: 1.25rem; color: var(--text-dim);
  transition: transform 0.2s var(--ease), color 0.2s var(--ease);
}
.faq details[open] summary::after { content: "\2212"; color: var(--signal); }
.faq summary:hover { color: var(--signal); }
.faq .answer { padding-bottom: var(--s5); }
.faq .answer p { color: var(--text-muted); font-size: 0.9375rem; margin-bottom: var(--s3); }
.faq .answer p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------------- cta -- */

.cta-band { border-top: 1px solid var(--hairline); background: var(--bg-sunken); }
.cta-inner { text-align: center; display: grid; justify-items: center; gap: var(--s5); }
.cta-inner p { margin: 0; }
.cta-actions { display: flex; flex-wrap: wrap; gap: var(--s3); justify-content: center; }

/*
 * The beta request, drawn as a form.
 *
 * It is a link, not a <form>: the site is static and the CSP sets
 * form-action 'none', so a real POST would mean both a backend on the marketing
 * host and a weaker policy. Showing the fields sets the expectation of what will
 * be asked — three short things, not an onboarding questionnaire — which is the
 * job the form shape was doing anyway.
 */
.beta-form {
  width: 100%; max-width: 32rem;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: var(--bg-raised);
  padding: var(--s5);
  display: grid; gap: var(--s4);
}
.bf-intro {
  font-size: 0.875rem; color: var(--text-muted);
  margin: 0; text-align: left;
}
.bf-asks {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: var(--s2); text-align: left;
}
.bf-asks li {
  font-family: var(--font-mono); font-size: 0.875rem; color: var(--text);
  padding-left: var(--s5); position: relative;
  display: flex; align-items: baseline; gap: var(--s3);
}
.bf-asks li::before {
  content: ""; position: absolute; left: var(--s2); top: 0.62em;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--signal);
}
.bf-opt {
  font-family: var(--font-mono); font-size: 0.6875rem;
  color: var(--text-dim); letter-spacing: 0.06em; text-transform: uppercase;
}
.bf-submit { width: 100%; justify-content: center; }
.bf-foot {
  font-size: 0.75rem; color: var(--text-dim); margin: 0; text-align: center;
}

.cta-note { font-size: 0.875rem; color: var(--text-muted); }
.cta-pricing {
  font-size: 0.8125rem; color: var(--text-dim);
  max-width: 52ch; line-height: 1.6;
  padding-top: var(--s4); border-top: 1px solid var(--hairline);
}

/* ---------------------------------------------------------------- footer -- */

.site-footer { border-top: 1px solid var(--hairline); padding-block: var(--s7) var(--s6); }
.footer-grid { display: grid; gap: var(--s6); }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-grid h4 {
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-dim); margin: 0 0 var(--s4); font-weight: 500;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s1); }
/*
 * Footer links are genuine tap targets on a phone, so they get a full 44px row
 * rather than the 19px a bare inline link measures. Inline links inside running
 * prose are deliberately NOT padded this way — enlarging them would break the
 * line rhythm of the paragraph they sit in, and the guidance exists for
 * standalone controls, not for words in a sentence.
 */
.footer-grid a {
  color: var(--text-muted); text-decoration: none; font-size: 0.9375rem;
  display: flex; align-items: center; min-height: 44px;
}
.footer-grid a:hover { color: var(--text); text-decoration: underline; }

/* The brand lockup in the footer is a link too. */
.footer-about .brand { min-height: 44px; }
.footer-about p { font-size: 0.875rem; color: var(--text-dim); margin: var(--s4) 0 0; max-width: 42ch; }
.footer-legal {
  margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid var(--hairline);
  font-size: 0.8125rem; color: var(--text-dim);
  display: flex; flex-wrap: wrap; gap: var(--s4); justify-content: space-between;
}

/* --------------------------------------------------------------- article -- */
/* Shared shell for /privacy and /terms. */

.doc { padding-block: var(--s8); }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(2rem, 5vw, 2.75rem); margin-bottom: var(--s4); }
.doc h2 { font-size: 1.375rem; margin-top: var(--s7); margin-bottom: var(--s4); }
.doc h3 { font-size: 1.0625rem; margin-top: var(--s5); margin-bottom: var(--s3); }
.doc p, .doc li { color: var(--text-muted); font-size: 0.9375rem; }
.doc ul, .doc ol { padding-left: var(--s5); margin: 0 0 var(--s4); display: grid; gap: var(--s2); }
.doc a { color: var(--signal); }
.doc .updated { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--text-dim); }
.doc table { width: 100%; border-collapse: collapse; margin: var(--s4) 0; font-size: 0.875rem; }
.doc th, .doc td { text-align: left; padding: var(--s3); border-bottom: 1px solid var(--hairline); vertical-align: top; }
.doc th { color: var(--text); font-weight: 600; font-size: 0.8125rem; }
.doc td { color: var(--text-muted); }
.doc .table-scroll { overflow-x: auto; }

/*
 * Inline code must wrap. A long unbreakable token — the OAuth scope URL
 * `https://www.googleapis.com/auth/analytics.readonly` is the real case here —
 * measured 412px inside a 375px viewport and scrolled the whole page sideways.
 * overflow-wrap alone does not break a URL with no spaces; anywhere does.
 */
code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--text);
  background: var(--bg-raised);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* A visible marker for content the operator must complete before launch. It is
   deliberately loud: an unfilled legal placeholder must never ship quietly. */
.todo {
  background: rgba(229,163,77,0.12);
  border-left: 2px solid var(--suspected);
  padding: var(--s4); border-radius: var(--radius);
  font-family: var(--font-mono); font-size: 0.8125rem; color: var(--suspected);
  margin: var(--s4) 0;
}

/* --------------------------------------------------------- reduced motion -- */
/*
 * Every animation here is decorative: the ledger, verdict and pipeline all
 * render their final state in CSS, and the motion only controls how they
 * arrive. So under reduced motion they are simply shown, immediately.
 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .lrow, .verdict { opacity: 1 !important; transform: none !important; }
  /* The figures are already the real values in the markup, so showing them
     immediately loses nothing.

     These selectors must track the hero visual's class names. They previously
     named .scorecard-num/.scoreboard-gap from the old scoreboard; when the hero
     became the audit console those stopped matching anything and the result
     panel — the 7-vs-3 comparison the whole hero builds to — stayed at opacity 0
     for every reduced-motion visitor. Caught by asserting computed opacity under
     an emulated reduce preference, not by reading the file. */
  .probe-step, .console-result, .rc-num { opacity: 1 !important; transform: none !important; }
  /* The pulse is a slow, continuous loop; it is the one thing here that should
     genuinely stop rather than snap to its end state. */
  .console-pulse { animation: none !important; }
}

/* Without JS the rows must still be visible: the .js-on class is what gates
   the animation, and it is only ever added by script. */
.no-js .lrow, .no-js .verdict,
.no-js .scorecard-num, .no-js .scoreboard-gap { opacity: 1; }

/* ------------------------------------------------------- scroll reveal -- */

/*
 * Elements arrive as the reader reaches them.
 *
 * Three conditions must ALL hold for anything to be hidden: JavaScript ran
 * (.js-on), the script marked this element ([data-reveal]), and the reader has
 * not asked for reduced motion. The script removes the attribute on arrival, so
 * the hidden state cannot outlive the observer — and if the script never runs,
 * the rule never matches and the page is simply a static page.
 *
 * The transform is small on purpose. A 12px rise reads as the page settling; the
 * 40px+ rise common in template sites reads as content that was missing and then
 * flew in, which on a page about missing data is exactly the wrong association.
 */
.js-on [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
}

.js-on [data-reveal],
.js-on main > section > .wrap > * {
  transition:
    opacity 620ms var(--ease) var(--reveal-delay, 0ms),
    transform 620ms var(--ease) var(--reveal-delay, 0ms);
}

@media (prefers-reduced-motion: reduce) {
  /* Belt and braces: the script already returns early, but a preference changed
     after load must not leave anything mid-transition. */
  .js-on [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* ------------------------------------------------- the signal, tracing -- */

/*
 * The connector between stages draws itself, one stage at a time, and the dots
 * light as the trace reaches them.
 *
 * This animates the connector that already exists rather than overlaying an SVG:
 * .node::after is positioned against the dot's real geometry at both breakpoints
 * (horizontal in the 5-column grid, vertical in the stacked layout), so an
 * overlay would have to re-derive that and would drift the moment either changes.
 *
 * What the motion says: the signal travels the funnel and stops where the
 * evidence stops. The trace runs green through the proven stages, goes dim at
 * the unknown one, and the last dot — Google Analytics, where no sale arrived —
 * is the one it never lights.
 *
 * Gated on .is-traced, added by the observer, so this only runs once the section
 * is actually on screen. Without JS the connectors are simply drawn, as before.
 */
.js-on .pipeline .node::after {
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 520ms var(--ease) var(--trace-delay, 0ms);
}
.js-on .pipeline.is-traced .node::after { transform: scaleX(1); }

@media (max-width: 859px) {
  .js-on .pipeline .node::after {
    transform: scaleY(0);
    transform-origin: center top;
  }
  .js-on .pipeline.is-traced .node::after { transform: scaleY(1); }
}

/* The dot fills as the trace arrives at it. Scale rather than opacity: a dot
   that fades in reads as uncertainty, and these stages are the proven ones. */
.js-on .pipeline .node-dot {
  transform: scale(0.4);
  opacity: 0.35;
  transition:
    transform 380ms var(--ease) var(--trace-delay, 0ms),
    opacity 380ms var(--ease) var(--trace-delay, 0ms);
}
.js-on .pipeline.is-traced .node-dot { transform: scale(1); opacity: 1; }

/* The broken stage's dot arrives last and does not settle quietly: it is the
   answer the whole section is built to deliver. */
.js-on .pipeline.is-traced .node.broken .node-dot {
  animation: trace-land 640ms var(--ease) var(--trace-delay, 0ms) both;
}
@keyframes trace-land {
  0%   { transform: scale(0.4); opacity: 0.35; }
  55%  { transform: scale(1.35); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .js-on .pipeline .node::after { transform: none !important; }
  .js-on .pipeline .node-dot {
    transform: none !important;
    opacity: 1 !important;
    animation: none !important;
  }
}
