/* Design tokens: "ops console". Graphite surfaces, one steel accent for actions,
   brass reserved for the arena and money, green/red only for status. */
@layer tokens, base, layout, components, features, utilities;

@layer tokens {
    :root {
        color-scheme: dark;

        --bg: #121417;
        --surface-sunken: #0e1013;
        --surface-1: #181b20;
        --surface-2: #1f2329;
        --surface-3: #272c33;
        --line: #2a2e35;
        --line-strong: #3a3f48;

        --text: #e6e8eb;
        --text-muted: #a9afb8;
        --text-dim: #7d848e;

        --accent: #4a7bd0;
        --accent-strong: #3f6fc4;
        --accent-text: #93b3e9;
        --accent-soft: rgb(74 123 208 / 0.14);

        --brass: #c9a45c;
        --brass-strong: #b48f47;
        --brass-text: #dcbf85;
        --brass-soft: rgb(201 164 92 / 0.13);

        --ok: #5faf7e;
        --ok-text: #8ccba3;
        --ok-soft: rgb(95 175 126 / 0.13);
        --warn: #d4913f;
        --warn-text: #e5b57a;
        --warn-soft: rgb(212 145 63 / 0.13);
        --danger: #e0605a;
        --danger-text: #f0958f;
        --danger-soft: rgb(224 96 90 / 0.13);
        --info: var(--accent);
        --info-text: var(--accent-text);
        --info-soft: var(--accent-soft);

        /* SF Pro on Apple devices; Inter + Heebo as the closest free match elsewhere */
        --font-ui: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Heebo', 'Segoe UI', sans-serif;
        --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', 'Heebo', 'Segoe UI', sans-serif;
        --font-mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;

        /* 1.25 scale from 15px */
        --text-xs: 0.8rem;
        --text-sm: 0.875rem;
        --text-md: 1rem;
        --text-lg: 1.25rem;
        --text-xl: 1.5625rem;
        --text-2xl: 1.953rem;

        --space-1: 0.25rem;
        --space-2: 0.5rem;
        --space-3: 0.75rem;
        --space-4: 1rem;
        --space-5: 1.5rem;
        --space-6: 2rem;
        --space-7: 3rem;

        --radius-sm: 4px;
        --radius-md: 6px;
        --radius-lg: 8px;

        --shadow-overlay: 0 18px 48px rgb(0 0 0 / 0.55);
        --backdrop: rgb(8 9 11 / 0.72);
        --focus-ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);

        --topbar-height: 56px;
        --sidebar-width: 244px;
        --content-width: 1200px;
        --reading-width: 760px;
        --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
    }

    /* Daylight console: same hues, darkened to hold contrast on white panels */
    :root[data-theme="light"] {
        color-scheme: light;

        --bg: #eef0f3;
        --surface-sunken: #e3e6ea;
        --surface-1: #f8f9fb;
        --surface-2: #ffffff;
        --surface-3: #e8ebef;
        --line: #d4d8de;
        --line-strong: #b9c0c9;

        --text: #1a1d22;
        --text-muted: #474e58;
        --text-dim: #5b636e;

        --accent: #3a68b8;
        --accent-strong: #2f5ba8;
        --accent-text: #2b579f;
        --accent-soft: rgb(58 104 184 / 0.1);

        --brass: #a88233;
        --brass-strong: #8f6d27;
        --brass-text: #6f5520;
        --brass-soft: rgb(168 130 51 / 0.12);

        --ok: #2f8a56;
        --ok-text: #226b42;
        --ok-soft: rgb(47 138 86 / 0.1);
        --warn: #b36f1c;
        --warn-text: #8a5412;
        --warn-soft: rgb(179 111 28 / 0.1);
        --danger: #c8443e;
        --danger-text: #a8322d;
        --danger-soft: rgb(200 68 62 / 0.1);

        --shadow-overlay: 0 18px 48px rgb(20 28 40 / 0.16);
        --backdrop: rgb(30 38 50 / 0.35);
    }
}
