@font-face {
  font-family: "Press Start 2P";
  src: url("fonts/PressStart2P-Regular.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: "DotGothic16";
  src: url("fonts/DotGothic16-Regular.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

:root {
  --ink: #f5f1d5;
  --ink-dim: #b8c6eb;
  --black-blue: #010728;
  --deep-blue: #04144e;
  --bios-blue: #0a2a9b;
  --panel-blue: #082178;
  --panel-light: #1037b7;
  --line: #88abff;
  --line-dim: #345bc3;
  --orange: #ff9e3d;
  --orange-deep: #df5c26;
  --green: #79f59b;
  --green-deep: #1b9b54;
  --red: #ff6a63;
  --gold: #ffe270;
  --cyan: #74e8ff;
  --shadow: #000529;
  --font-pixel: "Press Start 2P", "DotGothic16", monospace;
  --font-body: "DotGothic16", "Courier New", monospace;
  color-scheme: dark;
}

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

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--black-blue);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(98, 142, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(98, 142, 255, 0.07) 1px, transparent 1px),
    radial-gradient(circle at 17% 8%, rgba(28, 79, 211, 0.36), transparent 31rem),
    radial-gradient(circle at 88% 82%, rgba(17, 58, 172, 0.36), transparent 35rem),
    var(--black-blue);
  background-size: 4px 4px, 4px 4px, auto, auto, auto;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  text-rendering: geometricPrecision;
}

body::before {
  position: fixed;
  z-index: 1000;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.17;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 3px,
    rgba(0, 0, 22, 0.28) 4px
  );
  mix-blend-mode: multiply;
}

img {
  max-width: 100%;
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: var(--cyan);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--gold);
}

h1,
h2,
h3,
p,
dl,
dd,
figure,
blockquote {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-pixel);
  font-weight: 400;
  line-height: 1.35;
  text-wrap: balance;
}

html[lang^="zh"] h2,
html[lang^="zh"] h3 {
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.03em;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 2000;
  top: 8px;
  left: 8px;
  padding: 12px 16px;
  color: var(--black-blue);
  background: var(--gold);
  font-family: var(--font-pixel);
  font-size: 11px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.screen-shell {
  width: min(1560px, calc(100% - 40px));
  margin: 20px auto;
}

.bios-shell {
  position: relative;
  overflow: hidden;
  border: 3px solid var(--ink);
  outline: 3px solid #153db7;
  outline-offset: 4px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent 28%),
    linear-gradient(180deg, #082990 0%, #061c70 54%, #051557 100%);
  box-shadow:
    8px 8px 0 #000322,
    12px 12px 0 rgba(15, 49, 155, 0.45);
}

.bios-shell::before,
.bios-shell::after {
  position: absolute;
  z-index: 4;
  width: 16px;
  height: 16px;
  pointer-events: none;
  content: "";
}

.bios-shell::before {
  top: 5px;
  left: 5px;
  border-top: 2px solid var(--orange);
  border-left: 2px solid var(--orange);
}

.bios-shell::after {
  right: 5px;
  bottom: 5px;
  border-right: 2px solid var(--orange);
  border-bottom: 2px solid var(--orange);
}

.machine-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 12px 22px;
  gap: 20px;
  border-bottom: 2px solid var(--line);
  background: #05175b;
}

.machine-id {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--font-pixel);
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
  letter-spacing: 0.03em;
}

.machine-id:hover {
  color: var(--gold);
}

.machine-sub {
  padding-left: 10px;
  border-left: 1px solid var(--line);
  color: var(--orange);
  font-size: 8px;
}

.signal-led {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  background: var(--green);
  box-shadow: 0 0 0 2px #174c39, 0 0 12px var(--green);
  animation: ledPulse 2.4s steps(2, end) infinite;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wallet-key,
.inline-key,
.language-switch button {
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}

.wallet-key {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 13px;
  gap: 9px;
  color: var(--ink);
  font-family: var(--font-pixel);
  font-size: 8px;
  line-height: 1.5;
}

.wallet-key:hover,
.wallet-key:focus-visible,
.inline-key:hover,
.inline-key:focus-visible {
  color: var(--black-blue);
  background: var(--ink);
}

.wallet-key.connected {
  border-color: var(--green);
  color: var(--green);
}

.key-light {
  width: 7px;
  height: 7px;
  background: var(--orange);
}

.wallet-key.connected .key-light {
  background: var(--green);
  box-shadow: 0 0 9px var(--green);
}

.language-switch {
  display: inline-flex;
  border: 1px solid var(--line);
}

.language-switch button {
  min-width: 43px;
  min-height: 38px;
  padding: 7px 8px;
  border: 0;
  color: var(--ink-dim);
  font-family: var(--font-pixel);
  font-size: 8px;
}

.language-switch button + button {
  border-left: 1px solid var(--line);
}

.language-switch button[aria-pressed="true"] {
  color: var(--black-blue);
  background: var(--orange);
}

.utility-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
  padding: 7px 22px;
  gap: 18px;
  color: var(--ink-dim);
  border-bottom: 1px solid var(--line-dim);
  background: #03124d;
  font-size: 12px;
  line-height: 1.35;
  letter-spacing: 0.04em;
}

.utility-chain {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.signal-dot {
  width: 7px;
  height: 7px;
  background: var(--orange);
}

.signal-dot.ok {
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.signal-dot.bad {
  background: var(--red);
}

.bios-tabs {
  display: flex;
  align-items: stretch;
  border-bottom: 2px solid var(--ink);
  background: #020c3d;
}

.bios-tabs button {
  position: relative;
  display: flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 10px 12px;
  gap: 9px;
  color: var(--ink);
  border: 0;
  border-right: 1px solid var(--line-dim);
  background: transparent;
  font-family: var(--font-pixel);
  font-size: 10px;
  line-height: 1.5;
  cursor: pointer;
}

.bios-tabs button:last-child {
  border-right: 0;
}

.tab-index {
  color: var(--line);
  font-size: 7px;
}

.bios-tabs button:hover {
  color: var(--black-blue);
  background: var(--ink);
}

.bios-tabs button[aria-selected="true"] {
  color: var(--black-blue);
  background: var(--ink);
}

.bios-tabs button[aria-selected="true"]::after {
  position: absolute;
  right: 5px;
  bottom: 5px;
  left: 5px;
  height: 3px;
  content: "";
  background: var(--orange);
}

.bios-tabs button[aria-selected="true"] .tab-index {
  color: var(--orange-deep);
}

.bios-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 264px;
  gap: 0;
  align-items: stretch;
}

.panel-stack {
  min-width: 0;
  border-right: 2px solid var(--line);
}

.bios-panel {
  min-height: 740px;
  padding: clamp(22px, 3vw, 42px);
  outline: none;
  animation: panelWake 420ms steps(5, end) both;
}

.bios-panel:focus-visible {
  outline: 2px dashed var(--gold);
  outline-offset: -8px;
}

.panel-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 9px;
  gap: 16px;
  color: var(--orange);
  border-bottom: 1px dashed var(--line);
  font-family: var(--font-pixel);
  font-size: 8px;
  line-height: 1.7;
}

.kicker-code {
  color: var(--ink-dim);
  white-space: nowrap;
}

.eyebrow,
.module-code {
  margin-bottom: 10px;
  color: var(--green);
  font-family: var(--font-pixel);
  font-size: 8px;
  line-height: 1.7;
  letter-spacing: 0.04em;
}

.section-intro {
  max-width: 780px;
  margin-bottom: 28px;
}

.section-intro h2 {
  margin-bottom: 16px;
  color: var(--ink);
  font-size: clamp(25px, 3vw, 38px);
}

.section-intro > p:last-child {
  max-width: 72ch;
  margin-bottom: 0;
  color: var(--ink-dim);
  font-size: 18px;
}

.post-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(380px, 1.18fr);
  gap: clamp(24px, 4vw, 52px);
  align-items: center;
  margin-bottom: 28px;
}

.post-copy h1 {
  max-width: 590px;
  margin-bottom: 22px;
  color: var(--ink);
  font-size: clamp(42px, 5.6vw, 76px);
  line-height: 1.12;
  letter-spacing: -0.055em;
  text-shadow: 5px 5px 0 var(--orange-deep);
}

.post-copy h1 span {
  display: block;
  color: var(--orange);
}

.hero-lede {
  max-width: 44ch;
  margin-bottom: 14px;
  color: var(--ink);
  font-size: clamp(20px, 2vw, 25px);
  font-weight: 700;
  line-height: 1.45;
}

.hero-body {
  max-width: 50ch;
  margin-bottom: 24px;
  color: var(--ink-dim);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
}

.pixel-button,
.outline-button,
.text-button {
  border-radius: 0;
  cursor: pointer;
}

.pixel-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 16px;
  gap: 8px;
  color: var(--black-blue);
  border: 2px solid var(--ink);
  background: var(--ink);
  box-shadow: 4px 4px 0 #00134e;
  font-family: var(--font-pixel);
  font-size: 9px;
  line-height: 1.65;
  text-align: center;
}

.pixel-button:hover:not(:disabled),
.pixel-button:focus-visible {
  color: var(--black-blue);
  background: var(--gold);
  border-color: var(--gold);
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 #00134e;
}

.pixel-button:active:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #00134e;
}

.pixel-button:disabled {
  color: #7c8ebf;
  border-color: #6f82b4;
  background: #1a316e;
  box-shadow: 3px 3px 0 #03103d;
  cursor: not-allowed;
}

.pixel-button.primary {
  color: var(--black-blue);
  border-color: var(--green);
  background: var(--green);
}

.pixel-button.warn-button {
  color: var(--black-blue);
  border-color: var(--orange);
  background: var(--orange);
}

.pixel-button.danger-button {
  color: var(--ink);
  border-color: var(--red);
  background: #701e32;
}

.pixel-button.wide,
.outline-button.wide {
  width: 100%;
}

.outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 15px;
  gap: 10px;
  color: var(--ink);
  border: 1px solid var(--line);
  background: transparent;
  font-family: var(--font-body);
  font-size: 16px;
}

.outline-button:hover:not(:disabled),
.outline-button:focus-visible {
  color: var(--black-blue);
  border-color: var(--ink);
  background: var(--ink);
}

.outline-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.outline-button.compact {
  min-height: 38px;
  padding: 8px 12px;
  font-family: var(--font-pixel);
  font-size: 7px;
}

.text-button {
  min-height: 44px;
  padding: 8px 0;
  color: var(--cyan);
  border: 0;
  border-bottom: 1px dashed currentColor;
  background: transparent;
  font-family: var(--font-pixel);
  font-size: 8px;
  line-height: 1.7;
  text-align: left;
}

.text-button:hover,
.text-button:focus-visible {
  color: var(--gold);
}

.hero-visual {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 3px solid var(--ink);
  background: #06185d;
  box-shadow: 8px 8px 0 var(--orange-deep);
}

.hero-visual::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 3px,
    rgba(2, 7, 44, 0.28) 4px
  );
}

.hero-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
}

.hero-visual figcaption {
  position: absolute;
  z-index: 2;
  right: 8px;
  bottom: 8px;
  display: flex;
  align-items: center;
  padding: 6px 8px;
  gap: 7px;
  color: var(--ink);
  background: rgba(1, 7, 40, 0.88);
  border: 1px solid var(--line);
  font-family: var(--font-pixel);
  font-size: 7px;
}

.rec-dot {
  width: 6px;
  height: 6px;
  background: var(--red);
  animation: ledPulse 1.2s steps(2, end) infinite;
}

.post-terminal {
  margin-bottom: 24px;
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(0, 7, 41, 0.48);
}

.terminal-command {
  margin: 0;
  padding: 10px 14px;
  color: var(--green);
  border-bottom: 1px solid var(--line-dim);
  font-family: var(--font-pixel);
  font-size: 8px;
}

.cursor-block {
  display: inline-block;
  width: 7px;
  height: 11px;
  margin-left: 4px;
  background: var(--green);
  animation: blink 1s steps(2, end) infinite;
  vertical-align: -1px;
}

.post-log {
  display: grid;
  margin: 0;
  padding: 12px 14px 14px;
  gap: 8px;
  list-style: none;
  font-size: 16px;
}

.post-log li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 11px;
  align-items: start;
  opacity: 0;
  animation: bootLine 360ms steps(4, end) forwards;
}

.post-log li:nth-child(2) {
  animation-delay: 140ms;
}

.post-log li:nth-child(3) {
  animation-delay: 280ms;
}

.post-log li:nth-child(4) {
  animation-delay: 420ms;
}

.log-status {
  color: var(--green);
  font-family: var(--font-pixel);
  font-size: 7px;
  line-height: 2.2;
}

.log-status.warn {
  color: var(--orange);
}

.post-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 0;
  border: 1px solid var(--line);
  background: rgba(4, 20, 78, 0.75);
}

.post-facts > div {
  padding: 15px 18px;
}

.post-facts > div + div {
  border-left: 1px solid var(--line);
}

.post-facts dt {
  margin-bottom: 7px;
  color: var(--ink-dim);
  font-family: var(--font-pixel);
  font-size: 7px;
  line-height: 1.7;
}

.post-facts dd {
  margin: 0;
  color: var(--orange);
  font-family: var(--font-pixel);
  font-size: clamp(15px, 2vw, 22px);
  line-height: 1.5;
}

.post-facts small {
  color: var(--ink-dim);
  font-size: 7px;
}

.green-text {
  color: var(--green) !important;
}

.red-text {
  color: var(--red) !important;
}

.boot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
  gap: 22px;
  align-items: start;
}

.bios-module {
  border: 2px solid var(--line);
  background: rgba(3, 17, 70, 0.75);
  box-shadow: 5px 5px 0 rgba(0, 8, 43, 0.75);
}

.sequence-module,
.x-module,
.price-module,
.supply-module {
  padding: clamp(18px, 2.2vw, 26px);
}

.module-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 13px;
  gap: 12px;
  border-bottom: 1px solid var(--line-dim);
}

.module-header h3,
.device-inventory h3,
.device-tools h3,
.deck-integrity h3,
.protocol-title h3,
.faq-file h3 {
  margin-bottom: 0;
  font-size: clamp(17px, 2vw, 22px);
}

.module-code {
  color: var(--line);
  font-size: 7px;
}

.state-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 7px;
  color: var(--green);
  border: 1px solid currentColor;
  font-family: var(--font-pixel);
  font-size: 7px;
  line-height: 1.5;
  white-space: nowrap;
}

.state-badge[data-state="warn"],
.state-badge[data-state="loading"] {
  color: var(--orange);
}

.state-badge[data-state="bad"] {
  color: var(--red);
}

.connection-line {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  padding: 9px 10px;
  gap: 8px;
  color: var(--ink-dim);
  border: 1px dashed var(--line);
  font-size: 15px;
}

.connection-line > span:nth-child(2) {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
}

.port-icon {
  color: var(--green);
  font-size: 13px;
}

.inline-key {
  min-height: 32px;
  padding: 5px 8px;
  color: var(--ink);
  font-family: var(--font-pixel);
  font-size: 7px;
  line-height: 1.5;
}

.mint-form {
  display: grid;
  gap: 18px;
}

.quantity-block {
  display: grid;
  grid-template-columns: auto 152px;
  align-items: center;
  gap: 9px 18px;
}

.quantity-block label,
.field-label {
  color: var(--ink-dim);
  font-family: var(--font-pixel);
  font-size: 8px;
  line-height: 1.7;
}

.stepper {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  border: 2px solid var(--ink);
}

.stepper-key {
  min-height: 42px;
  padding: 0;
  color: var(--ink);
  border: 0;
  background: #102d85;
  font-family: var(--font-pixel);
  font-size: 17px;
  cursor: pointer;
}

.stepper-key:hover,
.stepper-key:focus-visible {
  color: var(--black-blue);
  background: var(--orange);
}

.stepper input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 3px;
  color: var(--ink);
  border: 0;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: #020d3e;
  font-family: var(--font-pixel);
  font-size: 16px;
  text-align: center;
  appearance: textfield;
}

.stepper input::-webkit-inner-spin-button,
.stepper input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.field-note {
  grid-column: 2;
  color: var(--ink-dim);
  font-size: 13px;
  line-height: 1.4;
}

.quote-readout {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin: 0;
  border: 1px solid var(--line);
  background: #020d41;
}

.quote-readout > div {
  padding: 13px 14px;
}

.quote-readout > div:nth-child(even) {
  border-left: 1px solid var(--line-dim);
}

.quote-readout > div:nth-child(n+3) {
  border-top: 1px solid var(--line-dim);
}

.quote-readout dt {
  margin-bottom: 5px;
  color: var(--ink-dim);
  font-family: var(--font-pixel);
  font-size: 6px;
  line-height: 1.7;
}

.quote-readout dd {
  margin: 0;
  color: var(--green);
  font-family: var(--font-pixel);
  font-size: clamp(10px, 1.5vw, 14px);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.agent-check {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  padding: 10px 12px;
  gap: 5px 14px;
  border: 1px dashed var(--orange);
}

.check-label {
  color: var(--orange);
  font-family: var(--font-pixel);
  font-size: 7px;
}

.agent-check strong {
  color: var(--ink);
  font-size: 15px;
}

.agent-check a {
  grid-column: 2;
  justify-self: start;
  font-size: 13px;
}

.action-message {
  min-height: 1.6em;
  margin: 0;
  color: var(--ink-dim);
  font-size: 14px;
  line-height: 1.5;
}

.action-message[data-tone="good"] {
  color: var(--green);
}

.action-message[data-tone="warn"] {
  color: var(--orange);
}

.action-message[data-tone="bad"] {
  color: var(--red);
}

.agent-check strong[data-tone="good"],
.collection-status[data-tone="good"] {
  color: var(--green);
}

.agent-check strong[data-tone="bad"],
.collection-status[data-tone="bad"] {
  color: var(--red);
}

.collection-status[data-tone="warn"] {
  color: var(--orange);
}

.module-separator {
  display: flex;
  align-items: center;
  margin: 18px 0;
  gap: 10px;
  color: var(--ink-dim);
  font-family: var(--font-pixel);
  font-size: 7px;
}

.module-separator::before,
.module-separator::after {
  height: 1px;
  flex: 1;
  content: "";
  background: var(--line-dim);
}

.x-module {
  background:
    linear-gradient(150deg, rgba(255, 158, 61, 0.09), transparent 45%),
    rgba(3, 17, 70, 0.8);
}

.module-lede {
  margin-bottom: 20px;
  color: var(--ink-dim);
  font-size: 16px;
}

.claim-steps {
  display: grid;
  margin: 0 0 20px;
  padding: 0;
  gap: 10px;
  list-style: none;
}

.claim-steps li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  align-items: start;
}

.claim-steps li > span {
  padding-top: 3px;
  color: var(--orange);
  font-family: var(--font-pixel);
  font-size: 8px;
}

.claim-steps p {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
}

.x-module .pixel-button,
.x-module .text-input,
.x-module .field-label {
  margin-bottom: 12px;
}

.field-label {
  display: block;
  margin-bottom: 7px;
}

.text-input {
  width: 100%;
  min-height: 45px;
  padding: 9px 11px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 0;
  background: #020c3d;
  font-family: var(--font-body);
  font-size: 16px;
}

.text-input::placeholder {
  color: #8499cb;
  opacity: 1;
}

.text-input:focus {
  border-color: var(--orange);
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.fine-print {
  display: grid;
  grid-template-columns: 22px 1fr;
  margin-top: 16px;
  padding-top: 14px;
  gap: 8px;
  color: var(--ink-dim);
  border-top: 1px dashed var(--line-dim);
}

.fine-print > span {
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  color: var(--orange);
  border: 1px solid var(--orange);
  font-family: var(--font-pixel);
  font-size: 7px;
}

.fine-print p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.rule-ruler {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 22px;
  border: 1px solid var(--line);
  background: #020d3e;
}

.rule-ruler > div {
  display: grid;
  padding: 12px 14px;
  gap: 3px;
}

.rule-ruler > div + div {
  border-left: 1px solid var(--line);
}

.rule-ruler span {
  color: var(--ink-dim);
  font-family: var(--font-pixel);
  font-size: 7px;
}

.rule-ruler strong {
  color: var(--orange);
  font-family: var(--font-pixel);
  font-size: 10px;
  line-height: 1.5;
}

.rule-ruler small {
  color: var(--ink);
  font-size: 13px;
}

.stat-bank {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 22px;
  border: 2px solid var(--line);
}

.stat-bank > div {
  min-width: 0;
  padding: 16px 17px;
  background: rgba(2, 13, 61, 0.62);
}

.stat-bank > div:not(:nth-child(3n + 1)) {
  border-left: 1px solid var(--line);
}

.stat-bank > div:nth-child(n + 4) {
  border-top: 1px solid var(--line);
}

.stat-bank dt {
  margin-bottom: 8px;
  color: var(--ink-dim);
  font-family: var(--font-pixel);
  font-size: 7px;
  line-height: 1.7;
}

.stat-bank dd {
  margin: 0;
  color: var(--green);
  font-family: var(--font-pixel);
  font-size: clamp(17px, 2.2vw, 26px);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.stat-bank small {
  margin-left: 5px;
  color: var(--ink-dim);
  font-size: 7px;
}

.deck-integrity {
  margin-bottom: 22px;
  padding: 20px;
  border: 1px solid var(--line);
  background: #020d41;
}

.deck-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 15px;
  gap: 16px;
}

.deck-heading > span {
  color: var(--green);
  font-family: var(--font-pixel);
  font-size: 17px;
}

.progress-track {
  height: 20px;
  padding: 3px;
  border: 1px solid var(--line);
  background:
    repeating-linear-gradient(90deg, transparent 0 8px, rgba(120, 164, 255, 0.15) 8px 9px),
    #010728;
}

.progress-track > span {
  display: block;
  width: 0;
  height: 100%;
  background:
    repeating-linear-gradient(90deg, transparent 0 6px, rgba(1, 7, 40, 0.28) 6px 7px),
    var(--green);
  transition: width 600ms steps(8, end);
}

.deck-integrity > p:last-child {
  margin: 11px 0 0;
  color: var(--ink-dim);
  font-size: 14px;
}

.main-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 22px;
  margin-bottom: 22px;
}

.table-wrap {
  overflow-x: auto;
}

.ladder-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}

.ladder-table th,
.ladder-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line-dim);
  text-align: left;
}

.ladder-table th {
  color: var(--ink-dim);
  font-family: var(--font-pixel);
  font-size: 7px;
  line-height: 1.6;
}

.ladder-table td:first-child {
  color: var(--orange);
  font-family: var(--font-pixel);
  font-size: 9px;
  white-space: nowrap;
}

.ladder-table tr:last-child td {
  border-bottom: 0;
}

.module-footnote {
  margin: 15px 0 0;
  color: var(--ink-dim);
  font-size: 13px;
  line-height: 1.5;
}

.rarity-bars {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 12px;
  list-style: none;
}

.rarity-bars li {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: center;
  padding-bottom: 11px;
  gap: 8px;
  border-bottom: 1px solid var(--line-dim);
}

.rarity-bars li:last-child {
  border-bottom: 0;
}

.rarity-bars strong {
  color: var(--ink);
  font-family: var(--font-pixel);
  font-size: 9px;
}

.rarity-bars i {
  position: relative;
  grid-column: 1 / -1;
  height: 3px;
  overflow: hidden;
  background: #112b75;
}

.rarity-bars i::after {
  display: block;
  width: var(--fill);
  height: 100%;
  content: "";
  background: var(--line);
}

.rarity-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  background: var(--ink);
}

.rarity-dot.common {
  background: var(--green);
}

.rarity-dot.rare {
  background: var(--cyan);
}

.rarity-dot.epic {
  background: var(--orange);
}

.rarity-dot.legendary {
  background: var(--gold);
}

.rarity-dot.divine {
  background: var(--ink);
  box-shadow: 0 0 7px var(--ink);
}

.protocol-strip {
  display: grid;
  grid-template-columns: 1.1fr repeat(2, 1fr);
  border: 2px solid var(--line);
}

.protocol-title,
.protocol-fact {
  padding: 17px;
}

.protocol-title {
  grid-row: span 2;
  background: #020d3e;
}

.protocol-fact {
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.protocol-fact:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.protocol-fact strong {
  display: block;
  margin-bottom: 5px;
  color: var(--orange);
  font-family: var(--font-pixel);
  font-size: 9px;
}

.protocol-fact p {
  margin: 0;
  color: var(--ink-dim);
  font-size: 14px;
  line-height: 1.5;
}

.device-status {
  margin-bottom: 22px;
  border: 2px solid var(--line);
  background: #020d41;
}

.device-port {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.device-port > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: baseline;
  gap: 12px;
}

.device-port span span {
  color: var(--ink-dim);
  font-family: var(--font-pixel);
  font-size: 7px;
}

.device-port strong {
  overflow-wrap: anywhere;
}

.device-status dl {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
}

.device-status dl > div {
  min-width: 0;
  padding: 13px 15px;
}

.device-status dl > div + div {
  border-left: 1px solid var(--line);
}

.device-status dt {
  margin-bottom: 4px;
  color: var(--ink-dim);
  font-family: var(--font-pixel);
  font-size: 6px;
  line-height: 1.7;
}

.device-status dd {
  margin: 0;
  color: var(--green);
  font-family: var(--font-pixel);
  font-size: 9px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.device-inventory,
.device-tools {
  margin-bottom: 22px;
  padding: clamp(17px, 2.3vw, 25px);
  border: 2px solid var(--line);
  background: rgba(3, 17, 70, 0.7);
}

.inventory-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 17px;
  padding-bottom: 13px;
  gap: 16px;
  border-bottom: 1px solid var(--line-dim);
}

.collection-status {
  margin-bottom: 15px;
  color: var(--ink-dim);
  font-size: 15px;
}

.looper-register {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.looper-chip {
  min-width: 0;
  padding: 0;
  color: var(--ink);
  border: 1px solid var(--line);
  background: #020d3e;
  cursor: pointer;
  text-align: left;
}

.looper-chip:hover:not(:disabled),
.looper-chip:focus-visible {
  border-color: var(--gold);
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.looper-chip[aria-pressed="true"] {
  border-color: var(--orange);
  box-shadow: inset 0 0 0 3px var(--orange);
}

.looper-chip:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.looper-chip img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
  background: #07195e;
}

.looper-chip-info {
  display: grid;
  grid-template-columns: 1fr auto;
  padding: 8px 9px;
  gap: 2px 6px;
}

.looper-chip-info strong {
  font-family: var(--font-pixel);
  font-size: 8px;
  line-height: 1.5;
}

.looper-chip-info span {
  color: var(--ink-dim);
  font-family: var(--font-pixel);
  font-size: 6px;
  line-height: 1.7;
}

.looper-chip-info small {
  grid-column: 1 / -1;
  color: var(--ink-dim);
  font-size: 11px;
}

.empty-register {
  grid-column: 1 / -1;
  min-height: 140px;
  padding: 34px 24px;
  color: var(--ink-dim);
  border: 1px dashed var(--line);
  background:
    linear-gradient(90deg, transparent 49%, rgba(130, 166, 255, 0.1) 50%, transparent 51%),
    linear-gradient(transparent 49%, rgba(130, 166, 255, 0.1) 50%, transparent 51%);
  background-size: 24px 24px;
  text-align: center;
}

.empty-register strong {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-family: var(--font-pixel);
  font-size: 10px;
  line-height: 1.6;
}

.selection-count {
  color: var(--orange);
  font-family: var(--font-pixel);
  font-size: 8px;
  line-height: 1.6;
  white-space: nowrap;
}

.tool-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 17px 0;
  gap: 22px;
  border-bottom: 1px solid var(--line-dim);
}

.tool-row:first-of-type {
  padding-top: 0;
}

.tool-copy strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 18px;
}

.tool-copy p {
  max-width: 60ch;
  margin: 0;
  color: var(--ink-dim);
  font-size: 14px;
  line-height: 1.5;
}

.tool-row .pixel-button {
  min-width: 185px;
  flex-direction: column;
  gap: 3px;
}

.tool-row .pixel-button span:last-child {
  color: inherit;
  font-family: var(--font-body);
  font-size: 12px;
}

.token-mint-zone {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  margin-top: 20px;
  padding: 18px;
  gap: 20px;
  border: 2px solid var(--orange);
  background:
    linear-gradient(135deg, rgba(255, 158, 61, 0.1), transparent 48%),
    #020d3e;
}

.token-mint-controls {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.compact-stepper {
  grid-template-columns: 36px 48px 36px;
  flex: 0 0 auto;
}

.compact-stepper .stepper-key,
.compact-stepper input {
  min-height: 46px;
  height: 46px;
}

.token-mint-controls .pixel-button {
  min-width: 185px;
  flex-direction: column;
  gap: 4px;
}

.token-mint-controls .pixel-button span:last-child {
  font-family: var(--font-body);
  font-size: 12px;
}

.device-tools > .action-message {
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px dashed var(--line-dim);
}

.rarity-key {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 11px 13px;
  gap: 8px 22px;
  border: 1px solid var(--line);
  background: #020d3e;
  color: var(--ink-dim);
  font-size: 13px;
}

.rarity-key > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rarity-section {
  margin-bottom: 28px;
  border-top: 3px solid var(--line);
}

.rarity-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 15px 2px 13px;
  gap: 18px;
  border-bottom: 1px solid var(--line-dim);
}

.rarity-header h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(20px, 2.5vw, 28px);
}

.rarity-header > p {
  margin: 0;
  color: var(--ink-dim);
  font-size: 13px;
  text-align: right;
}

.rarity-header > p strong {
  display: block;
  color: var(--green);
  font-family: var(--font-pixel);
  font-size: 8px;
  line-height: 1.7;
}

.tier-blurb {
  max-width: 88ch;
  margin: 16px 0 18px;
  padding: 12px 14px;
  color: var(--ink);
  border-left: 3px solid var(--orange);
  background: rgba(1, 7, 40, 0.48);
  font-size: 17px;
  line-height: 1.6;
}

.common-tier {
  border-top-color: var(--green);
}

.rare-tier {
  border-top-color: var(--cyan);
}

.epic-tier {
  border-top-color: var(--orange);
}

.legendary-tier {
  border-top-color: var(--gold);
}

.divine-tier {
  border-top-color: var(--ink);
  box-shadow: 0 -5px 0 rgba(245, 241, 213, 0.12);
}

.portrait-register {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding-top: 14px;
}

.portrait-register figure {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #020d3e;
}

.portrait-register figure:hover {
  border-color: var(--orange);
}

.portrait-register img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-bottom: 1px solid var(--line-dim);
}

.portrait-register figcaption {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 8px 8px 9px;
  gap: 6px;
}

.portrait-register figcaption strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.25;
}

.portrait-register figcaption span {
  color: var(--ink-dim);
  font-family: var(--font-pixel);
  font-size: 5px;
  line-height: 1.8;
  text-align: right;
}

.design-bio {
  flex: 1;
  margin: 0;
  padding: 0 10px 12px;
  color: var(--ink-dim);
  font-size: 16px;
  line-height: 1.55;
}

.tier-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  color: var(--ink-dim);
  border-left: 3px solid var(--orange);
  background: rgba(1, 7, 40, 0.4);
  font-size: 14px;
}

.divine-register {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.exit-columns {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 28px;
  align-items: start;
}

.story-file,
.faq-file {
  border: 2px solid var(--line);
  background: rgba(2, 13, 62, 0.66);
}

.story-file {
  padding: clamp(20px, 3vw, 30px);
}

.story-lede {
  margin: 22px 0 16px;
  color: var(--ink);
  font-size: clamp(20px, 2.3vw, 26px);
  font-weight: 700;
  line-height: 1.5;
}

.story-file > p:not(.module-code, .story-lede) {
  color: var(--ink-dim);
  font-size: 16px;
}

.story-file blockquote {
  margin: 28px 0 0;
  padding: 20px 0 0;
  border-top: 1px dashed var(--line);
}

.story-file blockquote span {
  display: block;
  margin-bottom: 8px;
  color: var(--green);
  font-family: var(--font-pixel);
  font-size: clamp(16px, 2.2vw, 23px);
  line-height: 1.6;
}

.story-file blockquote cite {
  color: var(--ink-dim);
  font-family: var(--font-pixel);
  font-size: 7px;
  font-style: normal;
  line-height: 1.6;
}

.faq-file {
  padding: clamp(20px, 3vw, 30px);
}

.faq-file h3 {
  margin-bottom: 18px;
  color: var(--ink);
}

.faq-file details {
  border-top: 1px solid var(--line-dim);
}

.faq-file details:last-child {
  border-bottom: 1px solid var(--line-dim);
}

.faq-file summary {
  position: relative;
  padding: 14px 31px 14px 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.faq-file summary::-webkit-details-marker {
  display: none;
}

.faq-file summary::after {
  position: absolute;
  top: 13px;
  right: 0;
  color: var(--orange);
  content: "+";
  font-family: var(--font-pixel);
  font-size: 14px;
}

.faq-file details[open] summary::after {
  content: "−";
}

.faq-file summary:hover,
.faq-file summary:focus-visible {
  color: var(--gold);
  outline: none;
}

.faq-file details p {
  margin: -3px 0 16px;
  color: var(--ink-dim);
  font-size: 15px;
  line-height: 1.6;
}

.help-rail {
  position: relative;
  min-width: 0;
  padding: 30px 19px 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 38%),
    #020d3e;
}

.help-tab {
  position: absolute;
  top: 0;
  left: 0;
  padding: 4px 7px;
  color: var(--black-blue);
  background: var(--ink);
  font-family: var(--font-pixel);
  font-size: 8px;
}

.help-rail h2 {
  margin: 12px 0 12px;
  color: var(--orange);
  font-size: 13px;
  line-height: 1.7;
}

.help-rail > p:not(.module-code, .help-notice, .loop-stamp) {
  color: var(--ink-dim);
  font-size: 14px;
  line-height: 1.6;
}

.help-rule {
  height: 1px;
  margin: 20px 0;
  background: var(--line-dim);
}

.key-list {
  display: grid;
  margin: 0;
  gap: 9px;
}

.key-list > div {
  display: grid;
  grid-template-columns: 76px 1fr;
  align-items: center;
  gap: 8px;
}

.key-list dt {
  display: flex;
  gap: 3px;
}

.key-list dd {
  margin: 0;
  color: var(--ink-dim);
  font-size: 13px;
  line-height: 1.45;
}

kbd {
  display: inline-flex;
  min-width: 21px;
  min-height: 21px;
  align-items: center;
  justify-content: center;
  padding: 3px 5px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  background: #0f2c80;
  font-family: var(--font-pixel);
  font-size: 6px;
  line-height: 1.4;
}

.help-notice {
  min-height: 6em;
  padding: 10px;
  color: var(--ink);
  border: 1px dashed var(--line);
  background: rgba(1, 7, 40, 0.45);
  font-size: 13px;
  line-height: 1.5;
}

.loop-stamp {
  margin: 26px 0 0;
  color: rgba(245, 241, 213, 0.12);
  font-family: var(--font-pixel);
  font-size: 9px;
  line-height: 1.8;
  text-align: right;
}

.loop-stamp span {
  font-size: 56px;
  line-height: 1;
}

.command-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 7px 20px;
  gap: 14px;
  color: var(--ink-dim);
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
  background: #010a34;
  font-family: var(--font-pixel);
  font-size: 6px;
  line-height: 1.8;
}

.command-strip > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.command-strip kbd {
  min-width: 18px;
  min-height: 18px;
  font-size: 5px;
}

.bios-footer {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.3fr;
  align-items: center;
  padding: 20px 22px;
  gap: 20px;
  background: #020c3b;
}

.footer-seal {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-seal img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.footer-seal div {
  display: grid;
  gap: 4px;
}

.footer-seal strong {
  font-family: var(--font-pixel);
  font-size: 9px;
}

.footer-seal span {
  color: var(--ink-dim);
  font-family: var(--font-pixel);
  font-size: 5px;
  line-height: 1.6;
}

.contract-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.contract-links a {
  color: var(--ink);
  font-family: var(--font-pixel);
  font-size: 6px;
  line-height: 1.7;
}

.contract-links a:hover,
.contract-links a:focus-visible {
  color: var(--gold);
}

.contract-links a[aria-disabled="true"] {
  color: var(--ink-dim);
  text-decoration: none;
  cursor: wait;
}

.disclaimer {
  margin: 0;
  color: var(--ink-dim);
  font-size: 12px;
  line-height: 1.5;
}

.noscript {
  width: min(900px, calc(100% - 32px));
  margin: 12px auto 30px;
  padding: 14px;
  color: var(--black-blue);
  background: var(--orange);
  font-size: 16px;
  text-align: center;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

@keyframes blink {
  0%,
  45% {
    opacity: 1;
  }
  46%,
  100% {
    opacity: 0;
  }
}

@keyframes ledPulse {
  0%,
  72% {
    opacity: 1;
  }
  73%,
  100% {
    opacity: 0.42;
  }
}

@keyframes bootLine {
  from {
    opacity: 0;
    transform: translateX(-9px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes panelWake {
  from {
    opacity: 0;
    filter: brightness(1.8);
  }
  to {
    opacity: 1;
    filter: brightness(1);
  }
}

@media (max-width: 1200px) {
  .screen-shell {
    width: min(1560px, calc(100% - 28px));
    margin: 14px auto;
  }

  .bios-workspace {
    grid-template-columns: minmax(0, 1fr) 224px;
  }

  .bios-panel {
    padding: 26px;
  }

  .boot-grid {
    grid-template-columns: 1fr;
  }

  .x-module {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
  }

  .x-module .module-header,
  .x-module .module-lede,
  .x-module .claim-steps,
  .x-module .fine-print,
  .x-module .action-message {
    grid-column: 1 / -1;
  }

  .x-module .pixel-button:nth-of-type(1) {
    align-self: end;
  }

  .x-module .text-input {
    margin-bottom: 12px;
  }

  .looper-register {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .divine-register {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 940px) {
  .machine-header {
    flex-wrap: wrap;
  }

  .header-controls {
    margin-left: auto;
  }

  .bios-workspace {
    grid-template-columns: 1fr;
  }

  .panel-stack {
    border-right: 0;
    border-bottom: 2px solid var(--line);
  }

  .help-rail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 24px;
  }

  .help-rail h2,
  .help-rail > p,
  .help-rail .help-rule:first-of-type {
    grid-column: 1 / -1;
  }

  .help-rail .help-rule:nth-of-type(2) {
    display: none;
  }

  .loop-stamp {
    display: none;
  }

  .post-hero {
    grid-template-columns: 1fr;
  }

  .post-copy {
    max-width: 720px;
  }

  .post-copy h1 {
    max-width: 100%;
  }

  .hero-visual {
    max-width: 760px;
  }

  .main-columns {
    grid-template-columns: 1fr;
  }

  .protocol-strip {
    grid-template-columns: 1fr 1fr;
  }

  .protocol-title {
    grid-row: auto;
    grid-column: 1 / -1;
    border-bottom: 1px solid var(--line);
  }

  .protocol-fact:nth-child(2) {
    border-left: 0;
  }

  .protocol-fact:nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .protocol-fact:last-child {
    border-bottom: 0;
  }

  .device-status dl {
    grid-template-columns: repeat(2, 1fr);
  }

  .device-status dl > div:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .device-status dl > div:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .exit-columns {
    grid-template-columns: 1fr;
  }

  .bios-footer {
    grid-template-columns: 1fr 1fr;
  }

  .disclaimer {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .screen-shell {
    width: calc(100% - 16px);
    margin: 8px auto;
  }

  .bios-shell {
    border-width: 2px;
    outline-width: 2px;
    outline-offset: 2px;
    box-shadow: 4px 4px 0 #000322;
  }

  .machine-header {
    padding: 11px 13px;
    gap: 12px;
  }

  .machine-id {
    font-size: 11px;
  }

  .machine-sub {
    display: none;
  }

  .wallet-key {
    padding: 8px 9px;
  }

  .wallet-key [data-wallet-label] {
    max-width: 82px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .utility-bar {
    padding: 7px 13px;
    font-size: 10px;
  }

  .utility-bar > span:first-child {
    display: none;
  }

  .utility-chain {
    width: 100%;
    justify-content: center;
  }

  .bios-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .bios-tabs button {
    min-height: 45px;
    border-bottom: 1px solid var(--line-dim);
    font-size: 8px;
  }

  .bios-tabs button:nth-child(3n) {
    border-right: 0;
  }

  .bios-tabs button:nth-child(n + 4) {
    border-bottom: 0;
  }

  .bios-panel {
    min-height: 0;
    padding: 18px 13px 22px;
  }

  .panel-kicker {
    margin-bottom: 18px;
    font-size: 6px;
  }

  .kicker-code {
    display: none;
  }

  .post-copy h1 {
    font-size: clamp(31px, 10.8vw, 52px);
    text-shadow: 3px 3px 0 var(--orange-deep);
  }

  .hero-lede {
    font-size: 19px;
  }

  .hero-body {
    font-size: 16px;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .post-facts {
    grid-template-columns: 1fr;
  }

  .post-facts > div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .boot-grid {
    gap: 16px;
  }

  .x-module {
    display: block;
  }

  .quantity-block {
    grid-template-columns: 1fr;
  }

  .field-note {
    grid-column: 1;
  }

  .stepper {
    grid-template-columns: 46px 1fr 46px;
  }

  .quote-readout {
    grid-template-columns: 1fr;
  }

  .quote-readout > div:nth-child(even) {
    border-left: 0;
  }

  .quote-readout > div:nth-child(n + 2) {
    border-top: 1px solid var(--line-dim);
  }

  .agent-check {
    grid-template-columns: 1fr;
  }

  .agent-check a {
    grid-column: 1;
  }

  .rule-ruler {
    grid-template-columns: repeat(2, 1fr);
  }

  .rule-ruler > div:nth-child(3) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .rule-ruler > div:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .stat-bank {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-bank > div:nth-child(3n + 1) {
    border-left: 0;
  }

  .stat-bank > div:not(:nth-child(3n + 1)) {
    border-left: 0;
  }

  .stat-bank > div:nth-child(even) {
    border-left: 1px solid var(--line);
  }

  .stat-bank > div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .deck-heading {
    align-items: flex-start;
  }

  .protocol-strip {
    grid-template-columns: 1fr;
  }

  .protocol-fact {
    border-left: 0 !important;
    border-bottom: 1px solid var(--line) !important;
  }

  .protocol-fact:last-child {
    border-bottom: 0 !important;
  }

  .device-port {
    flex-wrap: wrap;
  }

  .device-port > span:nth-child(2) {
    flex-direction: column;
    gap: 2px;
  }

  .device-port .inline-key {
    margin-left: 23px;
  }

  .inventory-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .looper-register {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tool-row {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .tool-row .pixel-button {
    width: 100%;
  }

  .token-mint-zone {
    grid-template-columns: 1fr;
  }

  .token-mint-controls {
    flex-wrap: wrap;
  }

  .token-mint-controls .pixel-button {
    width: 100%;
  }

  .portrait-register,
  .divine-register {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rarity-header {
    align-items: flex-start;
  }

  .rarity-key {
    gap: 6px 12px;
  }

  .rarity-key > span {
    width: calc(50% - 6px);
  }

  .help-rail {
    display: block;
    padding: 29px 15px 18px;
  }

  .help-rail .key-list {
    margin-bottom: 20px;
  }

  .command-strip {
    justify-content: center;
  }

  .command-strip > span:not(:first-child) {
    display: none;
  }

  .bios-footer {
    grid-template-columns: 1fr;
    padding: 17px 14px;
    gap: 15px;
  }

  .disclaimer {
    grid-column: auto;
  }
}

@media (max-width: 440px) {
  .header-controls {
    width: 100%;
    justify-content: space-between;
  }

  .wallet-key {
    flex: 1;
    justify-content: center;
  }

  .wallet-key [data-wallet-label] {
    max-width: none;
  }

  .bios-tabs button {
    gap: 5px;
    padding: 8px 5px;
    font-size: 7px;
  }

  .tab-index {
    font-size: 5px;
  }

  .section-intro h2 {
    font-size: 22px;
  }

  .section-intro > p:last-child {
    font-size: 16px;
  }

  .post-copy h1 {
    font-size: 29px;
  }

  .hero-visual figcaption {
    display: none;
  }

  .pixel-button {
    padding: 11px 10px;
    font-size: 8px;
  }

  .state-badge {
    font-size: 6px;
  }

  .sequence-module,
  .x-module,
  .price-module,
  .supply-module {
    padding: 14px;
  }

  .module-header {
    flex-direction: column;
  }

  .rule-ruler strong {
    font-size: 8px;
  }

  .stat-bank dd {
    font-size: 16px;
  }

  .deck-integrity {
    padding: 15px;
  }

  .looper-chip-info {
    grid-template-columns: 1fr;
  }

  .looper-chip-info span {
    grid-row: 2;
  }

  .rarity-key > span {
    width: 100%;
  }

  .portrait-register figcaption {
    display: block;
  }

  .portrait-register figcaption span {
    display: block;
    text-align: left;
  }

  .portrait-register,
  .divine-register {
    grid-template-columns: 1fr;
  }

  .footer-seal img {
    width: 46px;
    height: 46px;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .post-log li {
    opacity: 1;
    transform: none;
  }
}
