/*
  TOKENS: the only file in the source tree that may contain colour literals.

  Palette provenance
  Method: k-means (k=6, seed 1) over brand/LOGO APHELION PNG.png (2000x2000, IHDR colour type 2),
  every cluster centre snapped to the nearest real pixel; coordinates are (x, y) in that file.
  Ink was cross-checked against brand/LOGO APHELION PNG...png (colour type 6, opaque ink pixels
  cluster at rgb 5,6,7; its transparent region is pure black and was resized premultiplied).
  Mint and violet are not present in the logo: they are the extreme-saturation pixels of the
  gradient mark in reference/APHELION 1.jpg.jpeg, snapped to real pixel coordinates.
  tools/verify_palette.py re-reads each coordinate and fails the gate if a value drifts.
*/
:root {
  /* ink     logo PNG (1007, 640) */ --ink: #050608;
  /* paper   logo PNG (1288, 0)   */ --paper: #edeff9;
  /* silver  logo PNG (420, 0)    */ --silver: #dfe3f1;
  /* mist    logo PNG (1996, 144) */ --mist: #d1d8e8;
  /* steel   logo PNG (1989,1033) */ --steel: #c3cbde;
  /* graphite logo PNG (1032,1342)*/ --graphite: #666970;
  /* mint    reference 1 (249, 34)*/ --mint: #13f6cb;
  /* violet  reference 1 (238, 47)*/ --violet: #9064ff;

  /* semantic aliases, no new literals */
  --color-bg: var(--paper);
  --color-fg: var(--ink);
  --color-muted: var(--graphite);
  --color-mint: var(--mint);
  --color-violet: var(--violet);
  --color-line: color-mix(in srgb, var(--ink) 14%, transparent);
  --color-grid: color-mix(in srgb, var(--ink) 7%, transparent);
}

/* Layout, type scale, easing and timings follow values measured off the reference
   (type clamps, gutter, 12 col grid, cubic-bezier(.16,1,.3,1), .5 to .7s transitions, 2px rules). */
:root {
  --f: "Funnel Display", "Helvetica Neue", Arial, sans-serif;
  --t-mega: clamp(3.4rem, .9rem + 10.6vw, 11.5rem);
  --t-hero: clamp(3.1rem, .5rem + 9.4vw, 9.6rem);
  --t-xl: clamp(2.4rem, 1.2rem + 5vw, 6.2rem);
  --t-l: clamp(1.6rem, 1.15rem + 1.9vw, 2.9rem);
  --t-m: clamp(1.2rem, 1.06rem + .6vw, 1.6rem);
  --t-body: clamp(1rem, .96rem + .18vw, 1.125rem);
  --t-s: .875rem;
  --t-xs: .8125rem;
  --u: clamp(.5rem, .35rem + .6vw, 1rem);
  --gutter: clamp(1rem, .55rem + 1.9vw, 2.5rem);
  --pill: 999px;
  --line-y: 62%;
  --label-w: clamp(10rem, 7rem + 8vw, 15rem);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
  --top-h: 7.5rem;
  --tap: 2.75rem;
}
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: none; text-size-adjust: none; background: var(--color-bg); color: var(--color-fg); scroll-behavior: smooth; scroll-padding-top: var(--top-h); }
body { min-height: 100dvh; font-family: var(--f); font-size: var(--t-body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; line-height: 1.5; overflow-x: clip; background: var(--color-bg); }
img, svg, canvas { max-width: 100%; display: block; }
img { height: auto; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-weight: inherit; font-size: inherit; text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--color-fg); outline-offset: 3px; border-radius: 2px; }
#main:focus { outline: none; }
::selection { background: var(--color-fg); color: var(--color-bg); }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: var(--gutter); top: var(--gutter); z-index: 200; padding: .6em 1em; background: var(--color-fg); color: var(--color-bg); transform: translateY(-200%); }
.skip:focus-visible { transform: none; }
.draw { background: linear-gradient(currentColor 0 0) 0 100% / 0% 1.5px no-repeat; padding-bottom: .2em; transition: background-size .5s var(--ease); }
@media (hover: hover) { .draw:hover { background-size: 100% 1.5px; } }
.draw:focus-visible { background-size: 100% 1.5px; }

/* scroll progress */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 120; pointer-events: none; }
.progress span { display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--mint), var(--violet)); }

/* top stack: frame + contract slot, always on screen */
.top { position: fixed; inset: 0 0 auto 0; z-index: 100; background: color-mix(in srgb, var(--color-bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--color-line); }
.frame { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .3rem var(--gutter); min-height: 3.5rem; }
.frame__brand { min-width: var(--tap); display: inline-flex; align-items: center; gap: .6rem; min-height: var(--tap); font-weight: 650; font-size: 1.15rem; letter-spacing: -.03em; }
.frame__brand img { width: 2rem; height: 2rem; }
.frame__nav { display: flex; align-items: center; gap: clamp(1.1rem, 2.4vw, 2.4rem); font-size: .98rem; font-weight: 500; }
.frame__nav > a { display: inline-flex; align-items: center; justify-content: center; min-width: var(--tap); min-height: var(--tap); background-position: 0 calc(50% + .75em); }
.frame__social { display: inline-flex; gap: .25rem; align-items: center; }
.xbtn { position: relative; display: inline-grid; place-items: center; width: var(--tap); height: var(--tap); border: 1.5px solid currentColor; border-radius: 50%; background: linear-gradient(currentColor 0 0) 100% / 0% 100% no-repeat; transition: background-size .5s var(--ease), opacity .3s; }
.xbtn svg { width: 1.05rem; height: 1.05rem; fill: currentColor; transition: fill .3s; }
a.xbtn:hover, a.xbtn:focus-visible { background-position: 0; background-size: 100% 100%; }
a.xbtn:hover svg, a.xbtn:focus-visible svg { fill: var(--color-bg); }
.xbtn.is-inert { opacity: .42; cursor: default; border-style: dashed; }

/* contract slot */
.ca { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .15rem 1rem; width: 100%; padding: .55rem var(--gutter) .65rem; border-top: 1px solid var(--color-line); text-align: left; font-family: var(--f); position: relative; overflow: hidden; }
.ca__label { font-size: var(--t-xs); color: var(--color-muted); letter-spacing: .02em; }
.ca__value { font-size: clamp(1rem, .75rem + 1.2vw, 1.9rem); font-weight: 650; letter-spacing: -.02em; line-height: 1.15; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; flex: 1 1 14rem; }
.ca__act { display: inline-flex; align-items: center; justify-content: center; min-width: var(--tap); min-height: var(--tap); padding: 0 1.1rem; border: 1.5px solid var(--color-fg); border-radius: var(--pill); font-size: .9rem; font-weight: 600; transition: background .35s var(--ease), color .35s var(--ease); }
button.ca { cursor: pointer; }
button.ca:hover .ca__act, button.ca:focus-visible .ca__act, button.ca.is-copied .ca__act { background: var(--color-fg); color: var(--color-bg); }
button.ca.is-copied .ca__act { background: var(--mint); color: var(--ink); border-color: var(--mint); }
.ca[aria-disabled="true"] .ca__value { color: var(--color-muted); font-weight: 450; }
button.ca::before, .tr::before, .panel::before, .step::before, .fact::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s var(--ease); background: radial-gradient(18rem circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--mint) 20%, transparent), transparent 62%); }
@media (hover: hover) { button.ca:hover::before, .tr:not(.th):hover::before, .panel:hover::before, .step:hover::before, .fact:hover::before { opacity: 1; } }

/* buttons */
.btn { position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; min-height: 3.25rem; padding: 0 1.7rem; border: 1.5px solid var(--color-fg); border-radius: var(--pill); font-weight: 600; letter-spacing: -.01em; overflow: clip; transition: scale .25s var(--ease); }
.btn__fill { position: absolute; inset: 0; z-index: -1; background: var(--color-fg); transform: scaleX(0); transform-origin: 100% 50%; transition: transform .55s var(--ease); }
.btn__label { transition: color .35s var(--ease); }
.btn--solid { background: var(--color-fg); color: var(--color-bg); }
.btn--solid .btn__fill { background: var(--color-bg); }
@media (hover: hover) { .btn:hover .btn__fill { transform-origin: 0 50%; transform: scaleX(1); } .btn:hover .btn__label { color: var(--color-bg); } .btn--solid:hover .btn__label { color: var(--color-fg); } }
.btn:focus-visible .btn__fill { transform-origin: 0 50%; transform: scaleX(1); }
.btn:focus-visible .btn__label { color: var(--color-bg); }
.btn--solid:focus-visible .btn__label { color: var(--color-fg); }
.btn:active { scale: .97; }

/* hero */
.hero { position: relative; height: 100svh; min-height: 36rem; overflow: clip; }
.hero__mesh { position: absolute; inset: 0; pointer-events: none; filter: blur(48px); }
.hero__mesh i { position: absolute; border-radius: 50%; opacity: .55; will-change: transform; }
.hero__mesh i:nth-child(1) { width: 46vw; height: 46vw; left: -8vw; top: 8%; background: radial-gradient(circle, color-mix(in srgb, var(--mint) 55%, transparent), transparent 68%); animation: drift 24s ease-in-out infinite alternate; }
.hero__mesh i:nth-child(2) { width: 52vw; height: 52vw; right: -12vw; top: -6%; background: radial-gradient(circle, color-mix(in srgb, var(--violet) 50%, transparent), transparent 68%); animation: drift 30s ease-in-out -8s infinite alternate-reverse; }
.hero__mesh i:nth-child(3) { width: 40vw; height: 40vw; left: 34%; bottom: -14%; background: radial-gradient(circle, color-mix(in srgb, var(--steel) 90%, transparent), transparent 68%); animation: drift 27s ease-in-out -14s infinite alternate; }
@keyframes drift { from { translate: 0 0; scale: 1; } to { translate: 5vw -4vh; scale: 1.18; } }
.hero__stage { position: relative; height: 100%; }
.hero__title { letter-spacing: -.045em; }
.hero__over, .hero__under { position: absolute; left: var(--gutter); display: block; will-change: transform; }
.hero__over { bottom: calc(100% - var(--line-y) + .16em); margin-left: -.06em; font-size: var(--t-hero); font-weight: 650; line-height: .9; z-index: 2; }
.hero__under { top: calc(var(--line-y) + .22em); max-width: 58%; margin-left: -.04em; font-size: clamp(1.7rem, .8rem + 3.6vw, 4.4rem); font-weight: 300; line-height: 1.02; letter-spacing: -.04em; }
.art { position: absolute; z-index: 1; top: var(--line-y); right: calc(var(--gutter) + var(--label-w) + 1rem); width: min(34vw, 32rem); aspect-ratio: 960 / 606; translate: 0 -100%; margin-top: -.75rem; pointer-events: none; }
.art img { position: absolute; inset: 0; width: 100%; height: 100%; will-change: transform; filter: drop-shadow(0 1.2rem 1.6rem color-mix(in srgb, var(--ink) 18%, transparent)); }
.pline { position: absolute; left: 0; right: 0; top: var(--line-y); height: 0; z-index: 1; }
.pline__rule, .pline__ticks { position: absolute; left: var(--gutter); right: calc(var(--gutter) + var(--label-w)); }
.pline__rule { top: -1px; height: 2px; background: var(--color-fg); transform-origin: 0 50%; }
.pline__ticks { top: 1px; height: .55rem; background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--ink) 24%, transparent) 0 1px, transparent 1px 4rem); background-position-x: var(--tick, 0px); }
.pline__dot { position: absolute; top: -.4rem; right: calc(var(--gutter) + var(--label-w) - .4rem); width: .8rem; height: .8rem; border-radius: 50%; background: var(--color-fg); box-shadow: 0 0 0 .45rem color-mix(in srgb, var(--ink) 8%, transparent); }
.pline__ping { position: absolute; top: -1.1rem; right: calc(var(--gutter) + var(--label-w) - 1.1rem); width: 2.2rem; height: 2.2rem; border: 1.5px solid var(--color-fg); border-radius: 50%; opacity: 0; animation: ping 2.6s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(.4); opacity: .5; } 100% { transform: scale(2); opacity: 0; } }
.pline__label { position: absolute; top: 0; right: var(--gutter); width: calc(var(--label-w) - 1.4rem); translate: 0 -50%; display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; font-size: var(--t-m); font-weight: 600; letter-spacing: -.02em; }
.hero__aside { position: absolute; right: var(--gutter); bottom: calc(var(--gutter) * 1.6); width: min(27rem, 29%); }
.hero__lede { margin-bottom: 1.4rem; font-size: 1.125rem; line-height: 1.5; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .7rem; }
.hero__meta { position: absolute; left: var(--gutter); bottom: calc(var(--gutter) * 1.6); display: flex; gap: 1.4rem; font-size: var(--t-xs); color: var(--color-muted); }

/* slots: label plus pending only */
.slot { display: inline-flex; flex-direction: column; gap: .1rem; }
.slot__state { font-style: normal; color: var(--color-muted); font-weight: 450; letter-spacing: 0; font-size: .75em; }
.slot__label { font-size: var(--t-xs); color: var(--color-muted); font-weight: 450; letter-spacing: 0; }
.pline__label .slot { flex-direction: row; align-items: baseline; justify-content: space-between; width: 100%; }

/* ticker */
.ticker { border-block: 1px solid var(--color-line); overflow: hidden; background: color-mix(in srgb, var(--silver) 55%, transparent); }
.ticker__track { display: flex; width: max-content; animation: marquee 64s linear infinite; }
.ticker__track:hover { animation-play-state: paused; }
.ticker__row { display: flex; flex: none; gap: 0; }
.chip { display: inline-flex; align-items: center; gap: .6rem; min-height: 3.25rem; padding: 0 1.4rem; border-right: 1px solid var(--color-line); font-size: var(--t-s); white-space: nowrap; font-variant-numeric: tabular-nums; }
.chip b { font-weight: 650; letter-spacing: -.01em; }
.chip .up { color: var(--color-fg); }
.chip--sk { width: 11rem; }
@keyframes marquee { to { transform: translateX(-50%); } }
.ticker[data-empty] .ticker__track { animation: none; }

/* tiles and dots */
.mark { flex: none; display: grid; place-items: center; width: 2.3rem; height: 2.3rem; border-radius: 50%; overflow: hidden; border: 1.5px solid var(--color-fg); background: var(--color-bg); font-weight: 650; font-size: .95rem; }
.mark img { width: 100%; height: 100%; object-fit: cover; }
.mark--sm { width: 1.5rem; height: 1.5rem; font-size: .7rem; border-width: 1px; }
.mark--logo { background: var(--paper); padding: .2rem; border-color: var(--color-line); }
.mark--logo img { object-fit: contain; }

/* board */
.board { padding: calc(var(--u) * 10) var(--gutter) calc(var(--u) * 10); }
.board__head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: end; margin-bottom: calc(var(--u) * 4); }
.board__title { grid-column: 1 / span 7; font-size: var(--t-xl); font-weight: 650; letter-spacing: -.045em; line-height: .92; margin-left: -.05em; }
.board__intro { grid-column: 9 / span 4; font-size: var(--t-s); color: var(--color-muted); max-width: 22rem; }
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 2rem; margin-bottom: calc(var(--u) * 1.4); }
.seg { display: inline-flex; gap: 1.6rem; }
.seg button { min-height: var(--tap); padding: .35rem 0; font-size: var(--t-m); font-weight: 550; letter-spacing: -.02em; color: var(--color-muted); background: linear-gradient(var(--color-fg) 0 0) left bottom / 0% 2px no-repeat; transition: background-size .5s var(--ease), color .3s; }
.seg button.on { color: var(--color-fg); background-size: 100% 2px; }
@media (hover: hover) { .seg button:hover { color: var(--color-fg); background-size: 100% 2px; } }
.status { display: inline-flex; align-items: center; gap: .55rem; min-height: var(--tap); padding: 0 .9rem; border: 1px solid var(--color-line); border-radius: var(--pill); font-size: var(--t-xs); font-weight: 600; }
.status__dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--graphite); }
.status[data-state="live"] .status__dot { background: var(--mint); animation: live 1.8s ease-out infinite; }
.status[data-state="retry"] .status__dot, .status[data-state="offline"] .status__dot { background: var(--violet); }
@keyframes live { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--mint) 75%, transparent); } 100% { box-shadow: 0 0 0 .6rem transparent; } }
.table { border-top: 1.5px solid var(--color-fg); }
.tr { position: relative; display: grid; grid-template-columns: 1.7fr 1fr .8fr 1.1fr 1.1fr 3.25rem; gap: var(--gutter); align-items: center; min-height: 4.6rem; padding: .7rem 0; border-bottom: 1px solid var(--color-line); transition: background .3s; overflow: hidden; }
.tr > * { position: relative; z-index: 1; min-width: 0; }
.tr.th { min-height: 0; padding: .7rem 0; font-size: var(--t-xs); color: var(--color-muted); }
.tr.th::before { display: none; }
.num { font-weight: 550; font-size: var(--t-m); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.num[data-label]::before { content: attr(data-label); display: none; font-size: var(--t-xs); color: var(--color-muted); font-weight: 450; letter-spacing: 0; }
.token { display: inline-flex; align-items: center; gap: .8rem; min-width: 0; }
.token__t { display: grid; line-height: 1.2; min-width: 0; }
.token__t b { font-size: 1.05rem; font-weight: 650; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.token__t small { font-size: var(--t-xs); color: var(--color-muted); font-variant-numeric: tabular-nums; }
.chg { display: inline-flex; align-items: center; gap: .3rem; width: fit-content; padding: .1rem .55rem; border-radius: var(--pill); font-size: var(--t-s); font-weight: 600; font-variant-numeric: tabular-nums; }
.chg.is-up { background: var(--mint); color: var(--ink); }
.chg.is-down { background: var(--violet); color: var(--ink); }
.chg.is-flat { color: var(--color-muted); }
.copy { display: inline-grid; place-items: center; width: var(--tap); height: var(--tap); border: 1.5px solid var(--color-line); border-radius: 50%; justify-self: end; transition: background .35s var(--ease), border-color .35s, color .35s; }
.copy svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .copy:hover { background: var(--color-fg); color: var(--color-bg); border-color: var(--color-fg); } }
.copy.is-copied { background: var(--mint); border-color: var(--mint); color: var(--ink); }
.copy.is-off { border-style: dashed; opacity: .4; cursor: default; }
.flash-up { animation: flashUp 1s var(--ease); }
.flash-down { animation: flashDown 1s var(--ease); }
@keyframes flashUp { 0% { background: color-mix(in srgb, var(--mint) 60%, transparent); } 100% { background: transparent; } }
@keyframes flashDown { 0% { background: color-mix(in srgb, var(--violet) 55%, transparent); } 100% { background: transparent; } }
.dash { color: var(--color-muted); }

/* own token row */
.tr--own { border-left: 2px solid var(--color-mint); padding-left: .9rem; animation: ownPulse 2s ease-in-out infinite; }
@keyframes ownPulse { 0%, 100% { background-color: color-mix(in srgb, var(--mint) 3%, transparent); } 50% { background-color: color-mix(in srgb, var(--mint) 11%, transparent); } }
.tr--own.is-placeholder .copy { display: none; }

/* skeleton + stagger */
.sk { display: block; border-radius: .4rem; min-height: 1rem; background: linear-gradient(90deg, var(--silver) 0 30%, var(--paper) 50%, var(--silver) 70% 100%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -300% 0; } }
.tr.is-sk .sk--c { width: 2.3rem; height: 2.3rem; border-radius: 50%; }
.row-in { opacity: 0; transform: translateY(.7rem); }
.row-in.is-shown { opacity: 1; transform: none; transition: opacity .6s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i, 0) * 45ms); }
.board__error { margin-top: 1rem; padding: .8rem 1rem; border-left: 2px solid var(--violet); background: color-mix(in srgb, var(--violet) 8%, transparent); font-size: var(--t-s); }

/* flow (sticky comparison) */
.flow { position: relative; height: 260svh; border-top: 1px solid var(--color-line); }
.flow__stage { position: sticky; top: 0; height: 100svh; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: calc(var(--u) * 3); padding: calc(var(--gutter) * 2.8 + 3rem) var(--gutter) calc(var(--gutter) * 1.2); }
.flow__head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: end; }
.flow__title { grid-column: 1 / span 7; font-size: var(--t-xl); font-weight: 650; letter-spacing: -.045em; line-height: .92; margin-left: -.05em; }
.flow__note { grid-column: 9 / span 4; font-size: var(--t-s); color: var(--color-muted); max-width: 22rem; }
.flow__panels { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); min-height: 0; }
.panel { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: calc(var(--u) * 1.4); min-height: 0; padding-top: calc(var(--u) * 1.2); border-top: 1.5px solid var(--color-fg); overflow: hidden; }
.panel > * { position: relative; z-index: 1; }
.panel--pool { border-top-color: var(--violet); }
.panel__label { display: flex; align-items: center; gap: .55rem; font-size: var(--t-m); font-weight: 600; letter-spacing: -.02em; }
.panel__label::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: var(--color-fg); }
.panel--pool .panel__label::before { background: var(--violet); }
.panel__chart { position: relative; min-height: 0; }
.chart { width: 100%; height: 100%; overflow: visible; }
.chart line, .chart rect { vector-effect: non-scaling-stroke; }
.chart__grid { stroke: var(--color-grid); stroke-width: 1px; }
.cdl line { stroke: var(--color-fg); stroke-width: 1.25px; }
.cdl rect { fill: var(--color-bg); stroke: var(--color-fg); stroke-width: 1.25px; }
.sellc__body { fill: var(--violet); }
.sellc__wick { stroke: var(--violet); stroke-width: 1.5px; }
.chart__last { stroke: var(--violet); stroke-width: 1px; stroke-dasharray: 4 4; }
.chart__last--hold { stroke: var(--color-fg); }
.desk__dot { fill: var(--color-fg); }
.panel__read { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); }
.panel__read dt { font-size: var(--t-xs); color: var(--color-muted); margin-bottom: .2rem; }
.panel__read dd { font-size: var(--t-l); font-weight: 600; letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.panel__read dd .slot__label { display: none; }
.panel__read .is-neg { color: var(--color-fg); }
.panel__result { font-size: var(--t-s); color: var(--color-muted); max-width: 30rem; min-height: 2.9em; }
html:not(.motion) .flow { height: auto; }
html:not(.motion) .flow__stage { position: relative; height: auto; min-height: 100svh; }
html:not(.motion) .panel__chart { height: clamp(14rem, 34vh, 22rem); }

/* steps */
.steps { padding: calc(var(--u) * 9) var(--gutter) calc(var(--u) * 7); }
.steps__title { max-width: 11em; margin: 0 0 calc(var(--u) * 7) -.05em; font-size: var(--t-xl); font-weight: 650; letter-spacing: -.045em; line-height: .92; }
.steps__list { padding: 0; list-style: none; }
.step { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); padding: calc(var(--u) * 2.4) 0 calc(var(--u) * 4.2); overflow: hidden; }
.step > * { position: relative; z-index: 1; }
.step__rule { position: absolute; top: 0; left: 0; right: 0; height: 1.5px; background: var(--color-fg); transform-origin: 0 50%; }
.step__n { grid-column: 1 / span 2; font-size: var(--t-l); font-weight: 300; color: var(--color-muted); line-height: 1; font-variant-numeric: tabular-nums; }
.step__name { grid-column: 3 / span 5; font-size: var(--t-l); font-weight: 600; letter-spacing: -.03em; line-height: 1.02; }
.step__text { grid-column: 8 / span 5; max-width: 26rem; }

/* bids */
.bids { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); padding: calc(var(--u) * 6) var(--gutter) calc(var(--u) * 14); }
.bids__title { grid-column: 1 / span 7; font-size: var(--t-xl); font-weight: 650; letter-spacing: -.045em; line-height: .92; margin-left: -.05em; }
.bids__side { grid-column: 9 / span 4; align-self: end; margin-top: calc(var(--u) * 6); }
.bids__text { margin-bottom: calc(var(--u) * 3); font-size: 1.125rem; }
.mini { position: relative; padding-top: 2.1rem; }
.mini__rule { position: absolute; top: 1rem; left: 0; right: 1rem; height: 2px; background: var(--color-fg); transform-origin: 0 50%; }
.mini__dot { position: absolute; top: .65rem; right: .6rem; width: .75rem; height: .75rem; border-radius: 50%; background: var(--color-fg); }
.mini__label { display: block; font-size: var(--t-s); color: var(--color-muted); }

/* statement + facts */
.statement { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); padding: calc(var(--u) * 8) var(--gutter); border-block: 1px solid var(--color-line); }
.statement__text { grid-column: 2 / span 10; font-size: var(--t-l); font-weight: 500; letter-spacing: -.03em; line-height: 1.12; }
.facts { padding: calc(var(--u) * 10) var(--gutter) calc(var(--u) * 9); }
.facts__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); padding: 0; list-style: none; }
.fact { position: relative; padding-top: calc(var(--u) * 2); overflow: hidden; min-height: 9rem; }
.fact > * { position: relative; z-index: 1; }
.fact__rule { position: absolute; top: 0; left: 0; right: 0; height: 1.5px; background: var(--color-fg); transform-origin: 0 50%; }
.fact__value { font-size: var(--t-xl); font-weight: 300; letter-spacing: -.05em; line-height: 1; }
.fact__value .slot__state { font-size: .36em; letter-spacing: -.01em; font-weight: 500; }
.fact__value .slot__label { display: none; }
.fact__label { margin-top: .6rem; font-size: var(--t-s); color: var(--color-muted); max-width: 14rem; }

/* finale */
.finale { position: relative; display: grid; grid-template-rows: 1fr auto auto; gap: calc(var(--u) * 6); min-height: 100svh; padding: calc(var(--gutter) * 4) var(--gutter) var(--gutter); background: var(--color-fg); color: var(--color-bg); }
.finale :focus-visible { outline-color: var(--color-bg); }
.finale__calls { align-self: center; display: grid; }
.call { position: relative; display: flex; justify-content: space-between; align-items: center; gap: var(--gutter); padding: calc(var(--u) * 1.2) 0; border-bottom: 1px solid color-mix(in srgb, var(--paper) 22%, transparent); }
.call__word { margin-left: -.05em; font-size: clamp(3rem, .6rem + 9.6vw, 10.4rem); font-weight: 650; letter-spacing: -.05em; line-height: .95; transition: translate .6s var(--ease); }
.call__arrow { flex: none; width: clamp(2.4rem, 5vw, 5rem); height: auto; fill: none; stroke: currentColor; stroke-width: 2.4px; transition: translate .5s var(--ease); }
.call__rule { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--mint); transform: scaleX(0); transform-origin: 100% 50%; transition: transform .7s var(--ease); }
@media (hover: hover) { .call:hover .call__rule { transform-origin: 0 50%; transform: scaleX(1); } .call:hover .call__word { translate: .12em; } .call:hover .call__arrow { translate: 6px -6px; } }
.call:focus-visible .call__rule { transform-origin: 0 50%; transform: scaleX(1); }
.finale__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: calc(var(--u) * 3); }
.finale__name { grid-column: 1 / span 5; font-size: var(--t-m); font-weight: 450; letter-spacing: -.02em; line-height: 1.25; }
.finale__nav { grid-column: 11 / span 2; display: flex; flex-direction: column; align-items: start; gap: .3rem; font-weight: 500; }
.finale__nav a { display: inline-flex; align-items: center; min-width: var(--tap); min-height: var(--tap); }
.finale__base { display: flex; justify-content: space-between; gap: var(--gutter); padding-top: calc(var(--u) * 1.5); border-top: 1px solid color-mix(in srgb, var(--paper) 22%, transparent); font-size: var(--t-xs); color: color-mix(in srgb, var(--paper) 68%, transparent); }

/* reveal start states (only while motion is allowed and JS is alive) */
.motion [data-reveal], .motion [data-rise] { opacity: 0; }
.motion [data-reveal="rule"] { opacity: 1; transform: scaleX(0); }
.motion .pline__rule { transform: scaleX(0); }
.motion [data-reveal].is-in, .motion [data-rise].is-in { opacity: 1; transform: none; }
.motion .pline__rule.is-in { transform: none; }

@media (width >= 1680px) { .steps, .bids, .statement, .facts, .board { padding-left: calc(var(--gutter) * 2); padding-right: calc(var(--gutter) * 2); } }

@media (width <= 1100px) {
  .tr { grid-template-columns: 1.6fr 1fr .8fr 1fr 1fr 3.25rem; gap: .8rem; }
  .num { font-size: 1.05rem; }
}

@media (width <= 767px) {
  :root { --label-w: 8.5rem; --line-y: 58%; }
  .frame__brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .frame__nav { gap: .5rem; font-size: .9rem; }
  .frame__nav > a { padding: 0 .35rem; }
  .ca { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 .75rem; padding-block: .4rem .5rem; }
  .ca__label { grid-column: 1 / -1; }
  .ca__value { grid-column: 1; font-size: 1.02rem; flex: none; }
  .ca__act { grid-column: 2; grid-row: 2; }
  .hero { height: auto; min-height: 100svh; }
  .hero__stage { display: flex; flex-direction: column; justify-content: flex-start; gap: 1.4rem; min-height: 100svh; padding: calc(var(--top-h) + 1.5rem) var(--gutter) 2rem; }
  .hero__over, .hero__under, .hero__aside, .hero__meta, .pline__label { position: static; }
  .hero__over { font-size: clamp(3.4rem, 17vw, 6rem); margin: 0; }
  .hero__under { max-width: none; font-size: clamp(1.6rem, 7.4vw, 2.6rem); margin: 0; }
  .art { position: relative; top: auto; right: auto; translate: none; margin-top: 0; width: min(100%, 22rem); margin-inline: auto; }
  .pline { position: relative; top: auto; height: 3.2rem; }
  .pline__rule, .pline__ticks { left: 0; right: .9rem; }
  .pline__dot { right: .5rem; }
  .pline__ping { right: 0; }
  .pline__label { position: absolute; top: 1.15rem; left: 0; right: 0; width: auto; translate: none; }
  .hero__aside, .hero__meta { width: auto; }
  .hero__cta .btn { flex: 1; padding: 0 1rem; white-space: nowrap; }
  .board__head, .flow__head { display: block; }
  .board__intro, .flow__note { margin-top: .8rem; max-width: none; }
  .board__title, .flow__title { font-size: 2.6rem; }
  .seg { gap: 1.1rem; }
  .seg button { font-size: 1.05rem; }
  .tr { grid-template-columns: repeat(3, minmax(0, 1fr)) 3.25rem; grid-template-areas: "tok tok px cp" "ch vo li li"; gap: .6rem .6rem; min-height: 0; padding: .8rem 0; }
  .tr.th { display: none; }
  .tr > :nth-child(1) { grid-area: tok; }
  .tr > :nth-child(2) { grid-area: px; }
  .tr > :nth-child(3) { grid-area: ch; }
  .tr > :nth-child(4) { grid-area: vo; }
  .tr > :nth-child(5) { grid-area: li; }
  .tr > :nth-child(6) { grid-area: cp; }
  .num { font-size: .98rem; }
  .num[data-label]::before { display: block; }
  .tr--own { padding-left: .7rem; }
  .flow { height: 300svh; }
  .flow__stage { padding-top: calc(var(--top-h) + 1rem); gap: calc(var(--u) * 2.2); }
  .flow__panels { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; gap: calc(var(--u) * 2.4); }
  .panel { gap: .45rem; padding-top: .6rem; }
  .panel__label { font-size: 1.05rem; }
  .panel__read dd { font-size: 1.4rem; }
  .panel__result { display: none; }
  .step { grid-template-columns: 3rem minmax(0, 1fr); row-gap: .7rem; }
  .step__n { grid-column: 1; font-size: 1.4rem; }
  .step__name, .step__text { grid-column: 2; }
  .bids { display: block; }
  .bids__side { margin-top: calc(var(--u) * 5); }
  .statement__text { grid-column: 1 / -1; }
  .facts { padding-bottom: calc(var(--u) * 6); }
  .facts__grid { grid-template-columns: 1fr 1fr; row-gap: calc(var(--u) * 5); }
  .finale { min-height: auto; padding-top: calc(var(--gutter) * 5); grid-template-rows: auto auto auto; }
  .finale__grid > * { grid-column: 1 / -1 !important; }
  .finale__nav { flex-direction: row; gap: 1.4rem; }
  .finale__base { flex-direction: column; gap: .4rem; }
}

/* motion: instant fallback for everything */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .tr--own { animation: none; }
  .motion [data-reveal], .motion [data-rise] { opacity: 1; transform: none; }
  .row-in { opacity: 1; transform: none; }
  .ticker { overflow-x: auto; }
  .ticker__track { animation: none; }
}
