:root {
  --bg: #04060B;
  --bg-2: #080B12;
  --card: rgba(14, 19, 29, 0.74);
  --card-solid: #0E131D;
  --card-2: rgba(22, 29, 42, 0.8);
  --card-3: #1A2230;
  --hover: #222B3B;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);
  --text: #EEF2F9;
  --text-2: #A9B3C6;
  --muted: #76829A;
  --accent: #5B8CFF;
  --accent-2: #8E63FF;
  --accent-soft: rgba(91, 140, 255, 0.14);
  --green: #2BEA8F;
  --green-soft: rgba(43, 234, 143, 0.13);
  --amber: #FFB547;
  --amber-soft: rgba(255, 181, 71, 0.13);
  --red: #FF5C6C;
  --red-soft: rgba(255, 92, 108, 0.13);
  --grad: linear-gradient(135deg, #5B8CFF 0%, #8E63FF 100%);
  --r: 22px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
  --p: 0; /* scroll progress past the hero, set by ui.js */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 120px; -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; font: 400 14px/1.5 var(--sans); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.hidden { display: none !important; }
.hl { color: var(--accent); font-weight: 600; }
.ic { flex: none; display: block; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex: none; }
.dot.live { animation: pulse 2s infinite; }

/* ================= 3D world layers ================= */
#scene { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; outline: none; }
.shade { position: fixed; inset: 0; z-index: 1; pointer-events: none; transition: opacity .25s linear; }
.shade-hero {
  opacity: calc(1 - var(--p));
  background:
    linear-gradient(90deg, rgba(4,6,11,.94) 0%, rgba(4,6,11,.78) 26%, rgba(4,6,11,.25) 52%, rgba(4,6,11,0) 64%),
    linear-gradient(0deg, rgba(4,6,11,.85) 0%, rgba(4,6,11,0) 22%),
    linear-gradient(180deg, rgba(4,6,11,.7) 0%, rgba(4,6,11,0) 18%);
}
.shade-content {
  opacity: var(--p);
  background:
    radial-gradient(120% 90% at 50% 40%, rgba(4,6,11,.35) 0%, rgba(4,6,11,.75) 70%, rgba(4,6,11,.92) 100%);
}
body[data-section="room"] .shade-content { opacity: calc(var(--p) * .55); }
.pins { position: fixed; inset: 0; z-index: 2; pointer-events: none; }
.cursor-glow {
  position: fixed; left: 0; top: 0; z-index: 2; width: 560px; height: 560px; margin: -280px 0 0 -280px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(91,140,255,.10), rgba(142,99,255,.04) 50%, transparent 70%);
  mix-blend-mode: screen; opacity: 0; transition: opacity .4s;
}
body.has-mouse .cursor-glow { opacity: 1; }
body.rack-hover { cursor: pointer; }
.hero-fallback { display: none; }

/* ================= boot ================= */
.boot { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: var(--bg); transition: opacity .9s ease, visibility .9s; }
.boot.done { opacity: 0; visibility: hidden; }
.boot-in { display: flex; flex-direction: column; align-items: center; gap: 14px; width: min(340px, 80vw); }
.boot-in img { border-radius: 14px; animation: bootPulse 1.4s ease-in-out infinite; box-shadow: 0 10px 40px -8px rgba(91,140,255,.8); }
.boot-title { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.boot-title b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.boot-lines { width: 100%; min-height: 66px; font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.boot-lines div::before { content: "› "; color: var(--accent); }
.boot-lines div.ok::after { content: " ok"; color: var(--green); }
.boot-bar { width: 100%; height: 3px; border-radius: 99px; background: var(--card-3); overflow: hidden; }
.boot-bar i { display: block; height: 100%; width: 0; background: var(--grad); box-shadow: 0 0 12px rgba(91,140,255,.8); transition: width .3s ease; }

/* ================= buttons / chips ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .2s, box-shadow .2s, filter .15s;
}
.btn:active:not(:disabled) { transform: translateY(1px) scale(.99); }
.btn-lg { height: 52px; padding: 0 24px; font-size: 15.5px; }
.btn-xl { width: 100%; height: 56px; font-size: 16px; border-radius: 16px; margin-top: 18px; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 34px -8px rgba(91, 140, 255, .75), inset 0 1px 0 rgba(255,255,255,.25); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.1); box-shadow: 0 14px 44px -8px rgba(110, 120, 255, .95), inset 0 1px 0 rgba(255,255,255,.25); }
.btn-primary:disabled { background: var(--card-3); color: var(--muted); box-shadow: none; cursor: not-allowed; border-color: var(--line); }
.btn-secondary { background: var(--card-3); border-color: var(--line); color: var(--text); }
.btn-secondary:hover { background: var(--hover); border-color: var(--line-2); }
.btn-glass { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); color: var(--text); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.btn-glass:hover { background: rgba(255,255,255,.11); border-color: rgba(255,255,255,.24); }
.btn-buy { background: var(--grad); color: #fff; box-shadow: 0 6px 22px -8px rgba(91,140,255,.85); }
.btn-buy:hover { filter: brightness(1.1); }
.icon-btn { width: 32px; height: 32px; border-radius: 10px; flex: none; display: inline-grid; place-items: center; cursor: pointer; background: var(--card-3); border: 1px solid var(--line); color: var(--text-2); transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn.round { width: 38px; height: 38px; border-radius: 999px; background: rgba(20,27,39,.8); }
.link-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--accent); font-size: 12px; font-weight: 600; cursor: pointer; padding: 0; }
.link-btn:hover { color: #8FB0FF; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); color: var(--text-2); font-size: 12.5px; font-weight: 500; white-space: nowrap; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.chip-live { color: var(--green); background: var(--green-soft); border-color: rgba(43,234,143,.22); }
.small-chip { height: 24px; padding: 0 10px; font-size: 11.5px; }
kbd { font: 500 11px var(--mono); color: var(--muted); border: 1px solid var(--line-2); border-radius: 6px; padding: 1px 7px; }
#soundBtn .snd-on { display: none; }
body.sound #soundBtn .snd-on { display: block; color: var(--accent); }
body.sound #soundBtn .snd-off { display: none; }

/* ================= top bar ================= */
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 40; background: linear-gradient(180deg, rgba(4,6,11,.82), rgba(4,6,11,.55)); backdrop-filter: saturate(150%) blur(16px); -webkit-backdrop-filter: saturate(150%) blur(16px); border-bottom: 1px solid var(--line); transition: opacity .5s, transform .5s; }
.top-in { max-width: 1440px; margin: 0 auto; height: 64px; padding: 0 24px; display: flex; align-items: center; gap: 10px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand img { border-radius: 9px; box-shadow: 0 4px 18px -4px rgba(91,140,255,.7); }
.brand-word { font-weight: 800; font-size: 18px; letter-spacing: -0.03em; }
.brand-word b { font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-pills { display: flex; gap: 2px; margin-left: 18px; }
.nav-pills a { padding: 8px 14px; border-radius: 999px; color: var(--text-2); font-weight: 500; transition: background .15s, color .15s; }
.nav-pills a:hover { background: rgba(255,255,255,.06); color: var(--text); }
.nav-ticker { color: var(--accent) !important; font-weight: 600 !important; }
.search { flex: 1; max-width: 380px; margin-left: auto; height: 40px; padding: 0 8px 0 14px; display: flex; align-items: center; gap: 10px; border-radius: 999px; background: rgba(20,27,39,.75); border: 1px solid var(--line); color: var(--muted); transition: border-color .15s, background .15s; }
.search:focus-within { border-color: rgba(91,140,255,.55); background: rgba(26,34,48,.9); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); font-size: 14px; }
.search input::placeholder { color: var(--muted); }
.search-toggle { display: none; }
.sol-chip { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 13px; border-radius: 999px; background: rgba(20,27,39,.8); border: 1px solid var(--line); font-weight: 600; font-size: 13px; flex: none; }

.ticker { max-width: 1440px; margin: 0 auto; height: 40px; padding: 0 24px; display: flex; align-items: center; gap: 14px; border-top: 1px solid var(--line); font-size: 12.5px; }
.ticker-label { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-weight: 600; flex: none; }
.ticker-track { flex: 1; min-width: 0; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 3%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 92%, transparent); }
.ticker-run { display: flex; gap: 8px; width: max-content; }
.tk { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 11px 0 4px; border-radius: 999px; background: rgba(14,19,29,.85); border: 1px solid var(--line); white-space: nowrap; }
.tk.fresh { animation: tkIn .5s ease-out; border-color: rgba(43,234,143,.4); box-shadow: 0 0 18px -6px rgba(43,234,143,.6); }
.tk-ic { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green); }
.tk-pat { font-family: var(--mono); font-weight: 700; color: var(--text); }
.tk-pat em { font-style: normal; color: var(--green); }
.tk-meta { color: var(--muted); }

/* ================= HUD ================= */
.hud { position: fixed; right: 22px; top: 50%; transform: translateY(-50%); z-index: 30; display: flex; flex-direction: column; gap: 14px; transition: opacity .5s; }
.hud a { position: relative; display: block; width: 10px; height: 10px; border-radius: 99px; background: rgba(255,255,255,.18); transition: height .3s, background .3s; }
.hud a span { position: absolute; right: 20px; top: 50%; transform: translate(6px, -50%); white-space: nowrap; font-size: 11.5px; font-weight: 600; color: var(--text-2); opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none; padding: 4px 9px; border-radius: 8px; background: rgba(14,19,29,.85); border: 1px solid var(--line); }
.hud a:hover span, .hud a.active span { opacity: 1; transform: translate(0, -50%); }
.hud a.active { height: 28px; background: var(--grad); box-shadow: 0 0 14px rgba(91,140,255,.8); }

/* ================= layout ================= */
.wrap { position: relative; z-index: 3; max-width: 1440px; margin: 0 auto; padding: 0 24px 40px; pointer-events: none; }
.wrap > section > *, .wrap > .stat-row > * { pointer-events: auto; }
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(22,29,43,.72), rgba(11,15,24,.8));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--r);
  backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 30px 70px -30px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.06);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-head h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; }
.card-head h3 .ic { color: var(--accent); }
.module { margin-top: 120px; }
.module-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.kicker { display: inline-block; margin-bottom: 10px; font: 600 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.module-head h2 { font-size: clamp(32px, 4vw, 54px); font-weight: 900; letter-spacing: -0.045em; line-height: 1.02; text-shadow: 0 4px 30px rgba(0,0,0,.6); }
.module-head p { margin: 12px 0 0; color: var(--text-2); max-width: 640px; font-size: 16px; text-shadow: 0 2px 16px rgba(0,0,0,.8); }
.head-chips { display: flex; gap: 8px; flex: none; }
.found-word { color: var(--green); font-family: var(--mono); letter-spacing: .04em; }

/* tilt + glare */
.tilt { transform-style: preserve-3d; will-change: transform; transition: transform .35s cubic-bezier(.2,.8,.2,1), border-color .3s, box-shadow .3s; }
.tilt::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,.09), transparent 45%); }
.tilt:hover::after { opacity: 1; }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .9s ease, transform 1s cubic-bezier(.2,.8,.2,1); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.stat-row.reveal { opacity: 1; transform: none; }
.stat-row.reveal > * { opacity: 0; transform: translateY(30px); transition: opacity .8s, transform .9s cubic-bezier(.2,.8,.2,1); }
.stat-row.reveal.in > * { opacity: 1; transform: none; }
.stat-row.reveal.in > *:nth-child(2) { transition-delay: .08s; }
.stat-row.reveal.in > *:nth-child(3) { transition-delay: .16s; }
.stat-row.reveal.in > *:nth-child(4) { transition-delay: .24s; }

/* ================= hero ================= */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 120px 0 90px; }
.hero-copy { position: relative; z-index: 2; max-width: 620px; display: flex; flex-direction: column; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; align-self: flex-start; height: 34px; padding: 0 14px; border-radius: 999px; background: rgba(20,27,39,.7); border: 1px solid var(--line); color: var(--text-2); font-size: 12.5px; font-weight: 500; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.eyebrow .sep { width: 1px; height: 14px; background: var(--line-2); }
.demo-chip { margin-left: 4px; padding: 2px 8px; border-radius: 999px; background: var(--amber-soft); color: var(--amber); font-size: 11px; font-weight: 600; }
.hero h1 { margin-top: 26px; font-size: clamp(44px, 6.3vw, 94px); line-height: .95; font-weight: 900; letter-spacing: -0.055em; text-shadow: 0 6px 40px rgba(0,0,0,.55); }
.h1-line { display: block; }
.grad { display: inline-block; padding-bottom: .06em; background: linear-gradient(92deg, #8FB2FF 0%, #5B8CFF 30%, #A07BFF 60%, #D2A6FF 80%, #8FB2FF 100%); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 7s linear infinite; filter: drop-shadow(0 6px 30px rgba(91,140,255,.35)); }
.lead { margin: 22px 0 32px; color: var(--text-2); font-size: 18px; line-height: 1.6; max-width: 520px; text-shadow: 0 2px 20px rgba(0,0,0,.8); }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.ca-row { display: flex; align-items: center; gap: 10px; margin-top: 26px; max-width: 470px; padding: 6px 6px 6px 8px; border-radius: 14px; background: rgba(4,6,11,.6); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.ca-tag { padding: 3px 8px; border-radius: 7px; background: var(--accent-soft); color: var(--accent); font: 700 11px var(--mono); }
.ca-row code { flex: 1; min-width: 0; font: 500 13px var(--mono); color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.float { position: absolute; z-index: 2; border-radius: 16px; padding: 12px 14px; background: rgba(14,19,29,.78); border: 1px solid var(--line-2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 18px 44px rgba(0,0,0,.5); }
.float-grind { right: 6%; bottom: 13%; width: 248px; }
.float-head { display: flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 10.5px; font-weight: 700; letter-spacing: .09em; color: var(--text-2); }
.float-rack { margin-left: auto; font-family: var(--mono); color: var(--accent); letter-spacing: 0; font-size: 11px; }
.fg-body { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.ring { width: 44px; height: 44px; flex: none; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 4; }
.ring-bg { stroke: var(--card-3); }
.ring-fg { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 113.1; stroke-dashoffset: 113.1; transition: stroke-dashoffset .3s linear; }
.fg-pat { font-size: 19px; font-weight: 700; }
.fg-pat em, .pat em { font-style: normal; color: var(--accent); }
.fg-meta { font-size: 12px; color: var(--muted); margin-top: 1px; font-variant-numeric: tabular-nums; }
.float-found { right: 4%; top: 21%; display: flex; align-items: center; gap: 12px; max-width: 300px; border-color: rgba(43,234,143,.4); opacity: 0; transform: translateY(-8px) scale(.97); transition: opacity .35s, transform .35s; }
.float-found.show { opacity: 1; transform: none; box-shadow: 0 18px 44px rgba(0,0,0,.5), 0 0 40px -10px rgba(43,234,143,.5); }
.ff-icon { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); flex: none; }
.ff-title { font-size: 12px; font-weight: 700; color: var(--green); }
.ff-addr { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.ff-addr em { font-style: normal; color: var(--green); font-weight: 700; }

.scroll-cue { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--text-2); font-size: 12px; font-weight: 500; letter-spacing: .02em; }
.mouse { width: 22px; height: 34px; border-radius: 12px; border: 1.5px solid rgba(255,255,255,.35); display: flex; justify-content: center; padding-top: 6px; }
.mouse i { width: 3px; height: 7px; border-radius: 3px; background: #fff; animation: wheel 1.8s ease-in-out infinite; }

/* hall SVG fallback (no WebGL) */
body.no-webgl #scene, body.no-webgl .shade-hero, body.no-webgl .pins, body.no-webgl #exploreBtn, body.no-webgl #exploreBtnM { display: none; }
body.no-webgl .hero-fallback { display: flex; position: absolute; right: 0; top: 120px; bottom: 60px; width: 52%; align-items: center; }
body.no-webgl .hero-copy { max-width: 46%; }
.hall-glow { position: absolute; inset: 10% 5% 0 5%; background: radial-gradient(closest-side, rgba(91,140,255,.18), transparent); filter: blur(20px); }
#hall { position: relative; width: 100%; height: 100%; overflow: visible; }
.h-led { fill: #16301F; transition: fill .12s; }
.h-led.on { fill: var(--green); }
.h-led.b.on { fill: #7FA6FF; }
.h-label { font: 700 10px var(--mono); fill: rgba(233,237,245,.35); }
.h-wash { fill: var(--green); opacity: 0; transition: opacity .5s; }
.h-beam { opacity: 0; transition: opacity .5s; }
.h-rack.found .h-wash { opacity: .16; }
.h-rack.found .h-beam { opacity: 1; }
.h-rack.focus .h-top { stroke: var(--accent); stroke-width: 1.6; }
.h-data { stroke: var(--accent); stroke-dasharray: 3 26; animation: flow 1.6s linear infinite; }
.h-data.rev { stroke: var(--accent-2); animation-direction: reverse; }

/* ================= pins over racks ================= */
.pin { position: absolute; left: 0; top: 0; width: 0; height: 0; padding: 0; border: 0; background: none; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .35s; will-change: transform; }
.pin.on { opacity: 1; pointer-events: auto; }
.pin-dot { position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(91,140,255,.25), 0 0 18px rgba(91,140,255,.9); animation: pinPulse 2s infinite; }
.pin::before { content: ""; position: absolute; left: -0.5px; bottom: 6px; width: 1px; height: 18px; background: linear-gradient(0deg, rgba(91,140,255,.8), transparent); }
.pin-card { position: absolute; left: 0; bottom: 24px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; white-space: nowrap; font: 600 11.5px var(--mono); color: var(--text); background: rgba(10,14,22,.82); border: 1px solid rgba(91,140,255,.35); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgba(0,0,0,.5); transition: border-color .2s, transform .2s; }
.pin:hover .pin-card, .pin.sel .pin-card { border-color: var(--accent); transform: translateX(-50%) translateY(-3px) scale(1.06); }
.pin-card b { color: var(--accent); font-weight: 700; }
.pin-pat em { font-style: normal; color: #9DB9FF; }
.pin-pct { color: var(--muted); }
.pin.found .pin-dot { background: var(--green); box-shadow: 0 0 0 4px rgba(43,234,143,.25), 0 0 22px rgba(43,234,143,1); }
.pin.found .pin-card { border-color: rgba(43,234,143,.6); box-shadow: 0 0 30px -6px rgba(43,234,143,.7); }
.pin.found .pin-card b, .pin.found .pin-pct { color: var(--green); }
.pin:not(:hover):not(.sel):not(.found):not(.feat) .pin-pat, .pin:not(:hover):not(.sel):not(.found):not(.feat) .pin-pct { display: none; }
.pin:hover, .pin.sel, .pin.found, .pin.feat { z-index: 2; }
.pin.feat .pin-card { border-color: var(--accent); box-shadow: 0 0 30px -6px rgba(91,140,255,.8); }

/* ================= explore mode ================= */
.explore-bar { position: fixed; left: 50%; top: 18px; z-index: 45; transform: translate(-50%, -140%); transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.eb-in { display: flex; align-items: center; gap: 18px; padding: 8px 8px 8px 18px; border-radius: 999px; background: rgba(12,17,26,.82); border: 1px solid var(--line-2); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 20px 50px rgba(0,0,0,.5); }
.eb-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; white-space: nowrap; }
.eb-hint { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
body.exploring .explore-bar { transform: translate(-50%, 0); }
.eb-walk { display: inline-flex; gap: 6px; }
#walkFwd .ic { transform: rotate(180deg); }
body.exploring #scene { cursor: grab; }
body.exploring #scene:active { cursor: grabbing; }
body.exploring .wrap, body.exploring .foot, body.exploring .top, body.exploring .hud, body.exploring .bottom-nav, body.exploring .shade { opacity: 0; pointer-events: none !important; }
body.exploring .wrap *, body.exploring .top * { pointer-events: none !important; }
.wrap, .foot, .hud, .bottom-nav { transition: opacity .6s ease; }

/* ================= rack panel ================= */
.rack-panel { position: fixed; z-index: 50; right: 16px; top: 120px; bottom: 16px; width: 390px; overflow-y: auto; padding: 22px; border-radius: 24px; background: linear-gradient(180deg, rgba(20,27,40,.86), rgba(9,13,20,.92)); border: 1px solid var(--line-2); backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%); box-shadow: 0 30px 80px rgba(0,0,0,.6); transform: translateX(calc(100% + 40px)); transition: transform .55s cubic-bezier(.2,.8,.2,1); }
.rack-panel.open { transform: none; }
body.exploring .rack-panel { top: 84px; }
.rp-close { position: absolute; top: 16px; right: 16px; }
.rp-kicker { font: 600 11px var(--mono); letter-spacing: .1em; color: var(--accent); text-transform: uppercase; }
.rp-title { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.rp-title h3 { font-size: 26px; font-weight: 900; letter-spacing: -0.04em; }
.rp-sub { color: var(--text-2); font-size: 13px; margin-top: 2px; }
.rp-status { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-size: 11.5px; font-weight: 700; }
.rp-status .dot { background: currentColor; }
.rp-status.found { background: var(--green-soft); color: var(--green); }
.rp-status.standby { background: var(--amber-soft); color: var(--amber); }
.rp-job { margin-top: 18px; padding: 16px; border-radius: 18px; background: rgba(4,6,11,.55); border: 1px solid var(--line); display: flex; align-items: center; gap: 16px; }
.rp-ring { position: relative; width: 84px; height: 84px; flex: none; }
.rp-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.rp-ring circle { fill: none; stroke-width: 6; }
.rp-ring .rb { stroke: var(--card-3); }
.rp-ring .rf { stroke: url(#rkGrad); stroke-linecap: round; stroke-dasharray: 226.2; transition: stroke-dashoffset .3s linear; }
.rp-ring b { position: absolute; inset: 0; display: grid; place-items: center; font: 700 16px var(--mono); }
.rp-pat { font: 700 26px var(--mono); }
.rp-pat em { font-style: normal; color: var(--accent); }
.rp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.rp-grid > div { padding: 12px; border-radius: 14px; background: rgba(4,6,11,.45); border: 1px solid var(--line); }
.rp-grid span { display: block; color: var(--muted); font-size: 11.5px; }
.rp-grid b { display: block; font: 700 15px var(--mono); margin-top: 2px; font-variant-numeric: tabular-nums; }
.rp-sec { margin-top: 18px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.rp-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.rp-list li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 12px; background: rgba(4,6,11,.45); border: 1px solid var(--line); font: 500 12px var(--mono); color: var(--text-2); }
.rp-list li em { font-style: normal; color: var(--green); font-weight: 700; }
.rp-note { margin-top: 16px; padding: 14px; border-radius: 14px; background: var(--amber-soft); color: var(--text-2); font-size: 13px; line-height: 1.55; }
.rp-cta { margin-top: 18px; width: 100%; }

/* ================= stats ================= */
.stat-row { position: relative; z-index: 3; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: -40px; }
.stat { display: flex; align-items: center; gap: 16px; padding: 22px; min-width: 0; }
.stat > div:last-child { min-width: 0; }
.stat-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; border: 1px solid rgba(91,140,255,.2); }
.stat-label { color: var(--text-2); font-size: 13px; }
.stat-val { font-size: 26px; font-weight: 700; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat-val small { font-size: 13px; color: var(--muted); font-weight: 600; }
.stat-sub { font-size: 12px; color: var(--muted); }
.stat-accent { border-color: rgba(43,234,143,.22); background: linear-gradient(180deg, rgba(43,234,143,.10), rgba(11,15,24,.8) 70%); }
.stat-accent .stat-ic { color: var(--green); background: var(--green-soft); border-color: rgba(43,234,143,.25); }
.stat-accent .stat-val { color: var(--green); }
.up { color: var(--green); }

/* ================= server room ================= */
.room-window { position: relative; height: 52vh; min-height: 320px; pointer-events: none !important; }
.room-window::after { content: "Tap any glowing rack in the hall"; position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); padding: 7px 14px; border-radius: 99px; font-size: 12px; font-weight: 600; color: var(--text-2); background: rgba(10,14,22,.7); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); white-space: nowrap; }
.fleet { display: grid; grid-template-columns: minmax(0, 1fr) 360px; margin-bottom: 14px; overflow: hidden; }
.fleet-chart { padding: 22px 24px 12px; }
.fleet-chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.fc-label { color: var(--text-2); font-size: 13px; }
.fc-val { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.fc-val small { font-size: 13px; color: var(--muted); font-weight: 600; }
#rateChart { width: 100%; height: 120px; display: block; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: rgba(4,6,11,.6); border: 1px solid var(--line); }
.seg button { border: 0; background: none; color: var(--muted); font-weight: 600; font-size: 12.5px; height: 28px; padding: 0 12px; border-radius: 999px; cursor: pointer; }
.seg button.active { background: var(--card-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.seg button:disabled { cursor: not-allowed; opacity: .6; }
.seg.big button { height: 36px; padding: 0 18px; font-size: 14px; }
.fleet-metrics { display: grid; grid-template-columns: 1fr 1fr; border-left: 1px solid var(--line); }
.fm { display: flex; align-items: center; gap: 12px; padding: 18px 20px; color: var(--accent); }
.fm:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.fm:nth-child(odd) { border-right: 1px solid var(--line); }
.fm-label { color: var(--text-2); font-size: 12px; }
.fm-val { color: var(--text); font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }

.racks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.rk { position: relative; overflow: hidden; padding: 16px; cursor: pointer; }
.rk::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--grad); opacity: 0; transition: opacity .3s; }
.rk.focus::before { opacity: 1; }
.rk:hover { border-color: rgba(91,140,255,.4); }
.rk-head { display: flex; align-items: center; gap: 11px; }
.rk-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--card-3); border: 1px solid var(--line); color: var(--text-2); flex: none; }
.rk-name { font-weight: 700; font-size: 14.5px; }
.rk-sub { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-status { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11.5px; font-weight: 600; flex: none; }
.rk-status .dot { background: var(--accent); }
.rk-main { display: flex; align-items: center; gap: 14px; margin: 16px 0 14px; }
.rk-ring { position: relative; width: 62px; height: 62px; flex: none; }
.rk-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.rk-ring circle { fill: none; stroke-width: 5; }
.rk-ring .rb { stroke: var(--card-3); }
.rk-ring .rf { stroke: url(#rkGrad); stroke-linecap: round; stroke-dasharray: 163.4; stroke-dashoffset: 163.4; transition: stroke-dashoffset .3s linear; }
.rk-pct { position: absolute; inset: 0; display: grid; place-items: center; font: 700 13px var(--mono); }
.rk-job { min-width: 0; }
.rk-job-label { color: var(--muted); font-size: 11.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-pat { font: 700 21px var(--mono); letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-pat em { font-style: normal; color: var(--accent); }
.rk-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.rk-stat { padding: 8px 10px; border-radius: 11px; background: rgba(4,6,11,.5); border: 1px solid var(--line); min-width: 0; }
.rk-stat span { display: block; color: var(--muted); font-size: 11px; }
.rk-stat b { display: block; font: 600 12.5px var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.rk-tele { display: flex; gap: 12px; margin-top: 12px; color: var(--muted); font-size: 11.5px; font-family: var(--mono); }
.rk-tele span { display: inline-flex; align-items: center; gap: 5px; }
.rk-tele .ic { color: var(--text-2); }
.rk-tele .hot { color: var(--amber); }
.rk-leds { margin-left: auto; display: inline-flex; gap: 3px; align-items: center; }
.rk-leds i { width: 5px; height: 5px; border-radius: 50%; background: #1A2C24; transition: background .1s; }
.rk-leds i.on { background: var(--green); box-shadow: 0 0 5px var(--green); }
.rk-found { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 2; padding: 12px; border-radius: 14px; background: #0B1D17; border: 1px solid rgba(43,234,143,.4); box-shadow: 0 -10px 24px rgba(8,11,17,.9); transform: translateY(calc(100% + 14px)); transition: transform .35s cubic-bezier(.2,.9,.3,1.2); }
.rk.found .rk-found { transform: none; }
.rk-found-head { display: flex; align-items: center; gap: 8px; color: var(--green); font-weight: 700; font-size: 13px; }
.rk-found-head .took { margin-left: auto; color: var(--text-2); font: 500 11.5px var(--mono); }
.rk-found-addr { margin-top: 6px; font: 500 11.5px var(--mono); color: var(--text-2); word-break: break-all; line-height: 1.45; }
.rk-found-addr em { font-style: normal; color: var(--green); font-weight: 700; white-space: nowrap; }
.rk.found { border-color: rgba(43,234,143,.5); box-shadow: 0 0 0 1px rgba(43,234,143,.25), 0 20px 60px -12px rgba(43,234,143,.45); }
.rk.found .rk-status { background: var(--green-soft); color: var(--green); }
.rk.found .rk-status .dot { background: var(--green); }
.rk.found .rk-ic { color: var(--green); background: var(--green-soft); }
.rk.standby { opacity: .55; }
.rk.standby .rk-status { background: var(--amber-soft); color: var(--amber); }
.rk.standby .rk-status .dot { background: var(--amber); animation: none; }
.burst { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--green); pointer-events: none; z-index: 3; animation: burst .9s ease-out forwards; }

/* ================= forge ================= */
.forge-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.forge-grid > *, .token-grid > *, .forge, .pattern-box, .pb-row { min-width: 0; }
.forge { padding: 24px; }
.forge-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; color: var(--text-2); font-weight: 500; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.track { width: 40px; height: 24px; border-radius: 999px; background: var(--card-3); border: 1px solid var(--line-2); position: relative; transition: background .2s; }
.knob { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #C9D1E0; transition: transform .2s, background .2s; }
.switch input:checked + .track { background: var(--accent); border-color: transparent; }
.switch input:checked + .track .knob { transform: translateX(16px); background: #fff; }
.pattern-box { margin-top: 18px; padding: 14px 18px 12px; border-radius: 18px; background: rgba(4,6,11,.6); border: 1px solid var(--line-2); transition: border-color .15s, box-shadow .15s; }
.pattern-box:focus-within { border-color: rgba(91,140,255,.6); box-shadow: 0 0 0 4px var(--accent-soft), 0 0 40px -10px rgba(91,140,255,.6); }
.pattern-box.bad { border-color: rgba(255,92,108,.6); box-shadow: 0 0 0 4px var(--red-soft); }
.pb-label { color: var(--muted); font-size: 12px; font-weight: 500; }
.pb-row { display: flex; align-items: center; gap: 4px; }
.pb-affix { font: 600 30px var(--mono); color: var(--muted); }
#patternInput { flex: 1; min-width: 0; width: 100%; border: 0; outline: 0; background: none; color: var(--text); font: 700 38px var(--mono); letter-spacing: .02em; padding: 4px 0; }
#patternInput::placeholder { color: #2A3447; }
.pb-count { color: var(--muted); font-size: 12px; }
.hint { display: flex; align-items: center; gap: 7px; margin-top: 10px; color: var(--muted); font-size: 12.5px; }
.hint.bad { color: var(--red); }
.hint.ok { color: var(--text-2); }
.addr-preview { margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: rgba(4,6,11,.5); border: 1px dashed var(--line-2); }
.ap-head { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.ap-addr { font-size: 14px; color: #55617A; word-break: break-all; letter-spacing: .01em; }
.ap-addr em { font-style: normal; color: var(--accent); font-weight: 700; background: var(--accent-soft); border-radius: 4px; padding: 0 2px; }
.diff { margin-top: 16px; }
.diff-head { display: flex; justify-content: space-between; color: var(--text-2); font-size: 12.5px; margin-bottom: 8px; }
.diff-bar { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.diff-bar i { height: 6px; border-radius: 99px; background: var(--card-3); transition: background .25s, box-shadow .25s; }
.diff-bar i.on:nth-child(-n+3) { background: var(--green); box-shadow: 0 0 10px rgba(43,234,143,.5); }
.diff-bar i.on:nth-child(n+4):nth-child(-n+5) { background: var(--accent); box-shadow: 0 0 10px rgba(91,140,255,.5); }
.diff-bar i.on:nth-child(n+6):nth-child(-n+7) { background: var(--amber); box-shadow: 0 0 10px rgba(255,181,71,.5); }
.diff-bar i.on:nth-child(8) { background: var(--red); box-shadow: 0 0 10px rgba(255,92,108,.5); }
.diff-scale { display: flex; justify-content: space-between; margin-top: 6px; color: var(--muted); font-size: 11px; }
.quote { margin-top: 16px; border-radius: 14px; border: 1px solid var(--line); overflow: hidden; background: rgba(4,6,11,.35); }
.q-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; font-size: 13.5px; }
.q-row + .q-row { border-top: 1px solid var(--line); }
.q-row > span { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); }
.q-row b { font-size: 14.5px; font-variant-numeric: tabular-nums; }
.q-row b small { color: var(--muted); font-weight: 500; font-size: 12px; margin-left: 6px; }
.q-holder { background: linear-gradient(90deg, var(--green-soft), transparent); }
.q-holder b { color: var(--green); }
.save { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 99px; background: var(--green-soft); color: var(--green); font: 600 11px var(--sans); }
.fine { display: flex; gap: 8px; margin: 14px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.fine .ic { margin-top: 2px; color: var(--green); }
.forge-side { display: grid; gap: 14px; }
.price-card, .queue-card { padding: 20px; }
.price-table, .proof-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.price-table th, .proof-table th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; padding: 0 10px 10px; }
.price-table td { padding: 10px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.price-table tr.sel td { background: var(--accent-soft); }
.price-table tr.sel td:first-child { box-shadow: inset 2px 0 0 var(--accent); }
.price-table .free { color: var(--green); font-family: var(--sans); font-weight: 600; font-size: 11px; margin-left: 6px; }
.r { text-align: right !important; }
.price-note { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--green-soft); color: var(--text-2); font-size: 12.5px; }
.price-note .ic { color: var(--green); }
.queue { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.queue li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: rgba(4,6,11,.45); border: 1px solid var(--line); font-size: 12.5px; }
.q-pos { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: var(--card-3); color: var(--muted); font: 600 11px var(--mono); flex: none; }
.queue .pat { font: 700 13.5px var(--mono); }
.queue .q-odds { margin-left: auto; color: var(--muted); font-family: var(--mono); font-size: 12px; }
.q-tag { padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 600; background: var(--amber-soft); color: var(--amber); }
.q-tag.next { background: var(--accent-soft); color: var(--accent); }

/* try-it grinder */
.tryit { padding: 22px; overflow: hidden; }
.tryit::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: linear-gradient(135deg, rgba(91,140,255,.6), rgba(142,99,255,.1) 40%, rgba(43,234,143,.5)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.try-sub { margin: -4px 0 14px; color: var(--text-2); font-size: 13.5px; line-height: 1.55; }
.try-row { display: flex; gap: 10px; }
.try-input { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; height: 48px; padding: 0 14px; border-radius: 14px; background: rgba(4,6,11,.6); border: 1px solid var(--line-2); }
.try-input:focus-within { border-color: rgba(91,140,255,.6); box-shadow: 0 0 0 4px var(--accent-soft); }
.try-input span { font: 600 20px var(--mono); color: var(--muted); }
.try-input input { flex: 1; min-width: 0; width: 100%; border: 0; outline: 0; background: none; color: var(--text); font: 700 22px var(--mono); }
.try-row .btn { height: 48px; border-radius: 14px; }
.try-hint { margin-top: 8px; font-size: 12px; color: var(--muted); }
.try-term { margin-top: 14px; border-radius: 14px; background: #03050A; border: 1px solid var(--line); overflow: hidden; }
.tt-head { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.tt-head span { display: inline-flex; gap: 5px; }
.tt-head i { width: 8px; height: 8px; border-radius: 50%; background: #2a3242; }
.tt-head i:first-child { background: #ff5f57; } .tt-head i:nth-child(2) { background: #febc2e; } .tt-head i:nth-child(3) { background: #28c840; }
.tt-stream { height: 150px; padding: 8px 12px; font-size: 11.5px; line-height: 1.75; color: #3E4A60; overflow: hidden; word-break: break-all; }
.tt-stream div:first-child { color: var(--text-2); }
.tt-stream em { font-style: normal; color: #7FA6FF; }
.tryit[data-state="found"] .tt-stream div:first-child { color: var(--text); }
.tryit[data-state="found"] .tt-stream div:first-child em { color: var(--green); font-weight: 700; }
.try-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.try-stats > div { padding: 10px 12px; border-radius: 12px; background: rgba(4,6,11,.45); border: 1px solid var(--line); min-width: 0; }
.try-stats span { display: block; color: var(--muted); font-size: 11px; }
.try-stats b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.tryit[data-state="running"] .try-stats b { color: var(--accent); }
.try-result { display: none; margin-top: 12px; padding: 14px; border-radius: 14px; background: #0B1D17; border: 1px solid rgba(43,234,143,.45); box-shadow: 0 0 40px -12px rgba(43,234,143,.6); animation: popIn .5s cubic-bezier(.2,.9,.3,1.3); }
.tryit[data-state="found"] .try-result { display: block; }
.tr-label { display: flex; align-items: center; gap: 6px; color: var(--green); font-weight: 700; font-size: 12.5px; }
.try-result code { display: block; margin-top: 6px; font: 500 12.5px var(--mono); color: var(--text-2); word-break: break-all; }
.try-result code em { font-style: normal; color: var(--green); font-weight: 800; }
.try-compare { display: none; margin-top: 12px; }
.tryit[data-state="found"] .try-compare { display: block; }
.tc-head { font-size: 12.5px; color: var(--text-2); margin-bottom: 8px; }
.tc-row { display: grid; grid-template-columns: 120px 1fr auto; align-items: center; gap: 10px; padding: 6px 0; font-size: 12.5px; }
.tc-row span { color: var(--text-2); }
.tc-row b { font: 700 12.5px var(--mono); }
.tc-bar { height: 8px; border-radius: 99px; background: var(--card-3); overflow: hidden; }
.tc-bar i { display: block; height: 100%; border-radius: 99px; animation: grow 1.2s cubic-bezier(.2,.8,.2,1); transform-origin: left; }
.tc-row.you .tc-bar i { background: linear-gradient(90deg, var(--amber), var(--red)); }
.tc-row.you b { color: var(--red); }
.tc-row.h100 .tc-bar i { background: var(--accent); }
.tc-row.fleet .tc-bar i { background: var(--green); box-shadow: 0 0 10px var(--green); }
.tc-row.fleet b { color: var(--green); }
.tc-foot { margin-top: 6px; font-size: 12.5px; color: var(--text-2); }
.tc-foot b { color: var(--green); }

/* ================= proof ================= */
.table-card { padding: 8px 8px 4px; overflow-x: auto; }
.proof-table th { padding: 12px 14px; }
.proof-table td { padding: 12px 14px; border-top: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; }
.proof-table tbody tr { transition: background .15s; }
.proof-table tbody tr:hover { background: rgba(255,255,255,.03); }
.proof-table tr.fresh { animation: rowIn 1.6s ease-out; }
.p-addr { display: inline-flex; align-items: center; gap: 10px; font: 500 12.5px var(--mono); color: var(--text-2); }
.p-addr em { font-style: normal; color: var(--green); font-weight: 700; }
.p-addr .icon-btn { width: 26px; height: 26px; border-radius: 8px; }
.p-word { font: 700 12.5px var(--mono); padding: 3px 8px; border-radius: 8px; background: var(--card-3); }
.p-case { margin-left: 6px; padding: 2px 6px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font: 600 10.5px var(--mono); }
.p-rack { color: var(--text-2); font-size: 12.5px; }
.p-rack b { color: var(--text); font-family: var(--mono); font-weight: 600; margin-right: 6px; }
.mono-cell { font: 500 12.5px var(--mono); }
.p-paid { color: var(--green); font: 600 12.5px var(--mono); }
.p-when { color: var(--muted); font-size: 12.5px; }
.empty { padding: 32px 16px; text-align: center; color: var(--muted); }

/* ================= token ================= */
.token-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; }
.split-card, .perks-card { padding: 24px; display: flex; flex-direction: column; }
.split-bar { display: flex; height: 16px; border-radius: 99px; overflow: hidden; gap: 3px; }
.split-bar i { display: block; height: 100%; box-shadow: 0 0 16px currentColor; }
.split-legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.sl { padding: 14px; border-radius: 14px; background: rgba(4,6,11,.45); border: 1px solid var(--line); }
.sl-top { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 12.5px; }
.sl-sw { width: 10px; height: 10px; border-radius: 3px; }
.sl-pct { font-size: 28px; font-weight: 900; letter-spacing: -0.04em; margin-top: 4px; }
.sl-desc { color: var(--muted); font-size: 12px; }
.split-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.split-big { font-size: 22px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.payouts { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.payouts-head { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-2); margin-bottom: 10px; }
.payouts ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.payouts li { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(4,6,11,.45); border: 1px solid var(--line); font-size: 13px; }
.payouts li b { color: var(--green); font-size: 13px; }
.po-ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green); }
.perks-card h3 { font-size: 17px; margin-bottom: 14px; }
.perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.perks li { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 14px; background: rgba(4,6,11,.45); border: 1px solid var(--line); }
.perk-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.perks b { display: block; font-size: 14px; }
.perks div > span { display: block; color: var(--muted); font-size: 12.5px; }
.perks-foot { margin-top: auto; padding-top: 18px; display: flex; gap: 10px; align-items: center; }
.perks-foot .ca-row { flex: 1; margin: 0; max-width: none; }

/* ================= steps / roadmap / faq ================= */
.steps, .phases { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.step, .phase { padding: 24px; }
.step-ic { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 12px 28px -10px rgba(91,140,255,.95); }
.step-n { position: absolute; top: 22px; right: 24px; font: 700 13px var(--mono); color: var(--muted); }
.step h3 { font-size: 19px; margin: 18px 0 6px; }
.step p, .phase p { margin: 0; color: var(--text-2); font-size: 14px; }
.phase.now { border-color: rgba(91,140,255,.4); background: linear-gradient(180deg, rgba(91,140,255,.14), rgba(11,15,24,.8) 60%); }
.ph-chip { display: inline-block; padding: 3px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-size: 11.5px; font-weight: 600; }
.ph-chip.next { background: var(--green-soft); color: var(--green); }
.ph-chip.later { background: var(--card-3); color: var(--muted); }
.ph-n { display: block; margin-top: 16px; color: var(--muted); font-size: 12px; font-weight: 600; }
.phase h3 { font-size: 19px; margin: 2px 0 6px; }
.faq { display: grid; grid-template-columns: 1fr; gap: 10px; max-width: 980px; }
.faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; cursor: pointer; font-weight: 600; font-size: 15.5px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { color: var(--muted); transition: transform .2s; }
.faq details[open] summary .ic { transform: rotate(180deg); }
.faq details p { margin: 0; padding: 0 20px 18px; color: var(--text-2); font-size: 14.5px; line-height: 1.65; }

/* ================= footer ================= */
.foot { position: relative; z-index: 3; margin-top: 120px; border-top: 1px solid var(--line); background: rgba(4,6,11,.75); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.foot-in { max-width: 1440px; margin: 0 auto; padding: 36px 24px 20px; display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.foot-brand p { margin: 10px 0 0; }
.foot-cols { display: flex; gap: 56px; }
.foot-cols h4 { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }
.foot-cols a { display: flex; align-items: center; gap: 8px; color: var(--text-2); padding: 4px 0; }
.foot-cols a:hover { color: var(--text); }
.foot-bottom { max-width: 1440px; margin: 0 auto; padding: 16px 24px 32px; font-size: 12.5px; }
.bottom-nav { display: none; }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 80; transform: translate(-50%, 16px); display: inline-flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 14px; background: rgba(26,34,48,.95); border: 1px solid var(--line-2); box-shadow: 0 18px 40px rgba(0,0,0,.5); font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .ic { color: var(--green); }

/* ================= motion ================= */
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(43,234,143,.55); } 70% { box-shadow: 0 0 0 7px rgba(43,234,143,0); } 100% { box-shadow: 0 0 0 0 rgba(43,234,143,0); } }
@keyframes pinPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.25); } }
@keyframes flow { to { stroke-dashoffset: -29; } }
@keyframes tkIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
@keyframes rowIn { 0% { background: rgba(43,234,143,.14); } 100% { background: transparent; } }
@keyframes burst { 0% { opacity: 1; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.3); } }
@keyframes shimmer { to { background-position: -220% 0; } }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(10px); opacity: 0; } 100% { opacity: 0; } }
@keyframes bootPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes popIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ================= responsive ================= */
@media (max-width: 1280px) {
  .racks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fleet { grid-template-columns: 1fr; }
  .fleet-metrics { border-left: 0; border-top: 1px solid var(--line); grid-template-columns: repeat(4, 1fr); }
  .fm:nth-child(-n+2) { border-bottom: 0; }
  .fm { border-right: 1px solid var(--line); }
  .fm:last-child { border-right: 0; }
}
@media (max-width: 1100px) {
  .nav-pills, .hud { display: none; }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .forge-grid, .token-grid { grid-template-columns: minmax(0, 1fr); }
  .steps, .phases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rack-panel { width: 360px; }
}
@media (max-width: 720px) {
  html { scroll-padding-top: 108px; }
  body { padding-bottom: 76px; }
  .card { backdrop-filter: none; -webkit-backdrop-filter: none; background: linear-gradient(180deg, rgba(20,27,40,.94), rgba(10,14,22,.96)); }
  .shade-hero { background: linear-gradient(180deg, rgba(4,6,11,.75) 0%, rgba(4,6,11,.55) 40%, rgba(4,6,11,.05) 62%, rgba(4,6,11,.6) 100%); }
  .top-in { height: 58px; padding: 0 12px; gap: 6px; }
  .brand-word { font-size: 16px; }
  .search { display: none; position: absolute; left: 12px; right: 12px; top: 9px; max-width: none; z-index: 2; }
  .top.searching .search { display: flex; }
  .search-toggle { display: inline-grid; margin-left: auto; }
  .sol-chip { height: 38px; padding: 0 10px; }
  .sol-chip span { font-size: 12.5px; }
  .btn-buy { height: 38px; padding: 0 12px; }
  .btn-buy .tk-name { display: none; }
  .ticker { padding: 0 12px; height: 36px; }
  .ticker-label span:not(.dot) { display: none; }
  .wrap { padding: 0 12px 24px; }
  .hero { align-items: flex-start; min-height: 100svh; padding: 118px 4px 40px; }
  .hero h1 { font-size: 34px; letter-spacing: -0.05em; }
  .h1-line { white-space: nowrap; }
  .lead { font-size: 15px; margin: 14px 0 22px; }
  .cta-row .btn { flex: 1; padding: 0 14px; font-size: 14.5px; height: 50px; }
  .ca-row { margin-top: 16px; }
  .eyebrow .sep { display: none; }
  .float-grind { display: none; }
  .fg-pat { font-size: 16px; }
  .float-found { right: 4px; top: auto; bottom: 24px; max-width: 250px; padding: 10px 12px; }
  .ff-addr { font-size: 11px; }
  .scroll-cue { display: none; }
  .stat-row { gap: 10px; margin-top: 0; }
  .stat { padding: 14px; gap: 12px; flex-direction: column; align-items: flex-start; }
  .stat-ic { width: 36px; height: 36px; border-radius: 11px; }
  .stat-val { font-size: 19px; }
  .module { margin-top: 72px; }
  .module-head { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
  .module-head h2 { font-size: 32px; }
  .module-head p { font-size: 14.5px; }
  .room-window { height: 46vh; }
  .racks { grid-template-columns: 1fr; gap: 10px; }
  .fleet-metrics { grid-template-columns: 1fr 1fr; }
  .fm { padding: 14px 16px; }
  .fm:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .fm:nth-child(even) { border-right: 0; }
  .forge, .tryit { padding: 16px; }
  #patternInput { font-size: 30px; }
  .pb-affix { font-size: 26px; }
  .ap-addr { font-size: 12.5px; }
  .tc-row { grid-template-columns: 96px 1fr auto; }
  .price-table th:nth-child(2), .price-table td:nth-child(2) { display: none; }
  .proof-table th:nth-child(2), .proof-table td:nth-child(2),
  .proof-table th:nth-child(3), .proof-table td:nth-child(3),
  .proof-table th:nth-child(4), .proof-table td:nth-child(4),
  .proof-table th:nth-child(7), .proof-table td:nth-child(7) { display: none; }
  .proof-table th, .proof-table td { padding: 11px 10px; }
  .table-card { padding: 4px; }
  .p-addr { gap: 6px; font-size: 12px; }
  .split-legend { grid-template-columns: 1fr; }
  .payouts li { grid-template-columns: auto 1fr auto; }
  .payouts li .muted { display: none; }
  .perks-foot { flex-direction: column; align-items: stretch; }
  .steps, .phases { grid-template-columns: 1fr; }
  .foot-cols { gap: 36px; }
  .rack-panel { left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; max-height: 64vh; padding: 18px; border-radius: 22px; transform: translateY(calc(100% + 30px)); }
  .rack-panel.open { transform: none; }
  body.exploring .rack-panel { top: auto; }
  .explore-bar { top: 10px; width: calc(100% - 20px); }
  .eb-in { justify-content: space-between; }
  .eb-hint { display: none; }
  .cursor-glow { display: none; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: rgba(8, 11, 17, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .bottom-nav a, .bottom-nav button { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--text-2); font-size: 11px; font-weight: 600; padding: 4px 0; background: none; border: 0; }
  #exploreBtnM { color: var(--accent); }
  .toast { bottom: 90px; }
}
@media (max-width: 420px) {
  .sol-chip { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .stat-row.reveal > * { opacity: 1; transform: none; }
}

/* ================= order window ================= */
.track-link { margin: 12px auto 0; display: flex; }
.omodal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 20px; background: rgba(3,5,10,.62); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.omodal.open { opacity: 1; visibility: visible; }
.omodal-card { position: relative; width: min(560px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; padding: 26px; border-radius: 26px; background: linear-gradient(180deg, rgba(22,29,43,.96), rgba(9,13,20,.97)); border: 1px solid var(--line-2); box-shadow: 0 40px 100px rgba(0,0,0,.7), 0 0 0 1px rgba(91,140,255,.08); transform: translateY(14px) scale(.98); transition: transform .4s cubic-bezier(.2,.8,.2,1); }
.omodal.open .omodal-card { transform: none; }
body.modal-open { overflow: hidden; }
.om-close { position: absolute; top: 16px; right: 16px; }
.om-steps { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 44px 18px 0; }
.om-steps span { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 11.5px; font-weight: 600; color: var(--muted); background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.om-steps span.on { color: #fff; background: var(--grad); border-color: transparent; }
.om-steps span.done { color: var(--green); background: var(--green-soft); border-color: rgba(43,234,143,.2); }
.om-kicker { font: 600 11.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.om-title { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 28px; font-weight: 900; letter-spacing: -0.04em; }
.om-title em, .om-addr em, .om-list em { font-style: normal; color: var(--accent); }
.om-title .ic { color: var(--green); }
.om-sub { margin: 8px 0 18px; color: var(--text-2); font-size: 14px; line-height: 1.55; }
.om-price { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-radius: 16px; background: rgba(4,6,11,.55); border: 1px solid var(--line); }
.om-price span { display: block; color: var(--muted); font-size: 12px; }
.om-price b { font-size: 26px; }
.om-price small { margin-left: 10px; color: var(--muted); text-decoration: line-through; }
.om-holder { width: 100%; margin-top: 12px; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; text-align: left; cursor: pointer; color: var(--text); background: linear-gradient(90deg, rgba(43,234,143,.10), rgba(91,140,255,.06)); border: 1px solid rgba(43,234,143,.25); transition: border-color .2s, transform .2s; }
.om-holder:hover { border-color: rgba(43,234,143,.55); transform: translateY(-1px); }
.om-holder > .ic:first-child { color: var(--green); }
.om-holder > .ic:last-child { margin-left: auto; color: var(--muted); }
.om-holder b { display: block; font-size: 14px; }
.om-holder span { display: block; color: var(--text-2); font-size: 12.5px; }
.om-holder.busy { opacity: .6; pointer-events: none; }
.om-note { position: relative; display: block; margin-top: 12px; padding: 12px 14px 12px 38px; border-radius: 14px; background: var(--accent-soft); color: var(--text-2); font-size: 12.5px; line-height: 1.55; }
.om-note .ic { position: absolute; left: 14px; top: 14px; color: var(--accent); }
.om-note.warn { background: var(--amber-soft); }
.om-note.warn .ic { color: var(--amber); }
.om-claim { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 16px; background: rgba(4,6,11,.55); border: 1px dashed rgba(91,140,255,.4); }
.om-claim .ic { color: var(--accent); }
.om-claim b { display: block; }
.om-claim span { color: var(--muted); font-size: 12px; }
.om-wide { width: 100%; margin-top: 12px; }
.om-check { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; color: var(--text-2); font-size: 13px; cursor: pointer; }
.om-check input { margin-top: 2px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.om-pay { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
.om-qr { width: 236px; height: 236px; padding: 8px; border-radius: 18px; background: #fff; display: grid; place-items: center; box-shadow: 0 0 40px -10px rgba(91,140,255,.7); }
.om-qr img, .om-qr canvas { display: block; }
.om-pay-side .om-wide:first-child { margin-top: 0; }
.om-waiting { display: flex; align-items: center; gap: 8px; margin-top: 16px; color: var(--text-2); font-size: 13px; font-weight: 600; }
.om-fine { margin-top: 10px; color: var(--muted); font-size: 12px; }
.om-grind { display: flex; align-items: center; gap: 18px; margin: 16px 0 12px; }
.om-ring { width: 96px; height: 96px; }
.om-addr { margin-top: 16px; padding: 16px; border-radius: 16px; background: #0B1D17; border: 1px solid rgba(43,234,143,.45); box-shadow: 0 0 40px -12px rgba(43,234,143,.6); color: var(--text-2); font-size: 14px; word-break: break-all; line-height: 1.5; }
.om-addr em { color: var(--green); font-weight: 800; }
.om-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.om-actions .btn-primary { grid-column: 1 / -1; }
.om-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.om-list button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; cursor: pointer; color: var(--text); background: rgba(4,6,11,.5); border: 1px solid var(--line); text-align: left; }
.om-list button:hover { border-color: rgba(91,140,255,.45); }
.om-list button .ic { margin-left: auto; color: var(--muted); }
@media (max-width: 720px) {
  .omodal { padding: 0; align-items: end; }
  .omodal-card { width: 100%; max-height: 92vh; border-radius: 24px 24px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); }
  .om-pay { grid-template-columns: 1fr; justify-items: center; }
  .om-pay-side { width: 100%; }
  .om-title { font-size: 24px; }
}
