:root {
  --bg: #0b0d10;
  --bg-2: #101318;
  --surface: #13171d;
  --surface-2: #181d24;
  --ink: #ece8df;
  --ink-2: #b4b2ab;
  --muted: #7d8089;
  --rule: #23282f;
  --rule-strong: #333a43;
  --accent: #c6f432;      /* signal lime: the colour of "passed" on this page */
  --accent-2: #7af0c4;
  --accent-ink: #0b0d10;
  --passed: #3ddc97;
  --proposed: #f0b440;
  --failed: #ff5b4a;
  --before: #ff8a4c;
  --after: #c6f432;
  --display: 'Unbounded', 'Onest', system-ui, sans-serif;
  --font: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden;
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(198, 244, 50, 0.07), transparent 60%),
    radial-gradient(900px 600px at -10% 30%, rgba(122, 240, 196, 0.05), transparent 60%),
    var(--bg);
}
/* Blueprint grid behind everything, fading towards the bottom of the viewport. */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background-image: linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.35) 100%);
}
::selection { background: var(--accent); color: var(--accent-ink); }
a { color: var(--accent); text-underline-offset: 3px; }
code { font-family: var(--mono); font-size: 0.82em; color: var(--accent); background: rgba(198, 244, 50, 0.08); padding: 0.08em 0.4em; border-radius: 4px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 560px) { .wrap { padding: 0 16px; } }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Scroll progress */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 30; pointer-events: none; }
.progress i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transform-origin: 0 50%; transform: scaleX(var(--page, 0)); box-shadow: 0 0 12px var(--accent); }

/* Header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(11, 13, 16, 0.72); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); border-bottom: 1px solid var(--rule); }
.top-row { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 600; line-height: 1.2; }
.brand small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; font-family: var(--mono); }
.mark { width: 28px; height: 28px; border: 1.5px solid var(--ink); position: relative; flex: none; transform: rotate(45deg) scale(.82); }
.mark i { position: absolute; inset: 5px; background: var(--accent); box-shadow: 0 0 14px var(--accent); animation: pulse 2.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; box-shadow: 0 0 4px var(--accent); } }
.top nav { display: flex; gap: 6px; align-items: center; }
.top nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; padding: 7px 12px; border-radius: 999px; transition: color .2s, background .2s; }
.top nav a:hover, .top nav a.on { color: var(--ink); background: rgba(255,255,255,.06); }
.nav-cta { border: 1px solid var(--accent); color: var(--accent) !important; margin-left: 8px; }
.nav-cta:hover { background: var(--accent) !important; color: var(--accent-ink) !important; }
@media (max-width: 860px) { .top nav a:not(.nav-cta) { display: none; } }
@media (max-width: 420px) { .brand small { display: none; } }

/* Section rail: a fixed list of checks that pass as you scroll. */
.rail { position: fixed; left: 22px; top: 50%; transform: translateY(-50%); z-index: 15; display: none; }
@media (min-width: 1400px) { .rail { display: block; } }
.rail ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; position: relative; }
.rail ol::before { content: ''; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 1px; background: var(--rule-strong); }
.rail li { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 11px; color: var(--muted); position: relative; transition: color .3s; }
.rail li::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--proposed); flex: none; transition: all .35s var(--ease); }
.rail li span { opacity: 0; transform: translateX(-6px); transition: all .3s var(--ease); }
.rail:hover li span { opacity: 1; transform: none; }
@media (min-width: 1640px) { .rail li.now span { opacity: 1; transform: none; } }
.rail li.done::before { background: var(--passed); border-color: var(--passed); }
.rail li.now { color: var(--ink); }
.rail li.now::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px rgba(198,244,50,.18), 0 0 14px var(--accent); }
.rail-label { display: block; margin-top: 18px; font-family: var(--mono); font-size: 10px; color: var(--muted); writing-mode: vertical-rl; transform: rotate(180deg); letter-spacing: .12em; text-transform: uppercase; }

/* Hero */
.hero { padding: 80px 0 72px; position: relative; min-height: calc(100vh - 68px); display: flex; flex-direction: column; justify-content: center; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 56px; align-items: center; }
@media (max-width: 1040px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } .hero { min-height: 0; } }
.hero-copy { transform: translateY(calc(var(--p, 0) * -60px)); opacity: calc(1.7 - var(--p, 0) * 2); }
.kicker { font-family: var(--mono); font-size: 13px; color: var(--ink-2); margin: 0 0 26px; letter-spacing: 0.02em; display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 10px; border: 1px solid var(--rule-strong); border-radius: 999px; background: rgba(255,255,255,.02); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--passed); box-shadow: 0 0 0 4px rgba(61,220,151,.15); animation: pulse 2s infinite; }
h1, h2, .contact-title { font-family: var(--display); font-weight: 500; }
h1 { font-size: clamp(32px, 3.5vw, 52px); line-height: 1.08; letter-spacing: -0.035em; margin: 0 0 28px; }

/* The headline is "verified" by a beam on load: an outlined copy underneath, the solid copy revealed behind the beam. */
.sweep-title { position: relative; display: grid; }
.sweep-title > span { grid-area: 1 / 1; }
.sweep-title .ghost { color: transparent; -webkit-text-stroke: 1px rgba(240, 180, 64, .55); }
.sweep-title .solid { clip-path: inset(0 0 0 0); background: linear-gradient(100deg, var(--ink) 55%, var(--accent) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sweep-title .beam { position: absolute; top: -6%; bottom: -6%; left: 100%; width: 3px; background: var(--accent); box-shadow: 0 0 24px 6px rgba(198,244,50,.45); opacity: 0; pointer-events: none; }
.js .sweep-title .solid { animation: reveal 1.9s var(--ease) .25s both; }
.js .sweep-title .beam { animation: beam 1.9s var(--ease) .25s both; }
@keyframes reveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes beam { 0% { left: 0; opacity: 1; } 85% { opacity: 1; } 100% { left: 100%; opacity: 0; } }

.lead { font-size: 18px; color: var(--ink-2); margin: 0 0 34px; max-width: 620px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 44px; }
.btn { --mx: 0px; --my: 0px; position: relative; display: inline-flex; align-items: center; padding: 15px 24px; border: 1px solid var(--rule-strong); color: var(--ink); text-decoration: none; font-weight: 500; font-size: 16px; border-radius: 999px; overflow: hidden; isolation: isolate; transition: border-color .25s, color .25s, transform .25s var(--ease); transform: translate(var(--mx), var(--my)); }
.btn::before { content: ''; position: absolute; inset: 0; background: var(--ink); transform: translateY(101%); transition: transform .4s var(--ease); z-index: -1; border-radius: inherit; }
.btn:hover { color: var(--bg); border-color: var(--ink); }
.btn:hover::before { transform: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 32px -8px rgba(198,244,50,.5); }
.btn.primary::before { background: #fff; }
.btn.primary:hover { color: var(--accent-ink); border-color: #fff; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 0; border-top: 1px solid var(--rule-strong); }
.facts > div { padding: 20px 20px 0 0; }
.facts > div + div { padding-left: 20px; border-left: 1px solid var(--rule); }
.facts dt { font-family: var(--display); font-size: 30px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--accent); }
.facts dd { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } .facts > div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); } .facts > div { padding: 14px 0; } }

.hero-model { margin: 0; background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--rule-strong); border-radius: 20px; overflow: hidden; position: relative; box-shadow: 0 40px 120px -40px rgba(0,0,0,.8), 0 0 0 1px rgba(198,244,50,.04) inset;
  transform: perspective(1200px) rotateX(calc(var(--p, 0) * 14deg)) translateY(calc(var(--p, 0) * 40px)) scale(calc(1 - var(--p, 0) * .08)); transform-origin: 50% 0; }
.hud { position: absolute; top: 14px; left: 16px; right: 16px; display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--muted); z-index: 2; pointer-events: none; }
#hud-state { color: var(--accent); }
#hud-state::before { content: '● '; }
/* Check log over the bottom-left corner of the model, which the isometric floor leaves empty. */
.scene-log { position: absolute; left: 16px; bottom: 58px; max-width: min(78%, 440px); margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; font-family: var(--mono); font-size: 11.5px; line-height: 1.4; pointer-events: none; z-index: 2; }
.scene-log li { color: var(--muted); opacity: .55; padding: 3px 8px; border-radius: 6px; background: rgba(11,13,16,.72); align-self: flex-start; }
.scene-log li.fresh { opacity: 1; animation: logIn .35s var(--ease); }
.scene-log li.ok { color: var(--passed); } .scene-log li.bad { color: var(--failed); } .scene-log li.warn { color: var(--proposed); }
@keyframes logIn { from { opacity: 0; transform: translateY(6px); } }
@media (max-width: 560px) { .scene-log { position: static; max-width: none; min-height: 58px; justify-content: flex-end; padding: 0 10px 10px; font-size: 10.5px; } .scene-log li:not(:nth-last-child(-n+2)) { display: none; } }
#scene { display: block; width: 100%; aspect-ratio: 5 / 4.4; }
.hero-model figcaption { display: flex; gap: 20px; flex-wrap: wrap; padding: 14px 18px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--muted); font-family: var(--mono); }
.hero-model figcaption span { display: inline-flex; align-items: center; gap: 8px; }
.st { width: 9px; height: 9px; display: inline-block; border-radius: 2px; }
.st-proposed { background: var(--proposed); } .st-failed { background: var(--failed); } .st-passed { background: var(--passed); }
.no-webgl #scene { background: repeating-linear-gradient(0deg, transparent 0 39px, var(--rule) 39px 40px), repeating-linear-gradient(90deg, transparent 0 39px, var(--rule) 39px 40px); }
.scroll-cue { position: absolute; left: 50%; bottom: 22px; width: 24px; height: 38px; border: 1.5px solid var(--rule-strong); border-radius: 12px; transform: translateX(-50%); opacity: calc(1 - var(--p, 0) * 4); }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--accent); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 80%, 100% { transform: translateY(14px); opacity: 0; } }
@media (max-width: 1040px) { .scroll-cue { display: none; } }

/* Ticker of the check codes, moved by scroll */
.ticker { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); overflow: hidden; padding: 18px 0; background: rgba(255,255,255,.015); }
.ticker-row { display: flex; gap: 48px; white-space: nowrap; font-family: var(--mono); font-size: 14px; color: var(--muted); width: max-content; transform: translateX(calc(var(--p, 0) * -40%)); }
.ticker-row span { display: inline-flex; align-items: center; gap: 12px; }
.ticker-row b { font-weight: 500; color: var(--ink); }
.ticker-row i { width: 6px; height: 6px; border-radius: 50%; background: var(--passed); }
.ticker-row i.f { background: var(--failed); } .ticker-row i.p { background: var(--proposed); }

/* Sections */
.section { padding: 140px 0 0; position: relative; }
.section-head { display: grid; grid-template-columns: 1fr; gap: 0; margin-bottom: 56px; max-width: 900px; }
.section-head .num { font-family: var(--mono); font-size: 13px; color: var(--accent); display: inline-flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.section-head .num::after { content: ''; height: 1px; width: 64px; background: linear-gradient(90deg, var(--accent), transparent); }
h2 { font-size: clamp(30px, 3.6vw, 52px); line-height: 1.08; letter-spacing: -0.03em; margin: 0 0 22px; }
h3 { font-size: 18px; font-weight: 600; margin: 0 0 8px; line-height: 1.35; }
.sub { color: var(--ink-2); margin: 0; font-size: 17.5px; max-width: 780px; }
.note { color: var(--muted); font-size: 14px; margin: 16px 0 0; max-width: 820px; }

/* Word-by-word headline reveal (words are wrapped by main.js) */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .06em; margin-bottom: -.06em; }
.split .w > span { display: inline-block; transform: translateY(105%); transition: transform .9s var(--ease); transition-delay: calc(var(--i) * 45ms); }
.split.in .w > span { transform: none; }

/* Method: the left side stays pinned while the catches scroll past. */
.method-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: start; }
@media (max-width: 1040px) { .method-grid { grid-template-columns: 1fr; gap: 24px; } }
.method-pin { position: sticky; top: 108px; }
@media (max-width: 1040px) { .method-pin { position: static; } }
.method-pin .section-head { margin-bottom: 36px; }
.pipeline { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; position: relative; }
.pipeline li { padding: 14px 14px; display: flex; flex-direction: column; gap: 4px; counter-increment: step; position: relative; border: 1px solid var(--rule); border-radius: 12px; background: var(--surface); transition: border-color .4s, background .4s, transform .4s var(--ease); }
.pipeline li::before { content: counter(step, decimal-leading-zero); font-family: var(--mono); font-size: 11px; color: var(--muted); transition: color .4s; }
.pipeline li b { font-weight: 600; font-size: 14.5px; }
.pipeline li span { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.pipeline li.lit { border-color: rgba(198,244,50,.35); background: linear-gradient(180deg, rgba(198,244,50,.07), var(--surface)); }
.pipeline li.lit::before { color: var(--accent); }
.pipeline li.gate.lit { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset, 0 0 40px -10px rgba(198,244,50,.5); }
@media (max-width: 560px) { .pipeline { grid-template-columns: 1fr 1fr; } }
.catches { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 20px; counter-reset: c; }
.catches li { counter-increment: c; position: relative; padding: 28px 28px 26px; border: 1px solid var(--rule); border-radius: 18px; background: var(--surface); display: grid; grid-template-columns: 1fr; gap: 6px; transition: border-color .5s, background .5s, transform .6s var(--ease), opacity .6s; opacity: .45; transform: scale(.97); }
.catches li::after { content: counter(c, decimal-leading-zero); position: absolute; top: 22px; right: 26px; font-family: var(--display); font-size: 40px; line-height: 1; color: var(--rule-strong); transition: color .5s; }
.catches li.on { opacity: 1; transform: none; border-color: var(--rule-strong); background: linear-gradient(160deg, var(--surface-2), var(--surface)); }
.catches li.on::after { color: rgba(198,244,50,.3); }
.catches .c-k { font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-top: 10px; }
.catches .c-k:first-child { margin-top: 0; color: var(--failed); }
.catches h3 { font-size: 20px; margin: 0; padding-right: 60px; }
.catches p { margin: 0; color: var(--ink-2); font-size: 15.5px; }
.catches .c-res { color: var(--ink); padding: 12px 14px; border-radius: 10px; background: rgba(61,220,151,.06); border: 1px solid rgba(61,220,151,.18); }
.no-motion .catches li, .catches.static li { opacity: 1; transform: none; }

/* Cases: each card sticks and the next one slides over it. */
.cases { display: flex; flex-direction: column; gap: 28px; }
.case { background: linear-gradient(160deg, var(--surface-2), var(--surface) 60%); border: 1px solid var(--rule-strong); border-radius: 24px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); overflow: hidden; transform-origin: 50% 0; box-shadow: 0 -20px 60px -30px rgba(0,0,0,.9); }
@media (min-width: 1041px) {
  .cases.stack .case { position: sticky; top: calc(96px + var(--i) * 18px); transform: scale(calc(1 - var(--cover, 0) * .06)); filter: brightness(calc(1 - var(--cover, 0) * .45)); }
}
@media (max-width: 900px) { .case { grid-template-columns: 1fr; } }
.case-main { padding: 34px; border-right: 1px solid var(--rule); display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 900px) { .case-main { border-right: 0; border-bottom: 1px solid var(--rule); padding: 24px; } }
.case-tag { font-family: var(--mono); font-size: 12px; color: var(--accent); display: flex; justify-content: space-between; gap: 12px; }
.case-tag em { font-style: normal; color: var(--muted); }
.case h3 { font-family: var(--display); font-weight: 500; font-size: 24px; letter-spacing: -0.02em; line-height: 1.2; margin: 0; }
.case-brief { color: var(--ink-2); font-size: 15px; margin: 0; }
.case-change { font-size: 14.5px; color: var(--ink-2); border-left: 2px solid var(--proposed); padding: 2px 0 2px 14px; margin: 0; }
.case-change.ok { border-left-color: var(--passed); }
.case-change b { color: var(--ink); }
.case-link { margin-top: auto; font-weight: 500; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; padding-top: 8px; }
.case-link::after { content: '→'; transition: transform .3s var(--ease); }
.case-link:hover::after { transform: translateX(6px); }
.case-side { padding: 34px; display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 900px) { .case-side { padding: 24px; } }
.case-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.case-metrics div { padding: 14px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid var(--rule); }
.case-metrics b { display: block; font-family: var(--display); font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--accent); }
.case-metrics span { font-size: 12px; color: var(--muted); line-height: 1.35; display: block; margin-top: 4px; }
.case-side h4 { margin: 0 0 10px; font-size: 12px; font-weight: 500; color: var(--muted); font-family: var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.invariants { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: 14.5px; }
.invariants li { display: grid; grid-template-columns: 20px 1fr; gap: 8px; color: var(--ink-2); }
.invariants li::before { content: '✓'; color: var(--passed); font-weight: 600; }
.case-review { font-size: 14px; color: var(--ink-2); background: rgba(255,255,255,.025); border: 1px solid var(--rule); border-radius: 12px; padding: 14px 16px; margin: 0; }
.case-review b { color: var(--ink); }
.case-pending { padding: 28px; color: var(--muted); }

/* Checker */
.checker { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; border: 1px solid var(--rule-strong); border-radius: 20px; overflow: hidden; background: var(--surface); }
@media (max-width: 860px) { .checker { grid-template-columns: 1fr; } }
.checker-controls { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-right: 1px solid var(--rule); background: var(--bg-2); }
@media (max-width: 860px) { .checker-controls { border-right: 0; border-bottom: 1px solid var(--rule); } }
.toggle { text-align: left; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; padding: 18px; cursor: pointer; display: flex; flex-direction: column; gap: 10px; transition: border-color .25s, background .25s, transform .25s var(--ease); }
.toggle:hover { transform: translateY(-2px); border-color: var(--rule-strong); }
.toggle span { font-weight: 600; }
.toggle code { align-self: flex-start; color: var(--ink-2); background: rgba(255,255,255,.05); }
.toggle[aria-pressed="true"] { border-color: var(--passed); background: rgba(61,220,151,.07); }
.toggle[data-variant="bug"][aria-pressed="true"] { border-color: var(--failed); background: rgba(255,91,74,.08); }
.checker-out { padding: 0 26px 26px; display: flex; flex-direction: column; gap: 18px; min-height: 340px; background: #0a0c0f; font-family: var(--mono); }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 14px 0; margin: 0 -26px; padding-left: 18px; border-bottom: 1px solid var(--rule); font-size: 11.5px; color: var(--muted); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--rule-strong); }
.term-bar span { margin-left: 10px; }
.verdict { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; font-size: 15.5px; font-family: var(--font); }
.verdict .badge { font-family: var(--mono); font-size: 11.5px; font-weight: 500; padding: 4px 9px; flex: none; margin-top: 2px; border-radius: 6px; }
.verdict .badge.ok { background: rgba(61,220,151,.14); color: var(--passed); }
.verdict .badge.bad { background: rgba(255,91,74,.15); color: var(--failed); animation: blink 1s steps(2) 3; }
@keyframes blink { 50% { opacity: .3; } }
.verdict small { display: block; font-weight: 400; color: var(--ink-2); font-size: 14.5px; margin-top: 4px; }
.trace { list-style: none; margin: 0; padding: 0; font-size: 13px; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.trace li { display: grid; grid-template-columns: 24px minmax(130px, auto) 1fr; gap: 12px; padding: 11px 14px; opacity: 0; transform: translateX(-8px); transition: opacity .35s ease, transform .35s var(--ease); }
.trace li + li { border-top: 1px solid var(--rule); }
.trace li.shown { opacity: 1; transform: none; }
.trace .n { color: var(--muted); } .trace .act { color: var(--accent-2); } .trace .st-text { color: var(--ink-2); }
.trace li.boom { background: rgba(255,91,74,.08); } .trace li.boom .st-text { color: var(--failed); }
@media (max-width: 560px) { .trace li { grid-template-columns: 20px 1fr; } .trace .st-text { grid-column: 2; } }
.gauge { position: relative; height: 30px; background: rgba(255,255,255,.05); margin-top: auto; border-radius: 6px; }
.gauge-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--passed); border-radius: 6px; transition: width .5s var(--ease), background .3s; box-shadow: 0 0 20px rgba(61,220,151,.4); }
.gauge-fill.over { background: var(--failed); box-shadow: 0 0 24px rgba(255,91,74,.6); }
.gauge-limit { position: absolute; top: -6px; bottom: -6px; left: 75%; width: 2px; background: var(--ink); }
.gauge-limit span { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); font-size: 12px; white-space: nowrap; color: var(--ink); }

/* Problems: each risk closes as it passes the middle of the screen. */
.problems { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.problems article { padding: 26px; border: 1px solid var(--rule); border-radius: 18px; background: var(--surface); position: relative; overflow: hidden; transition: border-color .5s; }
.problems article::before { content: ''; position: absolute; inset: 0 0 auto; height: 2px; background: var(--failed); transform-origin: 0 50%; transition: background .5s; }
.problems article.closed { border-color: var(--rule-strong); }
.problems article.closed::before { background: linear-gradient(90deg, var(--passed), var(--accent)); }
.risk { display: inline-flex; font-family: var(--mono); font-size: 11px; padding: 3px 8px; border-radius: 6px; margin-bottom: 16px; color: var(--failed); background: rgba(255,91,74,.1); transition: all .4s; }
.risk::after { content: 'риск открыт'; }
.closed .risk { color: var(--passed); background: rgba(61,220,151,.1); }
.closed .risk::after { content: 'закрыто проверкой'; }
.problems p { margin: 0 0 14px; color: var(--ink-2); font-size: 15px; }
.problems .fix { margin: 0; color: var(--ink); padding-top: 14px; border-top: 1px dashed var(--rule-strong); }
@media (max-width: 980px) { .problems { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .problems { grid-template-columns: 1fr; } }

/* Evidence: the "after" points travel from the first run to the final one as the chart scrolls in. */
.evidence { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 980px) { .evidence { grid-template-columns: 1fr; } }
.chart { margin: 0; background: var(--surface); border: 1px solid var(--rule-strong); border-radius: 20px; padding: 26px 28px; }
.chart figcaption { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.chart figcaption b { font-weight: 600; }
.legend { display: flex; gap: 8px; align-items: center; color: var(--ink-2); font-size: 14px; flex-wrap: wrap; }
.sw { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.sw.after { margin-left: 10px; }
.sw.before { background: var(--before); } .sw.after { background: var(--after); }
.dumbbell { position: relative; --t: var(--p, 1); }
.db-row { display: grid; grid-template-columns: minmax(120px, 220px) 1fr 56px; align-items: center; gap: 12px; height: 32px; font-size: 13.5px; border-radius: 6px; }
.db-row:hover { background: rgba(255,255,255,.035); }
.db-name { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 4px; }
.db-track { position: relative; height: 100%; }
.db-track::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--rule); }
.db-line { position: absolute; top: calc(50% - 1px); height: 2px; background: linear-gradient(90deg, var(--before), var(--after)); opacity: .55; left: calc(var(--a) * 10%); width: calc(var(--d) * var(--t) * 10%); transform: scaleX(var(--s)); transform-origin: 0 50%; }
.db-pt { position: absolute; top: 50%; width: 11px; height: 11px; border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 0 3px var(--surface); }
.db-pt.before { background: var(--before); left: calc(var(--a) * 10%); }
.db-pt.after { background: var(--after); left: calc((var(--a) + (var(--b) - var(--a)) * var(--t)) * 10%); box-shadow: 0 0 0 3px var(--surface), 0 0 12px rgba(198,244,50,.6); }
.db-val { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; }
.db-axis { display: grid; grid-template-columns: minmax(120px, 220px) 1fr 56px; gap: 12px; font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 8px; }
.db-axis div { position: relative; height: 14px; }
.db-axis span { position: absolute; transform: translateX(-50%); }
.db-tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--bg); padding: 7px 10px; font-size: 13px; white-space: nowrap; z-index: 5; transform: translate(-50%, -115%); opacity: 0; transition: opacity .12s; border-radius: 8px; }
.as-table { margin-top: 16px; font-size: 14px; }
.as-table summary { cursor: pointer; color: var(--accent); }
.as-table table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.as-table th, .as-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--rule); }
.as-table .num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .db-row, .db-axis { grid-template-columns: 96px 1fr 48px; } .chart { padding: 20px 16px; } }
.evidence-side { display: flex; flex-direction: column; gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--rule); border-radius: 16px; padding: 18px 22px; }
.kpi b { display: block; font-family: var(--display); font-size: 30px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi:first-child b { color: var(--accent); }
.kpi span { color: var(--muted); font-size: 14px; }
.limits { border: 1px solid rgba(240,180,64,.3); border-radius: 16px; padding: 18px 22px; background: rgba(240,180,64,.04); }
.limits h3 { font-size: 15px; color: var(--proposed); }
.limits ul { margin: 0; padding-left: 18px; font-size: 14px; color: var(--ink-2); display: flex; flex-direction: column; gap: 6px; }

/* Value */
.calc { display: grid; grid-template-columns: 1.4fr 1fr; border: 1px solid var(--rule-strong); border-radius: 20px; overflow: hidden; background: var(--surface); margin-bottom: 20px; }
@media (max-width: 860px) { .calc { grid-template-columns: 1fr; } }
.calc-in { padding: 28px; display: flex; flex-direction: column; gap: 22px; border-right: 1px solid var(--rule); }
@media (max-width: 860px) { .calc-in { border-right: 0; border-bottom: 1px solid var(--rule); } }
.calc-in label { display: grid; grid-template-columns: 1fr 110px; gap: 10px 16px; font-size: 15px; color: var(--ink-2); }
.calc-in input { grid-column: 1 / -1; width: 100%; -webkit-appearance: none; appearance: none; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--accent) var(--fill, 50%), var(--rule-strong) var(--fill, 50%)); outline-offset: 6px; }
.calc-in input::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); border: 4px solid var(--accent); cursor: grab; transition: transform .2s; }
.calc-in input::-webkit-slider-thumb:hover { transform: scale(1.2); }
.calc-in input::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--ink); border: 4px solid var(--accent); cursor: grab; }
.calc-in output { grid-row: 1; grid-column: 2; text-align: right; font-family: var(--mono); color: var(--ink); font-variant-numeric: tabular-nums; }
.calc-out { padding: 32px; display: flex; flex-direction: column; justify-content: center; gap: 8px; background: radial-gradient(500px 300px at 100% 0%, rgba(198,244,50,.14), transparent 70%), var(--bg-2); }
.calc-out span { color: var(--ink-2); }
.calc-out b { font-family: var(--display); font-size: clamp(32px, 3.6vw, 50px); font-weight: 500; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--accent); }
.calc-out small { color: var(--muted); font-size: 14px; }
.formats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.formats article { padding: 28px; border: 1px solid var(--rule); border-radius: 18px; background: var(--surface); transition: transform .4s var(--ease), border-color .4s; }
.formats article:hover { transform: translateY(-4px); border-color: var(--accent); }
.f-n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(198,244,50,.1); color: var(--accent); font-family: var(--display); font-size: 14px; margin-bottom: 18px; }
.formats p { margin: 0; color: var(--ink-2); font-size: 15px; }
@media (max-width: 900px) { .formats { grid-template-columns: 1fr; } }

/* Contact */
.contact { padding: 160px 0 40px; text-align: center; overflow: hidden; }
.contact::before { content: ''; position: absolute; left: 50%; top: 55%; width: 760px; height: 760px; transform: translate(-50%, -50%) scale(calc(.4 + var(--p, 1) * .6)); background: radial-gradient(circle, rgba(198,244,50,.16), transparent 60%); pointer-events: none; z-index: -1; }
.contact-status { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 13px; color: var(--passed); margin: 0 0 24px; }
.contact-title { font-size: clamp(40px, 8vw, 120px); line-height: 1; letter-spacing: -0.05em; margin: 0 0 28px; background: linear-gradient(180deg, var(--ink) 30%, rgba(236,232,223,.35)); -webkit-background-clip: text; background-clip: text; color: transparent; transform: scale(calc(.9 + var(--p, 1) * .1)); }
.contact .sub { max-width: 640px; margin: 0 auto 36px; }
.contact-links { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.foot { padding: 48px 0 40px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--rule); margin-top: 80px; font-family: var(--mono); }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--d, 0) * 80ms); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .trace li { transition: none; }
  .split .w > span { transform: none; transition: none; }
  .js .sweep-title .solid, .js .sweep-title .beam { animation: none; }
  .catches li { opacity: 1; transform: none; }
  .hero-copy, .hero-model, .ticker-row, .contact-title { transform: none !important; opacity: 1 !important; }
  .mark i, .dot { animation: none; }
}
