/* HyperRoot. Monochrome base, one accent (Hyperliquid mint), 1px line work, tabular numbers.
   The app fits one screen; the story below is a single pinned stage that scroll scrubs (story.js). */
:root { --bg: #f6f5f1; --bg2: #efede7; --panel: #fbfaf7; --ink: #121212; --t2: #5b5a55; --t3: #94928b; --line: #e3e0d8; --line2: #d3cfc5;
  --mint: #97fce4; --acc: #0a8f73; --acc-ink: #04241d; --up: #12915f; --dn: #cf3d42; --hover: rgba(18,18,18,.04);
  --display: 'Instrument Serif', Georgia, serif; --ui: Geist, 'Inter Tight', system-ui, sans-serif; --mono: 'Geist Mono', ui-monospace, monospace; color-scheme: light; }
:root[data-theme="dark"] { --bg: #0b0b0c; --bg2: #111112; --panel: #121213; --ink: #f2f1ec; --t2: #a3a19a; --t3: #6c6a64; --line: #222224; --line2: #2e2e31;
  --acc: #5ef0cf; --up: #3fd69a; --dn: #ff6b70; --hover: rgba(255,255,255,.04); color-scheme: dark; }

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 14px/1.5 var(--ui); -webkit-font-smoothing: antialiased; overflow-x: hidden; font-feature-settings: 'tnum' 1; }
a { color: inherit; } button { font: inherit; color: inherit; }
.mono { font-family: var(--mono); } em { font-style: normal; color: var(--acc); } .sfx { color: var(--acc); }
.grain { position: fixed; inset: -50%; z-index: 100; pointer-events: none; opacity: .06; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
:root[data-theme="dark"] .grain { mix-blend-mode: screen; opacity: .045; }

/* brand mark */
.bm { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--mint); color: var(--acc-ink); font: 700 18px/1 var(--ui); letter-spacing: -.03em; flex: none; }

/* buttons + chips */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; cursor: pointer; text-decoration: none; font: 600 13.5px var(--ui); padding: 9px 14px; border-radius: 10px; background: var(--ink); color: var(--bg); transition: transform .15s ease, opacity .15s ease, border-color .15s ease; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); } .btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn.accent { background: var(--mint); color: var(--acc-ink); } .btn.ghost { background: transparent; color: var(--ink); border-color: var(--line2); } .btn.ghost:hover { border-color: var(--ink); } .btn.ghost.on { border-color: var(--acc); }
.btn.wide { width: 100%; padding: 13px; font-size: 14.5px; } .btn.sm { padding: 7px 12px; font-size: 13px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; font-size: 13px; white-space: nowrap; background: var(--panel); }
.chip .k { color: var(--t3); } .chip b { font-weight: 600; } .chip.ca .mono { max-width: 220px; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.chip.ca .k { border-left: 1px solid var(--line); padding-left: 8px; } .chip.ca .k b { color: var(--acc); }
a.soon { pointer-events: none; } a.soon b, a.soon .mono { color: var(--t3) !important; }

/* ===================================================================== the app: one screen */
.app { height: 100vh; height: 100svh; display: grid; grid-template-columns: 64px minmax(0, 1fr); grid-template-rows: 60px minmax(0, 1fr); }
.rail { grid-row: 1 / 3; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 0; border-right: 1px solid var(--line); background: var(--bg); }
.rail .logo { margin-bottom: 12px; text-decoration: none; }
.rail nav { display: grid; gap: 4px; }
.ri { width: 46px; display: grid; justify-items: center; gap: 3px; padding: 8px 0 6px; border: 0; background: none; border-radius: 10px; cursor: pointer; color: var(--t3); }
.ri:hover { color: var(--ink); background: var(--hover); } .ri.on { color: var(--ink); background: var(--bg2); }
.ri svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; } .ri span { font-size: 10px; }
.ri.theme { margin-top: auto; } .theme .sun { display: none; } :root[data-theme="dark"] .theme .sun { display: block; } :root[data-theme="dark"] .theme .moon { display: none; }
.bar { display: flex; align-items: center; gap: 10px; padding: 0 18px; border-bottom: 1px solid var(--line); min-width: 0; }
.bar .brand { display: grid; margin-right: auto; min-width: 0; } .bar .brand b { font: 600 15px var(--ui); letter-spacing: -.01em; } .bar .brand span { font-size: 12.5px; color: var(--t2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.grid { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 12px; padding: 14px 18px; min-height: 0; }
.counters { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 14px; background: var(--panel); position: relative; }
.ctr { display: grid; gap: 1px; padding: 14px 18px; text-align: left; text-decoration: none; border: 0; border-left: 1px solid var(--line); background: none; cursor: pointer; transition: background .15s ease; }
.ctr:first-child { border-left: 0; } .ctr:hover { background: var(--hover); }
.ctr small { font-size: 12px; color: var(--t2); } .ctr b { font: 400 34px/1.1 var(--display); letter-spacing: -.01em; font-variant-numeric: tabular-nums; } .ctr span { font-size: 11.5px; color: var(--t3); }
.hn { position: absolute; right: 14px; bottom: -22px; font-size: 11.5px; color: var(--t3); z-index: 3; }
.hn summary { cursor: pointer; list-style: none; } .hn summary::-webkit-details-marker { display: none; } .hn summary::after { content: ' +'; }
.hn[open] p { position: absolute; right: 0; top: 20px; width: 460px; margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--t2); line-height: 1.55; box-shadow: 0 10px 30px rgba(0,0,0,.08); }
.hn b { color: var(--ink); font-weight: 600; }

.swipe { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr); gap: 12px; min-height: 0; margin-top: 10px; }
.panel { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); overflow: hidden; }
.panel > header { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); } .panel > header b { font-weight: 600; font-size: 13.5px; } .panel > header small { margin-left: auto; color: var(--t3); font-size: 12px; }
.pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--line2); } .pulse.on { background: var(--up); animation: pls 2s ease-in-out infinite; } @keyframes pls { 50% { opacity: .3; } }
.feed, .nl { list-style: none; margin: 0; padding: 0; overflow: auto; flex: 1; scrollbar-width: thin; }
.feed li { display: grid; grid-template-columns: 6px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 16px; border-top: 1px solid var(--line); font-size: 13px; }
.feed li:first-child { border-top: 0; } .feed li > i { width: 6px; height: 6px; border-radius: 50%; } .feed .b > i { background: var(--up); } .feed .s > i { background: var(--dn); }
.feed .tx { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--t2); } .feed .tx a { text-decoration: none; } .feed .tx b { color: var(--ink); font-weight: 500; }
.feed .b .v { color: var(--up); } .feed .s .v { color: var(--dn); } .feed .tm { font: 500 11.5px var(--mono); color: var(--t3); text-align: right; line-height: 1.35; }
.feed li.new { animation: rowin .55s cubic-bezier(.2, .7, .2, 1); } @keyframes rowin { from { opacity: 0; transform: translateY(-6px); background: var(--bg2); } }
.empty { display: grid; place-items: center; text-align: center; padding: 26px; color: var(--t3); font-size: 13px; flex: 1; gap: 10px; }
.empty .big { font: 400 26px/1.1 var(--display); color: var(--t2); }
.lb { overflow: auto; flex: 1; display: flex; flex-direction: column; }
.lb .row { display: grid; grid-template-columns: 20px minmax(0, 1.7fr) .9fr .9fr .6fr .5fr; gap: 10px; align-items: center; padding: 9px 16px; border-top: 1px solid var(--line); text-align: left; font-size: 13px; border-left: 0; border-right: 0; border-bottom: 0; background: none; cursor: pointer; width: 100%; }
.lb .row:hover { background: var(--hover); } .lb .row.hd { border-top: 0; cursor: default; font: 500 11px var(--mono); color: var(--t3); } .lb .row.hd:hover { background: none; }
.lb .rk { font: 500 11.5px var(--mono); color: var(--t3); } .lb .r { text-align: right; } .lb .dim { color: var(--t3); }
.cn { display: flex; gap: 10px; align-items: center; min-width: 0; } .cn img, .cn .ph { width: 28px; height: 28px; border-radius: 8px; object-fit: cover; flex: none; background: var(--bg2); display: grid; place-items: center; color: var(--t3); font-weight: 600; font-size: 12px; }
.cn span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cn small { display: block; font: 500 11.5px var(--mono); color: var(--t3); }
.rooted { font: 600 10.5px var(--ui); padding: 1px 6px; border-radius: 5px; background: var(--mint); color: var(--acc-ink); margin-left: 6px; }
.nl li { border-top: 1px solid var(--line); } .nl li:first-child { border-top: 0; }
.nl button { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 16px; border: 0; background: none; cursor: pointer; text-align: left; font-size: 13px; }
.nl button:hover { background: var(--hover); } .nl .mc { text-align: right; } .nl .mc small { display: block; font: 500 11px var(--mono); color: var(--t3); }
.nl li.pin { background: var(--bg2); }

.foot { display: flex; gap: 12px; align-items: center; }
.perkline, .howline { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); cursor: pointer; font-size: 13px; color: var(--t2); }
.perkline { flex: 1; min-width: 0; } .perkline > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.perkline:hover, .howline:hover { border-color: var(--line2); color: var(--ink); }
.howline svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; animation: nudge 2.4s ease-in-out infinite; } @keyframes nudge { 50% { transform: translateY(3px); } }
.badge { font: 600 11px var(--ui); padding: 3px 8px; border-radius: 99px; background: var(--mint); color: var(--acc-ink); flex: none; }
.soonlbl { margin-left: auto; font: 500 11px var(--mono); color: var(--t3); flex: none; }

/* ===================================================================== the story stage */
.story { position: relative; height: 100vh; height: 100svh; border-top: 1px solid var(--line); }
.stage { position: relative; height: 100vh; height: 100svh; overflow: hidden; background: var(--bg); }
.scene { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: 4vw; padding: 0 7vw; }
.cap { max-width: 520px; } .eb { font: 500 12px var(--mono); color: var(--t3); letter-spacing: .04em; }
.cap h2 { margin: 14px 0 16px; font: 400 clamp(44px, 5.4vw, 84px)/.98 var(--display); letter-spacing: -.02em; }
.cap h2 em { font-style: italic; } .cap p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--t2); max-width: 440px; }
.split .ch { display: inline-block; will-change: transform, opacity, filter; }
/* 1: roots */
.s1 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.roots { position: absolute; right: 9vw; top: 50%; width: min(42vw, 560px); height: auto; transform: translateY(-50%); overflow: visible; }
.roots path { fill: none; stroke: var(--ink); stroke-width: 1.2; stroke-linecap: round; opacity: .55; }
.roots path:nth-child(-n+2) { stroke: var(--acc); stroke-width: 2; opacity: 1; }
.node { position: absolute; display: grid; justify-items: center; gap: 3px; text-align: center; width: 160px; transform: translate(-50%, -50%); }
.node .ic { width: 58px; height: 58px; border-radius: 16px; border: 1px solid var(--line2); background: var(--panel); display: grid; place-items: center; margin-bottom: 6px; }
.node .ic img { width: 34px; height: 34px; border-radius: 9px; } .node .ic .bm { width: 36px; height: 36px; font-size: 21px; border-radius: 10px; }
.node b { font-size: 14px; } .node small { font-size: 12px; color: var(--t3); }
/* 2: fee split */
.fee { position: relative; display: grid; justify-items: end; gap: 0; }
.fbar { display: flex; width: min(42vw, 520px); height: 74px; border: 1px solid var(--line2); border-radius: 14px; overflow: hidden; background: var(--panel); }
.fbar span { display: grid; align-content: center; padding: 0 18px; } .fbar b { font: 400 30px/1 var(--display); } .fbar small { font-size: 12px; color: var(--t2); }
.f90 { flex: 9; } .f10 { flex: 1.6; background: var(--mint); color: var(--acc-ink); border-left: 1px solid var(--line2); } .f10 small { color: var(--acc-ink); opacity: .7; }
.drip { width: 200px; height: 220px; margin-right: 0; overflow: visible; } .drip path { fill: none; stroke: var(--acc); stroke-width: 2; stroke-linecap: round; }
.burn { display: grid; justify-items: center; width: 200px; gap: 2px; } .burn b { font: 400 54px/1 var(--display); font-variant-numeric: tabular-nums; } .burn small { color: var(--t2); font-size: 12.5px; }
.burn .fl { width: 26px; height: 26px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--acc); margin-bottom: 10px; opacity: .9; }
/* 3: the CA */
.caline { position: relative; display: flex; align-items: center; padding: 26px 30px; border: 1px solid var(--line2); border-radius: 16px; background: var(--panel); font-size: clamp(16px, 1.8vw, 26px); letter-spacing: .02em; max-width: 100%; overflow: hidden; }
#caType { white-space: pre; color: var(--ink); } .sfxbox { color: var(--acc); padding: 2px 6px; margin-left: 2px; border-radius: 7px; box-shadow: inset 0 0 0 1px currentColor; }
.caret { width: 2px; height: 1.2em; background: var(--ink); margin-left: 4px; animation: blink 1s steps(1) infinite; } @keyframes blink { 50% { opacity: 0; } }
/* 4: cost card */
.costcard { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line2); border-radius: 18px; overflow: hidden; width: min(44vw, 560px); }
.part { display: grid; gap: 4px; padding: 26px 24px; background: var(--panel); } .part small { font: 500 11.5px var(--mono); color: var(--t3); } .part b { font: 400 30px/1.05 var(--display); }
.costcard .p5 { grid-column: 1 / 3; border-radius: 0; padding: 18px; font-size: 15px; }
.progress { position: absolute; left: 7vw; bottom: 32px; display: flex; gap: 6px; } .progress i { width: 26px; height: 2px; background: var(--line2); transition: background .3s ease; } .progress i.on { background: var(--ink); }

footer { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 22px 7vw calc(26px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); font-size: 12.5px; color: var(--t3); } footer span:first-child { color: var(--t2); font-weight: 600; }

/* ===================================================================== sheets */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(10,10,10,.28); backdrop-filter: blur(2px); opacity: 0; transition: opacity .25s ease; } .scrim.on { opacity: 1; }
.sheet { position: fixed; top: 10px; right: 10px; bottom: 10px; z-index: 61; width: min(460px, calc(100vw - 20px)); display: flex; flex-direction: column; border: 1px solid var(--line2); border-radius: 18px; background: var(--panel); box-shadow: 0 30px 80px rgba(0,0,0,.18); transform: translateX(calc(100% + 20px)); transition: transform .38s cubic-bezier(.2, .8, .2, 1); }
.sheet.on { transform: none; } .sheet[hidden] { display: none; }
.sheet > header { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); } .sheet > header b { font-size: 15px; } .sheet > header small { color: var(--t3); font-size: 12px; }
.x { margin-left: auto; border: 0; background: none; font-size: 22px; line-height: 1; color: var(--t3); cursor: pointer; padding: 2px 6px; } .x:hover { color: var(--ink); }
.studio { display: grid; gap: 12px; padding: 16px 18px; overflow: auto; flex: 1; align-content: start; }
.studio label { display: grid; gap: 5px; font-size: 12px; color: var(--t2); font-weight: 500; }
.studio input, .studio textarea { width: 100%; font: 500 14px var(--ui); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; outline: 0; resize: vertical; }
.studio input:focus, .studio textarea:focus { border-color: var(--ink); } .studio input.mono { font-family: var(--mono); }
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .g3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.drop { display: flex !important; grid-template-columns: none; align-items: center; gap: 12px; padding: 10px; border: 1px dashed var(--line2); border-radius: 12px; cursor: pointer; }
.drop:hover, .drop.drag { border-color: var(--ink); } .drop .dt { display: grid; } .drop .dt b { font-size: 13.5px; color: var(--ink); } .drop .dt small { color: var(--t3); font-weight: 400; }
.pvimg { width: 52px; height: 52px; border-radius: 12px; background: var(--bg2); display: grid; place-items: center; overflow: hidden; flex: none; color: var(--t3); }
.pvimg svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; } .pvimg img { width: 100%; height: 100%; object-fit: cover; }
.fee2 { display: grid; gap: 7px; } .fee2 > span { font-size: 12px; color: var(--t2); font-weight: 500; } .fee2 small { font-size: 11.5px; color: var(--t3); }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; }
.seg button { border: 0; background: none; padding: 7px 0; border-radius: 7px; cursor: pointer; color: var(--t2); font-weight: 600; font-size: 13px; } .seg button.on { background: var(--ink); color: var(--bg); }
.steps { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; }
.steps li { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--t2); } .steps li:first-child { border-top: 0; }
.steps i { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--line2); flex: none; } .steps li.run i { border-color: var(--ink); border-top-color: transparent; animation: spin .8s linear infinite; }
.steps li.ok { color: var(--ink); } .steps li.ok i { background: var(--acc); border-color: var(--acc); } .steps li.no i { border-color: var(--dn); } @keyframes spin { to { transform: rotate(360deg); } }
.note { font-size: 12.5px; color: var(--t3); min-height: 18px; } .note.err { color: var(--dn); }
.done { padding: 12px 14px; border: 1px solid var(--acc); border-radius: 12px; display: grid; gap: 4px; font-size: 13px; } .done a { color: var(--acc); word-break: break-all; }
.cd { padding: 18px; display: grid; gap: 14px; overflow: auto; }
.cd .hd { display: flex; gap: 14px; align-items: center; } .cd .hd img, .cd .hd .ph { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; background: var(--bg2); display: grid; place-items: center; color: var(--t3); font-size: 22px; }
.cd .hd b { display: block; font: 400 30px/1.05 var(--display); } .cd .hd span { font: 500 12.5px var(--mono); color: var(--t2); }
.cd dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cd dl div { padding: 10px 12px; border-top: 1px solid var(--line); } .cd dl div:nth-child(-n+2) { border-top: 0; } .cd dl div:nth-child(even) { border-left: 1px solid var(--line); }
.cd dt { font-size: 11.5px; color: var(--t3); } .cd dd { margin: 0; font-weight: 600; } .cd .ca { font: 500 12.5px var(--mono); word-break: break-all; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.cd .links { display: flex; gap: 8px; flex-wrap: wrap; }
.perks { padding: 22px 20px; display: grid; gap: 8px; align-content: start; } .perks .badge { justify-self: start; } .perks h3 { margin: 6px 0 0; font: 400 34px/1.05 var(--display); } .perks p { margin: 0; color: var(--t2); }
.perks ul { margin: 10px 0 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 12px; } .perks li { padding: 12px 14px; border-top: 1px solid var(--line); color: var(--t2); font-size: 13.5px; } .perks li:first-child { border-top: 0; } .perks li b { color: var(--ink); }

/* install (phones) + tab bar */
.tabs { display: none; }
.install { position: fixed; left: 10px; right: 10px; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 55; display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; border-radius: 14px; border: 1px solid var(--line2); background: var(--panel); box-shadow: 0 10px 30px rgba(0,0,0,.1); }
.install[hidden] { display: none; } .install div { display: grid; flex: 1; min-width: 0; } .install b { font-size: 13.5px; } .install small { font-size: 12px; color: var(--t2); }

/* reduced motion: the story is plain stacked cards */
@media (prefers-reduced-motion: reduce) { .story, .stage { height: auto; } .scene { position: relative; inset: auto; min-height: 70vh; border-top: 1px solid var(--line); } .progress { display: none; } }

/* small laptops: fit the one screen */
@media (max-height: 760px) and (min-width: 761px) { .ctr { padding: 10px 16px; } .ctr b { font-size: 28px; } .ctr span { display: none; } }
@media (max-width: 1100px) and (min-width: 761px) { .bar .brand span { display: none; } .chip.ca .mono { max-width: 120px; } }

/* phones: rail -> tab bar, panels -> swipeable tabs */
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; grid-template-rows: 54px minmax(0, 1fr); height: 100svh; }
  .rail { display: none; }
  .bar { padding: 0 12px; gap: 8px; } .bar .brand span, .bar .wallet, .bar > .btn.accent, .chip.ca .k { display: none; } .chip { height: 32px; padding: 0 10px; font-size: 12px; } .chip.ca .mono { max-width: 92px; }
  .grid { padding: 10px 0 calc(64px + env(safe-area-inset-bottom)); gap: 10px; grid-template-rows: auto minmax(0, 1fr) auto; }
  .counters { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 12px; scrollbar-width: none; } .counters::-webkit-scrollbar { display: none; }
  .ctr { flex: 0 0 46%; scroll-snap-align: start; padding: 10px 14px; } .ctr b { font-size: 26px; } .ctr span { display: none; } .hn { display: none; }
  .swipe { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 0; margin-top: 0; scrollbar-width: none; } .swipe::-webkit-scrollbar { display: none; }
  .swipe .panel { flex: 0 0 100%; scroll-snap-align: start; margin: 0 12px; flex-basis: calc(100% - 24px); }
  .lb .row { grid-template-columns: 18px minmax(0, 1.7fr) .9fr .9fr; } .lb .row > :nth-child(5), .lb .row > :nth-child(6) { display: none; }
  .foot { padding: 0 12px; } .howline { display: none; }
  .tabs { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--bg); }
  .tabs button { flex: 1; border: 0; background: none; padding: 9px 0; border-radius: 10px; font-size: 12.5px; font-weight: 600; color: var(--t3); cursor: pointer; } .tabs button.on { color: var(--ink); background: var(--bg2); } .tabs .tl { color: var(--acc-ink); background: var(--mint); margin: 0 4px; }
  .scene, .s1 { grid-template-columns: 1fr; align-content: center; padding: 0 22px; gap: 22px; }
  .cap h2 { font-size: 44px; } .cap p { font-size: 14.5px; }
  .roots { position: relative; right: auto; top: auto; transform: none; width: 100%; max-height: 42vh; }
  .node { width: 120px; } .node .ic { width: 46px; height: 46px; } .node .ic img { width: 26px; height: 26px; } .node small { display: none; }
  .fbar, .costcard { width: 100%; } .fee { justify-items: center; } .drip { height: 130px; } .burn b { font-size: 40px; }
  .part { padding: 18px 16px; } .part b { font-size: 22px; } .progress { left: 22px; bottom: calc(76px + env(safe-area-inset-bottom)); }
  .sheet { top: auto; left: 0; right: 0; bottom: 0; width: 100%; height: 92svh; border-radius: 18px 18px 0 0; transform: translateY(100%); }
  .g3 { grid-template-columns: 1fr; }
}
.caline .ex { position: absolute; top: 8px; left: 12px; font-size: 10.5px; color: var(--t3); letter-spacing: .04em; }
.caline { font-size: clamp(12px, 1.22vw, 19px); width: 100%; }
.node b, .node small { background: var(--bg); padding: 0 5px; border-radius: 4px; }
.costcard .p5 { transition: none; }
@media (max-width: 760px) { .caline { font-size: 2.55vw; padding: 22px 12px; } }
@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); } .bar, .grid, .counters, .swipe, .foot { min-width: 0; }
  .bar > .chip:not(.ca) { display: none; } .bar .brand { margin-right: auto; }
}
/* before story.js takes over (slow networks), only the first scene shows; if the libraries never load, the scenes stack */
html.js-story .scene:not(.s1) { visibility: hidden; }
html.static-story .story, html.static-story .stage { height: auto; }
html.static-story .scene { position: relative; inset: auto; min-height: 70vh; visibility: visible !important; border-top: 1px solid var(--line); }
@media (max-width: 760px) { .f10 { flex: 3.2; } .fbar span { padding: 0 12px; } .fbar b { font-size: 24px; } }
/* the $ROOT coin in place of the letter mark */
.bm.img { background: none; padding: 0; overflow: hidden; border-radius: 50%; } .bm.img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* search: any CA, or a ticker / name among coins here */
.search { position: relative; display: flex; align-items: center; gap: 8px; height: 36px; width: min(340px, 30vw); padding: 0 10px; border: 1px solid var(--line2); border-radius: 10px; background: var(--panel); }
.search:focus-within { border-color: var(--mint); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mint) 22%, transparent); }
.search svg { width: 16px; height: 16px; fill: none; stroke: var(--t3); stroke-width: 1.8; stroke-linecap: round; flex: none; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); font: 500 13px var(--ui); }
.search input::placeholder { color: var(--t3); }
.search kbd { font: 500 11px var(--mono); color: var(--t3); border: 1px solid var(--line2); border-radius: 5px; padding: 1px 6px; }
.sres { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 70; padding: 6px; border: 1px solid var(--line2); border-radius: 12px; background: var(--panel); box-shadow: 0 18px 40px rgba(0,0,0,.12); display: grid; gap: 2px; }
.sres[hidden] { display: none; }
.sr { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border: 0; border-radius: 8px; background: none; color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.sr:hover, .sr:focus-visible { background: var(--bg2); outline: 0; }
.sr img, .sr .ph { width: 28px; height: 28px; border-radius: 8px; object-fit: cover; background: var(--bg2); display: grid; place-items: center; font: 600 10px var(--mono); color: var(--t2); flex: none; }
.sr b { display: block; font: 600 13px var(--ui); } .sr small { font: 500 11.5px var(--ui); color: var(--t3); }
.sr.none { margin: 6px 8px; font-size: 12.5px; color: var(--t3); cursor: default; }
.cd .note, .docs .note { font-size: 13px; color: var(--t2); padding: 10px 12px; border-radius: 10px; background: var(--bg2); }
.cd .muted { color: var(--t3); }

/* docs: a wide sheet with a table of contents */
.sheet.wide { width: min(860px, calc(100vw - 20px)); }
.docs { display: grid; grid-template-columns: 180px 1fr; min-height: 0; flex: 1; }
.toc { display: grid; align-content: start; gap: 2px; padding: 16px 10px; border-right: 1px solid var(--line); }
.toc a { padding: 7px 10px; border-radius: 8px; color: var(--t2); text-decoration: none; font: 500 13px var(--ui); }
.toc a:hover { color: var(--ink); background: var(--bg2); } .toc a.on { color: var(--ink); background: var(--bg2); box-shadow: inset 2px 0 0 var(--mint); }
.docs article { overflow: auto; padding: 8px 26px 40px; scroll-behavior: smooth; }
.docs section { padding: 18px 0; border-bottom: 1px solid var(--line); }
.docs h3 { font: 400 30px/1.1 var(--display); letter-spacing: -.01em; margin: 0 0 10px; }
.docs p, .docs li { font: 400 14.5px/1.65 var(--ui); color: var(--t2); } .docs p b, .docs li b { color: var(--ink); }
.docs ol { padding-left: 20px; margin: 0; display: grid; gap: 6px; }
.docs table { width: 100%; border-collapse: collapse; font: 500 14px var(--ui); } .docs td { padding: 10px 0; border-bottom: 1px solid var(--line); } .docs td:last-child { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }
.docs .addr { display: grid; gap: 10px; margin: 0; } .docs .addr dt { font: 500 12px var(--ui); color: var(--t3); } .docs .addr dd { margin: 2px 0 0; font-size: 12.5px; word-break: break-all; color: var(--ink); }
.docs details { border-bottom: 1px solid var(--line); padding: 10px 0; } .docs summary { cursor: pointer; font: 600 14.5px var(--ui); color: var(--ink); } .docs details p { margin: 8px 0 0; }
@media (max-width: 1100px) and (min-width: 761px) { .search { width: 220px; } .search kbd { display: none; } }
@media (max-width: 760px) {
  .search { width: auto; flex: 1; height: 32px; } .search kbd { display: none; }
  .docs { grid-template-columns: 1fr; } .toc { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; } .toc a { white-space: nowrap; }
  .docs article { padding: 4px 16px 40px; } .docs h3 { font-size: 26px; }
}

/* ------------------------------------------------------------ the first screen: the film inside a coin-shaped lens.
   Scrolling (pinned, scrubbed in story.js) opens the lens from a circle to the full frame while the copy steps back. */
.intro { position: relative; height: 100vh; height: 100svh; }
.intro-pin { position: relative; height: 100vh; height: 100svh; overflow: hidden; background:
  radial-gradient(120% 80% at 50% 120%, color-mix(in srgb, var(--mint) 26%, transparent), transparent 60%), var(--bg); }
.ibar { position: absolute; z-index: 5; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 18px; padding: 18px 28px; }
.ilogo { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; margin-right: auto; } .ilogo b { font: 600 16px var(--ui); letter-spacing: -.01em; }
.ibar nav { display: flex; gap: 4px; } .ibar nav button { border: 0; background: none; padding: 8px 12px; border-radius: 9px; font: 500 13.5px var(--ui); color: var(--t2); cursor: pointer; } .ibar nav button:hover { color: var(--ink); background: var(--bg2); }
.icopy { position: absolute; z-index: 3; left: clamp(20px, 6vw, 96px); top: 50%; transform: translateY(-50%); width: min(560px, 44vw); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 500 12.5px var(--mono); color: var(--t2); } .eyebrow i { width: 4px; height: 4px; border-radius: 50%; background: var(--t3); }
.icopy h1 { margin: 18px 0 18px; font: 400 clamp(52px, 6.6vw, 108px)/.95 var(--display); letter-spacing: -.025em; } .icopy h1 em { font-style: italic; color: var(--mint-ink, #0b9e82); }
.icopy p { margin: 0; max-width: 470px; font: 400 16px/1.6 var(--ui); color: var(--t2); }
.icta { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; } .btn.big { height: 46px; padding: 0 22px; font-size: 14.5px; border-radius: 12px; }
.ifilm { position: absolute; z-index: 2; inset: 0; margin: 0; pointer-events: none; }
/* the lens is the film's own paper colour, so the letterbox round the 16:9 frame disappears inside the circle; the frame is
   sized to the circle (its text fits the coin) and grows to cover the screen as the circle opens */
.ifilm .lens { position: absolute; inset: 0; clip-path: circle(var(--r, 23vmin) at var(--cx, 72%) var(--cy, 52%)); background: #fbfbf9; }
.ifilm video { position: absolute; left: var(--cx, 72%); top: var(--cy, 52%); width: var(--vw, calc(23vmin * 2.5)); aspect-ratio: 16 / 9; translate: -50% -50%; display: block; object-fit: cover;
  -webkit-mask-image: linear-gradient(transparent, #000 var(--fe, 9%), #000 calc(100% - var(--fe, 9%)), transparent); mask-image: linear-gradient(transparent, #000 var(--fe, 9%), #000 calc(100% - var(--fe, 9%)), transparent); }
.ifilm .ring { position: absolute; left: var(--cx, 72%); top: var(--cy, 52%); width: calc(var(--r, 23vmin) * 2 + 22px); height: calc(var(--r, 23vmin) * 2 + 22px); translate: -50% -50%; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--mint) 70%, transparent); box-shadow: 0 0 0 10px color-mix(in srgb, var(--mint) 10%, transparent), 0 30px 80px -20px rgba(11,28,25,.35); opacity: var(--ro, 1); }
.ifilm .ring::after { content: ''; position: absolute; inset: -12px; border-radius: 50%; border: 1px dashed color-mix(in srgb, var(--mint) 55%, transparent); animation: ringspin 40s linear infinite; }
@keyframes ringspin { to { rotate: 360deg } }
.ifilm .snd { pointer-events: auto; position: absolute; z-index: 4; left: min(calc(var(--cx, 72%) + var(--r, 23vmin) * .62), calc(100% - 64px)); top: min(calc(var(--cy, 52%) + var(--r, 23vmin) * .62), calc(100% - 64px)); width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line2); background: var(--panel); display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.ifilm .snd svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; } .ifilm .snd .wave { display: none; } .ifilm .snd.on .wave { display: block; } .ifilm .snd.on .mute { display: none; }
.ifilm figcaption { position: absolute; left: var(--cx, 72%); top: calc(var(--cy, 52%) + var(--r, 23vmin) + 30px); translate: -50% 0; font: 500 12px var(--mono); color: var(--t3); opacity: var(--ro, 1); white-space: nowrap; } .ifilm figcaption span { color: var(--t2); margin-left: 6px; }
.iscroll { position: absolute; z-index: 3; left: 50%; bottom: 22px; translate: -50% 0; display: grid; justify-items: center; gap: 6px; font: 500 11px var(--mono); color: var(--t3); }
.iscroll span { width: 1px; height: 34px; background: linear-gradient(var(--t3), transparent); animation: drip 2.2s ease-in-out infinite; transform-origin: top; } @keyframes drip { 0% { scale: 1 0 } 50% { scale: 1 1 } 100% { scale: 1 1; opacity: 0 } }
@media (max-width: 760px) {
  .ibar { padding: 14px 16px; } .ibar nav { display: none; } .ilogo b { font-size: 15px; }
  .icopy { left: 16px; right: 16px; width: auto; top: 96px; transform: none; } .icopy h1 { font-size: clamp(44px, 12vw, 64px); margin: 12px 0; } .icopy p { font-size: 14.5px; }
  .ifilm { --cx: 50%; --cy: 74%; --r: 21vh; } .iscroll { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ifilm .ring::after, .iscroll span { animation: none; } }
[data-theme="dark"] .icopy h1 em { color: var(--mint); }

/* phone: the app's tab bar waits until the app itself is on screen (the first screen and the story come first) */
@media (max-width: 820px) { .tabs { transition: transform .35s cubic-bezier(.2, .8, .2, 1); } html:not(.in-app) .tabs { transform: translateY(110%); } html:not(.in-app) .install { display: none; } }
