/*
 * Design tokens: the only file that holds raw values.
 *
 * Every other stylesheet uses these names, never a color or size of its own.
 * To adjust the look, change a value here. The dark set is the default; the
 * light set carries the same names and applies when the page asks for it.
 */

/* 1. Dark theme (default), sizes and spacing */
:root {
    color-scheme: dark;

    /* Surfaces and lines */
    --c-bg: #0F1418;
    --c-surface: #182028;
    --c-raised: #212C36;
    --c-selected: #2B3A47;
    --c-line: #2E3C48;
    --c-line-strong: #4A5E6E;
    --c-player: #000000;

    /* Text */
    --c-text: #EEF3F7;
    --c-muted: #9FB0BE;
    --c-disabled: #7F909E;
    --c-link: #FFB54D;

    /* Brand accent: the brand mark and the main action on a screen, nothing else */
    --c-accent: #FFA62B;
    --c-on-accent: #1A1206;

    /* Status colors with fixed meanings: healthy, needs attention, recording */
    --c-ok: #3DDC97;
    --c-ok-bg: #1F4D3A;
    --c-ok-text: #B5F2D6;
    --c-warn-bg: #4A3A12;
    --c-warn-line: #A47A1E;
    --c-warn-text: #FFE1A3;
    --c-rec: #FF5A5F;
    /* Activity lights: server, device, security check, live */
    --c-act-server: #4DA3FF;
    --c-act-device: #FFA62B;
    --c-act-check: #B48CFF;
    --c-act-live: #3DDC97;
    /* Graph lines, in fixed order (performance.js). Checked for color-blind
       separation and contrast on the surface; change them only as a set. */
    --c-series-1: #3987e5;
    --c-series-2: #d95926;
    --c-series-3: #199e70;
    --c-series-4: #c98500;
    --c-series-5: #d55181;
    --c-series-6: #0ca30c;
    --c-series-7: #9085e9;
    --c-stop: #B3261E;
    --c-on-stop: #FFFFFF;
    --c-off: #5E7080;

    /* Destructive actions and error messages */
    --c-danger-line: #D0605C;
    --c-danger-text: #FFB4B0;
    --c-danger-bg: #3A1D1F;
    --c-danger-frame: #5B2E2E;

    /* Spacing steps */
    --s-1: 4px;
    --s-2: 8px;
    --s-3: 12px;
    --s-4: 16px;
    --s-5: 20px;
    --s-6: 24px;

    /* Text sizes: small, label, body, title, display */
    --t-small: .8125rem;
    --t-label: .875rem;
    --t-body: 1rem;
    --t-title: 1.375rem;
    --t-display: 1.625rem;

    /* Corner radius */
    --r-1: 6px;
    --r-2: 10px;
    --r-3: 12px;
    --r-4: 18px;

    /* Control heights (44px is the smallest touch target) and page widths */
    --h-touch: 44px;
    --h-control: 48px;
    --h-main: 56px;
    --w-page: 1080px;
    --w-form: 420px;
}

/* 2. Light theme: the same names with light values */
html[data-theme="light"] {
    color-scheme: light;
    --c-bg: #F4F6F8;
    --c-surface: #FFFFFF;
    --c-raised: #F4F6F8;
    --c-selected: #FFF1DC;
    --c-line: #D5DDE4;
    --c-line-strong: #8A99A6;
    --c-text: #14202B;
    --c-muted: #54636F;
    --c-disabled: #6F7E8A;
    --c-link: #8A4A00;
    --c-ok: #1E9E6A;
    --c-ok-bg: #DDF5EA;
    --c-ok-text: #0E5A3B;
    --c-warn-bg: #FFF4DB;
    --c-warn-line: #D9A62E;
    --c-warn-text: #6B4E00;
    --c-rec: #B3261E;
    --c-act-server: #1D6FD1;
    --c-act-device: #C97A00;
    --c-act-check: #7A4FD6;
    --c-act-live: #1E9E6A;
    --c-series-1: #2a78d6;
    --c-series-2: #eb6834;
    --c-series-3: #1baf7a;
    --c-series-4: #eda100;
    --c-series-5: #e87ba4;
    --c-series-6: #008300;
    --c-series-7: #6250d6;
    --c-off: #8A99A6;
    --c-danger-line: #B3261E;
    --c-danger-text: #8C1D18;
    --c-danger-bg: #FDECEC;
    --c-danger-frame: #E5A3A0;
}
