/*
    Minimal style, Reports (2026-11-22). Every Reports chart is one of three kinds, by what its colors mean:

    - Category charts keep their category colors at full strength, since a category is known by its color: the
      Sankey (Where your money went), By category and Top categories, the category bars and sparklines, Where every
      dollar went, Spending month by month, budget lines, and a drill-down into a category, merchant or account.
    - Callout charts keep the colors that carry their meaning: What moved it, the budget gap's under and over, an
      over-budget period, overspending carried forward, alerts by type, the couple's blue and amber, account kinds.
    - Every other chart is drawn in neutral ink (the Dashboard's ramp, core.css --mn-r1..r6): came in / went out /
      net, net worth over time and by month, bills by month, fees, income by source, budget periods, pace, rollover
      and buckets, palette donuts, sparklines with no color of their own, This month's pace.

    Hooks (Razor): .rp-chart-flow (ReportFlowChart), .rp-chart-networth (ReportNetWorthChart), .rp-chart-neutral
    (ReportColumnChart Neutral), .rp-chart-ramp (ReportStackChart / BudgetReportStackChart Neutral, ReportDonut on
    palette rows), .rp-chart-budget-period / -pace / -rollover / -waterfall. Syncfusion writes series colors as SVG
    attributes, which any CSS rule outranks; the colors matched below are ReportChartTheme / BudgetReportLayout's.
    Loaded after charts.css, whose saturate() filters stop at the Reports charts. Minimal style only (html[data-minimal=
    "on"]), except the hero's shadow and the neutral tone, which are the flat look of every style.
*/

html[data-minimal="on"] {
    --rpn-in: color-mix(in srgb, var(--mn-ink) 50%, transparent);
    --rpn-out: color-mix(in srgb, var(--mn-ink) 22%, transparent);
    --rpn-soft: color-mix(in srgb, var(--mn-ink) 15%, transparent);
    --rpn-line: var(--mn-ink);
    --rpn-quiet: var(--mn-faint);
    --rp-fee: var(--mn-bar);
    --rpb-heat-1: color-mix(in srgb, var(--mn-ink) 7%, transparent);
    --rpb-heat-2: color-mix(in srgb, var(--mn-ink) 14%, transparent);
}

/* ================================================================================================== Full color back */
/* Category and callout charts draw at full strength: no saturate() from charts.css anywhere in Reports. */

html[data-minimal="on"] .rp-chart :is(g[id$="SeriesCollection"], g[id*="SymbolGroup"], g[id$="_chart_legend_collections"], g[id$="_Series_0"]):not(#mn),
html[data-minimal="on"] .rp-sankey .e-sankeychart > svg:not(#mn),
html[data-minimal="on"] .rp-page .ci-blend-bar:not(#mn) {
    filter: none;
}

/* ================================================================================================== Shared gradients */
/* ReportChartDefs' paint: came in and recurring bills the stronger ink, went out and everyday spending the lighter,
   the comparison period fainter still, and the areas (net, net worth, spending) one flat faint wash. */

html[data-minimal="on"] :is(#rp-grad-income-light, #rp-grad-income-dark, #rp-grad-fixed-light, #rp-grad-fixed-dark) stop {
    stop-color: var(--rpn-in);
    stop-opacity: 1;
}

html[data-minimal="on"] :is(#rp-grad-spending-light, #rp-grad-spending-dark, #rp-grad-flexible-light, #rp-grad-flexible-dark) stop {
    stop-color: var(--rpn-out);
    stop-opacity: 1;
}

html[data-minimal="on"] :is(#rp-grad-previous-light, #rp-grad-previous-dark) stop {
    stop-color: var(--rpn-soft);
    stop-opacity: 1;
}

html[data-minimal="on"] :is(#rp-grad-net-area-light, #rp-grad-net-area-dark, #rp-grad-networth-light, #rp-grad-networth-dark,
    #rp-grad-spending-area-light, #rp-grad-spending-area-dark) stop {
    stop-color: var(--mn-chart-area);
    stop-opacity: 1;
}

/* ================================================================================================== Came in / went out */
/* Overview's last 12 months and Cash Flow's week by week: the bars take the gradients above; the net line (or, in
   the bills mix, the came-in line) is ink, its markers ringed in ink. */

html[data-minimal="on"] .rp-chart-flow path[id$="_Series_2"]:not(#mn),
html[data-minimal="on"] .rp-chart-flow [id*="_Series_2_Point_"][id$="_Symbol"]:not(#mn),
html[data-minimal="on"] .rp-chart-flow [id$="_chart_legend_shape_2"]:not(#mn) {
    stroke: var(--rpn-line);
}

/* ================================================================================================== Net worth */
/* Over time: the line ink over the flat wash, the window before it the comparison grey. Breakdown keeps the account
   kinds' colors (cash, investments, cards, loans) with the net worth line in ink through them. */

html[data-minimal="on"] .rp-chart-networth :is([stroke="#A5B4FC" i], [stroke="#4F46E5" i]):not(#mn) {
    stroke: var(--rpn-line);
}

html[data-minimal="on"] .rp-chart-networth [id*="legend_shape"][fill^="url(#rp-grad-networth"]:not(#mn) {
    fill: var(--rpn-line);
    stroke: var(--rpn-line);
}

/* ================================================================================================== Neutral columns */
/* Net worth month by month, bills by month, fees, a drill-down with no color of its own: in-window columns the
   stronger ink, out-of-window and partial ones (drawn at 45% or 32%) faint, a line over them in ink. Up or down
   reads from the zero line, not from a color. */

html[data-minimal="on"] .rp-chart-neutral g[id$="SeriesGroup0"] path[id*="_Point_"]:not(#mn),
html[data-minimal="on"] .rp-chart-neutral [id$="_chart_legend_shape_0"]:not(#mn) {
    fill: var(--rpn-in);
    stroke: none;
}

html[data-minimal="on"] .rp-chart-neutral g[id$="SeriesGroup0"] path[id*="_Point_"]:is([fill$="73" i], [fill$="52" i]):not(#mn) {
    fill: var(--rpn-soft);
}

html[data-minimal="on"] .rp-chart-neutral path[id$="_Series_1"]:not(#mn),
html[data-minimal="on"] .rp-chart-neutral [id*="_Series_1_Point_"][id$="_Symbol"]:not(#mn),
html[data-minimal="on"] .rp-chart-neutral [id$="_chart_legend_shape_1"]:not(#mn) {
    stroke: var(--rpn-line);
}

/* ================================================================================================== The ink ramp */
/* Layers and slices with no color of their own (income by source, the plan's buckets, bills and buckets donuts),
   in order: the first and largest the darkest ink, then lighter, the rest the faintest. */

html[data-minimal="on"] .rp-chart-ramp {
    --rpn-l0: var(--mn-r1);
    --rpn-l1: var(--mn-r2);
    --rpn-l2: var(--mn-r3);
    --rpn-l3: var(--mn-r4);
    --rpn-l4: var(--mn-r5);
    --rpn-l5: var(--mn-r6);
    --rpn-l6: var(--mn-r-other);
}

/* Stacked columns start a step lighter than the ring, so a tall stack reads as calm as the came in / went out bars. */
html[data-minimal="on"] .rp-chart-ramp:not(.rp-donut) {
    --rpn-l0: var(--mn-r2);
    --rpn-l1: var(--mn-r3);
    --rpn-l2: var(--mn-r4);
    --rpn-l3: var(--mn-r5);
    --rpn-l4: var(--mn-r6);
    --rpn-l5: var(--mn-r-other);
}

html[data-minimal="on"] .rp-chart-ramp:not(.rp-donut) g[id$="SeriesGroup0"] path:not(#mn), html[data-minimal="on"] .rp-chart-ramp [id$="_chart_legend_shape_0"]:not(#mn) { fill: var(--rpn-l0); stroke: var(--rpn-l0); }
html[data-minimal="on"] .rp-chart-ramp:not(.rp-donut) g[id$="SeriesGroup1"] path:not(#mn), html[data-minimal="on"] .rp-chart-ramp [id$="_chart_legend_shape_1"]:not(#mn) { fill: var(--rpn-l1); stroke: var(--rpn-l1); }
html[data-minimal="on"] .rp-chart-ramp:not(.rp-donut) g[id$="SeriesGroup2"] path:not(#mn), html[data-minimal="on"] .rp-chart-ramp [id$="_chart_legend_shape_2"]:not(#mn) { fill: var(--rpn-l2); stroke: var(--rpn-l2); }
html[data-minimal="on"] .rp-chart-ramp:not(.rp-donut) g[id$="SeriesGroup3"] path:not(#mn), html[data-minimal="on"] .rp-chart-ramp [id$="_chart_legend_shape_3"]:not(#mn) { fill: var(--rpn-l3); stroke: var(--rpn-l3); }
html[data-minimal="on"] .rp-chart-ramp:not(.rp-donut) g[id$="SeriesGroup4"] path:not(#mn), html[data-minimal="on"] .rp-chart-ramp [id$="_chart_legend_shape_4"]:not(#mn) { fill: var(--rpn-l4); stroke: var(--rpn-l4); }
html[data-minimal="on"] .rp-chart-ramp:not(.rp-donut) g[id$="SeriesGroup5"] path:not(#mn), html[data-minimal="on"] .rp-chart-ramp [id$="_chart_legend_shape_5"]:not(#mn) { fill: var(--rpn-l5); stroke: var(--rpn-l5); }
html[data-minimal="on"] .rp-chart-ramp:not(.rp-donut) :is(g[id$="SeriesGroup6"], g[id$="SeriesGroup7"], g[id$="SeriesGroup8"]) path:not(#mn),
html[data-minimal="on"] .rp-chart-ramp :is([id$="_chart_legend_shape_6"], [id$="_chart_legend_shape_7"], [id$="_chart_legend_shape_8"]):not(#mn) { fill: var(--rpn-l6); stroke: var(--rpn-l6); }

/* The ring: slices by index, keeping the hairline between them in the card's color. */
html[data-minimal="on"] .rp-chart-ramp.rp-donut [id$="_Series_0_Point_0"]:not(#mn) { fill: var(--rpn-l0); }
html[data-minimal="on"] .rp-chart-ramp.rp-donut [id$="_Series_0_Point_1"]:not(#mn) { fill: var(--rpn-l1); }
html[data-minimal="on"] .rp-chart-ramp.rp-donut [id$="_Series_0_Point_2"]:not(#mn) { fill: var(--rpn-l2); }
html[data-minimal="on"] .rp-chart-ramp.rp-donut [id$="_Series_0_Point_3"]:not(#mn) { fill: var(--rpn-l3); }
html[data-minimal="on"] .rp-chart-ramp.rp-donut [id$="_Series_0_Point_4"]:not(#mn) { fill: var(--rpn-l4); }
html[data-minimal="on"] .rp-chart-ramp.rp-donut [id$="_Series_0_Point_5"]:not(#mn) { fill: var(--rpn-l5); }
html[data-minimal="on"] .rp-chart-ramp.rp-donut :is([id$="_Series_0_Point_6"], [id$="_Series_0_Point_7"]):not(#mn) { fill: var(--rpn-l6); }

/* ================================================================================================== Budgets */
/* Budgeted against spent: budgeted a faint column with a light edge, spent the stronger ink (the current period
   lighter); a period that went over stays red. The health line is ink and its axis quiet. */

html[data-minimal="on"] .rp-chart-budget-period g[id$="SeriesGroup0"] path[id*="_Point_"]:not(#mn),
html[data-minimal="on"] .rp-chart-budget-period [id$="_chart_legend_shape_0"]:not(#mn) {
    fill: var(--rpn-soft);
    stroke: var(--rpn-out);
}

html[data-minimal="on"] .rp-chart-budget-period g[id$="SeriesGroup1"] path:is([fill="#A5B4FC" i], [fill="#4F46E5" i]):not(#mn),
html[data-minimal="on"] .rp-chart-budget-period [id$="_chart_legend_shape_1"]:not(#mn) {
    fill: var(--rpn-in);
    stroke: none;
}

html[data-minimal="on"] .rp-chart-budget-period g[id$="SeriesGroup1"] path:is([fill="#A5B4FC99" i], [fill="#4F46E599" i]):not(#mn) {
    fill: var(--rpn-out);
}

html[data-minimal="on"] .rp-chart-budget-period path[id$="_Series_2"]:not(#mn),
html[data-minimal="on"] .rp-chart-budget-period [id*="_Series_2_Point_"][id$="_Symbol"]:not(#mn),
html[data-minimal="on"] .rp-chart-budget-period [id$="_chart_legend_shape_2"]:not(#mn) {
    stroke: var(--rpn-line);
}

html[data-minimal="on"] .rp-chart-budget-period text:is([fill="#F0ABFC" i], [fill="#A21CAF" i]):not(#mn) {
    fill: var(--mn-sub);
}

/* Pace: spent so far an ink line over the flat wash, even pace the grey dash it already is, where it's heading a
   quieter dotted ink. */
html[data-minimal="on"] .rp-chart-budget-pace :is([fill="#A5B4FC38" i], [fill="#4F46E538" i]):not(#mn) {
    fill: var(--mn-chart-area);
}

html[data-minimal="on"] .rp-chart-budget-pace :is([stroke="#A5B4FC" i], [stroke="#4F46E5" i]):not(#mn) {
    stroke: var(--rpn-line);
}

html[data-minimal="on"] .rp-chart-budget-pace [id$="_chart_legend_shape_0"]:not(#mn) {
    fill: var(--rpn-line);
    stroke: var(--rpn-line);
}

html[data-minimal="on"] .rp-chart-budget-pace :is([stroke="#C4B5FD" i], [stroke="#7C3AED" i]):not(#mn) {
    stroke: var(--rpn-quiet);
}

html[data-minimal="on"] .rp-chart-budget-pace [id$="_chart_legend_shape_2"]:not(#mn) {
    fill: var(--rpn-quiet);
    stroke: var(--rpn-quiet);
}

/* Rollover: unspent carried forward the stronger ink, overspending carried forward stays red, rolled in an ink line. */
html[data-minimal="on"] .rp-chart-budget-rollover g[id$="SeriesGroup0"] path:not(#mn),
html[data-minimal="on"] .rp-chart-budget-rollover [id$="_chart_legend_shape_0"]:not(#mn) {
    fill: var(--rpn-in);
    stroke: none;
}

html[data-minimal="on"] .rp-chart-budget-rollover path[id$="_Series_2"]:not(#mn),
html[data-minimal="on"] .rp-chart-budget-rollover [id*="_Series_2_Point_"][id$="_Symbol"]:not(#mn),
html[data-minimal="on"] .rp-chart-budget-rollover [id$="_chart_legend_shape_2"]:not(#mn) {
    stroke: var(--rpn-line);
}

/* Where the gap came from: a callout, so under (green) and over (red) keep their colors; the totals go ink. */
html[data-minimal="on"] .rp-chart-budget-waterfall path:is([fill="#A5B4FC" i], [fill="#4F46E5" i], [fill="#00BDAE" i]):not(#mn) {
    fill: var(--rpn-in);
}

/* Every line's periods and the board key: a fine period is ink, nearing and over keep amber and red. */
html[data-minimal="on"] .rpb-period.rp-tone-positive:not(#mn) { --rp-tone: var(--mn-sub); }
html[data-minimal="on"] .rpb-board-key-col i:nth-child(1):not(#mn) { background: var(--mn-sub); }

/* ================================================================================================== HTML pieces */

/* The Reports hero: no indigo glow under the panel. */
html[data-minimal] .hx.hx-reports {
    --hx-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px -18px rgba(15, 23, 42, .18);
}

/* This month's pace (Overview, beside the hero): spent an ink bar, ahead of last month a faint hatch, last month's
   mark and the day line ink. */
html[data-minimal="on"] .hx.hx-reports:not(#mn) {
    --rp2-spent-1: var(--mn-bar);
    --rp2-spent-2: var(--mn-bar);
    --rp2-ahead: color-mix(in srgb, var(--mn-ink) 20%, transparent);
    --rp2-last: var(--mn-ink);
    --rp2-rail: var(--mn-track);
}

html[data-minimal="on"] .rp-pace2-track .rp-pace2-spent:not(#mn) { box-shadow: none; }
html[data-minimal="on"] .rp-pace2-dayline > span:not(#mn) { background: var(--mn-ink); }

/* Sparklines with no color of their own (the pinned glances, stat tiles) are ink; a category's, an account kind's
   (--rp-acct) and an Explore pick's (its tone) keep theirs. */
html[data-minimal="on"] .rp-spark:not(.rp-nw-spark):not(.rpx-pick-spark) { --rp-spark: var(--mn-ink); }

/* The neutral tone (a new merchant, a plain finding, an Explore pick that's just information) is ink, not indigo:
   no colored edge or wash on its finding card. Negative, caution and positive keep their colors. */
html[data-minimal] .rp-page .rp-tone-neutral { --rp-tone: var(--mn-sub); --rp-tone-soft: var(--mn-well); }

html[data-minimal] .rp-finding.rp-tone-neutral:not(#mn) {
    --rp-finding-wash: 0%;
    border-color: var(--rp-tile-border);
    border-left-width: 1px;
    padding-left: 17px;
}

/* Spending rhythm (Patterns): ink bars. */
html[data-minimal="on"] :is(.rp-rhythm-track, .rp-rhythm-track.is-strong) > span:not(#mn) { background: var(--mn-bar); }

/* A selected Briefings filter's count and glyph: the inverse pill in css/minimal/core.css (Selected chips). */

/* Income: each source's edge, glyphs and share bar in plain ink (!important: the source's color is an inline custom
   property). The list covers the window and the chart twelve months, so their orders differ: one ink, not the ramp. */
html[data-minimal="on"] .rp-sources .rp-source { --rp-source: var(--mn-bar) !important; }

/* ================================================================================================== Cash calendar */
/* Days stay neutral: the spending ink ramp (areas.css), no border on any day. A day that brought in more than it
   spent shows its date in green; a payday carries its $ (reports-pages.css) in the top right; today is ringed in ink. */

html[data-minimal="on"] .rp-cal-day.is-in:not(#mn) {
    background: var(--rp-heat-0);
    box-shadow: none;
    color: var(--mn-good);
    font-weight: 700;
}

html[data-minimal="on"] .rp-cal-day.is-today:not(#mn) { outline: 1.5px solid var(--mn-ink); outline-offset: -1.5px; }

html[data-minimal="on"] .rp-cal-legend .rp-cal-day.is-in:not(#mn)::after {
    content: "1";
    font-size: 9px;
    line-height: 1;
}
