/* ───────── tokens ───────── */
:root {
  --void: #07050e;
  --abyss: #100b22;
  --deep: #1a1236;
  --violet: #8f6bff;
  --violet-dim: #4a3a8f;
  --amber: #ffb547;
  --bone: #ede8f7;
  --dim: #9088b0;
  --alarm: #ff5c7a;
  --line: rgba(143, 107, 255, 0.22);
  --line-strong: rgba(143, 107, 255, 0.5);

  --display: "Anybody", "Arial Narrow", Impact, sans-serif;
  --mono: "Martian Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --art: ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --rail: 0px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}
@media (min-width: 1000px) { :root { --rail: 64px; } }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--void); font-size: 92%; }
body {
  background: var(--void);
  color: var(--bone);
  font: 400 0.84rem/1.75 var(--mono);
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
body::before { /* scanline grain */
  content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,0.018) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
pre, code { font-family: var(--art); }
::selection { background: var(--amber); color: var(--void); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
[hidden] { display: none !important; }

.skip { position: fixed; top: -60px; left: 12px; z-index: 200; background: var(--amber); color: var(--void); padding: 8px 14px; }
.skip:focus { top: 12px; }

/* ───────── buttons ───────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; font-weight: 700; font-size: 0.82rem; letter-spacing: 0.01em;
  border: 1.5px solid var(--violet); position: relative;
  transition: transform 0.2s var(--ease), background 0.2s, color 0.2s, box-shadow 0.2s;
}
.btn:hover { transform: translate(-3px, -3px); }
.btn:active { transform: translate(0, 0); }
.btn-solid { background: var(--amber); border-color: var(--amber); color: var(--void); box-shadow: 0 0 0 0 var(--amber); }
.btn-solid:hover { box-shadow: 4px 4px 0 var(--violet); }
.btn-ghost { background: rgba(7,5,14,0.5); color: var(--bone); backdrop-filter: blur(4px); }
.btn-ghost:hover { background: var(--violet); color: var(--void); box-shadow: 4px 4px 0 var(--amber); }
.btn-sm { padding: 8px 14px; font-size: 0.74rem; }
.btn-lg { padding: 20px 36px; font-size: 1rem; }

.chip {
  display: inline-flex; align-items: center; gap: 10px; padding: 9px 14px;
  border: 1px dashed var(--line-strong); font-size: 0.74rem; color: var(--bone);
  background: rgba(16,11,34,0.6); transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.chip em { font-style: normal; color: var(--amber); }
.chip:hover { border-style: solid; border-color: var(--amber); background: rgba(255,181,71,0.08); }

/* ───────── top bar ───────── */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 70;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px var(--gutter);
  background: linear-gradient(to bottom, rgba(7,5,14,0.85), transparent);
}
.logo { display: inline-flex; align-items: center; gap: 10px; font: 800 1.2rem/1 var(--display); font-variation-settings: "wdth" 120; }
.logo-glyph { display: grid; place-items: center; width: 30px; height: 30px; border: 1.5px solid var(--violet); color: var(--amber); font-family: var(--mono); font-size: 1rem; transition: transform 0.4s var(--ease); }
.logo:hover .logo-glyph { transform: rotate(180deg); }
.top-links { display: flex; align-items: center; gap: 22px; font-size: 0.76rem; }
.top-links a:not(.btn):hover { color: var(--amber); }
@media (max-width: 560px) { .top-links a:not(.btn) { display: none; } }

/* ───────── depth shaft nav ───────── */
#shaft { position: fixed; left: 14px; top: 50%; transform: translateY(-50%); z-index: 70; height: min(420px, 62vh); display: none; }
@media (min-width: 1000px) { #shaft { display: block; } }
.shaft-rail { position: absolute; left: 11px; top: 0; bottom: 34px; width: 1px; background: var(--line); }
.shaft-rail i { position: absolute; left: -1px; top: 0; width: 3px; height: 0; background: var(--amber); box-shadow: 0 0 12px var(--amber); }
#shaft ol { list-style: none; height: calc(100% - 34px); display: flex; flex-direction: column; justify-content: space-between; position: relative; }
#shaft a { position: relative; display: flex; align-items: center; width: 24px; height: 24px; justify-content: center; }
#shaft a b { width: 9px; height: 9px; border: 1.5px solid var(--violet); background: var(--void); transform: rotate(45deg); transition: all 0.3s var(--ease); }
#shaft a::after {
  content: attr(data-label); position: absolute; left: 34px; white-space: nowrap; font-size: 0.7rem;
  color: var(--amber); opacity: 0; transform: translateX(-8px); transition: all 0.25s var(--ease); pointer-events: none;
  background: var(--void); padding: 2px 8px; border: 1px solid var(--line-strong);
}
#shaft a:hover::after, #shaft a:focus-visible::after, #shaft a.on::after { opacity: 1; transform: none; }
#shaft a:hover b { background: var(--violet); }
#shaft a.on b { background: var(--amber); border-color: var(--amber); transform: rotate(45deg) scale(1.5); box-shadow: 0 0 14px var(--amber); }
.shaft-depth { position: absolute; bottom: 0; left: 0; font-size: 0.66rem; color: var(--dim); writing-mode: horizontal-tb; display: flex; align-items: baseline; gap: 2px; }
.shaft-depth span { color: var(--bone); font-variant-numeric: tabular-nums; }

.jump {
  position: fixed; right: var(--gutter); bottom: 18px; z-index: 70; display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 14px; background: rgba(16,11,34,0.85); backdrop-filter: blur(8px); border: 1px solid var(--line-strong);
  font-size: 0.72rem; color: var(--dim); transition: all 0.2s;
}
.jump kbd { font-family: var(--mono); color: var(--void); background: var(--amber); padding: 0 7px; font-weight: 700; }
.jump:hover { color: var(--bone); border-color: var(--amber); }
@media (hover: none) { .jump span { display: none; } }

/* ───────── layout ───────── */
.wrap { width: 100%; max-width: 1380px; margin: 0 auto; padding: 0 var(--gutter) 0 calc(var(--gutter) + var(--rail)); }
.floor { padding: clamp(4rem, 10vw, 8rem) 0; position: relative; overflow-x: clip; }
.big {
  font: 900 clamp(2.6rem, 7.5vw, 7.6rem)/0.92 var(--display);
  font-variation-settings: "wdth" 85; letter-spacing: -0.02em; margin: 1.2rem 0 2rem; max-width: 14ch;
  text-wrap: balance;
}
.big.giant { font-size: clamp(4rem, 14vw, 15rem); font-variation-settings: "wdth" 125; max-width: none; color: transparent; -webkit-text-stroke: 2px var(--violet); transition: color 0.4s; }
.big.giant:hover { color: var(--amber); -webkit-text-stroke-color: var(--amber); }
.lede { max-width: 56ch; color: var(--dim); font-size: 0.92rem; margin-bottom: 3rem; }
.prose p { margin-bottom: 1.2em; max-width: 58ch; color: #cfc8e6; }
.prose p.strong { color: var(--bone); border-left: 2px solid var(--amber); padding-left: 16px; }
.wave { color: var(--violet-dim); font-size: 11px; line-height: 1; height: 12px; overflow: hidden; white-space: pre; margin-bottom: 1rem; opacity: 0.9; }

/* ───────── hero ───────── */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; background: var(--void); isolation: isolate; }
#gateCanvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero-shade { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to right, rgba(7,5,14,0.92) 0%, rgba(7,5,14,0.55) 38%, transparent 62%),
    linear-gradient(to top, rgba(7,5,14,0.95) 0%, transparent 38%),
    radial-gradient(ellipse at 66% 46%, transparent 0 22%, rgba(7,5,14,0.5) 80%); }
.hero-main { padding: 0 var(--gutter) 5.5rem calc(var(--gutter) + var(--rail)); max-width: 1380px; width: 100%; margin: 0 auto; }
.wm {
  font: 900 clamp(3.4rem, 13.8vw, 14rem)/0.82 var(--display); white-space: nowrap; letter-spacing: -0.03em;
  display: block; color: var(--bone); margin-bottom: 1.4rem; user-select: none;
  text-shadow: 0 0 60px rgba(143,107,255,0.45);
}
.wm span { display: inline-block; font-variation-settings: "wdth" 80, "wght" 800; will-change: font-variation-settings; }
.wm span:nth-child(5) { margin-left: 0.04em; }
.wm span:nth-child(-n+4) { color: var(--bone); }
.wm span:nth-child(n+5) { color: var(--violet); }
.hero-line { font: 700 clamp(1.1rem, 2.4vw, 1.7rem)/1.2 var(--display); font-variation-settings: "wdth" 110; margin-bottom: 0.6rem; color: var(--amber); }
.hero-lede { max-width: 52ch; color: #cfc8e6; margin-bottom: 1.8rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hud { position: absolute; top: 84px; right: var(--gutter); font-size: 10.5px; line-height: 1.5; color: var(--violet); text-align: right; opacity: 0.85; pointer-events: none; display: none; }
@media (min-width: 900px) { .hud { display: block; } }
.ticker { position: absolute; left: 0; right: 0; bottom: 0; border-top: 1px solid var(--line); background: rgba(7,5,14,0.8); backdrop-filter: blur(4px); overflow: hidden; white-space: nowrap; padding: 9px 0; font-size: 0.72rem; color: var(--dim); }
.ticker-track { display: inline-block; animation: tick 50s linear infinite; padding-left: 100%; }
.ticker-track b { color: var(--amber); font-weight: 600; margin: 0 1.2em; }
@keyframes tick { to { transform: translateX(-100%); } }

/* ───────── threat ───────── */
.threat-grid { display: grid; gap: clamp(2rem, 5vw, 5rem); grid-template-columns: 1fr; }
@media (min-width: 1000px) { .threat-grid { grid-template-columns: 0.8fr 1.2fr; align-items: start; } }
.arena { border: 1px solid var(--line-strong); background: linear-gradient(160deg, var(--abyss), var(--void)); padding: clamp(16px, 2.4vw, 32px); position: relative; }
.arena::before, .arena::after { content: "+"; position: absolute; color: var(--amber); font-size: 14px; }
.arena::before { top: -9px; left: -5px; } .arena::after { bottom: -9px; right: -5px; }
.arena-ctl { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; margin-bottom: 10px; font-size: 0.78rem; color: var(--dim); }
.arena-ctl output { font: 800 2rem/1 var(--display); font-variation-settings: "wdth" 110; color: var(--amber); font-variant-numeric: tabular-nums; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: ew-resize; }
input[type=range]::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(to right, var(--amber) var(--p, 0%), var(--violet-dim) var(--p, 0%)); }
input[type=range]::-moz-range-track { height: 2px; background: var(--violet-dim); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -8px; background: var(--amber); border: 0; transform: rotate(45deg); box-shadow: 0 0 16px var(--amber); }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; background: var(--amber); border: 0; border-radius: 0; transform: rotate(45deg); }
.arena-btns { display: flex; gap: 10px; margin: 12px 0 18px; }
.locks { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 640px) { .locks { grid-template-columns: 1fr 1fr; } }
.locks figure { border: 1px solid var(--line); background: rgba(7,5,14,0.6); padding: 10px; min-width: 0; overflow: hidden; }
.locks pre { font-size: clamp(7.5px, 1.45vw, 11px); line-height: 1.05; color: var(--violet); white-space: pre; min-height: 14.7em; transition: color 0.3s; }
.locks pre.bad { color: var(--alarm); }
.locks pre.good { color: var(--amber); }
.locks figcaption { display: flex; flex-direction: column; gap: 2px; font-size: 0.72rem; padding-top: 8px; border-top: 1px solid var(--line); margin-top: 8px; }
.locks figcaption strong { font-weight: 700; }
.locks figcaption span { color: var(--dim); }
.locks figcaption span.bad { color: var(--alarm); }
.locks figcaption span.good { color: var(--amber); }
.fine { margin-top: 14px; font-size: 0.7rem; color: var(--dim); max-width: 70ch; }

/* ───────── toolkit ───────── */
.tk { display: grid; gap: clamp(1.5rem, 4vw, 4rem); grid-template-columns: 1fr; }
@media (min-width: 1000px) { .tk { grid-template-columns: 1.15fr 0.85fr; align-items: start; } }
.tk-list { border-top: 1px solid var(--line); }
.tk-row {
  position: relative; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; width: 100%; text-align: left;
  padding: 10px 6px 10px 28px; border-bottom: 1px solid var(--line); overflow: hidden; transition: background 0.3s, padding 0.3s var(--ease);
}
.tk-row::before { content: "\2590"; position: absolute; left: 6px; top: 50%; transform: translateY(-50%); color: var(--amber); opacity: 0; font-size: 1.2rem; }
.tk-name { font: 900 clamp(2.2rem, 6vw, 4.8rem)/1 var(--display); font-variation-settings: "wdth" 62, "wght" 700; color: var(--dim); transition: font-variation-settings 0.5s var(--ease), color 0.3s; letter-spacing: -0.015em; }
.tk-tag { font-size: 0.7rem; color: var(--violet-dim); white-space: nowrap; transition: color 0.3s; }
.tk-row:hover .tk-name { color: var(--bone); font-variation-settings: "wdth" 100, "wght" 800; }
.tk-row[aria-selected="true"] { background: linear-gradient(90deg, rgba(143,107,255,0.14), transparent); padding-left: 36px; }
.tk-row[aria-selected="true"]::before { opacity: 1; animation: blink 1s steps(2) infinite; }
.tk-row[aria-selected="true"] .tk-name { color: var(--amber); font-variation-settings: "wdth" 150, "wght" 900; }
.tk-row[aria-selected="true"] .tk-tag { color: var(--amber); }
@keyframes blink { 50% { opacity: 0; } }
.tk-panel { position: sticky; top: 84px; border: 1px solid var(--line-strong); background: linear-gradient(170deg, var(--abyss), var(--void)); padding: 0 0 22px; min-width: 0; }
.tk-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 0.7rem; color: var(--dim); }
.tk-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--violet-dim); }
.tk-bar i:first-child { background: var(--amber); }
.tk-bar span { margin-left: 8px; }
.tk-icon { color: var(--violet); font-size: clamp(10px, 1.5vw, 14px); line-height: 1.15; padding: 22px 22px 10px; min-height: 12.5em; text-shadow: 0 0 18px rgba(143,107,255,0.5); }
.tk-panel h3 { font: 900 2rem/1 var(--display); font-variation-settings: "wdth" 120; padding: 0 22px; margin-bottom: 8px; }
.tk-panel > p { padding: 0 22px; color: #cfc8e6; margin-bottom: 14px; font-size: 0.8rem; }
.tk-panel ul { list-style: none; padding: 0 22px; margin-bottom: 16px; font-size: 0.76rem; }
.tk-panel li { padding-left: 18px; position: relative; color: var(--dim); }
.tk-panel li::before { content: "+"; position: absolute; left: 0; color: var(--amber); }
.install { display: flex; justify-content: space-between; gap: 12px; width: calc(100% - 44px); margin: 0 22px 12px; padding: 10px 12px; border: 1px dashed var(--line-strong); font-family: var(--art); font-size: 0.74rem; text-align: left; overflow: hidden; }
.install em { font-style: normal; color: var(--amber); font-family: var(--mono); }
.install:hover { border-style: solid; border-color: var(--amber); }
.code { margin: 0 22px; padding: 14px; background: var(--void); border: 1px solid var(--line); font-size: 0.72rem; line-height: 1.6; color: #cfc8e6; overflow-x: auto; min-height: 9.5em; white-space: pre; }
.code .k { color: var(--violet); } .code .s { color: var(--amber); } .code .c { color: var(--dim); }

/* ───────── workbench ───────── */
.bench { border: 1px solid var(--line-strong); background: linear-gradient(170deg, var(--abyss), var(--void)); }
.bench-tabs { display: flex; border-bottom: 1px solid var(--line-strong); overflow-x: auto; }
.bench-tabs button { padding: 16px 26px; font-weight: 700; font-size: 0.8rem; color: var(--dim); border-right: 1px solid var(--line); white-space: nowrap; transition: all 0.2s; }
.bench-tabs button:hover { color: var(--bone); background: rgba(143,107,255,0.08); }
.bench-tabs button[aria-selected="true"] { color: var(--void); background: var(--amber); }
.pane { display: grid; grid-template-columns: 1fr; gap: 0; }
@media (min-width: 900px) { .pane { grid-template-columns: 0.85fr 1.15fr; } .pane-l { border-right: 1px solid var(--line); } }
.pane-l, .pane-r { padding: clamp(18px, 2.6vw, 34px); min-width: 0; }
.pane-l > * + * { margin-top: 18px; }
fieldset.schemes { border: 0; display: grid; gap: 8px; }
fieldset.schemes legend { color: var(--dim); margin-bottom: 8px; font-size: 0.76rem; }
.schemes label { display: block; cursor: pointer; }
.schemes input { position: absolute; opacity: 0; }
.schemes label span { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); font-weight: 700; transition: all 0.2s; }
.schemes small { font-weight: 400; color: var(--dim); font-size: 0.68rem; text-align: right; }
.schemes input:checked + span { border-color: var(--amber); background: rgba(255,181,71,0.09); box-shadow: inset 3px 0 0 var(--amber); }
.schemes input:focus-visible + span { outline: 2px solid var(--amber); outline-offset: 2px; }
.schemes label:hover span { border-color: var(--violet); }
.sizes { display: grid; gap: 8px; font-size: 0.72rem; }
.size-row { display: grid; grid-template-columns: 92px 1fr auto; gap: 10px; align-items: center; }
.size-row .track { height: 10px; background: var(--deep); position: relative; }
.size-row .fill { position: absolute; inset: 0 auto 0 0; background: var(--violet); transition: width 0.7s var(--ease); }
.size-row .fill.hot { background: var(--amber); }
.size-row b { font-weight: 600; font-variant-numeric: tabular-nums; }
.viz { font-size: clamp(9px, 1.5vw, 12.5px); line-height: 1.1; color: var(--violet); min-height: 15em; overflow: hidden; }
.viz .hl { color: var(--amber); }
.out { display: grid; gap: 6px; margin-top: 12px; }
.out-label { color: var(--dim); font-size: 0.72rem; }
.out code { display: block; word-break: break-all; font-size: 0.74rem; line-height: 1.5; color: var(--bone); background: var(--void); border: 1px solid var(--line); padding: 12px; min-height: 5.6em; }
.verdict { font-size: 0.76rem; min-height: 1.6em; }
.verdict.bad { color: var(--alarm); } .verdict.good { color: var(--amber); }

#scanForm label { display: block; margin-bottom: 8px; color: var(--dim); font-size: 0.76rem; }
#scanForm input, .draw { width: 100%; background: var(--void); border: 1px solid var(--line-strong); color: var(--bone); padding: 14px; font: 500 0.78rem var(--art); }
#scanForm input:focus { border-color: var(--amber); outline: none; box-shadow: 0 0 0 3px rgba(255,181,71,0.2); }
#scanForm .row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.err { color: var(--alarm); min-height: 1.5em; font-size: 0.74rem; margin-top: 10px; }
.log { font-size: 0.74rem; line-height: 1.7; color: var(--violet); white-space: pre-wrap; min-height: 9em; }
.report { margin-top: 14px; border-top: 1px solid var(--line-strong); padding-top: 16px; display: grid; gap: 12px; }
.report .score { display: flex; align-items: baseline; gap: 14px; }
.report .score strong { font: 900 4.6rem/0.9 var(--display); font-variation-settings: "wdth" 120; }
.report .score span { color: var(--dim); max-width: 22ch; font-size: 0.74rem; }
.report.crit strong { color: var(--alarm); } .report.high strong { color: var(--amber); } .report.low strong { color: var(--violet); }
.report dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; font-size: 0.76rem; }
.report dt { color: var(--dim); } .report dd { font-weight: 600; text-align: right; }
.report p { font-size: 0.76rem; color: #cfc8e6; border-left: 2px solid var(--amber); padding-left: 12px; }
.prose-sm { color: #cfc8e6; max-width: 40ch; }
.draw { display: block; word-break: break-all; line-height: 1.5; min-height: 5.6em; font-size: 0.74rem; }
#beaconCanvas { width: 100%; height: 180px; display: block; background: var(--void); border: 1px solid var(--line); }
.stream { margin-top: 12px; height: 6.4em; overflow: hidden; font-size: 0.7rem; line-height: 1.6; color: var(--violet-dim); }

/* ───────── null ───────── */
.nl { display: grid; gap: clamp(1.5rem, 4vw, 4rem); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 1000px) { .nl { grid-template-columns: 1.1fr 0.9fr; } }
.nl-stage { position: relative; display: grid; place-items: center; padding: 70px 10px 20px; border: 1px solid var(--line); background:
  radial-gradient(ellipse at 50% 60%, rgba(143,107,255,0.16), transparent 65%), repeating-linear-gradient(0deg, transparent 0 23px, rgba(143,107,255,0.05) 23px 24px); overflow: hidden; }
.nl-art { font-size: clamp(8.5px, 2.35vw, 17px); line-height: 1.12; color: var(--violet); cursor: pointer; user-select: none; text-shadow: 0 0 22px rgba(143,107,255,0.55); animation: float 5s ease-in-out infinite; transition: color 0.3s, text-shadow 0.3s; }
.nl-art .e { color: var(--amber); text-shadow: 0 0 12px var(--amber); }
.nl-art .sh { color: var(--violet-dim); text-shadow: none; }
.nl-art .z { color: var(--dim); }
.nl-art.happy { color: var(--amber); text-shadow: 0 0 26px rgba(255,181,71,0.55); }
.nl-art.happy .e { color: var(--bone); }
.nl-art.angry { color: var(--alarm); text-shadow: 0 0 26px rgba(255,92,122,0.6); animation: float 5s ease-in-out infinite, shake 0.12s linear infinite; }
.nl-art.angry .e { color: var(--bone); }
.nl-art.poked { animation: float 5s ease-in-out infinite, jolt 0.35s var(--ease); }
@keyframes float { 50% { transform: translateY(-10px); } }
@keyframes shake { 25% { translate: -3px 1px; } 75% { translate: 3px -1px; } }
@keyframes jolt { 30% { scale: 1.06 0.94; } 60% { scale: 0.97 1.04; } }
.bubble { position: absolute; top: 14px; left: 14px; right: 14px; max-width: 460px; padding: 12px 16px; background: var(--bone); color: var(--void); font-size: 0.78rem; line-height: 1.55; font-weight: 500; z-index: 3; min-height: 3.4em; }
.bubble::after { content: ""; position: absolute; left: 44px; bottom: -10px; border: 10px solid transparent; border-top-color: var(--bone); border-bottom: 0; }
.coin { position: absolute; z-index: 4; font: 900 1.6rem/1 var(--display); color: var(--amber); text-shadow: 0 0 14px var(--amber); pointer-events: none; }
.nl-stats { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line-strong); }
.nl-stats div { padding: 14px; border-right: 1px solid var(--line); }
.nl-stats div:last-child { border: 0; }
.nl-stats span { display: block; font: 900 1.8rem/1 var(--display); font-variation-settings: "wdth" 110; color: var(--amber); font-variant-numeric: tabular-nums; }
.nl-stats small { color: var(--dim); font-size: 0.68rem; }
.nl-side > * + * { margin-top: 18px; }
.nl-actions, .nl-chips { display: flex; flex-wrap: wrap; gap: 10px; }

/* ───────── token ───────── */
.tok { display: grid; gap: 2.4rem; max-width: 980px; }
.bar { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 720px) { .bar { grid-template-columns: 230px 1fr 60px; gap: 18px; align-items: center; } }
.bar span { color: var(--dim); font-size: 0.76rem; }
.bar pre { color: var(--violet); font-size: clamp(8px, 1.6vw, 13px); line-height: 1; white-space: pre; overflow: hidden; }
.bar b { font: 800 1.1rem var(--display); color: var(--amber); text-align: right; font-variation-settings: "wdth" 110; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.facts div { background: var(--void); padding: 16px; }
.facts dt { color: var(--dim); font-size: 0.7rem; }
.facts dd { font-weight: 700; margin-top: 2px; }
.ca { display: grid; gap: 6px; }
.ca-label { color: var(--dim); font-size: 0.72rem; }
.ca-box { display: flex; justify-content: space-between; align-items: center; gap: 14px; text-align: left; padding: 16px 18px; border: 1.5px dashed var(--violet); background: var(--abyss); transition: all 0.2s; }
.ca-box code { word-break: break-all; font-size: 0.82rem; }
.ca-box em { font-style: normal; color: var(--amber); font-weight: 700; }
.ca-box:hover { border-color: var(--amber); border-style: solid; background: rgba(255,181,71,0.07); }
.steps { list-style: none; counter-reset: s; display: grid; gap: 0; border-left: 1px solid var(--line-strong); }
.steps li { counter-increment: s; padding: 12px 0 12px 54px; position: relative; color: var(--dim); max-width: 64ch; }
.steps li::before { content: counter(s); position: absolute; left: -15px; top: 10px; width: 29px; height: 29px; display: grid; place-items: center; background: var(--void); border: 1.5px solid var(--amber); color: var(--amber); font-weight: 700; transform: rotate(45deg); }
.steps li::after { content: counter(s); position: absolute; left: -15px; top: 10px; width: 29px; height: 29px; display: grid; place-items: center; color: var(--amber); font-weight: 700; }
.steps li::before { content: ""; }
.steps strong { color: var(--bone); }
.tok .btn-lg { justify-self: start; }

/* ───────── creed ───────── */
.creed { padding: clamp(5rem, 14vw, 12rem) var(--gutter) clamp(5rem, 14vw, 12rem) calc(var(--gutter) + var(--rail)); position: relative; overflow: hidden; background: radial-gradient(ellipse at 20% 50%, var(--deep), var(--void) 70%); }
.creed-lines { max-width: 1380px; margin: 0 auto; }
.cl { font: 900 clamp(2.4rem, 8.2vw, 9rem)/1 var(--display); font-variation-settings: "wdth" 70; letter-spacing: -0.025em; margin: 0.12em 0; color: var(--bone); opacity: 0.2; white-space: nowrap; transition: color 0.3s; }
.cl.amber { color: var(--amber); }
@media (max-width: 700px) { .cl { white-space: normal; } }

/* ───────── footer ───────── */
.foot { border-top: 1px solid var(--line); padding: 3rem var(--gutter) 5rem calc(var(--gutter) + var(--rail)); background: var(--void); }
.foot-art { font-size: calc((100vw - 2 * var(--gutter) - var(--rail)) / 43); line-height: 1; color: var(--violet); white-space: pre; margin-bottom: 2.4rem; max-width: 100%; overflow: hidden; text-shadow: 0 0 30px rgba(143,107,255,0.4); }
.foot-art .a { color: var(--amber); }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px 40px; color: var(--dim); font-size: 0.72rem; }
.foot-row nav { display: flex; gap: 24px; flex-wrap: wrap; color: var(--bone); }
.foot-row nav a:hover { color: var(--amber); }
.foot-row p { max-width: 60ch; }

/* ───────── palette ───────── */
dialog#palette { margin: 12vh auto auto; width: min(620px, calc(100% - 28px)); background: var(--abyss); color: var(--bone); border: 1.5px solid var(--amber); padding: 0; box-shadow: 8px 8px 0 var(--violet), 0 40px 120px rgba(0,0,0,0.8); }
dialog#palette::backdrop { background: rgba(7,5,14,0.8); backdrop-filter: blur(6px); }
.pal-in { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line-strong); }
.pal-in span { color: var(--amber); font-weight: 700; }
.pal-in input { flex: 1; background: none; border: 0; color: var(--bone); font: 500 0.95rem var(--mono); outline: none; }
#palList { list-style: none; max-height: 46vh; overflow-y: auto; }
#palList li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 18px; cursor: pointer; border-left: 3px solid transparent; }
#palList li small { color: var(--dim); }
#palList li[aria-selected="true"] { background: rgba(255,181,71,0.12); border-left-color: var(--amber); }
.pal-hint { padding: 10px 18px; border-top: 1px solid var(--line); color: var(--dim); font-size: 0.68rem; }

#toast { position: fixed; left: 50%; bottom: 70px; transform: translate(-50%, 20px); background: var(--amber); color: var(--void); padding: 10px 18px; font-weight: 700; font-size: 0.78rem; opacity: 0; pointer-events: none; transition: all 0.3s var(--ease); z-index: 250; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }

#trail { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 80; pointer-events: none; }

html[data-calm] *, html[data-calm] *::before, html[data-calm] *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
