/*
    The flat look (2026-11-20; every style since 2026-11-22). The web twin of the mobile app's flat look
    (ChipIn.Mobile Settings/FlatStyle.cs): what the Minimal style switch drew until 2026-11-22 is now the look of every
    style. App.razor always writes data-minimal on <html> before the first paint ("on", or "off" when this browser
    stored minimalStyle: false under "chipin.a11y"; js/site-preferences.js), and every rule here starts with
    html[data-minimal], which matches either value. Minimal style (data-minimal="on", the default) goes further: charts
    and figures go graphite (css/minimal/graphite.css, charts.css, reports.css and the chart rules in areas.css).
    Loaded after charts-neutral.css.

    The rule, as on mobile:
    - Heroes, section cards, sheets and tiles are one flat, neutral surface with one quiet hairline. No area gradients,
      radial glows, corner washes or hue-tinted borders behind content. The area hue lives only in icons, numbers and
      chart lines.
    - Tiles sit one step off their card: a faint grey well in light, a step darker than the card in dark, faint edge.
    - Status pills are neutral: the icon (and a figure that carries meaning) keeps its tone, the pill does not.
    - Shared controls go flat too: the default button and the segmented menus lose their sheen.
    - What never moves: charts (lines, area fills, bars that encode data, rings, gauges, scales), the AI identity
      (AI buttons, the AI gradient and orb), the couple's colors (user / partner glows, split cards, couple bars),
      anything that needs the user (a bank connection to fix, Check now, an over-budget or at-risk alert keeps its
      tone), the selected-item check with its slight gradient, and the sidebar's own color coding (Menu layout).
    - Minimal style off (data-minimal="off"): this flat look, with every chart in its full colors (the heroes' lines
      and areas, data bars, rings and keys).

    Every selector starts with html[data-minimal], so it outranks the area sheets' own rules (including their
    [data-bs-theme="dark"] variants and the scoped .razor.css rules). Tokens that hold a gradient are replaced with a
    flat linear-gradient(c, c), never a bare color, because several are layered (var(--x) padding-box, ...) where only
    the last layer may be a color.
*/

/* ================================================================================================== Palette */

html[data-minimal] {
    --min-surface: #FFFFFF;
    --min-sheet: #FFFFFF;
    --min-line: #E3E6EC;
    --min-line-strong: #D3D7DF;
    --min-tile: #F6F7F9;
    --min-tile-hover: #F0F1F4;
    --min-tile-line: #ECEEF2;
    --min-pill: rgba(15, 23, 42, .045);
    --min-pill-line: rgba(15, 23, 42, .08);
    --min-ink: #0B0F19;
    --min-muted: #565973;
    --min-flat-surface: linear-gradient(var(--min-surface), var(--min-surface));
    --min-flat-tile: linear-gradient(var(--min-tile), var(--min-tile));
    --min-flat-line: linear-gradient(var(--min-line), var(--min-line));
    --min-flat-clear: linear-gradient(transparent, transparent);
}

html[data-minimal][data-bs-theme="dark"] {
    --min-surface: #151B28;
    --min-sheet: #10131C;
    --min-line: #2B3045;
    --min-line-strong: #363C52;
    --min-tile: #121826;
    --min-tile-hover: #171F30;
    --min-tile-line: #232A3A;
    --min-pill: rgba(255, 255, 255, .06);
    --min-pill-line: rgba(255, 255, 255, .09);
    --min-ink: #E6E8F2;
    --min-muted: #A3A9C0;
}

/* ================================================================================================== Shared controls */

/* The default button: one flat fill (the gradient's middle), as the mobile clean button under Minimal style. */
html[data-minimal] { --ci-btn-fill: linear-gradient(#2F323A, #2F323A); }
html[data-minimal][data-bs-theme="dark"] { --ci-btn-fill: linear-gradient(rgba(255, 255, 255, .21), rgba(255, 255, 255, .21)); }

/* Segmented menus: a flat recess and a flat selected pill (Transactions, Investments, Budgets dialogs, system admin). */
html[data-minimal] {
    --tx-seg-recess: linear-gradient(rgba(11, 15, 25, .055), rgba(11, 15, 25, .055));
    --tx-seg-pill: linear-gradient(#FFFFFF, #FFFFFF);
    --tx-seg-arrow-bg: linear-gradient(#FFFFFF, #FFFFFF);
    --iv-sel: linear-gradient(rgba(11, 15, 25, .06), rgba(11, 15, 25, .06));
    --adu-sel: linear-gradient(rgba(11, 15, 25, .06), rgba(11, 15, 25, .06));
}

html[data-minimal][data-bs-theme="dark"] {
    --tx-seg-recess: linear-gradient(rgba(0, 0, 0, .2), rgba(0, 0, 0, .2));
    --tx-seg-pill: linear-gradient(rgba(255, 255, 255, .1), rgba(255, 255, 255, .1));
    --tx-seg-arrow-bg: linear-gradient(#26292F, #26292F);
    --iv-sel: linear-gradient(rgba(255, 255, 255, .1), rgba(255, 255, 255, .1));
    --adu-sel: linear-gradient(rgba(255, 255, 255, .1), rgba(255, 255, 255, .1));
}

html[data-minimal] .e-dialog.tx-dialog.hiw-dialog { --hiw-current: linear-gradient(rgba(11, 15, 25, .055), rgba(11, 15, 25, .055)); }
html[data-minimal][data-bs-theme="dark"] .e-dialog.tx-dialog.hiw-dialog { --hiw-current: linear-gradient(rgba(255, 255, 255, .07), rgba(255, 255, 255, .07)); }

/* The AI card's corner glow in every Reports-style row (the card itself and its AI button keep the AI identity). */
html[data-minimal] :is(.ci-row, .ci-main, .ci-rail, .ci-col, .rp-col, .rp-intel-brief) > .rp-ai-card { background-image: none; }

/* Financial Intelligence (AI Assist): the grey chart cards and starter prompts lose their vertical fade. The request
   bubble, the AI buttons and the thinking orb keep the AI identity. */
html[data-minimal] {
    --ai-chart-card-bg: linear-gradient(#FAFAFB, #FAFAFB);
    --ai-starter-bg: linear-gradient(#F5F6F8, #F5F6F8);
    --ai-starter-bg-hover: linear-gradient(#EFF1F4, #EFF1F4);
}

html[data-minimal][data-bs-theme="dark"] {
    --ai-chart-card-bg: linear-gradient(rgba(255, 255, 255, .022), rgba(255, 255, 255, .022));
    --ai-starter-bg: linear-gradient(rgba(255, 255, 255, .035), rgba(255, 255, 255, .035));
    --ai-starter-bg-hover: linear-gradient(rgba(255, 255, 255, .055), rgba(255, 255, 255, .055));
}

/* The signed-in shell (AdminLayout): the sidebar as one flat panel without its corner glows and diagonal sheen, and the
   page without the glow it picked up at its top left. The menu's own color coding (Menu layout) is untouched. */
html[data-minimal] .admin-sidebar { background: rgba(250, 250, 251, .94); }
html[data-minimal][data-bs-theme="dark"] .admin-sidebar { background: #131823; }
html[data-minimal] .admin-sidebar::before { display: none; }
html[data-minimal] .admin-shell > .admin-main { background-image: none; }

/* Hero side panes on every .hx hero (Where the payoff leads on Liabilities, This month's pace and Where the pace leads
   on Reports): the hero's plain surface and hairline, neutral tiles, no corner glows, blur or tinted shadow. The pace
   line and its stops keep their colors (they are the chart). */
html[data-minimal] .hx .hx-side.rp-nwp,
html[data-minimal] .hx .hx-side.rp-pace2 {
    border-color: var(--min-line);
    background: var(--min-surface);
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

html[data-minimal] .hx .hx-side.rp-nwp .rp-nwp-tile,
html[data-minimal] .hx .hx-side.rp-pace2 .rp-pace2-legend > div {
    border-color: var(--min-tile-line);
    background: var(--min-tile);
}

html[data-minimal] .rp-nwp-goal { background: var(--min-tile); }
html[data-minimal] .rp-nwp-chip,
html[data-minimal] .rp-nwp-fill { box-shadow: none; }

/* The figure loses its ink-into-hue text gradient (it stays clipped to the text, in plain ink). */
html[data-minimal] .rp-nwp-figure strong {
    background: linear-gradient(var(--hx-ink), var(--hx-ink));
    -webkit-background-clip: text;
    background-clip: text;
}

/* ================================================================================================== Dashboard */

/* Modern dashboard: the onboarding card without its accent glow. (The hero panel and page glow: charts-neutral.css.) */
html[data-minimal] .dx-onboard,
html[data-minimal] .dx-onboard.is-complete {
    border-color: var(--dx-line);
    background: var(--dx-panel-solid);
}

html[data-minimal][data-bs-theme="dark"] .dx { --dx-panel: linear-gradient(#0F1421, #0F1421); }

/* Smart Signals (every rail: Dashboard, Accounts, Liabilities, Investments): the section is a plain card. */
html[data-minimal] .ss-section {
    border-color: var(--ss-border);
    background: var(--ss-surface);
}

/* Classic dashboard hero (DashboardOverview) */
html[data-minimal] .dh {
    --dh-bg: var(--min-surface);
    --dh-border: var(--min-line);
    --dh-value-pill: transparent;
    --dh-pill: var(--min-pill);
    --dh-range-bg: var(--min-pill);
    --dh-tiles-bg: transparent;
}

/* Classic dashboard: the Budgets, Dividends and Retirement preview cards. */
html[data-minimal] .fin-rollup-card.fin-preview--bud,
html[data-minimal] .fin-rollup-card.fin-preview--div,
html[data-minimal] .fin-rollup-card.fin-preview--ret {
    --fp-pill-border: var(--min-pill-line);
    --fp-tile-border: var(--min-tile-line);
    --fp-pill-bg: var(--min-pill);
    --fp-tile-bg: var(--min-tile);
    border-color: var(--min-line);
    background: var(--min-surface);
}

/* Bills before payday's safe-to-spend banner keeps its status color, as one flat tone (no sheen). */
html[data-minimal] .fin-rollup-card.fin-preview--bills .fin-bills-safe { background: #6B7280; }
html[data-minimal] .fin-rollup-card.fin-preview--bills .fin-bills-safe.is-safe { background: #EAF3FF; }
html[data-minimal][data-bs-theme="dark"] .fin-rollup-card.fin-preview--bills .fin-bills-safe.is-safe { background: #182E50; }
html[data-minimal] .fin-rollup-card.fin-preview--bills .fin-bills-safe.is-caution { background: #C98300; }
html[data-minimal] .fin-rollup-card.fin-preview--bills .fin-bills-safe.is-tight { background: #E4640A; }
html[data-minimal] .fin-rollup-card.fin-preview--bills .fin-bills-safe.is-danger { background: #E0352B; }

/* ================================================================================================== Accounts */

html[data-minimal] {
    --acx-manage-bg: var(--min-flat-surface);
}

/* Account detail sheets: one flat sheet color instead of the area hue fading in from the top. */
html[data-minimal] section.dbs-sheet.acx-sheet,
html[data-minimal] section.dbs-sheet.acx-sheet--liabilities,
html[data-minimal] section.dbs-sheet.acx-sheet--investments,
html[data-minimal] section.dbs-sheet.acx-sheet--manual {
    --acx-sheet-bg: linear-gradient(var(--min-sheet), var(--min-sheet));
}

/* Settings > My Accounts: the account sheets and the connection choices. A connection with an issue (.mya-issue) and
   the connection health banner and sheet keep their tone: they need the user. */
html[data-minimal] section.dbs-sheet.mya-sheet { background: var(--mya-panel-bg); }
html[data-minimal] .mya-choice::before { display: none; }

/* ================================================================================================== Budgets */
/* Budgets is toned down furthest: no category glows on the lines, no green fill on the selected plan section, neutral
   status pills (the icon keeps its tone), flat bars and neutral period cards. The fuchsia stays in the icons. */

html[data-minimal] {
    --bg-hero-bg: var(--min-flat-surface);
    --bg-hero-border: var(--min-line);
    --bg-line-glow: 0%;
    --bg-ai-soft: var(--min-tile);
    --bg-glass: var(--min-tile);
    --bg-glass-border: var(--min-tile-line);
}

html[data-minimal] .bg-line { background: var(--rp-card); }

html[data-minimal] .bg-bucket:hover { border-color: var(--min-line-strong); }

html[data-minimal] .bg-bucket.is-selected,
html[data-minimal] .bg-bucket.is-selected:hover {
    border-color: var(--rp-card-border);
    background: var(--ci-selected-fill), var(--rp-card);
}

/* Status and insight pills (Great, 0 over, 2 at risk, Under pace, On track) and the category matcher pill. */
html[data-minimal] .bg-pill,
html[data-minimal] .bg-pill-status,
html[data-minimal] .bg-pill-matcher {
    border-color: var(--min-pill-line);
    background: var(--min-pill);
    color: var(--rp-text);
}

html[data-minimal] .bg-pill .tx-glyph { color: var(--rp-tone); }
html[data-minimal] .bg-pill-matcher,
html[data-minimal] .bg-pill-matcher .tx-glyph { color: var(--rp-muted); }
html[data-minimal] button.bg-pill:not(:disabled):hover { box-shadow: none; border-color: var(--min-line-strong); }

/* The hero's Watch this period rows: neutral tiles; the at-risk wording under each keeps its tone. */
html[data-minimal] .bgh-watch-row,
html[data-minimal] .bgh-watch-clear {
    border-color: var(--min-tile-line);
    background: var(--min-tile);
}

html[data-minimal] .bgh-watch-row:hover,
html[data-minimal] .bgh-watch-row:focus-visible {
    border-color: var(--min-line-strong);
    background: var(--min-tile-hover);
}

/* Coverage chips, the compose options and the month-one steps. */
html[data-minimal] .bcv-chip,
html[data-minimal] .bcv-chip-more {
    border-color: var(--min-pill-line);
    background: var(--min-pill);
}

html[data-minimal] .bcv-chip:hover,
html[data-minimal] .bcv-chip:focus-visible,
html[data-minimal] .bcv.is-open > .bcv-chip {
    border-color: var(--min-line-strong);
    background: var(--min-tile-hover);
    box-shadow: none;
}

html[data-minimal] .bg-qa-chip.is-covered { border-color: var(--min-line); }

html[data-minimal] .bg-compose-option:hover:not(:disabled),
html[data-minimal] .bg-compose-option:focus-visible {
    border-color: var(--min-line-strong);
    background: var(--min-tile-hover);
    box-shadow: none;
}

html[data-minimal] .bg-compose-option.is-suggested {
    border-color: var(--min-line-strong);
    background: var(--rp-card);
    box-shadow: none;
}

html[data-minimal] .bg-compose-option-badge { box-shadow: none; }
html[data-minimal] .bg-compose-result { border-color: var(--min-line); }

html[data-minimal] .bg-mo-step {
    border-color: var(--min-tile-line);
    background: var(--min-tile);
}

html[data-minimal] .bg-mo-coach { background: var(--min-tile); }
html[data-minimal] .bg-mo-run:hover { border-color: var(--min-line-strong); }

/* Bars: one flat tone instead of a fade (the colors still say on track / at risk / over). */
html[data-minimal] .bgh-score-fill,
html[data-minimal] .rpb-health-bar,
html[data-minimal] .rpb-period-fill { background: var(--rp-tone); }
html[data-minimal] .bg-pv-meter > span,
html[data-minimal] .bg-pv-bar-fill { background: var(--rp-positive); }
html[data-minimal] .bg-steps-fill { background: var(--tx-primary); }
html[data-minimal] .rpb-split-you { background: var(--rp-you); }
html[data-minimal] .rpb-split-partner { background: var(--rp-partner); }
html[data-minimal] .rpb-axis-col::before { background: none; }

/* Reports > Budgets periods: the current one is marked like any selected item, not in its tone. */
html[data-minimal] .rpb-period:hover:not(:disabled),
html[data-minimal] .rpb-period:focus-visible {
    border-color: var(--min-line-strong);
    background: var(--min-tile-hover);
}

html[data-minimal] .rpb-period.is-current {
    border-color: var(--min-line);
    background: var(--ci-selected-fill);
}

html[data-minimal] .rpb-period.is-current .rpb-period-col { box-shadow: none; }

/* The hero's Plan health pane and its band (Great / Fair / ...): neutral, with the band's dot keeping the tone. The
   chart tags (Budget, Spent, Heading for) take the neutral hairline; their figures keep their tone. */
html[data-minimal] .rp-pace { border-color: var(--rp-card-border); }

html[data-minimal] .rpb-health-band {
    background: var(--min-pill);
    color: var(--rp-text);
}

html[data-minimal] .rpb-health-band::before { background: var(--rp-tone); }
html[data-minimal] .rpb-hero-tag { border-color: var(--min-line); }
html[data-minimal] .rpb-health-col.is-current .rpb-health-track { box-shadow: inset 0 0 0 1px var(--min-line-strong); }
html[data-minimal] .rpb-pill-btn:hover,
html[data-minimal] .rpb-pill-btn:focus-visible { box-shadow: none; }

/* Rebalance: lines without their tone wash, the dialog without its blended top. */
html[data-minimal] .rb-line { background: var(--rp-card); }
html[data-minimal] .rb-line:hover { border-color: var(--min-line-strong); }
html[data-minimal] .rb-root { --rb-blend-bg: linear-gradient(var(--tx-page), var(--tx-page)); }

/* ================================================================================================== Liabilities */

html[data-minimal] {
    --lb-hero-bg: var(--min-flat-surface);
    --lb-border: var(--min-line);
    --lb-hero-tint: transparent;
    --lb-glass: var(--min-flat-tile);
    --lb-glass-glow: 0%;
    --lb-tile: var(--min-tile);
    --lb-tile-strong: var(--min-tile);
    --lbu-glass: var(--min-flat-tile);
}

html[data-minimal] .ln-hero { background: var(--rc-card); }

html[data-minimal] .ln-hero-tiles .ln-tile,
html[data-minimal] .pp-tiles .ln-tile {
    border-color: var(--min-tile-line);
    background: var(--min-tile);
}

/* Liability rows (cards and loans lists): flat chips. */
html[data-minimal] { --lb-row-chip: var(--min-pill); }

/* Credit briefing findings: the tone stays in the left edge and the icon, not in a corner wash. */
html[data-minimal] .lb-cb-finding { background-image: none; }

/* Card spending rules: the tone edge stays, the corner wash goes. */
html[data-minimal] .lbr-card { background: var(--lbr-card-bg); }
html[data-minimal] .lbr-event.is-unread .lbr-event-body { background: var(--lbr-card-bg); }

/* Flat bars in their own tone. (The payoff journey, the utilization scale and the gauges are charts and keep theirs.) */
html[data-minimal] .lb-band-ok,
html[data-minimal] .lb-fill-positive,
html[data-minimal] .ln-split-principal { background: var(--lb-positive); }
html[data-minimal] .lb-band-watch { background: #D97706; }
html[data-minimal] .lb-band-high { background: #EA580C; }
html[data-minimal] .lb-band-over,
html[data-minimal] .lb-share-fill { background: #E11D48; }
html[data-minimal] .lb-fill-accent { background: var(--lb-other); }
html[data-minimal] .lb-fill-negative { background: #DC2626; }
html[data-minimal] .ln-split-interest { background: var(--ln-interest); }
html[data-minimal] .ln-split-escrow { background: var(--ln-escrow); }
html[data-minimal] .ln-steps li.is-focus .ln-rank,
html[data-minimal] .lbf-rank.is-first .ln-rank { background: var(--lb-rose); }
html[data-minimal] .lbf-timeline-fill { background: var(--lb-glow-progress); }
html[data-minimal] .ln-runway-fill { background: var(--lb-rose); }
html[data-minimal] .lxc-rail-track { background: var(--lb-track); }

/* ================================================================================================== Investments */

html[data-minimal] {
    --iv-hero-bg: var(--min-flat-surface);
    --iv-border: var(--min-line);
    --iv-card-border: var(--min-line);
    --iv-mover-top: var(--min-flat-surface);
    --iv-mover-worst: var(--min-flat-surface);
    --ivr-preview-bg: var(--min-flat-tile);
}

html[data-minimal][data-bs-theme="dark"] {
    --iv-card-border: var(--min-line);
}

html[data-minimal] .ivo-inbox::before { display: none; }
html[data-minimal] .ivr-card { background: var(--ivr-card-bg); }
html[data-minimal] .ivr-sheet { background: var(--ivr-sheet-bg); }
html[data-minimal] .rc-card.rp-hero { --rp-ready-bg: var(--min-flat-surface); }
html[data-minimal] .rp-bench-fill { background: var(--rp-who); }
html[data-minimal] .ivo-mini-fill { background: var(--iv-green); }
html[data-minimal] .ivr-distance .iv-bar-fill { background: var(--iv-green); }

/* ================================================================================================== Reports */

html[data-minimal] {
    --rp-hero-bg: var(--min-flat-surface);
    --rp-border: var(--min-line);
    --rp-card-border: var(--min-line);
    --rp-tile: var(--min-tile);
    --rp-tile-border: var(--min-tile-line);
}

/* What we noticed / findings: the tone edge and icon stay; the wash and the tinted border go. */
html[data-minimal] .rp-finding {
    border-top-color: var(--rp-tile-border);
    border-right-color: var(--rp-tile-border);
    border-bottom-color: var(--rp-tile-border);
    background: var(--rp-card);
}

html[data-minimal] .rp-ai-finding { background: var(--rp-tile); }
html[data-minimal] .rp-ai-finding::before { background: var(--rp-tone); }

html[data-minimal] .rp-drill-hero {
    border-color: var(--rp-card-border);
    background: var(--rp-card);
}

html[data-minimal] .rp-opp,
html[data-minimal] .rp-opp-stopped {
    border-color: var(--rp-tile-border);
    background: var(--rp-card);
}

html[data-minimal] .rci-spot {
    border-color: var(--rp-tile-border);
    background: var(--rp-tile);
}

html[data-minimal] .aigf-tile.is-cited { background: var(--aigf-tile); }
html[data-minimal] .rp-sankey-insight { background: var(--rp-tile); }

/* Explore: the picks and categories without their tone fade, the AI corner washes off. */
html[data-minimal] .rpx-pick,
html[data-minimal] .rpx-cat { background: var(--rp-card); }
html[data-minimal] .rpx-ai { background-image: none; }
html[data-minimal] .rpx-craft,
html[data-minimal] .rpx-answer-empty { background: none; }

/* Flat bars. */
html[data-minimal] .rp-pace-fill { background: var(--rp-indigo); }
html[data-minimal] .rp-source-share > span { background: var(--rp-source); }
html[data-minimal] .rp-rhythm-track > span { background: color-mix(in srgb, var(--rp-indigo) 48%, transparent); }
html[data-minimal] .rp-rhythm-track.is-strong > span { background: var(--rp-indigo); }
html[data-minimal] .rp-bridge-bar.rp-bridge-total { background: var(--rp-indigo); }
html[data-minimal] .rp-bridge-bar.rp-bridge-positive { background: var(--rp-positive); }
html[data-minimal] .rp-bridge-bar.rp-bridge-caution { background: var(--rp-caution); }

/* ================================================================================================== Recurring */

html[data-minimal] {
    --rc-hero: var(--min-flat-surface);
    --rc-signals-hero: var(--min-flat-surface);
    --rc-signals-glow: 0%;
    --rc-card-border: var(--min-line);
    --rc-hero-border: var(--min-line);
    --rc-row: var(--min-tile);
    --rc-row-hover: var(--min-tile-hover);
}

html[data-minimal] .rc-hue {
    --rc-hero: var(--min-flat-surface);
    --rc-hero-border: var(--min-line);
}

html[data-minimal] .rc-signals { background: var(--rc-card); }
html[data-minimal] .nr-head { background: none; }
html[data-minimal] .rc-pop-glow { display: none; }
html[data-minimal] .rc-pop-date { background: var(--tx-primary); }
html[data-minimal] .rc-pop-date.is-large { background: var(--rc-large); }
html[data-minimal] .rc-pop-date.is-income { background: var(--tx-positive); }

/* ================================================================================================== Transactions */

html[data-minimal] .txv {
    --txq-deck-bg: var(--min-flat-surface);
    --txq-glow-violet: transparent;
    --txq-glow-sky: transparent;
    --txq-glow-orchid: transparent;
    --txq-edge: transparent;
    --txg-band-start: var(--txg-band-mid);
    --txg-badge-fill: linear-gradient(var(--txv-surface), var(--txv-surface));
    --txg-badge-edge: linear-gradient(var(--txv-line), var(--txv-line));
}

html[data-minimal] .txi-tile { background: var(--txv-surface); }
html[data-minimal] .txg-meter-fill { background: var(--txn-icon, var(--txv-accent)); }

/* The transaction popups (Transaction, Manual Transaction, Split): flat detail and recurring cards, flat tiles and
   strokes. The couple glows behind the split cards stay. */
html[data-minimal] {
    --tx-detail-card: linear-gradient(#F3F4F6, #F3F4F6);
    --tx-recurring-card: linear-gradient(#F3F4F6, #F3F4F6);
    --tx-card-stroke: linear-gradient(#E3E6EC, #E3E6EC);
    --tx-card-border: var(--min-line);
    --tx-tile-fill: linear-gradient(rgba(15, 23, 42, .035), rgba(15, 23, 42, .035));
    --tx-tile-stroke: linear-gradient(rgba(15, 23, 42, .06), rgba(15, 23, 42, .06));
    --tx-switch-track: linear-gradient(#FFFFFF, #FFFFFF);
    --tx-switch-stroke: linear-gradient(#E3E7EF, #E3E7EF);
}

html[data-minimal][data-bs-theme="dark"] {
    --tx-detail-card: linear-gradient(rgba(29, 31, 37, .8), rgba(29, 31, 37, .8));
    --tx-recurring-card: linear-gradient(rgba(29, 31, 37, .8), rgba(29, 31, 37, .8));
    --tx-card-stroke: linear-gradient(rgba(255, 255, 255, .08), rgba(255, 255, 255, .08));
    --tx-card-border: var(--min-line);
    --tx-tile-fill: linear-gradient(rgba(4, 7, 15, .32), rgba(4, 7, 15, .32));
    --tx-tile-stroke: linear-gradient(rgba(255, 255, 255, .04), rgba(255, 255, 255, .04));
    --tx-switch-track: linear-gradient(rgba(10, 13, 23, .8), rgba(10, 13, 23, .8));
    --tx-switch-stroke: linear-gradient(rgba(255, 255, 255, .12), rgba(255, 255, 255, .12));
}

/* ================================================================================================== Settle */

/* KPI tiles, the visual cards and the highlights: plain surfaces. The couple glows on the Settle hero stay. */
html[data-minimal] .settle-kpi {
    border-color: var(--st-line);
    background: var(--st-surface);
}

html[data-minimal] .ai-vis-card.settle-viz { background: var(--st-surface); }

html[data-minimal] .settle-highlight {
    border-color: var(--st-line);
    background: var(--st-surface);
}

html[data-minimal] .si-reco::before,
html[data-minimal] .si-reco.is-partner-owned::before { display: none; }
html[data-minimal] .settle-meter > span { background: var(--meter); }

/* ================================================================================================== Settings */

/* Partner Sharing, Email Preferences and Update Account surfaces (the couple glows on the sharing hero stay). */
html[data-minimal] {
    --set-section-bg: var(--min-flat-surface);
    --set-hero-bg: var(--min-flat-surface);
    --set-tile-fill: var(--min-flat-tile);
    --set-tile-stroke: var(--min-flat-line);
    --emp-strip-bg: var(--min-flat-surface);
}

html[data-minimal][data-bs-theme="dark"] {
    --set-tile-stroke: linear-gradient(var(--min-tile-line), var(--min-tile-line));
}

html[data-minimal] .emp-story-bg { display: none; }
html[data-minimal] .upa-hero { --upa-hero-fade: linear-gradient(var(--upa-card), var(--upa-card)); }
html[data-minimal] .upa-card.is-plan { background: var(--upa-card); }

html[data-minimal] .psh-page :is(.psh-error, .psh-inline-warn, .psh-pick-off) { background: var(--psh-card); }
html[data-minimal] .psh-page .psh-live.is-dirty { background: var(--psh-section-bg); }

/* Import data: the violet washes, orbs and glows go; the steps and progress keep one flat violet. */
html[data-minimal] {
    --imc-hero-bg: var(--min-flat-surface);
    --imc-stage-bg: var(--min-flat-tile);
    --imc-flow-bg: var(--min-flat-tile);
    --imc-title-grad: linear-gradient(var(--min-ink), var(--min-ink));
}

html[data-minimal] .imh { --imh-hero-bg: var(--min-flat-surface); }

html[data-minimal] :is(.imc-hero-glow, .imc-tour-orb) { display: none; }
html[data-minimal] .imc-source::before { display: none; }

html[data-minimal] :is(.imc-source, .imc-promise, .imc-next-card, .imc-template, .imc-statements, .imc-assist) { background: var(--mya-card); }

html[data-minimal] :is(.imc-columns, .imc-accounts-card, .imc-upload, .imc-guide, .imc-helpcard, .imc-drawer-head, .imc-sc-brief, .imc-sc-classify) { background: var(--mya-card); }

html[data-minimal] :is(.imc-field-group, .imc-account, .imc-tile, .imc-tile.is-positive) { background: var(--min-tile); }

html[data-minimal] :is(.imc-finding, .imc-dupe, .imc-cat, .imc-cats-ai, .imc-cats-ai.is-prominent) { background: transparent; }
html[data-minimal] .imc-sc-brief::after { display: none; }

html[data-minimal] :is(.imc-tour-fill, .imc-sc-bar span, .imc-sc-link span, .imc-sc-beam span, .imc-steps::after, .imc-coach::before) { background: var(--mya-violet); }
html[data-minimal] .imc-cats-meter-fill { background: color-mix(in srgb, var(--mya-positive) 60%, transparent); }

/* Rules & Tags: the composer hero and the rule cards without the accent fade. */
html[data-minimal] {
    --rt-composer-hero: var(--min-flat-surface);
}

html[data-minimal] .rt-rule-card,
html[data-minimal] .rt-rule-compact,
html[data-minimal] .rt-ed-live-hero { background: var(--tx-surface); }
html[data-minimal] .rt-editor .rt-ed-rule { background: none; }

/* Manage subscription and support conversations. */
html[data-minimal] .sub-manage { --sub-hero: var(--min-flat-clear); }
html[data-minimal] {
    --sp-admin-bubble: var(--min-flat-tile);
    --pdh-bg: var(--min-flat-tile);
    --psn-bg: linear-gradient(var(--min-tile), var(--min-tile));
}

/* Payday: a picked payday is marked like any selected item, not in its own tone. */
html[data-minimal] .pd-option.is-on,
html[data-minimal] .pd-row.is-on { background: var(--ci-selected-fill); }
html[data-minimal] .pd-manage-icon.is-picked:hover,
html[data-minimal] .pd-suggest:hover:not(:disabled) { background: var(--min-tile-hover); }

/* System admin (users, AI usage, releases): flat hero, flat partner / billing cards. */
html[data-minimal] {
    --adu-hero-bg: var(--min-flat-surface);
    --adu-danger-bg: linear-gradient(rgba(254, 226, 226, .32), rgba(254, 226, 226, .32));
}

html[data-minimal][data-bs-theme="dark"] {
    --adu-danger-bg: linear-gradient(rgba(248, 113, 113, .08), rgba(248, 113, 113, .08));
}

html[data-minimal] .adu-partner-card,
html[data-minimal] .adu-billing-hero.is-positive,
html[data-minimal] .adr-platform.is-android { background: var(--min-surface); }
html[data-minimal] .adr-banner-preview { background: var(--min-tile); }

/* ================================================================================================== Help */

/* The drawer and sheet without the area's corner glow; the active row, result and focused section marked neutrally.
   Every glyph keeps its area color (help color coding). */
html[data-minimal] .help-drawer,
html[data-minimal] .help-sheet { background-image: none; }

html[data-minimal] .help-nav-row.is-active,
html[data-minimal] .help-result.is-active { background: var(--min-pill); }

html[data-minimal] .help-section.help-section-focus { background: var(--min-tile); }
html[data-minimal] .help-point-link:hover { background: var(--min-pill); }
html[data-minimal] .help-related-card:hover { background: var(--help-chip-hover); }
