/* ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   TandemTab theme (2026-10-21) — the app's look, as ONE layer over the components' own CSS.

   Owner: the UI "looked too much of an AI work". What made it read that way was a stack of defaults: navy + mint with a
   glow, SHOUTY TRACKED LABELS on every block, one rounded typeface for everything, cents on headline figures. This sheet
   replaces those choices; what the owner liked stays — the green gradients (buttons, the hero, the headline accent,
   progress fills) and the dashboard's donut breakdown:
   · Type: Literata (a bookish serif with lovely figures) for numbers and headings, IBM Plex Sans for the interface.
     Both carry Cyrillic (Quicksand never had it). Tabular figures everywhere money is shown.
   · Colour: warm paper and ink in light; charcoal (not navy) in dark. One deep green with its gradient, the coral for
     spending, amber only for warnings. No outer glows.
   · Hairline borders instead of shadows, a modest radius; sentence-case labels.

   ★ Why a layer and not edits in each component: the old look is spread over thousands of scoped rules; one sheet that
   wins on specificity changes it in one place and stays reviewable. New component CSS should use the tokens below
   (var(--v2-…)) rather than hard-coded colours. The `v2` class on <body> (index.html) is what turns it on.

   ⚠️ Specificity: Blazor scoped rules weigh up to (0,3,1) (`html.dark .x[b-…]`). Every rule here starts with
   `:root body.v2`, which is (0,3,1) as well, and this sheet loads after the scoped bundle — so the tie goes to us.
   ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────── */

@font-face { font-family: 'Literata'; font-style: normal; font-weight: 500 700; font-display: swap;
    src: url('fonts/literata-latin.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: 'Literata'; font-style: normal; font-weight: 500 700; font-display: swap;
    src: url('fonts/literata-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Plex'; font-style: normal; font-weight: 400 600; font-display: swap;
    src: url('fonts/plexsans-latin.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: 'Plex'; font-style: normal; font-weight: 400 600; font-display: swap;
    src: url('fonts/plexsans-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

body.v2 {
    --v2-paper: #f5f2ec; --v2-surface: #fcfbf8; --v2-ink: #1e1c18; --v2-muted: #6e685e; --v2-line: #e4ded3;
    --v2-green: #1e6b4f; --v2-green-soft: #e4eee8; --v2-coral: #c4553b; --v2-amber: #a86a12;
    --v2-serif: 'Literata', Georgia, serif; --v2-sans: 'Plex', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
html.dark body.v2 {
    --v2-paper: #151517; --v2-surface: #1c1c1f; --v2-ink: #ece7df; --v2-muted: #9c968c; --v2-line: #2c2b2f;
    --v2-green: #6cc499; --v2-green-soft: #1d2a23; --v2-coral: #e07a5f; --v2-amber: #e0a24a;
}

/* ── Base ─────────────────────────────────────────────────────────────────────────────────────────────────────────── */
:root body.v2 { font-family: var(--v2-sans); background: var(--v2-paper); color: var(--v2-ink); }
:root body.v2 button, :root body.v2 input, :root body.v2 select, :root body.v2 textarea { font-family: inherit; }
:root body.v2 strong, :root body.v2 .num { font-variant-numeric: tabular-nums; }

/* ── App bar: paper, not a green slab ─────────────────────────────────────────────────────────────────────────────── */
:root body.v2 .app-bar { background: var(--v2-paper); color: var(--v2-ink); box-shadow: none; border-bottom: 1px solid var(--v2-line); }
:root body.v2 .app-bar * { color: inherit; }
:root body.v2 .app-bar .brand-word, :root body.v2 .app-bar .brand-tab { font-family: var(--v2-serif); font-weight: 600; letter-spacing: -.01em; }

/* ── Surfaces: hairlines, modest radius, no shadows ───────────────────────────────────────────────────────────────── */
:root body.v2 .panel, :root body.v2 .card-act, :root body.v2 .home-brk-card, :root body.v2 .home-health,
:root body.v2 .home-alerts, :root body.v2 .acct-bar, :root body.v2 .hdr-top {
    background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 12px; box-shadow: none;
}

/* ── Sentence-case labels instead of SHOUTY TRACKED CAPS ─────────────────────────────────────────────────────────── */
:root body.v2 .bal-label, :root body.v2 .home-alerts-k, :root body.v2 .panel-k, :root body.v2 .sec-k,
:root body.v2 .home-brk-sub, :root body.v2 .home-more-k {
    text-transform: none; letter-spacing: 0; font-size: .86rem; font-weight: 500; color: var(--v2-muted);
}

/* ── The hero: the big serif figure straight on the page, the pace line, the three facts as a quiet row. (A green
   gradient card was tried again on 2026-10-21 and the owner went back to this.) ─────────────────────────────────── */
:root body.v2 .hdr-hero { background: transparent; border: none; box-shadow: none; padding: 6px 2px 4px; }
/* strong.warn-text, not .warn-text (2026-11-07): the figure only. The bare class also caught "€35 in bills due" beside it
   whenever money ran short, drawing that line at 2.5rem as well. */
:root body.v2 .bal-part-main .bal-free-v, :root body.v2 .bal-part-main strong.warn-text {
    font-family: var(--v2-serif); font-weight: 600; font-size: 2.5rem; line-height: 1.05; letter-spacing: -.02em;
    color: var(--v2-ink); background: none; -webkit-text-fill-color: currentColor; text-shadow: none;
}
:root body.v2 .bal-part-main strong.warn-text { color: var(--v2-coral); }
:root body.v2 .bal-say { color: var(--v2-muted); font-size: .95rem; }
:root body.v2 .bal-facts { color: var(--v2-muted); }
:root body.v2 .bal-part:not(.bal-part-main) { border: none; background: transparent; padding-top: 2px; }
:root body.v2 .bal-part:not(.bal-part-main) strong, :root body.v2 .bal-alloc-v {
    font-family: var(--v2-serif); font-weight: 600; font-size: 1.35rem; color: var(--v2-ink);
}
:root body.v2 .bal-sub { color: var(--v2-muted); }
:root body.v2 .hdr-hero hr, :root body.v2 .bal-part + .bal-part { border-color: var(--v2-line); }

/* The month as one line: the fill is the plan spent, the tick is today. */
.v2-pace { margin: 14px 0 6px; }   /* the card's full width (owner, 2026-11-05: it stopped short on a wide screen) */
.v2-pace-track { position: relative; height: 6px; border-radius: 3px; background: var(--v2-line, #e4ded3); }
.v2-pace-used { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--v2-green, #1e6b4f); }
.v2-pace.ahead .v2-pace-used { background: var(--v2-coral, #c4553b); }
.v2-pace-now { position: absolute; top: -5px; width: 2px; height: 16px; margin-left: -1px; background: var(--v2-ink, #1e1c18); }
.v2-pace-cap { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: .8rem; color: var(--v2-muted, #6e685e); }
body:not(.v2) .v2-pace { display: none; }

/* ── Tabs: ink underline, no green fill ───────────────────────────────────────────────────────────────────────────── */
:root body.v2 .tabs button { font-family: var(--v2-sans); font-weight: 500; color: var(--v2-muted); }
:root body.v2 .tabs button.active, :root body.v2 .tabs button.on { color: var(--v2-ink); border-color: var(--v2-ink); }

/* ── Quick actions: plain buttons, no coloured icon tiles ─────────────────────────────────────────────────────────── */
:root body.v2 .card-act { padding: 12px 14px; }
:root body.v2 .card-act > svg, :root body.v2 .card-act .icon {
    background: none !important; color: var(--v2-ink) !important; box-shadow: none; padding: 0; width: 20px; height: 20px;
}
:root body.v2 .card-act-txt b { font-weight: 600; color: var(--v2-ink); }
:root body.v2 .card-act-txt small { color: var(--v2-muted); }
:root body.v2 .card-act-go { color: var(--v2-muted); }

/* ── Needs attention: amber means warning, but quietly ────────────────────────────────────────────────────────────── */
:root body.v2 .home-alert-act { border-radius: 8px; background: transparent; border: 1px solid var(--v2-line); color: var(--v2-ink); }

/* ── Where the money went: the donut stays (owner), its total in the serif ─────────────────────────────────────────── */
:root body.v2 .home-brk-total { font-family: var(--v2-serif); font-weight: 600; fill: var(--v2-ink); }
:root body.v2 .home-brk-sub { fill: var(--v2-muted); }
:root body.v2 .home-brk-title { font-family: var(--v2-serif); font-weight: 600; font-size: 1.1rem; color: var(--v2-ink); }
:root body.v2 .home-brk-dot { border-radius: 2px; }
:root body.v2 .home-brk-cta { color: var(--v2-green); }

/* ── Health score: serif figure, no crown glitter ─────────────────────────────────────────────────────────────────── */
:root body.v2 .home-health strong, :root body.v2 .health-score-v { font-family: var(--v2-serif); color: var(--v2-ink); }

/* ── Landing ─────────────────────────────────────────────────────────────────────────────────────────────────────── */
:root body.v2 .lp { background: var(--v2-paper); color: var(--v2-ink); font-family: var(--v2-sans); }
:root body.v2 .lp-eyebrow-line { display: none; }
:root body.v2 .lp-eyebrow { text-transform: none; letter-spacing: 0; font-size: .95rem; font-weight: 500; color: var(--v2-muted); }
:root body.v2 .lp-headline { font-family: var(--v2-serif); font-weight: 600; letter-spacing: -.025em; color: var(--v2-ink); }
:root body.v2 .lp-accent {
    background: none; -webkit-background-clip: border-box; background-clip: border-box;
    -webkit-text-fill-color: currentColor; color: var(--v2-green); font-style: italic; font-weight: 500;
}
:root body.v2 .lp-sub { color: var(--v2-muted); }
:root body.v2 .lp-cta {
    background: var(--v2-green); color: #fff; border-radius: 10px; box-shadow: none; padding: 15px 26px; filter: none;
}
html.dark body.v2 .lp .lp-cta { color: #10170f; }
:root body.v2 .lp-cta:hover { transform: none; filter: brightness(1.06); box-shadow: none; }
:root body.v2 .lp-cta-arrow { display: none; }
:root body.v2 .lp-cta-text { border-radius: 10px; border-color: var(--v2-line); color: var(--v2-ink); min-height: 0; padding: 14px 24px; }
:root body.v2 .lp-cta-text:hover { background: var(--v2-surface); border-color: var(--v2-ink); }
:root body.v2 .lp-note { color: var(--v2-muted); }
:root body.v2 .lp-note b { color: var(--v2-ink); }
:root body.v2 .lp-note-ico { background: none; color: var(--v2-green); }
/* The ticks are back (owner, 2026-11-05: "there were ticks before, now it looks weird") — an icon per promise, no dots. */
:root body.v2 .lp-trust { color: var(--v2-muted); border-color: var(--v2-line); }
:root body.v2 .lp-trust svg { color: var(--v2-green); }
:root body.v2 .lp-card { border-radius: 12px; box-shadow: none; border: 1px solid var(--v2-line); }
:root body.v2 .lp-sec-h { font-family: var(--v2-serif); font-weight: 600; letter-spacing: -.015em; color: var(--v2-ink); }
:root body.v2 .lp-feat { background: transparent; border: none; border-top: 1px solid var(--v2-line); border-radius: 0; box-shadow: none; }
:root body.v2 .lp-feat-ico { color: var(--v2-green); background: none; }

/* ── Pass 3 (owner: "I liked the green gradients"): the brand gradient comes back where it carries meaning — the
   main buttons, the headline's accent line, the pace and progress fills — deepened to the v2 greens. The calm stays
   everywhere else: paper, serif figures, flat hairline cards, sentence case. No glows. ──────────────────────────── */
/* Light start #1a8159, not #2f9a6e (2026-10-30 a11y): white text on a selected chip or primary button sat on the light
   end at 3.5:1. #1a8159 is 4.85:1, the rest of the ramp 6.4–8.5. */
body.v2 { --v2-grad: linear-gradient(135deg, #1a8159 0%, #1e6b4f 60%, #17573f 100%); --v2-grad-text: linear-gradient(100deg, #1e6b4f 10%, #3aa877 90%); }
html.dark body.v2 { --v2-grad: linear-gradient(135deg, #8fdcb3 0%, #6cc499 55%, #4fb487 100%); --v2-grad-text: linear-gradient(100deg, #8fdcb3 10%, #5fbf8f 90%); }
:root body.v2 .lp-cta { background: var(--v2-grad); }
:root body.v2 .lp-accent {
    background: var(--v2-grad-text); -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}
:root body.v2 .v2-pace-used { background: var(--v2-grad); }
:root body.v2 .v2-pace.ahead .v2-pace-used { background: linear-gradient(90deg, #d97a5a, #c4553b); }
:root body.v2 .home-hc-bar > *, :root body.v2 .home-hc-bar span { background: var(--v2-grad); }

/* ── Pass 2: the page itself, the remaining fonts and caps, wrappers that still carried the old surfaces ─────────── */
:root body.v2 .app-shell { background: var(--v2-paper); }
:root body.v2 .dash, :root body.v2 .firstrun { font-family: var(--v2-sans); color: var(--v2-ink); }
/* Sentence case across Home and its sheets: every uppercase-tracked label goes, not just the ones listed above. */
:root body.v2 .dash * { text-transform: none; letter-spacing: normal; }
:root body.v2 .targets-h { font-family: var(--v2-serif); font-size: 1.1rem; font-weight: 600; color: var(--v2-ink); }
:root body.v2 .targets-h svg { display: none; }
:root body.v2 .action-card, :root body.v2 .action-card.action-card, :root body.v2 .targets-card {
    background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 12px; box-shadow: none;
}
:root body.v2 .action-card .card-act, :root body.v2 .card-act.card-act { background: transparent; color: var(--v2-ink); box-shadow: none; }
/* The assistant: a plain field, not a glowing pill. */
:root body.v2 .ask-shell, :root body.v2 .ask-shell:not(.is-open):hover {
    background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 12px; box-shadow: 0 1px 0 rgba(0,0,0,.04);
}
:root body.v2 .ask-dock-text { color: var(--v2-muted); }
:root body.v2 .ask-dock-ic { color: var(--v2-green); }
/* Health score: the figure in the serif, in ink. */
:root body.v2 .home-health :is(.hs-score, .hs-num, .hs-big, strong) { font-family: var(--v2-serif); color: var(--v2-ink); }
:root body.v2 .hs-verdict { color: var(--v2-ink); }
:root body.v2 .home-hc-score { font-family: var(--v2-serif); font-weight: 600; color: var(--v2-ink); }
:root body.v2 .home-hc-k { font-weight: 500; color: var(--v2-muted); }
:root body.v2 .home-hc-k svg, :root body.v2 .home-hc-k .pro-lock { display: none; }
:root body.v2 .home-hc-bar { height: 4px; }
/* Links in lists read as ink, not a wall of green. */
:root body.v2 .targets-card a, :root body.v2 .targets-card button { color: var(--v2-ink); }

/* ── "Bubbles" (owner, 2026-10-21: "restyle all these bubbles… not that generic"). The tinted-mint pill with green
   text everywhere (.btn-soft: Home's health/runway links, trip and expense actions) becomes a quiet surface with a
   hairline, ink text, the icon carrying the green, figures in the serif — and no crown. The primary one and a
   selected chip wear the brand gradient instead of a flat fill. ─────────────────────────────────────────────────── */
:root body.v2 .btn-soft, html.dark body.v2 .btn-soft {
    background: var(--v2-surface); border: 1px solid var(--v2-line); color: var(--v2-ink);
    border-radius: 10px; font-weight: 500; box-shadow: none;
}
:root body.v2 .btn-soft svg, html.dark body.v2 .btn-soft svg { color: var(--v2-green); }
:root body.v2 .btn-soft:hover, html.dark body.v2 .btn-soft:hover { background: var(--v2-green-soft); border-color: var(--v2-green); }
:root body.v2 .btn-soft.primary, html.dark body.v2 .btn-soft.primary { background: var(--v2-grad); border-color: transparent; color: #fff; }
html.dark body.v2 .btn-soft.primary { color: #10170f; }
:root body.v2 .btn-soft.primary svg, html.dark body.v2 .btn-soft.primary svg { color: inherit; }
:root body.v2 .btn-soft.danger, html.dark body.v2 .btn-soft.danger { color: var(--v2-coral); }
/* Home's one-line links: "Health score" as a label, the score as a figure, the verdict as a quiet note. */
:root body.v2 .home-more-btn { padding: 12px 14px; font-size: .9rem; gap: 10px; }
:root body.v2 .home-more-btn strong { font-family: var(--v2-serif); font-weight: 600; font-size: 1.15rem; color: var(--v2-ink); margin: 0 2px; }
:root body.v2 .home-more-btn .pro-lock, :root body.v2 .home-more-btn .prolock { display: none; }
:root body.v2 .home-more-go { color: var(--v2-muted); }
/* Toggle chips: hairline pills; the selected one wears the gradient. */
:root body.v2 .chip, html.dark body.v2 .chip { background: var(--v2-surface); border-color: var(--v2-line); color: var(--v2-ink); font-weight: 500; }
:root body.v2 .chip.on, html.dark body.v2 .chip.on { background: var(--v2-grad); border-color: transparent; color: #fff; }
html.dark body.v2 .chip.on { color: #10170f; }
:root body.v2 .tag-chip, html.dark body.v2 .tag-chip { background: var(--v2-surface); border-color: var(--v2-line); color: var(--v2-ink); }
:root body.v2 .tag-chip-on, html.dark body.v2 .tag-chip-on { background: var(--v2-green-soft); border-color: var(--v2-green); color: var(--v2-green); }

/* -- Leftover navy (2026-10-22). app.css paints a whole list of surfaces #161b2c in dark; the theme only restyled
      .panel, so a .fund-panel sat as a navy block inside a charcoal card (Wallets), and cards/menus/modals kept navy.
      Every surface in that list takes the theme's colours; a panel nested in a panel is see-through. -- */
html.dark body.v2 .card, html.dark body.v2 .modal, html.dark body.v2 .score-card, html.dark body.v2 .insight,
html.dark body.v2 .win, html.dark body.v2 .row-menu, html.dark body.v2 .acct-menu-pop, html.dark body.v2 .langpick-menu,
html.dark body.v2 .pm, html.dark body.v2 .breakdown-card, html.dark body.v2 .savings-rate-card,
html.dark body.v2 .trend-card, html.dark body.v2 .onboard-card, html.dark body.v2 .consent-card {
    background: var(--v2-surface); border-color: var(--v2-line); color: var(--v2-ink);
}
:root body.v2 .fund-panel, html.dark body.v2 .fund-panel { background: transparent; border: none; }
:root body.v2 .fund-bar { background: var(--v2-line); }
html.dark body.v2 .fund-bar { background: var(--v2-line); }

/* -- A soft green wash at the top of each section card (owner, 2026-10-22: "I miss the green gradient"). Quiet on
      purpose: it fades out within the heading's height, so the rows below read on the plain surface. The hero
      stays flat (owner, 2026-10-21). -- */
:root body.v2 { --v2-wash: linear-gradient(180deg, rgba(47, 154, 110, .10) 0, rgba(47, 154, 110, 0) 150px); }
html.dark body.v2 { --v2-wash: linear-gradient(180deg, rgba(108, 196, 153, .10) 0, rgba(108, 196, 153, 0) 150px); }
:root body.v2 .panel, :root body.v2 .home-brk-card, :root body.v2 .home-health, :root body.v2 .card-act,
html.dark body.v2 .panel, html.dark body.v2 .home-brk-card, html.dark body.v2 .home-health, html.dark body.v2 .card-act {
    background: var(--v2-wash), var(--v2-surface);
}

/* -- Leftover navy in forms (2026-10-22): inputs, the category picker, ghost buttons and the trip row's chips still
      used the old blue-greys in dark. Fields sit on the page colour so they read as wells in a surface card. -- */
html.dark body.v2 input:not([type=checkbox]):not([type=radio]):not([type=range]), html.dark body.v2 select,
html.dark body.v2 textarea, html.dark body.v2 .cat-picker-btn, html.dark body.v2 .tag-new-in {
    /* ⚠️ background-COLOR, never the `background` shorthand (2026-10-23): the shorthand also reset repeat/size/position
       and outranks the controls' own rules, so the bank review's dropdown arrow tiled across its picker in dark. */
    background-color: var(--v2-paper); border-color: var(--v2-line); color: var(--v2-ink);
}
html.dark body.v2 .ghost, html.dark body.v2 .lbl-add { background: var(--v2-surface); border-color: var(--v2-line); color: var(--v2-ink); }
html.dark body.v2 .modal-h-trip { background: transparent; }

/* -- The rest of the old navy, found by scanning every tab in dark (2026-10-22). Tracks and icon tiles take the
      hairline colour, cards the surface. The blue on trip "soon" badges is meaning (trips), so it stays. -- */
html.dark body.v2 .quick-cats, html.dark body.v2 .trip-card.soon, html.dark body.v2 .cat-row.goal-row.has-scene {
    background: var(--v2-surface); border-color: var(--v2-line);
}
html.dark body.v2 .home-hc-bar, html.dark body.v2 .pring-track, html.dark body.v2 .home-coming-ic,
html.dark body.v2 .trip-mark, html.dark body.v2 .view-btn:not(.active) {
    background: var(--v2-line);
}

/* -- The hero gets the wash too (owner, 2026-10-22, reversing the flat hero of 10-21): same green fade as the
      section cards, no card edge, so it still reads as the page's headline rather than another box. -- */
:root body.v2 .hdr-hero, html.dark body.v2 .hdr-hero { background: var(--v2-wash); border-radius: 12px; padding: 14px 14px 6px; }
