/* MEMORY PRICE INDEX 2026 — main.css
   Dispatch from the Silicon Winter. Tokens per DESIGN.md. */

:root {
  --bg: #07080a;
  --bg2: #0b0d11;
  --panel: #0e1116;
  --ink: #d6d2c6;
  --dim: #7a7e85;
  --faint: #454a52;
  --amber: #e0a04a;
  --frost: #9db8cc;
  --bone: #c9c4b4;
  --sealed: #8a4a42;
  --hairline: rgba(214, 210, 198, 0.09);
  --gridline: rgba(157, 184, 204, 0.07);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.2, 1);
  --strip-h: 52px;
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(224, 160, 74, 0.25); color: var(--ink); }

a { color: var(--frost); text-decoration: none; border-bottom: 1px solid rgba(157, 184, 204, 0.3); }
a:hover { color: var(--ink); border-bottom-color: var(--ink); }

button {
  font-family: var(--font-mono);
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 1px solid var(--amber);
  outline-offset: 3px;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}

/* ---------- atmosphere layers ---------- */

#atmo {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

#scanlines {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.12) 0px,
    rgba(0, 0, 0, 0.12) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.55;
}

/* ---------- boot veil ---------- */

#boot {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 500ms var(--ease-in);
}
#boot.boot-flash { transition-duration: 200ms; }
#boot.boot-done { opacity: 0; pointer-events: none; }

.boot-inner {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--dim);
  max-width: min(560px, 86vw);
}
.boot-line { min-height: 1.7em; white-space: pre-wrap; }
#boot-l1 { color: var(--ink); }
#boot-l2 { color: var(--amber); }
.boot-dim { color: var(--faint); }
.boot-ellipsis { animation: bootblink 1s steps(2) infinite; }
@keyframes bootblink { 50% { opacity: 0.15; } }

/* ---------- status strip ---------- */

#strip {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--strip-h);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid var(--hairline);
  background: rgba(7, 8, 10, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-family: var(--font-mono);
}

.strip-left { display: flex; align-items: baseline; gap: 18px; min-width: 0; flex: 1 1 auto; overflow: hidden; }
.brand { font-size: 11px; letter-spacing: 0.2em; color: var(--ink); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dispatch-tag { font-size: 10px; letter-spacing: 0.18em; color: var(--faint); white-space: nowrap; }

.strip-right { display: flex; align-items: center; gap: 12px; }

.chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--dim);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  padding: 7px 12px;
  max-width: 52vw;
  transition: border-color 400ms var(--ease-out), color 400ms var(--ease-out);
}
.chip:hover { border-color: rgba(214, 210, 198, 0.28); color: var(--ink); }
.chip-dot { font-style: normal; flex: none; }
.chip-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-short { display: none; }
.chip[data-state='contacting'] .chip-dot { color: var(--dim); animation: bootblink 1.2s steps(2) infinite; }
.chip[data-state='snapshot'] .chip-dot { color: var(--amber); }
.chip[data-state='live'] .chip-dot,
.chip[data-state='live-key'] .chip-dot { color: var(--frost); }
.chip[data-state='offline'] .chip-dot { color: var(--faint); }
.chip[data-state='live-key'] { border-color: rgba(157, 184, 204, 0.35); color: var(--ink); }

.key-btn {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--ink);
  border: 1px solid rgba(224, 160, 74, 0.4);
  border-radius: 2px;
  padding: 7px 14px;
  transition: background 400ms var(--ease-out), color 400ms var(--ease-out);
}
.key-btn:hover { background: rgba(224, 160, 74, 0.12); }
.key-btn[data-keyed='true'] { color: var(--frost); border-color: rgba(157, 184, 204, 0.45); }

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

/* ---------- hero ---------- */

#hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

#wafer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding: calc(var(--strip-h) + 40px) 28px 120px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--amber);
  margin-bottom: 26px;
}

.hero-type {
  font-weight: 300;
  font-size: clamp(3.2rem, 10.5vw, 7.2rem);
  line-height: 0.94;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 34px;
}
.ht-line { display: block; }
.ht-accent { color: transparent; -webkit-text-stroke: 1px rgba(214, 210, 198, 0.55); }

.vitals {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-top: 1px solid var(--hairline);
}
.vital {
  padding: 18px 34px 4px 0;
  margin-right: 34px;
  border-right: 1px solid var(--hairline);
  padding-right: 34px;
}
.vital:last-child { border-right: none; }
.vital dt {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--dim);
  order: 2;
  margin-top: 6px;
}
.vital dd {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  color: var(--ink);
  line-height: 1;
}
.vital { display: flex; flex-direction: column; }
.vital dd { order: 1; }
.vital dt { order: 2; }

.macro {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  max-width: 640px;
}
.macro-cap {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--dim);
  margin-bottom: 10px;
}
.macro-fig {
  display: block;
  font-weight: 300;
  font-size: clamp(1.7rem, 3.6vw, 2.7rem);
  line-height: 1.12;
  color: var(--amber);
  letter-spacing: -0.01em;
}
.macro-fig .macro-fig-sub {
  display: block;
  font-size: 0.42em;
  color: var(--dim);
  letter-spacing: 0.06em;
  margin-top: 6px;
}
.src-chip {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--frost);
  border: 1px solid rgba(157, 184, 204, 0.3);
  border-radius: 2px;
  padding: 6px 10px;
}
.src-chip:hover { border-color: var(--frost); color: var(--ink); }
.src-chip::after { content: ' ↗'; }

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 2;
}
.cue-line {
  width: 1px;
  height: 54px;
  background: linear-gradient(to bottom, transparent, var(--dim));
  animation: cuesink 2.6s var(--ease-out) infinite;
  transform-origin: top;
}
@keyframes cuesink {
  0% { transform: scaleY(0); opacity: 0; }
  35% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1) translateY(18px); opacity: 0; }
}
.cue-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--faint);
}

/* ---------- section headers ---------- */

.sec-head {
  max-width: 1400px;
  margin: 0 auto;
  padding: 110px 28px 34px;
}
.sec-head h2 {
  display: flex;
  align-items: baseline;
  gap: 20px;
  font-weight: 300;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  letter-spacing: 0.02em;
  color: var(--ink);
}
.sec-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--amber);
}
.sec-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--dim);
  margin-top: 12px;
}

/* ---------- ledger: rail ---------- */

.rail {
  position: sticky;
  top: var(--strip-h);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 28px;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  background: rgba(7, 8, 10, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.filters {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.filters::-webkit-scrollbar { display: none; }

.filter-btn {
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--dim);
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 2px;
  white-space: nowrap;
  transition: color 300ms var(--ease-out), border-color 300ms var(--ease-out);
}
.filter-btn:hover { color: var(--ink); }
.filter-btn[aria-pressed='true'] { color: var(--ink); border-color: rgba(214, 210, 198, 0.25); }
.filter-btn .f-count { color: var(--faint); margin-left: 6px; }
.filter-btn[aria-pressed='true'] .f-count { color: var(--amber); }

.cmp-toggle {
  flex: none;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--dim);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  padding: 9px 16px;
  transition: all 300ms var(--ease-out);
}
.cmp-toggle:hover { color: var(--ink); border-color: rgba(214, 210, 198, 0.3); }
.cmp-toggle[aria-pressed='true'] {
  color: var(--amber);
  border-color: rgba(224, 160, 74, 0.5);
  background: rgba(224, 160, 74, 0.07);
}

/* ---------- ledger: field of die cards ---------- */

.field {
  max-width: 1400px;
  margin: 0 auto;
  padding: 44px 28px 130px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.die {
  position: relative;
  display: grid;
  grid-template-columns: 104px 1fr;
  grid-template-rows: auto 1fr;
  gap: 14px 16px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 3px;
  cursor: pointer;
  transition:
    transform 500ms var(--ease-out),
    border-color 500ms var(--ease-out),
    opacity 400ms var(--ease-out);
  will-change: transform;
}
.die:hover, .die:focus-visible {
  transform: translateY(-6px);
  border-color: rgba(214, 210, 198, 0.3);
}
.die.flip-anim { transition: transform 600ms var(--ease-out), opacity 400ms var(--ease-out); }
.die.die-hidden { display: none; }
.die.die-enter { opacity: 0; transform: translateY(14px); }

.die-vis {
  grid-row: 1 / 3;
  width: 104px;
  height: 132px;
  align-self: start;
}

.die-meta { min-width: 0; }
.die-name {
  font-weight: 500;
  font-size: 15px;
  line-height: 1.3;
  color: var(--ink);
  letter-spacing: 0.01em;
  overflow-wrap: break-word;
}
.die-id {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--faint);
  margin-top: 6px;
}
.die-cat {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--dim);
  margin-top: 9px;
}
.die-cat .tick {
  width: 6px;
  height: 6px;
  border-radius: 1px;
  flex: none;
}
.cat-dram .tick { background: var(--amber); }
.cat-flash .tick { background: var(--frost); }
.cat-module .tick { background: var(--bone); }

.price-window {
  align-self: end;
  border-top: 1px solid var(--hairline);
  padding-top: 12px;
  min-width: 0;
}
.pw-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--dim);
  margin-top: 7px;
}
.pw-sealed .pw-glyphs {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 21px;
  letter-spacing: 0.12em;
  color: var(--sealed);
}
.pw-sealed .pw-label { color: rgba(138, 74, 66, 0.85); }

.pw-live .pw-price, .pw-spot .pw-price {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 21px;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.pw-change { font-family: var(--font-mono); font-size: 11px; margin-left: 10px; }
.pw-change.up { color: var(--amber); }
.pw-change.down { color: var(--frost); }
.pw-change.flat { color: var(--dim); }

.pw-badge {
  display: inline-block;
  vertical-align: 2px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.16em;
  color: var(--frost);
  border: 1px solid rgba(157, 184, 204, 0.4);
  border-radius: 2px;
  padding: 2px 5px;
  margin-left: 8px;
}

.pw-range { margin-top: 9px; }
.pw-range-track {
  position: relative;
  height: 2px;
  background: rgba(214, 210, 198, 0.14);
  border-radius: 1px;
}
.pw-range-marker {
  position: absolute;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
  transform: translate(-50%, -50%);
}
.pw-range-ends {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--faint);
  margin-top: 5px;
  letter-spacing: 0.06em;
}

/* compare selection tick */
.die .cmp-tick {
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 26px 26px 0;
  border-color: transparent var(--amber) transparent transparent;
  opacity: 0;
  transform: translate(6px, -6px);
  transition: opacity 350ms var(--ease-out), transform 350ms var(--ease-out);
  pointer-events: none;
}
.die.cmp-selected .cmp-tick { opacity: 1; transform: translate(0, 0); }
.die.cmp-selected { border-color: rgba(224, 160, 74, 0.55); }
.field.compare-mode .die { cursor: cell; }

/* ---------- overlays (dossier + keypanel) ---------- */

.overlay { position: fixed; inset: 0; z-index: 60; }
.overlay[hidden] { display: none; }

.scrim {
  position: absolute;
  inset: 0;
  background: rgba(2, 3, 4, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 500ms var(--ease-out);
}
.overlay.open .scrim { opacity: 1; }

.sheet {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  background: var(--bg2);
  border-top: 1px solid var(--hairline);
  transform: translateY(100%);
  transition: transform 700ms var(--ease-out);
  padding: 0 28px 120px;
}
.overlay.open .sheet { transform: translateY(0); }
.overlay.closing .sheet { transition-timing-function: var(--ease-in); transition-duration: 420ms; }

@media (min-width: 900px) {
  .sheet {
    inset: 5vh 0 0 0;
    max-width: 940px;
    margin: 0 auto;
    left: 0;
    right: 0;
    border: 1px solid var(--hairline);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
  }
}

.close {
  position: sticky;
  top: 18px;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-size: 22px;
  font-family: var(--font-display);
  font-weight: 300;
  color: var(--dim);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  background: rgba(11, 13, 17, 0.8);
  z-index: 5;
  transition: color 300ms, border-color 300ms;
}
.close:hover { color: var(--ink); border-color: rgba(214, 210, 198, 0.35); }

.dossier-head { padding-top: 8px; }
.dossier-kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--amber);
  margin-bottom: 16px;
}
.dossier-name {
  font-weight: 300;
  font-size: clamp(1.9rem, 5vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--ink);
  max-width: 16em;
}
.dossier-sub {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.dossier-id {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--faint);
}
.cat-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  padding: 4px 8px;
  border-radius: 2px;
  border: 1px solid;
}
.cat-tag.cat-dram { color: var(--amber); border-color: rgba(224, 160, 74, 0.4); }
.cat-tag.cat-flash { color: var(--frost); border-color: rgba(157, 184, 204, 0.4); }
.cat-tag.cat-module { color: var(--bone); border-color: rgba(201, 196, 180, 0.4); }
.dossier-prov {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--dim);
  margin-top: 18px;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  margin-top: 40px;
}
.spec-cell { background: var(--bg2); padding: 16px 18px; }
.spec-cell dt {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--faint);
  margin-bottom: 8px;
}
.spec-cell dd {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 16px;
  color: var(--ink);
}

.telemetry { margin-top: 44px; }
.tel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--dim);
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 10px;
}
.tel-state { color: var(--faint); }
.tel-canvas-wrap { margin-top: 18px; }
#tel-canvas { width: 100%; height: 300px; display: block; }
.tel-note {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--dim);
  margin-top: 14px;
  line-height: 1.7;
}
.tel-note .sealed-word { color: var(--sealed); }

.dossier-foot {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--faint);
}

/* ---------- compare tray ---------- */

#compare-tray {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: rgba(11, 13, 17, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(214, 210, 198, 0.16);
  transform: translateY(100%);
  transition: transform 600ms var(--ease-out);
  max-height: 62vh;
  overflow-y: auto;
}
#compare-tray.open { transform: translateY(0); }
#compare-tray[hidden] { display: none; }

.tray-head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--font-mono);
  position: sticky;
  top: 0;
  background: inherit;
}
.tray-title { font-size: 10px; letter-spacing: 0.24em; color: var(--amber); }
.tray-hint { font-size: 10px; letter-spacing: 0.12em; color: var(--faint); flex: 1; }
.tray-clear {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--dim);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  padding: 7px 12px;
}
.tray-clear:hover { color: var(--ink); border-color: rgba(214, 210, 198, 0.3); }

.cmp-cols {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 1fr);
  gap: 1px;
  background: var(--hairline);
  overflow-x: auto;
}
.cmp-col { background: var(--bg2); padding: 20px 22px 26px; min-width: 0; }
.cmp-col-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.cmp-col-name { font-weight: 500; font-size: 14px; color: var(--ink); line-height: 1.35; }
.cmp-remove {
  flex: none;
  width: 44px;
  height: 44px;
  margin: -10px -14px 0 0;
  font-size: 17px;
  color: var(--faint);
  font-family: var(--font-display);
}
.cmp-remove:hover { color: var(--ink); }
.cmp-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  padding: 9px 0 0;
  color: var(--dim);
}
.cmp-row .cmp-val { color: var(--ink); text-align: right; }
.cmp-bar-row { padding-top: 14px; }
.cmp-bar-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--faint);
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
}
.cmp-bar-label .cmp-bar-val { color: var(--dim); }
.cmp-bar-track { height: 3px; background: rgba(214, 210, 198, 0.1); border-radius: 2px; }
.cmp-bar-fill {
  height: 100%;
  border-radius: 2px;
  transform-origin: left;
  transition: width 700ms var(--ease-out);
}
.cmp-bar-fill.cat-dram { background: var(--amber); }
.cmp-bar-fill.cat-flash { background: var(--frost); }
.cmp-bar-fill.cat-module { background: var(--bone); }
.cmp-bar-fill.bar-spot { opacity: 0.9; }

.cmp-sealed-note {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--sealed);
  padding-top: 14px;
}

/* ---------- dispatch timeline ---------- */

#dispatch { padding-bottom: 40px; }

.tl-empty {
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 28px 130px;
  text-align: left;
}
.tl-empty-mark {
  font-family: var(--font-mono);
  color: var(--faint);
  letter-spacing: 0.5em;
  font-size: 12px;
  margin-bottom: 26px;
}
.tl-empty-msg {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.26em;
  color: var(--dim);
  margin-bottom: 14px;
}
.tl-empty-sub {
  font-size: 14px;
  color: var(--faint);
  max-width: 34em;
}

.tl-viewport {
  position: relative;
  overflow: hidden;
  height: 190px;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  cursor: grab;
  touch-action: pan-y;
  margin: 0 0 0;
}
.tl-viewport:active { cursor: grabbing; }
.tl-viewport:focus-visible { outline-offset: -3px; }

.tl-track {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  will-change: transform;
}

.tl-spine {
  position: absolute;
  top: 96px;
  left: 0;
  height: 1px;
  background: linear-gradient(
    to right,
    rgba(157, 184, 204, 0.08),
    rgba(157, 184, 204, 0.42)
  );
}

.tl-month {
  position: absolute;
  top: 92px;
  width: 1px;
  height: 9px;
  background: rgba(214, 210, 198, 0.14);
}
.tl-month-label {
  position: absolute;
  top: 112px;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  color: var(--faint);
  white-space: nowrap;
}

.tl-marker {
  position: absolute;
  top: 96px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid var(--frost);
  background: var(--bg);
  transition: box-shadow 400ms var(--ease-out), background 400ms var(--ease-out);
}
.tl-marker.kind-actual { background: var(--frost); }
.tl-marker.has-figure { width: 11px; height: 11px; }
.tl-marker.no-figure { width: 7px; height: 7px; }
.tl-marker.active {
  background: var(--amber);
  border-color: var(--amber);
  box-shadow: 0 0 18px rgba(224, 160, 74, 0.55);
}
.tl-stem {
  position: absolute;
  top: 96px;
  width: 1px;
  height: 34px;
  background: rgba(214, 210, 198, 0.1);
  transform: translateX(-0.5px);
}

.tl-card {
  max-width: 1400px;
  margin: 0 auto;
  padding: 44px 28px 130px;
  min-height: 260px;
}
.tl-card.swap .tl-date,
.tl-card.swap .tl-label,
.tl-card.swap .tl-figure,
.tl-card.swap .tl-detail,
.tl-card.swap .src-chip {
  animation: tlswap 500ms var(--ease-out);
}
@keyframes tlswap {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.tl-date {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--frost);
  margin-bottom: 14px;
}
.tl-label {
  font-weight: 300;
  font-size: clamp(1.5rem, 3.4vw, 2.4rem);
  line-height: 1.15;
  color: var(--ink);
  max-width: 22em;
}
.tl-figure {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(1.3rem, 3vw, 2rem);
  color: var(--amber);
  margin-top: 16px;
  letter-spacing: 0.02em;
}
.tl-detail {
  font-size: 14px;
  color: var(--dim);
  max-width: 38em;
  margin-top: 16px;
  line-height: 1.65;
}

/* ---------- method footer ---------- */

#method {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--hairline);
  background: var(--bg2);
  padding: 70px 28px 90px;
}
.method-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
}
.m-col h3 {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.26em;
  color: var(--amber);
  font-weight: 500;
  margin-bottom: 20px;
}
.prov {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
}
.prov th {
  text-align: left;
  color: var(--faint);
  font-weight: 400;
  letter-spacing: 0.18em;
  font-size: 9px;
  padding: 0 14px 8px 0;
  border-bottom: 1px solid var(--hairline);
}
.prov td {
  color: var(--dim);
  padding: 8px 14px 8px 0;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
  line-height: 1.6;
}
.prov td:first-child { color: var(--ink); white-space: nowrap; }
.capture {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--faint);
  margin-top: 16px;
  line-height: 1.7;
}
.src-list { list-style: none; }
.src-list li { margin-bottom: 12px; font-size: 13px; }
.src-list a { color: var(--dim); border-bottom-color: rgba(122, 126, 133, 0.3); }
.src-list a:hover { color: var(--ink); }
.src-list .src-date {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--faint);
  margin-left: 8px;
}
.colophon-line { font-size: 13px; color: var(--dim); margin-bottom: 12px; max-width: 26em; }
.colophon-line:first-of-type { color: var(--ink); }

/* ---------- key panel ---------- */

.key-sheet .dossier-head { padding-bottom: 6px; }
.kp-title { font-weight: 300; font-size: clamp(1.8rem, 4.4vw, 3rem); color: var(--ink); }
.kp-status {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--frost);
  margin-top: 22px;
  padding: 12px 14px;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  line-height: 1.7;
}
.kp-body { font-size: 14px; color: var(--dim); margin-top: 20px; max-width: 34em; line-height: 1.65; }
#kp-form { margin-top: 26px; max-width: 460px; }
.kp-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--faint);
  margin-bottom: 9px;
}
#kp-input {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  padding: 13px 14px;
}
#kp-input:focus { outline: 1px solid var(--amber); outline-offset: 3px; }
.kp-actions { display: flex; gap: 12px; margin-top: 14px; }
.kp-test {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--bg);
  background: var(--amber);
  border-radius: 2px;
  padding: 11px 20px;
  font-weight: 600;
  transition: background 300ms;
}
.kp-test:hover { background: #edb663; }
.kp-test[disabled] { opacity: 0.5; cursor: wait; }
.kp-forget {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--sealed);
  border: 1px solid rgba(138, 74, 66, 0.5);
  border-radius: 2px;
  padding: 11px 16px;
}
.kp-forget:hover { color: var(--ink); border-color: var(--sealed); }
.kp-msg {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  margin-top: 16px;
  min-height: 1.6em;
  color: var(--dim);
}
.kp-msg.err { color: var(--sealed); }
.kp-msg.ok { color: var(--frost); }
.kp-note {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--faint);
  margin-top: 30px;
  line-height: 1.7;
  max-width: 44em;
}

/* ---------- responsive ---------- */

@media (max-width: 760px) {
  #strip { padding: 0 12px; }
  .dispatch-tag { display: none; }
  .brand { font-size: 9px; letter-spacing: 0.12em; }
  .chip { max-width: none; padding: 7px 9px; flex: none; min-height: 44px; }
  .chip-text { font-size: 9px; }
  .chip-full { display: none; }
  .chip-short { display: inline; }
  .key-btn { padding: 7px 10px; min-height: 44px; display: inline-flex; align-items: center; }

  .hero-inner { padding: calc(var(--strip-h) + 30px) 18px 110px; }
  .eyebrow { letter-spacing: 0.22em; margin-bottom: 20px; }
  .vitals { gap: 0; }
  .vital { padding: 14px 18px 4px 0; margin-right: 18px; padding-right: 18px; }
  .vital:nth-child(2) { border-right: none; }
  .macro { margin-top: 40px; }

  .sec-head { padding: 80px 18px 26px; }
  .rail { padding: 8px 16px; flex-wrap: wrap; row-gap: 4px; }
  .filters { flex: 1 1 100%; overflow-x: visible; }
  .filter-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 10px 11px;
  }
  .cmp-toggle {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    margin-left: auto;
  }
  .tl-marker { pointer-events: auto; }
  .tl-marker::after {
    content: '';
    position: absolute;
    inset: -18px;
    border-radius: 50%;
  }
  .field {
    grid-template-columns: 1fr;
    padding: 30px 16px 100px;
    gap: 10px;
  }
  .die { grid-template-columns: 92px 1fr; padding: 16px; }
  .die-vis { width: 92px; height: 118px; }

  .sheet { padding: 0 18px 100px; }
  .tl-card { padding: 36px 18px 110px; }
  .tl-empty { padding: 50px 18px 100px; }

  .method-grid { grid-template-columns: 1fr; gap: 40px; }
  #method { padding: 56px 18px 70px; }

  .cmp-cols { grid-auto-columns: minmax(78vw, 1fr); }
  #compare-tray { max-height: 72vh; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .cue-line { animation: none; }
  .chip[data-state='contacting'] .chip-dot { animation: none; }
  #boot { transition: none; }
}
