/* FinanceTracker's brand on every page (2026-11-28; its tones softened on 2026-11-29, the founder: "too intense":
 * mulberry, copper and the dark surfaces desaturated, the same hues, dark mode's text a little under paper), loaded right after coreui.min.css: the typeface, the palette as
 * CoreUI's tokens, and the controls the designer drew (docs/brand/logo_layout, slides 03 to 08; BRAND_ROADMAP.md).
 *
 * The palette: mulberry #4B3444 for brand surfaces (the sidebar, the sign-in pages, the landing page's hero); copper
 * #C6A790 as the action colour, a fill with ink #292126 text on it (7.0:1), pressed #B1927C; #7C5D46, copper's
 * "on light" version, for copper text and outlines on white or paper (6.0:1 on white). Light mode stands on paper
 * #F5F2ED with white cards, dark mode on night #1D181C with #292126 cards.
 *
 * CoreUI draws a fill and a text in the same --cui-primary. Here --cui-primary is the TEXT colour (#7C5D46 light,
 * copper dark), and every component that fills with the primary is given copper with ink text below, in both modes. */

/* IBM Plex Sans (SIL Open Font License 1.1, assets/fonts/ibm-plex-sans/OFL.txt): one variable weight axis, cut by
 * script so a page downloads only what its text needs (assets/fonts/ibm-plex-sans/unicode-ranges.txt). */
@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-weight: 100 700;
    font-display: swap;
    src: url("/assets/fonts/ibm-plex-sans/IBMPlexSans-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: "IBM Plex Sans";
    font-style: normal;
    font-weight: 100 700;
    font-display: swap;
    src: url("/assets/fonts/ibm-plex-sans/IBMPlexSans-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
        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;
}
@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-weight: 100 700;
    font-display: swap;
    src: url("/assets/fonts/ibm-plex-sans/IBMPlexSans-cyrillic.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0460-052F, U+0490-0491, U+04B0-04B1, U+1C80-1C8A, U+20B4, U+2116,
        U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-weight: 100 700;
    font-display: swap;
    src: url("/assets/fonts/ibm-plex-sans/IBMPlexSans-greek.woff2") format("woff2");
    unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF, U+1F00-1FFF;
}

:root,
[data-coreui-theme=light] {
    --ft-mulberry: #4B3444;
    --ft-mulberry-raised: #5C4255;
    --ft-copper: #C6A790;
    --ft-copper-pressed: #B1927C;
    --ft-copper-on-light: #7C5D46;
    --ft-ink: #292126;
    --ft-paper: #F5F2ED;
    --ft-night: #1D181C;
    --ft-night-surface: #292126;
    --ft-night-raised: #392D35;

    --cui-font-sans-serif: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
        "Noto Sans", sans-serif;
    --cui-body-font-family: var(--cui-font-sans-serif);
    --cui-body-bg: #F5F2ED;
    --cui-body-bg-rgb: 245, 242, 237;
    --cui-body-color: #292126;
    --cui-body-color-rgb: 41, 33, 38;
    --cui-emphasis-color: #1D181C;
    --cui-emphasis-color-rgb: 29, 24, 28;
    --cui-heading-color: #292126;
    --cui-secondary-color: #685C64;
    --cui-secondary-color-rgb: 104, 92, 100;
    --cui-secondary-bg: #EDE7E2;
    --cui-secondary-bg-rgb: 237, 231, 226;
    --cui-tertiary-color: rgba(41, 33, 38, 0.62);
    --cui-tertiary-bg: #F9F7F4;
    --cui-tertiary-bg-rgb: 249, 247, 244;
    --cui-border-color: #E2DCDF;
    --cui-border-color-translucent: rgba(75, 52, 68, 0.14);

    --cui-primary: #7C5D46;
    --cui-primary-rgb: 124, 93, 70;
    --cui-primary-text-emphasis: #624A37;
    --cui-primary-bg-subtle: #EFE7E1;
    --cui-primary-border-subtle: #D8C6B6;

    --cui-link-color: #7C5D46;
    --cui-link-color-rgb: 124, 93, 70;
    --cui-link-hover-color: #624A37;
    --cui-link-hover-color-rgb: 98, 74, 55;

    --cui-focus-ring-color: rgba(198, 167, 144, 0.45);
    --cui-form-valid-color: var(--cui-success);

    /* Status (2026-12-01, colour means status): a mark at 3:1 or more, text at 4.5:1 or more on the white card and
       the paper page; good beside critical ΔE 10.2 under red-green colour blindness (the dataviz validator). The app's
       StatusColors holds the same values. */
    --ft-status-good: #15A047;
    --ft-status-warning: #CC6F06;
    --ft-status-critical: #B91C1C;
    --ft-status-good-text: #147A3B;
    --ft-status-warning-text: #AD5008;
    --ft-status-critical-text: #B91C1C;

    /* The charts (2026-12-01, FT-UX-CALM phase 4): income and expense are the status marks above (measured as a pair:
       ΔE 10.2 under red-green colour blindness, 3:1 or more on the card and the page), the net is ink, the coming
       periods sit on a copper wash behind a copper "today" rule (a copper line beside the income green measured ΔE 1.6
       under deuteranopia, so no series is copper), a share bar is a neutral ink, the grid a hairline. ChartKit.palette()
       reads them; the app's ChartPalette holds the same values. */
    --ft-chart-income: #15A047;
    --ft-chart-expense: #B91C1C;
    --ft-chart-net: #292126;
    --ft-chart-forecast: #7C5D46;
    --ft-chart-future: rgba(198, 167, 144, 0.14);
    --ft-chart-neutral: rgba(41, 33, 38, 0.30);
    --ft-chart-grid: rgba(41, 33, 38, 0.08);
    --ft-chart-axis: #685C64;
    /* 2026-12-02: a plan's line (a goal's Planned, a budget's Even pace), apart from the neutral rules; measured against
       the green, the ink and the status colours (CVD ΔE 30.4 from the green, 36.8 from the ink). */
    --ft-chart-plan: #7C3AED;
}

[data-coreui-theme=dark] {
    /* CoreUI's model: the page in --cui-dark-bg-subtle (night), its surfaces in --cui-body-bg (#292126). */
    --cui-body-bg: #292126;
    --cui-body-bg-rgb: 41, 33, 38;
    --cui-body-color: #E6E1DE;
    --cui-body-color-rgb: 230, 225, 222;
    --cui-emphasis-color: #FFFFFF;
    --cui-emphasis-color-rgb: 255, 255, 255;
    --cui-heading-color: #E6E1DE;
    --cui-secondary-color: #B3A8AF;
    --cui-secondary-color-rgb: 179, 168, 175;
    --cui-secondary-bg: #392D35;
    --cui-secondary-bg-rgb: 57, 45, 53;
    --cui-tertiary-color: rgba(245, 242, 237, 0.62);
    --cui-tertiary-bg: #231D21;
    --cui-tertiary-bg-rgb: 35, 29, 33;
    --cui-border-color: #392D35;
    --cui-border-color-translucent: rgba(245, 242, 237, 0.12);
    --cui-dark-bg-subtle: #1D181C;

    --cui-primary: #C6A790;
    --cui-primary-rgb: 198, 167, 144;
    --cui-primary-text-emphasis: #D9C2B0;
    --cui-primary-bg-subtle: #392D35;
    --cui-primary-border-subtle: #675351;

    --cui-link-color: #C6A790;
    --cui-link-color-rgb: 198, 167, 144;
    --cui-link-hover-color: #D9C2B0;
    --cui-link-hover-color-rgb: 217, 194, 176;

    /* Status on the night surfaces (card, page, dialog): the green the darker of the pair, ΔE 9.2. */
    --ft-status-good: #089428;
    --ft-status-warning: #F59E0B;
    --ft-status-critical: #DF6768;
    --ft-status-good-text: #4ADE80;
    --ft-status-warning-text: #F59E0B;
    --ft-status-critical-text: #F87171;

    /* The charts on the night surfaces: the same pair, ΔE 9.2. */
    --ft-chart-income: #089428;
    --ft-chart-expense: #DF6768;
    --ft-chart-net: #E6E1DE;
    --ft-chart-forecast: #C6A790;
    --ft-chart-future: rgba(198, 167, 144, 0.10);
    --ft-chart-neutral: rgba(245, 242, 237, 0.34);
    --ft-chart-grid: rgba(245, 242, 237, 0.08);
    --ft-chart-axis: #B3A8AF;
    /* Inside the dark band; 21.2 from the dark red, 30.0 from the ink (a plum failed the red: 12.7). */
    --ft-chart-plan: #9F7AEA;
}

body {
    font-family: var(--cui-body-font-family);
}

/* Headlines set tight, as the designer sets them (about -2 % at display sizes). */
h1, .h1, h2, .h2 {
    font-weight: 600;
    letter-spacing: -0.02em;
}
h3, .h3, h4, .h4 {
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Amounts line up in tables and cards. */
.table,
.card {
    font-variant-numeric: tabular-nums;
}

/* Fields: white on paper and on white cards (CoreUI paints them in the body's colour, paper here); night in dark mode,
 * the body's own. A disabled field keeps CoreUI's secondary surface. */
.form-control,
.form-select {
    background-color: #FFFFFF;
}
[data-coreui-theme=dark] .form-control,
[data-coreui-theme=dark] .form-select {
    background-color: #1D181C;
}

/* Cards: white on paper, #292126 on night. */
.card {
    --cui-card-bg: #FFFFFF;
}
[data-coreui-theme=dark] .card {
    --cui-card-bg: #292126;
}
.header {
    --cui-header-bg: #FFFFFF;
}
[data-coreui-theme=dark] .header {
    --cui-header-bg: #292126;
}
.dropdown-menu {
    --cui-dropdown-link-active-bg: #C6A790;
    --cui-dropdown-link-active-color: #292126;
}
[data-coreui-theme=dark] .dropdown-menu,
[data-coreui-theme=dark] .modal-content,
[data-coreui-theme=dark] .offcanvas,
[data-coreui-theme=dark] .toast {
    --cui-dropdown-bg: #292126;
    --cui-modal-bg: #292126;
    --cui-offcanvas-bg: #292126;
    --cui-toast-bg: #292126;
}

/* Buttons are pills (slide 07). Inside an input group a button keeps the field's corners. */
.btn,
.btn-sm,
.btn-lg {
    --cui-btn-border-radius: 50rem;
    --cui-btn-font-weight: 600;
}
.input-group > .btn {
    --cui-btn-border-radius: var(--cui-border-radius);
}
.btn-primary {
    --cui-btn-color: #292126;
    --cui-btn-bg: #C6A790;
    --cui-btn-border-color: #C6A790;
    --cui-btn-hover-color: #292126;
    --cui-btn-hover-bg: #B1927C;
    --cui-btn-hover-border-color: #B1927C;
    --cui-btn-focus-shadow-rgb: 198, 167, 144;
    --cui-btn-active-color: #292126;
    --cui-btn-active-bg: #B1927C;
    --cui-btn-active-border-color: #B1927C;
    --cui-btn-disabled-color: #8A7F85;
    --cui-btn-disabled-bg: #E7E3E5;
    --cui-btn-disabled-border-color: #E7E3E5;
}
/* CoreUI scopes its own button colours to the dark theme, which outranks the rule above: the same copper there. */
[data-coreui-theme=dark] .btn-primary {
    --cui-btn-color: #292126;
    --cui-btn-bg: #C6A790;
    --cui-btn-border-color: #C6A790;
    --cui-btn-hover-color: #292126;
    --cui-btn-hover-bg: #B1927C;
    --cui-btn-hover-border-color: #B1927C;
    --cui-btn-focus-shadow-rgb: 198, 167, 144;
    --cui-btn-active-color: #292126;
    --cui-btn-active-bg: #B1927C;
    --cui-btn-active-border-color: #B1927C;
    --cui-btn-disabled-color: #8A7F85;
    --cui-btn-disabled-bg: #392D35;
    --cui-btn-disabled-border-color: #392D35;
}
.btn-outline-primary {
    --cui-btn-color: #7C5D46;
    --cui-btn-border-color: #7C5D46;
    --cui-btn-hover-color: #292126;
    --cui-btn-hover-bg: #C6A790;
    --cui-btn-hover-border-color: #C6A790;
    --cui-btn-focus-shadow-rgb: 198, 167, 144;
    --cui-btn-active-color: #292126;
    --cui-btn-active-bg: #B1927C;
    --cui-btn-active-border-color: #B1927C;
    --cui-btn-disabled-color: #7C5D46;
    --cui-btn-disabled-border-color: #7C5D46;
}
[data-coreui-theme=dark] .btn-outline-primary {
    --cui-btn-color: #C6A790;
    --cui-btn-border-color: #C6A790;
    --cui-btn-disabled-color: #C6A790;
    --cui-btn-disabled-border-color: #C6A790;
}
.btn-link {
    --cui-btn-color: var(--cui-link-color);
    --cui-btn-hover-color: var(--cui-link-hover-color);
    --cui-btn-active-color: var(--cui-link-hover-color);
}

/* Everything that fills with the primary: copper with ink text, in both modes. */
.nav-pills {
    --cui-nav-pills-link-active-bg: #C6A790;
    --cui-nav-pills-link-active-color: #292126;
}
.list-group {
    --cui-list-group-active-bg: #C6A790;
    --cui-list-group-active-border-color: #C6A790;
    --cui-list-group-active-color: #292126;
}
.pagination {
    --cui-pagination-active-bg: #C6A790;
    --cui-pagination-active-border-color: #C6A790;
    --cui-pagination-active-color: #292126;
    --cui-pagination-focus-box-shadow: 0 0 0 0.25rem rgba(198, 167, 144, 0.45);
}
.progress,
.progress-stacked {
    --cui-progress-bar-bg: #C6A790;
    --cui-progress-bar-color: #292126;
}
.bg-primary {
    background-color: #C6A790 !important;
}
.bg-primary.text-white,
.badge.bg-primary,
.text-bg-primary {
    color: #292126 !important;
}
.text-bg-primary {
    background-color: #C6A790 !important;
}
.form-check-input:checked,
.form-check-input[type=checkbox]:indeterminate {
    background-color: var(--cui-primary);
    border-color: var(--cui-primary);
}
.form-check-input:focus,
.form-control:focus,
.form-select:focus {
    border-color: #B1927C;
    box-shadow: 0 0 0 0.25rem rgba(198, 167, 144, 0.35);
}
/* In dark mode the tick is ink on copper: white on copper would read at 2:1. */
[data-coreui-theme=dark] .form-check-input:checked[type=checkbox] {
    --cui-form-check-input-checked-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23292126' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}
[data-coreui-theme=dark] .form-check-input:checked[type=radio] {
    --cui-form-check-radio-checked-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23292126'/%3e%3c/svg%3e");
}
[data-coreui-theme=dark] .form-switch .form-check-input:checked {
    --cui-form-switch-checked-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23292126'/%3e%3c/svg%3e");
}
.form-range {
    --cui-form-range-thumb-bg: #C6A790;
    --cui-form-range-thumb-active-bg: #B1927C;
}

/* The sidebar is a brand surface: mulberry in both modes, the copper logo, copper for the page you are on. */
.sidebar.sidebar-dark {
    --cui-sidebar-bg: #4B3444;
    --cui-sidebar-color: rgba(255, 255, 255, 0.87);
    --cui-sidebar-border-color: rgba(0, 0, 0, 0.18);
    --cui-sidebar-brand-color: #C6A790;
    --cui-sidebar-brand-bg: transparent;
    --cui-sidebar-header-bg: transparent;
    --cui-sidebar-nav-title-color: rgba(255, 255, 255, 0.62);
    --cui-sidebar-nav-link-color: rgba(255, 255, 255, 0.78);
    --cui-sidebar-nav-link-icon-color: rgba(255, 255, 255, 0.58);
    --cui-sidebar-nav-link-hover-color: #FFFFFF;
    --cui-sidebar-nav-link-hover-bg: rgba(198, 167, 144, 0.12);
    --cui-sidebar-nav-link-hover-icon-color: #C6A790;
    --cui-sidebar-nav-link-active-color: #C6A790;
    --cui-sidebar-nav-link-active-bg: rgba(198, 167, 144, 0.16);
    --cui-sidebar-nav-link-active-icon-color: #C6A790;
    --cui-sidebar-nav-group-bg: rgba(0, 0, 0, 0.14);
    --cui-sidebar-footer-bg: rgba(0, 0, 0, 0.12);
    --cui-sidebar-toggler-bg: rgba(0, 0, 0, 0.12);
    --cui-sidebar-toggler-hover-bg: rgba(0, 0, 0, 0.2);
}
/* CoreUI's .sidebar-dark gives its subtree a slate surface (#212631 and its tints), which the active and hovered items
 * and the groups draw from: the same surfaces in mulberry. */
.sidebar-dark {
    --cui-body-bg: #4B3444;
    --cui-body-color: rgba(255, 255, 255, 0.87);
    --cui-secondary-bg: #5C4255;
    --cui-tertiary-bg: #553F4E;
    --cui-border-color: rgba(0, 0, 0, 0.18);
}
.sidebar-dark .sidebar-nav {
    --cui-sidebar-nav-link-color: rgba(255, 255, 255, 0.78);
    --cui-sidebar-nav-link-icon-color: rgba(255, 255, 255, 0.58);
    --cui-sidebar-nav-link-hover-color: #FFFFFF;
    --cui-sidebar-nav-link-hover-bg: rgba(198, 167, 144, 0.12);
    --cui-sidebar-nav-link-hover-icon-color: #C6A790;
    --cui-sidebar-nav-link-active-color: #C6A790;
    --cui-sidebar-nav-link-active-bg: rgba(198, 167, 144, 0.16);
    --cui-sidebar-nav-link-active-icon-color: #C6A790;
    --cui-sidebar-nav-group-bg: rgba(0, 0, 0, 0.14);
    --cui-sidebar-nav-title-color: rgba(255, 255, 255, 0.62);
}
.sidebar-brand {
    color: #C6A790;
}

/* The legal pages' header logo: mulberry on light, copper on dark (the sprite's lockup in currentColor). */
.ft-legal-brand {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    color: #4B3444;
}
[data-coreui-theme=dark] .ft-legal-brand {
    color: #C6A790;
}
