/* =========================================================================
   Design tokens. Everything visual derives from these variables; the dark
   theme only redefines tokens, never components.
   ========================================================================= */
:root {
    color-scheme: light;
    --font: "Inter Variable", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    /* type scale (rem at 15px root) */
    --t-xs: .75rem;  --t-sm: .8125rem; --t-base: .9375rem; --t-md: 1.0625rem;
    --t-lg: 1.3125rem; --t-xl: 1.625rem; --t-2xl: 2.125rem;

    /* 4px spacing scale */
    --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-5: 1.25rem; --s-6: 1.5rem;
    --s-8: 2rem; --s-10: 2.5rem; --s-12: 3rem;

    --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-pill: 999px;

    /* neutrals: white sheet on a navy backdrop; --panel is the borderless grey card */
    --backdrop: #12203f;
    --bg: #ffffff;
    --surface: #ffffff;
    --panel: #f6f6f7;
    --raised: #f0f1f4;
    --sunken: #eceef2;
    --line: #e6e8ec;
    --line-strong: #d3d7de;
    --ink: #141c2b;
    --ink-2: #3c4657;
    --ink-3: #5b6676;
    --ink-inv: #ffffff;

    /* brand: gateway blue */
    --brand: #1f5aa6;
    --brand-hover: #184a8a;
    --brand-soft: #edf1f8;
    --brand-ink: #1b4f93;
    --focus: color-mix(in srgb, var(--brand) 35%, transparent);

    /* semantic */
    --ok: #16794c;    --ok-soft: #e2f4ea;
    --warn: #9a5a06;  --warn-soft: #fcf0d9;
    --bad: #b42318;   --bad-soft: #fde8e6;
    --info: #1d5fd1;  --info-soft: #e5eefc;
    --mute: #5f6875;  --mute-soft: #eef0f3;

    /* charts */
    --c1: #3563e9; --c2: #3da85a; --c3: #a85b24; --c4: #3b9bdc; --c5: #c93a2b; --c6: #7c5cc4;

    --shadow-1: 0 1px 2px rgba(18, 32, 63, .06);
    --shadow-2: 0 6px 16px -4px rgba(18, 32, 63, .12), 0 2px 4px rgba(18, 32, 63, .05);
    --shadow-3: 0 24px 48px -12px rgba(18, 32, 63, .28), 0 4px 10px rgba(18, 32, 63, .06);

    --ease: cubic-bezier(.2, .7, .2, 1);
    --dur: 160ms;

    --side-w: 17rem;
    --rail-w: 5rem;
    --top-h: 5rem;
    --bottom-h: 4rem;
}

[data-bs-theme="dark"] {
    color-scheme: dark;
    --backdrop: #0a1120;
    --bg: #131c2e;
    --surface: #131c2e;
    --panel: #1a2438;
    --raised: #212c42;
    --sunken: #0f1726;
    --line: #2a364d;
    --line-strong: #3b4963;
    --ink: #e8edf5;
    --ink-2: #bcc6d6;
    --ink-3: #96a3b6;

    --brand: #7ba4f0;
    --brand-hover: #9dbcf5;
    --brand-soft: rgba(123, 164, 240, .14);
    --brand-ink: #a9c4f7;

    --ok: #5fd69a;   --ok-soft: rgba(95, 214, 154, .13);
    --warn: #f4bf5b; --warn-soft: rgba(244, 191, 91, .13);
    --bad: #ff8a80;  --bad-soft: rgba(255, 138, 128, .13);
    --info: #7fb0ff; --info-soft: rgba(127, 176, 255, .13);
    --mute: #a4afc0; --mute-soft: rgba(164, 175, 192, .12);

    --c1: #6f97f5; --c2: #5fd08a; --c3: #e0a064; --c4: #6cc0f2; --c5: #f07f78; --c6: #a68cf0;

    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-2: 0 8px 20px -6px rgba(0, 0, 0, .6);
    --shadow-3: 0 28px 56px -12px rgba(0, 0, 0, .75);
}
