/* HOOD5600 — mecha/terminal HUD on paper, fintech green.
   Four colours, one typeface, 1.5px borders, hard shadows with no blur.
   Motion is anime-adjacent: scanline sweep, glitch, speed lines, tracer. */

:root {
  --ground: #EDECE8;
  --ink: #0a0a0a;
  --panel: #FFFFFF;
  --accent: #CCFF00;
  --accent-ink: #4F6B00;
  --c-lime: #CCFF00;
  --c-magenta: #FF2D77;
  --c-cyan: #00C2FF;
  --ui: 1;
  --line: 1.5px solid var(--ink);
  --gutter: 56px;
}
@media (min-height: 800px) {
  :root { --ui: calc(100vh / 980); }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "IBM Plex Mono", "Space Mono", ui-monospace, monospace;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html.hud-on, html.hud-on body { overflow: hidden; height: 100%; cursor: none; }

a { color: var(--ink); }
a:hover { color: var(--accent-ink); }
.accent-text { color: var(--accent-ink); }

.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: radial-gradient(var(--ink) .5px, transparent .5px);
  background-size: 4px 4px; opacity: .045;
}

/* scanline sweep — one band crossing the page, slowly */
.sweep {
  position: fixed; left: 0; right: 0; height: 180px; top: -180px;
  pointer-events: none; z-index: 2;
  background: linear-gradient(to bottom, transparent, rgba(204,255,0,.07) 45%, rgba(204,255,0,.12) 50%, rgba(204,255,0,.07) 55%, transparent);
  animation: sweep 7s linear infinite;
}
@keyframes sweep { to { top: 100%; } }

.tick { position: fixed; width: 22px; height: 22px; z-index: 3; pointer-events: none; }
.tick-tl { top: 18px; left: 18px;  border-top: var(--line); border-left: var(--line); }
.tick-tr { top: 18px; right: 18px; border-top: var(--line); border-right: var(--line); }
.tick-bl { bottom: 18px; left: 18px;  border-bottom: var(--line); border-left: var(--line); }
.tick-br { bottom: 18px; right: 18px; border-bottom: var(--line); border-right: var(--line); }

.annot { font-size: 11px; letter-spacing: .18em; opacity: .5; text-transform: uppercase; font-weight: 500; }
.annot.mb { display: block; margin-bottom: 16px; }
.rule { height: 1.5px; background: var(--ink); opacity: .25; }
.rule.flex { flex: 1 1 auto; }
.rule.mt { margin-top: 26px; }
.spacer { flex: 1 1 auto; }
.body { font-size: 15px; line-height: 1.75; opacity: .72; margin: 26px 0 0; }
.display { margin: 0; font-size: 82px; font-weight: 700; line-height: .94; letter-spacing: -.035em; }

/* glitch — two offset colour ghosts that jitter briefly on load */
.glitch { position: relative; }
.glitch::before, .glitch::after {
  content: attr(data-text); position: absolute; inset: 0;
  white-space: pre; pointer-events: none; opacity: 0;
}
.glitch::before { color: var(--accent); animation: glitch-a 2.6s steps(2, end) 1 .2s; }
.glitch::after  { color: #FF2D55; animation: glitch-b 2.6s steps(2, end) 1 .2s; }
@keyframes glitch-a {
  0%,100% { opacity: 0; transform: none; }
  4%  { opacity: .85; transform: translate(-3px, 1px); }
  8%  { opacity: 0; }
  22% { opacity: .7; transform: translate(2px, -2px); }
  26% { opacity: 0; }
  55% { opacity: .5; transform: translate(-2px, 0); }
  58% { opacity: 0; }
}
@keyframes glitch-b {
  0%,100% { opacity: 0; transform: none; }
  6%  { opacity: .6; transform: translate(3px, -1px); }
  10% { opacity: 0; }
  24% { opacity: .5; transform: translate(-2px, 2px); }
  28% { opacity: 0; }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 0 32px;
  border: var(--line); background: transparent; color: var(--ink);
  font: inherit; font-size: 14px; letter-spacing: .06em;
  text-decoration: none; cursor: pointer; position: relative; overflow: hidden;
}
.btn-accent { background: var(--accent); font-weight: 700; font-size: 15px; }
.btn.shadow { box-shadow: 5px 5px 0 var(--ink); }
.btn:hover { color: var(--ink); }
.btn-accent:hover { background: #B8E600; }
/* light sheen crossing the primary button */
.btn-accent::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 60px;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.55), transparent);
  animation: sheen 3.4s ease-in-out infinite;
}
@keyframes sheen { 0% { left: -80px; } 55%,100% { left: 120%; } }

.strip { display: flex; align-items: center; gap: 14px; padding: 14px 26px; background: var(--accent); border-bottom: var(--line); }
.strip-tag { font-size: 12px; font-weight: 700; letter-spacing: .16em; }
.strip-sub { font-size: 12px; font-weight: 500; letter-spacing: .14em; opacity: .75; }

/* ── entry gate ─────────────────────────────────────────────── */
.gate { position: fixed; inset: 0; z-index: 200; background: var(--ground); display: flex; align-items: center; justify-content: center; padding: 24px; }
.gate[hidden] { display: none; }
.gate-modal {
  width: min(760px, 100%); background: var(--panel);
  border: var(--line); box-shadow: 10px 10px 0 var(--ink);
  max-height: calc(100vh - 48px); display: flex; flex-direction: column;
  animation: gate-in .32s cubic-bezier(.2,.9,.3,1.2) both;
}
@keyframes gate-in { from { opacity: 0; transform: translateY(14px) scale(.985); } }
.gate-body { padding: 34px 34px 28px; overflow: hidden; }
.gate-title { margin: 0 0 22px; font-size: 38px; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; }
.gate-scroll { max-height: 300px; overflow-y: auto; padding-right: 16px; font-size: 13px; line-height: 1.85; opacity: .82; margin-top: 22px; }
.gate-scroll p { margin: 0 0 16px; }
.gate-scroll p:last-child { margin-bottom: 0; }
.gate-foot { display: flex; align-items: center; gap: 16px; padding: 18px 26px; border-top: var(--line); }
.gate-foot .btn { min-height: 48px; padding: 0 30px; font-size: 13px; letter-spacing: .12em; }

/* ── page ───────────────────────────────────────────────────── */
.page { position: relative; z-index: 1; max-width: 1440px; margin: 0 auto; padding-bottom: 80px; }
.page[hidden] { display: none; }

.hud { display: flex; align-items: center; gap: 20px; padding: 34px var(--gutter) 0; }
.hud-name { display: flex; align-items: center; gap: 10px; border: var(--line); padding: 7px 14px; background: var(--accent); font-size: 12px; letter-spacing: .12em; }
.hud-name strong { font-weight: 700; }
.hud-name span { opacity: .7; font-weight: 500; }
.hud-status { display: flex; align-items: center; gap: 10px; border: var(--line); padding: 9px 14px; font-size: 11px; font-weight: 600; letter-spacing: .14em; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: block; animation: blip 1.6s ease-in-out infinite; }
@keyframes blip { 0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(204,255,0,.55); } 50% { opacity: .55; box-shadow: 0 0 0 6px rgba(204,255,0,0); } }

/* marquee */
.ticker { margin: 24px var(--gutter) 0; border-block: var(--line); overflow: hidden; background: var(--accent); }
.ticker-track { display: flex; gap: 28px; white-space: nowrap; padding: 9px 0; font-size: 11px; font-weight: 700; letter-spacing: .2em; width: max-content; animation: marquee 26s linear infinite; }
@keyframes marquee { to { transform: translateX(-50%); } }

.hero { display: flex; gap: 56px; align-items: flex-start; padding: 60px var(--gutter) 0; }
.hero-copy { width: 660px; flex-shrink: 0; }
.cta { display: flex; gap: 14px; margin-top: 38px; flex-wrap: wrap; }

.graph { flex: 1 1 auto; margin: 0; height: 470px; position: relative; border: 1.5px solid rgba(17,17,16,.18); color: var(--ink); }
.graph figcaption { position: absolute; top: 10px; left: 14px; font-size: 10px; }
.graph svg { width: 100%; height: 100%; display: block; font-family: inherit; }
.pulse { animation: pulse 2.4s ease-in-out infinite; transform-origin: 330px 250px; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(1.35); } }
.tracer { filter: drop-shadow(0 0 4px rgba(204,255,0,.8)); }

/* ── the flip ───────────────────────────────────────────────── */
.flip { position: relative; margin: 96px 0 0; padding: 72px var(--gutter); background: var(--ink); color: var(--ground); overflow: hidden; }
.flip-inner { position: relative; z-index: 1; max-width: 900px; }
.flip .annot { opacity: .55; }
.flip-title { margin: 0 0 26px; font-size: 64px; font-weight: 700; line-height: .95; letter-spacing: -.035em; }
.flip-title .accent-text { color: var(--accent); }
.flip-body { margin: 0 0 40px; font-size: 16px; line-height: 1.8; opacity: .78; max-width: 640px; }
.flip-note { display: block; margin-top: 28px; font-size: 10px; letter-spacing: .14em; opacity: .45; }

/* anime speed lines */
.speed { position: absolute; inset: 0; pointer-events: none; opacity: .5; }
.speed i {
  position: absolute; left: -30%; height: 1.5px; width: 45%;
  background: linear-gradient(to right, transparent, var(--accent), transparent);
  animation: dash 2.8s linear infinite;
}
.speed i:nth-child(1) { top: 12%; animation-duration: 2.2s; animation-delay: .0s; }
.speed i:nth-child(2) { top: 27%; animation-duration: 3.4s; animation-delay: .5s; }
.speed i:nth-child(3) { top: 44%; animation-duration: 2.7s; animation-delay: 1.1s; }
.speed i:nth-child(4) { top: 61%; animation-duration: 3.9s; animation-delay: .3s; }
.speed i:nth-child(5) { top: 78%; animation-duration: 2.5s; animation-delay: 1.6s; }
.speed i:nth-child(6) { top: 91%; animation-duration: 3.1s; animation-delay: .9s; }
@keyframes dash { to { left: 115%; } }

.ladder { display: flex; flex-direction: column; gap: 8px; }
.rung { display: flex; align-items: center; gap: 20px; padding: 16px 20px; border: 1.5px solid rgba(244,243,239,.22); }
.rung-n { font-size: 11px; letter-spacing: .16em; opacity: .5; width: 34px; flex-shrink: 0; }
.rung-l { font-size: 20px; font-weight: 700; letter-spacing: -.02em; flex: 1 1 auto; }
.rung-s { font-size: 12px; letter-spacing: .12em; opacity: .6; font-variant-numeric: tabular-nums; }
.rung-last { border-color: var(--accent); }
.rung-last .rung-l { color: var(--accent); }

/* ── sectors ────────────────────────────────────────────────── */
.sectors { padding: 84px var(--gutter) 0; display: flex; flex-direction: column; gap: 10px; }
.sectors .annot.mb { margin-bottom: 4px; }
.row { display: flex; align-items: center; gap: 24px; min-height: 62px; padding: 0 24px; border: var(--line); background: var(--panel); text-decoration: none; transition: transform .08s ease, background .12s ease; }
.row:hover { transform: translateX(5px); background: #FBFFED; }
.row-n { font-size: 10px; letter-spacing: .16em; opacity: .5; width: 96px; flex-shrink: 0; }
.row-label { font-size: 24px; font-weight: 700; letter-spacing: -.02em; flex: 1 1 auto; }
.row-desc { font-size: 11px; letter-spacing: .14em; opacity: .5; }
.row-accent { background: var(--accent); }
.row-accent:hover { background: #B8E600; }
.row-accent .row-n, .row-accent .row-desc { opacity: .65; }

.contract { display: flex; gap: 10px; align-items: stretch; padding: 84px var(--gutter) 0; }
.ca { flex: 1 1 auto; border: var(--line); background: var(--panel); padding: 26px 28px; min-width: 0; }
.ca-value { font-size: 16px; font-weight: 500; word-break: break-all; }
.ca-copy, .ca-link { display: flex; align-items: center; justify-content: center; width: 130px; flex-shrink: 0; border: var(--line); background: var(--panel); font: inherit; font-size: 12px; letter-spacing: .14em; text-decoration: none; cursor: pointer; }
.ca-copy:hover, .ca-link:hover { background: var(--accent); }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; padding: 10px var(--gutter) 0; }
.stat { border: var(--line); background: var(--panel); padding: 24px 22px; }
.stat-v { font-size: 30px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }

.risk { margin: 84px var(--gutter) 0; border: var(--line); background: var(--panel); box-shadow: 7px 7px 0 var(--ink); }
.risk-body { padding: 30px 26px; display: flex; gap: 44px; }
.risk-body p { margin: 0; flex: 1 1 0; font-size: 14px; line-height: 1.8; opacity: .8; }

.console { display: flex; align-items: center; gap: 16px; margin: 84px var(--gutter) 0; padding-top: 22px; border-top: var(--line); flex-wrap: wrap; }
.key { font-size: 10px; letter-spacing: .16em; border: var(--line); padding: 6px 11px; }

/* ── responsive ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .hero { flex-direction: column; gap: 36px; }
  .hero-copy { width: 100%; }
  .graph { width: 100%; height: 300px; }
  .risk-body { flex-direction: column; gap: 20px; }
  .flip-title { font-size: 48px; }
}

@media (max-width: 720px) {
  :root { --gutter: 20px; }
  .tick { width: 16px; height: 16px; }
  .tick-tl, .tick-tr { top: 12px; } .tick-bl, .tick-br { bottom: 12px; }
  .tick-tl, .tick-bl { left: 12px; } .tick-tr, .tick-br { right: 12px; }
  .display { font-size: 46px; }
  .flip { margin-top: 56px; padding: 48px var(--gutter); }
  .flip-title { font-size: 34px; }
  .flip-body { font-size: 15px; }
  .hide-sm { display: none; }
  .hero { padding-top: 40px; }
  .cta { flex-direction: column; }
  .cta .btn { width: 100%; }
  .sectors { padding-top: 44px; }
  .row { gap: 12px; min-height: 54px; padding: 0 16px; }
  .row-n { width: 62px; font-size: 9px; }
  .row-label { font-size: 18px; }
  .row-desc { display: none; }
  .contract { flex-wrap: wrap; padding-top: 44px; }
  .ca { flex: 1 1 100%; }
  .ca-copy, .ca-link { flex: 1 1 0; width: auto; min-height: 48px; }
  .stats { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
  .stat-v { font-size: 22px; }
  .risk { margin-top: 44px; box-shadow: 5px 5px 0 var(--ink); }
  .risk-body { padding: 20px 16px; }
  .rung-l { font-size: 16px; }
  .gate-title { font-size: 28px; }
  .gate-body { padding: 24px 22px 20px; }
  .gate-foot { flex-wrap: wrap; padding: 16px 22px; }
  .gate-foot .annot { display: none; }
  .gate-foot .btn { width: 100%; }
  .console { margin-top: 44px; }
}

/* Motion is decoration here — none of it carries meaning, so it all goes. */
@media (prefers-reduced-motion: reduce) {
  .sweep, .speed, .ticker-track, .dot, .pulse, .tracer,
  .glitch::before, .glitch::after, .btn-accent::after, .gate-modal,
  .mm-hazard, .mm-character, .mm-logo-wrap, .mm-tagline::before, .mm-tagline::after,
  .hud-roll, .boot-bar i, .hud-corner, .status-panel, .mm-zodiac-star, .view-page, .mm-item {
    animation: none !important;
  }
  .sweep, .speed, .glitch::before, .glitch::after, .btn-accent::after { display: none; }
  .row { transition: none; }
  .row:hover { transform: none; }
}

/* ── console selector ───────────────────────────────────────────
   The footer promises NAVIGATE / SELECT, so the menu actually responds
   to arrow keys. .is-cursor is the keyboard position; hover mirrors it. */
.row { position: relative; }
.row-arrow {
  opacity: 0; margin-left: -8px; margin-right: 4px;
  font-size: 16px; transition: opacity .1s ease, transform .1s ease;
  transform: translateX(-4px);
}
.row:hover, .row.is-cursor { background: var(--accent); transform: translateX(5px); }
.row:hover .row-arrow, .row.is-cursor .row-arrow { opacity: 1; transform: none; }
.row:hover .row-n, .row:hover .row-desc,
.row.is-cursor .row-n, .row.is-cursor .row-desc { opacity: .65; }
.row.is-cursor { outline: none; box-shadow: 4px 4px 0 var(--ink); }
.row-accent .row-arrow { opacity: .5; transform: none; }

/* ── brand + status panel ───────────────────────────────────── */
.hud-brand { display: flex; flex-direction: column; gap: 6px; }
.hud-tag { font-size: 10px; letter-spacing: .2em; font-weight: 600; color: var(--accent-ink); padding-left: 2px; }

.hud-status {
  display: flex; flex-direction: column; gap: 6px; align-items: stretch;
  border: var(--line); padding: 9px 12px; min-width: 186px;
}
.status-head { display: flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 600; letter-spacing: .14em; }
.status-log { list-style: none; margin: 0; padding: 0; font-size: 9px; letter-spacing: .08em; opacity: .5; line-height: 1.5; }
.status-log li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spark { width: 100%; height: 26px; display: block; }

@media (max-width: 900px) {
  .hud { flex-wrap: wrap; }
  .hud-status { min-width: 0; }
  .status-log, .spark { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .row-arrow { transition: none; }
}

/* ── SPX-style full HUD menu ─────────────────────────────────── */
.stage {
  position: fixed; inset: 0; overflow: hidden; z-index: 4;
}
.mm-bg {
  position: absolute; inset: 0;
  background: #E8E6E1 url("assets/wallpaper.jpg") center / cover no-repeat;
  filter: grayscale(.15) contrast(1.05);
}
.mm-halftone {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(10,10,10,.08) 1px, transparent 1px);
  background-size: 14px 14px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  pointer-events: none;
}
.mm-hazard {
  position: absolute; left: -20%; right: -20%; height: 22px;
  background: repeating-linear-gradient(-45deg, var(--c-lime) 0 16px, #0a0a0a 16px 32px);
  background-size: 45px 45px;
  opacity: .92; z-index: 2;
  box-shadow: 0 0 0 2px #0a0a0a, 0 5px 0 0 #0a0a0a;
  animation: tape 8s linear infinite;
}
.mm-hazard--top { top: 0; transform: rotate(-2deg) translateY(-6px); }
.mm-hazard--bottom { bottom: 0; transform: rotate(2deg) translateY(6px); animation-direction: reverse; animation-duration: 11s; }
@keyframes tape { to { background-position: 45px 0; } }
.mm-zodiac {
  position: absolute; left: 28%; top: 48%; width: min(70vmin, 700px); height: min(70vmin, 700px);
  transform: translate(-50%,-50%); z-index: 3; pointer-events: none; opacity: .28;
}
.mm-zodiac-line { stroke: rgba(10,10,10,.55); stroke-width: .7; fill: none; stroke-dasharray: 500; animation: mm-draw 1.2s ease-out .3s forwards; }
.mm-zodiac-star { fill: #0a0a0a; }
@keyframes mm-draw { to { stroke-dashoffset: 0; } }

.mm-character {
  position: absolute; left: -4vw; right: auto; bottom: -2vh; top: 150px;
  height: auto; width: min(50vw, 680px);
  z-index: 4; pointer-events: none;
  object-fit: contain; object-position: left bottom;
  mix-blend-mode: multiply;
  filter: contrast(1.08) saturate(1.12);
  -webkit-mask-image: radial-gradient(ellipse 78% 92% at 28% 42%, #000 42%, transparent 78%);
  mask-image: radial-gradient(ellipse 78% 92% at 28% 42%, #000 42%, transparent 78%);
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0) scaleX(-1);
  animation: operator-idle 6s ease-in-out infinite;
  will-change: transform;
}
@keyframes operator-idle {
  0%,100% { filter: contrast(1.06) saturate(1.1); }
  50% { filter: contrast(1.1) saturate(1.18); }
}

.mm-hero {
  position: absolute; top: 36px; right: 40px; left: auto; z-index: 6;
  display: flex; align-items: flex-end; gap: 18px; flex-direction: row-reverse;
  text-align: right;
}
.mm-logo-wrap {
  background: var(--c-lime); border: 3px solid #0a0a0a;
  box-shadow: 8px 8px 0 #0a0a0a, 12px 12px 0 var(--c-magenta);
  transform: rotate(-2deg); padding: 8px 10px;
  animation: plate 3.2s ease-in-out infinite;
}
@keyframes plate {
  0%,100% { transform: rotate(-2deg) translateY(0); }
  50% { transform: rotate(-1deg) translateY(-3px); box-shadow: 10px 12px 0 #0a0a0a, 16px 16px 0 var(--c-magenta); }
}
.mm-logo-mark {
  font-family: Orbitron, sans-serif; font-weight: 900; font-size: 42px;
  letter-spacing: .04em; line-height: 1; padding: 8px 4px;
}
.mm-bracket {
  font-family: "Space Mono", monospace; font-size: 12px; letter-spacing: .22em;
  background: var(--c-lime); border: 1.5px solid #0a0a0a; padding: 3px 9px;
  display: inline-block; margin-bottom: 6px;
}
.mm-tagline {
  font-family: Orbitron, sans-serif; font-weight: 900; font-size: clamp(26px, 3.4vw, 42px);
  letter-spacing: .14em; line-height: .95; text-transform: uppercase;
}
.mm-tagline-sub {
  font-family: "Barlow Condensed", sans-serif; font-weight: 700; font-size: 18px;
  letter-spacing: .28em; color: var(--c-magenta); margin-top: 8px; text-transform: uppercase;
}

.mm-nav {
  position: absolute; top: 168px; right: 40px; left: auto; bottom: 48px;
  transform: none;
  display: flex; flex-direction: column; gap: 10px;
  width: min(560px, 48vw); z-index: 6;
  justify-content: center;
}
.mm-item {
  position: relative; display: flex; align-items: center; gap: 16px;
  height: 58px; padding: 0 22px 0 28px; text-decoration: none; color: #0a0a0a;
  font: inherit; width: 100%; text-align: left; cursor: pointer;
  background: #fff; border: 3px solid #0a0a0a;
  box-shadow: 7px 7px 0 #0a0a0a; overflow: hidden;
  animation: mm-enter .35s ease backwards; animation-delay: var(--enter-delay, 0ms);
}
@keyframes mm-enter { from { opacity: 0; transform: translateX(28px); } }
.mm-item.active, .mm-item:hover {
  background: var(--c-lime);
  box-shadow: 11px 11px 0 #3d3d3d, 14px 14px 0 #0a0a0a;
  transform: translateX(-2px);
}
.mm-item.accent-magenta.active, .mm-item.accent-magenta:hover { background: var(--c-magenta); }
.mm-item.accent-cyan.active, .mm-item.accent-cyan:hover { background: var(--c-cyan); }
.mm-item-stripe {
  position: absolute; right: 0; left: auto; top: 0; bottom: 0; width: 0;
  background: repeating-linear-gradient(-45deg, #0a0a0a 0 7px, transparent 7px 14px);
  transition: width .2s ease;
}
.mm-item.active .mm-item-stripe, .mm-item:hover .mm-item-stripe { width: 14px; }
.mm-item-code {
  font-size: 10px; font-weight: 700; letter-spacing: .18em; opacity: .55;
  border: 1.5px solid rgba(10,10,10,.25); padding: 4px 8px; flex-shrink: 0;
}
.mm-item-code::before {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 8px;
  border-top: 1.5px solid var(--c-magenta); border-right: 1.5px solid var(--c-magenta);
  transform: rotate(45deg); vertical-align: 1px;
}
.mm-item-label {
  font-family: Orbitron, sans-serif; font-weight: 900; font-size: clamp(15px, 1.8vw, 22px);
  letter-spacing: .1em; line-height: 1; white-space: nowrap;
}
.mm-item-arrow {
  font-family: Orbitron, sans-serif; font-weight: 900; font-size: 22px;
  color: transparent; margin-left: auto;
}
.mm-item.active .mm-item-arrow, .mm-item:hover .mm-item-arrow { color: #0a0a0a; }
.mm-item-sub {
  font-family: "Barlow Condensed", sans-serif; font-weight: 600; font-size: 12px;
  letter-spacing: .12em; opacity: .5; text-transform: uppercase; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 38%;
}
.mm-item-underline {
  position: absolute; bottom: 8px; left: 22px; width: 0; height: 3px; background: #0a0a0a;
  transition: width .2s ease;
}
.mm-item.active .mm-item-underline, .mm-item:hover .mm-item-underline { width: 110px; }

.status-panel {
  position: fixed; top: 18px; left: 18px; right: auto; width: 236px; z-index: 8;
  background: #fff; border: 3px solid #0a0a0a; box-shadow: 6px 6px 0 #8a8a8a;
  font-family: "Space Mono", monospace; overflow: hidden;
}
.sp-header {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: var(--c-lime); border-bottom: 2.5px solid #0a0a0a; font-weight: 700; letter-spacing: .16em; font-size: 12px;
}
.sp-dot { width: 10px; height: 10px; background: var(--c-magenta); border: 1.5px solid #0a0a0a; animation: sp-pulse 1.4s ease-in-out infinite; }
@keyframes sp-pulse { 50% { opacity: .45; } }
.sp-state { margin-left: auto; font-family: Orbitron, sans-serif; font-size: 11px; font-weight: 900; }
.sp-ticker { padding: 10px 14px; min-height: 72px; display: flex; flex-direction: column; gap: 4px; }
.sp-ticker-line { font-size: 10px; letter-spacing: .08em; opacity: .55; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-clock { display: flex; justify-content: space-between; padding: 10px 14px; background: #0a0a0a; color: var(--c-lime); font-size: 12px; letter-spacing: .2em; }
.sp-clock-value { font-family: Orbitron, sans-serif; font-weight: 700; font-size: 16px; }

.mm-hints { position: absolute; bottom: 22px; left: 28px; right: auto; display: flex; gap: 8px; z-index: 6; flex-wrap: wrap; justify-content: flex-start; max-width: 52vw; }
.mm-hint-row {
  display: flex; align-items: center; gap: 8px; padding: 7px 12px;
  background: #fff; border: 2px solid #0a0a0a; box-shadow: 4px 4px 0 #0a0a0a;
  font-size: 11px; letter-spacing: .14em;
}
.mm-hint-key { background: var(--c-lime); border: 1px solid #0a0a0a; padding: 1px 6px; font-weight: 700; }

.hud-scanlines {
  position: fixed; inset: 0; z-index: 50; pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,.035) 2px, rgba(0,0,0,.035) 4px);
}
.hud-roll {
  position: fixed; left: 0; right: 0; height: 120px; top: -120px; z-index: 48; pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(204,255,0,.08), transparent);
  animation: roll 6.5s linear infinite;
}
@keyframes roll { to { top: 110%; } }
.hud-noise {
  position: fixed; inset: 0; z-index: 49; pointer-events: none; opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hud-corner { position: fixed; width: 36px; height: 36px; z-index: 51; pointer-events: none; }
.hud-corner::before, .hud-corner::after { content: ""; position: absolute; background: #0a0a0a; }
.hud-corner--tl { top: 12px; left: 12px; }
.hud-corner--tl::before { top:0;left:0;width:22px;height:2px; } .hud-corner--tl::after { top:0;left:0;width:2px;height:22px; }
.hud-corner--tr { top: 12px; right: 12px; }
.hud-corner--tr::before { top:0;right:0;width:22px;height:2px; } .hud-corner--tr::after { top:0;right:0;width:2px;height:22px; }
.hud-corner--bl { bottom: 12px; left: 12px; }
.hud-corner--bl::before { bottom:0;left:0;width:22px;height:2px; } .hud-corner--bl::after { bottom:0;left:0;width:2px;height:22px; }
.hud-corner--br { bottom: 12px; right: 12px; }
.hud-corner--br::before { bottom:0;right:0;width:22px;height:2px; } .hud-corner--br::after { bottom:0;right:0;width:2px;height:22px; }

.hud-cursor { position: fixed; z-index: 99999; pointer-events: none; width: 28px; height: 28px; transform: translate(-50%,-50%); }
.hud-cursor-ring { position: absolute; inset: 0; border: 2px solid #0a0a0a; border-radius: 50%; background: rgba(204,255,0,.22); }
.hud-cursor-dot { position: absolute; top: 50%; left: 50%; width: 5px; height: 5px; margin: -2.5px; background: #0a0a0a; border-radius: 50%; }
.hud-cursor.hot .hud-cursor-ring { transform: scale(.7); background: rgba(255,45,119,.4); }

.pop {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px;
}
.pop[hidden] { display: none; }
.pop-scrim {
  position: absolute; inset: 0; border: 0; background: rgba(10,10,10,.45);
  backdrop-filter: blur(3px); cursor: pointer;
}
.pop-modal {
  position: relative; z-index: 1; width: min(760px, 94vw); max-height: min(82vh, 860px);
  background: #fff; border: 3px solid #0a0a0a; box-shadow: 12px 12px 0 #0a0a0a;
  display: flex; flex-direction: column; animation: pop-in .22s ease;
}
@keyframes pop-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.pop-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: var(--c-lime); border-bottom: 2.5px solid #0a0a0a;
  font-size: 11px; font-weight: 700; letter-spacing: .16em;
}
.pop-x {
  font: inherit; font-size: 11px; font-weight: 700; letter-spacing: .16em;
  background: #fff; border: 2px solid #0a0a0a; padding: 4px 10px; cursor: pointer;
}
.pop-body { overflow: auto; padding: 22px 24px 28px; }
.pop-panel[hidden] { display: none; }
.pop-panel .page-title { font-size: 32px; margin-bottom: 16px; }

.view-page {
  position: relative; z-index: 7; min-height: 100vh;
  background: var(--ground) url("assets/wallpaper.jpg") center / cover;
  animation: page-in .38s cubic-bezier(.2,.8,.2,1);
  padding-top: 28px;
}
@keyframes page-in {
  from { opacity: 0; transform: translateX(28px); filter: blur(4px); }
  to { opacity: 1; transform: none; filter: none; }
}

.boot {
  position: fixed; inset: 0; z-index: 180; background: #0a0a0a; color: var(--c-lime);
  display: grid; place-items: center; font-family: "Space Mono", monospace;
}
.boot[hidden] { display: none; }
.boot-inner { width: min(420px, 86vw); }
.boot-tag { letter-spacing: .28em; font-size: 11px; margin-bottom: 14px; opacity: .7; }
.boot-line { font-size: 14px; letter-spacing: .12em; margin-bottom: 16px; min-height: 1.4em; }
.boot-bar { height: 10px; border: 2px solid var(--c-lime); }
.boot-bar i { display: block; height: 100%; width: 0; background: var(--c-lime); animation: bootfill 1.15s ease-in forwards; }
@keyframes bootfill { to { width: 100%; } }

.hud-corner { animation: corner-blink 4s ease-in-out infinite; }
.hud-corner--tr { animation-delay: .4s; }
.hud-corner--br { animation-delay: .8s; }
.hud-corner--bl { animation-delay: 1.2s; }
@keyframes corner-blink {
  0%,70%,100% { opacity: 1; }
  78% { opacity: .15; }
  86% { opacity: 1; }
}

.status-panel { animation: panel-in .5s ease .2s both; }
@keyframes panel-in { from { opacity: 0; transform: translateY(-12px); } }

.mm-zodiac-star { animation: star-pop 2.8s ease-in-out infinite; }
.mm-zodiac-star:nth-child(6) { animation-delay: .2s; }
.mm-zodiac-star:nth-child(7) { animation-delay: .5s; }
.mm-zodiac-star:nth-child(8) { animation-delay: .8s; }
.mm-zodiac-star:nth-child(9) { animation-delay: 1.1s; }
@keyframes star-pop {
  0%,100% { transform: scale(1); opacity: .8; }
  50% { transform: scale(1.8); opacity: 1; }
}

@media (max-width: 900px) {
  .mm-character, .mm-zodiac, .status-panel { display: none; }
  .mm-nav { width: auto; right: 16px; left: 16px; top: auto; bottom: 90px; transform: none; }
  .mm-hero { right: 16px; left: auto; }
  .mm-item { height: 52px; }
  .mm-item-sub { display: none; }
  .mm-hero { top: 18px; left: 16px; }
  .mm-tagline { font-size: 22px; }
}

/* ── themes ─────────────────────────────────────────────────── */
html[data-theme="orange"] {
  --accent: #FF4D00;
  --accent-ink: #B83700;
}
html[data-theme="cyan"] {
  --accent: #00C2FF;
  --accent-ink: #007AA3;
}

.theme-switch { display: flex; border: var(--line); }
.theme-btn {
  background: var(--panel); border: 0; border-right: var(--line);
  font: inherit; font-size: 9px; letter-spacing: .16em; padding: 8px 10px; cursor: pointer;
}
.theme-btn:last-child { border-right: 0; }
.theme-btn.is-on { background: var(--accent); font-weight: 700; }
.status-clock { font-size: 18px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }

.view[hidden] { display: none !important; }
.view-page { padding: 40px var(--gutter) 0; }
.back-chip {
  display: inline-flex; align-items: center; margin: 8px var(--gutter) 18px;
  padding: 8px 14px; border: 2px solid #0a0a0a; background: var(--c-lime);
  font-size: 11px; letter-spacing: .16em; text-decoration: none; font-weight: 700;
  box-shadow: 4px 4px 0 #0a0a0a; color: #0a0a0a;
}
.back-chip-dark { position: relative; z-index: 2; }
.page-head { margin-bottom: 28px; }
.page-title { margin: 8px 0 0; font-size: 48px; font-weight: 700; letter-spacing: -.03em; }
.prose { max-width: 720px; font-size: 15px; line-height: 1.8; opacity: .78; }
.prose p { margin: 0 0 16px; }
.prose-lead { max-width: 720px; font-size: 14px; line-height: 1.7; opacity: .65; margin: 0 0 28px; }

.cmds { display: flex; flex-direction: column; gap: 8px; }
.cmd {
  display: grid; grid-template-columns: 48px 1fr; gap: 16px;
  border: var(--line); background: var(--panel); padding: 18px 20px;
}
.cmd-n { font-size: 11px; letter-spacing: .16em; opacity: .45; padding-top: 4px; }
.cmd-t { font-size: 18px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 8px; }
.cmd-d { margin: 0; font-size: 13px; line-height: 1.7; opacity: .72; }

.link-list { display: flex; flex-direction: column; gap: 8px; }
.link-row, .link-child {
  display: flex; align-items: center; gap: 16px; min-height: 56px;
  padding: 0 20px; border: var(--line); background: var(--panel);
  text-decoration: none; color: var(--ink);
}
.link-row { cursor: pointer; font: inherit; width: 100%; text-align: left; }
.link-row:hover, .link-child:hover { background: var(--accent); }
.link-lab { font-size: 18px; font-weight: 700; flex: 1; letter-spacing: -.02em; }
.link-sub { font-size: 11px; letter-spacing: .14em; opacity: .5; }
.link-kids { display: none; flex-direction: column; gap: 6px; margin: 6px 0 8px 24px; }
.link-kids.open { display: flex; }

.empty-panel { border: var(--line); background: var(--panel); padding: 40px 24px; }
.media-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.media-grid iframe { width: 100%; aspect-ratio: 16/9; border: var(--line); }
.gallery-frame { border: var(--line); background: var(--panel); padding: 20px; box-shadow: 7px 7px 0 var(--ink); }
.fee-diagram-frame { margin-top: 28px; }
.fee-diagram { width: 100%; height: auto; display: block; }
.fee-diagram-label { font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: .16em; fill: var(--ink); }
.fee-diagram-value { font-family: 'IBM Plex Mono', monospace; font-weight: 700; font-size: 17px; letter-spacing: -.02em; fill: var(--ink); }
.fee-diagram-caption { font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: .12em; fill: var(--ink); }
.gallery-ph { min-height: 280px; display: grid; place-items: center; border: 1.5px dashed rgba(17,17,16,.3); font-size: 12px; letter-spacing: .14em; opacity: .5; }

.arcade { border: var(--line); background: var(--panel); padding: 24px; }
.arcade-hud { display: flex; gap: 24px; font-size: 12px; letter-spacing: .14em; margin-bottom: 16px; }
.arcade-track { position: relative; height: 48px; border: var(--line); background: var(--ground); }
.arcade-band { position: absolute; left: 38%; right: 38%; top: 0; bottom: 0; background: var(--accent); opacity: .45; }
.arcade-needle { position: absolute; top: 0; bottom: 0; width: 8px; background: var(--ink); left: 10%; }

.meme { display: grid; grid-template-columns: 1fr 280px; gap: 16px; align-items: start; }
#memeCanvas { width: 100%; border: var(--line); background: #111; }
.meme-ctrl { display: flex; flex-direction: column; gap: 12px; }
.meme-ctrl input { width: 100%; margin-top: 6px; padding: 10px; border: var(--line); font: inherit; background: var(--panel); }

@media (max-width: 720px) {
  .page-title { font-size: 32px; }
  .meme, .media-grid { grid-template-columns: 1fr; }
  .theme-switch { width: 100%; }
}
