@font-face { font-family: "HS Mono"; src: local("DejaVu Sans Mono"); font-display: swap; }
:root {
  --void: #090d08;
  --black: #050705;
  --machine: #151b12;
  --panel: #20281b;
  --olive: #596548;
  --olive-dark: #343e2c;
  --lime: #c7ff1a;
  --lime-soft: #a6cc26;
  --cream: #eee9cd;
  --gold: #ffcb45;
  --danger: #ff483b;
  --cyan: #62dce1;
  --pixel: 2px;
  --edge: 0;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--void); scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--cream);
  background:
    linear-gradient(rgba(199,255,26,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(199,255,26,.018) 1px, transparent 1px),
    var(--void);
  background-size: 24px 24px;
  font-family: "HS Mono", "Courier New", monospace;
  min-height: 100vh;
}
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
button:disabled { cursor: wait; }
.topbar {
  min-height: 72px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  border-bottom: 2px solid var(--lime);
  background: var(--black);
  position: relative;
}
.topbar::after { content: ""; position: absolute; bottom: -6px; left: 0; width: 34%; height: 4px; background: var(--lime); }
.wordmark { display: flex; gap: 12px; align-items: center; padding: 12px 24px; color: var(--lime); font-weight: 900; text-decoration: none; letter-spacing: .04em; }
.wordmark-mark { width: 42px; height: 42px; display: grid; place-items: center; border: 2px solid var(--lime); box-shadow: inset 4px 4px 0 var(--olive-dark); }
.safety-flags { display: flex; align-items: center; align-self: center; color: var(--black); background: var(--gold); height: 32px; font-size: 11px; font-weight: 900; }
.safety-flags span { padding: 0 10px; border-right: 2px solid var(--black); line-height: 32px; }
.safety-flags span:last-child { border: 0; }
.network { justify-self: end; padding: 0 24px; display: flex; gap: 9px; align-items: center; color: var(--lime-soft); font-size: 11px; }
.network i { display: inline-block; width: 8px; height: 8px; background: var(--lime); box-shadow: 0 0 10px var(--lime); }
main { display: grid; grid-template-columns: minmax(0, 1fr) 360px; max-width: 1600px; margin: 0 auto; }
.console { padding: clamp(22px, 3vw, 48px); min-width: 0; }
.console-heading { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 20px; }
.eyebrow { margin: 0 0 8px; color: var(--lime); font-size: 11px; letter-spacing: .14em; font-weight: 900; }
h1 { margin: 0; font-size: clamp(28px, 4vw, 56px); line-height: .95; text-transform: uppercase; letter-spacing: -.07em; }
h2 { margin: 0; text-transform: uppercase; font-size: 20px; line-height: 1.2; }
.unit-price { border-bottom: 2px solid var(--olive); padding: 0 0 8px 38px; text-align: right; }
.unit-price span, .unit-price small { display: block; font-size: 10px; color: var(--olive); }
.unit-price strong { display: block; color: var(--gold); font-size: 20px; }
.machine-shell { position: relative; border: 4px solid var(--lime); background: var(--machine); box-shadow: 10px 10px 0 #27331c, 14px 14px 0 var(--lime); }
.machine-shell::before, .machine-shell::after { content: ""; position: absolute; background: var(--lime); z-index: 2; }
.machine-shell::before { width: 26px; height: 8px; top: 17%; left: -12px; }
.machine-shell::after { width: 8px; height: 34px; top: 62%; right: -12px; }
.machine-screws i { position: absolute; z-index: 3; width: 8px; height: 8px; background: var(--olive); }
.machine-screws i:nth-child(1) { left: 7px; top: 7px; } .machine-screws i:nth-child(2) { right: 7px; top: 7px; }
.machine-screws i:nth-child(3) { left: 7px; bottom: 7px; } .machine-screws i:nth-child(4) { right: 7px; bottom: 7px; }
.machine-status { height: 45px; border-bottom: 2px solid var(--olive); display: flex; justify-content: space-between; align-items: center; padding: 0 20px; font-size: 11px; }
.signal { display: flex; gap: 10px; align-items: center; color: var(--lime); font-weight: 900; }
.signal i { width: 10px; height: 10px; background: var(--lime); box-shadow: 0 0 12px var(--lime); animation: blink 1.8s steps(2, end) infinite; }
.serial { color: var(--olive); }
.machine-grid { display: grid; grid-template-columns: minmax(210px, .8fr) minmax(260px, 1.15fr) minmax(220px, .8fr); min-height: 460px; }
.round-monitor, .load-panel { padding: clamp(18px, 2.3vw, 32px); background: rgba(5,7,5,.4); }
.round-monitor { border-right: 2px solid var(--olive); }
.monitor-label { display: flex; justify-content: space-between; color: var(--olive); font-size: 11px; }
.monitor-label b, .monitor-label span:last-child { color: var(--lime); }
.entry-readout { display: flex; gap: 12px; align-items: end; margin: 30px 0 18px; }
.entry-readout strong { color: var(--cream); font-size: clamp(52px, 6vw, 88px); line-height: .72; letter-spacing: -.12em; }
.entry-readout span { color: var(--olive); font-size: 11px; line-height: 1.4; }
.progress-track { height: 16px; border: 2px solid var(--olive); padding: 3px; }
.progress-track span { display: block; width: 0; height: 100%; background: repeating-linear-gradient(90deg, var(--lime) 0 10px, transparent 10px 13px); transition: width .25s steps(5, end); }
.tick-row { display: flex; justify-content: space-between; color: var(--olive); font-size: 8px; margin-top: 7px; }
.pot-readout { margin-top: 42px; padding-top: 18px; border-top: 2px solid var(--olive-dark); }
.pot-readout > span, .pot-readout em { display: block; font-size: 9px; color: var(--olive); font-style: normal; }
.pot-readout strong { display: block; color: var(--gold); font-size: clamp(27px, 3vw, 44px); margin: 7px 0; letter-spacing: -.06em; }
.pot-readout small { font-size: 12px; letter-spacing: 0; }
.switch-bay { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 28px 20px 24px; border-right: 2px solid var(--olive); background: radial-gradient(circle at 50% 50%, #202c17 0, var(--machine) 55%); }
.switch-bay::before { content: ""; position: absolute; inset: 18px; border: 2px solid var(--olive-dark); clip-path: polygon(0 0, 24% 0, 24% 2px, 76% 2px, 76% 0, 100% 0, 100% 100%, 68% 100%, 68% calc(100% - 2px), 32% calc(100% - 2px), 32% 100%, 0 100%); }
.hood-display { position: absolute; top: 52px; left: 50%; transform: translateX(-50%); width: 150px; height: 130px; border: 6px solid var(--lime); clip-path: polygon(28% 0, 72% 0, 100% 38%, 88% 100%, 12% 100%, 0 38%); background: var(--olive-dark); display: grid; place-items: center; transition: transform .16s steps(3, end), filter .16s; }
.antenna { position: absolute; top: -30px; width: 4px; height: 24px; background: var(--lime); }
.hood-face { width: 84px; height: 58px; border: 4px solid var(--lime); background: var(--black); display: grid; grid-template-columns: 1fr 1fr; place-items: center; position: relative; }
.hood-face i { width: 18px; height: 7px; background: var(--lime); }
.hood-face b { position: absolute; bottom: 10px; width: 26px; height: 4px; background: var(--olive); }
.circuit { position: absolute; top: 195px; width: 32%; height: 80px; border-top: 4px solid var(--lime); }
.circuit.left { left: 0; border-right: 4px solid var(--lime); } .circuit.right { right: 0; border-left: 4px solid var(--lime); }
.circuit i { position: absolute; width: 8px; height: 8px; background: var(--lime); top: -6px; }
.circuit i:nth-child(1) { left: 10%; } .circuit i:nth-child(2) { left: 45%; } .circuit i:nth-child(3) { right: 8%; }
.main-switch { position: relative; width: 180px; height: 180px; border: 0; padding: 0; background: transparent; cursor: pointer; z-index: 4; -webkit-tap-highlight-color: transparent; }
.switch-guard { position: absolute; inset: 0; border: 5px solid var(--cream); background: var(--black); clip-path: polygon(16% 0, 84% 0, 100% 16%, 100% 84%, 84% 100%, 16% 100%, 0 84%, 0 16%); box-shadow: inset 0 0 0 12px var(--olive-dark); }
.switch-guard::before { content: ""; position: absolute; inset: 28px; border: 4px solid var(--gold); border-radius: 50%; }
.switch-cap { position: absolute; inset: 46px; border: 4px solid var(--black); background: var(--lime); color: var(--black); border-radius: 50%; display: grid; place-content: center; box-shadow: 0 9px 0 #66880e; transition: transform .12s steps(2, end), box-shadow .12s; }
.switch-cap b { font-size: 16px; } .switch-cap small { font-size: 7px; }
.main-switch:hover .switch-cap { background: var(--gold); }
.main-switch:active .switch-cap, .machine-shell[data-state="switching"] .switch-cap { transform: translateY(8px); box-shadow: 0 1px 0 #66880e; }
.machine-message { color: var(--lime); font-size: 9px; margin-top: 14px; min-height: 1em; text-align: center; }
.load-panel { display: flex; flex-direction: column; }
fieldset { margin: 0; padding: 0; border: 0; }
legend { width: 100%; color: var(--lime); font-size: 11px; padding-bottom: 12px; border-bottom: 2px solid var(--olive-dark); }
.quantity-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin: 18px 0 10px; }
.quantity-grid button { min-height: 52px; border: 2px solid var(--olive); border-right: 0; background: var(--black); color: var(--cream); cursor: pointer; font-weight: 900; }
.quantity-grid button:last-child { border-right: 2px solid var(--olive); }
.quantity-grid button:hover { color: var(--lime); }
.quantity-grid button.selected { color: var(--black); background: var(--lime); border-color: var(--lime); }
.custom-load { min-height: 48px; display: grid; grid-template-columns: auto 1fr; align-items: center; border: 2px solid var(--olive); color: var(--olive); font-size: 10px; }
.custom-load span { padding: 0 10px; }
.custom-load input { min-width: 0; width: 100%; height: 44px; border: 0; border-left: 2px solid var(--olive); background: var(--black); color: var(--cream); padding: 0 10px; border-radius: 0; }
.action-ledger { margin: 28px 0 10px; }
.action-ledger div { display: flex; justify-content: space-between; border-bottom: 1px solid var(--olive-dark); padding: 10px 0; font-size: 10px; }
.action-ledger dt { color: var(--olive); } .action-ledger dd { margin: 0; color: var(--cream); font-weight: 900; }
.boundary-note { margin: auto 0 0; padding-top: 14px; color: var(--lime-soft); font-size: 9px; line-height: 1.5; }
.machine-footer { min-height: 38px; border-top: 2px solid var(--olive); display: flex; justify-content: space-between; align-items: center; padding: 0 20px; color: var(--olive); font-size: 9px; }
.machine-footer b { color: var(--lime); }
.machine-shell[data-state="switching"] .hood-display { transform: translateX(-50%) translateY(5px); filter: brightness(1.4); }
.machine-shell[data-state="switching"] .signal i, .machine-shell[data-state="complete"] .signal i { background: var(--gold); box-shadow: 0 0 18px var(--gold); }
.machine-shell[data-state="switching"] .machine-message { color: var(--gold); }
.machine-shell[data-state="complete"] { animation: machine-flash .48s steps(3, end); }
.result-tape { min-height: 62px; margin: 20px 0 0; display: grid; grid-template-columns: auto 1fr; column-gap: 16px; border-top: 2px solid var(--olive); border-bottom: 2px solid var(--olive-dark); padding: 13px 0; }
.tape-label { color: var(--black); background: var(--lime); align-self: start; padding: 5px 8px; font-size: 9px; font-weight: 900; }
.result-tape p { margin: 3px 0 8px; font-size: 10px; color: var(--olive); }
.token-strip { grid-column: 2; display: flex; gap: 5px; flex-wrap: wrap; }
.token-strip span { color: var(--lime); border: 1px solid var(--olive); padding: 2px 5px; font-size: 9px; }
.side-rail { border-left: 2px solid var(--lime); background: #0d120b; }
.side-rail section { padding: 28px 26px; border-bottom: 2px solid var(--olive-dark); }
.payout-block h2 { color: var(--cream); margin-bottom: 22px; }
.split-meter { height: 13px; display: grid; grid-template-columns: 9fr 1fr; gap: 3px; }
.split-meter span { background: repeating-linear-gradient(90deg, var(--gold) 0 12px, #9c741c 12px 14px); }
.split-meter i { background: var(--danger); }
.payout-block dl, .provenance-block dl { margin: 12px 0; }
.payout-block dl { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.payout-block dl div { display: flex; justify-content: space-between; gap: 8px; min-width: 0; font-size: 10px; }
.payout-block dl div:first-child { color: var(--gold); } .payout-block dl div:last-child { color: var(--danger); }
.payout-block dd, .provenance-block dd { margin: 0; font-weight: 900; }
.payout-block > p:last-child { color: var(--olive); line-height: 1.6; font-size: 10px; }
.provenance-block figure { margin: 16px 0; position: relative; border: 2px solid var(--olive); background: var(--black); }
.provenance-block img { width: 100%; height: auto; display: block; image-rendering: pixelated; opacity: .72; }
.provenance-block figcaption { position: absolute; bottom: 0; left: 0; color: var(--black); background: var(--lime); padding: 5px 7px; font-size: 8px; font-weight: 900; }
.provenance-block dl div { display: flex; justify-content: space-between; border-bottom: 1px solid var(--olive-dark); padding: 8px 0; font-size: 10px; }
.provenance-block dt { color: var(--olive); }
.transparency-title { display: flex; justify-content: space-between; }
.transparency-title > span { color: var(--danger); font-size: 8px; }
.transparency h2 { margin-bottom: 15px; }
.transparency ul { list-style: none; padding: 0; margin: 0; }
.transparency li { padding: 11px 0; border-top: 1px solid var(--olive-dark); }
.transparency li b { display: block; color: var(--lime); font-size: 9px; margin-bottom: 4px; }
.transparency li span { display: block; color: var(--olive); font-size: 9px; line-height: 1.5; }
.transparency button { width: 100%; min-height: 44px; margin-top: 15px; border: 2px solid var(--olive); background: var(--black); color: var(--cream); font-size: 9px; cursor: pointer; }
.transparency button:hover { border-color: var(--danger); color: var(--danger); }
footer { min-height: 52px; border-top: 2px solid var(--olive); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; color: var(--olive); background: var(--black); font-size: 8px; }
@keyframes blink { 50% { opacity: .35; } }
@keyframes machine-flash { 50% { box-shadow: 10px 10px 0 var(--gold), 14px 14px 0 var(--lime); } }
@media (max-width: 1180px) {
  main { grid-template-columns: 1fr; }
  .side-rail { border-left: 0; border-top: 2px solid var(--lime); display: grid; grid-template-columns: repeat(3, 1fr); }
  .side-rail section { border-right: 2px solid var(--olive-dark); border-bottom: 0; }
  .side-rail section:last-child { border-right: 0; }
}
@media (max-width: 850px) {
  .topbar { grid-template-columns: 1fr auto; }
  .safety-flags { grid-column: 1 / -1; grid-row: 2; width: 100%; justify-content: center; }
  .network { padding-right: 14px; }
  .machine-grid { grid-template-columns: 1fr 1fr; }
  .round-monitor { border-bottom: 2px solid var(--olive); }
  .switch-bay { grid-row: span 2; border-right: 0; min-height: 500px; }
  .load-panel { border-right: 2px solid var(--olive); }
  .side-rail { grid-template-columns: 1fr 1fr; }
  .transparency { grid-column: 1 / -1; border-top: 2px solid var(--olive-dark); }
}
@media (max-width: 620px) {
  .wordmark { padding: 10px 12px; font-size: 12px; }
  .wordmark-mark { width: 36px; height: 36px; }
  .network { font-size: 0; }
  .network i { margin-right: 8px; }
  .safety-flags { height: 30px; font-size: 9px; }
  .safety-flags span { line-height: 30px; }
  .console { padding: 25px 14px 34px; }
  .console-heading { align-items: start; }
  .unit-price { padding-left: 0; min-width: 95px; }
  .unit-price strong { font-size: 16px; }
  .machine-shell { box-shadow: 6px 6px 0 #27331c, 9px 9px 0 var(--lime); }
  .machine-grid { display: flex; flex-direction: column; }
  .round-monitor { border-right: 0; order: 1; }
  .switch-bay { order: 2; min-height: 455px; border-top: 2px solid var(--olive); border-bottom: 2px solid var(--olive); }
  .load-panel { order: 3; border-right: 0; }
  .entry-readout { margin-top: 22px; }
  .pot-readout { margin-top: 28px; }
  .main-switch { width: 164px; height: 164px; }
  .hood-display { top: 46px; }
  .machine-footer { flex-wrap: wrap; justify-content: center; gap: 8px 18px; padding: 9px; }
  .side-rail { display: block; }
  .side-rail section { border-right: 0; border-bottom: 2px solid var(--olive-dark); }
  .transparency { border-top: 0; }
  .result-tape { grid-template-columns: 1fr; }
  .token-strip { grid-column: 1; }
  footer { display: grid; gap: 5px; padding: 12px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
