/*
 * Cortex9 App design tokens. This file is the ONLY place a colour literal may appear
 * (tools/css-lint enforces it). The values are the approved canvas, verbatim.
 *
 * Light is :root. Dark is [data-theme="dark"] on <html>, set by the theme toggle before the
 * first paint (index.html) and again whenever the visitor flips it.
 */

:root {
    /* ── Colour ── */
    --bg: #F2F5F8;
    --surface: #FFFFFF;
    --surface-2: #F3F6F9;
    --line: #E1E7EE;
    --line-strong: #C9D3DD;
    --ink: #13202D;
    --ink-2: #4F5D6E;
    --ink-3: #5E6A77;
    --action: #1FB8C8;
    --action-hover: #075861;
    --action-soft: #E3F5F7;
    --action-text: #0A6F7A;
    --on-action: #0D1319;
    --brand: #1E3A8A;
    --brand-soft: #E9EDF7;
    --brand-muted: #9DB4F2;
    --off: #7A8694;
    --warn: #B45309;
    --warn-soft: #FFF4E5;
    --warn-line: #F0D3A6;
    --warn-strong: #8A3F06;
    /* Calendar source badges (11/11): text on a solid --brand pill, and the soft teal's border. */
    --on-brand-solid: #FFFFFF;
    --action-line: #A9DDE3;
    --code-bg: #13202D;
    --code-ink: #E7EDF3;
    --scrim: rgba(13, 19, 25, 0.45);
    /* Pop-overs (the widget switcher list). */
    --shadow-pop: 0 8px 24px rgba(13, 19, 25, 0.12);
    --focus-ring: #0A6F7A;
    /* Primaries that carry white text (B0 named them for DevExpress): these keep it >= 5.9:1. */
    --dx-primary: #0A6F7A;
    --dx-primary-hover: #075861;
    --dx-primary-active: #054A52;
    /* Brand gradient (#1E3A8A → #1FB8C8 at 45°): logo, login and splash only. Same in both themes. */
    --brand-from: #1E3A8A;
    --brand-to: #1FB8C8;
    --brand-gradient: linear-gradient(45deg, var(--brand-from), var(--brand-to));
    /* Text on the brand gradient (login hero), and the old login's WCAG contrast scrim: transparent at
       the deep-blue end, rgba(13,19,25,.5) at the teal end, along the gradient's own 45° axis. */
    --on-brand: #FFFFFF;
    --on-brand-soft: rgba(255, 255, 255, 0.88);
    --brand-scrim: linear-gradient(45deg, rgba(13, 19, 25, 0) 0%, rgba(13, 19, 25, 0.5) 100%);
    /* The logo's connecting line: the gradient in light, a flat brand-muted in dark. */
    --logo-line: url(#c9-logo-gradient);

    color-scheme: light;

    /* ── Type ── */
    --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-heading: "Manrope", "Inter", system-ui, sans-serif;
    --font-brand: "Jura", "Inter", system-ui, sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

    --fs-11: 11px;
    --fs-12: 12px;
    --fs-13: 13px;
    --fs-14: 14px;
    --fs-15: 15px;
    --fs-17: 17px;
    --fs-19: 19px;
    --fs-28: 28px;
    --fs-30: 30px;
    --fs-32: 32px;

    --fw-semibold: 600;
    --fw-bold: 700;
    --fw-heavy: 800;

    --lh-tight: 1.25;
    --lh-body: 1.5;

    /* ── Shape ── */
    --radius-6: 6px;
    --radius-8: 8px;
    --radius-10: 10px;
    --radius-12: 12px;
    --radius-14: 14px;
    --radius-pill: 999px;

    /* ── Space ── */
    --gap-2: 2px;
    --gap-4: 4px;
    --gap-6: 6px;
    --gap-8: 8px;
    --gap-10: 10px;
    --gap-12: 12px;
    --gap-14: 14px;
    --gap-16: 16px;
    --gap-18: 18px;
    --gap-20: 20px;
    --gap-24: 24px;
    --gap-40: 40px;
    --gap-48: 48px;

    --pad-card: 22px 24px;
    --pad-page: 32px 36px;
    --pad-page-phone: 16px 16px;

    /* ── Sizes ── */
    --touch: 44px;
    --nav-link-h: 40px;
    --badge-h: 22px;
    --nav-w: 264px;
    --header-h: 64px;
    --content-max: 1600px;
    /* A text field never stretches past this inside a wide card: lines stay readable at --content-max. */
    --field-max: 760px;
}

[data-theme="dark"] {
    --bg: #0D1319;
    --surface: #151D26;
    --surface-2: #1B2530;
    --line: #263240;
    --line-strong: #34424F;
    --ink: #E7EDF3;
    --ink-2: #A9B5C2;
    --ink-3: #8D99A7;
    --action: #3CC6D6;
    --action-hover: #9BE7EF;
    --action-soft: #123A40;
    --action-text: #6FD8E4;
    --on-action: #0D1319;
    --brand: #9DB4F2;
    --brand-soft: #1A2240;
    --brand-muted: #4A62AE;
    --off: #64717F;
    --warn: #F2B66B;
    --warn-soft: #33240F;
    --warn-line: #5A4122;
    --warn-strong: #F7C98A;
    --on-brand-solid: #0D1319;
    --action-line: #1F5A62;
    --code-bg: #0A0F14;
    --code-ink: #E7EDF3;
    --scrim: rgba(0, 0, 0, 0.6);
    --shadow-pop: 0 8px 24px rgba(0, 0, 0, 0.45);
    --focus-ring: #6FD8E4;
    /* Primaries that carry white text (B0 named them for DevExpress): these keep it >= 5.9:1. */
    --dx-primary: #0A6F7A;
    --dx-primary-hover: #075861;
    --dx-primary-active: #054A52;
    --logo-line: #9DB4F2;

    color-scheme: dark;
}
