:root {
  --radium: #c6e05c;
  --ink: #12110e;
  --ivory: #f3eee4;
  --muted: #9a9488;
  --steel: #2a2822;
  --night: #0c0b09;
  --line: #3a372f;
  --hot: #e8a848;
  --crit: #ff6b57;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --sans: "Plus Jakarta Sans", "Segoe UI", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 12px;
  overflow-x: clip;
}

body {
  margin: 0;
  color: var(--ivory);
  background: var(--night);
  font-family: var(--sans);
  line-height: 1.5;
}

body.nav-open,
body.shift-open { overflow: hidden; }

::selection { background: rgba(198, 224, 92, 0.35); }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

h1, h2 {
  margin: 0 0 12px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

h1 { font-size: clamp(32px, 4vw, 52px); }
h2 { font-size: clamp(28px, 3.4vw, 42px); }
p { margin: 0 0 12px; color: var(--muted); }

.skip,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.skip:focus {
  clip: auto;
  width: auto;
  height: auto;
  inset: 12px;
  z-index: 50;
  padding: 10px 14px;
  background: var(--ivory);
  color: var(--ink);
}

.stamp {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--radium);
}

.stamp-rwas {
  text-transform: none;
}

.fine { font-size: 13px; color: var(--muted); }

.frame {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100svh;
}

.frame:has(.rail) {
  grid-template-columns: 52px 1fr;
}

.rail {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 0;
  background: #1a1814;
  border-right: 1px solid var(--line);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--radium);
  text-align: center;
}

.mast {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 98px;
  /* 18px top; 28px left so the lockup crop still leaves air before the octagon. */
  padding: 18px 28px 16px 28px;
  background: #1a1814;
  border-bottom: 1px solid var(--line);
  overflow: visible;
}

.brand {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
  overflow: visible;
}

.brand-token {
  width: 48px;
  height: 48px;
  border-radius: 0;
  flex-shrink: 0;
  object-fit: contain;
  margin-bottom: 4px;
}

.brand-word {
  height: 76px;
  width: auto;
  max-width: none;
  object-fit: contain;
  object-position: left bottom;
}

.mast .brand-word {
  --brand-h: 64px;
  height: var(--brand-h);
  /* Octagon left edge is x=73 of 4056 in the 4056×900 lockup. */
  margin-left: calc(-73 / 900 * var(--brand-h));
}

.brand-word-foot {
  height: 48px;
  /* Same lockup crop as the mast. */
  margin-left: calc(-73 / 900 * 48px);
}

.nav {
  display: flex;
  flex: 1;
  justify-content: flex-end;
  gap: 22px;
}

.nav a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav a:hover,
.nav a.active { color: var(--radium); }

.mast-end {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: nowrap;
  flex-shrink: 0;
  gap: 8px;
  margin-left: auto;
}

.steel,
.menu-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  background: var(--steel);
  color: var(--ivory);
  font: 600 12px var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.steel-hot {
  background: var(--radium);
  color: var(--ink);
  border-color: #8fa62e;
}

.steel {
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, transform 120ms ease;
}

.steel:hover {
  background: var(--ivory);
  color: var(--ink);
  border-color: var(--ivory);
}

.steel:active {
  background: #d8d3c8;
  color: var(--ink);
  border-color: #d8d3c8;
  transform: translateY(1px);
}

.steel-hot:hover {
  background: #d4ee72;
  color: var(--ink);
  border-color: #b6d04a;
}

.steel-hot:active {
  background: #a8c040;
  color: var(--ink);
  border-color: #8fa62e;
  transform: translateY(1px);
}

.steel:focus-visible {
  outline: 2px solid var(--radium);
  outline-offset: 2px;
}

.menu-btn {
  display: none;
  width: 42px;
  padding: 0;
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--ivory);
}

.menu-icon { position: relative; }
.menu-icon::before,
.menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
}
.menu-icon::before { top: -5px; }
.menu-icon::after { top: 5px; }

.splash {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  min-height: calc(100svh - 84px);
  border-bottom: 1px solid var(--line);
}

.splash-plate {
  margin: 0;
  overflow: hidden;
  background: #000;
}

.splash-plate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 28%;
}

.splash-panel {
  padding: 36px 40px 40px;
  background: #16140f;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
}

.splash-word {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  /* Letters-only PNG: cream F starts at x=112 of 3414. */
  margin: 12px 0 8px calc(-100% * 112 / 3414 + 3px);
  align-self: stretch;
  object-fit: contain;
  object-position: 0% 100%;
}

.headline-end {
  white-space: nowrap;
}

.headline-emoji {
  display: inline-block;
  font-size: 0.90em;
  line-height: 1;
  font-weight: 400;
  font-style: normal;
  vertical-align: 0.02em;
}

.splash-panel h1,
.splash-panel > p {
  text-align: left;
  width: 100%;
}

@media (min-width: 1280px) {
  .splash-panel h1 { white-space: nowrap; }
}

.splash-beats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px 16px;
  margin: 4px 0 2px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.splash-beats span {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--radium);
}

.splash-beats p {
  margin: 6px 0 0;
  font-size: 13px;
}

.splash-name {
  color: var(--radium);
  font-style: normal;
  font-weight: inherit;
}

.splash-beats-solo {
  display: block;
  text-align: left;
}

.splash-beats-solo .reactor-label {
  display: block;
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--radium);
}

.splash-beats-solo p {
  max-width: 38em;
  margin-left: 0;
  margin-right: auto;
}

.splash-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 16px;
}

.ca {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  width: 100%;
  padding: 8px 10px;
  border-top: 1px solid var(--radium);
  background: var(--night);
  font-family: var(--mono);
  font-size: 12px;
}

.ca-id {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ca-hood {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: var(--ivory);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
}

.ca-hood img {
  display: block;
  width: 18px;
  height: 18px;
}

.ca button {
  appearance: none;
  border: 0;
  background: none;
  color: var(--radium);
  font: 600 12px var(--mono);
  cursor: pointer;
}

.band {
  padding: 48px 28px 12px;
  background: var(--ink);
}

.band-top {
  display: block;
  margin-bottom: 22px;
}

.band-top p:last-child {
  max-width: 62ch;
}

.gauges {
  display: grid;
  grid-template-columns: repeat(2, minmax(88px, 1fr));
  gap: 1px;
  margin: 0;
  background: var(--line);
  border: 1px solid var(--line);
}

.gauges div {
  padding: 10px 12px;
  background: #16140f;
}

.gauges dt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.3;
}

.gauges dd {
  margin: 4px 0 0;
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.scope {
  padding: 20px 28px 22px;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
}

.band > .scope {
  margin-top: 0;
  margin-bottom: 22px;
  padding: 0;
  border-bottom: 0;
  background: transparent;
}

.band .scope-hero {
  padding: 8px 12px 8px;
}

.band .scope-hero .scope-note,
.band .scope-grid .scope-note {
  display: none;
}

.band .scope-grid > div {
  padding: 10px 12px 12px;
}

.band .scope-val-hero,
.band .scope-val-hero[data-state="preview"],
.band .scope-val-hero[data-state="live"] {
  margin-top: 2px;
}

.band .scope-seed {
  padding: 10px 12px;
  gap: 8px 12px;
}

.band .seed-vessel,
.band .seed-vessel img {
  width: 56px;
  height: 56px;
}

.band .seed-copy h3 {
  font-size: 15px;
}

.band .seed-copy .scope-note {
  margin-top: 2px;
  font-size: 11px;
}

.band .seed-copy .stamp {
  font-size: 13px;
}

.scope-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 16px;
  align-items: center;
  margin-bottom: 12px;
}

.scope-head h2 {
  margin: 0;
  font-size: clamp(18px, 2vw, 22px);
  letter-spacing: -0.03em;
}

.scope-head .stamp { margin-bottom: 2px; }

.scope-signal {
  margin: 0;
  padding: 3px 8px;
  border: 1px solid var(--line);
  background: #16140f;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.scope-signal::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  vertical-align: 0;
  background: currentColor;
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
}

.scope-signal[data-state="live"] {
  color: var(--radium);
  border-color: #3d4a18;
  background: #16180e;
}

.scope-signal[data-state="preview"] {
  color: var(--ivory);
  border-color: #3a3428;
  background: #181610;
}

.scope-signal[data-state="sealed"] {
  color: var(--hot);
  border-color: #5a3f18;
  background: #1c1710;
}

.scope-signal[data-state="error"] {
  color: var(--crit);
  border-color: #5a2a22;
  background: #241210;
}

.scope-kicker,
.scope-chip,
.scope-grid dt {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.35;
}

.scope-chip {
  color: var(--muted);
}

.scope[data-signal="live"] .scope-chip {
  color: var(--radium);
}

.scope-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.scope-hero {
  grid-column: 1 / -1;
  padding: 10px 14px 12px;
  background: #16140f;
}

.scope-grid {
  display: contents;
  margin: 0;
}

.scope-grid > div {
  padding: 10px 12px 12px;
  background: #16140f;
  min-width: 0;
}

.scope-grid dd { margin-inline-start: 0; }

.scope-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.scope-delta-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
}

.scope-val {
  margin: 4px 0 0;
  font-size: clamp(22px, 2.6vw, 32px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  color: var(--ivory);
}

.scope-val-hero {
  margin-top: 4px;
}

.scope-val[data-state="sealed"],
.scope-val[data-state="error"],
.scope-delta[data-state="sealed"] {
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.scope-val-hero[data-state="sealed"],
.scope-val-hero[data-state="error"] {
  font-size: clamp(16px, 2vw, 22px);
  letter-spacing: 0.1em;
}

.scope-val[data-state="preview"],
.scope-val[data-state="live"] {
  font-family: inherit;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ivory);
}

.scope-val-hero[data-state="preview"],
.scope-val-hero[data-state="live"] {
  letter-spacing: -0.04em;
}

.scope-val[data-state="armed"] { color: var(--radium); }

.scope-val.is-tick {
  animation: scope-phosphor 480ms ease-out;
}

.scope-note {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.scope-delta {
  margin: 0;
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.scope-delta[data-state="up"] { color: var(--radium); }
.scope-delta[data-state="down"] { color: var(--crit); }
.scope-delta[data-state="flat"] { color: var(--ivory); }

.scope-seed {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px 16px;
  align-items: center;
  padding: 10px 12px;
  background: #14120e;
}

.seed-vessel {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
  background: #070706;
}

.seed-vessel img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  image-rendering: auto;
}

.seed-copy { min-width: 0; }

.seed-copy h3 {
  margin: 0 0 2px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--ivory);
}

.seed-copy .stamp {
  margin-bottom: 2px;
  font-size: 13px;
}

.seed-copy > p {
  margin: 0;
  font-size: 12px;
  max-width: none;
}

.seed-acc {
  display: grid;
  justify-items: end;
  gap: 2px;
  margin: 0;
  text-align: right;
}

.seed-acc .scope-val {
  margin: 0;
}

@keyframes scope-phosphor {
  0% {
    color: var(--radium);
    text-shadow: 0 0 10px rgba(198, 224, 92, 0.45);
  }
  100% {
    text-shadow: none;
  }
}

.hatch-plate {
  margin: 0 0 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0a0a08;
}

.hatch-plate img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center 40%;
}

.census {
  display: block;
  width: 100%;
  height: 200px;
  margin: 10px 0 0;
  background: #070706;
  border: 1px solid var(--line);
}

.mode-banner {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.mode-banner[data-mode="stable"] {
  color: var(--radium);
  border-color: #3d4a18;
  background: #16180e;
}

.mode-banner[data-mode="hot"] {
  color: var(--hot);
  border-color: #5a3f18;
  background: #24180c;
}

.mode-banner[data-mode="critical"] {
  color: var(--crit);
  border-color: #5a2a22;
  background: #241210;
}

.pair-slab {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  border-top: 1px solid var(--line);
  background: #14120e;
}

.pair-plate {
  margin: 0;
  overflow: hidden;
  background: #000;
}

.pair-plate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 42% 46%;
  min-height: 360px;
  filter: brightness(0.88);
}

.pair-copy {
  padding: 48px 40px;
  background: #16140f;
}

.pair-hub {
  max-width: 46ch;
}

.pair-hub span {
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--radium);
}

.pair-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  background: var(--line);
  border: 1px solid var(--line);
}

.pair-board li {
  padding: 16px 16px 18px;
  background: #16140f;
}

.pair-board .is-live { background: #1a1c10; }
.pair-board .is-next { background: #1c1710; }
.pair-board .is-more { background: #14120e; }

.pair-board span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.pair-board .is-live span { color: var(--radium); }
.pair-board .is-next span { color: var(--hot); }

.pair-board strong {
  display: block;
  margin: 6px 0 8px;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.pair-board p { margin: 0; font-size: 13px; }

.ledger {
  padding: 0;
  background: #2a2416;
}

.ledger-stage {
  position: relative;
  max-width: none;
  margin: 0;
  cursor: pointer;
}

.ledger-crt-frame {
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
}

.ledger-glass {
  --hatch-green: #7dff6a;
  position: absolute;
  top: 21.8%;
  left: 31.1%;
  right: 28.6%;
  bottom: 28%;
  z-index: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(10px, 1.8vw, 22px) clamp(12px, 2vw, 26px) clamp(8px, 1.4vw, 16px);
  border-radius: 10px / 14px;
  color: var(--hatch-green);
  font-family: "VT323", var(--mono);
  font-size: clamp(15px, 2.15vw, 24px);
  line-height: 1.28;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-shadow: 0 0 6px rgba(125, 255, 106, 0.5), 0 0 1px rgba(180, 255, 160, 0.35);
  outline: none;
}

.ledger-glass:focus,
.ledger-glass:focus-visible {
  outline: none;
}

.ledger-scan {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0 2px,
      rgba(0, 0, 0, 0.22) 2px 3px
    ),
    radial-gradient(120% 90% at 50% 42%, transparent 48%, rgba(0, 0, 0, 0.38));
}

.ledger-head,
.ledger-body,
.ledger-foot {
  position: relative;
  z-index: 1;
}

.ledger-head p {
  margin: 0 0 2px;
  color: inherit;
}

.ledger-body {
  flex: 1;
  margin-top: 12px;
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #7dff6a transparent;
}

.ledger-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin: 2px 0;
}

.ledger-pointer {
  flex: 0 0 auto;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0.32em 0 0.32em 0.52em;
  border-color: transparent transparent transparent #7dff6a;
  opacity: 0;
}

.ledger-row.is-on .ledger-pointer { opacity: 1; }

.ledger-item,
.ledger-exit {
  appearance: none;
  display: inline-block;
  margin: 0;
  padding: 0 6px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: uppercase;
  text-shadow: inherit;
  cursor: pointer;
}

.ledger-row.is-on .ledger-item {
  background: #7dff6a;
  color: #031406;
  text-shadow: none;
  box-shadow: 0 0 10px rgba(125, 255, 106, 0.45);
}

.ledger-out {
  margin: 0;
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  text-transform: uppercase;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ledger-caret {
  display: inline-block;
  margin-left: 1px;
  animation: ledger-blink 1.05s steps(1) infinite;
}

.ledger-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
  opacity: 0.88;
  font-size: 0.92em;
}

.ledger-exit:hover,
.ledger-exit:focus-visible {
  background: #7dff6a;
  color: #031406;
  text-shadow: none;
}

@keyframes ledger-blink {
  50% { opacity: 0; }
}

.hood-slab {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  border-top: 1px solid var(--line);
  background: #14120e;
}

.hood-plate {
  margin: 0;
  overflow: hidden;
  background: #0a0a08;
}

.hood-plate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 48% 42%;
  min-height: 400px;
}

.hood-copy {
  padding: 48px 40px;
  background: #16140f;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hood-copy > p {
  max-width: 36ch;
}

.hood-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.howto {
  padding: 0;
  background: #1a1814;
  border-top: 1px solid var(--line);
}

.howto ol {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}

.howto li {
  padding: 28px 22px;
  border-right: 1px solid var(--line);
  color: var(--ivory);
}

.howto li:last-child { border-right: 0; }

.howto b {
  display: block;
  margin-bottom: 8px;
  font-family: var(--mono);
  color: var(--radium);
}

.colophon {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 18px 28px 22px;
  background: #1a1814;
  border-top: 1px solid var(--line);
}

.colophon .brand-word-foot {
  justify-self: start;
}

.colophon .brand-token {
  width: 40px;
  height: 40px;
  margin-bottom: 0;
}

.colophon p {
  margin: 0;
  font-size: 12px;
  text-align: center;
}

.colophon-end {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 14px;
}

.colophon button,
.colophon-links a {
  appearance: none;
  border: 0;
  background: none;
  color: var(--radium);
  font: 600 12px var(--mono);
  cursor: pointer;
  text-decoration: none;
}

.colophon-links { display: flex; gap: 14px; }

.buybox {
  width: min(420px, calc(100% - 32px));
  padding: 24px;
  border: 1px solid var(--line);
  background: #16140f;
  color: var(--ivory);
}

.buybox::backdrop { background: rgba(8, 8, 6, 0.72); }

.buybox input {
  width: 100%;
  margin: 8px 0 16px;
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--night);
  color: var(--radium);
  font: 600 12px var(--mono);
}

.buybox-tools { display: flex; flex-wrap: wrap; gap: 8px; }

.shift-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 7, 5, 0.94);
}

.shift-overlay[hidden] { display: none; }

.shift-close {
  position: absolute;
  top: 16px;
  right: 16px;
  appearance: none;
  border: 0;
  background: none;
  color: var(--ivory);
  font: 600 12px var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.run { width: min(960px, 100%); }

.run-hud {
  margin: 0 0 14px;
  text-align: center;
  font-family: var(--mono);
  color: var(--ivory);
}

.run-stage {
  height: min(46vh, 400px);
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #1a1814, #0c0c0a 50%, #17140f);
}

.run-track {
  display: flex;
  align-items: flex-end;
  height: 100%;
  padding: 0 40vw 24px;
  gap: 24px;
}

.run-booth {
  appearance: none;
  flex: 0 0 148px;
  height: 240px;
  padding: 14px 10px;
  border: 2px solid #111;
  background: #2a2a24;
  color: #8a8680;
  font: 600 12px var(--mono);
  text-align: left;
  cursor: pointer;
}

.run-booth span { display: block; color: var(--radium); }
.run-booth em { display: block; margin-top: 8px; font-style: normal; }
.run-booth.is-mine {
  box-shadow: inset 0 0 0 2px var(--radium);
  color: var(--ivory);
}

.run-hint { text-align: center; font-size: 13px; }

.hack { width: min(920px, 100%); }

.hack-bezel {
  padding: 14px 14px 18px;
  background: #2c2416;
  border: 4px solid #1a140c;
  box-shadow: inset 0 0 0 2px #c45c28;
}

.hack-crt {
  position: relative;
  padding: 16px 16px 18px;
  background: #031406;
  color: var(--radium);
  font-family: var(--mono);
  text-transform: uppercase;
  overflow: hidden;
}

.hack-crt::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, 0.22) 2px 3px),
    radial-gradient(120% 80% at 50% 40%, transparent 40%, rgba(0, 0, 0, 0.35));
}

.hack-head p { margin: 0 0 4px; font-size: 13px; color: var(--radium); }
.hack-warn { color: #f3eee4; }

.hack-pips,
#hack-pips { letter-spacing: 0.2em; }

.hack-body {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 16px;
  margin-top: 14px;
  position: relative;
  z-index: 1;
}

.hack-dump {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 18px;
  font-size: 13px;
  line-height: 1.45;
}

.hack-line { white-space: pre; }
.hack-addr { opacity: 0.55; }

.hack-word,
.hack-dud {
  appearance: none;
  border: 0;
  padding: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-transform: uppercase;
  cursor: pointer;
}

.hack-word:hover,
.hack-word:focus,
.hack-dud:hover,
.hack-dud:focus {
  background: var(--radium);
  color: #031406;
  outline: none;
}

.hack-word.is-dead {
  pointer-events: none;
  color: #1b3a14;
}

.hack-side {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  font-size: 13px;
}

#hack-log p { margin: 0 0 4px; color: var(--radium); }
.hack-cursor { margin: 10px 0 0; color: var(--radium); }

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  z-index: 50;
  transform: translateX(-50%);
  padding: 8px 14px;
  background: var(--ink);
  border: 1px solid var(--line);
  font: 600 12px var(--mono);
}

@media (max-width: 1240px) {
  .nav { gap: 16px; }
}

@media (max-width: 980px) {
  .frame { grid-template-columns: 1fr; }
  .rail { display: none; }

  .mast {
    flex-wrap: nowrap;
    gap: 8px;
    min-height: 64px;
    padding: 10px 10px 10px 12px;
  }

  .mast-end {
    gap: 6px;
    margin-left: auto;
  }

  .mast-end .steel {
    flex-shrink: 0;
    padding: 0 8px;
    min-height: 34px;
    font-size: 10px;
    letter-spacing: 0.03em;
    white-space: nowrap;
  }

  .nav {
    display: none;
    position: fixed;
    inset: 68px 0 0;
    flex-direction: column;
    justify-content: flex-start;
    padding: 16px 22px;
    background: var(--night);
    z-index: 21;
  }

  .nav.open { display: flex; }
  .menu-btn {
    display: inline-flex;
    flex-shrink: 0;
    width: 34px;
    min-height: 34px;
  }

  .splash,
  .pair-slab,
  .hood-slab,
  .howto ol {
    grid-template-columns: 1fr;
  }

  .splash-plate,
  .pair-plate { min-height: 42vh; }
  .splash-panel { padding: 28px 20px 36px; }
  .splash-beats { grid-template-columns: 1fr; gap: 10px; }
  .band, .pair-copy, .hood-copy, .colophon, .scope { padding-left: 20px; padding-right: 20px; }
  .hood-plate img { min-height: 280px; }
  .ledger { padding: 0; }
  .colophon {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .colophon .brand-word-foot,
  .colophon-end { justify-self: center; }
  .howto li { border-right: 0; border-bottom: 1px solid var(--line); }
  .gauges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hack-body,
  .hack-dump { grid-template-columns: 1fr; }
  .pair-board { grid-template-columns: 1fr; }
  .scope { padding-top: 16px; padding-bottom: 18px; }
  .scope-head { grid-template-columns: 1fr auto; gap: 8px 12px; }
  .scope-signal { justify-self: end; }
  .scope-val-hero[data-state="sealed"] { font-size: 16px; letter-spacing: 0.08em; }
  .brand-word { height: 36px; }
  .mast .brand-word { --brand-h: 40px; height: 40px; }
  .brand-word-foot { height: 40px; margin-left: 0; }
  .splash-word { width: 100%; }
}

@media (max-width: 900px) {
  .scope-board { grid-template-columns: 1fr 1fr; }
  .scope-val,
  .scope-val-hero,
  .scope-val-hero[data-state="preview"],
  .scope-val-hero[data-state="live"] {
    font-size: clamp(20px, 5.4vw, 28px);
  }
}

@media (max-width: 520px) {
  .mast {
    gap: 6px;
    padding: 10px 8px 10px 10px;
  }

  .mast .brand-word { --brand-h: 32px; height: 32px; }

  .mast-end .steel {
    padding: 0 7px;
    min-height: 32px;
    font-size: 10px;
  }

  .menu-btn {
    width: 32px;
    min-height: 32px;
  }

  .scope-board { grid-template-columns: 1fr; }
  .scope-kicker,
  .scope-chip,
  .scope-grid dt,
  .seed-copy .stamp {
    font-size: 12px;
  }
  .scope-val,
  .scope-val-hero,
  .scope-val-hero[data-state="preview"],
  .scope-val-hero[data-state="live"] {
    font-size: clamp(22px, 7vw, 28px);
  }
  .scope-seed {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }
  .seed-acc {
    grid-column: 1 / -1;
    justify-items: start;
    text-align: left;
    padding-top: 2px;
  }
  .seed-vessel,
  .seed-vessel img {
    width: 56px;
    height: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ledger-caret { animation: none; }
  .steel { transition: none; transform: none; }
  .scope-val.is-tick { animation: none; }
}
