/* Pocket Hero website, "Command" direction (see .impeccable/surfaces/website-index-html.md).
   Money colours and the mint accent come from shared/.../ui/theme/Color.kt. */

@font-face {
  font-family: "Geist";
  src: url("fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* light */
  --canvas: #F6F7F5;
  --s1: #FFFFFF;
  --s2: #F2F4F1;
  --s3: #E8EBE7;
  --line: #E1E4E0;
  --line-2: #D2D6D1;
  --ink: #14181A;
  --ink-2: #3E4642;
  --muted: #5B645F;
  --accent: #0B7A65;          /* text-safe teal on paper, 4.9:1 */
  --accent-fill: #0B7A65;
  --on-accent: #FFFFFF;
  --accent-soft: rgba(11, 122, 101, .10);
  --accent-cont: #D6F3EA;
  --expense: #DC2626;
  --income: #15803D;
  --expense-cont: #FDECEC;
  --income-cont: #E3F6EA;
  --edge-hi: rgba(255, 255, 255, .9);
  --shadow: 0 1px 2px rgba(20, 24, 26, .04), 0 24px 48px -28px rgba(20, 24, 26, .22);
  --glow: rgba(11, 122, 101, .10);
  --nav: rgba(246, 247, 245, .82);
  color-scheme: light;

  --r-sm: 8px; --r-md: 12px; --r-lg: 16px;
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1200px;
  --font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.35, .64, 1);
}

:root[data-theme="dark"] {
  --canvas: #08090A;
  --s1: #0F1113;
  --s2: #15181B;
  --s3: #1C2024;
  --line: #22262B;
  --line-2: #2E3338;
  --ink: #F3F5F6;
  --ink-2: #B4BAC1;
  --muted: #858D96;
  --accent: #3ADFBE;
  --accent-fill: #3ADFBE;
  --on-accent: #00382E;
  --accent-soft: rgba(58, 223, 190, .10);
  --accent-cont: #0F473C;
  --expense: #F05252;
  --income: #22C55E;
  --expense-cont: #2A1618;
  --income-cont: #10261A;
  --edge-hi: rgba(255, 255, 255, .06);
  --shadow: 0 40px 80px -40px #000;
  --glow: rgba(58, 223, 190, .10);
  --nav: rgba(8, 9, 10, .78);
  color-scheme: dark;
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; background: var(--canvas); }
body {
  margin: 0; background: var(--canvas); color: var(--ink);
  font: 400 1rem/1.55 var(--font); letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent-fill); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
html { scrollbar-color: var(--line-2) var(--canvas); }
.i { width: 1.2em; height: 1.2em; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--accent-fill); color: var(--on-accent); padding: 10px 16px; border-radius: var(--r-md); font-weight: 600; }
.skip:focus { top: 12px; }
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.od, .rows b, .legend b, .wallets b, .b-big { font-variant-numeric: tabular-nums; }

/* type: one family, weight + tracking make the hierarchy */
.display { font-size: clamp(2.5rem, 1rem + 4.2vw, 4.75rem); line-height: 1.02; font-weight: 620; letter-spacing: -.055em; max-width: 14ch; }
.display-sm { font-size: clamp(2.25rem, 1rem + 4vw, 4.5rem); line-height: 1.04; font-weight: 620; letter-spacing: -.05em; }
h2 { font-size: clamp(2rem, 1rem + 2.9vw, 3.5rem); line-height: 1.05; font-weight: 620; letter-spacing: -.045em; max-width: 18ch; }
h3 { font-size: 1rem; font-weight: 600; letter-spacing: -.01em; }
.dim { color: var(--muted); }
[data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
[data-split] .w > span { display: inline-block; }

/* ---------------------------------------------------------------- controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 14px;
  border-radius: 10px; border: 1px solid transparent; font: 550 .875rem/1 var(--font); letter-spacing: -.005em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px) scale(.98); }
.btn-p { background: var(--accent-fill); color: var(--on-accent); }
.btn-p:hover { filter: brightness(1.08); }
.btn-s { background: var(--s1); color: var(--ink); border-color: var(--line-2); }
.btn-s:hover { border-color: var(--muted); }
.btn-lg { height: 48px; padding: 0 20px; font-size: 1rem; border-radius: var(--r-md); }
.btn-lg .i { width: 20px; height: 20px; }
.btn-lg small { font-size: .75rem; font-weight: 450; opacity: .8; margin-right: 2px; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 10px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; transition: background-color .15s, color .15s; }
.icon-btn:hover { background: var(--s2); color: var(--ink); }
.lang-code { font-size: .8125rem; font-weight: 650; letter-spacing: .02em; }
:root[data-theme="dark"] .t-light, :root[data-theme="light"] .t-dark { display: none; }
.kbd {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px;
  border: 1px solid var(--line-2); background: var(--s2); color: var(--ink-2); font: 550 .6875rem/1 var(--font);
  box-shadow: inset 0 -1px 0 var(--line-2);
}
.kbd .i { width: 14px; height: 14px; }
.kbd-btn { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line-2); background: var(--s1); color: var(--ink-2); box-shadow: inset 0 -1px 0 var(--line-2); cursor: pointer; transition: background-color .15s, color .15s, transform .15s; }
.kbd-btn:hover { background: var(--s3); color: var(--ink); }
.kbd-btn:active { transform: translateY(1px); }
.kbd-btn .i { width: 18px; height: 18px; }
.tag { display: inline-block; font-size: .6875rem; font-weight: 600; letter-spacing: .02em; padding: 3px 8px; border-radius: 6px; background: var(--s3); color: var(--ink-2); vertical-align: .15em; }

/* ---------------------------------------------------------------- nav */
.top { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line); background: var(--nav); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); padding-top: env(safe-area-inset-top, 0px); }
.nav { max-width: var(--maxw); margin: 0 auto; height: 60px; padding: 0 var(--gutter); display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-weight: 600; letter-spacing: -.015em; }
.brand img { border-radius: 7px; border: 1px solid var(--line-2); }
.links { display: flex; gap: 2px; margin-left: 12px; }
.links a { color: var(--muted); text-decoration: none; font-size: .875rem; padding: 8px 10px; border-radius: 8px; transition: color .15s, background-color .15s; }
.links a:hover { color: var(--ink); background: var(--s2); }
.tools { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.tools .btn { margin-left: 6px; }
@media (max-width: 860px) { .links { display: none; } }
@media (max-width: 380px) { .brand span { display: none; } }

/* ---------------------------------------------------------------- panel (the one container) */
.panel {
  position: relative; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: inset 0 1px 0 var(--edge-hi), var(--shadow);
}
.edge { position: absolute; left: 0; right: 0; top: -1px; height: 1px; overflow: hidden; border-radius: var(--r-lg) var(--r-lg) 0 0; pointer-events: none; }
.edge::after { content: ""; position: absolute; top: 0; left: 0; width: 40%; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); transform: translateX(80%); opacity: .8; }
.p-label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; color: var(--muted); font-size: .8125rem; }
.p-label b { color: var(--ink-2); font-weight: 550; }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; overflow-x: clip; padding-block: clamp(28px, 4vh, 56px) clamp(48px, 6vw, 88px); }
.glow { position: absolute; inset: 0 0 auto; height: 760px; pointer-events: none; background: radial-gradient(48% 60% at 50% 0%, var(--glow), transparent 72%); }
.hero .wrap { position: relative; }
.lede { margin-top: 22px; max-width: 46ch; color: var(--ink-2); font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); line-height: 1.5; }
.stores { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
@media (max-width: 520px) { .stores .btn { flex: 1 1 220px; } }

.win { margin-top: clamp(24px, 3.5vh, 44px); }
.peek { position: absolute; right: clamp(16px, 4vw, 40px); top: -96px; width: 112px; pointer-events: none; z-index: 1; }
.bar { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px; border-bottom: 1px solid var(--line); font-size: .8125rem; color: var(--ink-2); }
.avatar { width: 28px; height: 28px; border-radius: 8px; background: var(--accent-cont); overflow: hidden; flex: none; }
.avatar svg { width: 100%; height: 100%; display: block; }
.bar b { color: var(--ink); font-weight: 600; font-size: .875rem; }
.status { display: inline-flex; align-items: center; gap: 6px; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--income); }
.win.thinking .status::before { background: var(--accent); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.bar-note { margin-left: auto; color: var(--muted); display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.bar-note > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
.cmd { padding: 18px; border-right: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr; gap: 12px; min-width: 0; }
.field { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 5px 0 16px; border-radius: var(--r-md); background: var(--s2); border: 1px solid var(--line-2); transition: border-color .15s, box-shadow .15s; }
.field:focus-within { border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field > .i { color: var(--muted); }
.field input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--ink); font: 450 1.0625rem var(--font); letter-spacing: -.01em; caret-color: var(--accent); }
.field input:focus { outline: none; }
.field input::placeholder { color: var(--muted); opacity: 1; }
.field input { text-overflow: ellipsis; }
.sugg { position: relative; padding: 3px; border-radius: var(--r-md); border: 1px solid var(--line); }
.opt { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 12px; border-radius: var(--r-sm); color: var(--ink-2); cursor: pointer; }
.opt .i { width: 18px; height: 18px; color: var(--muted); transition: color .15s; }
.opt span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt small { color: var(--muted); font-size: .75rem; }
.opt[aria-selected="true"] { color: var(--ink); }
.opt[aria-selected="true"] .i { color: var(--accent); }
.hl { position: absolute; left: 3px; right: 3px; top: 3px; height: 38px; border-radius: var(--r-sm); background: var(--s3); transition: transform .22s var(--ease); z-index: 0; }
.out { align-self: end; min-height: 150px; display: grid; align-content: end; }
.ai-msg { color: var(--muted); font-size: .9375rem; }

/* confirm card: the app's New Transaction card */
.card { border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--s2); padding: 14px; display: grid; gap: 12px; }
.c-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.c-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--expense-cont); color: var(--expense); flex: none; }
.card.in .c-ico { background: var(--income-cont); color: var(--income); }
.c-id { min-width: 0; }
.c-kind { display: block; font-size: .6875rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--expense); }
.card.in .c-kind { color: var(--income); }
.c-name { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-amt { margin-left: auto; font-weight: 620; font-size: 1.375rem; letter-spacing: -.035em; white-space: nowrap; color: var(--expense); font-variant-numeric: tabular-nums; }
.card.in .c-amt { color: var(--income); }
.c-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-size: .8125rem; }
.c-meta b { color: var(--ink-2); font-weight: 500; }
.c-act { display: flex; gap: 8px; justify-content: flex-end; }
.c-act .kbd { margin-left: 4px; }
.c-act .btn-p .kbd { background: rgba(0, 0, 0, .12); border-color: transparent; color: inherit; box-shadow: none; }
.c-done { display: none; color: var(--muted); font-size: .8125rem; align-items: center; gap: 8px; flex-wrap: wrap; }
.c-done b { color: var(--income); font-weight: 600; display: inline-flex; gap: 4px; align-items: center; }
.c-done b .i { width: 1em; height: 1em; }
.card.done .c-act, .card.gone .c-act { display: none; }
.card.done .c-done, .card.gone .c-done { display: flex; }
.card.gone { opacity: .6; }
.card.gone .c-done b { color: var(--muted); }

.ledger { padding: 18px; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr auto; gap: 12px; min-width: 0; }
.l-head { display: flex; justify-content: space-between; color: var(--muted); font-size: .8125rem; }
.l-total { font-size: 2.25rem; font-weight: 620; letter-spacing: -.045em; }
.rows { list-style: none; margin: 0; padding: 0; display: grid; align-content: start; }
.rows li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 12px; height: 50px; border-bottom: 1px solid var(--line); font-size: .875rem; }
.rows li:last-child { border-bottom: 0; }
.rows .ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.rows .ic .i { width: 16px; height: 16px; }
.rows .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rows .nm small { color: var(--muted); margin-left: 8px; }
.rows b { font-weight: 550; }
.neg { color: var(--expense); } .pos { color: var(--income); }
.hint { color: var(--muted); font-size: .75rem; display: flex; gap: 14px; flex-wrap: wrap; }
.hint > span { display: inline-flex; align-items: center; gap: 5px; }
@media (max-width: 860px) {
  .win-grid { grid-template-columns: minmax(0, 1fr); }
  .cmd { border-right: 0; border-bottom: 1px solid var(--line); }
  .hint, .c-act .kbd, .bar-note > span:last-child { display: none; }
  .peek { width: 88px; top: -76px; }
  .win { margin-top: 88px; }
}

/* odometer */
.od { display: inline-flex; white-space: nowrap; }
.od-d { display: inline-block; height: 1.1em; overflow: hidden; }
.od-s { display: flex; flex-direction: column; transition: transform .9s var(--ease); }
.od-s > span, .od-c { display: block; height: 1.1em; line-height: 1.1em; }

/* ---------------------------------------------------------------- sections */
.sec { padding-block: clamp(72px, 10vw, 136px); border-top: 1px solid var(--line); }
.sec-head { display: grid; gap: 18px; margin-bottom: clamp(32px, 5vw, 56px); }
.sec-head p { color: var(--ink-2); max-width: 52ch; font-size: 1.0625rem; }
.aside-row { display: flex; gap: 12px; align-items: flex-start; margin-top: 20px; color: var(--muted); font-size: .9375rem; max-width: 70ch; }
.aside-row .i { color: var(--accent); margin-top: 2px; }
.aside-row b { color: var(--ink); font-weight: 600; }

/* scan */
.scan { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); overflow: hidden; }
.scan-src { display: grid; place-items: center; padding: clamp(28px, 4vw, 48px); border-right: 1px solid var(--line); background: var(--s2); }
.receipt {
  position: relative; width: min(290px, 100%); display: grid; gap: 7px; padding: 22px 20px 26px;
  background: #FBFAF6; color: #23272A; font: 500 .8125rem/1.35 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  border-radius: 4px 4px 0 0; transform: rotate(-1.5deg); box-shadow: 0 24px 40px -24px rgba(0, 0, 0, .5);
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 14px 100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 14px 100%;
}
.receipt hr { border: 0; border-top: 1px dashed #9aa19a; width: 100%; margin: 4px 0; }
.r-store { text-align: center; font-size: .9375rem; letter-spacing: .08em; text-transform: uppercase; }
.r-meta { text-align: center; color: #5b625b; }
.r-line { display: flex; justify-content: space-between; gap: 12px; padding: 1px 4px; margin-inline: -4px; border-radius: 3px; transition: background-color .3s; }
.r-line > span:first-child { white-space: nowrap; }
.r-total { font-weight: 800; }
[data-scan].lit { background: rgba(58, 223, 190, .32); }
.scanline { position: absolute; left: -8px; right: -8px; top: 0; height: 2px; background: #0B7A65; opacity: 0; }
.scan-form { padding: clamp(20px, 3vw, 32px); display: grid; gap: 16px; align-content: center; }
.seg { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); padding: 3px; border-radius: 10px; background: var(--s2); border: 1px solid var(--line); font-size: .8125rem; font-weight: 550; text-align: center; color: var(--muted); }
.seg span { position: relative; padding: 7px 4px; border-radius: 7px; }
.seg .seg-pill { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / 3); padding: 0; background: var(--expense-cont); transform: translateX(100%); transition: transform .45s cubic-bezier(.34, 1.56, .64, 1), opacity .25s; }
.seg .seg-on { color: var(--expense); transition: color .3s; }
.scan.reading:not(.typed) .seg-pill { opacity: 0; transform: translateX(100%) scale(.6); }
.scan.reading:not(.typed) .seg-on { color: var(--muted); }
/* skeleton: a value waits as a pulsing bar until its receipt line is read */
.sk { position: relative; transition: color .35s; }
.sk::before { content: ""; position: absolute; left: 0; top: 50%; width: 72%; height: .8em; margin-top: -.4em; border-radius: 6px; background: var(--s3); opacity: 0; pointer-events: none; }
.f-amt .sk::before { width: 52%; height: .66em; margin-top: -.33em; }
.scan.reading [data-fill]:not(.got) .sk { color: transparent; }
.scan.reading [data-fill]:not(.got) .sk > * { visibility: hidden; }
.scan.reading [data-fill]:not(.got) .sk::before { opacity: 1; animation: skel .9s ease-in-out infinite alternate; }
@keyframes skel { from { opacity: .4; } to { opacity: 1; } }
.f-amt { display: grid; gap: 2px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.f-amt small, .f-rows dt { color: var(--muted); font-size: .8125rem; }
.f-amt b { font-size: clamp(2rem, 1.4rem + 1.6vw, 2.75rem); font-weight: 620; letter-spacing: -.045em; white-space: nowrap; }
.f-amt em { font-style: normal; color: var(--expense); font-size: .5em; vertical-align: .6em; margin-right: 2px; }
.f-rows { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.f-rows div { background: var(--s1); padding: 12px 14px; display: grid; gap: 2px; transition: background-color .6s; }
.f-rows dd { margin: 0; font-weight: 550; display: flex; align-items: center; gap: 6px; }
.f-rows dd .i { width: 16px; height: 16px; color: #F472B6; }
.f-amt { transition: background-color .6s; border-radius: 8px; }
.flash { background-color: var(--accent-soft) !important; }
.scan-status { display: flex; align-items: center; gap: 8px; font-size: .8125rem; color: var(--muted); }
.scan-status .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--income); }
.scan.reading .scan-status .dot { background: var(--accent); animation: pulse 1s ease-in-out infinite; }
@media (max-width: 760px) {
  .scan { grid-template-columns: minmax(0, 1fr); }
  .scan-src { border-right: 0; border-bottom: 1px solid var(--line); }
}

/* reports bento */
.bento { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: "month month shot" "cat wallet shot"; }
.bento > .panel { padding: 20px; min-width: 0; }
.b-month { grid-area: month; display: grid; gap: 14px; align-content: start; }
.b-cat { grid-area: cat; display: grid; gap: 16px; align-content: start; }
.b-wallet { grid-area: wallet; display: grid; gap: 12px; align-content: start; }
.bento > .b-shot { grid-area: shot; margin: 0; padding: 12px 12px 0; overflow: hidden; display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.b-shot img { width: 100%; height: 100%; max-height: 560px; object-fit: cover; object-position: top; border-radius: 10px 10px 0 0; border: 1px solid var(--line); border-bottom: 0;
  -webkit-mask: linear-gradient(#000 78%, transparent); mask: linear-gradient(#000 78%, transparent); }
/* the screenshot is a dark app screen: in light theme its tile stays dark too, so the fade ends on dark, not on paper */
:root[data-theme="light"] .bento > .b-shot { background: #0F1113; border-color: #22262B; }
:root[data-theme="light"] .b-shot img { border-color: #22262B; }
:root[data-theme="light"] .b-shot figcaption { color: #9AA1A9; }
.b-shot figcaption { padding: 10px 0 12px; font-size: .75rem; color: var(--muted); text-align: center; text-wrap: balance; }
.b-big { font-size: clamp(2.25rem, 1.4rem + 2.6vw, 3.75rem); font-weight: 620; letter-spacing: -.05em; }
.b-big.pos { color: var(--income); }
.b-wallet .b-big { font-size: clamp(1.875rem, 1.1rem + 1.7vw, 2.75rem); letter-spacing: -.045em; }
.io { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.io > div { display: grid; gap: 6px; padding: 12px; border-radius: var(--r-md); background: var(--s2); border: 1px solid var(--line); min-width: 0; }
.io-l { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .8125rem; }
.io-l .i { width: 16px; height: 16px; }
.io-l .up { color: var(--income); } .io-l .down { color: var(--expense); }
.io b { font-size: 1.0625rem; font-weight: 600; white-space: nowrap; letter-spacing: -.02em; }
.meter { display: block; height: 4px; border-radius: 4px; overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 4px; transform-origin: 0 50%; transform: scaleX(var(--v)); }
.m-in { background: var(--income); } .m-out { background: var(--expense); }
.stack { display: flex; gap: 3px; height: 12px; }
.stack i { display: block; height: 100%; border-radius: 3px; background: var(--c); transform-origin: 0 50%; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: .875rem; }
.legend li { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.legend span { color: var(--ink-2); }
.legend b { font-weight: 550; }
.wallets { list-style: none; margin: 0; padding: 0; display: grid; }
.wallets li { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); font-size: .875rem; }
.w-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: #fff; background: linear-gradient(150deg, color-mix(in srgb, var(--c) 70%, #17181C), #17181C); }
.w-ico .i { width: 16px; height: 16px; }
.wallets span small { display: block; color: var(--muted); font-size: .75rem; }
.wallets b { font-weight: 550; white-space: nowrap; }
@media (max-width: 1000px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "month month" "cat wallet" "shot shot"; }
  .b-shot img { max-height: 420px; }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: minmax(0, 1fr); grid-template-areas: "month" "cat" "wallet" "shot"; }
}

/* privacy */
.privacy { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); overflow: hidden; }
.lock { display: grid; place-content: center; justify-items: center; padding: clamp(32px, 5vw, 56px) clamp(20px, 3vw, 40px); background: var(--s2); border-right: 1px solid var(--line); }
.lock-bal { position: relative; width: min(320px, 100%); padding: 18px; border-radius: var(--r-lg); background: var(--s1); border: 1px solid var(--line); display: grid; gap: 4px; }
.lock-bal small { color: var(--muted); font-size: .8125rem; }
.lock-amt { display: grid; font-size: 1.75rem; font-weight: 620; letter-spacing: -.04em; white-space: nowrap; }
.lock-amt > span { grid-area: 1 / 1; transition: opacity .35s, transform .45s var(--ease); }
.lock-amt .masked { opacity: 0; transform: translateY(6px); }
.lock.locked .lock-amt .shown { opacity: 0; transform: translateY(-6px); }
.lock.locked .lock-amt .masked { opacity: 1; transform: none; }
.eye { position: absolute; right: 14px; top: 14px; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--s2); color: var(--muted); }
.eye .i { width: 18px; height: 18px; }
.lock-sheet { width: min(290px, 92%); margin-top: -10px; padding: 26px 20px 22px; border-radius: var(--r-lg); background: var(--s1); border: 1px solid var(--line-2); box-shadow: var(--shadow); display: grid; justify-items: center; gap: 6px; text-align: center; position: relative; }
.lock-sheet small { color: var(--muted); font-size: .8125rem; max-width: 26ch; }
.fp { position: relative; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-cont); color: var(--accent); margin-bottom: 8px; }
.fp .i { width: 32px; height: 32px; }
.ring { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--accent); opacity: 0; }
.facts { padding: clamp(24px, 3.5vw, 40px); display: grid; align-content: center; }
.fact { display: grid; grid-template-columns: 36px 1fr; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.fact:first-child { padding-top: 0; }
.fact > .i { width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.fact p { color: var(--ink-2); font-size: .9375rem; margin-top: 2px; }
.honest { display: flex; gap: 10px; margin-top: 18px; font-size: .875rem; color: var(--muted); }
.honest .i { margin-top: 2px; }
.honest b { color: var(--ink); }
@media (max-width: 860px) {
  .privacy { grid-template-columns: minmax(0, 1fr); }
  .lock { border-right: 0; border-bottom: 1px solid var(--line); }
}

/* hero game: the one place that glows (DESIGN.md: glow belongs to the hero) */
.game { display: grid; grid-template-columns: minmax(0, 1fr); overflow: hidden; background: #0B111A; border-color: #1E2A3A; color: #EAF1F8; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), var(--shadow); }
.game .edge::after { background: linear-gradient(90deg, transparent, #66F779, transparent); }
.evo { position: relative; padding: clamp(28px, 4vw, 48px) clamp(20px, 5vw, 64px); display: grid; align-content: center; gap: 26px; border-bottom: 1px solid #1E2A3A;
  background: radial-gradient(70% 60% at 50% 45%, rgba(102, 247, 121, .14), transparent 70%), radial-gradient(120% 90% at 50% 110%, #1B2638, #0B111A 60%); }
.stages { list-style: none; margin: 0 auto; padding: 0; width: min(100%, 860px); display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(8px, 3vw, 40px); align-items: start; }
.stage { display: grid; justify-items: center; gap: 2px; text-align: center; opacity: .38; transform: scale(.9); transform-origin: 50% 100%; transition: opacity .4s, transform .5s var(--ease); }
.stage.on { opacity: 1; transform: none; }
.st-hero { display: block; width: 100%; aspect-ratio: 112 / 106; }
.stage b { font-size: .875rem; font-weight: 650; color: #C7FFB8; }
.stage small { font-size: .6875rem; color: #9FB0C4; white-space: nowrap; }
.exp { width: min(100%, 860px); margin-inline: auto; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.exp-fill { display: block; height: 100%; background: linear-gradient(90deg, #33C561, #66F779, #C7FFB8); transform-origin: 0 50%; transform: scaleX(1); }
.g-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-card { padding: 20px; display: grid; gap: 10px; align-content: start; }
.g-card + .g-card { border-left: 1px solid #1E2A3A; }
.g-head { display: flex; gap: 8px; align-items: center; }
.g-head .i { color: #66F779; width: 18px; height: 18px; }
.g-head h3 { font-size: .9375rem; }
.g-card small { color: #9FB0C4; font-size: .8125rem; }
.road { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.road li { aspect-ratio: 1; border-radius: 7px; display: grid; place-items: center; font-size: .6875rem; font-weight: 650; background: rgba(255, 255, 255, .06); color: #9FB0C4; }
.road li.done { background: rgba(102, 247, 121, .16); color: #C7FFB8; }
.road li.now { box-shadow: inset 0 0 0 1.5px #66F779; }
.road li.big { background: rgba(255, 193, 7, .14); color: #FFE082; }
.missions { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: .8125rem; }
.missions li { display: grid; grid-template-columns: 1fr auto; gap: 5px 8px; }
.missions small { color: #9FB0C4; font-size: .75rem; }
.missions li.done > span:first-child { color: #C7FFB8; }
.m-bar { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.m-bar i { display: block; height: 100%; background: #66F779; transform-origin: 0 50%; transform: scaleX(var(--p)); }
.boss { font-weight: 600; }
.hp { display: block; height: 8px; border-radius: 8px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.hp-fill { display: block; height: 100%; background: linear-gradient(90deg, #EF4444, #F87171); transform-origin: 0 50%; transform: scaleX(.4); }
@media (max-width: 1000px) {
  .g-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-card + .g-card { border-left: 0; }
  .g-card:nth-child(even) { border-left: 1px solid #1E2A3A; }
  .g-card:nth-child(n+3) { border-top: 1px solid #1E2A3A; }
}
@media (max-width: 560px) {
  .g-grid { grid-template-columns: minmax(0, 1fr); }
  .g-card:nth-child(even) { border-left: 0; }
  .g-card + .g-card { border-top: 1px solid #1E2A3A; }
  .stage small { white-space: normal; min-height: 2.5em; }
}

/* pricing */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.plan { padding: clamp(22px, 3vw, 32px); display: grid; gap: 12px; align-content: start; }
.plan > p { color: var(--ink-2); }
.plan h3 { font-size: 1.375rem; letter-spacing: -.03em; }
.plan-ai { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.plan-ai .edge::after { width: 100%; transform: none; opacity: 1; }
.ticks { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.ticks li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; font-size: .9375rem; }
.ticks li::before {
  content: ""; width: 18px; height: 18px; margin-top: 2px; border-radius: 5px; background-color: var(--accent-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233ADFBE' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 12px; background-position: center; background-repeat: no-repeat;
}
:root[data-theme="light"] .ticks li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B7A65' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
.plan .plan-note { color: var(--muted); font-size: .875rem; padding-top: 14px; border-top: 1px solid var(--line); margin-top: 6px; }
@media (max-width: 760px) { .plans { grid-template-columns: minmax(0, 1fr); } }

/* faq */
.faq { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.faq-list { border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary { list-style: none; cursor: pointer; padding: 18px 36px 18px 0; font-weight: 550; position: relative; transition: color .15s; }
summary:hover { color: var(--accent); }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 2px; margin-top: -1px; background: var(--muted); }
summary::before { content: ""; position: absolute; right: 11px; top: 50%; width: 2px; height: 12px; margin-top: -6px; background: var(--muted); transition: transform .3s var(--ease); }
details[open] summary::before { transform: scaleY(0); }
details p { color: var(--ink-2); padding: 0 36px 20px 0; max-width: 64ch; }
@media (max-width: 760px) { .faq { grid-template-columns: minmax(0, 1fr); } }

/* close & footer */
.close .wrap { display: grid; gap: 28px; justify-items: start; }
.close .stores { margin-top: 0; }
.foot { position: relative; overflow: clip; border-top: 1px solid var(--line); padding-block: clamp(40px, 6vw, 72px) calc(env(safe-area-inset-bottom, 0px) + 28px); font-size: .9375rem; }
.foot-glow { position: absolute; left: 50%; top: -1px; width: min(720px, 90%); height: 1px; transform: translateX(-50%); pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .7; }
.foot-glow::after { content: ""; position: absolute; left: 10%; right: 10%; top: 0; height: 120px; background: radial-gradient(50% 100% at 50% 0%, var(--glow), transparent); }
.foot .wrap { position: relative; }
.foot-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 40px; }
.foot-brand { display: flex; gap: 14px; align-items: flex-start; }
.foot-brand img { border-radius: 10px; border: 1px solid var(--line-2); flex: none; }
.foot-brand span { display: grid; gap: 2px; line-height: 1.35; }
.foot-brand b { font-size: 1.0625rem; font-weight: 620; }
.foot-brand small { color: var(--muted); font-size: .875rem; }
.foot-cols { display: grid; grid-template-columns: repeat(3, minmax(0, auto)); justify-content: space-between; gap: 32px; }
.foot-col { display: grid; align-content: start; }
.foot-col h2 { margin: 0 0 6px; font-size: .8125rem; font-weight: 550; color: var(--muted); letter-spacing: 0; }
.foot-col a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; color: var(--ink-2); text-decoration: none; transition: color .15s; overflow-wrap: anywhere; }
.foot-col a:hover { color: var(--ink); }
.foot-col a .i { width: 18px; height: 18px; flex: none; color: var(--accent); }
.foot-col a .i.ext { width: 14px; height: 14px; color: var(--muted); transition: transform .25s var(--ease), color .15s; }
.foot-col a:hover .i.out { transform: translate(2px, -2px); color: var(--accent); }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: clamp(32px, 5vw, 56px); padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); }
.to-top { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--muted); text-decoration: none; font-size: .875rem; }
.to-top:hover { color: var(--ink); }
.to-top .i { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.to-top:hover .i { transform: translateY(-2px); }
.faq-more { display: flex; gap: 10px; align-items: flex-start; margin: 24px 0 0; color: var(--muted); }
.faq-more .i { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--accent); }
.faq-more a { color: var(--ink); overflow-wrap: anywhere; }
@media (max-width: 860px) {
  .foot-top { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}
@media (max-width: 560px) {
  .foot-cols { grid-template-columns: auto auto; justify-content: start; gap: 24px 48px; }
  .foot-col:last-child { grid-column: 1 / -1; }
}

/* ---------------------------------------------------------------- hero character idle (HeroCharacterCanvas timings) */
.hero-svg { width: 100%; height: auto; display: block; overflow: visible; }
.hero-eye, .hero-iris { transform-box: fill-box; transform-origin: center; }
.hero-body, .hero-head { transform-box: view-box; }
.hero-svg.blink .hero-eye { transform: scaleY(.08); }
@media (prefers-reduced-motion: no-preference) {
  .peek > .hero-svg, .st-hero > .hero-svg { transform-origin: 50% 88%; animation: breathe 3.6s ease-in-out infinite; }
  .peek > .hero-svg.react { animation: hop .7s var(--ease); }
  html { scroll-behavior: smooth; }
}
.hero-svg.off { animation-play-state: paused !important; }
@keyframes breathe { 0%, 100% { transform: scale(.992, .99); } 50% { transform: none; } }
@keyframes hop { 0%, 100% { transform: none; } 30% { transform: translateY(-8px) scale(.98, 1.03); } 60% { transform: scale(1.03, .96); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* panel top-edge light sweeps once when the panel arrives (added by main.js) */
@media (prefers-reduced-motion: no-preference) {
  .panel.lit > .edge::after { animation: sweep 1.6s var(--ease) both; }
}
@keyframes sweep { from { transform: translateX(-100%); opacity: 0; } 30% { opacity: 1; } to { transform: translateX(80%); opacity: .8; } }

/* ---------------------------------------------------------------- ambience (the page is never a flat void)
   Every moving layer below animates transform or opacity only, and stops under reduced motion. */
.grain { position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: .035;
  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='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
:root[data-theme="light"] .grain { opacity: .05; }

/* hero aurora: three soft light fields drifting on their own orbits, over a dot grid that fades out */
.aurora { position: absolute; top: -90px; left: -10%; right: -10%;   /* px top: a % would move with the hero height (font swap) and count as layout shift */ height: 900px; pointer-events: none; overflow: hidden; z-index: 0; }
.aurora i { position: absolute; width: 60vw; max-width: 900px; aspect-ratio: 1; border-radius: 50%; opacity: .5; }   /* no filter: blur, the gradients are already soft (GPU memory) */
.aurora .a1 { left: 8%; top: -30%; background: radial-gradient(closest-side, rgba(58, 223, 190, .55), transparent); }
.aurora .a2 { right: 2%; top: -18%; background: radial-gradient(closest-side, rgba(102, 247, 121, .35), transparent); }
.aurora .a3 { left: 38%; top: 10%; width: 40vw; background: radial-gradient(closest-side, rgba(58, 150, 223, .28), transparent); }
.alive .aurora .a1 { animation: orbit1 15s ease-in-out infinite alternate; }
.alive .aurora .a2 { animation: orbit2 18s ease-in-out infinite alternate; }
.alive .aurora .a3 { animation: orbit3 21s ease-in-out infinite alternate; }
.aurora-close { top: auto; bottom: -210px; height: 700px; }
.aurora-close i { opacity: .38; }
.aurora-close .a1 { left: -6%; top: 20%; }
.aurora-close .a2 { right: -4%; top: 5%; }
.aurora-close .a3 { left: 30%; top: 40%; }
:root[data-theme="light"] .aurora i { opacity: .35; }
@keyframes orbit1 { 50% { transform: translate3d(10vw, 14vh, 0) scale(1.25); } to { transform: translate3d(22vw, 4vh, 0) scale(1.05); } }
@keyframes orbit2 { 50% { transform: translate3d(-12vw, 20vh, 0) scale(.85); } to { transform: translate3d(-24vw, 6vh, 0) scale(1.15); } }
@keyframes orbit3 { 50% { transform: translate3d(-14vw, -6vh, 0) scale(1.35); } to { transform: translate3d(8vw, -12vh, 0) scale(1.1); } }

/* light rays: a fan of soft beams from above the headline, swaying slowly */
.rays { position: absolute; left: 50%; top: -80px; width: 1600px; height: 980px; margin-left: -800px; pointer-events: none; z-index: 0; transform-origin: 50% 0;
  opacity: 0; transition: opacity 1.6s;   /* not painted at all until the page has settled */
  background: conic-gradient(from 180deg at 50% 0%, transparent 0 138deg, rgba(58, 223, 190, .24) 146deg, transparent 152deg, rgba(102, 247, 121, .17) 161deg, transparent 168deg,
    rgba(58, 223, 190, .28) 178deg, transparent 186deg, rgba(96, 165, 250, .18) 196deg, transparent 203deg, rgba(58, 223, 190, .22) 213deg, transparent 222deg);
  -webkit-mask: radial-gradient(70% 90% at 50% 0%, #000 30%, transparent 80%); mask: radial-gradient(70% 90% at 50% 0%, #000 30%, transparent 80%); }
:root[data-theme="light"] .rays { --ray: .55; }
.alive .rays { opacity: calc(.85 * var(--ray, 1)); }
.rays-close { top: auto; bottom: -200px; transform-origin: 50% 100%; transform: scaleY(-1); height: 800px; }
.alive .rays { animation: sway 13s ease-in-out infinite alternate; }
.alive .rays-close { animation: sway-up 15s ease-in-out infinite alternate; }
@keyframes sway { from { transform: rotate(-7deg); opacity: calc(.65 * var(--ray, 1)); } to { transform: rotate(7deg); opacity: var(--ray, 1); } }
@keyframes sway-up { from { transform: scaleY(-1) rotate(-6deg); opacity: calc(.5 * var(--ray, 1)); } to { transform: scaleY(-1) rotate(6deg); opacity: calc(.9 * var(--ray, 1)); } }
.close { position: relative; overflow: clip; }
.close > .wrap { position: relative; z-index: 1; }
.dots { position: absolute; inset: 0 0 auto; width: 100%; height: 820px; pointer-events: none; z-index: 0;
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 16%, transparent) 1px, transparent 1.2px); background-size: 24px 24px;
  -webkit-mask: radial-gradient(60% 55% at 50% 30%, #000 20%, transparent 75%); mask: radial-gradient(60% 55% at 50% 30%, #000 20%, transparent 75%); }
.dots.live { background-image: none; -webkit-mask: none; mask: none; }
.hero > .wrap { z-index: 1; }

/* border beam: a light that travels around the command window's edge */
.beam { position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none; overflow: hidden; z-index: 2;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.beam::before { content: ""; position: absolute; left: 50%; top: 50%; width: 200%; aspect-ratio: 1; margin: -100% 0 0 -100%;
  background: conic-gradient(from 0deg, transparent 0 78%, var(--accent) 88%, #C7FFB8 92%, transparent 96%);
}
.alive .beam::before { animation: beam 7s linear infinite; }
@keyframes beam { to { transform: rotate(1turn); } }

/* spotlight: panels catch the cursor (position set by main.js as --mx / --my) */
.panel::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 6%, transparent), transparent 60%); z-index: 0; }
.panel:hover::after { opacity: 1; }
.panel > * { position: relative; z-index: 1; }
.panel > .edge, .panel > .beam, .panel > .peek { position: absolute; }
.game.panel::after { background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(102, 247, 121, .07), transparent 60%); }

/* example commands running under the hero; each one is a real button that fills the demo */
.ticker { position: relative; overflow: hidden; border-block: 1px solid var(--line); padding-block: 14px;
  -webkit-mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.ticker-track { display: flex; gap: 10px; width: max-content; }
.alive .ticker-track { animation: tick 48s linear infinite; }
.ticker:hover .ticker-track, .ticker:focus-within .ticker-track { animation-play-state: paused; }
.tk { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--s1); color: var(--ink-2); font: 500 .875rem var(--font); cursor: pointer; white-space: nowrap; transition: border-color .15s, color .15s, transform .4s var(--spring); }
.tk:hover { border-color: var(--accent); color: var(--ink); transform: translateY(-2px); }
.tk .i { width: 16px; height: 16px; color: var(--accent); }
@keyframes tick { to { transform: translateX(-50%); } }

/* ambient light per section, drifted by scroll in main.js */
.sec { position: relative; overflow: clip; content-visibility: auto; contain-intrinsic-size: auto 1000px; }   /* off-screen sections skip layout and paint until they approach */
.cv-off .sec { content-visibility: visible; }
.sec > .wrap { position: relative; z-index: 1; }
.amb { position: absolute; width: 56vw; max-width: 820px; aspect-ratio: 1; border-radius: 50%; pointer-events: none; z-index: 0; opacity: .3;
  background: radial-gradient(closest-side, var(--amb, rgba(58, 223, 190, .6)), transparent); }
:root[data-theme="light"] .amb { opacity: .16; }
.amb.l { left: -18vw; top: 8%; }
.amb.r { right: -18vw; top: 28%; }
.amb.blue { --amb: rgba(96, 165, 250, .5); }
.amb.green { --amb: rgba(102, 247, 121, .5); }
.alive .amb { animation: drift 17s ease-in-out infinite alternate; }
.alive .amb.r { animation-duration: 21s; animation-direction: alternate-reverse; }
/* ambient loops rest while their section is off screen */
.hero:not(.in) .aurora i, .hero:not(.in) .rays, .sec:not(.in) .aurora i, .sec:not(.in) .rays, .sec:not(.in) .amb { animation: none !important; }
@keyframes drift { 50% { transform: translate3d(8vw, 10vh, 0) scale(1.2); } to { transform: translate3d(-4vw, 18vh, 0) scale(.9); } }

@media (prefers-reduced-motion: reduce) {
  .sk::before, .rays, .alive .rays, .alive .amb, .aurora i, .beam::before, .ticker-track, .alive .aurora i, .alive .beam::before, .alive .ticker-track { animation: none !important; }
  .ticker { overflow-x: auto; }
}

/* entrance states: set before first paint so nothing flashes, released by main.js */
.motion #h-hero, .motion .hero .stores, .motion .win, .motion .peek, .motion .ticker { opacity: 0; }

/* ---------------------------------------------------------------- splash: the app icon's rings draw, the wordmark rises,
   then both fly into the header logo while the page opens behind them.
   First visit per tab only (html.splash-on, set by the head script). The intro is pure CSS so it starts with the first
   paint; main.js (splash()) flies the rings and wordmark into .brand. Without main.js, the CSS fades everything out at
   3.2s on its own. */
@property --sp-r { syntax: "<length>"; inherits: false; initial-value: 0px; }
.splash { display: none; }
.splash-on .splash { --sp-green: #45DC8A; display: grid; place-items: center; position: fixed; inset: 0; z-index: 100; animation: sp-fallback .5s ease 3.2s forwards; }
.splash-on .splash.js { animation: none; }
:root[data-theme="light"] .splash { --sp-green: #0B7A65; --sp-glow: 7%; }
.sp-bg { position: absolute; inset: 0; background: var(--canvas);
  -webkit-mask: radial-gradient(circle at 50% 50%, transparent calc(var(--sp-r) - 80px), #000 var(--sp-r));
  mask: radial-gradient(circle at 50% 50%, transparent calc(var(--sp-r) - 80px), #000 var(--sp-r)); }
.sp-bg::before { content: ""; position: absolute; left: 50%; top: 50%; width: min(96vmin, 820px); aspect-ratio: 1; margin: calc(min(96vmin, 820px) / -2) 0 0 calc(min(96vmin, 820px) / -2);
  border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--sp-green) var(--sp-glow, 11%), transparent), transparent); opacity: 0;
  animation: sp-glow 1.1s ease-out .15s forwards; }
.sp-stage { position: relative; width: clamp(160px, 22vw, 248px); }
.sp-visor { display: block; width: 100%; height: auto; overflow: visible; }
.sp-ring { fill: none; stroke: var(--sp-green); stroke-width: 9; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; animation: sp-draw .6s cubic-bezier(.65, 0, .35, 1) .05s forwards; }
.sp-ring.r { animation-delay: .16s; }
.sp-wordbox { position: absolute; left: 0; right: 0; top: calc(100% + 34px); display: flex; justify-content: center; }
.sp-word { white-space: nowrap; font-weight: 600; font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); letter-spacing: -.015em; line-height: 1.15; color: var(--ink); }   /* same type as .brand */
.sp-word > span { display: inline-block; vertical-align: top; overflow: hidden; padding-bottom: .08em; }
.sp-word > span > span { display: block; transform: translateY(110%); animation: sp-rise .7s cubic-bezier(.16, 1, .3, 1) .55s forwards; }
.sp-word > span + span > span { animation-delay: .63s; }
/* the header logo waits for the rings and wordmark to land (shown by main.js; by the fallback at 3.2s otherwise) */
.splash-on .brand { opacity: 0; animation: sp-brand .01s linear 3.2s forwards; }
@keyframes sp-draw { to { stroke-dashoffset: 0; } }
@keyframes sp-rise { to { transform: none; } }
@keyframes sp-glow { to { opacity: 1; } }
@keyframes sp-fallback { to { opacity: 0; visibility: hidden; } }
@keyframes sp-brand { to { opacity: 1; } }
/* with the splash, the headline is already in place when the page is revealed */
.splash-on.motion #h-hero { opacity: 1; }
/* the hero's landing on the command window (main.js flyIn) */
.land-ring { position: absolute; left: -5%; right: -5%; bottom: -3px; height: 16px; border-radius: 50%; border: 2px solid var(--accent); pointer-events: none; }
.spark { position: absolute; left: 50%; bottom: 4px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: #C7FFB8; pointer-events: none; }
