@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

:root {
  --bg: #000;
  --fg: #fff;
  --muted: rgba(255,255,255,.66);
  --faint: rgba(255,255,255,.14);
  --hair: rgba(255,255,255,.28);
  --px: 4px;
  --max: 1220px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  background:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
    var(--bg);
  background-size: 24px 24px;
  color: var(--fg);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  line-height: 1.65;
  min-height: 100vh;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: .12;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,255,255,.05) 3px 4px);
  mix-blend-mode: screen;
}

::selection { background: var(--fg); color: var(--bg); }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 4px; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; }

.pixel-font, h1, h2, h3, .nav-brand, .button, .eyebrow, .stat strong, .section-index, .machine-label,
.badge, .mini-title, .footer-mark, .kbd, .road-num, .tab, .pixel-input-label {
  font-family: "Press Start 2P", ui-monospace, monospace;
  letter-spacing: .02em;
  font-weight: 400;
}

.container { width: min(var(--max), calc(100% - 32px)); margin: 0 auto; }
.skip { position: absolute; left: -999px; top: 10px; z-index: 1100; }
.skip:focus { left: 10px; background: #fff; color:#000; padding: 12px 16px; }

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid var(--fg);
  background: rgba(0,0,0,.94);
  backdrop-filter: blur(8px);
}
.nav-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 13px;
  white-space: nowrap;
}
.nav-brand img { width: 34px; height: 34px; image-rendering: pixelated; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  font-size: 12px;
}
.nav-links a { text-decoration: none; opacity: .8; }
.nav-links a:hover, .nav-links a:focus { opacity: 1; text-decoration: underline; }
.nav-menu {
  display: none;
  margin-left: auto;
  background: #000;
  color: #fff;
  border: 2px solid #fff;
  padding: 9px 10px;
  cursor: pointer;
}

.hero { padding: 96px 0 82px; border-bottom: 2px solid var(--fg); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, .7fr);
  gap: 64px;
  align-items: center;
}
.eyebrow { font-size: 10px; line-height: 1.8; color: var(--muted); margin: 0 0 24px; }
h1 { font-size: clamp(30px, 5vw, 62px); line-height: 1.18; margin: 0 0 28px; text-transform: uppercase; }
h2 { font-size: clamp(22px, 3.2vw, 38px); line-height: 1.32; margin: 0 0 22px; text-transform: uppercase; }
h3 { font-size: 14px; line-height: 1.55; margin: 0 0 15px; text-transform: uppercase; }
.hero-copy { font-size: clamp(16px, 1.8vw, 21px); max-width: 760px; color: var(--muted); margin: 0 0 34px; }
.hero-logo-wrap {
  border: 2px solid var(--fg);
  padding: 28px;
  position: relative;
  background: #000;
  box-shadow: 12px 12px 0 #fff;
}
.hero-logo-wrap::before, .hero-logo-wrap::after {
  content:""; position:absolute; width: 18px; height: 18px; background:#000; border:2px solid #fff;
}
.hero-logo-wrap::before { left:-2px; top:-2px; border-top:0; border-left:0; }
.hero-logo-wrap::after { right:-2px; bottom:-2px; border-bottom:0; border-right:0; }
.hero-logo { width: 100%; display:block; image-rendering: pixelated; }
.hero-actions { display:flex; flex-wrap:wrap; gap:14px; }
.button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 16px;
  border: 2px solid #fff;
  background: #fff;
  color: #000;
  text-decoration: none;
  font-size: 10px;
  line-height: 1.45;
  cursor: pointer;
  box-shadow: 4px 4px 0 rgba(255,255,255,.24);
  transition: transform .08s linear, box-shadow .08s linear, background .08s linear, color .08s linear;
}
.button:hover, .button:focus-visible { transform: translate(2px,2px); box-shadow: 2px 2px 0 rgba(255,255,255,.24); }
.button.secondary { background:#000; color:#fff; }
.button.ghost { background:transparent; color:#fff; border-style:dashed; box-shadow:none; }
.button[disabled] { opacity:.45; cursor:not-allowed; transform:none; box-shadow:none; }

.stats-grid {
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  border: 2px solid var(--fg);
  margin-top: 56px;
}
.stat { padding: 22px; min-height: 112px; border-right: 2px solid var(--fg); display:flex; flex-direction:column; justify-content:space-between; }
.stat:last-child { border-right:0; }
.stat span { color:var(--muted); font-size:11px; text-transform:uppercase; }
.stat strong { font-size: clamp(15px, 2.1vw, 24px); line-height:1.4; }

.section { padding: 88px 0; border-bottom: 2px solid var(--fg); }
.section-head { display:grid; grid-template-columns: 120px minmax(0,1fr); gap: 24px; margin-bottom: 46px; }
.section-index { font-size: 10px; color: var(--muted); padding-top: 9px; }
.section-lead { color:var(--muted); max-width: 850px; margin: 0; font-size: 16px; }

.cards { display:grid; grid-template-columns: repeat(4, 1fr); border: 2px solid var(--fg); }
.card { padding: 24px; border-right: 2px solid var(--fg); min-height: 240px; display:flex; flex-direction:column; }
.card:last-child { border-right:0; }
.card p { color:var(--muted); font-size:13px; }
.card .card-metric { margin-top:auto; border-top: 2px dashed var(--hair); padding-top:18px; font-size:11px; }

.pixel-box {
  border: 2px solid var(--fg);
  background: #000;
  position: relative;
}
.pixel-box::before {
  content:"";
  position:absolute;
  inset: 6px;
  pointer-events:none;
  border: 1px dashed rgba(255,255,255,.12);
}
.box-pad { padding: 24px; }

.machine-shell { display:grid; grid-template-columns: 1.5fr .7fr; gap: 22px; }
.machine-panel { min-width:0; }
.machine-topbar { display:flex; align-items:center; justify-content:space-between; gap:12px; border-bottom:2px solid #fff; padding:14px 16px; }
.machine-label { font-size:10px; }
.machine-meta { font-size:11px; color:var(--muted); }
.machine-canvas-wrap { padding: 12px; min-height: 430px; display:flex; }
#die-canvas, .die-canvas { width:100%; height:430px; display:block; image-rendering:pixelated; background:#000; }
.machine-controls { display:grid; gap:14px; padding:16px; border-top:2px solid #fff; }
.control-row { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.control-row label { color:var(--muted); font-size:11px; }
.range { width: 170px; accent-color: #fff; }
.machine-side { display:grid; gap:22px; align-content:start; }
.readout { padding:20px; }
.readout-grid { display:grid; grid-template-columns:repeat(2,1fr); border-top:2px solid #fff; border-left:2px solid #fff; }
.readout-cell { padding:14px; min-height:82px; border-right:2px solid #fff; border-bottom:2px solid #fff; }
.readout-cell small { color:var(--muted); display:block; margin-bottom:8px; text-transform:uppercase; }
.readout-cell strong { font-size:18px; }
.registers { display:grid; grid-template-columns:repeat(4,1fr); gap:1px; background:#fff; border:2px solid #fff; }
.reg { background:#000; padding:10px; font-size:11px; }
.reg b { display:block; font-family:"Press Start 2P",monospace; font-size:8px; margin-bottom:7px; }
.reg span { color:var(--muted); }

.flow { display:grid; grid-template-columns: repeat(5, 1fr); border: 2px solid #fff; }
.flow-step { padding:22px; min-height:200px; border-right:2px solid #fff; position:relative; }
.flow-step:last-child { border-right:0; }
.flow-step::after { content:"→"; position:absolute; right:-15px; top:50%; transform:translateY(-50%); background:#000; padding:4px; z-index:2; font-family:"Press Start 2P"; font-size:12px; }
.flow-step:last-child::after { display:none; }
.flow-step .n { font-family:"Press Start 2P"; font-size:10px; display:block; margin-bottom:18px; }
.flow-step p { color:var(--muted); font-size:12px; }

.instruction-wrap { overflow:auto; border:2px solid #fff; }
.instruction-table { width:100%; border-collapse:collapse; min-width: 760px; font-size:12px; }
.instruction-table th, .instruction-table td { padding:13px 14px; border-bottom:1px dashed var(--hair); text-align:left; }
.instruction-table th { position:sticky; top:0; background:#000; z-index:1; font-family:"Press Start 2P"; font-size:8px; }
.instruction-table tr:last-child td { border-bottom:0; }
.instruction-table tr.active td { background:#fff; color:#000; }
.instruction-table code { color:inherit; }

.chain-grid { display:grid; grid-template-columns: 1.1fr .9fr; gap:22px; }
.chain-panel { padding:24px; }
.chain-kv { display:grid; grid-template-columns: 1fr auto; gap:0; border:2px solid #fff; margin:22px 0; }
.chain-kv div { padding:12px; border-bottom:1px dashed var(--hair); }
.chain-kv div:nth-last-child(-n+2) { border-bottom:0; }
.chain-kv .k { color:var(--muted); }
.chain-kv .v { text-align:right; overflow-wrap:anywhere; max-width:320px; }
.status-line { min-height: 24px; color: var(--muted); font-size:12px; }
.address { word-break:break-all; font-size:11px; }

.launch-preview { display:grid; grid-template-columns: 1fr 1fr; gap:22px; }
.launch-card { padding:24px; min-height:360px; display:flex; flex-direction:column; }
.launch-card img { width:96px; height:96px; image-rendering:pixelated; border:2px solid #fff; margin-bottom:26px; }
.launch-card .ticker { margin-top:auto; font-family:"Press Start 2P"; font-size:20px; }

.roadmap { border:2px solid #fff; }
.road { display:grid; grid-template-columns: 100px 1fr 150px; gap:20px; padding:22px; border-bottom:2px solid #fff; align-items:start; }
.road:last-child { border-bottom:0; }
.road-num { font-size:10px; }
.road p { color:var(--muted); margin:8px 0 0; font-size:13px; }
.badge { display:inline-block; border:2px solid #fff; padding:8px 10px; font-size:8px; text-align:center; }
.badge.invert { background:#fff; color:#000; }

.instrument-grid { display:grid; grid-template-columns: repeat(3,1fr); border:2px solid #fff; }
.instrument { padding:26px; border-right:2px solid #fff; min-height:220px; }
.instrument:last-child { border-right:0; }
.instrument strong { font-family:"Press Start 2P"; font-size:22px; display:block; margin:28px 0 12px; }
.instrument p { color:var(--muted); font-size:12px; }

footer { padding:52px 0 70px; }
.footer-grid { display:grid; grid-template-columns: 1fr auto; gap:32px; align-items:end; }
.footer-mark { display:flex; align-items:center; gap:14px; font-size:11px; }
.footer-mark img { width:50px; height:50px; image-rendering:pixelated; }
.footer-copy { color:var(--muted); font-size:11px; max-width:640px; margin-top:18px; }
.footer-links { display:flex; flex-wrap:wrap; gap:16px; font-size:11px; justify-content:flex-end; }

/* Workbench / launchpad */
.subhero { padding:70px 0 50px; border-bottom:2px solid #fff; }
.work-grid { display:grid; grid-template-columns: 1fr 1fr; gap:22px; }
.editor, .panel { border:2px solid #fff; background:#000; }
.panel-head { display:flex; align-items:center; justify-content:space-between; padding:14px 16px; border-bottom:2px solid #fff; }
.mini-title { font-size:9px; }
textarea.code {
  width:100%; min-height:430px; resize:vertical; border:0; outline:0; background:#000; color:#fff; padding:18px; line-height:1.7; font-size:13px; tab-size:2;
}
.panel-body { padding:18px; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.field { display:grid; gap:8px; }
.field.full { grid-column:1/-1; }
.pixel-input-label { font-size:8px; color:var(--muted); }
input[type="text"], input[type="number"], input[type="url"], textarea.form-control, select {
  width:100%; border:2px solid #fff; background:#000; color:#fff; padding:12px; outline:0; border-radius:0;
}
input:focus, textarea:focus, select:focus { box-shadow:0 0 0 2px #000, 0 0 0 4px #fff; }
.listing { max-height:430px; overflow:auto; }
.listing-row { display:grid; grid-template-columns:60px 90px 1fr; gap:10px; padding:8px 10px; border-bottom:1px dashed var(--hair); font-size:11px; }
.listing-row:last-child { border-bottom:0; }
.listing-row.active { background:#fff; color:#000; }
.tabs { display:flex; gap:0; border:2px solid #fff; margin-bottom:22px; overflow:auto; }
.tab { background:#000; color:#fff; border:0; border-right:2px solid #fff; padding:12px 14px; font-size:8px; cursor:pointer; white-space:nowrap; }
.tab:last-child { border-right:0; }
.tab.active { background:#fff; color:#000; }
.tab-panel { display:none; }
.tab-panel.active { display:block; }
.toast { position:fixed; right:20px; bottom:20px; z-index:1200; background:#fff; color:#000; border:4px solid #000; outline:2px solid #fff; padding:14px 16px; font-family:"Press Start 2P"; font-size:8px; line-height:1.6; max-width:360px; display:none; }
.toast.show { display:block; }

@media (max-width: 980px) {
  .hero-grid, .machine-shell, .chain-grid, .launch-preview, .work-grid { grid-template-columns:1fr; }
  .hero-logo-wrap { max-width:440px; }
  .cards { grid-template-columns: repeat(2,1fr); }
  .card:nth-child(2) { border-right:0; }
  .card:nth-child(-n+2) { border-bottom:2px solid #fff; }
  .flow { grid-template-columns:1fr; }
  .flow-step { min-height:0; border-right:0; border-bottom:2px solid #fff; }
  .flow-step:last-child { border-bottom:0; }
  .flow-step::after { display:none; }
  .instrument-grid { grid-template-columns:1fr; }
  .instrument { border-right:0; border-bottom:2px solid #fff; }
  .instrument:last-child { border-bottom:0; }
  .road { grid-template-columns:80px 1fr; }
  .road .badge { grid-column:2; width:max-content; }
}

@media (max-width: 760px) {
  .container { width:min(100% - 22px, var(--max)); }
  .nav-inner { min-height:62px; }
  .nav-links { display:none; position:absolute; left:0; right:0; top:62px; background:#000; border-bottom:2px solid #fff; padding:18px; flex-direction:column; align-items:stretch; }
  .nav-links.open { display:flex; }
  .nav-menu { display:block; }
  .hero { padding:62px 0 58px; }
  .hero-grid { gap:36px; }
  .stats-grid { grid-template-columns:repeat(2,1fr); }
  .stat:nth-child(2) { border-right:0; }
  .stat:nth-child(-n+2) { border-bottom:2px solid #fff; }
  .section { padding:64px 0; }
  .section-head { grid-template-columns:1fr; gap:8px; }
  .cards { grid-template-columns:1fr; }
  .card { border-right:0; border-bottom:2px solid #fff; }
  .card:last-child { border-bottom:0; }
  .machine-canvas-wrap, #die-canvas, .die-canvas { min-height:340px; height:340px; }
  .registers { grid-template-columns:repeat(2,1fr); }
  .footer-grid { grid-template-columns:1fr; }
  .footer-links { justify-content:flex-start; }
  .form-grid { grid-template-columns:1fr; }
  .field.full { grid-column:auto; }
}

/* Public chrome */
.nav-actions { display:flex; align-items:center; gap:8px; flex:0 0 auto; }
.icon-button, .lang-button {
  width:38px; height:38px; display:inline-flex; align-items:center; justify-content:center;
  border:2px solid #fff; background:#000; color:#fff; text-decoration:none; cursor:pointer;
  box-shadow:2px 2px 0 rgba(255,255,255,.18); image-rendering:pixelated;
}
.icon-button:hover, .icon-button:focus-visible, .lang-button:hover, .lang-button:focus-visible { background:#fff; color:#000; }
.icon-button svg { width:18px; height:18px; fill:currentColor; }
.lang-button { width:auto; min-width:50px; padding:0 9px; font-family:"Press Start 2P", monospace; font-size:8px; }
.compact-links { gap:14px; }
.nav-links a[aria-current="page"] { opacity:1; text-decoration:underline; }
.button.disabled, .button[aria-disabled="true"] { opacity:.45; pointer-events:none; box-shadow:none; }
.coin-mini { padding:26px; display:grid; gap:18px; align-content:center; }
.coin-mini img { width:96px; image-rendering:pixelated; }

/* $RUNNET page */
.coin-hero { padding:100px 0 88px; border-bottom:2px solid #fff; min-height:calc(100vh - 72px); display:flex; align-items:center; }
.coin-hero-grid { display:grid; grid-template-columns:1.1fr .9fr; gap:64px; align-items:center; }
.coin-title { font-size:clamp(54px,10vw,122px); line-height:.92; margin-bottom:26px; letter-spacing:-.05em; }
.coin-kicker { font-family:"Press Start 2P", monospace; font-size:clamp(12px,1.6vw,18px); line-height:1.7; margin:0 0 24px; }
.coin-logo-frame { border:2px solid #fff; padding:34px; position:relative; box-shadow:14px 14px 0 #fff; }
.coin-logo-frame img { display:block; width:100%; image-rendering:pixelated; }
.coin-chain-tag { position:absolute; left:20px; right:20px; bottom:-22px; background:#fff; color:#000; border:2px solid #000; padding:10px 12px; text-align:center; font-family:"Press Start 2P", monospace; font-size:9px; }
.ca-box { padding:28px; display:grid; grid-template-columns:180px minmax(0,1fr) auto; gap:18px; align-items:center; }
.ca-label { font-family:"Press Start 2P", monospace; font-size:9px; color:var(--muted); }
.ca-value { font-size:clamp(12px,1.8vw,18px); overflow-wrap:anywhere; letter-spacing:.03em; }
.coin-stats { margin-top:0; }
.coin-final { text-align:center; display:grid; justify-items:center; gap:20px; }
.coin-final img { width:110px; image-rendering:pixelated; }
.coin-final h2 { margin:0; font-size:clamp(38px,7vw,78px); }

@media (max-width: 1100px) {
  .nav-links { gap:12px; font-size:11px; }
  .coin-hero-grid { grid-template-columns:1fr 360px; gap:38px; }
}
@media (max-width: 900px) {
  .nav-actions { margin-left:auto; }
  .coin-hero-grid { grid-template-columns:1fr; }
  .coin-logo-frame { max-width:480px; }
  .ca-box { grid-template-columns:1fr; }
}
@media (max-width: 760px) {
  .site-nav .nav-actions { gap:6px; }
  .icon-button { width:34px; height:34px; }
  .lang-button { height:34px; min-width:44px; font-size:7px; }
  .site-nav .nav-brand span { font-size:10px; }
  .site-nav .nav-brand img { width:30px; height:30px; }
  .site-nav .nav-menu { margin-left:auto; }
  .site-nav .nav-actions { margin-left:0; }
  .coin-hero { padding:64px 0 70px; min-height:auto; }
  .coin-title { font-size:clamp(48px,18vw,84px); }
}
@media (max-width: 470px) {
  .site-nav .nav-brand span { display:none; }
  .coin-logo-frame { padding:22px; box-shadow:8px 8px 0 #fff; }
}
