/*
    Minimal style: graphite (2026-11-22). The web twin of mobile's Minimal style (ChipIn.Mobile Settings/MinimalStyle.cs):
    every style is already flat (css/minimal-style.css and the html[data-minimal] rules in this folder); Minimal style,
    the default, goes further. Applied only while <html data-minimal="on">.

    The rule, as on mobile: color is a signal and nothing else.
    - Red and amber stay wherever they say over, at risk, late, a loss, a connection to fix, a flagged charge or a
      payment that is pending or owed. Nothing here touches a negative, caution or critical token.
    - What is fine (on track, a gain, paid, income in, a healthy connection) reads in the page's ink (Ink). Two
      exceptions keep a quiet green (--gr-good, 2026-11-22): an Income label (Activity's kind, the Transactions type and
      flow badges, a transaction's flow tag) and a headline profit marked .ci-profit (Investments' total gain and
      Gain/loss %, Holdings' Unrealized gain, Performance's Your return, a security's position gain). A loss there keeps
      its red. Every other amount, including paychecks, income figures, day changes and row gains, stays ink.
    - Section hues on icon glyphs, eyebrows, links and chips are one graphite: ramp step 2 (G2).
    - The couple's colors: you are ramp step 1, your partner step 3 (You, Partner).
    - Kinds and types (a transfer, a manual cash account, a mortgage) are a type, not a signal: ink or the ramp.
    - Charts step down one graphite ramp (--gr-1, near black in light and near white in dark, to --gr-8 near the card),
      the same values as mobile's ChartNeutral1Color..ChartNeutral8Color; css/minimal/charts.css and reports.css draw
      them.
    - What never moves: the AI identity (AI buttons, the AI gradient and orb), the user's accent, tags, brand marks and
      merchant plates (logos, letter plates), the skeletons, the help center's area colors, the sidebar's own color
      coding (Menu layout), the live alert dot, and every category color (the Sankey, category donuts, bars, glyphs and
      budget lines, which the server sends inline).

    Most of it is one token per area, set where the area declares it (each selector out-ranks the area's own light and
    [data-bs-theme="dark"] declarations by one attribute). What a token cannot reach is set by class at the end.
*/

/* ================================================================================================== The ramp */

html[data-minimal="on"] {
    --gr-1: #1C1F26;
    --gr-2: #3E434D;
    --gr-3: #5E6470;
    --gr-4: #7D838F;
    --gr-5: #9BA1AB;
    --gr-6: #B8BCC4;
    --gr-7: #CDD1D7;
    --gr-8: #E0E3E7;
    --gr-good: #15803D;
}

html[data-minimal="on"][data-bs-theme="dark"] {
    --gr-1: #E6E8EC;
    --gr-2: #BCC1CA;
    --gr-3: #959BA7;
    --gr-4: #747A87;
    --gr-5: #5A5F6B;
    --gr-6: #474B55;
    --gr-7: #393C45;
    --gr-8: #2D3038;
    --gr-good: #4ADE80;
}

/* ================================================================================================== Root tokens */
/* :not(#gr) lifts the block over the flat look's own [data-bs-theme="dark"] token blocks (core.css --mn-good). */

html[data-minimal="on"]:not(#gr) {
    /* Ink: what is fine. */
    --mn-good: var(--mn-ink);
    --iv-positive: var(--mn-ink);
    --rp-positive: var(--mn-ink);
    --rc-sig-positive: var(--mn-ink);
    --rc-sig-positive-ink: var(--mn-ink);
    --pd-pos-ink: var(--mn-ink);
    --lx-good: var(--mn-ink);
    --lb-positive: var(--mn-ink);
    --tx-positive: var(--mn-ink);
    --tx-inflow: var(--mn-ink);
    --tx-green: var(--mn-ink);
    --tx-amount-income: var(--mn-ink);
    --st-pay: var(--mn-ink);
    --st-conf-high: var(--mn-ink);
    --sub-positive: var(--mn-ink);
    --adu-positive: var(--mn-ink);
    --acx-positive: var(--mn-ink);
    --mya-positive: var(--mn-ink);
    --psh-positive: var(--mn-ink);
    --upa-positive: var(--mn-ink);
    --emp-positive: var(--mn-ink);
    --sp-positive: var(--mn-ink);
    --dbx-income: var(--mn-ink);
    --rp-income: var(--mn-ink);

    /* G2: section hues on glyphs, eyebrows, links and chips. */
    --iv-green: var(--gr-2);
    --iv-green-strong: var(--gr-2);
    --iv-green-bright: var(--gr-3);
    --iv-icon: var(--gr-2);
    --rp-indigo: var(--gr-2);
    --rp-indigo-strong: var(--gr-2);
    --rp-indigo-bright: var(--gr-3);
    --rp-icon: var(--gr-2);
    --bg-icon: var(--gr-2);
    --lb-icon: var(--gr-2);
    --lb-rose: var(--gr-2);
    --rt-accent: var(--gr-2);
    --rc-sig-info: var(--gr-2);
    --rc-sig-info-ink: var(--gr-2);
    --rc-early: var(--gr-2);
    --pd-accent: var(--gr-2);
    --acx-chip-fg: var(--gr-2);
    --sub-accounts: var(--gr-2);
    --sub-investments: var(--gr-2);
    --sub-reports: var(--gr-2);
    --sub-sharing: var(--gr-2);
    --mya-aqua: var(--gr-2);
    --upa-aqua: var(--gr-2);
    --upa-blue: var(--gr-2);
    --imc-accent-2: var(--gr-2);
    --rp-spending: var(--gr-3);
    --rp-net: var(--gr-1);

    /* You and your partner. */
    --iv-you: var(--gr-1);
    --rp-you: var(--gr-1);
    --st-user: var(--gr-1);
    --psh-user: var(--gr-1);
    --acx-user: var(--gr-1);
    --ci-couple-user: var(--gr-1);
    --lx-you: var(--gr-1);
    --pd-you: var(--gr-1);
    --tx-user: var(--gr-1);
    --sp-user: var(--gr-1);
    --set-user: var(--gr-1);
    --upa-user: var(--gr-1);
    --iv-partner: var(--gr-3);
    --rp-partner: var(--gr-3);
    --st-partner: var(--gr-3);
    --psh-partner: var(--gr-3);
    --acx-partner: var(--gr-3);
    --ci-couple-partner: var(--gr-3);
    --lx-partner: var(--gr-3);
    --pd-partner: var(--gr-3);
    --tx-partner: var(--gr-3);
    --sp-partner: var(--gr-3);
    --set-partner: var(--gr-3);
    --upa-partner: var(--gr-3);
    --mya-partner: var(--gr-3);
    --adu-partner: var(--gr-3);

    /* Kinds and types: a type, not a signal. Transaction flows read in ink; account, manual and activity kinds are
       glyph graphite; liability kinds step down the ramp (they are drawn as slices and bars). */
    --tx-flow-income-text: var(--gr-good);
    --tx-flow-transfer-text: var(--mn-ink);
    --tx-flow-credit-text: var(--mn-ink);
    --tx-flow-loan-text: var(--mn-ink);
    --tx-flow-person-text: var(--mn-ink);
    --tx-flow-from-person-text: var(--mn-ink);
    --tx-flow-support-text: var(--mn-ink);
    --tx-flow-partner-text: var(--mn-ink);
    --dbx-flow-income: var(--gr-good);
    --dbx-flow-transfer: var(--mn-ink);
    --dbx-flow-credit: var(--mn-ink);
    --dbx-flow-loan: var(--mn-ink);
    --acx-k-cash: var(--gr-2);
    --acx-k-invest: var(--gr-2);
    --acx-k-mixed: var(--gr-2);
    --acx-k-other: var(--gr-2);
    --acx-k-credit: var(--gr-2);
    --acx-k-loan: var(--gr-2);
    --mtx-kind-asset: var(--gr-2);
    --mtx-kind-cash: var(--gr-2);
    --mtx-kind-invest: var(--gr-2);
    --mtx-kind-credit: var(--gr-2);
    --mtx-kind-loan: var(--gr-2);
    --iva-kind-buy: var(--gr-2);
    --iva-kind-sell: var(--gr-2);
    --iva-kind-cash: var(--gr-2);
    --iva-kind-contribution: var(--gr-2);
    --iva-kind-income: var(--gr-good);
    --lb-kind-card: var(--gr-1);
    --lb-kind-loan: var(--gr-2);
    --lb-kind-mortgage: var(--gr-3);
    --lb-kind-student: var(--gr-4);
    --lb-kind-auto: var(--gr-5);
    --lb-kind-line: var(--gr-6);
    --lxk-card: var(--gr-1);
    --lxk-loan: var(--gr-2);
    --lxk-mortgage: var(--gr-3);
    --lxk-student: var(--gr-4);
    --lxk-auto: var(--gr-5);
    --lxk-line: var(--gr-6);
}

/* ================================================================================================== Scoped tokens */

html[data-minimal="on"] .dx {
    --dx-pos: var(--mn-ink);
    --dx-pos-ink: var(--mn-ink);
    --dx-green: var(--mn-ink);
    --dx-green-ink: var(--mn-ink);
    --dx-blue: var(--gr-2);
    --dx-blue-ink: var(--gr-2);
    --dx-indigo: var(--gr-2);
    --dx-indigo-ink: var(--gr-2);
    --dx-teal: var(--gr-2);
    --dx-teal-ink: var(--gr-2);
    --dx-fuchsia: var(--gr-2);
    --dx-fuchsia-ink: var(--gr-2);
    --dx-you: var(--gr-1);
    --dx-partner: var(--gr-3);
    --dx-partner-ink: var(--gr-3);
}

html[data-minimal="on"] :is(.admin-accounts-page, section.dbs-sheet.acx-sheet, section.dbs-sheet.chx-sheet) { --acx-positive: var(--mn-ink); }

html[data-minimal="on"] :is(.hx, .hx.hx-accounts, .hx.hx-liabilities, .hx.hx-reports) {
    --hx-hue: var(--gr-2);
    --hx-pos: var(--mn-ink);
}

html[data-minimal="on"] :is(.hsc, .hsc.hs-accounts) { --hs-good: var(--mn-ink); }

html[data-minimal="on"] :is(.ah, .ah.iv-hero, .ah.lb-hero, .ah.rpb-hero, .ah.rp-hero) {
    --ah-positive: var(--mn-ink);
    --ah-badge-fg: var(--gr-2);
}

html[data-minimal="on"] .nwh {
    --iv-icon: var(--gr-2);
}

html[data-minimal="on"] :is(.ss-root, .iv-ss-host, .lb-ss-host) {
    --ss-positive: var(--mn-ink);
    --ss-investment: var(--gr-2);
    --ss-budget: var(--gr-2);
}

html[data-minimal="on"] .txv {
    --txv-pos: var(--mn-ink);
    --txf-income: var(--gr-good);
    --txf-transfer: var(--mn-ink);
    --txf-credit: var(--mn-ink);
    --txv-sky: var(--gr-2);
}

html[data-minimal="on"] .dh { --dh-positive: var(--mn-ink); }
html[data-minimal="on"] :is(.nw-ov, .nw-ov-empty) { --nw-positive: var(--mn-ink); }
html[data-minimal="on"] :is(.fin-rollup-card.fin-preview--bud, .fin-rollup-card.fin-preview--div, .fin-rollup-card.fin-preview--ret) { --fin-accent: var(--gr-2); }
html[data-minimal="on"] .rc-hue { --rc-hue: var(--gr-2); }

/* The header's partner indicator and avatar toggle, the notification center (their own <style> blocks). */
html[data-minimal="on"] .psi-host {
    --psi-user: var(--gr-1);
    --psi-partner: var(--gr-3);
    --psi-accounts: var(--gr-2);
    --psi-transactions: var(--gr-2);
    --psi-recurring: var(--gr-2);
    --psi-cash: var(--gr-2);
    --psi-debt: var(--gr-2);
    --psi-positive: var(--mn-ink);
}

html[data-minimal="on"] .pat-host {
    --pat-user: var(--gr-1);
    --pat-partner: var(--gr-3);
    --pat-live: var(--mn-ink);
}

html[data-minimal="on"] .notification-center {
    --nc-investment: var(--gr-2);
    --nc-budget: var(--gr-2);
}

html[data-minimal="on"] .nc-ss-host {
    --ss-positive: var(--mn-ink);
    --ss-investment: var(--gr-2);
}

/* The All Access crown: plain graphite in every area (the AI buttons keep the AI identity). */
html[data-minimal="on"] :is(.bg-page, .iv-page, .ai-intel-investments, .lb-page, .ai-intel-credit, .rp-page, .settle-page) { --ci-aa-tone: var(--gr-2); }

/* ================================================================================================== By class */
/* What paints a section hue without a token (hard-coded in a scoped sheet). */

/* Green that says something: a headline profit (.ci-profit) and an Income label. */
html[data-minimal="on"] .ci-profit { --iv-positive: var(--gr-good); --mn-good: var(--gr-good); }

html[data-minimal="on"] .txv :is(.txf-badge, .qc-cell-type, .txf-legend).txf-kind-income:not(#mn),
html[data-minimal="on"] .dx .dx-pill.is-flow-income:not(#mn) {
    color: var(--gr-good);
    -webkit-text-fill-color: var(--gr-good);
}

/* What moved it (Reports > Net Worth) is a callout: a gain keeps its green there. */
html[data-minimal="on"] .rp-bridge { --rp-positive: #16A34A; }
html[data-minimal="on"][data-bs-theme="dark"] .rp-bridge { --rp-positive: #22C55E; }

/* Transactions grid: Recurring "Yes" is a fact, not a signal (Pending keeps its amber). */
html[data-minimal="on"] .tx-yn-pill.tx-yn-recurring:not(#mn) { color: var(--mn-ink-2); }

/* Investments > Allocation: parts of a whole on the ramp, largest first (the C# palette sets each slice and its list dot
   inline, so the dots need !important). */
html[data-minimal="on"] .ivo-donut [id$="_Series_0_Point_0"]:not(#mn) { fill: var(--gr-1); }
html[data-minimal="on"] .ivo-donut [id$="_Series_0_Point_1"]:not(#mn) { fill: var(--gr-2); }
html[data-minimal="on"] .ivo-donut [id$="_Series_0_Point_2"]:not(#mn) { fill: var(--gr-3); }
html[data-minimal="on"] .ivo-donut [id$="_Series_0_Point_3"]:not(#mn) { fill: var(--gr-4); }
html[data-minimal="on"] .ivo-donut [id$="_Series_0_Point_4"]:not(#mn) { fill: var(--gr-5); }
html[data-minimal="on"] .ivo-donut [id$="_Series_0_Point_5"]:not(#mn) { fill: var(--gr-6); }
html[data-minimal="on"] .ivo-donut [id$="_Series_0_Point_6"]:not(#mn) { fill: var(--gr-7); }
html[data-minimal="on"] .ivo-donut [id$="_Series_0_Point_7"]:not(#mn) { fill: var(--gr-8); }
html[data-minimal="on"] .ivo-alloc-rows > li:nth-child(1) { --ivo-dot: var(--gr-1) !important; }
html[data-minimal="on"] .ivo-alloc-rows > li:nth-child(2) { --ivo-dot: var(--gr-2) !important; }
html[data-minimal="on"] .ivo-alloc-rows > li:nth-child(3) { --ivo-dot: var(--gr-3) !important; }
html[data-minimal="on"] .ivo-alloc-rows > li:nth-child(4) { --ivo-dot: var(--gr-4) !important; }
html[data-minimal="on"] .ivo-alloc-rows > li:nth-child(5) { --ivo-dot: var(--gr-5) !important; }
html[data-minimal="on"] .ivo-alloc-rows > li:nth-child(6) { --ivo-dot: var(--gr-6) !important; }
html[data-minimal="on"] .ivo-alloc-rows > li:nth-child(7) { --ivo-dot: var(--gr-7) !important; }
html[data-minimal="on"] .ivo-alloc-rows > li:nth-child(8) { --ivo-dot: var(--gr-8) !important; }

/* Smart Signals section chips (Dashboard, Accounts, Investments, Liabilities): the bolt in graphite. */
html[data-minimal="on"] :is(.ss-head-chip, .ss-section-investments .ss-head-chip, .ss-section-liabilities .ss-head-chip):not(#mn) { color: var(--gr-2); }

/* Budgets step bar (plan and line editors): a done stop is an ink dot with its check in the inverse, like a selected
   chip (core.css --mn-sel / --mn-on-sel): a dark dot with a white check in light, a light dot with a dark check in
   dark. Ink, not violet: violet means budget spending and AI. The id lifts it over the hover ring in budgets-area.css. */
html[data-minimal="on"] .bg-step.is-done .bg-step-dot:not(#mn) {
    border-color: var(--mn-sel);
    background: var(--mn-sel);
    color: var(--mn-on-sel);
}
