:root {
    color-scheme: light;
    --page-bg: #131313;
    --page-fg: #F2F2F2;
    --panel: #fbfbfa;
    --raised: #f2f2f2;
    --popover: #ffffff;
    --window: #ffffff;
    --text: rgba(0,0,0,0.8);
    --text-muted: rgba(0,0,0,0.55);
    --text-disabled: rgba(0,0,0,0.4);
    --border: rgba(0,0,0,0.15);
    --border-strong: rgba(0,0,0,0.26);
    --divider: rgba(0,0,0,0.08);
    --row-hover: rgba(0,0,0,0.04);
    --row-active: rgba(0,0,0,0.08);
    --accent: #E95420;
    --accent-hover: #EB5F2D;
    --accent-active: #D2440F;
    --accent-text: #C4400E;
    --accent-soft: rgba(233,84,32,0.15);
    --on-accent: #ffffff;
    /* White on the raw accent failed AA; the console mix keeps filled labels readable. */
    --accent-filled-bg: #c94a1e;
    --accent-filled-bg: color-mix(in srgb, #E95420 85%, #131313);
    --accent-filled-fg: #ffffff;
    --error-text: #c30000;
    --success-text: #007c3d;
    --warning-text: #905400;
    --info-text: #1a5fb4;
    --radius-window: 12px;
    --radius-widget: 6px;
    --radius-small: 4px;
    --radius-pill: 9999px;
    --duration-fast: 150ms;
    --duration-medium: 200ms;
    --easing: cubic-bezier(0.25,0.46,0.45,0.94);
    --space-4: 4px;
    --space-8: 8px;
    --space-12: 12px;
    --space-16: 16px;
    --space-20: 20px;
    --space-24: 24px;
    --space-32: 32px;
    --space-40: 40px;
    --space-48: 48px;
    --space-64: 64px;
    --page-gutter: 16px;
    --font-sans: "Ubuntu Sans","Ubuntu",system-ui,-apple-system,"Segoe UI",sans-serif;
    --font-mono: ui-monospace,monospace;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --panel: #1e1e1e;
        --raised: #2e2e2e;
        --popover: #383838;
        --window: #242424;
        --text: #ffffff;
        --text-muted: rgba(255,255,255,0.55);
        --text-disabled: rgba(255,255,255,0.4);
        --border: rgba(255,255,255,0.15);
        --border-strong: rgba(255,255,255,0.3);
        --divider: rgba(255,255,255,0.08);
        --row-hover: rgba(255,255,255,0.04);
        --row-active: rgba(255,255,255,0.08);
        --accent-text: #FF8A66;
        --accent-soft: rgba(233,84,32,0.25);
        --error-text: #ff938c;
        --success-text: #78e9ab;
        --warning-text: #ffc252;
        --info-text: #99c1f1;
    }
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --panel: #1e1e1e;
    --raised: #2e2e2e;
    --popover: #383838;
    --window: #242424;
    --text: #ffffff;
    --text-muted: rgba(255,255,255,0.55);
    --text-disabled: rgba(255,255,255,0.4);
    --border: rgba(255,255,255,0.15);
    --border-strong: rgba(255,255,255,0.3);
    --divider: rgba(255,255,255,0.08);
    --row-hover: rgba(255,255,255,0.04);
    --row-active: rgba(255,255,255,0.08);
    --accent-text: #FF8A66;
    --accent-soft: rgba(233,84,32,0.25);
    --error-text: #ff938c;
    --success-text: #78e9ab;
    --warning-text: #ffc252;
    --info-text: #99c1f1;
}

body {
    background: var(--page-bg);
}
