/* WEZUMO — calm, trustworthy, mobile-first UI. Brand tokens: docs/BRAND_AND_UI.md. Contrast: scripts/check_contrast.py.
   Status is always text + icon, never colour alone. Keep every colour as a token below. */
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("../fonts/manrope-latin-wght-normal.woff2") format("woff2-variations"), url("../fonts/manrope-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("../fonts/manrope-latin-ext-wght-normal.woff2") format("woff2-variations"), url("../fonts/manrope-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* brand (wezumo.com brand system) */
  --navy-logo: #071a2b; --navy-900: #031522; --navy-800: #092638; --navy-700: #13364b; --navy-600: #0c3550;
  --turquoise: #00c7b1; --teal: #00a896; --cyan: #02dbe0; --violet-logo: #7157ff; --violet: #713bff;
  --brand: #0d5180; --brand-hover: #0a4166; --brand-ink: #ffffff; --brand-soft: #e6f0f7;
  --on-navy: #ffffff; --on-navy-2: #c5d3dd;
  /* neutrals */
  --ink: #102536; --ink-2: #4b6070; --ink-3: #5a6e7d; --subtle: #7a8d9b;
  --line: #d7e2e9; --line-2: #e8eef2; --line-strong: #7d909e;
  --bg: #f4f7fa; --surface: #ffffff; --surface-2: #eef3f7;
  /* text-safe accents (turquoise/teal fail as small text on white — use these instead) */
  --teal-ink: #007466; --teal-soft: #e0f6f3; --violet-ink: #5b2fd6; --violet-soft: #f0ecff;
  /* status */
  --ok: #0b7a53; --ok-fill: #0f8a5f; --ok-soft: #e6f6ef; --ok-line: #b5e3cf;
  --warn: #a35c00; --warn-fill: #d48a1a; --warn-soft: #fff4e0; --warn-line: #f3d29b;
  --bad: #b42318; --bad-soft: #fdecea; --bad-line: #f5c2bd;
  --info: #175cd3; --info-soft: #eaf1fd; --info-line: #bfd3f6;
  --focus: #0d5180;
  /* legacy names used by templates */
  --brand-2: var(--brand); --savings: var(--violet-ink); --savings-soft: var(--violet-soft);
  /* charts: income · spending · savings · other/previous (every series also has a text legend and labelled values) */
  --chart-1: #0d5180; --chart-2: #009b8a; --chart-3: #713bff; --chart-4: #7a8d9b;
  /* signed-out pages, after wezumo.com: night navy, glow cyan, sky, lavender and warm accents (fills and text on night) */
  --night: #031522; --night-deep: #02101a; --night-soft: #f5f8fb; --on-night: #f6fafc; --on-night-2: #c6dbe6; --on-night-3: #9fc3d3;
  --glow: #4fe6ea; --sky: #6cb9fa; --lavender: #a58bff; --warm: #ffb27a;
  --logo-gradient: linear-gradient(135deg, #071a2b 0%, #00c7b1 52%, #7157ff 100%);
  /* type scale 12/14/16/20/24/32 */
  --fs-12: .75rem; --fs-14: .875rem; --fs-16: 1rem; --fs-20: 1.25rem; --fs-24: 1.5rem; --fs-32: 2rem;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 16px; --radius-sm: 10px; --radius-xs: 8px;
  --shadow: 0 1px 2px rgba(3, 21, 34, .05), 0 6px 20px rgba(3, 21, 34, .05);
  --shadow-pop: 0 14px 44px rgba(3, 21, 34, .22);
  --ease: cubic-bezier(.2, .7, .2, 1);
  /* surfaces and states that change in dark mode (see the dark block below) */
  --field-bg: #ffffff; --topbar-bg: rgba(255, 255, 255, .96); --needs-bg: #fffbf3; --row-hover: #f8fafc; --error-bg: #fffafa;
  --card-hover-line: #b9cad6; --btn-hover-line: #b9d0e2; --badge-brand-line: #c4d8e8; --violet-line: #d9cfff;
  --info-text: #11408f; --warn-text: #7a4300; --bad-text: #8a1a11; --ok-text: #065c3e; --bad-hover: #8f1c13; --on-bad: #ffffff;
  --hero-end: #0d5180; --empty-ring: rgba(230, 240, 247, .5);
  /* pie slices (Analytics → Pie); every slice also has a legend row with its name, % and amount */
  --pie-1: #0d5180; --pie-2: #009b8a; --pie-3: #713bff; --pie-4: #b86f00; --pie-5: #2f6fd6; --pie-6: #0b7a53; --pie-7: #b0407f; --pie-8: #6f8494;
  color-scheme: light;
}
/* ---------- dark mode (Settings → Appearance; <html data-theme>). Same token names, darker values; the contrast
   script checks every pair in both themes. "system" follows the device. Keep the two blocks below identical. */
:root[data-theme="dark"] {
  --navy-logo: #eef5f9; --ink: #e3ecf2; --ink-2: #b4c6d3; --ink-3: #98adbc; --subtle: #7d93a3;
  --line: #22394a; --line-2: #1a2f3e; --line-strong: #6a8497;
  --bg: #07141e; --surface: #0e1f2c; --surface-2: #152a3a;
  --brand: #64b5f2; --brand-hover: #92cbf6; --brand-ink: #04131e; --brand-soft: #12324a; --focus: #64b5f2;
  --teal-ink: #45d6c3; --teal-soft: #0f3533; --violet-ink: #b7a2ff; --violet-soft: #241e45; --violet-line: #3d3473;
  --ok: #5ad6a0; --ok-fill: #2fae78; --ok-soft: #0f2f25; --ok-line: #1f5743;
  --warn: #f4b862; --warn-fill: #d9952e; --warn-soft: #33260f; --warn-line: #6a4c19;
  --bad: #ff8f86; --bad-soft: #3a1714; --bad-line: #6f2923; --bad-hover: #ffb4ad; --on-bad: #2a0705;
  --info: #93b8ff; --info-soft: #13244a; --info-line: #27427e;
  --info-text: #bcd2ff; --warn-text: #f9d29b; --bad-text: #ffc2bc; --ok-text: #a9ecc9;
  --chart-1: #64b5f2; --chart-2: #2fc4b0; --chart-3: #a38bff; --chart-4: #7d93a3;
  --field-bg: #0a1924; --topbar-bg: rgba(14, 31, 44, .94); --needs-bg: #2a2110; --row-hover: #132736; --error-bg: #2b1311;
  --card-hover-line: #3b5a70; --btn-hover-line: #2f5876; --badge-brand-line: #2a4e6b; --hero-end: #0f4a74; --empty-ring: rgba(18, 50, 74, .5);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
  --shadow-pop: 0 14px 44px rgba(0, 0, 0, .5);
  --pie-1: #64b5f2; --pie-2: #2fc4b0; --pie-3: #a38bff; --pie-4: #f4b862; --pie-5: #8fb0ff; --pie-6: #5ad6a0; --pie-7: #f28cc4; --pie-8: #8fa5b5;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    --navy-logo: #eef5f9; --ink: #e3ecf2; --ink-2: #b4c6d3; --ink-3: #98adbc; --subtle: #7d93a3;
    --line: #22394a; --line-2: #1a2f3e; --line-strong: #6a8497;
    --bg: #07141e; --surface: #0e1f2c; --surface-2: #152a3a;
    --brand: #64b5f2; --brand-hover: #92cbf6; --brand-ink: #04131e; --brand-soft: #12324a; --focus: #64b5f2;
    --teal-ink: #45d6c3; --teal-soft: #0f3533; --violet-ink: #b7a2ff; --violet-soft: #241e45; --violet-line: #3d3473;
    --ok: #5ad6a0; --ok-fill: #2fae78; --ok-soft: #0f2f25; --ok-line: #1f5743;
    --warn: #f4b862; --warn-fill: #d9952e; --warn-soft: #33260f; --warn-line: #6a4c19;
    --bad: #ff8f86; --bad-soft: #3a1714; --bad-line: #6f2923; --bad-hover: #ffb4ad; --on-bad: #2a0705;
    --info: #93b8ff; --info-soft: #13244a; --info-line: #27427e;
    --info-text: #bcd2ff; --warn-text: #f9d29b; --bad-text: #ffc2bc; --ok-text: #a9ecc9;
    --chart-1: #64b5f2; --chart-2: #2fc4b0; --chart-3: #a38bff; --chart-4: #7d93a3;
    --field-bg: #0a1924; --topbar-bg: rgba(14, 31, 44, .94); --needs-bg: #2a2110; --row-hover: #132736; --error-bg: #2b1311;
    --card-hover-line: #3b5a70; --btn-hover-line: #2f5876; --badge-brand-line: #2a4e6b; --hero-end: #0f4a74; --empty-ring: rgba(18, 50, 74, .5);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    --shadow-pop: 0 14px 44px rgba(0, 0, 0, .5);
    --pie-1: #64b5f2; --pie-2: #2fc4b0; --pie-3: #a38bff; --pie-4: #f4b862; --pie-5: #8fb0ff; --pie-6: #5ad6a0; --pie-7: #f28cc4; --pie-8: #8fa5b5;
    color-scheme: dark;
  }
}
[data-theme="dark"] .logo__symbol--light { display: none; }
[data-theme="dark"] .logo__symbol--dark { display: block; }
@media (prefers-color-scheme: dark) { [data-theme="system"] .logo__symbol--light { display: none; } [data-theme="system"] .logo__symbol--dark { display: block; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--fs-16)/1.55 var(--font); font-feature-settings: "cv11" 0; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color .15s var(--ease); }
a:hover { color: var(--brand-hover); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; letter-spacing: -.015em; color: var(--navy-logo); font-weight: 700; }
h1 { font-size: var(--fs-24); font-weight: 800; } h2 { font-size: var(--fs-20); } h3 { font-size: var(--fs-16); }
@media (min-width: 900px) { h1 { font-size: 1.75rem; } }
p { margin: 0 0 .75rem; }
small, .small { font-size: var(--fs-14); }
.muted { color: var(--ink-3); }
.num, .stat__value, td.r, .hbar__val { font-variant-numeric: tabular-nums lining-nums; }
.num { white-space: nowrap; font-weight: 600; }
.cur { font-size: .62em; font-weight: 600; color: var(--ink-3); letter-spacing: .02em; margin-right: .1em; vertical-align: .18em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--navy-900); color: #fff; padding: .6rem 1rem; z-index: 99; border-radius: var(--radius-xs); font-weight: 700; }
.skip:focus { left: 1rem; color: #fff; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 5px rgba(0, 199, 177, .35); border-radius: 6px; }
svg.i { width: 1.2em; height: 1.2em; vertical-align: -.22em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- logo (official symbol + Manrope wordmark; never redraw or recolour) */
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--navy-logo); text-decoration: none; min-height: 44px; padding: 2px; border-radius: 10px; }
.brand:hover { color: var(--navy-logo); }
.logo { display: inline-flex; align-items: center; gap: .55rem; }
.logo__symbol { height: 34px; width: auto; display: block; }
.logo__symbol--dark { display: none; height: 26px; }
.logo--reverse .logo__symbol { height: 26px; }
.logo__word { font-family: "Manrope", Arial, sans-serif; font-weight: 600; font-size: 1.05rem; letter-spacing: .155em; line-height: 1; color: var(--navy-logo); }
.logo--reverse .logo__word { color: #fff; }
.logo__tag { font-size: var(--fs-12); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .2rem .5rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .35); color: var(--on-navy-2); white-space: nowrap; }
@media (max-width: 359px) { .logo:not(.logo--keep) .logo__word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .logo--keep .logo__word { font-size: .95rem; } }

/* ---------- app chrome */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--topbar-bg); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.4) blur(6px); }
.topbar__in { display: flex; align-items: center; gap: .75rem; padding: .45rem 1rem; min-width: 0; }
.topbar__spacer { flex: 1; }
.chip { display: inline-flex; align-items: center; gap: .35rem; border-radius: 999px; padding: .25rem .7rem; font-size: var(--fs-12); font-weight: 700; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); text-decoration: none; white-space: nowrap; min-height: 32px; }
.chip--ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.chip--warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.chip--bad { background: var(--bad-soft); color: var(--bad); border-color: var(--bad-line); }
.chip--info { background: var(--info-soft); color: var(--info); border-color: var(--info-line); }
.chip--savings { background: var(--violet-soft); color: var(--violet-ink); border-color: var(--violet-line); }
a.chip:hover { filter: brightness(.97); }
.shell { display: grid; grid-template-columns: minmax(0, 1fr); }
.sidenav { display: none; }
.main { padding: 1.25rem 1rem 7rem; min-width: 0; width: 100%; max-width: 1200px; margin: 0 auto; }
.bottomnav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -6px 20px rgba(3, 21, 34, .06); }
.bottomnav a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: .45rem 0 .5rem; font-size: var(--fs-12); font-weight: 600; color: var(--ink-3); text-decoration: none; min-height: 58px; justify-content: center; position: relative; }
.bottomnav a[aria-current="page"] { color: var(--brand); font-weight: 800; }
.bottomnav a[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--turquoise); }
.bottomnav .add { color: var(--brand-ink); }
.bottomnav .add span.plus { background: var(--brand); width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; margin-top: -26px; box-shadow: 0 8px 20px rgba(13, 81, 128, .35), 0 0 0 4px var(--surface); transition: transform .15s var(--ease); }
.bottomnav .add span.plus svg { width: 1.5em; height: 1.5em; }
.bottomnav .add:active span.plus { transform: scale(.95); }
@media (min-width: 900px) {
  .shell { grid-template-columns: 248px minmax(0, 1fr); }
  .sidenav { display: block; position: sticky; top: 61px; align-self: start; height: calc(100vh - 61px); overflow: auto; padding: 1rem .75rem; border-right: 1px solid var(--line); background: var(--surface); }
  .main { padding: 1.75rem 2rem 3rem; }
  .bottomnav { display: none; }
  .topbar__in { padding: .45rem 1.25rem; }
}
.sidenav a { display: flex; gap: .7rem; align-items: center; padding: .6rem .75rem; border-radius: var(--radius-sm); color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .95rem; position: relative; transition: background .15s var(--ease), color .15s var(--ease); }
.sidenav a:hover { background: var(--surface-2); color: var(--ink); }
.sidenav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); font-weight: 800; }
.sidenav a[aria-current="page"]::before { content: ""; position: absolute; left: -.75rem; top: .45rem; bottom: .45rem; width: 4px; border-radius: 0 4px 4px 0; background: var(--turquoise); }
.sidenav .sep { font-size: var(--fs-12); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 700; padding: 1.1rem .75rem .35rem; }
.page-head { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: flex-end; justify-content: space-between; margin-bottom: 1.25rem; }
.page-head p { margin: .25rem 0 0; color: var(--ink-3); }
.page-head > div { min-width: 0; } .page-head h1 { overflow-wrap: anywhere; } /* long statement file names must not widen the page */
.actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

/* admin console: same family, navy chrome so the owner always knows which side they're on */
.console .topbar { background: var(--navy-900); border-bottom-color: var(--navy-700); }
.console .topbar .btn--ghost { color: var(--on-navy); }
.console .topbar .btn--ghost:hover { background: var(--navy-800); color: #fff; }
.console .topbar .chip--info { background: var(--navy-800); color: var(--on-navy); border-color: var(--navy-700); }
.console .topbar .guide-switch { background: var(--navy-800); color: var(--on-navy); border-color: var(--navy-700); }
.console .topbar .guide-switch[aria-checked="true"] { background: var(--navy-700); border-color: var(--turquoise); color: #fff; }
.console .topbar :focus-visible { outline-color: #fff; }
@media (min-width: 900px) {
  .console .sidenav { background: var(--navy-900); border-right-color: var(--navy-700); }
}
.console .sidenav a { color: var(--on-navy-2); }
.console .sidenav a:hover { background: var(--navy-800); color: #fff; }
.console .sidenav a[aria-current="page"] { background: var(--navy-800); color: #fff; }
.console .sidenav :focus-visible { outline-color: #fff; }
@media (max-width: 599px) {
  .console .logo__word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .vh-sm { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .console .topbar .chip--info { gap: 0; padding: .25rem .6rem; }
}
/* the sidebar column runs the full page height (sticky nav inside it) */
@media (min-width: 900px) {
  .shell { background: linear-gradient(to right, var(--surface) 247px, var(--line) 247px, var(--line) 248px, transparent 248px); }
  .console .shell { background: linear-gradient(to right, var(--navy-900) 248px, transparent 248px); }
}
.console .seg a[aria-current="page"] { background: var(--navy-900); border-color: var(--navy-900); }

/* ---------- surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); margin-bottom: 1rem; min-width: 0; }
@media (max-width: 420px) { .card { padding: 1rem; } }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card__head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin-bottom: .75rem; flex-wrap: wrap; }
.card__head h2 { margin: 0; font-size: 1.1rem; }
.card__head > a { font-size: var(--fs-14); font-weight: 700; margin-left: auto; }
.card--flat { box-shadow: none; }
.card--needs { border-color: var(--warn-line); background: var(--needs-bg); box-shadow: inset 4px 0 0 var(--warn-fill); }
.card--excluded { opacity: .78; background: var(--surface-2); }
a.card { transition: transform .15s var(--ease), box-shadow .15s var(--ease), border-color .15s var(--ease); }
a.card:hover { border-color: var(--card-hover-line); box-shadow: 0 2px 4px rgba(3, 21, 34, .06), 0 10px 28px rgba(3, 21, 34, .08); }
a.card:active { transform: translateY(1px); }
.grid { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.grid > .card { margin-bottom: 0; }
.grid + .card, .grid + section.card, .grid + form.card { margin-top: 1rem; }
.stack > * + * { margin-top: 1rem; }
.stat { display: flex; flex-direction: column; gap: .2rem; }
.stat__label { font-size: var(--fs-14); color: var(--ink-3); font-weight: 700; }
.stat__value { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; color: var(--navy-logo); line-height: 1.2; }
.stat__note { font-size: var(--fs-12); color: var(--ink-3); font-weight: 500; }
a.card.stat { position: relative; }
a.card.stat::after { content: "›"; position: absolute; right: 1rem; top: .9rem; color: var(--subtle); font-size: 1.2rem; line-height: 1; }
.hero { position: relative; overflow: hidden; color: #fff; border: none; background: linear-gradient(125deg, var(--navy-900) 0%, var(--navy-800) 45%, var(--hero-end) 100%); box-shadow: 0 12px 32px rgba(3, 21, 34, .22); padding: 1.5rem 1.25rem; }
.hero::after { content: ""; position: absolute; right: -60px; top: -70px; width: 220px; height: 220px; border-radius: 50%; background: var(--logo-gradient); opacity: .55; pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.hero .stat__label, .hero .stat__note, .hero .muted, .hero p { color: var(--on-navy-2); }
.hero .stat__value { color: #fff; font-size: 2.4rem; font-weight: 800; }
.hero .stat__value .cur { color: var(--on-navy-2); }
.hero a, .hero summary { color: #fff; }
.hero details { border-top: 1px solid rgba(255, 255, 255, .18); padding-top: .6rem; }
.hero :focus-visible { outline-color: #fff; }
@media (min-width: 900px) { .hero { padding: 1.75rem 2rem; } .hero .stat__value { font-size: var(--fs-32); font-size: 2.75rem; } }
.tag-est { display: inline-block; font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; border: 1px dashed currentColor; border-radius: 6px; padding: .05rem .4rem; margin-left: .35rem; vertical-align: .12em; }
.hero .tag-est { color: #fff; background: rgba(255, 255, 255, .1); }

/* ---------- alerts */
.alert { font-size: .94rem; display: flex; gap: .7rem; align-items: flex-start; border-radius: var(--radius-sm); padding: .85rem 1rem; margin-bottom: 1rem; border: 1px solid; border-left-width: 4px; background: var(--surface); }
.alert svg { margin-top: .15rem; }
.alert--info { background: var(--info-soft); border-color: var(--info-line); border-left-color: var(--info); color: var(--info-text); }
.alert--warn { background: var(--warn-soft); border-color: var(--warn-line); border-left-color: var(--warn-fill); color: var(--warn-text); }
.alert--bad { background: var(--bad-soft); border-color: var(--bad-line); border-left-color: var(--bad); color: var(--bad-text); }
.alert--ok { background: var(--ok-soft); border-color: var(--ok-line); border-left-color: var(--ok-fill); color: var(--ok-text); }
.alert p:last-child, .alert ul:last-child { margin-bottom: 0; }
.alert ul { margin: .25rem 0 0; padding-left: 1.1rem; }
.messages { list-style: none; padding: 0; margin: 0 0 1rem; }

/* ---------- buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; padding: .55rem 1.1rem; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--brand); font: inherit; font-size: .95rem; font-weight: 700; text-decoration: none; cursor: pointer; box-shadow: 0 1px 2px rgba(3, 21, 34, .05); transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease), transform .15s var(--ease), box-shadow .15s var(--ease); }
.btn:hover { background: var(--brand-soft); border-color: var(--btn-hover-line); color: var(--brand-hover); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.btn--primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 4px 12px rgba(13, 81, 128, .22); }
.btn--primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: var(--brand-ink); }
.btn--danger { background: var(--bad); border-color: var(--bad); color: var(--on-bad); }
.btn--danger:hover { background: var(--bad-hover); border-color: var(--bad-hover); color: var(--on-bad); }
.btn--ghost { border-color: transparent; background: transparent; box-shadow: none; color: var(--ink-2); }
.btn--ghost:hover { background: var(--surface-2); border-color: transparent; color: var(--ink); }
.btn--sm { min-height: 36px; padding: .3rem .8rem; font-size: var(--fs-14); }

.btn--block { width: 100%; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
form.inline { display: inline; }
.field { margin-bottom: 1rem; }
.field label, .label { display: block; font-weight: 700; font-size: var(--fs-14); margin-bottom: .35rem; color: var(--ink); }
.field .help { font-size: .82rem; color: var(--ink-3); margin-top: .3rem; }
.field .errorlist, .errorlist { list-style: none; margin: .35rem 0 0; padding: 0; color: var(--bad); font-size: .85rem; font-weight: 700; }
.errorlist li::before { content: "⚠ "; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--bad); background: var(--error-bg); }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], input[type=tel], input[type=file], input[type=url], select, textarea {
  width: 100%; min-height: 46px; padding: .6rem .8rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--field-bg); color: var(--ink); font: inherit; transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
input:hover, select:hover, textarea:hover { border-color: var(--ink-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(0, 199, 177, .3); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; }
::placeholder { color: var(--subtle); }
textarea { min-height: 96px; }
input[aria-invalid=true], select[aria-invalid=true] { border-color: var(--bad); }
.check, .field label.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 500; margin-bottom: .6rem; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: .15rem; flex: none; accent-color: var(--brand); }
.row { display: grid; gap: .75rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.money-input { position: relative; }
.money-input span { position: absolute; left: 1px; top: 1px; bottom: 1px; display: grid; place-items: center; padding: 0 .7rem; color: var(--ink-2); font-weight: 700; font-size: .85rem; background: var(--surface-2); border-right: 1px solid var(--line); border-radius: calc(var(--radius-sm) - 1px) 0 0 calc(var(--radius-sm) - 1px); }
.money-input input { padding-left: 4rem; font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.05rem; }
.seg { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.seg a, .seg label { border: 1px solid var(--line); border-radius: 999px; padding: .4rem .9rem; text-decoration: none; color: var(--ink-2); font-weight: 700; font-size: var(--fs-14); background: var(--surface); min-height: 36px; display: inline-flex; align-items: center; transition: background .15s var(--ease), border-color .15s var(--ease); }
.seg a:hover, .seg label:hover { border-color: var(--line-strong); background: var(--surface-2); }
.seg a[aria-current="page"], .seg input:checked + span { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.seg input { position: absolute; opacity: 0; }
.seg input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.seg label { position: relative; padding: 0; } .seg label span { display: flex; align-items: center; min-height: 34px; padding: .35rem .9rem; border-radius: 999px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .85rem 1rem; margin: 0 0 1rem; background: var(--surface); }
legend { font-weight: 800; padding: 0 .3rem; color: var(--navy-logo); }
details summary { cursor: pointer; font-weight: 700; color: var(--brand); }
details summary:hover { text-decoration: underline; text-underline-offset: 3px; }
details.card > summary { color: var(--navy-logo); }

/* ---------- tables & lists */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; position: relative; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: .65rem .6rem; border-bottom: 1px solid var(--line-2); vertical-align: top; }
th { font-size: var(--fs-12); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 800; background: var(--surface-2); border-bottom-color: var(--line); }
th:first-child { border-top-left-radius: var(--radius-xs); } th:last-child { border-top-right-radius: var(--radius-xs); }
tbody tr { transition: background .15s var(--ease); }
tbody tr:hover td { background: var(--row-hover); }
td.r, th.r { text-align: right; }
tr.is-excluded td { color: var(--ink-3); text-decoration: line-through; }
tr.needs td { background: var(--needs-bg); }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; gap: .8rem; align-items: center; padding: .8rem 0; border-bottom: 1px solid var(--line-2); }
.list > li:last-child { border-bottom: 0; }
.list__main { flex: 1; min-width: 0; }
.list__title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.list__title a { color: var(--ink); text-decoration: none; }
.list__title a:hover { color: var(--brand); text-decoration: underline; }
.list__sub { font-size: .82rem; color: var(--ink-3); }
.amt-in { color: var(--ok); font-weight: 800; }
.amt-out { color: var(--ink); font-weight: 800; }
.amt-move { color: var(--ink-3); font-weight: 700; }
.avatar { width: 40px; height: 40px; border-radius: 12px; background: var(--brand-soft); display: grid; place-items: center; color: var(--brand); flex: none; }
.avatar--in { background: var(--ok-soft); color: var(--ok); } .avatar--out { background: var(--surface-2); color: var(--ink-2); }
.avatar--save { background: var(--violet-soft); color: var(--violet-ink); } .avatar--move { background: var(--info-soft); color: var(--info); }
.empty { text-align: center; padding: 2rem 1rem; color: var(--ink-3); }
.empty > svg, .empty > .i { width: 64px; height: 64px; padding: 17px; border-radius: 50%; color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 8px var(--empty-ring); margin: 0 auto .9rem; display: block; }
.empty h3 { color: var(--navy-logo); font-size: 1.05rem; }
.empty p { max-width: 36ch; margin-left: auto; margin-right: auto; }
.empty .btn { margin-top: .25rem; }
.pagination { display: flex; gap: .5rem; justify-content: center; align-items: center; margin-top: 1rem; }

/* ---------- budget rows & meters (progress uses turquoise family; near/over add text + icon) */
.meter { display: block; height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin: .4rem 0; border: 1px solid var(--line-2); }
.meter > span { display: block; height: 100%; width: var(--w); background: linear-gradient(90deg, var(--teal), var(--chart-2)); border-radius: 99px; transition: width .2s var(--ease); }
.meter--near > span { background: var(--warn-fill); } .meter--over > span { background: var(--bad); } .meter--unbudgeted > span { background: var(--chart-4); }
.meter--savings > span { background: var(--violet); }
.status { display: inline-flex; align-items: center; gap: .3rem; font-size: var(--fs-12); font-weight: 800; white-space: nowrap; padding: .15rem .55rem; border-radius: 999px; border: 1px solid transparent; }
.status--on_track, .status--unused, .status--full { color: var(--ok); background: var(--ok-soft); border-color: var(--ok-line); }
.status--near { color: var(--warn); background: var(--warn-soft); border-color: var(--warn-line); }
.status--over { color: var(--bad); background: var(--bad-soft); border-color: var(--bad-line); }
.status--unbudgeted { color: var(--ink-2); background: var(--surface-2); border-color: var(--line); }
h2.status, h1.status, p.status { background: none; border: 0; padding: 0; font-size: inherit; white-space: normal; }
.bline { padding: .85rem 0; border-bottom: 1px solid var(--line-2); }
.bline:last-child { border-bottom: 0; }
.bline__top { display: flex; justify-content: space-between; gap: .5rem; align-items: center; flex-wrap: wrap; }
.bline__name { font-weight: 700; }
.bline__nums { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem 1rem; font-size: .84rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.badge { display: inline-block; font-size: .75rem; font-weight: 800; padding: .1rem .45rem; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); vertical-align: .1em; letter-spacing: .02em; }
.badge--protected { background: var(--brand-soft); color: var(--brand); border-color: var(--badge-brand-line); }
.badge--savings { background: var(--violet-soft); color: var(--violet-ink); border-color: var(--violet-line); }
.badge--est { border-style: dashed; }

/* ---------- charts (HTML bars, every bar is a link; series also named in a text legend) */
.hbar { display: grid; grid-template-columns: minmax(90px, 38%) minmax(0, 1fr) auto; gap: .6rem; align-items: center; padding: .35rem .3rem; text-decoration: none; color: inherit; border-radius: var(--radius-xs); transition: background .15s var(--ease); }
.hbar:hover { background: var(--surface-2); color: inherit; }
.hbar__label { font-size: .88rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar__track { height: 14px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.hbar__fill { display: block; height: 100%; width: var(--w); background: var(--chart-1); border-radius: 99px; }
.hbar__fill--2 { background: var(--chart-2); } .hbar__fill--3 { background: var(--chart-3); } .hbar__fill--4 { background: var(--chart-4); }
.hbar__val { font-size: .85rem; font-weight: 700; }
.cols { display: flex; align-items: flex-end; gap: .4rem; height: 180px; padding-top: .5rem; border-bottom: 1px solid var(--line-strong); background-image: linear-gradient(to top, var(--line-2) 1px, transparent 1px); background-size: 100% 25%; }
.cols a { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; height: 100%; text-decoration: none; color: inherit; gap: 2px; min-width: 0; border-radius: 6px 6px 0 0; transition: background .15s var(--ease); }
.cols a:hover { background: rgba(13, 81, 128, .06); }
.cols .bar { background: var(--chart-1); border-radius: 5px 5px 0 0; min-height: 2px; height: var(--h); }
.cols .bar--2 { background: var(--chart-2); } .cols .bar--3 { background: var(--chart-3); }
.cols .pair { display: flex; gap: 2px; align-items: flex-end; height: 100%; }
.cols .pair .bar { flex: 1; }
.cols-labels { display: flex; gap: .4rem; font-size: var(--fs-12); color: var(--ink-3); margin-top: .35rem; font-weight: 600; }
.cols-labels span { flex: 1; text-align: center; min-width: 0; overflow: hidden; }
.legend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .82rem; font-weight: 600; color: var(--ink-2); margin: .5rem 0; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: .35rem; }
.legend .k1 { background: var(--chart-1); } .legend .k2 { background: var(--chart-2); } .legend .k3 { background: var(--chart-3); } .legend .k4 { background: var(--chart-4); }
.split-bar { display: flex; height: 16px; border-radius: 99px; overflow: hidden; background: var(--surface-2); }
.split-bar span { height: 100%; width: var(--w); }

/* ---------- auth pages: static/css/auth.css (loaded only by templates/auth_base.html) */
.steps { display: flex; gap: .35rem; margin: 0 0 1.25rem; padding: 0; list-style: none; }
.steps li { flex: 1; height: 6px; border-radius: 99px; background: var(--line); }
.steps li.done { background: var(--teal); } .steps li.current { background: var(--brand); }
.wizard { max-width: 720px; margin: 0 auto; }
.choice-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: .45rem; }
@media (min-width: 560px) { .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.choice-grid .check { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .65rem .8rem; margin: 0; background: var(--surface); transition: border-color .15s var(--ease), background .15s var(--ease); }
.choice-grid .check:hover { border-color: var(--line-strong); }
.choice-grid .check:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }

/* ---------- landing (docs/BRAND_AND_UI.md "Landing page"). After wezumo.com: a night-navy hero with aurora glows, a
   gradient word in the headline, frosted-glass panels and glowing "signal" notes. The salary split keeps its job
   colours (income cyan, bills sky, savings lavender, everyday warm) and the sphere marks the result. */
.lp { background: var(--surface); }
.lp-wrap { max-width: 1180px; margin: 0 auto; padding: 0 1rem; }
.site-head { position: absolute; inset: 0 0 auto; z-index: 5; background: transparent; }
.site-head__in { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 1rem; padding: .75rem 1rem; }
.site-head .brand { color: #fff; }
.site-head .brand:focus-visible, .lp-hero :focus-visible, .lp-band :focus-visible, .site-foot :focus-visible { outline-color: #fff; }
.site-head__link { color: var(--on-night); font-weight: 700; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; padding: 0 .5rem; }
.site-head__link:hover { color: var(--glow); }
.site-head .btn { white-space: nowrap; }
.btn--lg { min-height: 52px; padding: .7rem 1.6rem; font-size: 1.02rem; border-radius: 999px; }
.btn--glow { background: var(--glow); border-color: var(--glow); color: var(--night); border-radius: 999px; box-shadow: 0 0 0 1px rgba(79, 230, 234, .35), 0 10px 30px -8px rgba(79, 230, 234, .6); }
.btn--glow:hover { background: #8af0f2; border-color: #8af0f2; color: var(--night); }
.btn--glass { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .28); color: #fff; border-radius: 999px; box-shadow: none; backdrop-filter: blur(8px); }
.btn--glass:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .5); color: #fff; }

.lp-hero { position: relative; isolation: isolate; overflow: hidden; background: var(--night); color: var(--on-night-2); }
.lp-hero__aurora, .lp-band__aurora { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(42% 50% at 82% 28%, rgba(29, 127, 155, .55), transparent 70%),
              radial-gradient(38% 46% at 100% 92%, rgba(74, 87, 184, .5), transparent 70%),
              radial-gradient(40% 40% at 6% 100%, rgba(32, 96, 122, .45), transparent 70%),
              radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .07) 1px, transparent 1.5px) 0 0 / 22px 22px; }
.lp-hero__aurora::after { content: ""; position: absolute; inset: auto 0 0; height: 120px; background: linear-gradient(180deg, transparent, var(--night)); }
.lp-hero__in { max-width: 1180px; margin: 0 auto; padding: 5.25rem 1rem 3rem; display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1fr); align-items: center; }
.lp-pill { display: inline-flex; align-items: center; gap: .55rem; margin: 0 0 1.25rem; padding: .35rem .85rem .35rem .6rem; border-radius: 999px; border: 1px solid rgba(109, 231, 231, .28); background: rgba(6, 30, 45, .6); font-size: var(--fs-14); font-weight: 600; color: var(--on-night); }
.lp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--glow); box-shadow: 0 0 0 4px rgba(79, 230, 234, .18), 0 0 12px var(--glow); }
.lp-hero h1 { color: #fff; font-size: clamp(2.6rem, 10vw, 4.6rem); line-height: 1.02; letter-spacing: -.045em; font-weight: 800; max-width: 11ch; margin: 0 0 1.1rem; }
.lp-grad { background: linear-gradient(100deg, #69efdf, #6cb9fa 70%, #b59afa); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.lp-lede { font-size: 1.15rem; line-height: 1.6; color: var(--on-night-2); max-width: 36ch; margin: 0 0 1.75rem; }
.lp-hero .actions { gap: .75rem; }
.lp-trust { list-style: none; margin: 1.75rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; font-size: var(--fs-14); font-weight: 600; color: var(--on-night-2); }
.lp-trust li { display: inline-flex; align-items: center; gap: .45rem; }
.lp-trust .i { color: var(--glow); }

.lp-stage { position: relative; justify-self: center; width: 100%; max-width: 440px; }
.lp-signal { display: none; }
.flow { position: relative; margin: 0; width: 100%; color: var(--on-night-2); background: linear-gradient(160deg, rgba(14, 44, 62, .78), rgba(6, 30, 45, .7)); border: 1px solid rgba(109, 231, 231, .22); border-radius: 24px; padding: 1.1rem 1.1rem 1rem; backdrop-filter: blur(16px) saturate(1.3); box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .7), inset 0 1px rgba(255, 255, 255, .08), 0 0 60px rgba(2, 219, 224, .08); }
.flow__grid { display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: .6rem; }
.flow__art { display: block; overflow: visible; }
.flow__s { fill: none; stroke-linecap: round; }
.flow__s--in { stroke: var(--glow); } .flow__s--bills { stroke: var(--sky); }
.flow__s--save { stroke: var(--lavender); } .flow__s--every { stroke: var(--warm); }
.flow__halo { fill: rgba(79, 230, 234, .16); }
.flow__rows { margin: 0; }
.flow__row { height: 56px; display: flex; align-items: center; justify-content: space-between; gap: .75rem; border-bottom: 1px solid rgba(143, 216, 231, .14); }
.flow__row--every { border-bottom: 0; }
.flow__row dt { font-weight: 700; color: #fff; line-height: 1.25; min-width: 0; }
.flow__row dt > span:not(.flow__est) { display: block; font-size: var(--fs-12); font-weight: 500; color: var(--on-night-3); }
.flow__row dd { margin: 0 -.3rem 0 0; color: #fff; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums lining-nums; border-radius: 6px; padding: .05rem .3rem; }
.flow__row--in dd { color: var(--glow); }
.flow__row--out { height: auto; min-height: 88px; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: .15rem; padding-top: 16px; border: 0; }
.flow__row--out dd { margin: 0 0 0 -.3rem; white-space: normal; }
.flow__row--out strong { display: block; font-size: 2.2rem; line-height: 1.1; font-weight: 800; letter-spacing: -.03em; color: #fff; }
.flow__why { display: block; font-size: var(--fs-12); font-weight: 600; color: var(--on-night-3); }
.flow__est { display: inline-block; margin-left: .3rem; padding: 0 .4rem; font-size: var(--fs-12); font-weight: 700; color: var(--on-night-2); border: 1px dashed rgba(198, 219, 230, .5); border-radius: 6px; vertical-align: .1em; }
.flow__try { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin-top: .6rem; padding-top: .8rem; border-top: 1px solid rgba(143, 216, 231, .14); font-size: var(--fs-14); font-weight: 600; }
.flow__try[hidden] { display: none; }
.flow__pays { display: flex; gap: .35rem; }
.flow__pays button { min-height: 44px; padding: 0 .85rem; border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; background: rgba(255, 255, 255, .05); color: #fff; font: inherit; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease); }
.flow__pays button:hover { border-color: var(--glow); }
.flow__pays button[aria-pressed=true] { background: var(--glow); border-color: var(--glow); color: var(--night); }
.flow figcaption { margin: .7rem 0 0; font-size: var(--fs-12); color: var(--on-night-3); }

.lp-features { background: var(--night-soft); padding: 4rem 0; }
.lp-features h2, .lp-contact h2 { font-size: clamp(1.7rem, 4.5vw, 2.4rem); letter-spacing: -.035em; font-weight: 800; max-width: 22ch; }
.lp-sub { color: var(--ink-2); font-size: 1.05rem; max-width: 50ch; margin: 0; }
.lp-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; margin-top: 2rem; }
.lp-card { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 1.25rem 1.25rem 1.4rem; box-shadow: 0 12px 32px rgba(3, 21, 34, .06); }
.lp-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, #02dbe0, #245bff 68%, #713bff); }
.lp-card h3 { font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em; margin-top: 1.1rem; }
.lp-card p { color: var(--ink-2); margin: 0; }
.lp-mini { height: 128px; border-radius: 16px; background: var(--night); padding: .8rem; display: flex; flex-direction: column; justify-content: center; gap: .45rem; color: #fff; font-size: var(--fs-14); font-weight: 700; background-image: radial-gradient(60% 80% at 100% 0, rgba(29, 127, 155, .5), transparent 70%), radial-gradient(50% 70% at 0 100%, rgba(74, 87, 184, .4), transparent 70%); }
.lp-mini--tx span { display: flex; align-items: center; gap: .55rem; padding: .3rem .45rem; border-radius: 10px; background: rgba(255, 255, 255, .06); }
.lp-mini--tx b { margin-left: auto; font-variant-numeric: tabular-nums; color: #ffd2b0; } .lp-mini--tx b.is-in { color: var(--glow); }
.lp-av { width: 18px; height: 18px; border-radius: 6px; background: var(--warm); flex: none; } .lp-av--in { background: var(--glow); } .lp-av--move { background: var(--lavender); }
.lp-mini--plan span { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); align-items: center; gap: .6rem; }
.lp-mini--plan i { display: block; height: 10px; border-radius: 99px; background: linear-gradient(90deg, var(--glow) var(--w), rgba(255, 255, 255, .12) var(--w)); }
.lp-mini--plan i.is-near { background: linear-gradient(90deg, var(--warm) var(--w), rgba(255, 255, 255, .12) var(--w)); }
.lp-mini--pie { flex-direction: row; align-items: center; justify-content: center; gap: 1.25rem; }
.lp-donut { width: 92px; height: 92px; border-radius: 50%; flex: none; background: conic-gradient(var(--sky) 0 40%, var(--warm) 40% 72%, var(--lavender) 72% 100%); -webkit-mask: radial-gradient(circle, transparent 52%, #000 53%); mask: radial-gradient(circle, transparent 52%, #000 53%); }
.lp-keys { display: grid; gap: .35rem; }
.lp-keys span { display: flex; align-items: center; gap: .45rem; }
.lp-keys i { width: 10px; height: 10px; border-radius: 3px; } .lp-keys .k1 { background: var(--sky); } .lp-keys .k2 { background: var(--warm); } .lp-keys .k3 { background: var(--lavender); }

.lp-band { position: relative; isolation: isolate; overflow: hidden; background: linear-gradient(135deg, var(--night), #0a3150); color: var(--on-night-2); padding: 4rem 0; }
.lp-band__aurora { background: radial-gradient(40% 60% at 90% 10%, rgba(2, 219, 224, .22), transparent 70%), radial-gradient(40% 60% at 0 100%, rgba(113, 59, 255, .25), transparent 70%); }
.lp-band__in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; align-items: center; }
.lp-band h2 { color: #fff; font-size: clamp(1.7rem, 4.5vw, 2.4rem); letter-spacing: -.035em; font-weight: 800; }
.lp-band p { max-width: 48ch; margin: 0; }
.lp-band__icon { display: inline-grid; place-items: center; width: 52px; height: 52px; margin-bottom: 1rem; border-radius: 16px; color: var(--glow); background: rgba(79, 230, 234, .1); border: 1px solid rgba(79, 230, 234, .3); box-shadow: 0 0 30px rgba(79, 230, 234, .2); }
.lp-band__icon .i { width: 26px; height: 26px; }
.lp-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.lp-plan { display: flex; flex-direction: column; gap: .15rem; padding: 1.1rem 1.1rem 1rem; border-radius: 20px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .14); backdrop-filter: blur(10px); }
.lp-plan--best { border-color: rgba(79, 230, 234, .55); box-shadow: 0 0 40px rgba(79, 230, 234, .12); }
.lp-plan span { font-size: var(--fs-14); font-weight: 700; color: var(--on-night-2); }
.lp-plan strong { font-size: clamp(1.5rem, 5vw, 2rem); font-weight: 800; color: #fff; letter-spacing: -.02em; white-space: nowrap; }
.lp-plan strong .cur { color: var(--on-night-3); }
.lp-plan small { color: var(--on-night-3); font-weight: 600; }
.lp-plans__note { grid-column: 1 / -1; font-size: var(--fs-14); color: var(--on-night-3); }
.lp-plans__cta { grid-column: 1 / -1; justify-self: start; }

.lp-contact { padding: 3.5rem 0; background: var(--surface); }
.lp-contact__in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; align-items: center; }
.lp-contact__ways { display: grid; gap: .75rem; }
.lp-way { display: flex; align-items: center; gap: .9rem; padding: .9rem 1.1rem; border-radius: 18px; border: 1px solid var(--line); background: var(--night-soft); color: var(--ink); text-decoration: none; transition: border-color .15s var(--ease), transform .15s var(--ease); min-width: 0; }
.lp-way:hover { border-color: var(--brand); color: var(--ink); }
.lp-way small { display: block; color: var(--ink-3); font-weight: 600; font-size: var(--fs-12); }
.lp-way strong { display: block; font-size: 1.05rem; overflow-wrap: break-word; }
.lp-way__ico { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 14px; background: var(--night); color: var(--glow); }

.site-foot { background: var(--night-deep); color: var(--on-night-2); }
.site-foot__in { max-width: 1180px; margin: 0 auto; padding: 2.5rem 1rem 1.5rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.75rem; font-size: var(--fs-14); }
.site-foot__brand p { margin: .75rem 0 0; color: var(--on-night-3); }
.site-foot__col { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; }
.site-foot__col h2 { color: #fff; font-size: var(--fs-14); font-weight: 700; margin: 0 0 .25rem; letter-spacing: 0; }
.site-foot__col a { color: var(--on-night-2); text-decoration: none; overflow-wrap: anywhere; min-height: 32px; display: inline-flex; align-items: center; }
.site-foot__col a:hover { color: var(--glow); }
.site-foot__legal { max-width: 1180px; margin: 0 auto; padding: 1.25rem 1rem 1.75rem; font-size: var(--fs-12); color: var(--on-night-3); border-top: 1px solid rgba(143, 216, 231, .12); }

@media (min-width: 640px) {
  .lp-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-foot__in { grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); }
  }
@media (min-width: 960px) {
  .lp-hero__in { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); padding: 7.5rem 1.5rem 5rem; min-height: 720px; }
  .lp-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lp-band__in { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 4rem; }
  .lp-contact__in { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
  .lp-wrap, .site-head__in { padding-left: 1.5rem; padding-right: 1.5rem; }
  .lp-features, .lp-band { padding: 5.5rem 0; }
  /* glowing notes around the panel */
  .lp-signal { display: flex; position: absolute; z-index: 2; align-items: center; gap: .7rem; padding: .6rem .95rem .6rem .7rem; width: max-content; max-width: 240px; border-radius: 14px; background: rgba(6, 30, 45, .72); border: 1px solid rgba(109, 231, 231, .28); backdrop-filter: blur(14px) saturate(1.3); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .7), inset 0 1px rgba(255, 255, 255, .08); }
  .lp-signal small { display: block; font-size: .72rem; letter-spacing: .02em; color: var(--on-night-3); line-height: 1.35; }
  .lp-signal strong { display: block; font-size: .84rem; color: #fff; font-weight: 700; line-height: 1.35; }
  .lp-signal__dot { width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--glow); box-shadow: 0 0 0 4px rgba(79, 230, 234, .18), 0 0 14px var(--glow); }
  .lp-signal__dot.is-warm { background: var(--warm); box-shadow: 0 0 0 4px rgba(255, 178, 122, .18), 0 0 14px var(--warm); }
  .lp-signal__dot.is-violet { background: var(--lavender); box-shadow: 0 0 0 4px rgba(165, 139, 255, .2), 0 0 14px var(--lavender); }
  .lp-signal--1 { top: -52px; right: 24px; } .lp-signal--2 { top: 50%; left: -212px; } .lp-signal--3 { bottom: -40px; right: -30px; }
}
@media (max-width: 359px) { .flow { padding: .9rem .7rem .8rem; } .flow__grid { column-gap: .4rem; } .flow__row dd { font-size: .95rem; } .flow__try > span { width: 100%; } .lp-plans { grid-template-columns: minmax(0, 1fr); } }

/* The page-load moment (~2.5 s): the mark draws; the pay arrives and divides into its jobs in the order the app
   allocates (bills, savings, everyday); the sphere settles on the result and the notes arrive. Afterwards only the
   notes drift a few pixels and the sphere's halo breathes slowly (the sphere observes). fill-mode backwards: the
   resting style is the finished picture; reduced motion shows it straight away with nothing moving. */
@media (prefers-reduced-motion: no-preference) {
  .logo--draw .mark__b1, .logo--draw .mark__b2 { animation: wz-draw .38s var(--ease) backwards; }
  .logo--draw .mark__b2 { animation-delay: .12s; }
  .logo--draw .mark__dot { transform-box: fill-box; transform-origin: center; animation: wz-settle .42s .42s var(--ease) backwards; }
  .lp-hero__text > * { animation: wz-rise .6s var(--ease) backwards; }
  .lp-hero__text > :nth-child(2) { animation-delay: .08s; } .lp-hero__text > :nth-child(3) { animation-delay: .16s; }
  .lp-hero__text > :nth-child(4) { animation-delay: .24s; } .lp-hero__text > :nth-child(5) { animation-delay: .32s; }
  .flow { animation: wz-rise .7s .2s var(--ease) backwards; }
  .flow__s { animation: wz-draw .35s var(--ease) backwards; transition: d .35s var(--ease), stroke-width .35s var(--ease); }
  .flow__s--in { animation-delay: .6s; animation-duration: .3s; }
  .flow__s--bills { animation-delay: .9s; } .flow__s--save { animation-delay: 1.1s; }
  .flow__s--every { animation-delay: 1.3s; animation-duration: .6s; }
  .flow__dot { transform-box: fill-box; transform-origin: center; animation: wz-settle .42s 1.85s var(--ease) backwards; }
  .flow__halo { transform-box: fill-box; transform-origin: center; animation: wz-halo 4.5s 2.3s ease-in-out infinite; }
  .flow__row { animation: wz-fade .3s var(--ease) backwards; }
  .flow__row--in { animation-delay: .65s; } .flow__row--bills { animation-delay: 1s; } .flow__row--save { animation-delay: 1.2s; }
  .flow__row--every { animation-delay: 1.45s; } .flow__row--out { animation-delay: 1.9s; }
  .flow .is-changed { animation: wz-flash .9s var(--ease); }
  .lp-signal--1 { animation: wz-note .5s 1s var(--ease) backwards, wz-drift 7s 1.5s ease-in-out infinite alternate; }
  .lp-signal--2 { animation: wz-note .5s 1.3s var(--ease) backwards, wz-drift 8s 1.8s ease-in-out infinite alternate-reverse; }
  .lp-signal--3 { animation: wz-note .5s 2s var(--ease) backwards, wz-drift 7.5s 2.5s ease-in-out infinite alternate; }
  .lp-way:hover { transform: translateY(-2px); }
}
@keyframes wz-draw { from { stroke-dasharray: 1 2; stroke-dashoffset: 1; opacity: 0; } 1% { opacity: 1; } to { stroke-dasharray: 1 2; stroke-dashoffset: 0; } }
@keyframes wz-settle { from { opacity: 0; transform: translateY(-40%) scale(.6); } 70% { opacity: 1; transform: translateY(3%) scale(1.02); } to { transform: none; } }
@keyframes wz-fade { from { opacity: 0; } }
@keyframes wz-rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes wz-note { from { opacity: 0; transform: translateY(12px) scale(.96); } }
@keyframes wz-drift { from { transform: translateY(0); } to { transform: translateY(-7px); } }
@keyframes wz-halo { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.25); opacity: .35; } }
@keyframes wz-flash { from { background: rgba(79, 230, 234, .25); } }

.kv { display: grid; grid-template-columns: minmax(7rem, 9rem) minmax(0, 1fr); gap: .45rem 1rem; margin: 0; }
.kv dt { color: var(--ink-3); font-size: .88rem; font-weight: 600; } .kv dd { margin: 0; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.confirm-bar { position: sticky; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; padding: .75rem 1rem; box-shadow: 0 -4px 24px rgba(3, 21, 34, .12); border-color: #c4d8e8; }
.confirm-bar__note { flex: 1 1 100%; margin: 0; }
@media (max-width: 599px) { .confirm-bar__note { display: none; } .confirm-bar .btn { flex: 1 1 auto; } }
@media (min-width: 900px) { .confirm-bar { bottom: 1rem; } }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-xs); padding: .5rem .7rem; word-break: break-all; }
.qr svg, .qr img { width: 200px; height: 200px; background: #fff; padding: 8px; border: 1px solid var(--line); border-radius: 10px; }
.footer { text-align: center; color: var(--ink-3); font-size: .8rem; padding: 1.5rem 1rem; }
.kicker { font-size: var(--fs-12); letter-spacing: .08em; text-transform: uppercase; font-weight: 800; color: var(--ink-3); }
@media print { .sidenav, .bottomnav, .topbar { display: none; } .main { padding: 0; } }
@media (min-width: 900px) { [data-mobile-only] { display: none; } }
.topbar .chip { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 420px) { .hide-sm { display: none; } .topbar__in { gap: .4rem; padding: .4rem .75rem; } }
@media (max-width: 359px) { .hide-xs { display: none; } }

/* ---------- motion: subtle, and fully off under prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- guided tour & Guide Mode (static/js/tour.js). Status is text + icon, never colour alone. */
.guide-switch { display: inline-flex; align-items: center; gap: .35rem; min-height: 36px; padding: .25rem .55rem; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); color: var(--ink-2); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.guide-switch[aria-checked="true"] { background: var(--teal-soft); border-color: var(--teal); color: var(--teal-ink); }
.guide-switch__track { position: relative; width: 26px; height: 15px; border-radius: 999px; background: var(--line-strong); flex: none; }
.guide-switch__knob { position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: #fff; transition: left .15s; }
.guide-switch[aria-checked="true"] .guide-switch__track { background: var(--teal); }
.guide-switch[aria-checked="true"] .guide-switch__knob { left: 13px; }
@media (max-width: 420px) { .guide-switch__track { display: none; } }
.guide-banner { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin-bottom: 1rem; padding: .6rem .9rem; border: 1px solid #a8e3da; border-left: 4px solid var(--turquoise); border-radius: var(--radius-sm); background: var(--teal-soft); color: #064a41; font-size: .9rem; }
.guide-banner[hidden] { display: none; }
.guide-banner p { flex: 1 1 14rem; margin: 0; }
.guide-banner form { margin: 0; }

.tour-ring { position: fixed; z-index: 52; pointer-events: none; border-radius: 12px; box-shadow: 0 0 0 3px var(--turquoise), 0 0 0 9999px rgba(3, 21, 34, .55); transition: all .2s; }
.tour-card { position: fixed; z-index: 56; width: min(360px, calc(100vw - 24px)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 40px rgba(3, 21, 34, .25); padding: 1rem 1.1rem; outline: none; }
.tour-card h2 { font-size: 1.05rem; margin: .15rem 0 .35rem; }
.tour-card p { font-size: .92rem; color: var(--ink-2); }
.tour-card--dock { left: 0; right: 0; bottom: 0; width: auto; border-radius: var(--radius) var(--radius) 0 0; padding-bottom: max(1rem, env(safe-area-inset-bottom)); }
.tour-card--dock.tour-card--top { bottom: auto; top: 0; border-radius: 0 0 var(--radius) var(--radius); }
.tour-card__top { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; }
.tour-card__count, .guide-kicker { margin: 0; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-2); }
.tour-card__actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; margin-top: .5rem; }
.tour-card__nav { display: flex; gap: .4rem; }
.tour-x { border: 0; background: none; font-size: 1.35rem; line-height: 1; width: 32px; height: 32px; margin: -.35rem -.45rem 0 0; border-radius: 8px; color: var(--ink-3); cursor: pointer; }
.tour-x:hover { background: var(--surface-2); color: var(--ink); }
.tour-modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 1rem; background: rgba(3, 21, 34, .5); }
.tour-modal__box { width: min(460px, 100%); background: var(--surface); border-radius: var(--radius); padding: 1.25rem; box-shadow: 0 12px 40px rgba(3, 21, 34, .3); }
.tour-modal__box p { color: var(--ink-2); }
.tour-modal__actions, .tour-float__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }
.tour-float { position: fixed; z-index: 45; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 30px rgba(3, 21, 34, .18); padding: .75rem .9rem; bottom: calc(72px + env(safe-area-inset-bottom)); }
.tour-float--right { right: 12px; width: min(340px, calc(100vw - 24px)); }
.tour-float--center { left: 50%; transform: translateX(-50%); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .4rem .6rem; width: max-content; max-width: calc(100vw - 24px); border-radius: 999px; padding: .35rem .45rem .35rem .9rem; }
.tour-float__title { font-weight: 700; margin: 0 0 .2rem; }
@media (min-width: 900px) { .tour-float { bottom: 16px; } }

.guide-hotspot { position: absolute; z-index: 35; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--brand); color: var(--brand-ink); font-weight: 800; font-size: .8rem; cursor: pointer; box-shadow: 0 0 0 3px rgba(0, 199, 177, .3); animation: wz-pulse 2s infinite; }
@keyframes wz-pulse { 50% { box-shadow: 0 0 0 7px rgba(0, 199, 177, .12); } }
.guide-pop { position: absolute; z-index: 36; width: min(300px, calc(100vw - 16px)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: 0 8px 30px rgba(3, 21, 34, .18); padding: .75rem .9rem; }
.guide-pop__title, .guide-insight__t, .guide-panel__t { font-weight: 700; margin: 0 0 .25rem; }
.guide-panel { position: fixed; z-index: 44; left: 12px; bottom: calc(72px + env(safe-area-inset-bottom)); width: min(320px, calc(100vw - 24px)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 30px rgba(3, 21, 34, .18); padding: .6rem .8rem; }
.guide-panel__head { display: flex; justify-content: space-between; align-items: center; }
.guide-panel__name { margin: 0; font-weight: 700; font-size: .9rem; }
.guide-panel__body p { margin: .4rem 0; }
.guide-panel__about { background: var(--brand-soft); border-radius: var(--radius-sm); padding: .5rem .65rem; margin-top: .4rem; }
.guide-panel__actions { display: flex; flex-direction: column; gap: .4rem; }
@media (min-width: 900px) { .guide-panel { bottom: 16px; left: auto; right: 16px; } }
.guide-outline { position: fixed; z-index: 34; pointer-events: none; border-radius: 12px; box-shadow: 0 0 0 2px var(--turquoise), 0 0 0 5px rgba(0, 199, 177, .25); }
.guide-insight { position: fixed; z-index: 57; width: min(340px, calc(100vw - 20px)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 40px rgba(3, 21, 34, .22); padding: .8rem .95rem; pointer-events: none; }
.guide-insight--pinned { pointer-events: auto; }
.guide-insight p { margin: 0 0 .3rem; }
.guide-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin-top: .4rem !important; }
.guide-label--value { color: var(--brand-2); }
.guide-admin { background: var(--surface-2); border-radius: var(--radius-sm); padding: .4rem .55rem; margin-top: .4rem !important; }
.guide-hint { font-size: .75rem; color: var(--ink-3); }
@media (prefers-reduced-motion: reduce) {
  .guide-hotspot { animation: none; }
  .tour-ring, .guide-switch__knob { transition: none; }
}

/* ---------- phones: 44 px touch targets and rows that wrap (kept last so it wins over component defaults) */
@media (max-width: 899px), (pointer: coarse) {
  .btn--sm, .seg a, .seg label span, .topbar .chip, .guide-switch, .pw-toggle { min-height: 44px; }
  .seg label { min-height: 44px; }
  .guide-switch { min-width: 44px; justify-content: center; }
}
@media (max-width: 599px) {
  .list > li:has(> .btn, > form, > .actions) { flex-wrap: wrap; }
  .list > li:has(> .btn, > form, > .actions) > .list__main { flex: 1 1 100%; }
  .list > li:has(> .btn, > form, > .actions) > .num { margin-left: auto; }
}

/* budget-vs-actual rows (analytics) */
.hbar--bva { grid-template-columns: minmax(90px, 30%) minmax(0, 1fr) auto; }
.hbar--bva .hbar__track { display: block; margin-bottom: 3px; }
.btn--danger-outline { color: var(--bad); border-color: var(--bad-line); }
.btn--danger-outline:hover { background: var(--bad-soft); color: var(--bad-text); border-color: var(--bad); }
.nw { white-space: nowrap; }
.list--nav > li { padding: 0; }
.list--nav > li > a, .list--nav > li > form > .linkbtn { display: flex; align-items: center; gap: .75rem; width: 100%; min-height: 52px; padding: .25rem .25rem; color: var(--ink); text-decoration: none; font-weight: 700; }
.list--nav > li > a::after { content: "›"; margin-left: auto; color: var(--subtle); font-size: 1.3rem; }
.list--nav > li > a:hover { color: var(--brand); }
.list--nav svg { color: var(--brand); }
.month-nav { display: inline-flex; align-items: center; gap: .25rem; }
.month-nav a { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; font-weight: 800; font-size: 1.1rem; }
.month-nav a:hover { background: var(--surface-2); }

/* ---------- phones (< 600 px): arranged for one column and thumbs */
@media (max-width: 599px) {
  h1 { font-size: 1.4rem; }
  .card { padding: 1rem; }
  /* page header: title, then actions as an even grid (primary full width) */
  .page-head { align-items: stretch; }
  .page-head > .actions, .page-head > div > .actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .page-head > .actions > *, .page-head > .actions .btn { width: 100%; }
  .page-head > .actions > .btn--primary:first-child, .page-head > .actions > :only-child,
  .page-head > .actions > :first-child:not(.btn--primary):last-child:nth-child(odd),
  .page-head > .actions > .btn--primary:first-child ~ :last-child:nth-child(even),
  .page-head > .actions > :not(.btn--primary):first-child ~ :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .page-head > .btn { width: 100%; }
  .month-nav a { width: 44px; height: 44px; }
  /* stat tiles two-up from 340 px */
  .grid--2:has(> .stat), .grid--3:has(> .stat), .grid--4:has(> .stat) { gap: .6rem; }
  .stat__value { font-size: 1.3rem; }
  .bline__nums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .15rem .75rem; }
  .bline__nums > :nth-child(even) { text-align: right; }
  /* tables → stacked cards */
  table.stack thead { display: none; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack tr { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .55rem .75rem; margin-bottom: .6rem; background: var(--surface); }
  table.stack tbody tr:hover td { background: none; }
  table.stack td { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .25rem .75rem; padding: .3rem 0; border: 0; text-align: right; min-width: 0; overflow-wrap: anywhere; }
  table.stack td::before { content: attr(data-label); flex: none; max-width: 45%; text-align: left; font-size: var(--fs-12); font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
  table.stack td[data-label=""]::before { display: none; }
  table.stack td:first-child { display: block; text-align: left; font-weight: 700; padding-bottom: .4rem; border-bottom: 1px solid var(--line-2); margin-bottom: .2rem; }
  table.stack td:first-child::before { display: none; }
  table.stack td input, table.stack td select { max-width: 60%; }
  table.stack td .money-input { max-width: 60%; }
  table.stack td .money-input input { max-width: none; }
  table.stack tr.needs { background: var(--needs-bg); }
  .table-wrap:has(> table.stack) { overflow: visible; }
  /* scrollable one-row tabs/filters/steppers; form choices become an even grid */
  nav.seg, ol.seg, form.seg, div.seg[role=group] { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; scroll-snap-type: x proximity; }
  nav.seg::-webkit-scrollbar, ol.seg::-webkit-scrollbar, form.seg::-webkit-scrollbar, div.seg[role=group]::-webkit-scrollbar { display: none; }
  nav.seg > *, ol.seg > *, form.seg > *, div.seg[role=group] > * { flex: none; scroll-snap-align: start; white-space: nowrap; }
  div.seg:not([role]):not(.seg--quiet) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  div.seg:not([role]) label span { justify-content: center; }
  /* rows: compact categories, transaction rows title|amount then details full width */
  .list__main > form.actions { flex-wrap: nowrap; }
  .list > li > form.actions { flex-wrap: nowrap; gap: .35rem; }
  .list > li > form.actions .btn { padding: .3rem .6rem; }
  .list > li > form.actions .btn--ghost { min-width: 40px; }
  .list__main > form.actions input { flex: 1 1 auto; min-width: 0; max-width: none !important; }
  .list > li:has(> .avatar) { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; column-gap: .7rem; row-gap: .1rem; align-items: center; }
  .list > li:has(> .avatar) > .avatar { grid-row: 1 / span 2; align-self: start; }
  .list > li:has(> .avatar) > .list__main { display: contents; }
  .list > li:has(> .avatar) .list__title { grid-column: 2; grid-row: 1; }
  .list > li:has(> .avatar) > .num { grid-column: 3; grid-row: 1; }
  .list > li:has(> .avatar) .list__sub { grid-column: 2 / -1; grid-row: 2; }
  .list > li:has(> .status, > .chip) { flex-wrap: wrap; }
  .list > li:has(> .status, > .chip) > .list__main { flex: 1 1 100%; }
  .list > li:has(> .btn, > form, > .actions) > .num { margin-left: 0; margin-right: auto; }
  .list__main > div.actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .list__main > div.actions > *, .list__main > div.actions .btn { width: 100%; }
  /* charts: label | value, then the bar full width */
  .hbar { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label val" "track track"; row-gap: .25rem; }
  .hbar__label { grid-area: label; white-space: normal; }
  .hbar__track { grid-area: track; }
  .hbar__val { grid-area: val; text-align: right; }
  .hbar--bva { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label val" "bars bars"; }
  .hbar--bva > span:nth-child(2) { grid-area: bars; }
  .hbar--bva .hbar__track { grid-area: auto; }
  /* key/value lists stack */
  .kv { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .kv dt { margin-top: .5rem; } .kv dd { font-weight: 600; }
  /* console section nav: a navy tab band under the top bar, one scrollable row */
  .console nav.seg[data-mobile-only] { margin: -1.25rem -1rem 1rem; padding: 0 .5rem; gap: 0; background: var(--navy-800); }
  .console nav.seg[data-mobile-only] a { border: 0; border-radius: 0; background: none; color: var(--on-navy-2); min-height: 46px; padding: 0 .85rem; border-bottom: 3px solid transparent; }
  .console nav.seg[data-mobile-only] a[aria-current="page"] { color: #fff; border-bottom-color: var(--turquoise); background: none; }
}
@media (min-width: 340px) and (max-width: 599px) {
  .grid--2:has(> .stat), .grid--3:has(> .stat), .grid--4:has(> .stat) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 359px) {
  .actions > .btn, .actions > form, .actions > a.btn { flex: 1 1 auto; }
}
@media (max-width: 479px) {
  .guide-switch .hide-xs { display: none; }
}

/* ---------------------------------------------------------------- money assistant (chat) */
.asst-fab { position: fixed; right: 16px; bottom: calc(74px + env(safe-area-inset-bottom)); z-index: 35; width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); text-decoration: none;
  box-shadow: 0 10px 26px rgba(13, 81, 128, .38), 0 0 0 3px var(--surface); transition: transform .15s var(--ease), background .15s var(--ease); }
.asst-fab:hover { background: var(--brand-hover); color: var(--brand-ink); transform: translateY(-1px); }
.asst-fab:active { transform: scale(.96); }
.asst-fab svg.i { width: 1.6em; height: 1.6em; }
.asst-dock.is-open .asst-fab { background: var(--navy-800); }
.asst-pop { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; height: min(86vh, 720px); display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--radius) var(--radius) 0 0; box-shadow: var(--shadow-pop); border: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom); }
.asst-pop[hidden] { display: none; }
.asst-pop__head { display: flex; align-items: center; gap: .35rem; padding: .7rem .6rem .7rem .9rem; border-bottom: 1px solid var(--line);
  background: var(--navy-900); color: var(--on-navy); border-radius: var(--radius) var(--radius) 0 0; }
.asst-pop__head .btn--ghost { color: var(--on-navy); min-height: 40px; padding: .4rem .55rem; }
.asst-pop__head .btn--ghost:hover { background: var(--navy-700); color: #fff; }
.asst-pop__head form { margin: 0; }
.asst-pop__mark { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--logo-gradient); flex: none; }
.asst-pop__title { display: flex; flex-direction: column; line-height: 1.2; margin-right: auto; min-width: 0; }
.asst-pop__title span { font-size: var(--fs-12); color: var(--on-navy-2); }
.asst-pop__body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
@media (min-width: 900px) {
  .asst-fab { right: 24px; bottom: 24px; }
  .asst-pop { left: auto; right: 24px; bottom: 92px; width: 400px; height: min(640px, calc(100vh - 130px)); border-radius: var(--radius); }
}
.asst { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.asst__loading { padding: 1rem; color: var(--ink-3); font-size: var(--fs-14); }
.asst__intro { padding: 1rem 1.1rem; overflow-y: auto; }
.asst__intro ul { padding-left: 1.1rem; color: var(--ink-2); margin: 0 0 1rem; }
.asst__intro li { margin-bottom: .4rem; }
.asst__log { flex: 1; min-height: 0; overflow-y: auto; padding: 1rem .9rem .5rem; display: flex; flex-direction: column; gap: .6rem; background: var(--bg); }
.asst__msg { max-width: 88%; padding: .6rem .85rem; border-radius: 14px; font-size: .95rem; line-height: 1.5; overflow-wrap: anywhere; }
.asst__msg p { margin: 0 0 .45rem; } .asst__msg p:last-child { margin-bottom: 0; }
.asst__msg ul, .asst__msg ol { margin: .2rem 0 .45rem; padding-left: 1.2rem; } .asst__msg li { margin-bottom: .2rem; }
.asst__msg a { font-weight: 700; }
.asst__msg--me { align-self: flex-end; background: var(--brand); color: var(--brand-ink); border-bottom-right-radius: 4px; white-space: pre-wrap; }
.asst__msg--bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.asst__msg--note { background: var(--warn-soft); border-color: var(--warn-line); }
.asst__stream { white-space: pre-wrap; }
.asst__status { color: var(--ink-3); font-size: var(--fs-14); font-style: italic; }
.asst__status:empty { display: none; }
.is-pending .asst__status::after { content: "…"; display: inline-block; animation: asst-dots 1.2s steps(4, end) infinite; overflow: hidden; vertical-align: bottom; width: 0; }
@keyframes asst-dots { to { width: 1.2em; } }
@media (prefers-reduced-motion: reduce) { .is-pending .asst__status::after { animation: none; width: auto; } }
.asst__form { border-top: 1px solid var(--line); padding: .6rem .7rem .3rem; background: var(--surface); margin: 0; }
.asst__chips { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .5rem; scrollbar-width: thin; }
.asst__chip { flex: none; border: 1px solid var(--info-line); background: var(--info-soft); color: var(--brand); border-radius: 999px; padding: .4rem .8rem;
  font: inherit; font-size: var(--fs-14); font-weight: 600; cursor: pointer; min-height: 36px; white-space: nowrap; }
.asst__chip:hover { background: var(--brand-soft); }
.asst__compose { display: flex; align-items: flex-end; gap: .5rem; }
.asst__compose textarea { flex: 1; resize: none; min-height: 44px; max-height: 140px; padding: .6rem .75rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  font: inherit; font-size: var(--fs-16); color: var(--ink); background: var(--surface); }
.asst__send { width: 44px; padding: 0; flex: none; }
.asst__foot { margin: 0; padding: .1rem .8rem .6rem; font-size: var(--fs-12); color: var(--ink-3); background: var(--surface); }
.asst-page { padding: 0; overflow: hidden; display: flex; flex-direction: column; height: min(72vh, 760px); }
.asst-page .asst__msg { max-width: 75%; }
@media print { .asst-dock { display: none; } }
/* keep the last content clear of the chat button */
body:has(.asst-dock) .main { padding-bottom: 9.5rem; }
@media (min-width: 900px) { body:has(.asst-dock) .main { padding-bottom: 6.5rem; } }


/* ---------- simplicity pass (2026-12): icon tiles, two-way switch, pace meter, grouped breakdown, key numbers */
.ico { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--brand-soft); color: var(--brand); margin-right: .5rem; vertical-align: middle; flex: none; }
.ico svg.i { width: 16px; height: 16px; vertical-align: 0; }
.ico--in { background: var(--ok-soft); color: var(--ok); } .ico--out { background: var(--bad-soft); color: var(--bad); }
.ico--save { background: var(--violet-soft); color: var(--violet-ink); }
.stat__label:has(.ico) { display: flex; align-items: center; }
.bad { color: var(--bad); }

/* two-way switch: tabs (buttons) or links (a) — one look everywhere */
.switch { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); margin-bottom: 1rem; max-width: 100%; }
.switch[hidden] { display: none; }
.switch > button, .switch > a { display: inline-flex; align-items: center; gap: .45rem; border: 0; background: none; font: inherit; font-weight: 700; font-size: var(--fs-14); color: var(--ink-2); padding: .45rem 1rem; border-radius: 999px; min-height: 40px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s var(--ease), color .15s var(--ease), box-shadow .15s var(--ease); }
.switch > button:hover, .switch > a:hover { color: var(--ink); }
.switch > [aria-selected="true"], .switch > [aria-current="page"] { background: var(--surface); color: var(--navy-logo); box-shadow: 0 1px 2px rgba(3, 21, 34, .08), 0 2px 8px rgba(3, 21, 34, .06); }
.switch > button .num { font-weight: 600; color: var(--ink-3); font-size: var(--fs-12); }
.switch--links { display: flex; width: fit-content; }

/* add-transaction: Expense | Income as one big switch; Transfer / Refund as quiet extras */
.kind-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line-2); margin-bottom: .6rem; }
.kind-switch__opt { position: relative; }
.kind-switch__opt input { position: absolute; opacity: 0; }
.kind-switch__opt span { display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; border-radius: 11px; font-weight: 800; color: var(--ink-2); cursor: pointer; transition: background .15s var(--ease), color .15s var(--ease); }
.kind-switch__opt input:checked + span { background: var(--surface); box-shadow: 0 1px 2px rgba(3, 21, 34, .08), 0 2px 8px rgba(3, 21, 34, .06); }
.kind-switch__opt--expense input:checked + span { color: var(--bad); }
.kind-switch__opt--income input:checked + span { color: var(--ok); }
.kind-switch__opt input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.seg--quiet { align-items: center; margin-bottom: .5rem; }
.seg--quiet label span { gap: .35rem; font-size: var(--fs-12); }

/* pace: budget used vs month gone (the tick marks today) */
.pace { padding: .85rem 1rem; border-radius: var(--radius-sm); background: var(--surface-2); margin-bottom: 1rem; }
.pace .meter { background: var(--surface); }
.meter--marked { position: relative; overflow: visible; }
.meter--marked > span { border-radius: 99px; }
.meter--marked > i { position: absolute; top: -4px; bottom: -4px; left: var(--at); width: 2px; border-radius: 2px; background: var(--navy-logo); }
.meter--on_track > span { background: linear-gradient(90deg, var(--teal), var(--chart-2)); }

/* dashboard: budget items grouped (Home and bills, Food …) */
.bd-groups { display: grid; gap: 0 2rem; align-items: start; }
@media (min-width: 1000px) { .bd-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bd-group { min-width: 0; }
.bd-group { min-width: 0; border-bottom: 1px solid var(--line-2); }
.bd-group__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .1rem 1rem; padding: .7rem .25rem .6rem 1.4rem; cursor: pointer; list-style: none; position: relative; border-radius: var(--radius-xs); }
.bd-group__head::-webkit-details-marker { display: none; }
.bd-group__head::before { content: ""; position: absolute; left: .3rem; top: 1.05rem; width: .45rem; height: .45rem; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(-45deg); transition: transform .15s var(--ease); }
.bd-group[open] > .bd-group__head::before { transform: rotate(45deg); top: .95rem; }
.bd-group__head:hover { background: var(--surface-2); }
.bd-group__head .meter { grid-column: 1 / -1; height: 6px; margin: .2rem 0 0; }
.bd-group__name { font-weight: 800; color: var(--navy-logo); }
.bd-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .15rem .75rem; padding: .55rem .25rem .55rem 1.4rem; border-top: 1px solid var(--line-2); font-size: var(--fs-14); }
.bd-row__name { font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.bd-row__name a { color: var(--ink); text-decoration: none; } .bd-row__name a:hover { color: var(--brand); text-decoration: underline; }
.bd-row__nums { text-align: right; }
.bd-row__left { font-size: var(--fs-12); color: var(--ink-3); }
.bd-row .status { justify-self: end; }
.bd-row .meter { grid-column: 1 / -1; height: 5px; margin: .1rem 0 0; }
.bd-total .num { white-space: normal; }
.bd-total { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem; margin: 1rem 0 0; padding-top: .75rem; border-top: 2px solid var(--line); }

/* analytics: key numbers */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.25rem; }
@media (min-width: 1000px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.kpi__label { font-size: var(--fs-12); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.kpi__value { font-size: 1.3rem; font-weight: 800; color: var(--navy-logo); }
.kpi__value.bad { color: var(--bad); }
.kpi__note { font-size: var(--fs-12); color: var(--ink-3); }
.hbar__fill--in { background: var(--ok-fill); }
@media (max-width: 599px) {
  .switch { display: flex; width: 100%; }
  .switch > button, .switch > a { flex: 1 1 0; justify-content: center; padding: .45rem .5rem; }
  .switch > button .num { display: none; }
  .bd-row { padding-left: .9rem; } .bd-group__head { padding-left: 1.2rem; }
}

/* ---------- Settings → Appearance: three picture choices (the radio stays focusable; the card shows the choice) */
.theme-pick { border: 0; padding: 0; margin: 0 0 .75rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; min-width: 0; }
.theme-pick__opt { position: relative; display: flex; flex-direction: column; gap: .45rem; padding: .5rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.theme-pick__opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.theme-pick__opt:hover { border-color: var(--line-strong); }
.theme-pick__opt:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.theme-pick__opt:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 3px; }
.theme-pick__swatch { position: relative; display: grid; grid-template-rows: 8px 1fr; gap: 4px; height: 56px; padding: 6px; border-radius: 8px; border: 1px solid rgba(125, 144, 158, .35); }
.theme-pick__swatch i { display: block; border-radius: 3px; }
.theme-pick__swatch i:nth-child(3) { position: absolute; left: 12px; bottom: 12px; width: 26%; height: 6px; border-radius: 99px; }
.theme-pick__swatch--light { background: #f4f7fa; } .theme-pick__swatch--light i:nth-child(1) { background: #ffffff; } .theme-pick__swatch--light i:nth-child(2) { background: #ffffff; box-shadow: 0 0 0 1px #d7e2e9; } .theme-pick__swatch--light i:nth-child(3) { background: #0d5180; }
.theme-pick__swatch--dark { background: #07141e; } .theme-pick__swatch--dark i:nth-child(1) { background: #0e1f2c; } .theme-pick__swatch--dark i:nth-child(2) { background: #0e1f2c; box-shadow: 0 0 0 1px #22394a; } .theme-pick__swatch--dark i:nth-child(3) { background: #64b5f2; }
.theme-pick__swatch--system { background: linear-gradient(115deg, #f4f7fa 50%, #07141e 50%); } .theme-pick__swatch--system i:nth-child(1) { background: linear-gradient(115deg, #ffffff 50%, #0e1f2c 50%); } .theme-pick__swatch--system i:nth-child(2) { background: linear-gradient(115deg, #ffffff 50%, #0e1f2c 50%); } .theme-pick__swatch--system i:nth-child(3) { background: linear-gradient(90deg, #0d5180 50%, #64b5f2 50%); }
.theme-pick__name { font-size: var(--fs-14); font-weight: 700; text-align: center; line-height: 1.25; }
@media (max-width: 359px) { .theme-pick__name { font-size: var(--fs-12); } }

/* ---------- Analytics: Bars / Pie switch (static/js/app.js builds the pie from the chart's data-value items) */
.chart { position: relative; }
.chart-kind { display: flex; justify-content: flex-end; gap: 2px; margin: -.25rem 0 .5rem auto; width: max-content; padding: 2px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.chart-kind button { display: inline-flex; align-items: center; gap: .3rem; min-height: 32px; padding: 0 .7rem; border: 0; border-radius: 999px; background: none; color: var(--ink-2); font: inherit; font-size: var(--fs-12); font-weight: 700; cursor: pointer; transition: background .15s var(--ease), color .15s var(--ease); }
.chart-kind button:hover { color: var(--ink); }
.chart-kind button[aria-pressed="true"] { background: var(--surface); color: var(--brand); box-shadow: 0 1px 2px rgba(3, 21, 34, .12); }
.chart-kind .i { width: 1.05em; height: 1.05em; }
.pie { display: grid; grid-template-columns: minmax(0, 168px) minmax(0, 1fr); gap: 1rem 1.25rem; align-items: center; }
.pie__svg { width: 100%; max-width: 168px; height: auto; display: block; transform: rotate(0deg); }
.pie__slice { fill: none; stroke-width: 9; }
.pie--1 { stroke: var(--pie-1); background: var(--pie-1); } .pie--2 { stroke: var(--pie-2); background: var(--pie-2); }
.pie--3 { stroke: var(--pie-3); background: var(--pie-3); } .pie--4 { stroke: var(--pie-4); background: var(--pie-4); }
.pie--5 { stroke: var(--pie-5); background: var(--pie-5); } .pie--6 { stroke: var(--pie-6); background: var(--pie-6); }
.pie--7 { stroke: var(--pie-7); background: var(--pie-7); } .pie--8 { stroke: var(--pie-8); background: var(--pie-8); }
.pie__legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; min-width: 0; }
.pie__legend li > a, .pie__legend li > span { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; column-gap: .5rem; align-items: center; padding: .3rem .35rem; border-radius: var(--radius-xs); color: inherit; text-decoration: none; font-size: .88rem; }
.pie__legend a:hover { background: var(--surface-2); }
.pie__key { width: 12px; height: 12px; border-radius: 3px; }
.pie__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pie__legend b { font-variant-numeric: tabular-nums; }
.pie__amt { grid-column: 2 / 4; font-size: var(--fs-12); color: var(--ink-3); font-variant-numeric: tabular-nums; }
@media (max-width: 479px) { .pie { grid-template-columns: minmax(0, 1fr); justify-items: center; } .pie__legend { width: 100%; } .pie__svg { max-width: 190px; } }
@media (prefers-reduced-motion: no-preference) {
  .pie__slice { animation: wz-pie .5s var(--ease) backwards; animation-delay: calc(var(--i) * 45ms); }
}
@keyframes wz-pie { from { stroke-dasharray: 0 100; } }
@media (max-width: 400px) { .lp-way strong { font-size: .95rem; } .lp-way { padding: .8rem .9rem; gap: .7rem; } }
/* touch screens and phones: the Expenses/Income switch and the Bars/Pie switch get full 44 px targets */
@media (max-width: 899px), (pointer: coarse) {
  .switch > button, .switch > a { min-height: 44px; }
  .chart-kind button { min-height: 44px; padding: 0 .9rem; }
}
