/* Big-Money Simple — the mobile view at /m (design "Wallet", picked 7-0 by a blind design review)
   Calm, premium cards + bottom sheets. Warm off-white light theme; forest-tinted dark theme with a gold hairline.
   Strict CSP: no inline styles; JS only sets custom properties (widths, offsets, indexes, scroll position). */

/* ── Fonts (self-hosted) ─────────────────────────────────────────────── */
@font-face { font-family: 'BM Sans'; src: url('/fonts/plus-jakarta-sans-latin-variable.woff2') format('woff2'); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'BM Serif'; src: url('/fonts/instrument-serif-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'BM Serif'; src: url('/fonts/instrument-serif-latin-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'BM Mono'; src: url('/fonts/jetbrains-mono-latin-variable.woff2') format('woff2'); font-weight: 100 800; font-style: normal; font-display: swap; }

/* ── Tokens ──────────────────────────────────────────────────────────── */
:root {
  color-scheme: light dark;
  --font-ui: 'BM Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'BM Serif', 'Iowan Old Style', Georgia, serif;
  --font-mono: 'BM Mono', ui-monospace, Menlo, monospace;

  --col: 460px;
  --pad: 16px;
  --r: 20px;
  --r-lg: 24px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --bar-h: 54px;
  --tab-h: 66px;
  --tab-gap: max(10px, var(--safe-bottom));

  /* Brand */
  --forest-950: #06130D; --forest-900: #0A1F15; --forest-800: #0E2A1E; --forest-700: #133627; --forest-600: #17402F; --forest-500: #1F5A41;
  --gold-100: #FBF0CF; --gold-300: #E3C88C; --gold-500: #C29C57; --gold-700: #93713A;

  /* Light theme: warm paper */
  --bg: #F4F1EA;
  --bg-outside: #EAE6DC;
  --surface: #FFFFFF;
  --sheet: #F2EFE7;
  --ink: #0E1A13;
  --ink-2: #3B4842;
  --ink-3: #59655E;
  --line: rgba(14, 26, 19, .08);
  --line-2: rgba(14, 26, 19, .14);
  --press: rgba(14, 26, 19, .045);
  --track: #E8EBE5;
  --accent: #17402F;
  --accent-on: #FBF0CF;
  --link: #1B5E43;
  --focus: #9A6B1F;
  --bar-bg: rgba(250, 248, 243, .97);
  --bar-line: rgba(14, 26, 19, .07);
  --tab-pill: #E3EBE4;
  --more-bg: #E6EDE7;
  --more-ink: #17402F;
  --chip-bg: #ECEDE8;
  --grabber: rgba(14, 26, 19, .2);
  --close-bg: rgba(14, 26, 19, .07);
  --backdrop: rgba(4, 12, 8, .34);
  --sk-1: #E8E4DA;
  --sk-2: #F3F0E9;

  --good: #1E8A57; --good-bg: #E1F3E8; --good-ink: #0E5A36;
  --warn: #C27A12; --warn-bg: #FCEFD2; --warn-ink: #7A4600;
  --bad: #C9473B; --bad-bg: #FCE5E2; --bad-ink: #9F2A21;
  --info: #2B74AA; --info-bg: #E3EEF8; --info-ink: #1A5482;
  --neutral: #8A958E; --neutral-bg: #ECEDE8; --neutral-ink: #45514A;

  /* categorical palette for composition bars on light surfaces */
  --seg-good: #17402F; --seg-info: #3E9E6F; --seg-warn: #C9A35C; --seg-neutral: #A9BDB1; --seg-bad: #B8693A;

  --sh-card: 0 1px 1px rgba(16, 34, 24, .04), 0 2px 6px rgba(16, 34, 24, .05), 0 12px 28px -14px rgba(16, 34, 24, .18);
  --sh-float: 0 1px 2px rgba(16, 34, 24, .06), 0 12px 32px -10px rgba(16, 34, 24, .28);
  --sh-wallet: 0 2px 4px rgba(6, 19, 13, .14), 0 16px 30px -12px rgba(6, 19, 13, .5), 0 34px 60px -30px rgba(6, 19, 13, .55);

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-sheet: cubic-bezier(.32, .72, 0, 1);
  --spring: cubic-bezier(.34, 1.3, .64, 1);
  --spring-pop: cubic-bezier(.34, 1.56, .64, 1);
}
/* Real damped-spring curves (zeta .72 and .58) where linear() easing is supported. */
@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --spring: linear(0, 0.0301, 0.1057, 0.2082, 0.3234, 0.4408, 0.553, 0.6553, 0.7451, 0.8211, 0.8834, 0.9328, 0.9705, 0.998, 1.017, 1.0291, 1.0357, 1.0383, 1.0378, 1.0354, 1.0317, 1.0274, 1.0229, 1.0185, 1.0144, 1.0108, 1.0077, 1.0052, 1.0031, 1.0015, 1.0004, 0.9995, 0.999, 0.9987, 1);
    --spring-pop: linear(0, 0.0462, 0.161, 0.3127, 0.4766, 0.6346, 0.7749, 0.8907, 0.9797, 1.0426, 1.082, 1.1019, 1.1067, 1.1007, 1.0879, 1.0714, 1.0539, 1.0371, 1.0224, 1.0104, 1.0012, 0.9948, 0.9909, 0.989, 0.9886, 0.9894, 0.9908, 0.9926, 0.9945, 0.9962, 0.9978, 0.999, 1, 1.0006, 1);
  }
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #07120E;
    --bg-outside: #040B08;
    --surface: #0F1D16;
    --sheet: #0B1712;
    --ink: #F4F1EA;
    --ink-2: #C6CFC9;
    --ink-3: #909C95;
    --line: rgba(244, 241, 234, .08);
    --line-2: rgba(244, 241, 234, .15);
    --press: rgba(244, 241, 234, .06);
    --track: rgba(244, 241, 234, .1);
    --accent: #E3C88C;
    --accent-on: #0E2A1E;
    --link: #E3C88C;
    --focus: #E3C88C;
    --bar-bg: rgba(13, 26, 20, .97);
    --bar-line: rgba(227, 200, 140, .14);
    --tab-pill: rgba(227, 200, 140, .15);
    --more-bg: rgba(227, 200, 140, .13);
    --more-ink: #EBD6A4;
    --chip-bg: rgba(244, 241, 234, .09);
    --grabber: rgba(244, 241, 234, .26);
    --close-bg: rgba(244, 241, 234, .1);
    --backdrop: rgba(0, 0, 0, .55);
    --sk-1: #0F1D16;
    --sk-2: #182A21;

    --good: #5FD39A; --good-bg: rgba(95, 211, 154, .14); --good-ink: #7FE0B0;
    --warn: #F2C05C; --warn-bg: rgba(242, 192, 92, .14); --warn-ink: #F6CF7D;
    --bad: #FF8A7E; --bad-bg: rgba(255, 138, 126, .14); --bad-ink: #FFA59B;
    --info: #79BDF2; --info-bg: rgba(121, 189, 242, .14); --info-ink: #96CCF6;
    --neutral: #8E9A93; --neutral-bg: rgba(255, 255, 255, .08); --neutral-ink: #C2CBC5;

    --seg-good: #E3C88C; --seg-info: #5FC08F; --seg-warn: #F3EAD2; --seg-neutral: #7FA391; --seg-bad: #D08B5B;

    --sh-card: 0 0 0 1px rgba(227, 200, 140, .13), 0 12px 30px -18px rgba(0, 0, 0, .9);
    --sh-float: 0 0 0 1px rgba(227, 200, 140, .12), 0 16px 40px -12px rgba(0, 0, 0, .85);
    --sh-wallet: 0 0 0 1px rgba(227, 200, 140, .2), 0 24px 50px -24px rgba(0, 0, 0, .9), 0 0 70px -34px rgba(227, 200, 140, .32);
  }
}

/* Tone hooks: one class sets the colour family for pills, dots, rings, meters and callouts. */
.tone-good { --t: var(--good); --t-bg: var(--good-bg); --t-ink: var(--good-ink); }
.tone-warn { --t: var(--warn); --t-bg: var(--warn-bg); --t-ink: var(--warn-ink); }
.tone-bad { --t: var(--bad); --t-bg: var(--bad-bg); --t-ink: var(--bad-ink); }
.tone-info { --t: var(--info); --t-bg: var(--info-bg); --t-ink: var(--info-ink); }
.tone-neutral { --t: var(--neutral); --t-bg: var(--neutral-bg); --t-ink: var(--neutral-ink); }

/* ── Base ────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html {
  background-color: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  transition: background-color .45s ease;
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit; -webkit-tap-highlight-color: transparent; }
a { color: var(--link); -webkit-tap-highlight-color: transparent; }
img, svg { display: block; }
table { border-collapse: collapse; }
.ico { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.noscript { max-width: 32rem; margin: 20vh auto; padding: 0 24px; text-align: center; color: var(--ink-2); }
.skip {
  position: fixed; left: 12px; top: calc(var(--safe-top) + 8px); z-index: 100;
  padding: 12px 18px; border-radius: 14px; background: var(--accent); color: var(--accent-on);
  font-weight: 700; text-decoration: none; transform: translateY(-160%); transition: transform .25s var(--ease-out);
}
.skip:focus { transform: none; }

/* ── Boot skeleton ───────────────────────────────────────────────────── */
.boot { max-width: var(--col); margin: 0 auto; padding: calc(var(--safe-top) + 6px) var(--pad) 0; }
.boot__bar { display: flex; align-items: center; justify-content: space-between; height: var(--bar-h); }
.skel {
  display: block; border-radius: 12px;
  background: linear-gradient(100deg, var(--sk-1) 30%, var(--sk-2) 50%, var(--sk-1) 70%) 0 0 / 300% 100%;
  animation: shimmer 1.5s linear infinite;
}
.skel--logo { width: 128px; height: 30px; }
.skel--avatar { width: 38px; height: 38px; border-radius: 50%; }
.skel--title { width: 132px; height: 34px; margin: 10px 4px 0; }
.skel--sub { width: 196px; height: 16px; margin: 10px 4px 0; }
.skel--wallet {
  position: relative; height: 232px; margin-top: 22px; border-radius: var(--r-lg); overflow: hidden;
  background: linear-gradient(155deg, #1E5139 0%, #143A2A 45%, #0B2318 100%); animation: none;
}
.skel--wallet::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 246, 220, .09) 50%, transparent 70%) 0 0 / 300% 100%;
  animation: shimmer 1.5s linear infinite;
}
.boot__tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.skel--tile { height: 132px; border-radius: var(--r); }
.skel--head { width: 156px; height: 22px; margin: 34px 4px 0; }
.skel--move { height: 106px; margin-top: 12px; border-radius: var(--r); }
@keyframes shimmer { to { background-position: -150% 0; } }

/* ── Top bar: transparent at rest, frosted when the large title scrolls under it ─────────── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  max-width: var(--col); margin: 0 auto; padding-top: var(--safe-top);
  transition: transform .52s var(--ease-sheet), opacity .3s ease, border-radius .52s var(--ease-sheet);
}
.topbar::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: var(--bar-bg); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(1.8) blur(20px); backdrop-filter: saturate(1.8) blur(20px);
  opacity: var(--p, 0);
}
.topbar__inner { position: relative; display: flex; align-items: center; justify-content: space-between; height: var(--bar-h); padding: 0 6px 0 16px; }
.brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.brand__mark { width: 30px; height: 30px; border-radius: 8px; box-shadow: 0 1px 2px rgba(6, 19, 13, .25), 0 0 0 .5px rgba(6, 19, 13, .2); }
.brand__word { font: 400 23px/1 var(--font-display); letter-spacing: .005em; color: var(--ink); opacity: calc(1 - var(--p, 0)); transition: opacity .15s linear; }
.topbar__title {
  position: absolute; left: 56px; top: 50%; max-width: calc(100% - 56px - 176px);
  font-size: 17px; font-weight: 780; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transform: translateY(calc(-50% + (1 - var(--p, 0)) * 10px));
  opacity: clamp(0, calc(var(--p, 0) * 2.4 - 1.4), 1);
  pointer-events: none;
}
.topbar__actions { display: flex; align-items: center; gap: 0; }
.avatar-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; }
.avatar {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(150deg, #23593F, #0E2A1E); color: var(--gold-100);
  font-size: 13px; font-weight: 750; letter-spacing: .02em;
  box-shadow: inset 0 0 0 1px rgba(227, 200, 140, .45), 0 2px 6px -2px rgba(6, 19, 13, .4);
  transition: transform .3s var(--spring);
}
.avatar .ico { width: 20px; height: 20px; }
.avatar-btn:active .avatar { transform: scale(.92); }

/* ── Screen + large title ────────────────────────────────────────────── */
.screen {
  position: relative; min-height: 100vh; min-height: 100dvh; max-width: var(--col); margin: 0 auto;
  padding-bottom: calc(var(--tab-h) + var(--tab-gap) + 30px);
  background-color: var(--bg);
  transition: transform .52s var(--ease-sheet);
}
.screen:focus { outline: none; }
.view { animation: view-in .55s var(--ease-out) backwards; }
@keyframes view-in { from { opacity: 0; transform: translate3d(var(--dx, 0px), var(--dy, 10px), 0); } }
.titlebar { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; row-gap: 1px; padding: calc(var(--safe-top) + var(--bar-h) + var(--strips, 0) * 50px + 2px) 20px 12px; }
.large-title {
  font-size: 30px; line-height: 1.1; font-weight: 800; letter-spacing: -.03em;
  opacity: calc(1 - var(--p, 0) * .9);
}
.large-sub { font-size: 14px; line-height: 1.35; font-weight: 650; color: var(--tab-ink, var(--ink-3)); }

/* ── Hero: the wallet card ───────────────────────────────────────────── */
.wallet {
  position: relative; margin: 0 var(--pad); perspective: 1400px;
  --seg-good: #E3C88C; --seg-info: #5FC08F; --seg-warn: #F3EAD2; --seg-neutral: #8DB4A0; --seg-bad: #D08B5B;
  --focus: #FBF0CF;
}
.wallet__card { display: grid; transform-style: preserve-3d; transition: transform .9s var(--spring); }
.wallet.is-flippable .wallet__card { cursor: pointer; }
.wallet.is-flipped .wallet__card { transform: rotateY(180deg); }
.wallet__face {
  grid-area: 1 / 1; position: relative; overflow: hidden; min-height: 0;
  display: flex; flex-direction: column;
  padding: 15px 18px 17px 20px; border-radius: var(--r-lg); color: #F6EFDC;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  background-color: #133627;
  background-image:
    linear-gradient(112deg, transparent 36%, rgba(255, 246, 220, .075) 46%, transparent 57%),
    repeating-conic-gradient(from 180deg at 104% 118%, transparent 0deg, rgba(227, 200, 140, .085) .7deg, transparent 1.4deg, transparent 6deg),
    radial-gradient(85% 70% at 100% 0%, rgba(227, 200, 140, .3), transparent 62%),
    radial-gradient(120% 95% at 0% 100%, rgba(2, 9, 6, .55), transparent 64%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .02) 0 1px, transparent 1px 4px),
    linear-gradient(155deg, #1F553C 0%, #143A2A 44%, #0A2117 100%);
  box-shadow: var(--sh-wallet), inset 0 0 0 1px rgba(227, 200, 140, .28), inset 0 1px 0 rgba(255, 244, 214, .2);
}
.wallet__face::after { /* one slow sheen sweep on arrival */
  content: ''; position: absolute; inset: -40% -60%; pointer-events: none;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 248, 228, .16) 50%, transparent 58%);
  transform: translateX(-60%); animation: sheen 2.4s var(--ease-out) .5s 1 both;
}
@keyframes sheen { to { transform: translateX(60%); } }
.wallet__back { transform: rotateY(180deg); padding-top: 0; }
.wallet__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; min-height: 30px; }
.wallet__main { display: flex; align-items: center; gap: 12px; }
.wallet__main > .wallet__value { flex: 1; min-width: 0; }
.wallet__label { padding-top: 5px; font-size: 12.5px; line-height: 1.35; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: rgba(251, 240, 207, .82); }
.wallet__value {
  display: block; margin-top: 4px; font-family: var(--font-display); font-weight: 400; line-height: 1; letter-spacing: -.005em;
  color: #F7E8C2;
  background: linear-gradient(180deg, #FFF8E6 8%, #F3DFAA 52%, #D7B46D 96%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  text-wrap: balance;
}
.wallet__value.sz-xl { font-size: 58px; }
.wallet__value.sz-l { font-size: 52px; }
.wallet__value.sz-m { font-size: 44px; }
.wallet__value.sz-s { font-size: 36px; }
.wallet__value .unit { font-style: italic; font-size: .42em; letter-spacing: .01em; }
.wallet__caption { margin-top: 6px; font-size: 14px; line-height: 1.42; color: #EAE2CC; text-wrap: pretty; }
.wallet .stack, .wallet .meter, .wallet .range { margin-top: 14px; }
.wallet .ladder { margin-top: 16px; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; }
.status__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--t); flex: none; }
.wallet__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 16px; min-height: 36px; }
.wallet__status { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; font-size: 13.5px; line-height: 1.4; font-weight: 650; color: #F6EFDC; }
.wallet__status .status__dot { margin-top: 5px; }
.wallet__status .status__dot.tone-good { background: #74E3AB; box-shadow: 0 0 0 3px rgba(116, 227, 171, .18); }
.wallet__status .status__dot.tone-warn { background: #F5C66B; box-shadow: 0 0 0 3px rgba(245, 198, 107, .18); }
.wallet__status .status__dot.tone-bad { background: #FF9C8F; box-shadow: 0 0 0 3px rgba(255, 156, 143, .18); }
.wallet__status .status__dot.tone-info { background: #8CCBF7; box-shadow: 0 0 0 3px rgba(140, 203, 247, .18); }
.wallet__status .status__dot.tone-neutral { background: #CBD5CF; }
/* The whole card opens its section: the corner chevron is a button whose ::after covers the card. */
.wallet__door { flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin: -7px -12px -7px 0; border-radius: 50%; color: #FBF0CF; }
.wallet__door::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: var(--r-lg); transition: background-color .15s ease; }
.wallet__door:active::after { background: rgba(255, 248, 228, .05); }
.wallet__door:focus-visible { outline: none; }
.wallet__door:focus-visible::after { outline: 3px solid var(--focus); outline-offset: 3px; }
.wallet__door-ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(227, 200, 140, .34); transition: transform .3s var(--spring); }
.wallet__door-ico .ico { width: 17px; height: 17px; stroke-width: 2.4; }
.wallet__door:active .wallet__door-ico { transform: scale(.9); }
@media (hover: hover) { .wallet__door:hover::after { background: rgba(255, 248, 228, .04); } }
.wallet__flip {
  position: relative; z-index: 2; flex: none; width: 44px; height: 44px; margin: -6px -10px -6px 0;
  display: grid; place-items: center; border-radius: 50%; color: #FBF0CF;
}
.wallet__flip .ico { width: 34px; height: 34px; padding: 8px; border-radius: 50%; background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(227, 200, 140, .3); stroke-width: 2; transition: transform .6s var(--spring-pop); }
.wallet__flip:active .ico { transform: rotate(180deg) scale(.9); }
.wallet__stripe { display: block; height: 38px; margin: 18px -20px 14px; background: linear-gradient(180deg, #030906, #0B1A12 70%, #12261B); box-shadow: inset 0 -1px 0 rgba(227, 200, 140, .12); }
.wallet__back-title { font-size: 13px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: rgba(251, 240, 207, .8); margin-bottom: 10px; }
.wallet__asof { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: rgba(251, 240, 207, .72); }

/* ── Glance tiles ────────────────────────────────────────────────────── */
.glance { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px var(--pad) 0; }
.glance--1 { grid-template-columns: 1fr; }
.tile {
  display: flex; flex-direction: column; min-height: 136px; min-width: 0;
  padding: 14px 14px 14px 16px; border-radius: var(--r); background: var(--surface); box-shadow: var(--sh-card);
}
.tile__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.tile__label { font-size: 13px; line-height: 1.3; font-weight: 650; color: var(--ink-2); padding-top: 2px; }
.tile__value { display: block; margin-top: auto; padding-top: 10px; font-family: var(--font-display); font-weight: 400; line-height: 1.02; color: var(--ink); white-space: nowrap; }
.tile__value.sz-l { font-size: 34px; }
.tile__value.sz-m { font-size: 30px; }
.tile__value.sz-s { font-size: 26px; }
.tile__value .unit { font-family: var(--font-ui); font-size: 13px; font-weight: 650; color: var(--ink-2); letter-spacing: 0; }
.tile__cap { margin-top: 6px; font-size: 12.5px; line-height: 1.38; color: var(--ink-3); }
.tile .meter, .tile .range, .tile .ladder { margin-top: 10px; }
.glance--1 .tile { min-height: 0; }

/* ── Section headers ─────────────────────────────────────────────────── */
.moves-sec, .group-sec { margin: 22px var(--pad) 0; }
.group-sec--deep { margin-top: 26px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 4px 10px; }
.sec-title { font-size: 21px; line-height: 1.2; font-weight: 780; letter-spacing: -.022em; }
.sec-title--sm { font-size: 15px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.sec-meta { font-size: 13px; font-weight: 650; color: var(--ink-3); white-space: nowrap; }

/* ── Move cards ──────────────────────────────────────────────────────── */
.moves { display: grid; gap: 10px; }
.move {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; column-gap: 11px; width: 100%;
  padding: 13px 8px 13px 13px; border-radius: var(--r); background: var(--surface); box-shadow: var(--sh-card);
  scroll-margin-top: calc(var(--safe-top) + var(--bar-h) + 12px);
  transition: transform .45s var(--spring), box-shadow .3s ease;
}
.move:active { transform: scale(.975); }
@media (hover: hover) { .move:hover { box-shadow: var(--sh-float); } }
.rank {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; flex: none;
  font: 400 20px/1 var(--font-display); color: var(--gold-300);
  background: linear-gradient(150deg, #23593F, #0E2A1E);
  box-shadow: inset 0 0 0 1px rgba(227, 200, 140, .35);
}
.rank--gold { color: var(--forest-800); background: linear-gradient(150deg, #FBEFCB, #D9B670 60%, #C29C57); box-shadow: inset 0 0 0 1px rgba(147, 113, 58, .45), 0 3px 8px -3px rgba(147, 113, 58, .6); }
.rank--plain { color: var(--ink-2); background: var(--chip-bg); box-shadow: none; font-family: var(--font-ui); font-size: 14px; font-weight: 750; }
.rank--sm { width: 28px; height: 28px; font-size: 17px; }
.move__body { display: flex; flex-direction: column; min-width: 0; }
.move__cat { font-size: 11.5px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--tab-ink, var(--ink-3)); margin-bottom: 3px; }
.move__title { font-size: 16px; line-height: 1.36; font-weight: 650; color: var(--ink); letter-spacing: -.005em; }
.move__tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.move__chev { align-self: center; width: 18px; height: 18px; color: var(--ink-3); opacity: .7; }

/* Pills */
.pill {
  display: inline-flex; align-items: center; gap: 4px; min-height: 26px; padding: 3px 8px 3px 7px;
  border-radius: 999px; background: var(--t-bg); color: var(--t-ink);
  font-size: 12px; line-height: 1.25; font-weight: 700; letter-spacing: .005em;
}
.pill__ico { width: 13px; height: 13px; stroke-width: 2.4; }
.pill--sm { min-height: 22px; max-width: 100%; padding: 2px 9px; font-size: 12px; }

/* "See N more" pill + the inline expansion */
.more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .55s var(--ease-out); }
.more.is-open { grid-template-rows: 1fr; }
.more__inner { min-height: 0; overflow: hidden; margin: 0 -16px; padding: 0 16px; visibility: hidden; transition: visibility 0s linear .55s; }
.more.is-open .more__inner { visibility: visible; transition-delay: 0s; padding-bottom: 6px; }
.more__label { margin: 18px 4px 10px; font-size: 12.5px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.moves--more > li { opacity: 0; transform: translateY(16px) scale(.98); transition: opacity .3s ease, transform .6s var(--spring); }
.more.is-open .moves--more > li { opacity: 1; transform: none; transition-delay: calc(70ms + var(--i, 0) * 40ms); }
.more-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; margin-top: 12px;
  border-radius: 999px; background: var(--more-bg); color: var(--more-ink); font-size: 15px; font-weight: 750;
  transition: transform .4s var(--spring), background-color .2s ease;
}
.more-btn:active { transform: scale(.97); }
.more-btn__ico { width: 20px; height: 20px; stroke-width: 2.2; transition: transform .55s var(--spring-pop); }
.more-btn.is-open .more-btn__ico { transform: rotate(180deg); }
.empty { display: flex; align-items: center; gap: 12px; padding: 18px 16px; border-radius: var(--r); background: var(--surface); box-shadow: var(--sh-card); color: var(--ink-2); }
.empty__icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--good-bg); color: var(--good-ink); flex: none; }
.empty__icon .ico { width: 20px; height: 20px; stroke-width: 2.3; }

/* ── Grouped lists (Explore rows, deep links) ────────────────────────── */
.group { border-radius: var(--r); background: var(--surface); box-shadow: var(--sh-card); overflow: hidden; }
.group > li { position: relative; }
.group > li + li::before { content: ''; position: absolute; top: 0; left: 64px; right: 0; height: 1px; background: var(--line); }
.row {
  display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 14px; width: 100%; min-height: 66px;
  padding: 11px 12px 11px 16px; transition: background-color .15s ease;
}
.row:active { background: var(--press); }
@media (hover: hover) { .row:hover, .link-row:hover { background: var(--press); } }
.row__text { display: flex; flex-direction: column; min-width: 0; }
.row__title { font-size: 15.5px; font-weight: 650; line-height: 1.3; color: var(--ink); }
.row__sub { margin-top: 2px; font-size: 13px; line-height: 1.35; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__chev { width: 18px; height: 18px; color: var(--ink-3); opacity: .7; }
.icon-tile {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #FFFFFF; flex: none;
  background: linear-gradient(160deg, var(--h1), var(--h2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(6, 19, 13, .18);
}
.icon-tile .ico { width: 20px; height: 20px; stroke-width: 2; }
.icon-tile--lg { width: 50px; height: 50px; border-radius: 15px; }
.icon-tile--lg .ico { width: 27px; height: 27px; }
.icon-tile--sm { width: 30px; height: 30px; border-radius: 9px; }
.icon-tile--sm .ico { width: 18px; height: 18px; }
.hue-forest { --h1: #2C6E50; --h2: #17402F; }
.hue-emerald { --h1: #38A673; --h2: #1E7650; }
.hue-teal { --h1: #379AA5; --h2: #206C78; }
.hue-gold { --h1: #D2B06A; --h2: #9E7837; }
.hue-copper { --h1: #D1875A; --h2: #A15A31; }
.hue-slate { --h1: #6382B8; --h2: #3E5889; }
.hue-plum { --h1: #9D6CA2; --h2: #6C4372; }
.link-row {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; min-height: 54px;
  padding: 10px 14px 10px 16px; color: var(--ink); text-decoration: none; transition: background-color .15s ease;
}
.link-row--plain { grid-template-columns: 1fr auto; }
button.link-row { width: 100%; text-align: left; }
.link-row:active { background: var(--press); }
.link-row__text { display: flex; flex-direction: column; min-width: 0; }
.link-row__label { font-size: 15px; font-weight: 650; line-height: 1.35; color: var(--ink); }
.link-row__note { font-size: 12.5px; color: var(--ink-3); }
.link-row__ico { width: 18px; height: 18px; color: var(--link); }
.link-row__app { width: 30px; height: 30px; border-radius: 9px; box-shadow: 0 0 0 .5px rgba(6, 19, 13, .3), 0 1px 3px rgba(6, 19, 13, .25); }
.group-sec--deep .group > li + li::before { left: 58px; }

/* ── Fine print ──────────────────────────────────────────────────────── */
.fine { margin: 34px calc(var(--pad) + 4px) 0; padding-top: 18px; border-top: 1px solid var(--line); }
.fine__notes { display: grid; gap: 10px; margin-bottom: 12px; }
.note { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; line-height: 1.5; color: var(--ink-3); }
.note__ico { width: 16px; height: 16px; margin-top: 1px; stroke-width: 2; }
.fine__banner { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; line-height: 1.5; color: var(--ink-3); }
.fine__ico { width: 16px; height: 16px; margin-top: 1px; stroke-width: 2; }
.fine__link { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; font-size: 14px; font-weight: 750; color: var(--link); text-decoration: none; }
.fine__link .ico { width: 16px; height: 16px; stroke-width: 2.2; }
.fine__asof { font-size: 12px; color: var(--ink-3); }

/* ── Floating tab bar with a sliding active pill ─────────────────────── */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  max-width: var(--col); margin: 0 auto; padding: 0 12px var(--tab-gap);
  pointer-events: none;
  transition: transform .45s var(--ease-sheet), opacity .3s ease;
}
.tabbar__inner {
  position: relative; display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr));
  padding: 6px; border-radius: 30px; pointer-events: auto;
  background: var(--bar-bg); box-shadow: var(--sh-float), inset 0 0 0 1px var(--bar-line);
  -webkit-backdrop-filter: saturate(1.8) blur(22px); backdrop-filter: saturate(1.8) blur(22px);
}
.tabbar__pill {
  position: absolute; top: 6px; bottom: 6px; left: 6px; width: calc((100% - 12px) / var(--n, 5));
  border-radius: 24px; background: var(--tab-soft, var(--tab-pill));
  transform: translateX(calc(var(--i, 0) * 100%));
  transition: transform .6s var(--spring-pop), background-color .35s ease;
}
.tab {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 54px; border-radius: 24px; color: var(--ink-3); transition: color .2s ease;
}
.tab__icon { display: grid; place-items: center; }
.tab__icon .ico { width: 24px; height: 24px; transition: transform .5s var(--spring-pop); }
.tab__label { font-size: 12px; line-height: 1.2; font-weight: 700; letter-spacing: .01em; }
.tab.is-active { color: var(--tab-accent, var(--accent)); }
.tab.is-active .ico { stroke-width: 2.1; animation: tab-pop .55s var(--spring-pop); }
.tab:active .ico { transform: scale(.88); }
@keyframes tab-pop { 0% { transform: scale(.82); } 100% { transform: scale(1); } }

/* ── Bottom sheets + the receding page behind them ───────────────────── */
html.has-sheet { overflow: hidden; background-color: #000; }
html.has-sheet .screen {
  transform: translateY(calc(var(--safe-top) + 12px)) scale(.92);
  transform-origin: 50% var(--lock-y, 0px);
  clip-path: inset(var(--lock-y, 0px) 0 0 0 round 26px);
}
@media (prefers-color-scheme: dark) {
  .screen { transition: transform .52s var(--ease-sheet), background-color .45s ease; }
  html.has-sheet .screen { background-color: #141B17; }
}
html.has-sheet .topbar { transform: translateY(calc(var(--safe-top) + 12px)) scale(.92); transform-origin: 50% 0; border-radius: 26px 26px 0 0; }
html.has-sheet .tabbar { opacity: 0; transform: translateY(24px); }
.sheet-layer { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.sheet-backdrop { position: absolute; inset: 0; background: var(--backdrop); opacity: 0; transition: opacity .45s ease; }
.sheet-layer.is-open .sheet-backdrop { opacity: 1; }
.sheet {
  position: relative; display: flex; flex-direction: column; width: 100%; max-width: var(--col);
  max-height: calc(100% - var(--safe-top) - 34px);
  border-radius: 28px 28px 0 0; background: var(--sheet);
  box-shadow: 0 -1px 0 rgba(255, 255, 255, .5) inset, 0 -18px 50px -12px rgba(0, 0, 0, .3);
  transform: translateY(calc(100% + 30px));
  transition: transform .52s var(--ease-sheet);
  outline: none;
}
.sheet-layer.is-open .sheet { transform: translateY(var(--drag, 0px)); }
.sheet.is-dragging { transition: none; }
.sheet__top { position: relative; flex: none; display: flex; justify-content: center; height: 46px; touch-action: none; cursor: grab; border-bottom: 1px solid transparent; transition: border-color .2s ease; }
.sheet__top.is-scrolled { border-bottom-color: var(--line); }
.sheet__grabber { width: 40px; height: 5px; margin-top: 8px; border-radius: 3px; background: var(--grabber); }
.sheet__close { position: absolute; top: 6px; right: 8px; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--ink-2); }
.sheet__close-dot { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--close-bg); transition: transform .3s var(--spring); }
.sheet__close-dot .ico { width: 18px; height: 18px; stroke-width: 2.4; }
.sheet__close:active .sheet__close-dot { transform: scale(.88); }
.sheet__scroll { overflow-y: auto; overscroll-behavior: contain; padding: 2px 18px calc(30px + var(--safe-bottom)); }
@media (prefers-color-scheme: dark) {
  .sheet { box-shadow: 0 0 0 1px rgba(227, 200, 140, .1), 0 -18px 50px -12px rgba(0, 0, 0, .8); }
}

/* Sheet content */
.sheet-title { font-size: 23px; line-height: 1.24; font-weight: 780; letter-spacing: -.022em; color: var(--ink); }
.md-eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 13px; font-weight: 700; color: var(--ink-3); }
.md-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.md-tags .pill { min-height: 30px; padding: 5px 12px; font-size: 13px; }
.md-lede { font-size: 15.5px; line-height: 1.6; color: var(--ink-2); }
.sd-head + .md-lede { margin-top: 18px; font-size: 16px; }
.panel { margin-top: 26px; }
.panel__title { display: flex; align-items: center; gap: 8px; margin: 0 4px 10px; font-size: 12.5px; font-weight: 780; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.panel__ico { width: 16px; height: 16px; stroke-width: 2; }
.panel__text { font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.card { border-radius: 18px; background: var(--surface); box-shadow: var(--sh-card); padding: 16px; }
.card-list { border-radius: 18px; background: var(--surface); box-shadow: var(--sh-card); overflow: hidden; }
.card-list > li { position: relative; }
.card-list > li + li::before { content: ''; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--line); }
.acct-links > li + li::before { left: 58px; }
.steps { counter-reset: step; border-radius: 18px; background: var(--surface); box-shadow: var(--sh-card); padding: 4px 16px; }
.steps > li { counter-increment: step; position: relative; padding: 13px 0 13px 42px; font-size: 14.5px; line-height: 1.52; color: var(--ink-2); }
.steps > li + li { border-top: 1px solid var(--line); }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 12px; display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-on);
  font: 400 16px/1 var(--font-display);
}
.note--sheet { margin-top: 24px; padding: 14px 16px; border-radius: 16px; background: var(--chip-bg); color: var(--ink-2); }
.note--block { padding: 2px 4px; }
.ladder-card__text { font-size: 14.5px; color: var(--ink-2); }
.ladder-card__text strong { color: var(--ink); font-weight: 750; }
.sd-head { display: flex; align-items: flex-start; gap: 14px; }
.sd-head__text { min-width: 0; }
.sd-eyebrow { font-size: 12.5px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 3px; }
.sd-summary { margin-top: 6px; font-size: 14.5px; line-height: 1.45; color: var(--ink-3); }
.acct-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.avatar--lg { width: 56px; height: 56px; font-size: 19px; }
.cta {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; margin-top: 18px; padding: 12px 22px;
  border-radius: 999px; font-size: 16px; font-weight: 750; text-decoration: none; text-align: center;
  transition: transform .4s var(--spring), box-shadow .2s ease;
}
.cta + .cta { margin-top: 10px; }
.cta:active { transform: scale(.97); }
.cta__ico { width: 18px; height: 18px; stroke-width: 2.1; }
.cta--primary {
  color: #FBF0CF; background-color: #17402F; background-image: linear-gradient(180deg, #22593F, #133627);
  box-shadow: inset 0 1px 0 rgba(255, 244, 214, .16), inset 0 0 0 1px rgba(227, 200, 140, .3), 0 12px 24px -12px rgba(14, 42, 30, .7);
}
.cta--secondary { color: var(--ink); background: var(--surface); box-shadow: var(--sh-card); }
@media (prefers-color-scheme: dark) {
  .cta--primary { color: #0E2A1E; background-color: #E3C88C; background-image: linear-gradient(180deg, #F3DFA9, #D2AF69); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 12px 28px -14px rgba(227, 200, 140, .55); }
}

/* ── Blocks ──────────────────────────────────────────────────────────── */
.blocks { display: grid; gap: 14px; margin-top: 22px; }
.b-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.b-stat { padding: 14px 16px; border-radius: 18px; background: var(--surface); box-shadow: var(--sh-card); }
.b-stat__label { font-size: 13px; font-weight: 650; line-height: 1.3; color: var(--ink-2); }
.b-stat__value { display: block; margin-top: 8px; font-family: var(--font-display); font-size: 31px; line-height: 1.04; color: var(--ink); }
.b-stat__value .unit { font-size: .58em; }
.b-stat.tone-good .b-stat__value, .b-stat.tone-info .b-stat__value, .b-stat.tone-warn .b-stat__value, .b-stat.tone-bad .b-stat__value { color: var(--t-ink); }
.b-stat__cap { margin-top: 4px; font-size: 12.5px; line-height: 1.35; color: var(--ink-3); }
.b-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 13px 16px; }
.b-row__main { display: flex; flex: 1 1 auto; flex-direction: column; gap: 2px; min-width: 0; }
.b-row__label { font-size: 15px; line-height: 1.38; color: var(--ink); }
.b-row__note { font-size: 12.5px; line-height: 1.4; color: var(--ink-3); }
.b-row__value { flex: none; max-width: 55%; font-size: 15px; line-height: 1.38; font-weight: 750; text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
.b-row__value.ink-good { color: var(--good-ink); }
.b-row__value.ink-warn { color: var(--warn-ink); }
.b-row__value.ink-bad { color: var(--bad-ink); }
.b-row__value.ink-info { color: var(--info-ink); }
.b-bars__list { display: grid; gap: 16px; }
.bar__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.bar__label { font-size: 14px; font-weight: 650; line-height: 1.35; color: var(--ink); min-width: 0; }
.bar__value { font-size: 14px; font-weight: 750; color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; }
.bar__track { position: relative; display: block; height: 8px; margin-top: 8px; border-radius: 4px; background: var(--track); }
.bar__fill { display: block; width: var(--w); height: 100%; border-radius: inherit; background: var(--fill); transform-origin: left; animation: grow .9s var(--ease-out) .15s backwards; }
.fill-neutral { --fill: #2F6E52; }
.fill-good { --fill: #2E9E6A; }
.fill-info { --fill: #3A85BC; }
.fill-warn { --fill: #D29A2E; }
.fill-bad { --fill: #D2584C; }
@media (prefers-color-scheme: dark) {
  .fill-neutral { --fill: #8DB4A0; } .fill-good { --fill: #5FD39A; } .fill-info { --fill: #79BDF2; } .fill-warn { --fill: #F2C05C; } .fill-bad { --fill: #FF8A7E; }
}
.bar__target { position: absolute; top: -4px; bottom: -4px; left: var(--x); width: 2px; margin-left: -1px; border-radius: 2px; background: var(--ink); }
.bar__goal { margin-left: 6px; font-size: 12px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.b-caption { margin-top: 14px; font-size: 12.5px; line-height: 1.45; color: var(--ink-3); }
.b-range__title { font-size: 14px; font-weight: 700; color: var(--ink); }
.b-item { padding: 14px 16px; }
.b-item__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.b-item__title { display: flex; align-items: flex-start; gap: 9px; font-size: 15px; line-height: 1.38; font-weight: 700; color: var(--ink); min-width: 0; }
.b-item__dot { flex: none; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--t); }
.b-item__tag { margin: 8px 0 0 17px; }
.b-item__text { font-size: 14px; line-height: 1.52; color: var(--ink-2); }
.b-item__head ~ .b-item__text { margin-top: 6px; padding-left: 17px; }
.b-item__tag + .b-item__text { margin-top: 8px; }
.b-text { font-size: 14.5px; line-height: 1.58; color: var(--ink-2); padding: 0 4px; }
.callout { display: flex; gap: 10px; padding: 14px 16px; border-radius: 16px; background: var(--t-bg); color: var(--t-ink); font-size: 14px; line-height: 1.52; }
.callout__ico { width: 20px; height: 20px; stroke-width: 2; }
.b-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.b-table { padding: 0; overflow-x: auto; }
.b-table table { width: 100%; font-size: 13.5px; line-height: 1.4; }
.b-table caption { padding: 14px 16px 4px; text-align: left; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.b-table th, .b-table td { padding: 11px 10px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.b-table thead th { border-top: 0; padding-top: 8px; padding-bottom: 8px; font-size: 11.5px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.b-table tbody th { font-weight: 650; color: var(--ink); }
.b-table td { color: var(--ink-2); }
.b-table th:first-child, .b-table td:first-child { padding-left: 16px; }
.b-table th:last-child, .b-table td:last-child { padding-right: 16px; }
.b-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.b-check__item { display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: start; gap: 12px; padding: 14px 16px; }
.b-check__box { width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; border: 2px solid var(--t); }
.b-check__title { font-size: 15px; line-height: 1.38; font-weight: 700; color: var(--ink); }
.b-check__tag { margin-top: 6px; }
.b-check__text { margin-top: 6px; font-size: 13.5px; line-height: 1.48; color: var(--ink-2); }

/* ── Visuals ─────────────────────────────────────────────────────────── */
.ring { position: relative; display: grid; place-items: center; flex: none; }
.ring > * { grid-area: 1 / 1; }
.ring__track { fill: none; stroke: var(--track); }
.ring__arc { fill: none; stroke: var(--t, var(--accent)); stroke-linecap: round; animation: ring-in 1.2s var(--ease-out) .25s backwards; }
@keyframes ring-in { from { stroke-dashoffset: var(--circ); } }
.ring__label { font-size: 12px; font-weight: 780; color: var(--ink); font-variant-numeric: tabular-nums; }
.ring--card .ring__track, .ring--back .ring__track { stroke: rgba(251, 240, 207, .14); }
.ring--card .ring__arc, .ring--back .ring__arc { stroke: #EBD196; }
.ring--card .ring__label, .ring--back .ring__label { font: 400 19px/1 var(--font-display); color: #FBF0CF; }
.meter { display: grid; gap: 6px; }
.meter__track { position: relative; display: block; height: 8px; border-radius: 4px; background: var(--track); }
.meter__fill { display: block; width: var(--w); height: 100%; border-radius: inherit; background: var(--t, var(--accent)); transform-origin: left; animation: grow 1s var(--ease-out) .2s backwards; }
.meter__marker { position: absolute; top: -4px; bottom: -4px; left: var(--x); width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--ink); box-shadow: 0 0 0 2px var(--surface); }
.meter__label { font-size: 12px; font-weight: 700; color: var(--ink-3); }
.meter--card .meter__track { background: rgba(251, 240, 207, .14); }
.meter--card .meter__fill { background: #EBD196; }
.meter--card .meter__marker { background: #FBF0CF; box-shadow: 0 0 0 2px #133627; }
.meter--card .meter__label { color: rgba(251, 240, 207, .82); }
@keyframes grow { from { transform: scaleX(0); } }
.stack__bar { display: flex; gap: 3px; height: 10px; }
.stack__seg { flex: var(--g, 1) 1 0px; min-width: 4px; border-radius: 5px; transform-origin: left; animation: seg-in .8s var(--spring) backwards; animation-delay: calc(.3s + var(--i, 0) * 80ms); }
@keyframes seg-in { from { transform: scaleX(.15); opacity: 0; } }
.seg-good { background: var(--seg-good); }
.seg-info { background: var(--seg-info); }
.seg-warn { background: var(--seg-warn); }
.seg-neutral { background: var(--seg-neutral); }
.seg-bad { background: var(--seg-bad); }
.stack--card .stack__seg { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
.legend { display: grid; gap: 7px; }
.legend__item { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 13px; line-height: 1.3; }
.legend__dot { width: 10px; height: 10px; border-radius: 3px; }
.legend__dot.r-0 { background: #F5C66B; } .legend__dot.r-1 { background: #FBF0CF; } .legend__dot.r-2 { background: #74E3AB; }
.legend__label { color: #EAE2CC; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legend__value { font-weight: 750; color: #FBF0CF; font-variant-numeric: tabular-nums; }
.range__band { position: relative; display: block; height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--warn), var(--accent) 50%, var(--good)); }
.range__mid { position: absolute; top: 50%; left: var(--x); width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 3px var(--accent), 0 2px 6px rgba(0, 0, 0, .25); }
.range__labels { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.range--card .range__band { background: linear-gradient(90deg, #F5C66B, #FBF0CF 50%, #74E3AB); }
.range--card .range__mid { background: #133627; box-shadow: 0 0 0 3px #FBF0CF; }
.range--card .range__labels { color: rgba(251, 240, 207, .85); }
.ladder--sheet { display: grid; margin-top: 12px; }
.ladder--sheet .ladder__step { position: relative; display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 12px; padding: 6px 0; }
.ladder--sheet .ladder__step:not(:last-child)::after { content: ''; position: absolute; left: 13px; top: 36px; height: calc(100% - 28px); width: 2px; border-radius: 1px; background: var(--line-2); }
.ladder__dot { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--chip-bg); color: var(--ink-2); font-size: 12.5px; font-weight: 780; flex: none; }
.ladder__dot .ico { width: 16px; height: 16px; stroke-width: 2.6; }
.ladder__step.is-clear .ladder__dot { background: var(--good-bg); color: var(--good-ink); }
.ladder__step.is-here .ladder__dot { background: linear-gradient(150deg, #FBEFCB, #D3AE63); color: #0E2A1E; box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold-300) 35%, transparent); }
.ladder__label { font-size: 14.5px; line-height: 1.35; color: var(--ink-2); }
.ladder__step.is-here .ladder__label { font-weight: 750; color: var(--ink); }
.ladder--card, .ladder--tile { display: flex; gap: 6px; }
.ladder--card .ladder__label, .ladder--tile .ladder__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ladder--card .ladder__dot { background: rgba(251, 240, 207, .12); color: #FBF0CF; }
.ladder--card .is-clear .ladder__dot { background: #74E3AB; color: #0E2A1E; }
.ladder--back { display: grid; gap: 4px; }
.ladder--back .ladder__step { display: grid; grid-template-columns: 22px 1fr; align-items: center; gap: 10px; }
.ladder--back .ladder__dot { width: 22px; height: 22px; font-size: 11px; background: rgba(251, 240, 207, .14); color: #FBF0CF; }
.ladder--back .is-clear .ladder__dot { background: #74E3AB; color: #0E2A1E; }
.ladder--back .ladder__label { font-size: 13px; color: #EAE2CC; }

/* ── Buttons, error + Terms gate ─────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 24px;
  border-radius: 999px; font-size: 16px; font-weight: 750; text-decoration: none; transition: transform .4s var(--spring), opacity .2s ease;
}
.btn:active:not(:disabled):not([aria-disabled="true"]) { transform: scale(.97); }
.btn__ico { width: 19px; height: 19px; stroke-width: 2.1; }
.btn--primary { color: var(--accent-on); background: var(--accent); box-shadow: 0 12px 26px -14px rgba(14, 42, 30, .75); }
.btn--primary:disabled, .btn--primary[aria-disabled="true"] { opacity: .45; box-shadow: none; }
.btn--primary[aria-disabled="true"] { cursor: not-allowed; }
.btn--ghost { color: var(--link); }
.btn--block { width: 100%; }
.btn.is-busy { pointer-events: none; }
.btn.is-busy .btn__ico { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.state-screen {
  display: flex; flex-direction: column; justify-content: center; gap: 22px; min-height: 100vh; min-height: 100dvh; max-width: var(--col); margin: 0 auto;
  padding: calc(var(--safe-top) + 24px) 20px calc(var(--safe-bottom) + 24px);
}
.state-card { display: grid; justify-items: center; gap: 8px; padding: 34px 24px 18px; border-radius: 30px; background: var(--surface); box-shadow: var(--sh-card); text-align: center; }
.state-card.is-again { animation: nudge .5s var(--ease-out); }
@keyframes nudge { 20% { transform: translateX(-7px); } 45% { transform: translateX(6px); } 70% { transform: translateX(-3px); } }
.state-card__icon {
  display: grid; place-items: center; width: 78px; height: 78px; margin-bottom: 10px; border-radius: 50%; color: var(--gold-300);
  background: radial-gradient(80% 80% at 70% 20%, rgba(227, 200, 140, .3), transparent 60%), linear-gradient(155deg, #1F553C, #0A2117);
  box-shadow: var(--sh-wallet), inset 0 0 0 1px rgba(227, 200, 140, .3);
}
.state-card__icon .ico { width: 36px; height: 36px; stroke-width: 1.7; }
.state-card__title { font: 400 34px/1.1 var(--font-display); letter-spacing: -.005em; color: var(--ink); }
.state-card__text { font-size: 15.5px; font-weight: 650; color: var(--ink); }
.state-card__hint { margin-top: 2px; font-size: 14.5px; line-height: 1.5; color: var(--ink-3); max-width: 30ch; }
.state-card .btn--primary { margin-top: 14px; min-width: 220px; }
.state-legal { padding: 0 8px; text-align: center; font-size: 12.5px; line-height: 1.5; color: var(--ink-3); }

.gate-screen {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; min-height: 100dvh; max-width: var(--col); margin: 0 auto;
  color: #F6EFDC; overflow: hidden;
  background-color: #0A2117;
  background-image:
    repeating-conic-gradient(from 180deg at 50% 46%, transparent 0deg, rgba(227, 200, 140, .07) .8deg, transparent 1.6deg, transparent 7.5deg),
    radial-gradient(70% 45% at 50% 30%, rgba(227, 200, 140, .26), transparent 70%),
    linear-gradient(180deg, #17402F 0%, #0C2519 55%, #06130D 100%);
}
.gate-art { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; padding: calc(var(--safe-top) + 34px) 24px 26px; }
.gate-art__stack { position: relative; width: 240px; height: 160px; }
.gate-card {
  position: absolute; inset: 0; border-radius: 18px;
  background-image: radial-gradient(85% 70% at 100% 0%, rgba(227, 200, 140, .32), transparent 62%), linear-gradient(155deg, #23603F 0%, #143A2A 46%, #0A2117 100%);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .7), inset 0 0 0 1px rgba(227, 200, 140, .32);
}
.gate-card--3 { transform: translate(-26px, -22px) rotate(-11deg) scale(.9); opacity: .55; }
.gate-card--2 { transform: translate(14px, -12px) rotate(6deg) scale(.95); opacity: .8; }
.gate-card--1 { display: flex; align-items: flex-start; justify-content: space-between; padding: 20px; transform: rotate(-2deg); }
.gate-card__logo { width: 40px; height: 40px; border-radius: 10px; }
.gate-art__brand { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.gate-art__word { font: 400 44px/1 var(--font-display); color: #F7E8C2; letter-spacing: .01em; }
.gate-art__tag { font-size: 12px; font-weight: 750; letter-spacing: .32em; text-transform: uppercase; color: rgba(251, 240, 207, .78); padding-left: .32em; }
.gate {
  position: relative; padding: 26px 22px calc(24px + var(--safe-bottom)); border-radius: 30px 30px 0 0;
  background: var(--sheet); color: var(--ink); box-shadow: 0 -20px 50px -10px rgba(0, 0, 0, .45);
  animation: gate-in .7s var(--ease-sheet) .1s backwards;
}
@keyframes gate-in { from { transform: translateY(100%); } }
.gate__icon { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 14px; border-radius: 14px; color: #FFFFFF; background: linear-gradient(160deg, #2C6E50, #17402F); }
.gate__icon .ico { width: 26px; height: 26px; stroke-width: 2; }
.gate__title { font-size: 25px; line-height: 1.2; font-weight: 800; letter-spacing: -.025em; }
.gate__text { margin-top: 10px; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.check { display: flex; align-items: flex-start; gap: 4px; margin: 14px 0 16px; padding: 4px 14px 6px 2px; border-radius: 16px; background: var(--surface); box-shadow: var(--sh-card); cursor: pointer; }
.check__control { position: relative; display: grid; place-items: center; width: 44px; height: 44px; flex: none; }
.check__input { position: absolute; inset: 0; width: 44px; height: 44px; margin: 0; opacity: 0; cursor: pointer; }
.check__box {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; pointer-events: none;
  border: 2px solid var(--ink-3); background: var(--surface); color: transparent; transition: background-color .2s ease, border-color .2s ease, transform .35s var(--spring-pop);
}
.check__box .ico { width: 18px; height: 18px; stroke-width: 3; }
.check__input:checked + .check__box { background: var(--accent); border-color: var(--accent); color: var(--accent-on); transform: scale(1.06); }
.check__input:focus-visible + .check__box { outline: 3px solid var(--focus); outline-offset: 2px; }
.check__label { padding-top: 10px; font-size: 15px; line-height: 1.45; font-weight: 600; }
.gate__error:empty { display: none; }
.gate__error { margin-top: 12px; padding: 10px 14px; border-radius: 12px; background: var(--bad-bg); color: var(--bad-ink); font-size: 14px; }
.gate__meta { margin-top: 12px; text-align: center; font-size: 12px; color: var(--ink-3); }

/* ════════════════════════════════════════════════════════════════════════════════════════════
   Final build: per-tab accents, strips, hero extras, compact rows, legal block, sheets, forms,
   welcome and gate. (Everything below was added on top of the winning "Wallet" concept.)
   ════════════════════════════════════════════════════════════════════════════════════════════ */

/* ── Per-tab accent (from the tab's icon). Red stays reserved for warnings. ─────────────────── */
:root { --tab-accent: var(--accent); --tab-ink: var(--ink-3); --tab-soft: var(--tab-pill); --tab-on: #FFFFFF; --tab-h1: #2C6E50; --tab-h2: #17402F; }
[data-accent="forest"] { --tab-accent: #17402F; --tab-ink: #1F5A41; --tab-soft: #E1EBE3; --tab-h1: #2C6E50; --tab-h2: #17402F; }
[data-accent="teal"] { --tab-accent: #1D6670; --tab-ink: #1D6670; --tab-soft: #DCEDEE; --tab-h1: #379AA5; --tab-h2: #206C78; }
[data-accent="plum"] { --tab-accent: #6C4372; --tab-ink: #6C4372; --tab-soft: #EEE4EF; --tab-h1: #9D6CA2; --tab-h2: #6C4372; }
[data-accent="gold"] { --tab-accent: #7A5A1E; --tab-ink: #7A5A1E; --tab-soft: #F3E8CC; --tab-h1: #D2B06A; --tab-h2: #9E7837; }
[data-accent="slate"] { --tab-accent: #3E5889; --tab-ink: #3E5889; --tab-soft: #E2E8F3; --tab-h1: #6382B8; --tab-h2: #3E5889; }
@media (prefers-color-scheme: dark) {
  :root { --tab-on: #0B1712; }
  [data-accent="forest"] { --tab-accent: #9FD8B9; --tab-ink: #9FD8B9; --tab-soft: rgba(159, 216, 185, .15); }
  [data-accent="teal"] { --tab-accent: #86D3DC; --tab-ink: #86D3DC; --tab-soft: rgba(134, 211, 220, .15); }
  [data-accent="plum"] { --tab-accent: #D9B2DE; --tab-ink: #D9B2DE; --tab-soft: rgba(217, 178, 222, .15); }
  [data-accent="gold"] { --tab-accent: #E3C88C; --tab-ink: #E3C88C; --tab-soft: rgba(227, 200, 140, .16); }
  [data-accent="slate"] { --tab-accent: #B0C3EE; --tab-ink: #B0C3EE; --tab-soft: rgba(176, 195, 238, .15); }
}
.hue-accent { --h1: var(--tab-h1); --h2: var(--tab-h2); }

/* Keep focused or scrolled-to items clear of the fixed bars. */
html {
  scroll-padding-top: calc(var(--safe-top) + var(--bar-h) + var(--strips, 0) * 50px + 10px);
  scroll-padding-bottom: calc(var(--tab-h) + var(--tab-gap) + 14px);
}

/* ── Top bar: search button and the one-line strips under the bar ─────────────────────────── */
.topbar__title { max-width: calc(100% - 56px - 104px); }
.icon-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--ink); }
.icon-btn .ico { width: 23px; height: 23px; stroke-width: 2; transition: transform .3s var(--spring); }
.icon-btn:active .ico { transform: scale(.88); }
.strips { position: relative; display: grid; gap: 6px; padding: 0 12px 6px; }
.strip { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 0 0 0 12px; border-radius: 14px; font-size: 13px; line-height: 1.3; font-weight: 650; }
.strip--sample { background: #F5E7C4; color: #5E4410; box-shadow: inset 0 0 0 1px rgba(147, 113, 58, .24); }
.strip--warn { padding-right: 12px; background: var(--warn-bg); color: var(--warn-ink); }
.strip__dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: #B8892F; box-shadow: 0 0 0 3px rgba(184, 137, 47, .2); }
.strip__ico { flex: none; width: 17px; height: 17px; stroke-width: 2.2; }
.strip__text { flex: 1; min-width: 0; }
.strip__btn { flex: none; display: grid; place-items: center; min-height: 44px; padding: 0 6px 0 2px; }
.strip__btn > span { padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .75); color: #4A350C; font-size: 12.5px; font-weight: 800; box-shadow: inset 0 0 0 1px rgba(147, 113, 58, .32); transition: transform .3s var(--spring); }
.strip__btn:active > span { transform: scale(.94); }
@media (prefers-color-scheme: dark) {
  .strip--sample { background: #2A2614; color: #F0DDB0; box-shadow: inset 0 0 0 1px rgba(227, 200, 140, .28); }
  .strip__dot { background: #E3C88C; box-shadow: 0 0 0 3px rgba(227, 200, 140, .18); }
  .strip__btn > span { background: rgba(227, 200, 140, .2); color: #FBF0CF; box-shadow: inset 0 0 0 1px rgba(227, 200, 140, .35); }
}

/* ── Hero extras: the month as an equation, caveat note, tags, the door to its sheet ──────── */
.wallet__flow { margin-top: 8px; font-size: 13px; line-height: 1.55; color: rgba(251, 240, 207, .82); }
.flow__step { display: inline; }
.flow__op { font-weight: 800; color: #EBD196; white-space: pre; }
.flow__value { font-weight: 750; color: #FBF0CF; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wallet__note { margin-top: 8px; font-size: 12.5px; line-height: 1.5; color: rgba(246, 239, 220, .84); }
.wallet__note .wallet__tag { margin-left: 2px; vertical-align: 1px; }
.wallet__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.wallet__tag { display: inline-flex; align-items: center; min-height: 22px; padding: 1px 9px; border-radius: 999px; font-size: 11.5px; line-height: 1.3; font-weight: 750; letter-spacing: .02em; color: #FBF0CF; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(227, 200, 140, .32); white-space: nowrap; }
.wallet__foot { flex-wrap: wrap; padding-top: 12px; }
.wallet__need {
  position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 14px;
  border-radius: 999px; font-size: 13.5px; font-weight: 750; color: #FBF0CF; text-decoration: none;
  background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(227, 200, 140, .32);
}
.wallet__how-ico { width: 16px; height: 16px; stroke-width: 2.3; flex: none; }
.wallet .legend { margin-top: 12px; }
.wallet__main.has-side .wallet__value.sz-xl { font-size: 54px; }
/* The headline figure rises in once per tab visit (characters are aria-hidden; an sr-only copy reads whole). */
.is-rising .ch { display: inline-block; animation: rise .75s var(--spring) backwards; animation-delay: calc(90ms + var(--i, 0) * 26ms); }
.wallet__value.is-rising .ch { background: linear-gradient(180deg, #FFF8E6 8%, #F3DFAA 52%, #D7B46D 96%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
@keyframes rise { from { opacity: 0; transform: translateY(.42em); } }

/* ── Glance tiles: two bars, tags, needs-input link, the door to the matching sheet ───────── */
.tile__bars { display: grid; gap: 10px; margin-top: 10px; }
.tile__bar-head { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 650; color: var(--ink-2); }
.tile__bar-val { font-weight: 750; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tile__bar .bar__track { margin-top: 6px; }
.tile__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mini-tag { display: inline-flex; align-items: center; min-height: 22px; padding: 1px 9px; border-radius: 999px; background: var(--chip-bg); color: var(--ink-2); font-size: 11.5px; font-weight: 750; letter-spacing: .01em; }
.tile__need { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin-top: 2px; font-size: 13.5px; font-weight: 750; color: var(--link); text-decoration: none; }
.tile.has-door { position: relative; padding-right: 38px; transition: transform .45s var(--spring); }
.tile.has-door:active { transform: scale(.98); }
.tile__more { position: absolute; inset: 0; z-index: 1; border-radius: inherit; transition: background-color .15s ease; }
.tile__more:active { background: var(--press); }
.tile__more:focus-visible { outline-offset: 2px; }
@media (hover: hover) { .tile__more:hover { background: var(--press); } }
.tile__chev { position: absolute; top: 50%; right: 12px; width: 18px; height: 18px; margin-top: -9px; color: var(--ink-3); stroke-width: 2.2; }
.tile__ico { width: 16px; height: 16px; stroke-width: 2.2; flex: none; }
.tile__need { position: relative; z-index: 2; }
.tile__bars.is-pair { grid-template-columns: 1fr 1fr; column-gap: 16px; }
.glance--2 .tile.has-door { padding-right: 14px; }
.glance--2 .tile__chev { top: 15px; margin-top: 0; right: 10px; }
.tile__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.glance--2 .tile__row { margin-top: auto; padding-top: 8px; }
.tile .tile__value { margin: 0; padding: 0; }

/* ── Moves: summary line, compact revealed rows, alert strips, filter chips ───────────────── */
.moves-sum { margin: -4px 4px 12px; font-size: 13.5px; line-height: 1.45; color: var(--ink-3); }
.moves-sum__value { font-weight: 800; color: var(--good-ink); }
.moves--rows { gap: 0; border-radius: var(--r); background: var(--surface); box-shadow: var(--sh-card); overflow: hidden; }
.moves--rows > li:not([hidden]) ~ li { border-top: 1px solid var(--line); }
.move-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; column-gap: 12px; width: 100%; min-height: 60px;
  padding: 12px 8px 12px 14px; transition: background-color .15s ease;
}
.move-row:active { background: var(--press); }
@media (hover: hover) { .move-row:hover { background: var(--press); } }
.move-row__body { display: flex; flex-direction: column; min-width: 0; }
.move-row__title { font-size: 15px; line-height: 1.36; font-weight: 650; color: var(--ink); }
.move-row__meta { margin-top: 3px; font-size: 12.5px; line-height: 1.35; font-weight: 600; color: var(--ink-3); }
.move-row .move__chev { align-self: center; }
.alert-strip { display: flex; align-items: flex-start; gap: 7px; margin-top: 10px; padding: 8px 10px; border-radius: 12px; background: var(--t-bg); color: var(--t-ink); font-size: 12.5px; line-height: 1.42; text-align: left; }
.alert-strip__ico { flex: none; width: 16px; height: 16px; margin-top: 1px; stroke-width: 2.2; }
.alert-strip__text strong { font-weight: 800; }
.alert-strip--sm { margin-top: 6px; padding: 6px 9px; font-size: 12px; }
.alert-strip--box { margin-top: 0; padding: 12px 14px; border-radius: 16px; font-size: 14px; }
.more-btn.has-urgent { box-shadow: inset 0 0 0 1.5px var(--warn); }
.filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.all-moves-link { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; margin-top: 8px; padding: 0 12px 0 16px; border-radius: 16px; color: var(--link); font-size: 14.5px; font-weight: 750; transition: background-color .15s ease; }
.all-moves-link:active { background: var(--press); }
.all-moves-link > span { flex: 1; }
.all-moves-link__ico { width: 20px; height: 20px; }
.all-moves-link__chev { width: 16px; height: 16px; stroke-width: 2.2; }

/* Chips: stock switcher, move filters, library presets */
.switcher { display: flex; gap: 8px; margin: 16px -18px 0; padding: 2px 18px 6px; overflow-x: auto; scrollbar-width: none; }
.switcher::-webkit-scrollbar { display: none; }
.switcher__btn, .chip-btn {
  flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 16px; border-radius: 999px;
  background: var(--surface); box-shadow: var(--sh-card); color: var(--ink); font-size: 14px; font-weight: 700;
  transition: background-color .2s ease, color .2s ease, transform .3s var(--spring);
}
.switcher__btn:active, .chip-btn:active { transform: scale(.95); }
.switcher__btn.is-on, .chip-btn.is-on { background: var(--tab-accent); color: var(--tab-on); box-shadow: none; }
.chip-btn__n { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--chip-bg); font-size: 12px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.chip-btn.is-on .chip-btn__n { background: rgba(255, 255, 255, .24); }
@media (prefers-color-scheme: dark) { .chip-btn.is-on .chip-btn__n { background: rgba(0, 0, 0, .18); } }

/* ── One grouped legal block under the moves ───────────────────────────────────────────────── */
.legal-block { margin: 18px var(--pad) 0; padding: 14px 16px 4px; border-radius: var(--r); background: var(--chip-bg); }
.legal-block__list { display: grid; gap: 10px; }
.legal-block__item { display: flex; align-items: flex-start; gap: 9px; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); }
.legal-block__item.is-banner { font-weight: 650; color: var(--ink); }
.legal-block__ico { flex: none; width: 16px; height: 16px; margin-top: 2px; stroke-width: 2; color: var(--ink-3); }
.legal-block__link { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; margin-left: 25px; font-size: 13.5px; font-weight: 750; color: var(--link); text-decoration: none; }
.legal-block__link .ico { width: 15px; height: 15px; stroke-width: 2.2; }
.fine { margin-top: 26px; }

/* ── Ranges: a to-scale rail (markers from the raw values) above three labelled columns ──── */
.rail { position: relative; height: 46px; margin: 8px 8px 2px; }
.rail::before { content: ''; position: absolute; left: 0; right: 0; top: 28px; height: 4px; border-radius: 2px; background: var(--track); }
.rail__band { position: absolute; top: 26px; left: var(--a); width: calc(var(--b) - var(--a)); height: 8px; border-radius: 4px; background: linear-gradient(90deg, color-mix(in srgb, var(--warn) 60%, transparent), color-mix(in srgb, var(--accent) 45%, transparent), color-mix(in srgb, var(--good) 60%, transparent)); }
.rail__mark { position: absolute; top: 22px; left: var(--x); width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 3px var(--c), 0 1px 3px rgba(0, 0, 0, .2); }
.rail__mark.p-0 { --c: var(--warn); } .rail__mark.p-1 { --c: var(--accent); } .rail__mark.p-2 { --c: var(--good); }
.rail__zero { position: absolute; top: 18px; bottom: 2px; left: var(--x); width: 2px; margin-left: -1px; border-radius: 1px; background: var(--ink-3); }
.rail__zero-label { position: absolute; bottom: calc(100% + 1px); left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 750; color: var(--ink-3); white-space: nowrap; }
.b-range__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.b-range__col { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 9px 10px 10px; border-radius: 14px; background: var(--chip-bg); box-shadow: inset 0 3px 0 var(--c); }
.b-range__col.p-0 { --c: var(--warn); } .b-range__col.p-1 { --c: var(--accent); } .b-range__col.p-2 { --c: var(--good); }
.b-range__value { font-size: 15px; line-height: 1.25; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.b-range__label { font-size: 11.5px; line-height: 1.35; color: var(--ink-3); }
@media (max-width: 359px) {
  .b-range__cols { grid-template-columns: 1fr; }
  .b-range__col { flex-direction: row-reverse; justify-content: space-between; align-items: baseline; }
}

/* ── Move sheet: impact callout, alert, ladder chip and stepper, previous / next ──────────── */
.impact-box { margin-top: 16px; padding: 14px 16px; border-radius: 18px; background: var(--t-bg); color: var(--t-ink); }
.impact-box__kicker { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.impact-box__label { margin-top: 4px; font-size: 17px; line-height: 1.35; font-weight: 750; }
.impact-box__note { margin-top: 6px; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.md-alert { margin-top: 10px; }
.ladder-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 4px 12px 4px 9px; border-radius: 999px; background: var(--tab-soft); color: var(--tab-ink); font-size: 13px; font-weight: 700; }
.ladder-chip__ico { width: 15px; height: 15px; stroke-width: 2.2; }
.stepper { display: grid; gap: 2px; margin: 10px -6px 0; }
.stepper__rung { position: relative; }
.stepper__rung:not(:last-child)::after { content: ''; position: absolute; left: 25px; top: 40px; bottom: -8px; width: 2px; border-radius: 1px; background: var(--line-2); }
.stepper__btn { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 6px 10px 6px 12px; border-radius: 14px; text-align: left; }
button.stepper__btn { transition: background-color .15s ease; }
button.stepper__btn:active { background: var(--press); }
.stepper__coin { position: relative; z-index: 1; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--chip-bg); color: var(--ink-2); font-size: 12.5px; font-weight: 800; }
.stepper__coin .ico { width: 16px; height: 16px; stroke-width: 2.6; }
.stepper__rung.is-clear .stepper__coin { background: var(--good-bg); color: var(--good-ink); }
.stepper__rung.is-here .stepper__coin { background: linear-gradient(150deg, #FBEFCB, #D3AE63); color: #0E2A1E; box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold-300) 35%, transparent); }
.stepper__label { font-size: 14.5px; line-height: 1.35; color: var(--ink-2); }
.stepper__rung.is-here .stepper__label { font-weight: 750; color: var(--ink); }
button.stepper__btn .stepper__label { color: var(--link); font-weight: 650; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--link) 40%, transparent); }
.md-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.md-step {
  display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 64px; padding: 10px 12px; border-radius: 16px;
  background: var(--surface); box-shadow: var(--sh-card); color: var(--ink); text-align: left; transition: transform .35s var(--spring);
}
.md-step:active { transform: scale(.97); }
.md-step--next { justify-content: flex-end; text-align: right; }
.md-step.is-empty { visibility: hidden; }
.md-step__ico { flex: none; width: 18px; height: 18px; stroke-width: 2.2; color: var(--link); }
.md-step__text { display: flex; flex-direction: column; min-width: 0; }
.md-step__kicker { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.md-step__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; line-height: 1.3; font-weight: 650; }
.sheet--move .sheet__scroll { touch-action: pan-y pinch-zoom; } /* sideways swipes step between moves */
.sheet__done { margin-top: 12px; }
.sheet__scroll.is-swapped > * { animation: swap-in .42s var(--ease-out) backwards; }
@keyframes swap-in { from { opacity: 0; transform: translateX(var(--swap-dx, 0px)); } }
/* Stacked sheets: the covered one steps back a little; the backdrop does not double up. */
.sheet-layer.is-stacked .sheet-backdrop { background: rgba(0, 0, 0, .22); }
.sheet-layer.is-covered .sheet { transform: translateY(-8px) scale(.95); filter: brightness(.9); transition: transform .45s var(--ease-sheet), filter .3s ease; }

/* ── Forms: sign-in and the library search ──────────────────────────────────────────────── */
.form { display: grid; gap: 14px; margin-top: 20px; }
.field { display: grid; gap: 6px; }
.field__label { font-size: 13.5px; font-weight: 750; color: var(--ink-2); }
.field__input {
  width: 100%; min-height: 50px; padding: 12px 14px; border: 1.5px solid var(--line-2); border-radius: 14px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; /* 16px keeps iOS from zooming */
}
.field__input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 28%, transparent); }
.form__error:empty { display: none; }
.form__error { padding: 10px 14px; border-radius: 12px; background: var(--bad-bg); color: var(--bad-ink); font-size: 14px; line-height: 1.45; }
.form--search { grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; }
.form--search .btn { min-height: 50px; padding: 0 18px; }
.form .btn.is-busy { opacity: .7; }
.form + .card-list { margin-top: 18px; }
.lib-presets { margin-top: 18px; }
.lib-presets .b-chips { display: grid; gap: 8px; }
.lib-presets .chip-btn { width: 100%; justify-content: flex-start; padding: 10px 14px; border-radius: 14px; line-height: 1.38; font-weight: 600; text-align: left; }
.lib-results { display: grid; gap: 4px; margin-top: 18px; }
.lib-results:empty { display: none; }
.lib-status { margin: 0 4px 8px; font-size: 12.5px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.lib-item { padding: 14px 16px 6px; }
.lib-item__title { font-size: 15px; line-height: 1.35; font-weight: 750; color: var(--ink); }
.lib-item__text { margin-top: 6px; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.lib-item__meta { margin-top: 6px; font-size: 12px; line-height: 1.4; color: var(--ink-3); }
.lib-item .link-row { margin: 4px -16px 0; }
.acct-cta { display: grid; gap: 8px; margin: 18px 0; }

/* ── Welcome: three swipeable cards, then the gate ───────────────────────────────────────── */
.welcome {
  display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; max-width: var(--col); margin: 0 auto;
  padding: calc(var(--safe-top) + 8px) 20px calc(var(--safe-bottom) + 18px); overflow: hidden; color: #F6EFDC;
  background-color: #0A2117;
  background-image:
    repeating-conic-gradient(from 180deg at 50% 30%, transparent 0deg, rgba(227, 200, 140, .07) .8deg, transparent 1.6deg, transparent 7.5deg),
    radial-gradient(70% 45% at 50% 22%, rgba(227, 200, 140, .24), transparent 70%),
    linear-gradient(180deg, #17402F 0%, #0C2519 55%, #06130D 100%);
}
.welcome__top { display: flex; align-items: center; justify-content: space-between; min-height: 52px; }
.welcome__logo { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 0 0 1px rgba(227, 200, 140, .35), 0 4px 12px rgba(0, 0, 0, .35); }
.welcome__skip { min-height: 44px; padding: 0 16px; border-radius: 999px; font-size: 15px; font-weight: 750; color: rgba(251, 240, 207, .92); }
.welcome__brand { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 5vh 0 4vh; }
.welcome__viewport { margin: 0 -20px; overflow: hidden; touch-action: pan-y pinch-zoom; }
.welcome__track { display: flex; transform: translateX(calc(var(--slide, 0) * -100%)); transition: transform .55s var(--ease-sheet); }
.welcome__card {
  flex: 0 0 calc(100% - 40px); margin: 0 20px; min-height: 236px; padding: 24px 22px; border-radius: 26px;
  background-image: radial-gradient(85% 70% at 100% 0%, rgba(227, 200, 140, .26), transparent 62%), linear-gradient(155deg, #1F553C 0%, #143A2A 44%, #0A2117 100%);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .7), inset 0 0 0 1px rgba(227, 200, 140, .3);
}
.welcome__num { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(150deg, #FBEFCB, #D9B670 60%, #C29C57); color: #0E2A1E; font: 400 20px/1 var(--font-display); }
.welcome__title { margin-top: 18px; font: 400 29px/1.14 var(--font-display); color: #F7E8C2; text-wrap: balance; }
.welcome__text { margin-top: 10px; font-size: 15.5px; line-height: 1.55; color: #EAE2CC; }
.welcome__dots { display: flex; justify-content: center; gap: 8px; margin: 18px 0 20px; }
.welcome__dot { width: 8px; height: 8px; border-radius: 4px; background: rgba(251, 240, 207, .32); transition: width .35s var(--spring), background-color .2s ease; }
.welcome__dot.is-on { width: 24px; background: #E3C88C; }
.welcome__actions { display: grid; gap: 8px; margin-top: auto; }
.welcome .btn--primary { color: #0E2A1E; background: linear-gradient(180deg, #F3DFA9, #D2AF69); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 12px 28px -14px rgba(227, 200, 140, .55); }
.welcome .btn--ghost { color: #FBF0CF; box-shadow: inset 0 0 0 1px rgba(227, 200, 140, .4); }
.welcome__legal { margin-top: 14px; text-align: center; font-size: 12px; line-height: 1.5; color: rgba(251, 240, 207, .74); }

/* ── Terms gate: Terms link first, one big agree row, Accept with an inline reason ───────── */
.gate__terms { display: flex; align-items: center; gap: 12px; min-height: 58px; margin-top: 16px; padding: 10px 14px; border-radius: 16px; background: var(--surface); box-shadow: var(--sh-card); color: var(--ink); text-decoration: none; }
.gate__terms-ico { width: 22px; height: 22px; color: var(--link); }
.gate__terms-text { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.gate__terms-label { font-size: 15px; line-height: 1.35; font-weight: 750; color: var(--link); }
.gate__terms-note { font-size: 12.5px; color: var(--ink-3); }
.gate__terms-ext { width: 18px; height: 18px; color: var(--ink-3); }
.gate__reason { margin-top: 10px; text-align: center; font-size: 13.5px; line-height: 1.4; font-weight: 650; color: var(--ink-3); }
.gate__reason:empty { display: none; }
.gate__reason.is-nudged { color: var(--warn-ink); animation: nudge .45s var(--ease-out); }
.state-card .btn--ghost { min-width: 220px; }

/* ── Narrow phones: a little tighter so the first move shows (or peeks) on the first screen ───── */
@media (max-width: 375px) {
  .wallet__face { padding: 14px 14px 15px 16px; }
  .wallet__value.sz-xl, .wallet__main.has-side .wallet__value.sz-xl { font-size: 50px; }
  .wallet__value.sz-l { font-size: 46px; }
  .wallet__value.sz-m { font-size: 40px; }
  .wallet__caption { font-size: 13.5px; }
  .wallet__note { font-size: 12px; }
  .tile { padding: 12px 12px 12px 14px; }
  .tile.has-door { padding-right: 34px; }
  .tile__cap { font-size: 12px; }
  .glance { margin-top: 10px; }
}

/* ── Tables reflow into labelled rows on phones ──────────────────────────────────────────── */
@media (max-width: 520px) {
  .b-table { overflow: visible; }
  .b-table table, .b-table tbody, .b-table tr { display: block; width: 100%; }
  .b-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .b-table caption { display: block; }
  .b-table tbody tr { padding: 10px 16px 8px; border-top: 1px solid var(--line); }
  .b-table tbody tr:first-child { border-top: 0; }
  .b-table tbody th, .b-table tbody td { display: block; border: 0; padding: 3px 0; text-align: left; }
  .b-table tbody tr > :first-child, .b-table tbody tr > :last-child { padding-left: 0; padding-right: 0; }
  .b-table tbody th { padding-bottom: 5px; font-size: 14.5px; }
  .b-table tbody td { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; }
  .b-table tbody td::before { content: attr(data-label); flex: none; max-width: 55%; font-weight: 650; color: var(--ink-3); }
  .b-table tbody td.num { text-align: right; white-space: normal; }
}

/* ── Larger screens: a centred phone-width column on a quiet branded backdrop ───────────── */
@media (min-width: 700px) {
  html {
    background-color: var(--bg-outside);
    background-image:
      repeating-conic-gradient(from 180deg at 50% 0%, transparent 0deg, rgba(147, 113, 58, .07) .5deg, transparent 1deg, transparent 5deg),
      radial-gradient(60% 50% at 50% 0%, rgba(227, 200, 140, .3), transparent 70%),
      radial-gradient(50% 60% at 50% 100%, rgba(23, 64, 47, .12), transparent 70%);
    background-attachment: fixed;
  }
  .screen { box-shadow: 0 0 0 1px var(--line), 0 40px 90px -50px rgba(14, 26, 19, .45); }
  .sheet { border-radius: 28px 28px 0 0; }
}
@media (min-width: 700px) and (prefers-color-scheme: dark) {
  html { background-image: repeating-conic-gradient(from 180deg at 50% 0%, transparent 0deg, rgba(227, 200, 140, .06) .5deg, transparent 1deg, transparent 5deg), radial-gradient(60% 50% at 50% 0%, rgba(227, 200, 140, .14), transparent 70%); }
  .screen { box-shadow: 0 0 0 1px rgba(227, 200, 140, .1); }
}

/* ── Motion & contrast preferences ───────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  html.has-sheet .screen, html.has-sheet .topbar { transform: none; clip-path: none; }
  .wallet__face::after { display: none; }
}
@media (forced-colors: active) {
  .wallet__value { color: CanvasText; background: none; -webkit-text-fill-color: CanvasText; }
  .tabbar__pill { outline: 2px solid Highlight; }
  .pill, .status--card, .strip, .chip-btn, .switcher__btn { border: 1px solid CanvasText; }
}
