/* ═══════════════════════════════════════════════════════════════════════
   MEMORY PRICE INDEX — silicon winter
   palette: near-black cold base · paper ink · two riso spot inks
   (amber = live/settlement, ice = snapshot/cold) · ember = failure
   motion: heavy settles, no bounce; stop-motion cuts only between modes
   ═══════════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("fonts/barlow-condensed-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("fonts/barlow-condensed-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("fonts/barlow-condensed-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --bg: #060809;
  --bg2: #090c0f;
  --ink: #c9d4d8;
  --ink-dim: #7d8c93;
  --ink-faint: #47545b;
  --line: rgba(151, 178, 190, 0.16);
  --line-soft: rgba(151, 178, 190, 0.08);
  --amber: #d99a3d;
  --amber-hi: #f0b254;
  --ice: #8fc3d4;
  --ice-hi: #b8dce8;
  --ember: #c96a4a;
  --paper: #e8eef0;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --disp: "Barlow Condensed", "Arial Narrow", sans-serif;
  --ease-settle: cubic-bezier(0.19, 1, 0.22, 1);
  --t-slow: 900ms;
  --t-mid: 560ms;
  --strip-h: 44px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { background: var(--bg); }
body {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.locked { overflow: hidden; }

/* fixed atmosphere layers */
#atmo { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
#grain {
  position: fixed; inset: 0; z-index: 3; pointer-events: none;
  width: 100vw; height: 100vh;
  opacity: 0.5;
  mix-blend-mode: overlay;
  image-rendering: pixelated;
}
html[data-frozen="1"] #grain { opacity: 0.34; }
#scanlines {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(4, 6, 8, 0) 0px,
    rgba(4, 6, 8, 0) 2px,
    rgba(3, 5, 7, 0.22) 3px
  );
  mix-blend-mode: multiply;
}
#scanlines::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 50% 40%, rgba(0,0,0,0) 55%, rgba(2,3,5,0.55) 100%);
}

main { position: relative; z-index: 4; }

::selection { background: rgba(217, 154, 61, 0.32); color: var(--paper); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 1px solid var(--amber);
  outline-offset: 2px;
}

/* ── boot ─────────────────────────────────────────────────────────────── */
#boot {
  position: fixed; inset: 0; z-index: 60;
  background: #030405;
  display: grid; place-items: center;
}
#boot.cut-1 { clip-path: inset(0 0 66% 0); }
#boot.cut-2 { clip-path: inset(33% 0 33% 0); }
#boot.cut-3 { clip-path: inset(66% 0 0 0); }
.boot-inner { width: min(520px, 84vw); }
.boot-line {
  font-size: 12px; letter-spacing: 0.08em; color: var(--ink-dim);
  padding: 2px 0;
}
.boot-line.head { color: var(--paper); letter-spacing: 0.22em; }
.boot-line.verdict { color: var(--amber); margin-top: 10px; letter-spacing: 0.12em; }
.boot-caret { color: var(--amber); animation: caret 1.06s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

/* ── status strip ─────────────────────────────────────────────────────── */
#strip {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  height: var(--strip-h);
  display: flex; align-items: stretch; gap: 12px;
  padding: 0 14px;
  background: rgba(5, 7, 9, 0.82);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line-soft);
}
.strip-brand {
  align-self: center;
  font-size: 11px; letter-spacing: 0.24em; color: var(--paper);
  white-space: nowrap;
}
.strip-brand .sep { color: var(--amber); padding: 0 6px; }
#beacon {
  margin-left: auto;
  display: flex; align-items: center; gap: 9px;
  padding: 0 10px;
  border: 1px solid var(--line-soft);
  align-self: center; height: 30px;
  transition: border-color var(--t-mid) var(--ease-settle);
}
#beacon:hover { border-color: var(--line); }
.beacon-lamp { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-faint); flex: none; }
.beacon-label { font-size: 10.5px; letter-spacing: 0.18em; color: var(--paper); }
.beacon-sub { font-size: 9.5px; letter-spacing: 0.06em; color: var(--ink-dim); }
.clock { align-self: center; display: flex; gap: 7px; font-size: 11px; color: var(--ink-dim); letter-spacing: 0.08em; white-space: nowrap; }
.clock .ck-local { color: var(--ink); }

#beacon[data-mode="loading"] .beacon-lamp { background: var(--ink-dim); animation: scanpulse 1.1s steps(2) infinite; }
#beacon[data-mode="live"] .beacon-lamp { background: var(--amber-hi); box-shadow: 0 0 12px rgba(240, 178, 84, 0.55); animation: breath 3.4s var(--ease-settle) infinite; }
#beacon[data-mode="partial"] .beacon-lamp { background: linear-gradient(90deg, var(--amber) 50%, var(--ice) 50%); border-radius: 0; }
#beacon[data-mode="snapshot"] .beacon-lamp { background: var(--ice); box-shadow: 0 0 10px rgba(143, 195, 212, 0.4); }
#beacon[data-mode="snapshot"] .beacon-label { color: var(--ice-hi); }
#beacon[data-mode="failure"] .beacon-lamp { background: var(--ember); animation: scanpulse 0.7s steps(2) infinite; }
@keyframes breath { 50% { opacity: 0.55; } }
@keyframes scanpulse { 50% { opacity: 0.25; } }
.beacon-sub { display: none; }
@media (min-width: 760px) { .beacon-sub { display: inline; } }

/* ── nav rail + pills ─────────────────────────────────────────────────── */
#rail {
  position: fixed; left: 0; top: 50%; transform: translateY(-50%);
  z-index: 40; display: flex; flex-direction: column; gap: 2px;
}
.rail-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px 7px 14px;
  color: var(--ink-faint);
  font-size: 9.5px; letter-spacing: 0.2em;
  transition: color var(--t-mid) var(--ease-settle);
}
.rail-item i { width: 14px; height: 1px; background: currentColor; transition: width var(--t-mid) var(--ease-settle); }
/* labels stay out of the composition until the visitor asks for the rail */
.rail-item span, .rail-item kbd { display: none; }
#rail:hover .rail-item span, #rail:hover .rail-item kbd { display: inline; }
#rail:hover { background: rgba(5, 7, 9, 0.88); border-right: 1px solid var(--line-soft); backdrop-filter: blur(4px); }
.rail-item kbd { font-family: var(--mono); font-size: 9px; border: 1px solid var(--line-soft); padding: 0 3px; }
.rail-item:hover { color: var(--ink-dim); }
.rail-item.on { color: var(--paper); }
.rail-item.on i { width: 26px; background: var(--amber); }
#pills { display: none; }

/* ── panels ───────────────────────────────────────────────────────────── */
.panel {
  min-height: 100vh;
  padding: calc(var(--strip-h) + 54px) 48px 64px;
  position: relative;
}
.kicker { font-size: 10px; letter-spacing: 0.3em; color: var(--amber); margin-bottom: 14px; }
.sec-head h2, .hero-head h1 {
  font-family: var(--disp); font-weight: 600;
  letter-spacing: 0.015em; line-height: 0.94;
  color: var(--paper);
}
.sec-head h2 { font-size: clamp(44px, 7vw, 84px); text-transform: uppercase; }
.sec-sub { margin-top: 10px; font-size: 10.5px; letter-spacing: 0.14em; color: var(--ink-dim); max-width: 640px; }
.sec-head { margin-bottom: 40px; }

/* reveal choreography — heavy rise, one-time */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity var(--t-slow) var(--ease-settle), transform var(--t-slow) var(--ease-settle); }
.reveal.in { opacity: 1; transform: none; }

/* ── 01 hero ──────────────────────────────────────────────────────────── */
#hero { display: flex; flex-direction: column; padding-bottom: 0; }
.hero-grid {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(280px, 5fr) 7fr;
  gap: 30px;
  align-items: center;
  min-height: 0;
}
.hero-head h1 {
  font-size: clamp(64px, 9.5vw, 150px);
  line-height: 0.88;
  text-transform: uppercase;
  margin: 4px 0 20px;
}
.hero-dek { font-size: 11.5px; letter-spacing: 0.18em; color: var(--ink-dim); line-height: 1.9; }
.hero-counts { display: flex; gap: 22px; margin-top: 30px; }
.hero-counts span { font-size: 10px; letter-spacing: 0.2em; color: var(--ink-dim); }
.hero-counts b { font-family: var(--disp); font-weight: 600; font-size: 30px; color: var(--paper); margin-right: 7px; vertical-align: -2px; }
.hero-wafer { position: relative; height: min(74vh, 780px); min-height: 420px; }
.wafer-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-foot {
  border-top: 1px solid var(--line-soft);
  margin-top: 26px;
  padding: 13px 2px 14px;
  font-size: 10.5px; letter-spacing: 0.12em; color: var(--ink-dim);
  min-height: 42px;
  transition: color var(--t-mid) var(--ease-settle);
}
.hero-foot.hot { color: var(--paper); }
.hero-foot b, .hero-foot strong { color: var(--paper); font-weight: 600; }
.hero-foot i { font-style: normal; color: var(--ink-dim); }
.hero-scrollcue {
  display: flex; align-items: center; gap: 10px;
  padding: 0 2px 18px;
  font-size: 9px; letter-spacing: 0.34em; color: var(--ink-faint);
}
.cue-line { width: 1px; height: 34px; background: var(--line); animation: cue 2.6s var(--ease-settle) infinite; }
@keyframes cue { 0% { transform: scaleY(0); transform-origin: top; } 45% { transform: scaleY(1); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ── 02 spec field ────────────────────────────────────────────────────── */
.chips { display: flex; gap: 8px; margin-top: 22px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line-soft);
  color: var(--ink-dim);
  font-size: 10px; letter-spacing: 0.16em;
  padding: 8px 14px;
  transition: all var(--t-mid) var(--ease-settle);
}
.chip:hover { border-color: var(--line); color: var(--ink); }
.chip.on { border-color: var(--amber); color: var(--paper); background: rgba(217, 154, 61, 0.07); }
.field-wrap {
  position: relative;
  height: min(58vh, 560px);
  border: 1px solid var(--line-soft);
  background: linear-gradient(rgba(151,178,190,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(151,178,190,0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  touch-action: pan-y;
  overflow: hidden;
  cursor: crosshair;
}
.field-plot { position: absolute; inset: 0 0 26px 0; }
.field-cols { position: absolute; inset: 0; }
.field-col {
  position: absolute; bottom: 0;
  width: var(--w, 14px);
  transform: translateX(-50%);
  display: flex; flex-direction: column; justify-content: flex-end;
  transition: left var(--t-slow) var(--ease-settle), height var(--t-slow) var(--ease-settle), opacity var(--t-mid) var(--ease-settle);
}
.field-cols.no-anim .field-col { transition: none; }
.field-col .field-col-top { display: block; height: 10px; margin-bottom: 1px; background: currentColor; }
.field-col .field-col-stem { display: block; flex: 1; background: currentColor; opacity: 0.14; }
.field-col .field-col-val {
  position: absolute; top: -21px; left: 50%; transform: translateX(-50%);
  font-size: 11px; letter-spacing: 0.04em; color: var(--ink-dim);
  font-family: var(--disp); font-weight: 600; font-size: 15px;
  white-space: nowrap;
}
.field-col.edge-r .field-col-val { transform: translateX(-78%); }
.cat-dram { color: var(--amber); }
.cat-flash { color: var(--ice); }
.cat-module { color: var(--paper); }
.field-col.stub .field-col-top {
  background: repeating-linear-gradient(45deg, currentColor 0 3px, transparent 3px 6px);
  opacity: 0.55; height: 14px;
}
.field-col.stub .field-col-stem {
  background: repeating-linear-gradient(45deg, currentColor 0 2px, transparent 2px 8px);
  opacity: 0.16;
}
.field-col.dimmed { opacity: 0.08; }
.field-col.dimmed .field-col-val { opacity: 0.4; }
.field-col:hover, .field-col.scrub-near { opacity: 1; filter: brightness(1.25); }
.field-col:hover .field-col-val, .field-col.scrub-near .field-col-val { color: var(--paper); }
.field-cursor {
  position: absolute; top: 0; bottom: 26px; left: 0; width: 1px;
  background: var(--paper); opacity: 0;
  pointer-events: none;
}
.field-cursor.on { opacity: 0.65; }
.field-xaxis { position: absolute; left: 0; right: 0; bottom: 0; height: 26px; }
.field-xaxis .tick {
  position: absolute; bottom: 4px; transform: translateX(-50%);
  font-size: 9px; letter-spacing: 0.1em; color: var(--ink-faint);
}
.field-yaxis { position: absolute; top: 0; bottom: 26px; left: 6px; width: 40px; }
.field-yaxis .ytick {
  position: absolute; left: 0; transform: translateY(50%);
  font-size: 9px; color: var(--ink-faint); letter-spacing: 0.08em;
}
.field-readout { min-height: 58px; margin-top: 12px; }
.readout-plate {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 14px;
  border: 1px solid var(--line-soft); border-left: 2px solid var(--amber);
  padding: 12px 16px;
  animation: platein var(--t-mid) var(--ease-settle);
}
@keyframes platein { from { opacity: 0; transform: translateY(8px); } }
.readout-plate strong { color: var(--paper); font-weight: 600; letter-spacing: 0.04em; }
.rp-dim { color: var(--ink-dim); font-size: 11px; letter-spacing: 0.08em; }
.rp-src { margin-left: auto; font-size: 9px; letter-spacing: 0.3em; color: var(--ink-faint); }
.foot-glyph { margin-top: 16px; font-size: 9.5px; letter-spacing: 0.2em; color: var(--ink-faint); }

/* ── sealed plates (the recurring two-ink motif) ──────────────────────── */
.sealed-plate {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid rgba(217, 154, 61, 0.4);
  padding: 4px 10px;
  position: relative;
  color: var(--amber);
  font-size: 10px; letter-spacing: 0.22em;
  box-shadow: -2px 2px 0 rgba(143, 195, 212, 0.22);
}
.sealed-plate i {
  width: 14px; height: 8px;
  background: repeating-linear-gradient(45deg, rgba(217,154,61,0.7) 0 2px, transparent 2px 5px);
}
.sealed-plate.big { padding: 12px 22px; font-size: 13px; }
.sealed-plate.big i { width: 30px; height: 14px; }
.sealed-word { color: var(--amber); letter-spacing: 0.18em; }

/* ── 03 the tape ──────────────────────────────────────────────────────── */
.tape-sealed[hidden] { display: none; }
.tape-sealed {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
  margin-top: 20px; padding: 14px 0;
}
.tape-sealed-note { font-size: 10px; letter-spacing: 0.12em; color: var(--ink-dim); }
.tape-sort { display: flex; gap: 2px; border-bottom: 1px solid var(--line-soft); margin-bottom: 2px; }
.sortkey {
  font-size: 9.5px; letter-spacing: 0.22em; color: var(--ink-faint);
  padding: 10px 16px;
  border-bottom: 1px solid transparent;
  margin-bottom: -1px;
  transition: all var(--t-mid) var(--ease-settle);
}
.sortkey:hover { color: var(--ink-dim); }
.sortkey.on { color: var(--paper); border-bottom-color: var(--amber); }
.tape-row { border-bottom: 1px solid var(--line-soft); }
.tape-main {
  width: 100%;
  display: grid;
  grid-template-columns: 30px 14px minmax(200px, 1.6fr) 70px minmax(180px, 1.4fr) 110px minmax(140px, 1fr) 70px;
  gap: 12px; align-items: center;
  padding: 13px 2px;
  text-align: left;
  transition: background var(--t-mid) var(--ease-settle);
}
.tape-main:hover { background: rgba(151, 178, 190, 0.035); }
.t-idx { font-size: 10px; color: var(--ink-faint); }
.t-dot { font-size: 7px; }
.t-name { color: var(--paper); font-size: 12.5px; letter-spacing: 0.02em; }
.t-cat { font-size: 9px; letter-spacing: 0.24em; color: var(--ink-dim); }
.t-spec { font-size: 10px; color: var(--ink-dim); letter-spacing: 0.04em; }
.t-price { font-size: 13px; }
.p-val { color: var(--paper); font-weight: 600; }
.t-401 { font-size: 9px; color: var(--rgba-red, var(--ember)); letter-spacing: 0.18em; }
.range-bar {
  position: relative; display: block;
  height: 3px; background: var(--line-soft);
}
.range-fill { position: absolute; top: 0; bottom: 0; background: rgba(217,154,61,0.35); }
.range-price { position: absolute; top: -3px; width: 2px; height: 9px; background: var(--paper); }
.range-nums { display: flex; justify-content: space-between; margin-top: 4px; }
.range-nums i { font-style: normal; font-size: 8.5px; color: var(--ink-faint); }
.range-bar.sealed { height: 8px; }
.range-hatch {
  display: block; height: 100%;
  background: repeating-linear-gradient(45deg, rgba(151,178,190,0.14) 0 2px, transparent 2px 6px);
}
.up { color: var(--amber); }
.down { color: var(--ember); }

/* ── 04 drift ─────────────────────────────────────────────────────────── */
.drift-controls { margin-top: 20px; }
.drift-selwrap { display: flex; align-items: center; gap: 10px; font-size: 9.5px; letter-spacing: 0.24em; color: var(--ink-faint); }
select {
  font-family: var(--mono); font-size: 11.5px;
  background: var(--bg2); color: var(--paper);
  border: 1px solid var(--line-soft);
  padding: 9px 12px;
  max-width: 340px;
}
.drift-grid {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 40px;
  align-items: start;
}
.daywheel { width: 100%; max-width: 300px; display: block; }
.daywheel-state { margin-top: 12px; }
.dw-clock { font-family: var(--disp); font-size: 30px; font-weight: 600; color: var(--paper); }
.dw-line { font-size: 10px; letter-spacing: 0.2em; margin-top: 4px; color: var(--ice); }
.dw-line.settled { color: var(--amber); }
.dw-line.weekend { color: var(--ink-faint); }
.dw-next { font-size: 9.5px; letter-spacing: 0.12em; color: var(--ink-dim); margin-top: 3px; }
.drift-chart { position: relative; min-height: 380px; border: 1px solid var(--line-soft); }
.drift-caption {
  position: absolute; left: 14px; bottom: 10px;
  font-size: 9px; letter-spacing: 0.22em; color: var(--ink-faint);
}
.drift-empty {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
}
.axis-h { position: absolute; left: 8%; right: 8%; bottom: 22%; height: 1px; background: var(--line-soft); }
.drift-empty-note { font-size: 10px; letter-spacing: 0.14em; color: var(--ink-dim); }
.drift-empty-note.dim { color: var(--ink-faint); }
.drift-empty-note b { color: var(--ember); }
.range-cols {
  position: absolute; inset: 26px 20px 56px;
  display: flex; align-items: flex-end; gap: 3%;
}
.rcol { position: relative; flex: 1; height: 100%; }
.rcol-bar {
  position: absolute; left: 0; right: 0;
  bottom: var(--lo, 0); height: calc(var(--hi, 100%) - var(--lo, 0%));
  background: color-mix(in srgb, var(--c) 22%, transparent);
  border-top: 2px solid var(--c);
}
.rcol-tick { position: absolute; left: 0; right: 0; height: 2px; background: var(--paper); }
.rcol-label {
  position: absolute; bottom: -24px; left: 50%; transform: translateX(-50%) rotate(-52deg);
  transform-origin: top right;
  font-size: 9px; color: var(--ink-faint); letter-spacing: 0.06em;
  white-space: nowrap;
}
.hist-head { display: flex; flex-wrap: wrap; gap: 16px; padding: 14px 16px; font-size: 10.5px; color: var(--ink-dim); letter-spacing: 0.08em; }
.hist-head strong { color: var(--paper); }
.hist-svg { position: absolute; inset: 54px 16px 64px; width: calc(100% - 32px); height: calc(100% - 118px); touch-action: pan-y; }
.hist-line { fill: none; stroke: var(--amber-hi); stroke-width: 1; vector-effect: non-scaling-stroke; }
.hist-area { fill: rgba(217, 154, 61, 0.08); stroke: none; }
.hist-dot { fill: rgba(232, 238, 240, 0.5); }
.hist-cross { stroke: rgba(232,238,240,0.4); stroke-width: 0.4; vector-effect: non-scaling-stroke; }
.hist-cursor { fill: var(--paper); }
.hist-read {
  position: absolute; left: 16px; right: 16px; bottom: 34px;
  display: flex; justify-content: space-between;
  font-size: 10.5px; color: var(--ink-dim); letter-spacing: 0.08em;
}
.hr-price { color: var(--paper); }
.key-note { margin-top: 14px; font-size: 9.5px; letter-spacing: 0.18em; color: var(--ember); }

/* ── 05 bench ─────────────────────────────────────────────────────────── */
.bench-controls { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 20px; }
.bench-controls label { display: flex; align-items: center; gap: 9px; font-size: 10px; letter-spacing: 0.24em; color: var(--ink-faint); }
.bench-swap { border: 1px solid var(--line-soft); padding: 9px 14px; color: var(--ink); transition: all var(--t-mid) var(--ease-settle); }
.bench-swap:hover { border-color: var(--amber); color: var(--amber); }
.bench-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(300px, 2.2fr) minmax(220px, 1fr);
  gap: 26px;
  align-items: stretch;
}
.bench-slot {
  border: 1px solid var(--line-soft);
  padding: 22px 20px;
  display: flex; flex-direction: column; gap: 9px;
  background: rgba(9, 12, 15, 0.6);
}
.bs-side { font-size: 9px; letter-spacing: 0.34em; color: var(--ink-faint); }
.bs-dot { font-size: 7px; }
.bs-dot[data-cat="dram"] { color: var(--amber); }
.bs-dot[data-cat="flash"] { color: var(--ice); }
.bs-dot[data-cat="module"] { color: var(--paper); }
.bench-slot strong { color: var(--paper); font-size: 13px; font-weight: 600; letter-spacing: 0.02em; }
.bs-big { font-family: var(--disp); font-weight: 600; font-size: 64px; line-height: 0.9; color: var(--paper); }
.bs-sub { font-size: 10px; color: var(--ink-dim); letter-spacing: 0.1em; }
.bs-price { font-size: 11px; color: var(--ink-dim); letter-spacing: 0.1em; }
.bench-rows { display: flex; flex-direction: column; justify-content: center; gap: 20px; }
.brow { display: grid; grid-template-columns: 86px 1fr 86px; grid-template-rows: auto auto; column-gap: 12px; row-gap: 5px; align-items: center; }
.brow-val { font-size: 12px; color: var(--paper); }
.brow-val.a { text-align: right; }
.brow-bar { position: relative; height: 4px; grid-column: 1 / 4; grid-row: 2; background: rgba(151,178,190,0.06); }
.brow-axis { position: absolute; left: 50%; top: -4px; bottom: -4px; width: 1px; background: var(--line-soft); }
.brow-fill { position: absolute; top: 0; bottom: 0; }
.brow-fill.left { right: 50%; background: var(--amber); }
.brow-fill.right { left: 50%; background: var(--ice); }
.brow-label { grid-row: 1; text-align: center; font-size: 9px; letter-spacing: 0.3em; color: var(--ink-faint); }
.brow-note { grid-row: 3; grid-column: 1 / 4; text-align: center; font-size: 9px; letter-spacing: 0.16em; color: var(--amber); }
.bench-org { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 26px; font-size: 9.5px; letter-spacing: 0.14em; color: var(--ink-dim); }
.bench-org .dim { color: var(--ink-faint); }

/* ── 06 methods ───────────────────────────────────────────────────────── */
.m-stamp { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }
.stamp-plate {
  border: 1px solid rgba(217,154,61,0.4); color: var(--amber);
  padding: 8px 14px; font-size: 10px; letter-spacing: 0.18em;
  transform: rotate(-0.5deg);
}
.stamp-plate.ice { border-color: rgba(143,195,212,0.45); color: var(--ice); transform: rotate(0.4deg); box-shadow: -2px 2px 0 rgba(217,154,61,0.18); }
.m-endpoints { border-top: 1px solid var(--line-soft); }
.m-ep {
  display: grid;
  grid-template-columns: minmax(220px, 340px) 90px 1fr;
  gap: 18px; padding: 13px 2px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 11px;
}
.m-ep-route { color: var(--paper); letter-spacing: 0.04em; word-break: break-all; }
.m-ep-status { letter-spacing: 0.14em; }
.m-ep-status.ok { color: var(--ice); }
.m-ep-status.auth { color: var(--amber); }
.m-ep-status.bad { color: var(--ember); }
.m-ep-status.dim { color: var(--ink-faint); }
.m-ep-note { color: var(--ink-dim); font-size: 10px; letter-spacing: 0.04em; }
.m-actions { margin-top: 26px; }
.m-retry {
  border: 1px solid var(--line-soft); color: var(--ink);
  padding: 11px 20px; font-size: 10px; letter-spacing: 0.24em;
  transition: all var(--t-mid) var(--ease-settle);
}
.m-retry:hover { border-color: var(--amber); color: var(--amber); }
.m-key { margin-top: 34px; border: 1px solid var(--line-soft); padding: 20px; max-width: 640px; }
.m-key-label { display: block; font-size: 9.5px; letter-spacing: 0.22em; color: var(--ink-faint); margin-bottom: 14px; }
.m-key-row { display: flex; gap: 8px; flex-wrap: wrap; }
.m-key-input {
  flex: 1; min-width: 200px;
  background: var(--bg2); border: 1px solid var(--line-soft); color: var(--paper);
  font-family: var(--mono); font-size: 12px;
  padding: 10px 12px;
}
.m-key-row button {
  border: 1px solid var(--line-soft); padding: 10px 16px;
  font-size: 10px; letter-spacing: 0.2em; color: var(--ink);
  transition: all var(--t-mid) var(--ease-settle);
}
.m-key-row button:hover { border-color: var(--amber); color: var(--amber); }
.m-key-state { display: block; margin-top: 12px; font-size: 9.5px; letter-spacing: 0.14em; color: var(--ink-dim); }
.m-key-state[data-on="1"] { color: var(--amber); }
.zine-strip { width: 100%; height: 52px; margin-top: 44px; opacity: 0.72; }
.colophon {
  display: flex; flex-wrap: wrap; gap: 10px 30px;
  margin-top: 18px; padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 9px; letter-spacing: 0.16em; color: var(--ink-faint);
}
.colophon .dim { opacity: 0.7; }

/* ── detail overlay ───────────────────────────────────────────────────── */
#detail {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(3, 4, 6, 0.88);
  backdrop-filter: blur(8px);
  overflow-y: auto;
  opacity: 0;
  transition: opacity var(--t-mid) var(--ease-settle);
}
#detail.on { opacity: 1; }
#detail .d-close {
  position: fixed; top: 14px; right: 18px; z-index: 2;
  width: 42px; height: 42px;
  border: 1px solid var(--line-soft); color: var(--ink);
  font-size: 15px;
  background: rgba(5,7,9,0.7);
  transition: all var(--t-mid) var(--ease-settle);
}
#detail .d-close:hover { border-color: var(--amber); color: var(--amber); }
.d-plate { min-height: 100%; display: grid; }
.d-body {
  place-self: center;
  width: min(760px, 92vw);
  padding: 54px 0;
  position: relative;
}
.d-ghost {
  position: absolute; right: -6%; top: 0;
  font-family: var(--disp); font-weight: 700;
  font-size: clamp(140px, 30vw, 360px);
  line-height: 0.8; color: rgba(151, 178, 190, 0.07);
  pointer-events: none; user-select: none;
  text-align: right;
}
.d-ghost span { font-size: 0.32em; letter-spacing: 0.06em; }
.d-cat { font-size: 10px; letter-spacing: 0.3em; margin-bottom: 12px; }
.d-name {
  font-family: var(--disp); font-weight: 600;
  font-size: clamp(30px, 5vw, 52px); line-height: 0.98;
  color: var(--paper); max-width: 80%;
  margin-bottom: 26px;
  /* verbatim label: no uppercase transform — Gb vs GB is data */
}
.d-rows { border-top: 1px solid var(--line-soft); }
.d-row {
  display: grid; grid-template-columns: 170px 1fr; gap: 16px;
  padding: 10px 2px; border-bottom: 1px solid var(--line-soft);
  font-size: 12px;
}
.d-k { color: var(--ink-faint); letter-spacing: 0.18em; font-size: 9.5px; padding-top: 2px; }
.d-v { color: var(--ink); word-break: break-word; }
.d-row.warn .d-v { color: var(--amber); }
.d-row.dim .d-v { color: var(--ink-faint); }
.d-actions { display: flex; gap: 10px; margin-top: 22px; }
.d-actions button {
  border: 1px solid var(--line-soft); padding: 11px 18px;
  font-size: 10px; letter-spacing: 0.2em; color: var(--ink);
  transition: all var(--t-mid) var(--ease-settle);
}
.d-actions button:hover { border-color: var(--amber); color: var(--amber); }
.d-history { margin-top: 30px; }
.d-hist-head { font-size: 9.5px; letter-spacing: 0.26em; color: var(--ink-faint); margin-bottom: 12px; }
.d-hist-svg { width: 100%; height: 130px; border: 1px solid var(--line-soft); }
.d-hist-note { margin-top: 10px; font-size: 9.5px; letter-spacing: 0.12em; color: var(--ink-dim); }

/* ── total failure state ──────────────────────────────────────────────── */
.total-failure { position: fixed; inset: 0; z-index: 70; background: #040507; display: grid; place-items: center; }
.tf-plate { border: 1px solid rgba(201,106,74,0.5); padding: 26px 34px; text-align: center; }
.tf-plate b { display: block; color: var(--ember); letter-spacing: 0.4em; font-size: 20px; margin-bottom: 10px; }
.tf-plate span { color: var(--ink-dim); font-size: 10px; letter-spacing: 0.14em; }

.fatal { position: fixed; inset: auto 0 0 0; z-index: 70; background: #200a06; color: #f0b254; padding: 14px; font-size: 11px; }

/* ── responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .bench-grid { grid-template-columns: 1fr 1fr; }
  .bench-rows { grid-column: 1 / -1; order: -1; }
}
@media (max-width: 860px) {
  .panel { padding-left: 22px; padding-right: 22px; padding-bottom: 96px; }
  .hero-grid { grid-template-columns: 1fr; gap: 8px; }
  .hero-wafer { height: 58vh; min-height: 340px; }
  .hero-head h1 { font-size: clamp(58px, 16vw, 96px); margin-bottom: 10px; }
  .hero-counts { margin-top: 14px; gap: 16px; }
  .drift-grid { grid-template-columns: 1fr; }
  .daywheel { max-width: 240px; margin: 0 auto; }
  .daywheel-state { text-align: center; }
  #rail { display: none; }
  #pills {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
    background: rgba(5, 7, 9, 0.92);
    border-top: 1px solid var(--line-soft);
    padding: 2px 4px calc(2px + env(safe-area-inset-bottom));
    gap: 3px;
  }
  .pill {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    font-size: 8px; letter-spacing: 0.08em; color: var(--ink-faint);
    padding: 15px 0;
    border: 1px solid transparent;
    white-space: nowrap;
    transition: color var(--t-mid), border-color var(--t-mid);
  }
  .pill.on { color: var(--paper); border-color: var(--line-soft); }
  .tape-main {
    grid-template-columns: 14px 1fr minmax(72px, 96px);
    grid-template-rows: auto auto auto;
    row-gap: 7px;
    padding: 14px 2px;
  }
  .tape-main > * { min-width: 0; }
  .t-price { justify-self: end; }
  .tape-row .sealed-plate { gap: 5px; padding: 3px 7px; font-size: 8.5px; max-width: 100%; }
  .tape-row .sealed-plate i { width: 8px; flex: none; }
  .t-idx, .t-cat { display: none; }
  .t-name { grid-column: 2; }
  .t-spec { grid-column: 2; grid-row: 2; }
  .t-price { grid-column: 3; grid-row: 1; text-align: right; }
  .t-range { grid-column: 3; grid-row: 2; }
  .t-delta { grid-column: 2 / 4; grid-row: 3; }
  .m-ep { grid-template-columns: 1fr 70px; }
  .m-ep-note { grid-column: 1 / -1; }
  .d-row { grid-template-columns: 110px 1fr; }
  .d-name { max-width: 100%; }
  .bench-grid { grid-template-columns: 1fr; }
  .field-wrap { height: 46vh; }
  .hero-foot { font-size: 9.5px; line-height: 1.8; }
}

@media (max-width: 700px) {
  #clock { display: none; }
  .strip-brand { font-size: 9px; letter-spacing: 0.14em; }
  .beacon-label { font-size: 9.5px; }
  #beacon { gap: 7px; padding: 0 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
}
