/* The only file in this codebase that declares a colour.
   Light is the default; dark redefines the same names under [data-bs-theme]. */
:root {
    /* ── surfaces ── */
    --surface:          #f4f7fc;
    --surface-raised:   #ffffff;
    --surface-sunken:   #eef2f7;

    /* ── lines ── */
    --border:           #e6ecf5;
    --border-strong:    #cbd5e1;

    /* ── text ── */
    --text:             #0f172a;
    --text-muted:       #5b6a82;
    /* Was #7c8ea8, which measured 3.34:1 on --surface-raised. It is not a
       decorative value: .panel-foot paints every panel's provider badge, timing
       and row-count text with it, so it carries real body text at 11px and has
       to clear the 4.5:1 AA floor like --text/--text-muted do. #5f6d85 measures
       5.16:1 on --surface-raised and 4.81:1 on --surface; TokenContrastTests now
       asserts both at 4.5 so the old waiver cannot come back. */
    --text-subtle:      #5f6d85;

    /* ── brand ── */
    /* Was #0c75d1. The composer's panel-count badge is .text-primary on
       .bg-primary-subtle — i.e. --accent on --accent-subtle — and that pairing
       measured 4.15:1 at 10.5px bold, under AA. --accent-subtle is already all
       but white (0.88 relative luminance), so the only end of the pairing with
       room to move is the ink: #0a68bd takes it to 5.00:1 on --accent-subtle,
       5.64:1 on --surface-raised and 5.25:1 on --surface, all up from where they
       were. --chart-1 keeps the original hue — a series colour is not text. */
    --accent:           #0a68bd;
    --accent-hover:     #0a5fa8;
    --accent-subtle:    #eaf2fd;
    --accent-on:        #ffffff;
    --accent-rgb:       10, 104, 189;

    /* --logo-plate was here: a light chip painted behind the colour logo in dark mode,
       because the wordmark's baked-in #042c75 reads 1.31:1 on the dark card. The brand
       owner supplied a white version of the artwork, so the logo now sits on the card
       itself and the plate has nothing left to do. See .auth-logo in components.css. */

    /* ── status ── */
    --success:          #15803d;  --success-subtle: #dcfce7;  --success-rgb: 21, 128, 61;
    --warning:          #a16207;  --warning-subtle: #fef9c3;  --warning-rgb: 161, 98, 7;
    --danger:           #b91c1c;  --danger-subtle:  #fee2e2;  --danger-rgb:  185, 28, 28;

    /* ── chart series ── */
    --chart-1: #008FFB;  --chart-2: #00E396;  --chart-3: #FEB019;  --chart-4: #FF4560;
    --chart-5: #775DD0;  --chart-6: #26A69A;  --chart-7: #EC4899;  --chart-8: #F97316;
    --chart-9: #6F42C1;  --chart-10: #4ADE80;
    /* Darker than --border: a grid line at that value read at 1.19:1 against
       --surface-raised (TokenContrastTests requires 1.5 — visible, not loud). */
    --chart-grid: #c2ccda;
    --chart-tick: #64748b;

    /* ── geometry ── */
    --radius-sm: 8px;   --radius-md: 13px;  --radius-lg: 18px;
    --shadow-sm: 0 1px 2px rgba(16,24,40,.06);
    --shadow-md: 0 1px 2px rgba(16,24,40,.06), 0 10px 24px -16px rgba(16,24,40,.35);
    --shadow-lg: 0 4px 6px rgba(16,24,40,.06), 0 12px 28px -8px rgba(16,24,40,.28);

    /* ── space, 4px base ── */
    --space-1: .25rem;  --space-2: .5rem;   --space-3: .75rem;  --space-4: 1rem;
    --space-5: 1.5rem;  --space-6: 2rem;    --space-7: 3rem;    --space-8: 4rem;

    /* ── type ── */
    --font-sans: -apple-system, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
    --font-mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
    --text-xs: .6875rem; --text-sm: .8125rem; --text-md: .875rem;
    --text-lg: 1rem;     --text-xl: 1.25rem;  --text-2xl: 1.75rem;
}

[data-bs-theme="dark"] {
    --surface:          #0f141c;
    --surface-raised:   #161d28;
    --surface-sunken:   #0b0f16;

    --border:           #253044;
    --border-strong:    #3a4761;

    --text:             #e8edf5;
    --text-muted:       #93a3ba;
    /* Was #6b7b93 — 3.93:1 on --surface-raised, the same failure as light and for
       the same reason (.panel-foot's timing text). #7d8da4 measures 5.01:1 on
       --surface-raised and 5.46:1 on --surface. */
    --text-subtle:      #7d8da4;

    --accent:           #4da3ec;
    --accent-hover:     #7bbcf2;
    --accent-subtle:    #14293f;
    --accent-on:        #06121e;
    --accent-rgb:       77, 163, 236;

    --success:          #4ade80;  --success-subtle: #10241a;  --success-rgb: 74, 222, 128;
    --warning:          #fbbf24;  --warning-subtle: #2a2210;  --warning-rgb: 251, 191, 36;
    --danger:           #f87171;  --danger-subtle:  #2c1416;  --danger-rgb:  248, 113, 113;

    --chart-1: #008FFB;  --chart-2: #00E396;  --chart-3: #FEB019;  --chart-4: #FF4560;
    --chart-5: #775DD0;  --chart-6: #26A69A;  --chart-7: #EC4899;  --chart-8: #F97316;
    --chart-9: #6F42C1;  --chart-10: #4ADE80;
    /* Same fix as light: 1.28:1 against --surface-raised failed the 1.5 floor. */
    --chart-grid: #334155;
    --chart-tick: #93a3ba;

    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow-md: 0 1px 2px rgba(0,0,0,.4), 0 10px 24px -16px rgba(0,0,0,.8);
    --shadow-lg: 0 4px 6px rgba(0,0,0,.4), 0 12px 28px -8px rgba(0,0,0,.7);
}
