/* ============================================================
   AXION OS — pixel-world design system
   Fonts: Silkscreen (display), VT323 (terminal body), Press Start 2P (counters)
   ============================================================ */
:root {
  --bg: #0a0b14;
  --bg2: #0e1020;
  --panel: #11142a;
  --panel2: #171b38;
  --ink: #e8ecff;
  --dim: #8a90b8;
  --faint: #3a3f66;
  --line: #2a2f5a;
  --cyan: #3dd9ff;
  --lime: #8dff4a;
  --mag: #ff4fd8;
  --amber: #ffc23d;
  --red: #ff4a5a;
  --f-pix: 'Silkscreen', 'Courier New', monospace;
  --f-body: 'VT323', ui-monospace, Menlo, Consolas, monospace;
  --f-big: 'Press Start 2P', 'Silkscreen', monospace;
  --px: 4px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; background: var(--bg); }
body {
  color: var(--ink);
  font: 20px/1.25 var(--f-body);
  -webkit-font-smoothing: none;
  background:
    radial-gradient(circle at 50% -20%, #161a38 0, transparent 65%),
    var(--bg);
  min-height: 100vh;
}
img, svg, canvas { image-rendering: pixelated; }
a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--lime); }
button, input, select, textarea { font: inherit; color: inherit; }
input[type=file]::file-selector-button {
  font-family: var(--f-pix);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: var(--panel2);
  color: var(--cyan);
  border: 0;
  padding: 6px 12px;
  cursor: pointer;
  margin-right: 12px;
  box-shadow: inset -2px -2px 0 rgba(0, 0, 0, .4), 0 0 0 2px var(--line);
}
:focus-visible { outline: 2px dashed var(--lime); outline-offset: 3px; }
::selection { background: var(--mag); color: #000; }
code, .mono { font-family: var(--f-body); color: var(--amber); }
h1, h2, h3, h4 { font-family: var(--f-pix); font-weight: 400; margin: 0; letter-spacing: .02em; }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 16px; }
.c-cyan { color: var(--cyan); } .c-lime { color: var(--lime); } .c-mag { color: var(--mag); }
.c-amber { color: var(--amber); } .c-red { color: var(--red); } .c-dim { color: var(--dim); }
.num { font-variant-numeric: tabular-nums; }
.break { word-break: break-all; }
.hide { display: none !important; }

/* ---------- pixel frames ---------- */
.px {
  position: relative;
  background: var(--panel);
  border: var(--px) solid var(--line);
  box-shadow: inset 0 0 0 var(--px) var(--bg2), 6px 6px 0 0 #000;
}
.px.hl { border-color: var(--cyan); }
.notch {
  clip-path: polygon(0 var(--px), var(--px) var(--px), var(--px) 0, calc(100% - var(--px)) 0, calc(100% - var(--px)) var(--px), 100% var(--px),
    100% calc(100% - var(--px)), calc(100% - var(--px)) calc(100% - var(--px)), calc(100% - var(--px)) 100%, var(--px) 100%, var(--px) calc(100% - var(--px)), 0 calc(100% - var(--px)));
}
.tag {
  font-family: var(--f-pix); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim);
}
.tag::before { content: '▸ '; color: var(--mag); }
.label { font-family: var(--f-pix); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--cyan); }

/* ---------- buttons ---------- */
.btn {
  --c: var(--ink);
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  font-family: var(--f-pix); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--c); background: var(--panel2); border: 0; cursor: pointer; padding: 11px 16px; min-height: 42px;
  box-shadow: inset -4px -4px 0 0 rgba(0, 0, 0, .45), inset 4px 4px 0 0 rgba(255, 255, 255, .08), 0 0 0 3px var(--line);
  transition: transform .05s steps(1);
  white-space: nowrap;
}
.btn:hover { color: #000; background: var(--c); }
.btn:active { transform: translate(2px, 2px); box-shadow: inset 4px 4px 0 0 rgba(0, 0, 0, .45), 0 0 0 3px var(--line); }
.btn.pri { --c: var(--lime); background: var(--lime); color: #071004; box-shadow: inset -4px -4px 0 0 #4fae1f, inset 4px 4px 0 0 #c9ff9e, 0 0 0 3px #000; }
.btn.pri:hover { background: var(--ink); }
.btn.cy { --c: var(--cyan); }
.btn.mg { --c: var(--mag); }
.btn.sm { padding: 6px 10px; min-height: 30px; font-size: 10px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 11, 20, .92); backdrop-filter: blur(4px);
  border-bottom: var(--px) solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand img { width: 40px; height: 40px; }
.brand b { font-family: var(--f-pix); font-size: 20px; letter-spacing: .06em; }
.brand b i { font-style: normal; color: var(--lime); }
.topbar nav { display: flex; gap: 2px; flex-wrap: wrap; }
.topbar nav a { font-family: var(--f-pix); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); padding: 6px 9px; }
.topbar nav a:hover { color: #000; background: var(--cyan); }
.topbar .cta { display: flex; gap: 10px; }

/* ---------- ticker ---------- */
.ticker { overflow: hidden; border-bottom: var(--px) solid var(--line); background: var(--bg2); font-size: 18px; white-space: nowrap; }
.ticker .track { display: inline-block; padding: 6px 0; animation: tick 40s linear infinite; }
.ticker span { margin: 0 22px; color: var(--dim); }
.ticker b { color: var(--lime); font-weight: 400; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 300px minmax(0, 1fr) 300px; gap: 18px; margin-top: 22px; }
.stack { display: grid; gap: 18px; align-content: start; }
.card { padding: 14px 16px; }
.card h3 { font-size: 13px; color: var(--cyan); letter-spacing: .08em; margin-bottom: 10px; display: flex; justify-content: space-between; }
.card h3 small { color: var(--dim); font-size: 10px; }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 12px; font-size: 18px; }
.kv > * { padding: 3px 0; border-bottom: 2px dotted var(--line); min-width: 0; }
.kv > :nth-child(odd) { color: var(--dim); }
.kv > :nth-child(even) { text-align: right; overflow-wrap: anywhere; }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 18px; }
.list li::before { content: '■ '; color: var(--lime); font-size: 12px; vertical-align: 2px; }
.legend { display: grid; gap: 6px; font-size: 18px; }
.legend span { display: flex; align-items: center; gap: 10px; }
.sq { width: 14px; height: 14px; display: inline-block; box-shadow: 0 0 0 2px #000; }

.monitor { padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.monitor .screen {
  position: relative; background: #05060d; border: var(--px) solid #000; box-shadow: 0 0 0 var(--px) var(--faint), inset 0 0 60px rgba(61, 217, 255, .08);
  padding: 20px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; overflow: hidden;
}
.monitor .screen::before { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 50%, rgba(61, 217, 255, .03) 50%); background-size: 100% 4px; pointer-events: none; }
.monitor h1 { font-size: clamp(22px, 2.6vw, 34px); line-height: 1.05; }
.monitor h1 em { font-style: normal; color: var(--lime); }
.lead { color: var(--dim); font-size: 21px; margin: 10px 0 0; }
.big { font-family: var(--f-big); font-size: clamp(54px, 7vw, 92px); line-height: 1; margin-top: 8px; color: var(--ink); text-shadow: 4px 4px 0 var(--faint); }
.big small { font-family: var(--f-pix); font-size: 16px; color: var(--dim); text-shadow: none; }
.state { font-family: var(--f-big); font-size: 20px; margin-top: 10px; letter-spacing: .04em; }
.state.ok { color: var(--lime); } .state.warn { color: var(--amber); } .state.crit { color: var(--red); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .3; } }
.planet { position: relative; aspect-ratio: 1; border: 2px solid var(--line); background: #03040a; }
.planet canvas { width: 100%; height: 100%; display: block; }
.planet .cap { position: absolute; left: 8px; bottom: 6px; font-family: var(--f-pix); font-size: 10px; color: var(--dim); }
.planet .cap2 { position: absolute; right: 8px; top: 6px; font-family: var(--f-pix); font-size: 10px; color: var(--lime); }
.bootlog { background: #05060d; border: 2px solid var(--line); padding: 10px 12px; height: 132px; overflow: hidden; font-size: 18px; color: var(--lime); }
.bootlog div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bootlog .d { color: var(--dim); }
.cursor::after { content: '█'; animation: blink 1s steps(2) infinite; }

.quest { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.quest a { display: grid; justify-items: center; gap: 6px; padding: 12px 6px; background: var(--panel2); color: var(--ink); text-align: center; font-family: var(--f-pix); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; box-shadow: inset -3px -3px 0 rgba(0, 0, 0, .4), 0 0 0 3px var(--line); }
.quest a:hover { background: var(--cyan); color: #000; }
.quest a svg { width: 36px; height: 36px; }
.quest a b { font-weight: 400; color: var(--lime); font-size: 11px; }
.quest a:hover b { color: #000; }

.ca { margin-top: 14px; padding: 10px 12px; background: #05060d; border: 2px dashed var(--faint); }
.ca .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ca code { display: block; margin-top: 4px; word-break: break-all; font-size: 18px; color: var(--ink); }
.social { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.social .btn,
.social-btn,
a.btn[href*="github.com"],
a.btn[href*="x.com"] {
  --c: var(--lime);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--panel2);
  color: var(--ink);
  border: 0;
  box-shadow: inset -4px -4px 0 0 rgba(0, 0, 0, .45), inset 4px 4px 0 0 rgba(255, 255, 255, .08), 0 0 0 3px var(--line);
  transition: background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .12s cubic-bezier(0.2, 0.9, 0.3, 1.2);
  position: relative;
  text-decoration: none;
}
.social .btn .soc-ico,
.social-btn .soc-ico {
  display: inline-block;
  vertical-align: middle;
  fill: currentColor;
  transition: transform .18s ease, fill .18s ease;
}
.social .btn .arrow,
.social-btn .arrow {
  display: inline-block;
  transition: transform .18s ease, color .18s ease;
}

/* Hover state: pure black background with matrix green text & glowing pulse */
.social .btn:hover,
.social-btn:hover,
a.btn[href*="github.com"]:hover,
a.btn[href*="x.com"]:hover {
  background: #000000 !important;
  color: var(--lime) !important;
  transform: translateY(-2px);
  box-shadow: inset -4px -4px 0 0 rgba(0, 0, 0, .8), inset 4px 4px 0 0 rgba(141, 255, 74, .25), 0 0 0 3px var(--lime), 0 0 16px rgba(141, 255, 74, .5) !important;
  animation: socPulse 1.6s ease-in-out infinite;
}
.social .btn:hover .soc-ico,
.social-btn:hover .soc-ico {
  transform: scale(1.18);
  fill: var(--lime) !important;
}
.social .btn:hover .arrow,
.social-btn:hover .arrow {
  transform: translate(2px, -2px);
  color: var(--lime) !important;
}
.social .btn:active,
.social-btn:active,
a.btn[href*="github.com"]:active,
a.btn[href*="x.com"]:active {
  transform: translate(1px, 1px) !important;
  animation: none;
  box-shadow: inset 4px 4px 0 0 rgba(0, 0, 0, .8), 0 0 0 3px var(--lime) !important;
}

@keyframes socPulse {
  0%, 100% {
    box-shadow: inset -4px -4px 0 0 rgba(0, 0, 0, .8), inset 4px 4px 0 0 rgba(141, 255, 74, .2), 0 0 0 3px var(--lime), 0 0 12px rgba(141, 255, 74, .35);
  }
  50% {
    box-shadow: inset -4px -4px 0 0 rgba(0, 0, 0, .8), inset 4px 4px 0 0 rgba(141, 255, 74, .3), 0 0 0 3px var(--lime), 0 0 24px rgba(141, 255, 74, .7);
  }
}

.ladder { display: grid; gap: 4px; }
.ladder .r { display: grid; grid-template-columns: 54px 1fr 40px; align-items: center; gap: 8px; font-size: 17px; }
.ladder .bar { height: 12px; background: repeating-linear-gradient(90deg, var(--faint) 0 6px, transparent 6px 8px); position: relative; }
.ladder .bar i { position: absolute; inset: 0 auto 0 0; background: repeating-linear-gradient(90deg, var(--lime) 0 6px, transparent 6px 8px); }
.ladder .armed .bar i { background: repeating-linear-gradient(90deg, var(--red) 0 6px, transparent 6px 8px); }
.reg { display: grid; grid-template-columns: repeat(16, 1fr); gap: 3px; }
.reg i { aspect-ratio: 1; background: var(--faint); display: block; }
.reg i.on { background: var(--ink); } .reg i.hot { background: var(--mag); }
.hex { font-size: 17px; line-height: 1.25; color: var(--dim); height: 128px; overflow: hidden; white-space: pre; }
.hex em { font-style: normal; color: var(--cyan); }
.code { background: #05060d; border: 2px solid var(--line); padding: 10px 12px; font-size: 17px; line-height: 1.3; white-space: pre; overflow: auto; color: var(--dim); margin: 0; }
.code em { font-style: normal; color: var(--mag); }
.code b { font-weight: 400; color: var(--lime); }

/* ---------- world banner ---------- */
.world { margin-top: 28px; position: relative; overflow: hidden; }
.world canvas { display: block; width: 100%; height: 300px; }
.world .over { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; pointer-events: none; padding: 16px; }
.world .over h2 { font-family: var(--f-big); font-size: clamp(28px, 6vw, 76px); color: var(--ink); text-shadow: 6px 6px 0 #000, -2px -2px 0 var(--mag); }
.world .over p { margin: 14px 0 0; font-family: var(--f-pix); font-size: 13px; letter-spacing: .14em; color: var(--cyan); text-shadow: 2px 2px 0 #000; text-transform: uppercase; }

.manifesto { margin-top: 28px; display: grid; grid-template-columns: 1fr; gap: 0; }
.manifesto p { margin: 0; padding: 14px 20px; font-family: var(--f-pix); font-size: clamp(14px, 2vw, 22px); text-transform: uppercase; border-bottom: 3px solid var(--line); }
.manifesto p:last-child { border-bottom: 0; color: var(--lime); }
.manifesto p span { color: var(--mag); }

/* ---------- sections ---------- */
section.sec { margin-top: 56px; }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.sec-head h2 { font-size: clamp(26px, 3.6vw, 44px); line-height: 1.05; margin-top: 6px; }
.sec-head p { margin: 8px 0 0; color: var(--dim); max-width: 64ch; font-size: 21px; }
.grid { display: grid; gap: 18px; }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stage { padding: 18px 16px; }
.stage .lvl { font-family: var(--f-big); font-size: 14px; color: var(--mag); }
.stage b { display: block; font-family: var(--f-pix); font-weight: 400; font-size: 16px; margin: 12px 0 6px; color: var(--ink); }
.stage p { margin: 0; color: var(--dim); font-size: 19px; }
.path-line { height: 8px; margin: 0 0 18px; background: repeating-linear-gradient(90deg, var(--lime) 0 12px, transparent 12px 20px); animation: march 1s steps(5) infinite; }
@keyframes march { to { background-position: 20px 0; } }
.moment { margin-top: 18px; padding: 16px 20px; background: var(--lime); color: #071004; display: flex; gap: 16px; align-items: baseline; flex-wrap: wrap; box-shadow: 6px 6px 0 #000; }
.moment b { font-family: var(--f-big); font-size: 16px; font-weight: 400; }
.moment p { margin: 0; font-size: 21px; }

.app-icon { display: flex; flex-direction: column; gap: 8px; padding: 18px; color: var(--ink); min-height: 220px; }
.app-icon:hover { border-color: var(--lime); color: var(--ink); transform: translate(-2px, -2px); box-shadow: inset 0 0 0 var(--px) var(--bg2), 8px 8px 0 0 #000; }
.app-icon .ico { width: 56px; height: 56px; }
.app-icon h3 { font-size: 16px; margin-top: 6px; }
.app-icon p { margin: 0; color: var(--dim); font-size: 19px; }
.app-icon .go { margin-top: auto; font-family: var(--f-pix); font-size: 11px; color: var(--lime); letter-spacing: .1em; }
.app-icon .k { font-family: var(--f-pix); font-size: 10px; color: var(--mag); letter-spacing: .14em; }

.use { padding: 16px; }
.use b { display: block; font-family: var(--f-pix); font-weight: 400; font-size: 13px; color: var(--amber); margin-bottom: 8px; }
.use p { margin: 0; color: var(--dim); font-size: 19px; }

table.t { width: 100%; border-collapse: collapse; font-size: 19px; }
.t th { text-align: left; font-family: var(--f-pix); font-weight: 400; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--cyan); padding: 10px 12px; border-bottom: 3px solid var(--line); white-space: nowrap; }
.t td { padding: 8px 12px; border-bottom: 2px dotted var(--line); vertical-align: top; }
.t tbody tr:hover td { background: rgba(61, 217, 255, .06); }
.t.click tbody tr { cursor: pointer; }
.t tr.sel td { background: rgba(141, 255, 74, .12); }
.scroll { overflow-x: auto; }
.pill { display: inline-block; font-family: var(--f-pix); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; padding: 3px 7px; border: 2px solid currentColor; white-space: nowrap; }

.lv { padding: 16px; }
.lv .ph { font-family: var(--f-pix); font-size: 10px; color: var(--dim); letter-spacing: .12em; }
.lv b { display: block; font-family: var(--f-pix); font-weight: 400; font-size: 14px; margin: 10px 0 6px; }
.lv p { margin: 0; color: var(--dim); font-size: 19px; }
.lv .hp { margin-top: 12px; height: 12px; background: var(--faint); box-shadow: 0 0 0 2px #000; }
.lv .hp i { display: block; height: 100%; background: var(--lime); }
.lv.done { border-color: var(--lime); }

.faq details { border-bottom: 3px solid var(--line); padding: 0 18px; }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 0; display: flex; justify-content: space-between; gap: 14px; font-family: var(--f-pix); font-size: 14px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '[+]'; color: var(--lime); }
.faq details[open] summary::after { content: '[-]'; }
.faq p { margin: 0 0 16px; color: var(--dim); font-size: 20px; max-width: 90ch; }

.cta-box { text-align: center; padding: 44px 18px; }
.cta-box h2 { font-family: var(--f-big); font-size: clamp(22px, 3.6vw, 44px); line-height: 1.25; }
.cta-box p { color: var(--dim); max-width: 58ch; margin: 14px auto 22px; font-size: 21px; }
.cta-box .btns { justify-content: center; }

footer.foot { margin-top: 56px; border-top: var(--px) solid var(--line); background: var(--bg2); padding: 28px 0 18px; }
.fcols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; gap: 22px; }
.fcols h4 { font-size: 11px; letter-spacing: .14em; color: var(--dim); margin-bottom: 10px; text-transform: uppercase; }
.fcols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 19px; }
.fcols a { color: var(--ink); }
.fcols a:hover { color: var(--lime); }
.fbrand p { color: var(--dim); font-size: 19px; max-width: 40ch; }
.fbrand img { width: 230px; height: auto; }
.legal { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 22px; padding-top: 14px; border-top: 2px dotted var(--line); color: var(--dim); font-size: 17px; }
.barcode { display: flex; gap: 2px; height: 24px; }
.barcode i { background: var(--dim); display: block; }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(20px); z-index: 120; background: var(--lime); color: #071004; font-family: var(--f-pix); font-size: 12px; padding: 10px 16px; box-shadow: 4px 4px 0 #000; opacity: 0; transition: all .15s steps(3); pointer-events: none; }
.toast.on { opacity: 1; transform: translateX(-50%); }
.toast.bad { background: var(--red); color: #fff; }

@media (max-width: 1180px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero .stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar nav { display: none; }
  .g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fcols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fcols .fbrand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  body { font-size: 19px; }
  .hero .stack, .g5, .g4, .g3, .g2, .fcols { grid-template-columns: minmax(0, 1fr); }
  .monitor .screen { grid-template-columns: minmax(0, 1fr); }
  .quest { grid-template-columns: repeat(3, 1fr); }
  .topbar .cta .btn:not(.pri) { display: none; }
  .brand b { font-size: 16px; }
  .world canvas { height: 220px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
