:root {
  --ink: #f4f1e8;
  --muted: #aaa89f;
  --black: #0a0b0d;
  --panel: #111317;
  --line: #292c31;
  --acid: #d7ff3f;
  --orange: #ff6240;
  --cyan: #61e7e2;
  --shell: min(1180px, calc(100vw - 48px));
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--black);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-feature-settings: "tnum" 1, "ss01" 1;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    radial-gradient(circle at 84% 12%, rgb(215 255 63 / 8%), transparent 28%),
    radial-gradient(circle at 8% 42%, rgb(97 231 226 / 5%), transparent 24%),
    var(--black);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

.shell { width: var(--shell); margin-inline: auto; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  border-bottom: 1px solid var(--line);
  font: 700 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.12em;
}

.brand { display: flex; gap: 13px; align-items: center; color: inherit; text-decoration: none; }
.brand em { color: #777a80; font-style: normal; }
.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--black);
  background: var(--acid);
  font: 900 17px/1 ui-monospace, monospace;
  transform: rotate(-3deg);
}

.status { display: flex; align-items: center; gap: 9px; color: var(--muted); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #777a80; box-shadow: 0 0 12px #777a80; }
.status.verified { color: var(--acid); }
.status.verified .status-dot { background: var(--acid); box-shadow: 0 0 12px var(--acid); }
.status.unverified { color: var(--orange); }
.status.unverified .status-dot { background: var(--orange); box-shadow: 0 0 12px var(--orange); }
.evidence-warning { margin-top: 14px; padding: 13px 16px; border: 1px solid rgb(255 98 64 / 55%); color: #ffc1b5; background: rgb(255 98 64 / 10%); font: 650 10px/1.5 ui-monospace, monospace; letter-spacing: 0.04em; }
.evidence-warning[hidden] { display: none; }

.hero { padding: 112px 0 84px; }
.eyebrow { margin: 0 0 22px; color: var(--acid); font: 700 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.15em; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 1050px; margin-bottom: 30px; font-size: clamp(64px, 9.2vw, 136px); line-height: 0.84; letter-spacing: -0.068em; }
h1 span { color: var(--acid); }
.lede { max-width: 820px; color: #c8c6bf; font-size: clamp(19px, 2.1vw, 27px); line-height: 1.42; letter-spacing: -0.025em; }

.hero-metrics { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 72px; border: 1px solid var(--line); }
.hero-metrics article { min-height: 140px; padding: 27px 30px; border-right: 1px solid var(--line); background: rgb(17 19 23 / 75%); }
.hero-metrics article:last-child { border: 0; }
.hero-metrics strong { display: block; margin-bottom: 20px; font-size: clamp(32px, 4vw, 54px); line-height: 1; letter-spacing: -0.055em; }
.hero-metrics span { color: var(--muted); font: 700 10px/1 ui-monospace, monospace; letter-spacing: 0.12em; }
.hero-metrics .alert-metric { color: var(--black); background: var(--orange); }
.hero-metrics .alert-metric span { color: rgb(10 11 13 / 64%); }
.provenance-line { display: flex; flex-wrap: wrap; gap: 11px; align-items: center; margin-top: 18px; color: #71747a; font: 600 10px/1.5 ui-monospace, monospace; }
.provenance-line code { color: #a6a9ae; }

.contrast-section { padding: 104px 0 112px; border-block: 1px solid var(--line); background: #0d0f12; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 46px; }
h2 { margin-bottom: 0; font-size: clamp(43px, 6vw, 74px); line-height: 0.96; letter-spacing: -0.052em; }
.mode-switch { display: flex; padding: 4px; border: 1px solid #34373d; background: var(--black); }
.mode-switch button { padding: 13px 15px; border: 0; color: #85888d; background: transparent; cursor: pointer; font: 700 10px/1 ui-monospace, monospace; letter-spacing: 0.09em; }
.mode-switch button.active { color: var(--black); background: var(--acid); }

.chart-card { padding: 28px 30px 30px; border: 1px solid var(--line); background: var(--panel); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; margin-bottom: 30px; color: #8a8d92; font: 600 10px/1 ui-monospace, monospace; letter-spacing: 0.07em; }
.chart-legend i { display: inline-block; width: 19px; height: 7px; margin-right: 7px; vertical-align: 1px; }
.chart-legend .allowed { background: rgb(215 255 63 / 27%); border: 1px solid var(--acid); }
.chart-legend .observed { height: 2px; background: var(--orange); }
.chart-callout { margin-left: auto; color: var(--orange); }
.range-chart { display: grid; gap: 16px; }
.range-row { display: grid; grid-template-columns: 122px 1fr 116px; gap: 16px; align-items: center; }
.range-label strong { display: block; font: 750 12px/1.2 ui-monospace, monospace; }
.range-label small, .range-value { color: #777a80; font: 550 9px/1.4 ui-monospace, monospace; }
.range-track { position: relative; height: 32px; background: #191b20; overflow: hidden; }
.range-track::after { position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; content: ""; background: #43464c; }
.allowed-band { position: absolute; top: 5px; bottom: 5px; border-inline: 1px solid var(--acid); background: rgb(215 255 63 / 14%); transition: inset 360ms ease; }
.observed-line { position: absolute; top: 14px; height: 4px; min-width: 2px; background: var(--orange); box-shadow: 0 0 11px rgb(255 98 64 / 32%); transition: left 360ms ease, width 360ms ease, background 250ms ease; }
.observed-line::before, .observed-line::after { position: absolute; top: -3px; width: 2px; height: 10px; content: ""; background: inherit; }
.observed-line::before { left: 0; }
.observed-line::after { right: 0; }
.range-row.pass .observed-line { background: var(--cyan); box-shadow: 0 0 11px rgb(97 231 226 / 32%); }
.range-value { text-align: right; }
.chart-note { margin: 28px 0 0 138px; color: #8f9298; font-size: 13px; line-height: 1.5; }

.gripper-section { padding: 112px 0; }
.section-heading.compact { align-items: end; }
.section-copy { max-width: 440px; margin: 0; color: #9da0a5; font-size: 16px; line-height: 1.6; }
.section-copy code { color: var(--acid); }
.gripper-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 22px; }
.matrix-card, .repair-card { border: 1px solid var(--line); background: var(--panel); }
.matrix-card { padding: 28px; }
.matrix-title { display: flex; justify-content: space-between; margin-bottom: 28px; font: 700 10px/1 ui-monospace, monospace; letter-spacing: 0.1em; }
.matrix-title h3 { margin: 0; font: inherit; }
.matrix-title span { color: #73767c; }
.matrix { display: grid; grid-template-columns: 44px 1fr 1fr; gap: 7px; position: relative; padding-top: 26px; padding-left: 34px; }
.axis-label { position: absolute; color: #6f7278; font: 650 8px/1 ui-monospace, monospace; letter-spacing: 0.08em; }
.action-axis { top: 0; left: 50%; transform: translateX(-28%); }
.state-axis { left: -20px; top: 59%; transform: rotate(-90deg); }
.matrix-head, .matrix-row { display: grid; place-items: center; color: #7d8085; font: 700 11px/1 ui-monospace, monospace; }
.cell { min-height: 105px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid rgb(97 231 226 / 12%); background: rgb(97 231 226 / 6%); }
.cell.high { background: rgb(97 231 226 / 21%); border-color: rgb(97 231 226 / 36%); }
.cell.max { color: var(--black); background: var(--cyan); border-color: var(--cyan); }
.cell strong { font-size: clamp(19px, 2.4vw, 30px); letter-spacing: -0.04em; }
.cell span { margin-top: 6px; opacity: 0.62; font: 650 9px/1 ui-monospace, monospace; }
.matrix-summary { display: flex; align-items: baseline; justify-content: space-between; margin-top: 23px; padding-top: 20px; border-top: 1px solid var(--line); }
.matrix-summary strong { color: var(--cyan); font-size: 32px; letter-spacing: -0.05em; }
.matrix-summary span { color: #82858b; font: 600 10px/1 ui-monospace, monospace; }

.repair-card { padding: 31px; }
.repair-kicker { margin-bottom: 10px; color: var(--acid); font: 700 9px/1 ui-monospace, monospace; letter-spacing: 0.12em; }
.repair-card h3 { font-size: 30px; letter-spacing: -0.04em; }
.bit-flow { display: grid; grid-template-columns: 1fr 66px 1fr; gap: 8px; align-items: stretch; margin-top: 10px; }
.bit-flow > div:not(.arrow) { display: flex; align-items: center; justify-content: space-between; min-height: 76px; padding: 13px; border: 1px solid #35383e; background: #191b1f; }
.bit-flow span { max-width: 70px; color: #787b81; font: 650 8px/1.3 ui-monospace, monospace; }
.bit-flow strong { font: 700 31px/1 ui-monospace, monospace; }
.bit-flow .arrow { display: grid; place-items: center; color: #73767b; font: 650 10px/1 ui-monospace, monospace; }
.bit-flow .open-bit { border-color: rgb(215 255 63 / 45%) !important; background: rgb(215 255 63 / 10%) !important; }
.bit-flow .open-bit strong { color: var(--acid); }
.repair-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 26px 0; color: #96999e; font: 600 9px/1.3 ui-monospace, monospace; }
.repair-code { display: block; overflow-x: auto; padding: 15px; color: var(--acid); background: #090a0c; font-size: 10px; }

.evidence-section { padding: 104px 0; border-block: 1px solid var(--line); background: var(--acid); color: var(--black); }
.evidence-section .eyebrow { color: #596817; }
.evidence-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 90px; }
.proof-list article { display: grid; grid-template-columns: 45px 1fr; gap: 20px; padding: 22px 0; border-top: 1px solid rgb(10 11 13 / 22%); }
.proof-list article:last-child { border-bottom: 1px solid rgb(10 11 13 / 22%); }
.proof-list span { font: 750 11px/1.5 ui-monospace, monospace; }
.proof-list p { margin: 0; font-size: 17px; line-height: 1.5; }

.reproduce-section { padding: 104px 0 112px; }
.terminal { border: 1px solid #32353b; background: #0e1013; box-shadow: 0 24px 80px rgb(0 0 0 / 22%); }
.terminal-bar { display: flex; align-items: center; gap: 7px; height: 42px; padding: 0 15px; border-bottom: 1px solid #2b2e33; color: #71747a; font: 650 8px/1 ui-monospace, monospace; letter-spacing: 0.1em; }
.terminal-bar i { width: 7px; height: 7px; border-radius: 50%; background: #3e4147; }
.terminal-bar span { margin-left: auto; }
.terminal pre { margin: 0; overflow-x: auto; padding: 29px; color: #d0cec8; font: 500 13px/2 ui-monospace, SFMono-Regular, Menlo, monospace; }
.terminal code span { color: var(--acid); }
.terminal code b { color: var(--cyan); font-weight: 600; }
.artifact-links { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-top: 0; }
.artifact-links a { display: flex; justify-content: space-between; padding: 18px 20px; border-right: 1px solid var(--line); color: #999ca1; text-decoration: none; font: 650 9px/1 ui-monospace, monospace; letter-spacing: 0.08em; transition: color 150ms, background 150ms; }
.artifact-links a:last-child { border: 0; }
.artifact-links a:hover { color: var(--black); background: var(--acid); }

.footer { display: flex; justify-content: space-between; padding: 30px 0 42px; border-top: 1px solid var(--line); color: #62656a; font: 600 9px/1 ui-monospace, monospace; letter-spacing: 0.1em; }

@media (max-width: 820px) {
  :root { --shell: min(100% - 28px, 680px); }
  .hero { padding-top: 80px; }
  .hero-metrics, .gripper-grid, .evidence-grid { grid-template-columns: 1fr; }
  .hero-metrics article { border-right: 0; border-bottom: 1px solid var(--line); }
  .hero-metrics article:last-child { border-bottom: 0; }
  .section-heading { display: grid; align-items: start; }
  .mode-switch { width: fit-content; }
  .range-row { grid-template-columns: 92px 1fr; }
  .range-value { display: none; }
  .chart-note { margin-left: 108px; }
  .section-heading.compact { align-items: start; }
  .evidence-grid { gap: 44px; }
  .artifact-links { grid-template-columns: 1fr; }
  .artifact-links a { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 520px) {
  .status { display: none; }
  h1 { font-size: 57px; }
  .hero { padding-bottom: 60px; }
  .contrast-section, .gripper-section, .evidence-section, .reproduce-section { padding-block: 76px; }
  .chart-card, .matrix-card, .repair-card { padding: 19px; }
  .chart-legend { align-items: flex-start; }
  .chart-callout { width: 100%; margin-left: 0; }
  .range-row { grid-template-columns: 72px 1fr; gap: 9px; }
  .range-label small { display: none; }
  .chart-note { margin-left: 0; }
  .matrix { padding-left: 20px; }
  .cell { min-height: 84px; }
  .repair-meta { grid-template-columns: 1fr; }
  .bit-flow { grid-template-columns: 1fr 48px 1fr; }
  .footer { display: grid; gap: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
