/* ==========================================================================
   Proof homepage — "audit dossier" layer.
   Loads after proof-site.css; additive classes only, base tokens reused.
   ========================================================================== */

:root {
  --serif: "Crimson Pro", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --red-ink: #a7352a;
  --red-wash: rgba(167, 53, 42, 0.08);
  --green-ok: #246b50;
  --dark: #14141d;
  --dark-2: #1b1b27;
  --dark-line: rgba(250, 247, 242, 0.14);
  --paper-text: #f3efe7;
  --paper-dim: rgba(243, 239, 231, 0.6);
}

/* Paper grain + ruled top edge -------------------------------------------- */
body.home {
  position: relative;
}
body.home::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.028'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
body.home > * { position: relative; z-index: 2; }

/* Scroll progress ---------------------------------------------------------- */
.audit-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: var(--red-ink);
  z-index: 60;
  transition: width 80ms linear;
}

/* Reveal on scroll ---------------------------------------------------------- */
.rise {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.rise.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rise { opacity: 1; transform: none; transition: none; }
}

/* Marginalia ---------------------------------------------------------------- */
.fig-note {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  text-transform: lowercase;
}

/* Hero ---------------------------------------------------------------------- */
.hero-v5 {
  position: relative;
  padding: 72px 28px 76px;
  border-bottom: 1px solid var(--line);
  min-height: clamp(560px, 86vh, 840px);
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-v5 .hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  gap: 52px;
  align-items: center;
}
.hero-copy { max-width: 640px; }

/* Postmortem board ------------------------------------------------------------ */
.board {
  position: relative;
  height: 540px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background:
    radial-gradient(circle at 1px 1px, rgba(23, 23, 36, 0.07) 1px, transparent 0) 0 0 / 26px 26px,
    var(--paper-deep);
  box-shadow: inset 0 2px 18px rgba(23, 23, 36, 0.08);
  overflow: hidden;
}
.board-strings {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}
.board-strings path {
  fill: none;
  stroke: rgba(167, 53, 42, 0.75);
  stroke-width: 1.8;
  transition: stroke 0.7s ease;
}
.board.is-verified .board-strings path { stroke: rgba(36, 107, 80, 0.8); }

.board-card {
  position: absolute;
  z-index: 3;
  width: 200px;
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 22px 14px 12px;
  box-shadow: 0 10px 22px -12px rgba(23, 23, 36, 0.45);
  opacity: 0;
  cursor: grab;
  touch-action: none;
  user-select: none;
  transition: left 0.9s cubic-bezier(0.6, 0, 0.3, 1), top 0.9s cubic-bezier(0.6, 0, 0.3, 1), transform 0.9s cubic-bezier(0.6, 0, 0.3, 1), box-shadow 0.25s ease, opacity 0.01s;
}
.board-card.is-pinned { opacity: 1; animation: card-pin 0.5s cubic-bezier(0.2, 1.4, 0.4, 1); }
@keyframes card-pin {
  0% { transform: translateY(-26px) scale(1.12) rotate(var(--r, 0deg)); opacity: 0; }
  60% { transform: translateY(3px) scale(0.99) rotate(var(--r, 0deg)); opacity: 1; }
  100% { transform: translateY(0) scale(1) rotate(var(--r, 0deg)); opacity: 1; }
}
.board-card.is-dragging {
  transition: box-shadow 0.25s ease;
  box-shadow: 0 26px 40px -18px rgba(23, 23, 36, 0.55);
  cursor: grabbing;
  z-index: 6;
}
.board-card::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 50%;
  width: 11px;
  height: 11px;
  margin-left: -5.5px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #d96a5c, var(--red-ink) 60%, #6f1f16);
  box-shadow: 0 2px 3px rgba(23, 23, 36, 0.4);
}
.b-tag {
  display: block;
  font-family: var(--mono);
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
  margin-bottom: 6px;
}
.b-tag.red { color: var(--red-ink); }
.b-title {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.06rem;
  line-height: 1.2;
  color: var(--ink);
}
.b-title.alarm { color: #ef8d80; font-size: 1.2rem; text-transform: lowercase; }
.b-mono {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.62rem;
  line-height: 1.7;
  color: var(--ink-soft);
}
.b-mono.ok { color: var(--green-ok); font-size: 0.78rem; font-weight: 600; }
.b-mono.dim { color: rgba(243, 239, 231, 0.6); }
.b-scribble {
  display: block;
  margin-top: 8px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.88rem;
  color: var(--red-ink);
}
.board-card.dark { background: var(--dark); border-color: rgba(0, 0, 0, 0.5); }
.board-card.sticky {
  width: 172px;
  background: #f6e7b8;
  border-color: rgba(138, 90, 31, 0.35);
  box-shadow: 0 8px 16px -10px rgba(23, 23, 36, 0.4);
}
.board-card.sticky::before { background: none; box-shadow: none; }
.b-hand {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #5c451a;
}
.board-card.cause {
  width: 230px;
  border: 2px solid var(--red-ink);
  background: var(--white);
}
.board.is-verified .board-card.cause { border-color: var(--green-ok); }

.board-stamp {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.board-stamp .fig-note { opacity: 0; transition: opacity 0.5s ease 0.3s; }
.board.is-verified .board-stamp .fig-note { opacity: 1; }
.stamp.big {
  font-size: 1.02rem;
  padding: 12px 22px;
  border-width: 3px;
  border-radius: 8px;
  background: rgba(250, 247, 242, 0.96);
  white-space: nowrap;
}
.board-stamp .fig-note {
  background: rgba(250, 247, 242, 0.92);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
}
.board-bar {
  position: absolute;
  z-index: 4;
  left: 14px;
  right: 14px;
  bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.board-replay {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: rgba(250, 247, 242, 0.9);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.board-replay:hover { color: var(--ink); border-color: var(--ink); }
@media (prefers-reduced-motion: reduce) {
  .board-card { transition: none; }
  .board-card.is-pinned { animation: none; }
}
@media (max-width: 980px) {
  .board { height: 480px; }
  .board-card { width: 168px; padding: 20px 12px 10px; }
  .board-card.cause { width: 190px; }
  .board-card.sticky { width: 150px; }
}
.hero-v5 h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(3rem, 6.4vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 18px 0 22px;
}
.hero-v5 h1 .h1-accent {
  font-style: italic;
  color: var(--red-ink);
  position: relative;
  white-space: nowrap;
}
.hero-v5 h1 .h1-accent svg {
  position: absolute;
  left: 0; right: 0;
  bottom: -0.14em;
  width: 100%;
  height: 0.24em;
  overflow: visible;
}
.hero-v5 h1 .h1-accent svg path {
  fill: none;
  stroke: var(--red-ink);
  stroke-width: 3.4;
  stroke-linecap: round;
  opacity: 0.85;
}
.hero-kicker {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--red-ink);
}
.hero-v5 .lead {
  font-size: 1.16rem;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 34em;
}
.hero-v5 .hero-actions { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }

/* Confession rotator — the buyer's inner monologue */
.confession {
  margin-top: 26px;
  padding-left: 18px;
  border-left: 3px solid var(--red-ink);
  min-height: 4.4em;
}
.confession-quote {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.28rem;
  line-height: 1.4;
  color: var(--ink);
  opacity: 1;
  transition: opacity 0.35s ease;
}
.confession-quote::before { content: "\201C"; color: var(--red-ink); }
.confession-quote::after { content: "\201D"; color: var(--red-ink); }
.confession-who {
  display: block;
  opacity: 1;
  transition: opacity 0.35s ease;
}
.confession.is-fading .confession-quote,
.confession.is-fading .confession-who { opacity: 0; }
.hero-proof-line {
  margin-top: 26px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}
.hero-proof-line strong { color: var(--green-ok); font-weight: 600; }

/* Hero terminal -------------------------------------------------------------- */
.term {
  background: var(--dark);
  border: 1px solid rgba(23, 23, 36, 0.5);
  border-radius: 12px;
  box-shadow: 0 30px 60px -30px rgba(23, 23, 36, 0.45);
  overflow: hidden;
}
.term-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--dark-2);
  border-bottom: 1px solid var(--dark-line);
}
.term-dots { display: flex; gap: 6px; }
.term-dots span {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(243, 239, 231, 0.18);
}
.term-title {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper-dim);
}
.term-replay {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper-text);
  background: transparent;
  border: 1px solid var(--dark-line);
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.term-replay:hover { border-color: var(--paper-text); }
.term-body {
  padding: 18px 18px 22px;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.75;
  color: var(--paper-text);
  min-height: 292px;
  white-space: pre-wrap;
  word-break: break-word;
}
.term-body .t-dim  { color: rgba(243, 239, 231, 0.45); }
.term-body .t-ok   { color: #95d5b2; }
.term-body .t-bad  { color: #ef8d80; }
.term-body .t-warn { color: #f4d35e; }
.term-body .t-hi   { color: #fff; font-weight: 600; }
.term-caret {
  display: inline-block;
  width: 8px; height: 1.05em;
  vertical-align: text-bottom;
  background: var(--paper-text);
  animation: caret-blink 1s steps(1) infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }

/* Ledger strip ---------------------------------------------------------------- */
.ledger {
  border-bottom: 1px solid var(--line);
  background: var(--paper-deep);
}
.ledger-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 28px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.ledger-pair {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ledger-pair .was { color: var(--ink-muted); text-decoration: line-through; text-decoration-color: var(--red-ink); text-decoration-thickness: 1.5px; }
.ledger-pair .now { color: var(--ink); font-weight: 600; }
.ledger-pair .now::before { content: "→ "; color: var(--green-ok); }

/* Section scaffolding ---------------------------------------------------------- */
.sec { padding: 88px 28px; }
.sec.tight { padding: 68px 28px; }
.sec-inner { max-width: var(--max); margin: 0 auto; }
.sec-head { max-width: 720px; margin-bottom: 44px; }
.sec-kicker {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--red-ink);
  margin-bottom: 12px;
  display: block;
}
.sec h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}
.sec-lead { font-size: 1.06rem; line-height: 1.7; color: var(--ink-soft); }

/* Drift figure ---------------------------------------------------------------- */
.drift-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  padding: 34px 26px 20px;
  overflow-x: auto;
}
.drift-svg { width: 100%; min-width: 640px; height: auto; display: block; }
.drift-svg .d-intent { stroke: var(--ink); stroke-width: 2; fill: none; }
.drift-svg .d-impl   { stroke: var(--red-ink); stroke-width: 2.2; fill: none; }
.drift-svg .d-zone   { fill: var(--red-wash); opacity: 0; transition: opacity 1.2s ease 0.9s; }
.drift-svg .d-label  { font-family: var(--mono); font-size: 11.5px; fill: var(--ink-muted); letter-spacing: 0.04em; }
.drift-svg .d-label.red   { fill: var(--red-ink); }
.drift-svg .d-label.green { fill: var(--green-ok); font-weight: 600; }
.drift-svg .d-label.ink   { fill: var(--ink); font-weight: 600; }
.drift-svg .d-tick { stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 3 4; }
.drift-svg .d-dot  { fill: var(--red-ink); }
.drift-svg .d-dot.green { fill: var(--green-ok); }
.drift-svg.is-drawn .d-zone { opacity: 1; }
.drift-svg .d-draw {
  stroke-dasharray: var(--len, 1200);
  stroke-dashoffset: var(--len, 1200);
  transition: stroke-dashoffset 2.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.drift-svg.is-drawn .d-draw { stroke-dashoffset: 0; }
@media (prefers-reduced-motion: reduce) {
  .drift-svg .d-draw { stroke-dasharray: none; stroke-dashoffset: 0; }
  .drift-svg .d-zone { opacity: 1; }
}
.drift-caption {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* Interactive lab (dark band) ---------------------------------------------------- */
.lab {
  background: var(--dark);
  color: var(--paper-text);
  border-top: 1px solid rgba(0,0,0,0.4);
  border-bottom: 1px solid rgba(0,0,0,0.4);
}
.lab .sec-kicker { color: #ef8d80; }
.lab h2 { color: var(--paper-text); }
.lab .sec-lead { color: var(--paper-dim); }
.lab-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 30px;
  align-items: start;
}
.lab-panel {
  background: var(--dark-2);
  border: 1px solid var(--dark-line);
  border-radius: 12px;
  overflow: hidden;
}
.lab-panel-head {
  padding: 12px 18px;
  border-bottom: 1px solid var(--dark-line);
  font-family: var(--mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--paper-dim);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.lab-panel-body { padding: 18px; }
.lab-req {
  font-family: var(--serif);
  font-size: 1.22rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--paper-text);
  border-left: 3px solid #95d5b2;
  padding-left: 16px;
  margin: 0 0 18px;
}
.lab-code {
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.7;
  color: var(--paper-dim);
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  padding: 14px 16px;
  white-space: pre;
  overflow-x: auto;
}
.lab-code .t-hi { color: #f4d35e; }
.lab-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.lab-btn {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  color: var(--paper-text);
  background: rgba(243, 239, 231, 0.06);
  border: 1px solid var(--dark-line);
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}
.lab-btn:hover:not(:disabled) { border-color: var(--paper-text); background: rgba(243,239,231,0.1); }
.lab-btn:disabled { opacity: 0.32; cursor: not-allowed; }
.lab-btn.primary { border-color: #ef8d80; }
.lab-btn.is-next { border-color: #f4d35e; box-shadow: 0 0 0 1px rgba(244, 211, 94, 0.35); }
.lab-out {
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.8;
  min-height: 168px;
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  padding: 14px 16px;
  white-space: pre-wrap;
  word-break: break-word;
}
.lab-out .t-dim { color: rgba(243,239,231,0.4); }
.lab-out .t-ok { color: #95d5b2; }
.lab-out .t-bad { color: #ef8d80; }
.lab-out .t-warn { color: #f4d35e; }
.lab-tests {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 18px;
  border-top: 1px solid var(--dark-line);
}
.test-badge {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.02em;
  border-radius: 999px;
  padding: 4px 10px;
  border: 1px solid rgba(149, 213, 178, 0.4);
  color: #95d5b2;
}
.test-badge.bad {
  border-color: rgba(239, 141, 128, 0.55);
  color: #ef8d80;
  animation: badge-pulse 1.6s ease infinite;
}
.test-badge.hidden { display: none; }
@keyframes badge-pulse { 50% { box-shadow: 0 0 0 4px rgba(239, 141, 128, 0.12); } }
@media (prefers-reduced-motion: reduce) { .test-badge.bad { animation: none; } }
.lab-verdict {
  margin-top: 14px;
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--paper-dim);
  min-height: 3.2em;
}
.lab-verdict strong { color: var(--paper-text); }

/* VERIFIED stamp */
.stamp {
  position: relative;
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green-ok);
  border: 2.5px solid var(--green-ok);
  border-radius: 6px;
  padding: 7px 16px;
  transform: rotate(-4deg) scale(1);
  opacity: 0;
  pointer-events: none;
}
.lab .stamp { color: #95d5b2; border-color: #95d5b2; }
.stamp.is-on {
  opacity: 1;
  animation: stamp-in 0.45s cubic-bezier(0.2, 1.6, 0.4, 1);
}
@keyframes stamp-in {
  0% { transform: rotate(-4deg) scale(2.4); opacity: 0; }
  60% { transform: rotate(-4deg) scale(0.94); opacity: 1; }
  100% { transform: rotate(-4deg) scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .stamp.is-on { animation: none; } }

/* Checklist ---------------------------------------------------------------- */
.check-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 22px;
}
.check-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  padding: 18px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
}
.check-item:hover { border-color: var(--line-strong); }
.check-item input { position: absolute; opacity: 0; pointer-events: none; }
.check-box {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  margin-top: 2px;
  border: 1.5px solid var(--line-strong);
  border-radius: 5px;
  display: grid;
  place-items: center;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.check-box svg { width: 14px; height: 14px; opacity: 0; transform: scale(0.6); transition: opacity 0.15s ease, transform 0.15s ease; }
.check-item.is-checked .check-box { background: var(--green-ok); border-color: var(--green-ok); }
.check-item.is-checked .check-box svg { opacity: 1; transform: scale(1); }
.check-item strong { display: block; font-size: 0.98rem; margin-bottom: 4px; }
.check-item p { margin: 0; font-size: 0.86rem; color: var(--ink-muted); line-height: 1.55; }
.check-tally {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.check-count {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}
.check-count b { color: var(--red-ink); font-size: 1rem; }
.check-msg { font-family: var(--serif); font-style: italic; font-size: 1.12rem; color: var(--ink); }

/* Stats band ---------------------------------------------------------------- */
.stats {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper-deep);
}
.stats-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 54px 28px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}
.stat .stat-num {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat .stat-num .unit { font-size: 0.55em; color: var(--red-ink); }
.stat p { margin: 8px 0 0; font-size: 0.86rem; color: var(--ink-soft); line-height: 1.55; max-width: 22em; }
.stats-source {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px 26px;
}

/* Persona tabs ---------------------------------------------------------------- */
.persona-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}
.persona-tab {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 9px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.persona-tab:hover { border-color: var(--ink); color: var(--ink); }
.persona-tab.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.persona-panel {
  border: 1px solid var(--line);
  border-left: 3px solid var(--red-ink);
  border-radius: 10px;
  background: var(--white);
  padding: 30px 32px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  min-height: 172px;
}
.persona-pain {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.3rem;
  line-height: 1.45;
  color: var(--ink);
  margin: 0;
}
.persona-pain::before { content: "\201C"; color: var(--red-ink); }
.persona-pain::after { content: "\201D"; color: var(--red-ink); }
.persona-answer .fig-note { display: block; margin-bottom: 8px; }
.persona-answer p { margin: 0; font-size: 0.95rem; line-height: 1.65; color: var(--ink-soft); }

/* Start cards ---------------------------------------------------------------- */
.start-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.start-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  padding: 24px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.start-card:hover {
  border-color: var(--ink);
  transform: translateY(-3px);
  box-shadow: 0 18px 34px -22px rgba(23,23,36,0.35);
}
.start-card .fig-note { color: var(--red-ink); display: block; margin-bottom: 10px; }
.start-card strong { font-family: var(--serif); font-size: 1.28rem; font-weight: 600; display: block; margin-bottom: 8px; }
.start-card p { margin: 0; font-size: 0.88rem; color: var(--ink-soft); line-height: 1.6; }
.start-card .go {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  transition: color 0.2s ease;
}
.start-card:hover .go { color: var(--red-ink); }

/* Dossier / inspect list ---------------------------------------------------------------- */
.dossier {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  overflow: hidden;
}
.dossier-head {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.dossier a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  font-size: 0.94rem;
  transition: background 0.15s ease;
}
.dossier a:last-child { border-bottom: none; }
.dossier a:hover { background: var(--paper); }
.dossier a .doc-kind {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  flex: 0 0 auto;
}
.dossier a:hover .doc-kind { color: var(--red-ink); }

/* Signature / founder ---------------------------------------------------------------- */
.signature {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.signature img {
  width: 58px; height: 58px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  filter: grayscale(0.25);
}
.signature p { margin: 0; font-size: 0.86rem; color: var(--ink-soft); line-height: 1.6; }
.signature .sig-name { font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--ink); display: block; }

/* Dither dissolve edges (Bayer-ish pixel strip) ------------------------------ */
.dither-top, .dither-bottom {
  height: 22px;
  background-repeat: repeat-x;
  background-size: 36px 22px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='22'%3E%3Cg fill='%2314141d'%3E%3Crect x='8' y='0' width='3' height='3'/%3E%3Crect x='26' y='1' width='3' height='3'/%3E%3Crect x='0' y='4' width='3' height='3'/%3E%3Crect x='17' y='4' width='3' height='3'/%3E%3Crect x='30' y='5' width='3' height='3'/%3E%3Crect x='5' y='8' width='3' height='3'/%3E%3Crect x='12' y='8' width='3' height='3'/%3E%3Crect x='22' y='9' width='3' height='3'/%3E%3Crect x='33' y='8' width='3' height='3'/%3E%3Crect x='0' y='12' width='3' height='3'/%3E%3Crect x='8' y='12' width='3' height='3'/%3E%3Crect x='16' y='13' width='3' height='3'/%3E%3Crect x='25' y='12' width='3' height='3'/%3E%3Crect x='29' y='13' width='3' height='3'/%3E%3Crect x='3' y='16' width='3' height='3'/%3E%3Crect x='10' y='16' width='3' height='3'/%3E%3Crect x='14' y='17' width='3' height='3'/%3E%3Crect x='20' y='16' width='3' height='3'/%3E%3Crect x='27' y='17' width='3' height='3'/%3E%3Crect x='33' y='16' width='3' height='3'/%3E%3Crect x='0' y='19' width='36' height='3'/%3E%3C/g%3E%3C/svg%3E");
}
.dither-bottom { transform: scaleY(-1); }

/* Verification chain lab -------------------------------------------------------- */
.chain-grid {
  display: grid;
  grid-template-columns: 1fr 34px 1fr 34px 1fr;
  gap: 0;
  align-items: stretch;
  margin-bottom: 18px;
}
.chain-card {
  background: var(--dark-2);
  border: 1px solid var(--dark-line);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s ease;
}
.chain-card.is-hot { border-color: rgba(244, 211, 94, 0.5); }
.chain-card.is-bad { border-color: rgba(239, 141, 128, 0.6); }
.chain-card.is-ok  { border-color: rgba(149, 213, 178, 0.5); }
.chain-card-head {
  padding: 10px 16px;
  border-bottom: 1px solid var(--dark-line);
  font-family: var(--mono);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--paper-dim);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.chain-card-head .tag { color: #f4d35e; text-transform: none; letter-spacing: 0.02em; }
.chain-card-body {
  padding: 14px 16px;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.7;
  color: var(--paper-dim);
  flex: 1;
  white-space: pre-wrap;
  word-break: break-word;
}
.chain-card-body .t-hi { color: #fff; }
.chain-card-body .t-req { color: #d8c9f0; }
.chain-card-body .t-ok { color: #95d5b2; }
.chain-card-body .t-bad { color: #ef8d80; }
.chain-card-body .t-warn { color: #f4d35e; }
.chain-card-body .t-dim { color: rgba(243,239,231,0.38); }
.chain-card-body em { font-family: var(--serif); font-size: 1.02rem; color: var(--paper-text); font-style: italic; }

/* connectors */
.chain-link-h {
  position: relative;
  align-self: center;
  height: 2px;
  width: 100%;
  background: rgba(243, 239, 231, 0.14);
  overflow: visible;
}
.chain-link-h::after {
  content: "";
  position: absolute;
  right: -1px; top: -3px;
  border-left: 6px solid rgba(243, 239, 231, 0.3);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}
.chain-link-h .pulse {
  position: absolute;
  top: -2px; left: 0;
  width: 8px; height: 6px;
  border-radius: 3px;
  opacity: 0;
}
.chain-link-h.on { background: rgba(149, 213, 178, 0.4); }
.chain-link-h.on::after { border-left-color: #95d5b2; }
.chain-link-h.on .pulse { background: #95d5b2; opacity: 1; animation: link-pulse 1.6s linear infinite; }
.chain-link-h.suspect { background: rgba(239, 141, 128, 0.5); }
.chain-link-h.suspect::after { border-left-color: #ef8d80; }
.chain-link-h.suspect .pulse { background: #ef8d80; opacity: 1; animation: link-pulse 0.8s linear infinite; }
@keyframes link-pulse {
  0% { left: 0; opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { left: calc(100% - 8px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .chain-link-h .pulse { animation: none !important; opacity: 0.7; left: 45%; } }

/* evidence chips */
.chain-evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.ev-chip {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.02em;
  border-radius: 999px;
  padding: 5px 12px;
  border: 1px solid var(--dark-line);
  color: rgba(243,239,231,0.4);
  transition: color 0.3s ease, border-color 0.3s ease;
}
.ev-chip.ok { border-color: rgba(149, 213, 178, 0.4); color: #95d5b2; }
.ev-chip.warn { border-color: rgba(244, 211, 94, 0.5); color: #f4d35e; animation: badge-pulse 1.6s ease infinite; }
.ev-chip.bad { border-color: rgba(239, 141, 128, 0.55); color: #ef8d80; }

/* Hero audit scene (living verification chain) ------------------------------------- */
.audit-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, var(--paper) 30%, rgba(250, 247, 242, 0.82) 48%, rgba(250, 247, 242, 0.05) 68%, rgba(250, 247, 242, 0) 78%);
}
.scene-caption {
  position: absolute;
  right: 28px;
  bottom: 16px;
  z-index: 2;
  pointer-events: none;
}
.scene-caption .cap-red { color: var(--red-ink); }
.scene-caption .cap-green { color: var(--green-ok); }
@media (max-width: 980px) {
  .hero-veil { background: rgba(250, 247, 242, 0.86); }
  .audit-scene { opacity: 0.9; }
}

/* Repo ledger (what lands in your repo) ------------------------------------------ */
.repo-ledger {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--code-bg, #191923);
  overflow: hidden;
  font-family: var(--mono);
  font-size: 0.76rem;
}
.repo-ledger-head {
  padding: 11px 18px;
  border-bottom: 1px solid rgba(243,239,231,0.12);
  color: rgba(243,239,231,0.5);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.repo-row {
  display: grid;
  grid-template-columns: minmax(210px, 0.9fr) 1.6fr;
  gap: 18px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(243,239,231,0.07);
  color: rgba(243,239,231,0.85);
}
.repo-row:last-child { border-bottom: none; }
.repo-row .path { color: #95d5b2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.repo-row .what { color: rgba(243,239,231,0.55); font-size: 0.72rem; }

/* Key facts (AEO) ---------------------------------------------------------------- */
.key-facts {
  border-top: 1px solid var(--line);
  margin-top: 26px;
  padding-top: 18px;
  display: grid;
  gap: 10px;
}
.key-facts .kf {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 14px;
  font-size: 0.84rem;
  line-height: 1.55;
}
.key-facts .kf dt {
  font-family: var(--mono);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--red-ink);
  padding-top: 3px;
}
.key-facts .kf dd { margin: 0; color: var(--ink-soft); }

/* Q.E.D. tombstone ---------------------------------------------------------------- */
.qed-tomb {
  display: inline-block;
  font-size: 0.5em;
  color: var(--red-ink);
  transform: translateY(-0.12em);
}

/* Method chain (§4) ---------------------------------------------------------------- */
.method-rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.method-step {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  padding: 20px;
  position: relative;
}
.method-step .m-num {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  color: var(--red-ink);
  display: block;
  margin-bottom: 8px;
}
.method-step strong { font-family: var(--serif); font-size: 1.16rem; font-weight: 600; display: block; margin-bottom: 6px; }
.method-step p { margin: 0 0 12px; font-size: 0.85rem; color: var(--ink-soft); line-height: 1.6; }
.method-step .m-artifact {
  font-family: var(--mono);
  font-size: 0.66rem;
  line-height: 1.65;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  color: var(--ink-soft);
  white-space: pre-wrap;
  word-break: break-word;
}
.method-step .m-artifact .ok { color: var(--green-ok); }
.method-step .m-artifact .warn { color: var(--amber, #8a5a1f); }
.method-step .m-artifact .req { color: #5b3d8f; }

/* Responsive ---------------------------------------------------------------- */
@media (max-width: 980px) {
  .hero-v5 .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .lab-grid { grid-template-columns: 1fr; }
  .chain-grid { grid-template-columns: 1fr; }
  .chain-link-h { width: 2px; height: 26px; justify-self: center; }
  .chain-link-h::after { right: -3px; top: auto; bottom: -1px; border: none; border-top: 6px solid rgba(243,239,231,0.3); border-left: 4px solid transparent; border-right: 4px solid transparent; }
  .chain-link-h.on::after { border-top-color: #95d5b2; }
  .chain-link-h.suspect::after { border-top-color: #ef8d80; }
  .chain-link-h .pulse { animation: none !important; opacity: 0.7; top: 40%; left: -2px; width: 6px; height: 8px; }
  .method-rail { grid-template-columns: 1fr; }
  .repo-row { grid-template-columns: 1fr; gap: 2px; }
  .key-facts .kf { grid-template-columns: 1fr; gap: 2px; }
  .persona-panel { grid-template-columns: 1fr; gap: 18px; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .ledger-inner { grid-template-columns: repeat(2, 1fr); }
  .start-grid { grid-template-columns: 1fr; }
  .check-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .hero-v5 { padding: 56px 20px 44px; }
  .sec { padding: 60px 20px; }
  .stats-inner { grid-template-columns: 1fr 1fr; gap: 22px; padding: 40px 20px; }
  .term-body { font-size: 0.68rem; min-height: 250px; }
  .lab-code { font-size: 0.66rem; }
}
