/* Chipo: a toy in daylight. Light ground, one sky accent used as fill, ink text.
   Radius rule: interactive controls are pills, cards 22px (inner 16px), inputs 12px. */
@font-face { font-family: Geist; src: url(/fonts/Geist-Regular.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Geist; src: url(/fonts/Geist-Medium.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: Geist; src: url(/fonts/Geist-SemiBold.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url(/fonts/GeistMono-Regular.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url(/fonts/GeistMono-Medium.woff2) format('woff2'); font-weight: 500; font-display: swap; }

:root {
  --ground: #FFFFFF; --band: #F3F7FB; --ink: #0E1116; --muted: #5B6470;
  --accent: #4DB8FF; --accent-text: #0F6FD1; --gain: #1F9D62; --loss: #D64545;
  --line: rgba(14, 17, 22, 0.09); --line-strong: rgba(14, 17, 22, 0.16);
  --night: #0E1116; --night-2: #171B22; --night-text: #F3F7FB; --night-muted: #A7B1BD;
  --shadow: 0 1px 2px rgba(28, 111, 184, 0.06), 0 12px 32px -12px rgba(28, 111, 184, 0.18);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --sans: Geist, ui-sans-serif, system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
  --wrap: 1200px;
  --r-card: 22px; --r-inner: 16px; --r-input: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.55; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 400; letter-spacing: -0.03em; line-height: 1.05; text-wrap: balance; }
h2 { font-size: clamp(34px, 4.2vw, 56px); }
h3 { font-size: 22px; letter-spacing: -0.015em; line-height: 1.2; font-weight: 500; }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.lede { font-size: 19px; color: var(--muted); max-width: 58ch; text-wrap: pretty; }
p { text-wrap: pretty; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 18px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 6px; }
section { position: relative; }
.section { padding: 112px 0; }
.band { background: var(--band); }

/* ---------- nav: floating pill */
.nav-wrap { position: fixed; top: 14px; left: 0; right: 0; z-index: 20; display: flex; justify-content: center; pointer-events: none; padding: 0 16px; }
.nav { pointer-events: auto; display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 16px; border-radius: 999px; background: rgba(255, 255, 255, 0.86); backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%); box-shadow: 0 0 0 1px var(--line), var(--shadow); max-width: 100%; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 500; font-size: 18px; letter-spacing: -0.03em; margin-right: 10px; }
.brand img { width: 22px; height: 22px; margin-top: 1px; }
.nav-links { display: flex; gap: 2px; }
.nav-links a { text-decoration: none; font-size: 15px; padding: 8px 14px; border-radius: 999px; color: var(--muted); transition: background-color .2s var(--ease), color .2s var(--ease); }
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover { background: var(--band); }
.nav-links a[aria-current="page"] { background: var(--band); color: var(--ink); font-weight: 500; }
.status { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-family: var(--mono); font-size: 12.5px; color: var(--ink); padding: 8px 14px 8px 12px; border-radius: 999px; background: var(--band); margin-left: 6px; white-space: nowrap; }
.status-text { display: inline-block; width: 162px; white-space: nowrap; overflow: hidden; } /* fixed width in px (fits 21 mono characters): the live text never resizes the pill */
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #9AA4B0; flex: none; }
.status[data-state="live"] .status-dot { background: var(--gain); box-shadow: 0 0 0 3px rgba(31, 157, 98, 0.18); }
.status[data-state="down"] .status-dot { background: var(--loss); }

/* ---------- buttons: pills; the arrow sits in its own circle */
.btn { display: inline-flex; align-items: center; gap: 12px; padding: 8px 8px 8px 22px; min-height: 52px; border-radius: 999px; border: 0; font: 500 16px/1 var(--sans); letter-spacing: -0.01em; text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(0.98); }
.btn .i { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; transition: transform .2s var(--ease); }
.btn:hover .i { transform: translateX(2px) translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 10px 24px -12px rgba(15, 111, 209, .55); }
.btn-primary .i { background: rgba(14, 17, 22, 0.1); }
.btn-primary:hover { background: #63C1FF; }
.btn-ghost { background: var(--ground); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-ghost .i { background: var(--band); }
.btn-ghost:hover { background: var(--band); }
.btn-small { min-height: 40px; padding: 6px 16px; font-size: 14.5px; }
.btn-dark { background: var(--ink); color: var(--ground); }
.btn[disabled], .btn[disabled]:hover { opacity: .45; cursor: not-allowed; transform: none; }
.link { transition: color .2s var(--ease); }
.link:hover { color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.link { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* ---------- hero */
.hero { padding: 148px 0 72px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.hero h1 { font-size: clamp(44px, 5.6vw, 82px); line-height: 1.02; letter-spacing: -0.045em; font-weight: 400; margin-bottom: 24px; }
.hero h1 .soft { color: var(--muted); }
.hero .lede { margin-bottom: 32px; }
.hero-media .hero-img { width: 100%; aspect-ratio: 1 / 1; height: auto; object-fit: contain; border-radius: 32px; background: var(--band); }
.quote-card { margin-top: 36px; padding: 18px 20px; border-radius: var(--r-card); background: var(--ground); box-shadow: 0 0 0 1px var(--line), var(--shadow); max-width: 520px; }
.quote-line { font-size: 19px; letter-spacing: -0.015em; line-height: 1.35; margin: 0 0 8px; }
.quote-line .num { font-size: 18px; }
.quote-meta { font-family: var(--mono); font-size: 12.5px; line-height: 1.5; color: var(--muted); margin: 0; min-height: 3em; } /* two lines reserved: live text never shifts the page */

/* ---------- live stats */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 28px 24px 26px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat-label { font-size: 14px; color: var(--muted); margin: 0 0 10px; }
.stat-value { font-family: var(--mono); font-size: clamp(26px, 2.6vw, 34px); letter-spacing: -0.04em; line-height: 1.1; margin: 0 0 8px; font-variant-numeric: tabular-nums; }
.stat-sub { font-family: var(--mono); font-size: 12.5px; line-height: 1.5; color: var(--muted); margin: 0; min-height: 3em; }
.skeleton { display: inline; color: transparent; background: linear-gradient(90deg, var(--band), #E6EDF4, var(--band)); background-size: 200% 100%; border-radius: 8px; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- how it works: the one dark panel */
.night { background: var(--night); color: var(--night-text); border-radius: 36px; padding: 72px 64px; }
.night .muted, .night p { color: var(--night-muted); }
.night h2 { color: var(--night-text); margin-bottom: 48px; max-width: 16ch; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 40px 40px; }
.steps li { position: relative; }
.steps li + li::before { content: ''; position: absolute; left: -20px; top: 0; bottom: 0; border-left: 1px solid rgba(243, 247, 251, 0.12); }
.step-n { font-family: var(--mono); font-size: 13px; color: var(--accent); display: block; margin-bottom: 14px; }
.steps h3 { color: var(--night-text); margin-bottom: 10px; }
.step-img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-inner); margin-bottom: 20px; background: var(--night-2); }
.steps p { font-size: 15.5px; margin: 0; }

/* ---------- desk: round display and the five faces */
.desk-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 72px; align-items: center; }
.display { width: min(420px, 100%); aspect-ratio: 1; border-radius: 50%; background-color: var(--night); background-image: radial-gradient(circle at 50% 38%, #1A2230 0%, var(--night) 70%); padding: 18px; box-shadow: 0 0 0 10px #1F242C, 0 0 0 11px var(--line-strong), 0 40px 80px -30px rgba(28, 64, 110, 0.4); display: grid; place-items: center; margin-inline: auto; position: relative; }
.display .chipo { width: 52%; }
.display-caption { position: absolute; bottom: 16%; left: 0; right: 0; text-align: center; font-family: var(--mono); font-size: 13px; color: var(--night-muted); }
.faces { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 32px 0; }
.face { text-align: center; }
.face-disc { aspect-ratio: 1; border-radius: 50%; background: var(--night); display: grid; place-items: center; margin-bottom: 10px; }
.face-disc .chipo { width: 54%; }
.face span { font-size: 14px; }
.rule { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.rule li { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 10px 0; font-size: 15.5px; }
.rule li + li { border-top: 1px solid var(--line); }
.rule b { font-weight: 500; }

/* ---------- not / thesis / muse */
.nots { display: grid; gap: 0; }
.not { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 48px; align-items: baseline; padding: 28px 0; }
.not + .not { border-top: 1px solid var(--line); }
.not h3 { font-size: clamp(30px, 3.4vw, 44px); font-weight: 400; letter-spacing: -0.035em; }
.not p { margin: 0; color: var(--muted); max-width: 52ch; }
.thesis-grid { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 72px; align-items: center; }
.thesis-img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 28px; }
.thesis { font-size: clamp(26px, 3vw, 40px); line-height: 1.25; letter-spacing: -0.03em; max-width: 30ch; }
.thesis .soft { color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 40px; }
.fact { background: var(--ground); border-radius: var(--r-card); padding: 24px; box-shadow: 0 0 0 1px var(--line); }
.fact-date { font-family: var(--mono); font-size: 13px; color: var(--accent-text); margin-bottom: 10px; display: block; }
.fact p { margin: 0; font-size: 16px; }
.fact.wide { grid-column: span 2; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px; }

/* ---------- final CTA */
.cta { display: grid; grid-template-columns: auto 1fr auto; gap: 40px; align-items: center; padding: 48px 56px; border-radius: 36px; background: var(--band); }
.cta .chipo { width: 120px; }
.cta h2 { font-size: clamp(30px, 3.4vw, 46px); }

/* ---------- footer */
.foot { padding: 64px 0 48px; border-top: 1px solid var(--line); margin-top: 96px; }
.foot-grid { display: grid; grid-template-columns: 1fr auto; gap: 32px 48px; }
.foot-brand p { color: var(--muted); margin: 12px 0 0; font-size: 15px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 22px; align-content: start; }
.foot-links a { text-decoration: none; font-size: 15px; }
.foot-links a:hover { text-decoration: underline; }
.foot-legal { grid-column: 1 / -1; display: grid; gap: 6px; padding-top: 24px; border-top: 1px solid var(--line); }
.foot-legal p { margin: 0; font-size: 13.5px; color: var(--muted); max-width: 90ch; }

/* ---------- inner pages */
.page-head { padding: 148px 0 48px; }
.page-head h1 { font-size: clamp(42px, 5vw, 68px); letter-spacing: -0.045em; margin-bottom: 18px; }
.prose > * { max-width: 66ch; }
.prose > .table-wrap, .prose > .faces { max-width: 820px; }
.prose h2 { font-size: clamp(28px, 3vw, 38px); margin: 64px 0 16px; }
.prose h3 { margin: 32px 0 10px; }
.prose p, .prose li { color: #2B313A; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin-bottom: 6px; }
code, pre { font-family: var(--mono); font-size: 14px; }
:not(pre) > code { background: var(--band); padding: 2px 6px; border-radius: 6px; word-break: break-word; }
pre { background: var(--night); color: var(--night-text); padding: 18px 20px; border-radius: var(--r-inner); overflow-x: auto; line-height: 1.6; }
.callout { border-radius: var(--r-inner); padding: 18px 20px; background: var(--band); box-shadow: inset 3px 0 0 var(--accent); margin: 24px 0; }
.callout p:last-child { margin: 0; }
.table-wrap { overflow-x: auto; margin: 16px 0 24px; border-radius: var(--r-inner); box-shadow: 0 0 0 1px var(--line); }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 11px 14px; vertical-align: top; }
th { font-weight: 500; background: var(--band); }
tr + tr td { border-top: 1px solid var(--line); }
td:first-child code { white-space: nowrap; }
td code { word-break: break-word; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }
.toc a { display: inline-block; padding: 7px 14px; border-radius: 999px; background: var(--band); text-decoration: none; font-size: 14.5px; }

/* ---------- chips, inputs */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px 9px 10px; min-height: 44px; border-radius: 999px; background: var(--ground); box-shadow: inset 0 0 0 1px var(--line-strong); font: 500 15px/1 var(--sans); color: var(--ink); cursor: pointer; transition: background-color .2s var(--ease), transform .2s var(--ease); }
.chip:hover { background: var(--band); }
.chip[aria-pressed="true"]:hover { background: #63C1FF; }
.chip:active { transform: scale(0.97); }
.chip .chip-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--band); box-shadow: inset 0 0 0 1px var(--line-strong); }
.chip[aria-pressed="true"] { background: var(--accent); box-shadow: none; }
.chip[aria-pressed="true"] .chip-dot { background: var(--ground); box-shadow: none; }
.field { display: grid; gap: 8px; }
.field label, .label { font-size: 14px; font-weight: 500; }
.help { font-size: 13.5px; color: var(--muted); margin: 0; }
.field .err { font-size: 13.5px; color: var(--ink); margin: 0; }
.err:not(:empty)::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--loss); margin-right: 8px; vertical-align: 1px; }
input, select, textarea { font: 400 16px/1.3 var(--sans); color: var(--ink); background: var(--ground); border: 0; border-radius: var(--r-input); box-shadow: inset 0 0 0 1px var(--line-strong); padding: 12px 14px; min-height: 48px; width: 100%; transition: box-shadow .2s var(--ease); }
input::placeholder, textarea::placeholder { color: #69727E; }
input:focus, select:focus, textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent-text); }
input.mono { font-family: var(--mono); font-size: 15px; }
input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--loss); }

/* ---------- pocket */
.pocket { padding: 132px 0 40px; }
.pocket-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; margin-bottom: 28px; }
.pocket-head h1 { font-size: clamp(38px, 4.4vw, 56px); letter-spacing: -0.04em; }
.steps-bar { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.steps-bar li { font-size: 13.5px; padding: 7px 12px; border-radius: 999px; background: var(--band); color: var(--muted); }
.steps-bar li[aria-current="step"] { background: var(--ink); color: var(--ground); }
.steps-bar li.done { color: var(--ink); }
.mode-note { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.shell { border-radius: 30px; padding: 8px; background: var(--band); box-shadow: inset 0 0 0 1px var(--line); }
.core { border-radius: 24px; background: var(--ground); padding: 36px; box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 0 0 1px var(--line); }
.stage[hidden] { display: none !important; }
.connect-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.connect-grid .chipo { width: 180px; margin-inline: auto; }
.notice { border-radius: var(--r-inner); padding: 14px 16px; background: var(--band); font-size: 15px; margin: 16px 0 0; }
.notice.bad { box-shadow: inset 3px 0 0 var(--loss); }
.notice.good { box-shadow: inset 3px 0 0 var(--gain); }
.survey { display: grid; gap: 28px; max-width: 760px; }
.survey-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pocket-grid { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 24px; }
.mood-card { border-radius: var(--r-card); background: var(--band); padding: 28px; text-align: center; display: grid; gap: 14px; justify-items: center; align-content: start; }
.ring { position: relative; width: 240px; height: 240px; }
.ring svg.ring-svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { stroke: rgba(14, 17, 22, 0.08); }
.ring .fill { stroke: var(--accent); transition: stroke-dashoffset 1s var(--ease); }
.ring[data-over="true"] .fill { stroke: var(--loss); }
.ring .chipo { position: absolute; width: 118px; left: 50%; top: 50%; transform: translate(-50%, -54%); }
.ring-figure { font-family: var(--mono); font-size: 30px; letter-spacing: -0.04em; line-height: 1; }
.ring-sub { font-size: 14px; color: var(--muted); margin: 0; }
.mood-name { font-size: 15px; font-weight: 500; padding: 6px 12px; border-radius: 999px; background: var(--ground); }
.panel { border-radius: var(--r-card); box-shadow: 0 0 0 1px var(--line); padding: 24px; }
.panel h2 { font-size: 24px; letter-spacing: -0.02em; margin-bottom: 14px; }
.panel-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-content: start; }
.log-form { display: grid; gap: 14px; }
.log-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.purchases { list-style: none; margin: 0; padding: 0; }
.purchases li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 0; }
.purchases li + li { border-top: 1px solid var(--line); }
.purchases .p-meta { font-size: 13.5px; color: var(--muted); grid-column: 1; }
.purchases .p-amt { font-family: var(--mono); grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.empty { color: var(--muted); font-size: 15px; padding: 14px 0; margin: 0; }
.advice { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.advice li { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; padding: 14px 16px; border-radius: var(--r-inner); background: var(--band); font-size: 15.5px; }
.advice .kind { font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; padding: 4px 8px; border-radius: 999px; background: var(--ground); color: var(--ink); }
.token-card { margin-top: 24px; display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; }
.token-card canvas { width: 168px; height: 168px; image-rendering: pixelated; border-radius: 12px; box-shadow: 0 0 0 1px var(--line); }
.token-value { font-family: var(--mono); font-size: 13.5px; word-break: break-all; background: var(--band); padding: 10px 12px; border-radius: var(--r-input); margin: 10px 0; }

/* ---------- deals */
.deal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.deal { border-radius: var(--r-card); box-shadow: 0 0 0 1px var(--line); padding: 8px; display: grid; grid-template-rows: auto 1fr; background: var(--ground); transition: box-shadow .3s var(--ease), transform .3s var(--ease); }
.deal:hover { box-shadow: 0 0 0 1px var(--line-strong), var(--shadow); transform: translateY(-2px); }
.deal-img { aspect-ratio: 240 / 144; border-radius: var(--r-inner); background: var(--band); object-fit: cover; width: 100%; height: auto; }
.deal-body { padding: 14px 10px 10px; display: grid; gap: 6px; align-content: start; }
.deal-name { font-weight: 500; font-size: 16.5px; letter-spacing: -0.01em; }
.deal-cat { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); }
.deal-cat::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.deal-range { font-family: var(--mono); font-size: 13.5px; }
.deal-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; align-items: center; }
.deal-actions a.src { font-size: 13.5px; color: var(--accent-text); }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.source-line { font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin: 0 0 20px; }

/* ---------- pay sheet */
dialog.sheet { border: 0; padding: 0; border-radius: 28px; width: min(560px, calc(100% - 24px)); max-height: calc(100dvh - 24px); overflow: auto; background: var(--ground); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(28, 64, 110, .4); }
dialog.sheet::backdrop { background: rgba(14, 17, 22, 0.42); backdrop-filter: blur(4px); }
.sheet-inner { padding: 28px; display: grid; gap: 16px; }
.sheet-head { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.sheet-head h2 { font-size: 28px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--band); cursor: pointer; font-size: 18px; color: var(--ink); flex: none; }
.route { border-radius: var(--r-inner); background: var(--band); padding: 16px; display: grid; gap: 8px; }
.route-row { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.route-row .num { font-size: 14.5px; }
.route-big { font-family: var(--mono); font-size: 26px; letter-spacing: -0.03em; }
.pay-status { border-radius: var(--r-inner); padding: 14px 16px; font-size: 15px; background: var(--band); }
.pay-status.failed { background: #FCEEEE; box-shadow: inset 3px 0 0 var(--loss); }
.pay-status.failed strong { color: var(--loss); font-size: 24px; font-weight: 400; display: block; margin-bottom: 4px; }
.pay-status.success { box-shadow: inset 3px 0 0 var(--gain); }

/* ---------- gadget */
.board-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.spec { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.spec li { border-radius: var(--r-inner); background: var(--band); padding: 16px; }
.spec b { display: block; font-family: var(--mono); font-weight: 400; font-size: 20px; letter-spacing: -0.03em; }
.spec span { font-size: 14px; color: var(--muted); }
.cmd { display: grid; gap: 10px; }

/* ---------- the sprite */
.chipo { overflow: visible; }
.chipo .c-all, .chipo .c-leg, .chipo .c-body, .chipo .c-eyes { transform-box: view-box; }
.chipo .c-eyes { transition: transform .12s ease-out; }
.chipo .c-eyes.blink { transform: scaleY(0.12); }
.chipo[data-mood="sad"] .c-leg-l { transform: translateX(8px); }
.chipo[data-mood="sad"] .c-leg-r { transform: translateX(-8px); }
.chipo[data-mood="sad"] .c-all { transform: rotate(-7deg); }
.chipo[data-mood="sad"] .c-eyes { transform: translateY(5px); }
.chipo[data-mood="sad"] .c-eyes.blink { transform: translateY(5px) scaleY(0.12); }

@media (prefers-reduced-motion: no-preference) {
  .chipo .c-body { animation: breathe 3.4s ease-in-out infinite; }
  .chipo[data-mood="dancing"] .c-all { animation: bounce .56s cubic-bezier(.3, 0, .3, 1) infinite; }
  .chipo[data-mood="dancing"] .c-leg-l { animation: kick-l 1.12s cubic-bezier(.5, 0, .3, 1) infinite; }
  .chipo[data-mood="dancing"] .c-leg-r { animation: kick-r 1.12s cubic-bezier(.5, 0, .3, 1) infinite; }
  .chipo[data-mood="dancing"] .c-body { animation: groove 1.12s ease-in-out infinite; }
  .chipo[data-mood="happy"] .c-all { animation: sway 2.6s ease-in-out infinite; }
  .chipo[data-mood="worried"] .c-all { animation: shiver .18s linear infinite; }
  .chipo[data-mood="sad"] .c-body { animation: breathe 5.2s ease-in-out infinite; }
  /* Entry: opacity, 8 px rise, 4 px blur to sharp, 450 ms, once; staggered by --d inside a section. Only with JS. */
  html.js .reveal { opacity: 0; transform: translateY(8px); filter: blur(4px); transition: opacity .45s var(--ease), transform .45s var(--ease), filter .45s var(--ease); transition-delay: calc(var(--d, 0) * 70ms); }
  html.js .reveal.in { opacity: 1; transform: none; filter: none; }
}
@keyframes breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.015, 1.035); } }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(-11px); } }
@keyframes kick-l { 0%, 50%, 100% { transform: rotate(0); } 22% { transform: rotate(32deg); } }
@keyframes kick-r { 0%, 50%, 100% { transform: rotate(0); } 72% { transform: rotate(-32deg); } }
@keyframes groove { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(5deg); } 75% { transform: rotate(-5deg); } }
@keyframes sway { 0%, 100% { transform: rotate(-2.5deg); } 50% { transform: rotate(2.5deg); } }
@keyframes shiver { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-1.4px); } 75% { transform: translateX(1.4px); } }

/* ---------- responsive */
@media (max-width: 1080px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps li:nth-child(odd)::before { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .pocket-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  body { font-size: 16px; }
  .section { padding: 72px 0; }
  .hero { padding: 116px 0 48px; }
  .hero-grid, .desk-grid, .board-hero, .connect-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: clamp(40px, 11vw, 56px); }
  .night { padding: 48px 24px; border-radius: 28px; }
  .not { grid-template-columns: 1fr; gap: 8px; }
  .facts { grid-template-columns: 1fr; }
  .thesis-grid { grid-template-columns: 1fr; gap: 32px; }
  .thesis-img { max-width: 320px; }
  .fact.wide { grid-column: auto; grid-template-columns: 1fr; }
  .cta { grid-template-columns: 1fr; padding: 36px 24px; text-align: left; gap: 20px; }
  .panel-grid, .survey-row, .log-row { grid-template-columns: 1fr; }
  .core { padding: 22px; }
  .foot-grid { grid-template-columns: 1fr; }
  .token-card { grid-template-columns: 1fr; }
  .page-head { padding: 116px 0 32px; }
}
@media (max-width: 560px) {
  .nav { padding: 4px 4px 4px 12px; gap: 2px; }
  .brand { margin-right: 2px; font-size: 16px; }
  .nav .brand span { display: none; }
  .nav-links a { padding: 8px 9px; font-size: 14px; }
  .status { padding: 8px 10px; margin-left: 2px; }
  .status-text { display: none; }
  .stats { grid-template-columns: 1fr; }
  .stat + .stat { border-left: 0; border-top: 1px solid var(--line); }
  .steps { grid-template-columns: 1fr; }
  .steps li + li::before { display: block; left: 0; right: 0; top: -20px; bottom: auto; border-left: 0; border-top: 1px solid rgba(243, 247, 251, 0.12); }
  .step-img { aspect-ratio: 16 / 10; }
  .faces { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .face span { font-size: 12px; }
  .rule li { grid-template-columns: 80px 1fr; }
  .spec { grid-template-columns: 1fr; }
  .btn { padding-left: 18px; }
  .ring { width: 210px; height: 210px; }
  .deal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .deal { padding: 6px; }
  .deal-body { padding: 10px 6px 6px; }
  .deal-actions .btn-small { padding: 6px 12px; font-size: 13.5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- skip link */
.skip { position: fixed; left: 16px; top: -64px; z-index: 40; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--ground); text-decoration: none; font-size: 15px; transition: transform .2s var(--ease); }
.skip:focus { transform: translateY(80px); }

/* ---------- interaction states on cards */
.fact, .not, .face-disc { transition: transform .2s var(--ease); }
.fact:hover { transform: translateY(-2px); }
.deal { transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.icon-btn { transition: background-color .2s var(--ease), transform .2s var(--ease); }
.icon-btn:hover { background: #E6EEF6; }
.icon-btn:active { transform: scale(0.96); }
.toc a, .foot-links a { transition: background-color .2s var(--ease), color .2s var(--ease); }
.toc a:hover { background: #E6EEF6; }

/* ---------- the hero stage: ground, ring, shadow, stacked frames */
.hero-media { position: relative; }
.hero-stage { position: relative; aspect-ratio: 1 / 1; border-radius: 32px; overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 95% at 50% 40%, #FFFFFF 0%, #EEF7FF 46%, #D6EDFF 100%); box-shadow: inset 0 0 0 1px rgba(28, 111, 184, 0.08), 0 30px 60px -36px rgba(28, 111, 184, 0.35); cursor: pointer; }
.hero-ring { position: absolute; left: 50%; top: 48%; width: 90%; aspect-ratio: 1; height: auto; transform: translate(-50%, -50%); z-index: 0; overflow: visible; }
.hero-stage[data-hero] .hero-ring { width: 90%; }
.hr-track { fill: none; stroke: rgba(28, 111, 184, 0.08); stroke-width: 3.2; }
.hr-seg { fill: none; stroke: var(--accent); stroke-width: 3.2; }
.hero-shadow { position: absolute; left: 50%; top: var(--shadow-top, 83%); height: 5.5%; aspect-ratio: 6.2; width: auto; z-index: 1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(28, 80, 140, 0.42), rgba(28, 80, 140, 0)); opacity: var(--shadow-o, 0.85); transform: translate(-50%, -50%) scale(var(--shadow-scale, 1)); transition: transform .14s var(--ease), opacity .14s var(--ease); }
.hero-bob { position: absolute; inset: 0; z-index: 2; }
.hero-fig { position: absolute; inset: 0; will-change: transform; transition: transform .12s var(--ease); transform-origin: 50% 80%; }
.hero-frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; visibility: hidden; user-select: none; -webkit-user-drag: none; }
.hero-frame.is-on { visibility: visible; }
@media (prefers-reduced-motion: no-preference) {
  html.js .hero-stage:not(.ring-in) .hr-seg { opacity: 0; }
  .hero-stage.ring-in .hr-seg { animation: seg-in 140ms ease-out both; animation-delay: calc(900ms * (1 - (1 - var(--i) / 36) * (1 - var(--i) / 36)) - 120ms); }
  .hero-bob { animation: hero-bob 2.8s ease-in-out infinite; }
  .hero-shadow { animation: hero-shadow 2.8s ease-in-out infinite; }
  .hero-stage.is-dancing .hero-bob, .hero-stage.is-paused .hero-bob, .hero-stage.is-paused .hero-shadow { animation-play-state: paused; }
  .hero-stage.is-dancing .hero-shadow { animation: none; }
}
@keyframes seg-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes hero-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes hero-shadow { 0%, 100% { transform: translate(-50%, -50%) scale(var(--shadow-scale, 1)); } 50% { transform: translate(-50%, -50%) scale(calc(var(--shadow-scale, 1) * 0.92)); } }

/* ---------- mobile nav: mark, status dot, menu */
.menu-btn, .nav-menu { display: none; }
@media (max-width: 560px) {
  html.js .menu-btn { display: block; position: relative; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--band); color: var(--ink); cursor: pointer; margin-left: 4px; transition: background-color .2s var(--ease); }
  html.js .menu-btn span { position: absolute; left: 12px; top: 19px; width: 16px; height: 1.6px; background: currentColor; border-radius: 2px; transition: transform .2s var(--ease); }
  html.js .menu-btn span:first-child { transform: translateY(-3.5px); }
  html.js .menu-btn span:last-child { transform: translateY(3.5px); }
  html.js .menu-btn[aria-expanded="true"] span:first-child { transform: rotate(45deg); }
  html.js .menu-btn[aria-expanded="true"] span:last-child { transform: rotate(-45deg); }
  html.js .nav { gap: 6px; padding: 5px 5px 5px 14px; }
  /* Phones with JS: the inline links give way to the menu panel, which follows the button in the DOM.
     Closed: hidden from sight and from the tab order (visibility). Open: an opaque white panel. */
  html.js .nav-links { display: none; }
  html.js .nav-menu { display: flex; position: absolute; top: calc(100% + 8px); right: 0; min-width: 200px; flex-direction: column; gap: 2px; padding: 8px; border-radius: 22px; background: #FFFFFF; box-shadow: 0 0 0 1px var(--line), 0 18px 40px -18px rgba(28, 64, 110, 0.35); opacity: 0; transform: translateY(-6px); visibility: hidden; pointer-events: none; transition: opacity .2s var(--ease), transform .2s var(--ease), visibility 0s linear .2s; }
  html.js .nav-menu a { text-decoration: none; padding: 12px 14px; font-size: 16px; border-radius: 999px; color: var(--muted); transition: background-color .2s var(--ease), color .2s var(--ease); }
  html.js .nav-menu a:hover { background: var(--band); color: var(--ink); }
  html.js .nav-menu a[aria-current="page"] { background: var(--band); color: var(--ink); font-weight: 500; }
  html.js .nav.open .nav-menu { opacity: 1; transform: none; visibility: visible; pointer-events: auto; transition: opacity .2s var(--ease), transform .2s var(--ease), visibility 0s; }
  .nav { position: relative; }
  .hero-stage { cursor: default; }
}

/* ---------- pay sheet on phones: Pay stays in reach */
@media (max-width: 560px) {
  dialog.sheet { width: 100%; max-width: none; max-height: 92dvh; margin: auto 0 0; border-radius: 26px 26px 0 0; }
  .sheet-inner { padding: 22px 18px 0; }
  .sheet-inner > .btn-row { position: sticky; bottom: 0; background: var(--ground); padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); margin: 0; box-shadow: 0 -1px 0 var(--line); }
  input, select { min-height: 48px; }
}

/* ---------- 404 */
.lost { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 40px; align-items: center; }
.lost img { width: 100%; height: auto; }
@media (max-width: 860px) { .lost { grid-template-columns: 1fr; } .lost img { max-width: 240px; } }

/* ---------- hero on small screens: the animation sits under the headline (after the base rules) */
@media (max-width: 860px) {
  .hero-grid { gap: 0; }
  .hero-text { display: contents; }
  .hero h1 { order: 1; margin-bottom: 16px; }
  .hero-media { order: 2; margin-bottom: 24px; }
  .hero .lede { order: 3; }
  .hero .btn-row { order: 4; }
  .hero .quote-card { order: 5; }
  .hero-stage { aspect-ratio: auto; height: 56vw; min-height: 210px; border-radius: 24px; }
  .hero-stage[data-hero] .hero-ring { width: auto; height: 92%; }
  .hero-bob { inset: 8% 0 2% 0; } /* headroom for the jump in the short phone stage */
}
