/* Heisenbug — site styles. Two worlds: studio grey (light) and pitch black wireframe (dark).
   The only "colour" is the chromatic fringe (red/cyan offsets). Times are always UTC. */
:root {
  --ink: #0b0c0e;
  --ink-2: #2a2c31;
  --paper: #f2f2f3;
  --g0: #7d7e84;
  --g1: #a5a6ab;
  --g2: #cdced2;
  --g3: #e4e5e8;
  --black: #050506;
  --line: rgba(11, 12, 14, .16);
  --line-d: rgba(242, 242, 243, .16);
  --fr: #ff2d55;  /* fringe red */
  --fc: #00d5ff;  /* fringe cyan */
  --crack: #b9babe;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --gut: clamp(16px, 3vw, 40px);
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: light;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; overflow-x: clip; }
body {
  font: 400 15px/1.5 var(--sans); color: var(--ink);
  background: linear-gradient(180deg, var(--g0) 0%, var(--g1) 45%, var(--g2) 100%) fixed;
  background-color: var(--g1);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
code, .mono { font-family: var(--mono); }
img { display: block; max-width: 100%; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 8px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: 8px; }
.skip:focus { top: 8px; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 6px; }
.mono-label { font: 500 11px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; opacity: .62; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- topbar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: 64px; padding: 0 var(--gut);
  display: flex; align-items: center; justify-content: space-between; color: var(--ink);
  transition: color .45s var(--ease);
}
.topbar[data-theme="dark"] { color: var(--paper); --crack: var(--black); }
.topbar__mark { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 15px/1 var(--sans); letter-spacing: -.01em; }
.topbar__mark svg { width: 28px; height: 28px; }
.topbar__nav { display: flex; align-items: center; gap: 6px; }
.topbar__nav > a:not(.pill) { font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; padding: 10px 10px; border-radius: 999px; }
.topbar__nav > a:not(.pill):hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.topbar__menu { width: 40px; height: 40px; border-radius: 10px; border: 1px solid color-mix(in srgb, currentColor 22%, transparent); display: grid; place-content: center; gap: 5px; margin: 0 4px; }
.topbar__menu span { display: block; width: 16px; height: 1.5px; background: currentColor; transition: transform .4s var(--ease); }
.topbar__menu[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.topbar__menu[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }
.pill {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 999px;
  font: 600 13px/1 var(--sans); letter-spacing: .01em; text-decoration: none; white-space: nowrap;
  background: var(--ink); color: var(--paper); transition: transform .3s var(--ease), background .4s, color .4s;
}
.topbar[data-theme="dark"] .pill { background: var(--paper); color: var(--ink); }
.pill:hover { transform: translateY(-1px); }
.pill--dark { background: var(--ink); color: var(--paper); }
.menu {
  position: absolute; top: 68px; right: var(--gut); width: 260px; padding: 8px 18px 14px; border-radius: 14px;
  background: var(--ink); color: var(--paper); clip-path: inset(0 0 100% 100% round 14px);
  transition: clip-path .42s cubic-bezier(.55, 0, .55, .2);
}
.topbar[data-theme="dark"] .menu { background: var(--paper); color: var(--ink); }
.menu.is-open { clip-path: inset(0 round 14px); transition: clip-path .55s var(--ease); }
.menu ol { list-style: none; }
.menu a { display: grid; grid-template-columns: 32px 1fr; align-items: center; padding: 9px 0; text-decoration: none; font: 600 20px/1 var(--sans); letter-spacing: -.02em; }
.menu a span { font: 400 11px/1 var(--mono); opacity: .5; }
.menu__note { margin-top: 8px; padding-top: 12px; border-top: 1px solid color-mix(in srgb, currentColor 16%, transparent); font: 400 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; opacity: .6; }

/* ---------- 3D layers ---------- */
#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; opacity: 0; transition: opacity 1.2s ease; pointer-events: none; display: none; }
.gl #gl { display: block; }
.gl.gl-ready #gl { opacity: 1; }
.still { display: none; }
.gl .still { display: block; position: fixed; inset: 0; z-index: 0; background: url(/img/hero-still.jpg) center/cover no-repeat; transition: opacity 1.2s ease; }
.gl.gl-ready .still { opacity: 0; }
.blackout { position: fixed; inset: 0; z-index: 1; background: var(--black); opacity: 0; pointer-events: none; display: none; }
.gl .blackout { display: block; }
main, .foot { position: relative; z-index: 2; }

/* ---------- sections (base = plain flow; .gl = sticky stages) ---------- */
.s { position: relative; }
.stage { position: relative; min-height: 100svh; padding: 96px var(--gut) 40px; }
.gl .s-rounds { height: 320vh; }
.gl .s-how { height: 620vh; }
.gl .s-arena { height: 280vh; }
.gl .s-play { height: 220vh; }
.gl .s-rounds .stage, .gl .s-how .stage, .gl .s-arena .stage, .gl .s-play .stage { position: sticky; top: 0; height: 100vh; min-height: 0; overflow: hidden; }
.s[data-theme="dark"] { color: var(--paper); }
html:not(.gl) .s[data-theme="dark"], html:not(.gl) .foot { background: var(--black); }

/* ---------- 1 hero ---------- */
.s-hero .stage { height: 100svh; min-height: 640px; display: grid; grid-template-rows: 1fr auto; }
html:not(.gl) .s-hero { background: url(/img/hero-still.jpg) 62% 50%/cover no-repeat, var(--g1); }
.hero__copy { max-width: 600px; align-self: start; padding-top: 1vh; }
.hero__line { font: italic 400 clamp(40px, 4.6vw, 70px)/.98 var(--serif); letter-spacing: -.02em; }
.hero__line span { display: block; }
.hero__line span:nth-child(3) { text-shadow: -1.5px 0 rgba(255, 45, 85, .45), 1.5px 0 rgba(0, 213, 255, .45); }
.hero__sub { margin-top: 16px; font: 500 15px/1.45 var(--sans); max-width: 30em; color: var(--ink-2); }
.install { margin-top: 26px; max-width: 520px; }
.install ol { list-style: none; margin-top: 8px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; counter-reset: c; }
.install li { counter-increment: c; display: flex; align-items: center; gap: 10px; padding: 9px 10px 9px 12px; border-radius: 10px; background: rgba(243, 243, 244, .5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .45); }
.install li::before { content: counter(c, decimal-leading-zero); font: 500 10.5px/1 var(--mono); opacity: .5; }
.install code { flex: 1; min-width: 0; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy { font: 500 10.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 7px 9px; border-radius: 7px; border: 1px solid var(--line); transition: background .2s; }
.copy:hover { background: rgba(11, 12, 14, .06); }
[data-copy].is-copied .ca__note, .copy.is-copied { font-size: 0; }
.copy.is-copied::after, [data-copy].is-copied .ca__note::after { content: "copied"; font-size: 10.5px; }
.console { align-self: end; display: grid; gap: 10px; max-width: 980px; }
.console__row { display: grid; grid-template-columns: 1.15fr 1fr 1.2fr; gap: 10px; }
.cell { display: block; text-decoration: none; padding: 14px 16px 13px; border-radius: 14px; background: rgba(11, 12, 14, .86); color: var(--paper); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); min-width: 0; }
.cell .mono-label { opacity: .55; }
.big-num { font: 700 clamp(26px, 2.6vw, 38px)/1.1 var(--sans); letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin-top: 4px; white-space: nowrap; }
.big-num small { font-size: .5em; font-weight: 600; letter-spacing: 0; opacity: .6; }
.cell__val { font: 600 17px/1.3 var(--sans); margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell__sub { font: 400 12px/1.4 var(--mono); opacity: .72; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell__sub a { text-decoration-color: rgba(242, 242, 243, .35); text-underline-offset: 2px; }
.cell--pot:hover { background: rgba(11, 12, 14, .94); }
.tag { display: inline-block; font: 500 10px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 4px 6px; border-radius: 5px; border: 1px solid currentColor; margin-left: 6px; vertical-align: 2px; }
.console__row--token { grid-template-columns: auto auto 1fr auto; align-items: center; padding: 8px 8px 8px 8px; border-radius: 14px; background: rgba(243, 243, 244, .55); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, .5); }
.ca { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); font: 500 13px/1 var(--mono); }
.ca__note { font: 500 10.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; opacity: .6; }
.ca.is-pending .ca__addr { opacity: .55; }
.ticker { font: 700 15px/1 var(--sans); letter-spacing: -.01em; padding: 0 6px; }
.launch { font: 500 13px/1 var(--mono); font-variant-numeric: tabular-nums; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; padding-left: 4px; }
.launch__at { opacity: .6; font-size: 12px; }
.hero__down { position: absolute; right: var(--gut); bottom: 40px; width: 52px; height: 52px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; }
.hero__down svg, .round-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.mockbadge { position: fixed; right: 16px; top: 70px; z-index: 99; font: 600 10px/1 var(--mono); letter-spacing: .1em; padding: 4px 7px; pointer-events: none; border-radius: 6px; background: #ffde3a; color: #000; }

/* ---------- 2 last rounds ---------- */
.s-rounds .stage { display: grid; grid-template-rows: 1fr auto; }
.ribbon { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 2px 18px; scrollbar-width: none; }
.ribbon::-webkit-scrollbar { display: none; }
.gl .ribbon { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.film { flex: 0 0 min(86vw, 560px); min-width: 0; scroll-snap-align: center; background: #0d0e10; color: #e9eaec; border-radius: 6px; padding: 22px 16px; position: relative; font: 400 12px/1.5 var(--mono); }
.film::before, .film::after { content: ""; position: absolute; left: 10px; right: 10px; height: 8px; background: repeating-linear-gradient(90deg, #6b6c70 0 10px, transparent 10px 22px); opacity: .5; border-radius: 2px; }
.film::before { top: 7px; } .film::after { bottom: 7px; }
.film__head { display: flex; justify-content: space-between; gap: 10px; opacity: .7; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.film__issue { margin: 10px 0; color: #fff; font-size: 12.5px; }
.film pre { white-space: pre; overflow: hidden; font-size: 11px; line-height: 1.45; max-height: 15em; }
.film .add { color: #c9f7d4; } .film .del { color: #ffb3bf; } .film .hunk { opacity: .5; }
.film__foot { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 11px; }
.film__foot a { color: #fff; }
.film--empty { display: grid; place-items: center; min-height: 260px; text-align: center; opacity: .8; }
.works__caption { align-self: end; padding-bottom: 6px; max-width: 70vw; }
.works__caption .num { font-size: 12px; letter-spacing: .06em; }
.works__title { font: 800 clamp(34px, 5.4vw, 92px)/.92 var(--sans); letter-spacing: -.045em; margin-top: 8px; transition: opacity .25s, transform .35s var(--ease); }
.works__title.is-changing { opacity: 0; transform: translateY(8px); }
.works__meta { font: 400 12.5px/1.5 var(--mono); margin-top: 10px; opacity: .78; }
.works__meta a { text-underline-offset: 2px; }
.works__arrows { position: absolute; right: var(--gut); bottom: 40px; display: flex; gap: 10px; }
.round-btn { width: 52px; height: 52px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; text-decoration: none; }
.round-btn--wide { width: auto; padding: 0 20px; border-radius: 999px; font: 600 13px/1 var(--sans); }
html:not(.gl) .works__arrows { position: static; margin-top: 14px; }

/* ---------- 4 how a round works ---------- */
.how__label { position: absolute; top: 92px; left: var(--gut); display: flex; gap: 14px; align-items: center; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; z-index: 2; }
.how__bar { width: 140px; height: 1px; background: var(--line-d); position: relative; }
.how__bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--paper); }
.how__steps { list-style: none; }
.step h3 { font: 800 clamp(48px, 9vw, 150px)/.88 var(--sans); letter-spacing: -.05em; }
.step p { font: 400 15px/1.55 var(--sans); max-width: 30em; color: rgba(242, 242, 243, .82); }
.step p code { font-size: .88em; color: #fff; }
.step p a { color: #fff; }
html:not(.gl) .s-how .stage { padding-top: 140px; }
html:not(.gl) .how__label { top: 96px; }
html:not(.gl) .step { padding: 28px 0 54px; border-top: 1px solid var(--line-d); display: grid; gap: 18px; }
html:not(.gl) .step__img { width: 100%; max-width: 720px; aspect-ratio: 16/10; object-fit: cover; border-radius: 8px; background: #0b0b0c; }
.gl .step__img { display: none; }
.gl .step { position: absolute; inset: 0; padding: 0 var(--gut) 44px; display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; pointer-events: none; }
.gl .step h3, .gl .step p { opacity: 0; }
.gl .step p { margin-bottom: 10px; }
.gl .step.is-on h3, .gl .step.is-on p { opacity: 1; pointer-events: auto; }
.gl .s-how .stage { background: linear-gradient(to top, rgba(5,5,6,.9) 0%, rgba(5,5,6,.55) 22%, transparent 42%); }
.gl .s-rounds .stage { background: linear-gradient(to top, rgba(205,206,210,.85) 0%, rgba(205,206,210,.4) 22%, transparent 40%); }
.gl .link__t, .gl .link__d { text-shadow: 0 1px 12px rgba(0,0,0,.9), 0 0 2px rgba(0,0,0,.9); }
.gl .link { background: rgba(5,5,6,.35); }

/* ---------- 5 arena ---------- */
.s-arena .stage { display: grid; grid-template-columns: minmax(300px, 440px) 1fr; gap: 40px; align-items: center; }
.panel { position: relative; padding: 26px 26px 24px; background: rgba(5, 5, 6, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.reg__c { position: absolute; width: 12px; height: 12px; border: 0 solid var(--paper); }
.reg__c--tl { left: 0; top: 0; border-width: 1px 0 0 1px; } .reg__c--tr { right: 0; top: 0; border-width: 1px 1px 0 0; }
.reg__c--bl { left: 0; bottom: 0; border-width: 0 0 1px 1px; } .reg__c--br { right: 0; bottom: 0; border-width: 0 1px 1px 0; }
.panel h2 { font: 700 clamp(26px, 2.6vw, 38px)/1.04 var(--sans); letter-spacing: -.035em; margin-top: 12px; }
.panel__body { margin-top: 12px; color: rgba(242, 242, 243, .78); font-size: 14.5px; }
.boards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line-d); }
.lb { list-style: none; margin-top: 8px; font: 400 11.5px/1.4 var(--mono); counter-reset: l; }
.lb li { counter-increment: l; display: flex; gap: 8px; padding: 5px 0; border-bottom: 1px solid rgba(242, 242, 243, .08); }
.lb li::before { content: counter(l, decimal-leading-zero); opacity: .5; }
.lb li b { font-weight: 500; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb li span { opacity: .7; }
.lb .lb__empty { opacity: .55; } .lb .lb__empty::before { content: "—"; }
.monitor { border: 1px solid var(--line-d); border-radius: 10px; padding: 18px; background: rgba(5, 5, 6, .6); max-width: 620px; justify-self: end; width: 100%; }
.gl .s-arena .stage { padding-top: 104px; padding-bottom: 36px; }
.gl .panel { max-height: calc(100vh - 140px); overflow: auto; }
.gl .monitor { position: absolute; right: var(--gut); bottom: 36px; width: min(420px, 36vw); padding: 12px 14px; background: rgba(5, 5, 6, .55); }
.gl .monitor__grid { display: none; }
.monitor__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 12px; }
.monitor__grid b { display: block; font: 700 26px/1.1 var(--sans); letter-spacing: -.03em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.feed { list-style: none; margin-top: 16px; font: 400 12px/1.5 var(--mono); max-height: 9.5em; overflow: hidden; }
.gl .feed { margin-top: 0; max-height: 7.6em; }
.feed li { display: flex; gap: 10px; padding: 3px 0; border-bottom: 1px solid rgba(242, 242, 243, .07); animation: feedin .5s var(--ease); }
.feed li time { opacity: .5; }
.feed .pass { color: #fff; font-weight: 500; text-shadow: -1px 0 rgba(255, 45, 85, .6), 1px 0 rgba(0, 213, 255, .6); }
.feed .fail { opacity: .62; }
.feed__idle { opacity: .5; }
@keyframes feedin { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- 6 play / 4 links ---------- */
.s-play .stage { display: grid; place-items: center; }
.links { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: 100%; max-width: 760px; }
.link { display: grid; gap: 6px; padding: 20px 20px 18px; border: 1px solid var(--line-d); border-radius: 12px; text-decoration: none; background: rgba(5, 5, 6, .5); transition: background .3s, border-color .3s; }
.link:hover { background: rgba(242, 242, 243, .08); border-color: rgba(242, 242, 243, .4); }
.link__t { font: 700 clamp(20px, 2vw, 28px)/1.05 var(--sans); letter-spacing: -.03em; }
.link[data-k="0"] .link__t { font-family: var(--mono); font-weight: 500; letter-spacing: -.02em; font-size: clamp(15px, 1.5vw, 20px); }
.link__d { font: 400 11.5px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; opacity: .6; }
.link.is-copied .link__d { font-size: 0; } .link.is-copied .link__d::after { content: "copied"; font-size: 11.5px; }
.gl .links { position: absolute; inset: 0; max-width: none; display: block; }
.gl .link { position: absolute; width: 360px; background: transparent; border-color: transparent; padding: 10px 12px; opacity: 0; transform: translateY(10px); transition: opacity .6s var(--ease), transform .6s var(--ease), background .3s, border-color .3s; }
.gl .link.is-on { opacity: 1; transform: none; }
.gl .link[data-k="0"] { left: 6vw; top: max(120px, 24vh); } .gl .link[data-k="1"] { right: 6vw; top: max(120px, 24vh); text-align: right; }
.gl .link[data-k="2"] { left: 6vw; bottom: 22vh; } .gl .link[data-k="3"] { right: 6vw; bottom: 22vh; text-align: right; }
.gl .link:focus-visible { outline: 2px solid var(--paper); }
.potline { position: absolute; left: 0; right: 0; bottom: 36px; text-align: center; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.potline a { text-decoration: none; opacity: .8; }
.potline a:hover { opacity: 1; text-decoration: underline; }
html:not(.gl) .potline { position: static; margin-top: 28px; }
html:not(.gl) .s-play .stage { min-height: auto; padding-top: 72px; padding-bottom: 60px; }

/* ---------- footer ---------- */
.foot { color: rgba(242, 242, 243, .7); background: var(--black); border-top: 1px solid var(--line-d); padding: 36px var(--gut) 44px; font-size: 13px; }
.foot__grid { display: grid; grid-template-columns: 1fr 1.2fr 2fr auto; gap: 24px; align-items: start; }
.foot__brand { color: var(--paper); font-weight: 700; }
.foot a { color: var(--paper); text-underline-offset: 2px; }
.foot__links { white-space: nowrap; }

/* ---------- inner pages ---------- */
.page { background: var(--black); color: var(--paper); }
.page .topbar { background: rgba(5, 5, 6, .82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-d); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 108px var(--gut) 72px; }
.page h1 { font: 800 clamp(40px, 6vw, 86px)/.92 var(--sans); letter-spacing: -.05em; }
.page h1 em { font: italic 400 1em/1 var(--serif); letter-spacing: -.02em; }
.page h2 { font: 700 clamp(22px, 2.4vw, 32px)/1.1 var(--sans); letter-spacing: -.03em; margin: 56px 0 14px; scroll-margin-top: 84px; }
.page h3 { font: 600 17px/1.3 var(--sans); margin: 24px 0 8px; }
.page p, .page li { color: rgba(242, 242, 243, .8); max-width: 72ch; }
.page p + p { margin-top: 10px; }
.page ul, .page ol { padding-left: 1.2em; display: grid; gap: 6px; }
.page a { color: #fff; text-underline-offset: 2px; }
.lede { font-size: 17px; margin-top: 18px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font: 400 13px/1.5 var(--mono); margin-top: 14px; }
.kv dt { opacity: .55; text-transform: uppercase; letter-spacing: .06em; font-size: 11.5px; padding-top: 2px; }
.kv dd { word-break: break-all; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line-d); border-radius: 10px; margin-top: 12px; }
table { width: 100%; border-collapse: collapse; font: 400 12.5px/1.4 var(--mono); }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid rgba(242, 242, 243, .08); white-space: nowrap; }
th { font-weight: 500; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; opacity: .55; }
tr:last-child td { border-bottom: 0; }
td.empty { text-align: center; opacity: .55; padding: 26px; white-space: normal; }
.st-pass, .st-solved { color: #fff; font-weight: 500; }
.st-fail, .st-void, .st-late { opacity: .6; }
.note { border: 1px solid var(--line-d); border-radius: 10px; padding: 14px 16px; margin-top: 14px; font-size: 14px; }
.note--warn { border-color: rgba(255, 222, 58, .5); color: #ffe98a; }
.cmd { display: flex; align-items: center; gap: 10px; background: #0f1012; border: 1px solid var(--line-d); border-radius: 10px; padding: 10px 12px; margin-top: 10px; max-width: 100%; }
.cmd code { flex: 1; font-size: 12.5px; overflow-x: auto; white-space: nowrap; }
.cmd .copy { border-color: var(--line-d); color: var(--paper); }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.toc a { font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; padding: 9px 11px; border: 1px solid var(--line-d); border-radius: 999px; }
.toc a:hover { background: rgba(242, 242, 243, .08); }
.diff { background: #0c0d0f; border: 1px solid var(--line-d); border-radius: 10px; overflow-x: auto; font: 400 12px/1.55 var(--mono); padding: 12px 0; margin-top: 12px; }
.diff div { padding: 0 14px; white-space: pre; min-width: max-content; }
.diff .add { background: rgba(80, 220, 130, .1); color: #c9f7d4; }
.diff .del { background: rgba(255, 80, 110, .1); color: #ffb3bf; }
.diff .hunk { color: rgba(242, 242, 243, .45); }
.diff .file { color: #fff; font-weight: 500; margin-top: 6px; }
.issue { background: #0c0d0f; border: 1px solid var(--line-d); border-radius: 10px; padding: 16px; white-space: pre-wrap; font: 400 13px/1.6 var(--mono); margin-top: 12px; color: rgba(242, 242, 243, .88); }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 22px; }
.stat { border: 1px solid var(--line-d); border-radius: 10px; padding: 14px 16px; }
.stat b { display: block; font: 700 26px/1.1 var(--sans); letter-spacing: -.03em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat small { display: block; font: 400 11px/1.4 var(--mono); opacity: .6; margin-top: 4px; }
.page .foot { margin-top: 40px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .console__row { grid-template-columns: 1fr 1fr; }
  .cell--win { grid-column: 1 / -1; }
  .foot__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 899px) {
  .topbar__nav > a:not(.pill) { display: none; }
  .s-arena .stage { grid-template-columns: 1fr; }
  .monitor { justify-self: stretch; }
  .stats-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .topbar { height: 56px; }
  .topbar__mark span { display: none; }
  .pill { height: 36px; padding: 0 14px; font-size: 12.5px; }
  .menu { top: 60px; width: min(260px, calc(100vw - 32px)); }
  .stage { padding: 76px 16px 28px; }
  .s-hero .stage { height: auto; min-height: 100svh; display: block; padding-bottom: 32px; }
  html:not(.gl) .s-hero { background: url(/img/hero-still-m.jpg) 50% 100%/100% auto no-repeat, linear-gradient(180deg, var(--g1) 0%, var(--g2) 60%, #c4c5c9 100%); }
  .s-hero .stage { padding-bottom: 96vw; }
  .hero__copy { padding-top: 0; }
  .hero__line { font-size: clamp(38px, 11.4vw, 52px); }
  .hero__sub { font-size: 14px; margin-top: 10px; }
  .console { margin-top: 18px; }
  .console__row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .cell { padding: 12px 12px 11px; border-radius: 12px; }
  .cell--round { grid-column: 1 / -1; }
  .big-num { font-size: 27px; }
  .cell--pot .big-num { font-size: 22px; }
  .cell--win { grid-column: auto; }
  .cell--win .cell__val { font-size: 14px; }
  .console__row--token { grid-template-columns: 1fr auto; gap: 8px; }
  .ca { grid-column: 1 / -1; justify-content: space-between; }
  .launch { grid-column: 1 / -1; order: 3; font-size: 12px; }
  .install { margin-top: 18px; }
  .install code { font-size: 11.5px; }
  .hero__down { display: none; }
  .works__caption { max-width: none; margin-top: 18px; }
  .works__title { font-size: 40px; }
  .step h3 { font-size: 48px; }
  .boards { grid-template-columns: 1fr; }
  .monitor__grid { grid-template-columns: 1fr 1fr; }
  .monitor__grid b { font-size: 22px; }
  .links { grid-template-columns: 1fr; }
  .foot__grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .wrap { padding-top: 84px; }
  .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 8px; }
}
/* ---------- wireframe labels (camera-facing, projected from 3D) ---------- */
.wl { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.wl__l { position: absolute; left: 0; top: 0; opacity: 0; white-space: nowrap; font: 500 13px/1.3 var(--mono); letter-spacing: .04em; color: var(--paper);
  padding: 5px 8px; border: 1px solid rgba(242,242,243,.35); border-radius: 6px; background: rgba(5,5,6,.78); translate: -50% -50%; will-change: transform; }
.wl__l--s { font-size: 12px; padding: 3px 6px; border-color: rgba(242,242,243,.22); }
.wl__l--c { display: grid; gap: 3px; text-align: center; padding: 7px 10px; transition: background .25s, color .25s, border-color .25s; }
.wl__l--c b { font: 600 14px/1 var(--sans); letter-spacing: -.01em; text-transform: uppercase; }
.wl__l--c span { font-size: 11.5px; opacity: .75; }
.wl__l--c.is-hot { background: var(--paper); color: var(--ink); border-color: var(--paper); box-shadow: 0 0 24px rgba(255,255,255,.35); }
.wl__term { white-space: pre; translate: 0 0; border: 0; background: transparent; font-size: 13px; line-height: 1.55; padding: 0; text-shadow: 0 0 8px rgba(0,0,0,.9); }
.wl__cur { display: inline-block; width: 8px; height: 15px; margin-left: 2px; background: var(--paper); vertical-align: -2px; }
@media (max-width: 760px) { .wl__l { font-size: 11px; } .wl__l--c b { font-size: 11px; } .wl__l--c span { display: none; } .wl__term { font-size: 9.5px; } }

/* ---------- story rail (progress) ---------- */
.rail { position: fixed; right: 18px; top: 50%; transform: translateY(-50%); z-index: 40; display: none; flex-direction: column; gap: 14px; list-style: none; }
.gl .rail { display: flex; }
.rail a { display: flex; align-items: center; justify-content: flex-end; gap: 10px; text-decoration: none; color: inherit; font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.rail a span { opacity: 0; transform: translateX(6px); transition: opacity .3s, transform .3s var(--ease); padding: 4px 6px; border-radius: 4px; background: color-mix(in srgb, var(--rail-bg) 80%, transparent); }
.rail a i { width: 8px; height: 8px; border-radius: 50%; border: 1px solid currentColor; transition: background .3s, transform .3s; }
.rail a.is-on i { background: currentColor; transform: scale(1.25); }
.rail a:hover span, .rail a:focus-visible span { opacity: 1; transform: none; }
.rail[data-theme="light"] { color: var(--ink); --rail-bg: var(--g3); } .rail[data-theme="dark"] { color: var(--paper); --rail-bg: var(--black); }

/* ---------- 3D on phones (gl-lite) ---------- */
@media (max-width: 760px) {
  .gl .rail { display: none; }
  .gl .s-hero .stage { padding-bottom: 28px; }
  .gl .s-hero .hero__line { text-shadow: 0 0 18px rgba(205,206,210,.9); }
  .gl .install li { background: rgba(243,243,244,.78); }
  .gl .step { flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 12px; padding: 0 16px 28px; }
  .gl .step h3 { font-size: 46px; }
  .gl .step p { font-size: 14.5px; margin-bottom: 0; }
  .gl .how__label { top: 72px; left: 16px; }
  .gl .s-arena .stage { display: block; padding: 0; }
  .gl .panel { position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 16px; background: rgba(5,5,6,.82); }
  .gl .panel h2 { font-size: 24px; margin-top: 8px; } .gl .panel__body { font-size: 13.5px; }
  .gl .boards { grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; padding-top: 10px; }
  .gl .monitor { display: none; }
  .gl .link { width: 46vw; padding: 8px; } .gl .link__t { font-size: 20px; } .gl .link[data-k="0"] .link__t { font-size: 13px; }
  .gl .link[data-k="0"] { left: 12px; top: 92px; } .gl .link[data-k="1"] { right: 12px; top: 92px; }
  .gl .link[data-k="2"] { left: 12px; bottom: 84px; } .gl .link[data-k="3"] { right: 12px; bottom: 84px; }
  .gl .panel { top: auto; max-height: calc(100svh - 96px); }
  .gl .works__caption { padding-bottom: 76px; } .gl .works__arrows { left: 16px; right: auto; bottom: 24px; }
}
@media (prefers-reduced-motion: reduce) { * { transition-duration: 10ms !important; animation: none !important; } }
