@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --bg: #0c0d0f;
  --bg-2: #111316;
  --panel: #16181c;
  --panel-2: #1c1f24;
  --line: #2a2e35;
  --line-2: #3a3f48;
  --text: #ece8df;
  --muted: #979da7;
  --dim: #646a74;
  --hazard: #ffd21f;
  --hazard-ink: #111111;
  --holds: #6fdc8c;
  --untested: #a7b0bd;
  --cracked: #ff9f1c;
  --fails: #ff4f4f;
  --v-solid: #6fdc8c;
  --v-holds: #b8e05a;
  --v-dented: #ffd21f;
  --v-unclear: #a7b0bd;
  --v-larp: #ff9f1c;
  --v-rigged: #ff4f4f;
  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --r: 6px;
  --stripes: repeating-linear-gradient(-45deg, var(--hazard) 0 12px, var(--hazard-ink) 12px 24px);
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 var(--sans);
  font-stretch: 100%;
  overflow-x: hidden;
}
body::before {
  /* measurement grid of a crash-test hall floor */
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000 0, transparent 900px);
  z-index: 0;
}
a { color: inherit; }
button, input { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: var(--hazard); color: var(--hazard-ink); }
:focus-visible { outline: 2px solid var(--hazard); outline-offset: 2px; }

.mono { font-family: var(--mono); font-size: 0.82em; letter-spacing: 0; }
.dim { color: var(--dim); }
.muted { color: var(--muted); }
.wrap { position: relative; z-index: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- type ---------- */
.display {
  font-weight: 900;
  font-stretch: 125%;
  text-transform: uppercase;
  line-height: 0.92;
  letter-spacing: -0.01em;
  margin: 0;
}
.eyebrow {
  font: 500 12px/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before { content: ""; width: 14px; height: 14px; background: var(--stripes); border-radius: 2px; flex: none; }
.section-title { font-size: clamp(30px, 5vw, 58px); }
.section-title em { font-style: normal; color: var(--hazard); }
.lead { color: var(--muted); font-size: 17px; max-width: 58ch; }
.lead b { color: var(--text); font-weight: 600; }

/* ---------- marks ---------- */
.target {
  --s: 26px;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: conic-gradient(var(--hazard) 0 25%, var(--hazard-ink) 0 50%, var(--hazard) 0 75%, var(--hazard-ink) 0);
  box-shadow: 0 0 0 2px var(--hazard-ink), 0 0 0 3.5px var(--hazard);
  flex: none;
}
.stripes { height: 14px; background: var(--stripes); }
.stripes.thin { height: 6px; }

/* ---------- top bar ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 13, 15, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 14px; height: 62px; }
.logo { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.logo b { font-weight: 900; font-stretch: 125%; font-size: 21px; letter-spacing: 0.01em; }
.chip {
  font: 500 11px/1 var(--mono);
  padding: 6px 8px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  color: var(--muted);
  white-space: nowrap;
}
.nav { display: flex; gap: 4px; margin-left: 10px; }
.nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 4px;
  color: var(--muted);
}
.nav a:hover { color: var(--text); background: var(--panel); }
.nav a.on { color: var(--hazard-ink); background: var(--hazard); }
.top .spacer { flex: 1; }
.live { display: flex; align-items: center; gap: 8px; font: 500 12px/1 var(--mono); color: var(--muted); white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--holds); box-shadow: 0 0 0 3px rgba(111, 220, 140, 0.18); flex: none; }
.dot.off { background: var(--untested); box-shadow: none; }
.dot.warn { background: var(--cracked); box-shadow: 0 0 0 3px rgba(255, 159, 28, 0.2); }
.ca { cursor: copy; }
.ca b { color: var(--text); font-weight: 600; }
.xlink { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 4px; text-decoration: none; }
.xlink:hover { border-color: var(--hazard); color: var(--hazard); }
.xlink[hidden] { display: none; }

/* ---------- hero ---------- */
.hero { padding: clamp(36px, 7vw, 84px) 0 clamp(40px, 6vw, 72px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.hero h1 { font-size: clamp(40px, 6vw, 86px); margin: 18px 0 22px; }
.hero h1 .hit { display: inline-block; background: var(--hazard); color: var(--hazard-ink); padding: 0 0.12em; margin-left: -0.06em; transform: skew(-6deg); }
.hero h1 .hit span { display: inline-block; transform: skew(6deg); }

.crash-form { margin-top: 28px; max-width: 620px; }
.crash-input {
  display: flex;
  gap: 8px;
  padding: 7px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  transition: border-color 0.15s;
}
.crash-input:focus-within { border-color: var(--hazard); }
.crash-input input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  padding: 12px 12px;
  font-size: 16px;
}
.crash-input input::placeholder { color: var(--dim); }
.btn {
  border: 0;
  cursor: pointer;
  font-weight: 800;
  font-stretch: 112%;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 15px;
  padding: 12px 20px;
  border-radius: 5px;
  background: var(--hazard);
  color: var(--hazard-ink);
  white-space: nowrap;
  transition: transform 0.08s, filter 0.15s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn[disabled] { opacity: 0.6; cursor: wait; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line-2); }
.btn.ghost:hover { border-color: var(--hazard); color: var(--hazard); }
.hints { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font: 400 12px/1.5 var(--mono); color: var(--dim); }
.form-msg { min-height: 20px; margin-top: 8px; font: 500 13px/1.4 var(--mono); color: var(--cracked); }
.statline { display: flex; align-items: center; gap: 8px; margin-top: 18px; font: 500 12px/1.4 var(--mono); color: var(--muted); }

/* test cell around the 3D dummy */
.cell {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 520px;
  width: 100%;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    radial-gradient(120% 80% at 50% 100%, rgba(255, 210, 31, 0.08), transparent 60%),
    linear-gradient(var(--bg-2), var(--bg));
  overflow: hidden;
}
.cell canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.cell::before, .cell::after {
  content: "";
  position: absolute;
  width: 46px;
  height: 46px;
  border: 3px solid var(--hazard);
  z-index: 2;
  pointer-events: none;
}
.cell::before { top: 12px; left: 12px; border-right: 0; border-bottom: 0; }
.cell::after { bottom: 12px; right: 12px; border-left: 0; border-top: 0; }
.cell .hud { position: absolute; left: 26px; top: 24px; z-index: 2; font: 500 11px/1.5 var(--mono); color: var(--dim); }
.cell .hud b { color: var(--hazard); font-weight: 600; }
.cell .floor { position: absolute; left: 0; right: 0; bottom: 0; height: 10px; background: var(--stripes); opacity: 0.85; }
.bubble {
  position: absolute;
  top: 26px;
  right: 22px;
  z-index: 3;
  max-width: 250px;
  padding: 11px 13px;
  background: var(--text);
  color: var(--hazard-ink);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.35;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  text-decoration: none;
  display: block;
}
.bubble::after { content: ""; position: absolute; left: 28px; bottom: -8px; border: 8px solid transparent; border-top-color: var(--text); border-bottom: 0; }
.bubble small { display: block; font: 600 10px/1.4 var(--mono); letter-spacing: 0.08em; color: #6b5a00; text-transform: uppercase; margin-bottom: 3px; }

/* ---------- sections ---------- */
section { position: relative; z-index: 1; }
.band { padding: clamp(48px, 7vw, 96px) 0; border-top: 1px solid var(--line); }
.band-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.band-head p { margin: 14px 0 0; }

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.step {
  position: relative;
  padding: 22px 20px 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.step .n { font: 600 12px/1 var(--mono); color: var(--hazard); letter-spacing: 0.06em; }
.step h3 { font-weight: 850; font-stretch: 118%; text-transform: uppercase; font-size: 20px; line-height: 1.05; margin: 14px 0 8px; }
.step p { margin: 0; color: var(--muted); font-size: 14.5px; }
.step svg { width: 40px; height: 40px; margin-top: 18px; color: var(--hazard); }
.step::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--stripes); opacity: 0; transition: opacity 0.2s; }
.step:hover::after { opacity: 1; }

/* ---------- verdict colors ---------- */
[data-v="SOLID"] { --vc: var(--v-solid); }
[data-v="HOLDS UP"] { --vc: var(--v-holds); }
[data-v="DENTED"] { --vc: var(--v-dented); }
[data-v="UNCLEAR"] { --vc: var(--v-unclear); }
[data-v="LARP"] { --vc: var(--v-larp); }
[data-v="RIGGED"] { --vc: var(--v-rigged); }
[data-s="holds"] { --sc: var(--holds); }
[data-s="untested"] { --sc: var(--untested); }
[data-s="cracked"] { --sc: var(--cracked); }
[data-s="fails"] { --sc: var(--fails); }
.vpill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 700 11px/1 var(--mono);
  letter-spacing: 0.05em;
  padding: 5px 7px;
  border-radius: 3px;
  color: var(--hazard-ink);
  background: var(--vc, var(--untested));
  white-space: nowrap;
}
.vpill.queued, .vpill.running { background: transparent; color: var(--muted); border: 1px solid var(--line-2); }
.vpill.running { color: var(--hazard); border-color: rgba(255, 210, 31, 0.5); }
.vpill.failed { background: transparent; color: var(--fails); border: 1px solid rgba(255, 79, 79, 0.5); }
.spill { font: 700 10px/1 var(--mono); letter-spacing: 0.06em; padding: 4px 6px; border-radius: 3px; color: var(--hazard-ink); background: var(--sc); text-transform: uppercase; white-space: nowrap; }

/* ---------- rows (feed) ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.filters button {
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--muted);
  padding: 7px 11px;
  border-radius: 4px;
  font: 600 12px/1 var(--mono);
  cursor: pointer;
}
.filters button.on { background: var(--text); color: var(--hazard-ink); border-color: var(--text); }
.filters input { background: var(--panel); border: 1px solid var(--line-2); border-radius: 4px; padding: 7px 10px; font-size: 13px; min-width: 0; width: 220px; outline: 0; }
.filters input:focus { border-color: var(--hazard); }
.rows { display: flex; flex-direction: column; border-top: 1px solid var(--line); margin-top: 16px; }
.row {
  display: grid;
  grid-template-columns: 112px 44px minmax(0, 1.1fr) minmax(0, 2fr) 72px;
  gap: 14px;
  align-items: center;
  padding: 13px 8px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: background 0.12s;
}
.row:hover { background: var(--panel); }
.row .score { font: 800 22px/1 var(--sans); font-stretch: 112%; color: var(--vc, var(--dim)); text-align: right; }
.row .subj { display: flex; align-items: center; gap: 10px; min-width: 0; }
.row .subj img, .row .subj .ph { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex: none; background: var(--panel-2); border: 1px solid var(--line-2); }
.row .subj .ph { display: grid; place-items: center; font: 700 11px/1 var(--mono); color: var(--dim); }
.row .subj b { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .subj small { font: 500 10px/1.3 var(--mono); color: var(--dim); letter-spacing: 0.06em; text-transform: uppercase; }
.row .what { min-width: 0; }
.row .what b { display: block; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .what span { display: block; color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .when { font: 500 12px/1 var(--mono); color: var(--dim); text-align: right; }
.empty { padding: 28px 8px; color: var(--dim); font: 500 13px/1.5 var(--mono); }

/* ---------- on the track (live run) ---------- */
.track { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 14px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font: 600 11px/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.ticker { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.ticker li { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-top: 1px dashed var(--line); }
.ticker li:first-child { border-top: 0; }
.ticker .t { font: 500 12px/1.5 var(--mono); color: var(--hazard); }
.ticker b { font-weight: 600; }
.ticker span { color: var(--muted); display: block; overflow-wrap: anywhere; font-size: 13px; }
.frame {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line-2);
  aspect-ratio: 16 / 10;
}
.frame img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.frame .rec { position: absolute; left: 10px; top: 10px; font: 600 11px/1 var(--mono); background: rgba(0, 0, 0, 0.7); padding: 5px 7px; border-radius: 3px; color: var(--fails); }
.frame .rec::before { content: "● "; animation: blink 1s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }

/* ---------- footer ---------- */
footer { position: relative; z-index: 1; border-top: 1px solid var(--line); padding: 26px 0 40px; margin-top: 30px; }
footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font: 500 12px/1.5 var(--mono); color: var(--dim); }
footer a { color: var(--muted); }

/* ---------- pet ---------- */
.pet {
  position: fixed;
  right: 14px;
  bottom: 10px;
  width: 132px;
  height: 132px;
  z-index: 40;
  cursor: pointer;
  border: 0;
  padding: 0;
  background: transparent;
}
.pet canvas { width: 100%; height: 100%; display: block; }
.pet .say {
  position: absolute;
  right: 100%;
  bottom: 70px;
  margin-right: -10px;
  width: max-content;
  max-width: 200px;
  background: var(--text);
  color: var(--hazard-ink);
  font-size: 13px;
  line-height: 1.3;
  padding: 8px 10px;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  text-align: left;
}
.pet.talk .say { opacity: 1; transform: none; }

/* ---------- utilities ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 980px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .cell { margin: 0 auto; max-width: 440px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .track { grid-template-columns: 1fr; }
  .live .txt { display: none; }
}
@media (max-width: 720px) {
  .top .wrap { gap: 8px; }
  .logo { gap: 8px; }
  .logo b { font-size: 17px; }
  .logo .target { --s: 22px; }
  .nav { margin-left: 0; gap: 2px; }
  .nav a { padding: 7px 8px; font-size: 13px; white-space: nowrap; }
  .live { display: none; }
  .top .ca, .logo .chip { display: none; }
  .steps { grid-template-columns: 1fr; }
  .row { grid-template-columns: 88px minmax(0, 1fr) 40px; grid-template-areas: "v subj score" "what what what"; row-gap: 8px; }
  .row .vp { grid-area: v; }
  .row .score { grid-area: score; font-size: 18px; }
  .row .subj { grid-area: subj; }
  .row .what { grid-area: what; }
  .row .when { display: none; }
  .filters input { width: 100%; }
  .pet { width: 92px; height: 92px; }
  .crash-input { flex-direction: column; }
  .crash-input .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
