@font-face {
  font-family: 'Inter';
  src: url('/home/fonts/inter-latin-opsz-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --white: #ffffff;
  --ink: #000000;
  --ink-2: #5b5f64;
  --ink-3: #8d9196;
  --hair: #d3d6da;
  --glass: #f5f6f7;
  --eosin: #d4245c;
  --pad: clamp(22px, 5.6vw, 88px);
  --col: min(31rem, 33vw);
}

* { box-sizing: border-box; }
html { background: var(--white); color: var(--ink); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  font-family: 'Inter', system-ui, sans-serif;
  font-optical-sizing: auto;
  font-feature-settings: 'tnum' 1, 'cv11' 1, 'ss03' 1;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--ink); color: var(--white); }
a { color: inherit; }
i { font-style: normal; }
h1, h2, p, dl, dd, dt, ol { margin: 0; padding: 0; }
ol { list-style: none; }

canvas#specimen, canvas#marks { display: none; }

/* ---------- the dossier: how the page reads with no WebGL ---------- */
.mast { position: fixed; top: 0; left: 0; right: 0; padding: 26px var(--pad); z-index: 5; pointer-events: none; }
.mark { font-size: 13px; font-weight: 520; letter-spacing: 0.005em; }
.mast { display: flex; justify-content: space-between; align-items: baseline; }
.xlink { pointer-events: auto; font-size: 13px; font-weight: 450; color: var(--ink); text-decoration: none; padding: 4px 2px; }
.links { display: inline-flex; gap: 18px; }
.xlink:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.gauge, .scalebar { display: none; }

.descent { padding: 14vh var(--pad) 10vh; }
.ch { max-width: 34rem; padding: 10vh 0; }
.title { font-size: clamp(44px, 6.4vw, 96px); font-weight: 260; letter-spacing: -0.035em; line-height: 0.98; }
.lede { margin-top: 26px; font-size: 17px; line-height: 1.5; color: var(--ink); max-width: 26rem; font-weight: 400; }
.cue { margin-top: 44px; font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 12px; }
.cue span { display: block; width: 1px; height: 34px; background: var(--ink-3); }
h2 { font-size: 22px; font-weight: 420; letter-spacing: -0.012em; line-height: 1.25; margin-bottom: 14px; }
.ch p { color: var(--ink-2); max-width: 27rem; }
.ch p + p { margin-top: 10px; }
.ch .sub { font-size: 13px; color: var(--ink-3); }

.counts { display: grid; gap: 22px; }
.count { display: flex; flex-direction: column; }
.count .num { font-size: clamp(46px, 5.6vw, 92px); font-weight: 200; letter-spacing: -0.04em; line-height: 0.95; font-variant-numeric: tabular-nums; }
.count .num .sep { letter-spacing: -0.08em; margin-right: 0.04em; }
.count dt { font-size: 12px; color: var(--ink-2); margin-top: 8px; letter-spacing: 0.01em; }
.note { margin-top: 30px; font-size: 12px; color: var(--ink-3) !important; }

.map { display: grid; gap: 0; margin-top: 4px; border-top: 1px solid var(--hair); }
.map > div { display: grid; grid-template-columns: 1fr auto; gap: 18px; padding: 11px 0; border-bottom: 1px solid var(--hair); font-size: 13px; }
.map dt { color: var(--ink); font-weight: 460; }
.map dd { color: var(--ink-2); text-align: right; }

.window { position: relative; width: 100%; aspect-ratio: 16 / 9; background: linear-gradient(180deg, #fbfbfc, var(--glass)); border: 1px solid rgba(0, 0, 0, 0.07); overflow: hidden; margin-bottom: 34px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 34px 60px -44px rgba(20, 24, 30, 0.2); }
.window .frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.window .frame.next { opacity: 0; transition: opacity 900ms ease; }
.window .frame.next.in { opacity: 1; }
.window .tick { position: absolute; width: 14px; height: 14px; border-color: rgba(0, 0, 0, 0.32); border-style: solid; border-width: 0; pointer-events: none; z-index: 2; }
.window .tick.a { top: 10px; left: 10px; border-top-width: 1px; border-left-width: 1px; }
.window .tick.b { top: 10px; right: 10px; border-top-width: 1px; border-right-width: 1px; }
.window .tick.c { bottom: 10px; left: 10px; border-bottom-width: 1px; border-left-width: 1px; }
.window .tick.d { bottom: 10px; right: 10px; border-bottom-width: 1px; border-right-width: 1px; }
.window .sheen { position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.0) 38%, rgba(255, 255, 255, 0.28) 48%, rgba(255, 255, 255, 0.0) 60%); }

.readouts { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 6px 34px; margin-top: 22px; }
.readouts:empty { display: none; }
.ro dt { font-size: 11px; color: var(--ink-3); letter-spacing: 0.01em; }
.ro dd { font-size: 15px; font-weight: 450; margin-top: 2px; font-variant-numeric: tabular-nums; }
.ro[data-k='last'] dt::before { content: ''; display: inline-block; width: 7px; height: 1px; vertical-align: middle; margin-right: 7px; background: var(--ink); }
.ro[data-k='last'].sweet dt::before { background: var(--eosin); }

.coin { margin-top: 28px; display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: stretch; max-width: 30rem; }
.watch, .buy { display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 26px; font-size: 14px; font-weight: 500; text-decoration: none; letter-spacing: 0.005em; border-radius: 2px; transition: background-color 160ms ease, color 160ms ease; }
.watch { background: var(--ink); color: var(--white); }
.watch:hover { background: #2a2c2f; }
.buy { border: 1px solid var(--ink); color: var(--ink); background: transparent; grid-column: 2; justify-self: start; }
.buy:hover { background: var(--ink); color: var(--white); }
.ca { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; height: 46px; padding: 0 0 0 14px; border: 1px solid var(--hair); background: rgba(255, 255, 255, 0.86); border-radius: 2px; min-width: 0; }
.ca-label { font-size: 11px; color: var(--ink-3); }
.ca-value { font-family: inherit; font-size: 12px; letter-spacing: 0.02em; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ca-copy { height: 100%; border: 0; border-left: 1px solid var(--hair); background: transparent; padding: 0 16px; font: inherit; font-size: 12px; font-weight: 500; color: var(--ink); cursor: pointer; }
.ca-copy:hover { background: var(--glass); }
.coin { grid-template-rows: auto auto; }
.coin .watch { grid-row: 1; grid-column: 1; }
.coin .buy { grid-row: 1; grid-column: 2; }

a:focus-visible, button:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }

/* ---------- the descent: one fixed scene, scroll moves the camera ---------- */
html.gl body { overflow-x: hidden; }
html.gl canvas#specimen, html.gl canvas#marks { display: block; position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100lvh; }
html.gl canvas#specimen { z-index: 1; }
html.gl canvas#marks { z-index: 2; pointer-events: none; }
html.gl .descent { padding: 0; }
html.gl .descent::after { content: ''; display: block; height: var(--travel, 760vh); }
html.gl .ch { position: fixed; left: var(--pad); bottom: 13vh; width: var(--col); max-width: none; padding: 0; z-index: 3; opacity: 0; visibility: hidden; will-change: opacity, transform; }
html.gl .ch.on, html.gl #arrival { visibility: visible; }
html.gl #arrival { opacity: 1; }
html.gl .mast { transition: opacity 300ms ease; }
html.gl .gauge { display: block; position: fixed; right: calc(var(--pad) * 0.45); top: 50%; transform: translateY(-50%); z-index: 4; }
html.gl .gauge ol { display: grid; gap: 0; }
html.gl .gauge a { display: block; width: 26px; height: 18px; position: relative; }
html.gl .gauge a::after { content: ''; position: absolute; right: 0; top: 50%; width: 9px; height: 1px; background: var(--ink-3); transition: width 300ms ease, background-color 300ms ease; }
html.gl .gauge a.at::after { width: 22px; background: var(--ink); }
html.gl .scalebar { display: flex; position: fixed; right: calc(var(--pad) * 0.45 + 46px); bottom: 13vh; z-index: 4; flex-direction: column; align-items: flex-end; gap: 7px; pointer-events: none; }
html.gl .sb-line { display: block; height: 7px; border: 1px solid var(--ink); border-top: 0; width: 80px; }
html.gl .sb-text { font-size: 11px; color: var(--ink-2); font-variant-numeric: tabular-nums; }

html.gl #arrival { bottom: 15vh; }
html.gl #scale { bottom: 13vh; }
html.gl #room { left: 0; right: 0; top: 0; bottom: 0; width: auto; }
html.gl .room-window { position: fixed; z-index: 0; right: calc(var(--pad) + 34px); top: 50%; transform: translateY(-56%); width: min(46vw, 860px); margin: 0; opacity: 0; visibility: hidden; }
html.gl #room .room-text { position: absolute; left: var(--pad); bottom: 8vh; width: min(34rem, 36vw); }

.label { position: fixed; left: 0; top: 0; z-index: 3; font-size: 11px; line-height: 1.35; color: var(--ink-2); white-space: nowrap; pointer-events: none; opacity: 0; will-change: transform, opacity; padding: 4px 7px 5px; margin: -4px -7px; background: rgba(255, 255, 255, 0.94); }
.label b { display: block; font-weight: 500; color: var(--ink); font-size: 12px; }
.label.sweet b { color: var(--eosin); }

.mark { display: inline-flex; align-items: center; gap: 9px; }
.mark-logo { width: 18px; height: 18px; display: block; flex: none; }

.playing b { font-weight: 560; }
.ladder { display: grid; grid-template-columns: repeat(var(--cols, 3), auto); justify-content: start; gap: 10px 0; margin-top: 18px; }
.ladder.wide { grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); justify-content: stretch; }
.rung { padding: 1px 22px 1px 11px; border-left: 1px solid var(--hair); min-width: 0; }
.ladder.wide .rung { padding-right: 8px; }
.rung .rg { display: block; font-size: 13px; font-weight: 450; color: var(--ink-3); line-height: 1.35; }
.rung .rt { display: block; font-size: 11px; color: var(--ink-3); margin-top: 1px; line-height: 1.35; font-variant-numeric: tabular-nums; }
.rung.open { border-left-color: var(--ink-3); }
.rung.open .rg { color: var(--ink-2); }
.rung.now { border-left-color: var(--ink); }
.rung.now .rg { color: var(--ink); font-weight: 560; }
.rung.now .rt { color: var(--ink-2); }
.mcap { margin-top: 12px; font-size: 12px; color: var(--ink-3); }
.mcap b { font-size: 15px; font-weight: 450; color: var(--ink); margin-left: 8px; font-variant-numeric: tabular-nums; }
a.ca-value { text-decoration: none; }
a.ca-value:hover code { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a.ca-value code { font: inherit; }
.foot { display: flex; gap: 22px; margin-top: 20px; font-size: 12px; }
.foot a { color: var(--ink-3); text-decoration: none; }
.foot a:hover { color: var(--ink); }

.pad-art { position: fixed; z-index: 2; pointer-events: none; opacity: 0; }
.pad-art path, .pad-art circle, .pad-art rect, .pad-art line { vector-effect: non-scaling-stroke; }

@media (max-width: 760px) {
  :root { --pad: 22px; --col: auto; }
  body { font-size: 14px; }
  .mast { padding: 20px var(--pad); justify-content: flex-start; gap: 18px; }
  .xlink { color: var(--ink-2); }
  html.gl .ch { left: var(--pad); right: var(--pad); width: auto; bottom: calc(30px + env(safe-area-inset-bottom)); }
  html.gl #arrival { bottom: calc(46px + env(safe-area-inset-bottom)); }
  .title { font-size: 46px; }
  .lede { font-size: 15px; margin-top: 16px; }
  .cue { margin-top: 26px; }
  h2 { font-size: 19px; margin-bottom: 10px; }
  .count .num { font-size: 50px; }
  .counts { gap: 14px; }
  .note { margin-top: 18px; }
  html.gl .gauge { right: 4px; top: 22px; transform: none; }
  html.gl .gauge ol { display: flex; flex-direction: row; }
  html.gl .gauge a { width: 16px; height: 22px; }
  html.gl .gauge a::after { right: auto; left: 4px; top: auto; bottom: 4px; width: 1px; height: 6px; transition: height 300ms ease, background-color 300ms ease; }
  html.gl .gauge a.at::after { width: 1px; height: 14px; }
  html.gl .scalebar { right: auto; left: var(--pad); bottom: auto; top: 58px; align-items: flex-start; }
  html.gl .room-window { left: var(--pad); right: var(--pad); width: auto; top: 92px; transform: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 22px 36px -30px rgba(20, 24, 30, 0.18); }
  html.gl #room .room-text { left: var(--pad); right: var(--pad); width: auto; bottom: calc(26px + env(safe-area-inset-bottom)); }
  .readouts { grid-template-columns: repeat(2, auto); gap: 8px 26px; margin-top: 16px; }
  .coin { margin-top: 20px; grid-template-columns: 1fr auto; max-width: none; }
  .watch { padding: 0 18px; }
  .ladder, .ladder.wide { margin-top: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 0; }
  .ladder .rung { padding: 0 8px 0 10px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 7px; }
  .ladder .rung .rt { margin-top: 0; }
  .rung .rg { font-size: 12px; }
  .rung .rt { font-size: 10.5px; }
  .foot { margin-top: 14px; }
  .map > div { padding: 9px 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
