/* ==========================================================================
   Platform design tokens — v3.
   Design system: design-system/platform-core/MASTER.md (candidate C,
   "Scoreboard Neon", picked 2026-10-05): black with a green cast, one
   matrix-green accent, terminal radii (3/4/6px), mono display type,
   a single glow effect. Typographic UI — marks are letters, status is
   words; there is no icon system.
   Every accent derivative is computed from the single --accent via
   color-mix (see the @supports block below), so the operator's
   Settings.accent_color retints the whole system from base.html's
   inline `:root { --accent: … }` override.
   Dark-only.
   ========================================================================== */

:root {
    /* surfaces */
    --bg-page: #050807;
    --bg-surface: #0c130e;
    --bg-elevated: #111a14;
    --bg-hover: #17251b;
    --bg-inset: #030504;

    /* borders */
    --border-subtle: #1f2b22;
    --border-strong: #2e4a38;
    --hairline: rgba(255, 255, 255, 0.05);

    /* text */
    --text-primary: #e6f0e9;
    --text-secondary: #a8b8ad;
    --text-muted: #7e9486;

    /* accent pair (interactive). Static fallbacks first; the @supports
       block below recomputes these from --accent where color-mix exists. */
    --accent: #00e64d;
    --accent-2: #7dffb0;              /* gradient co-star (future Settings hook) */
    --accent-strong: #4dff85;
    --accent-deep: #00a82d;
    --accent-dim: rgba(0, 230, 77, 0.13);
    --accent-contrast: #001f0a;
    --grad-accent: linear-gradient(135deg, #00a82d 0%, #7dffb0 100%);

    /* brand gold — wordmark glyph and LVBP only */
    --gold: #e8ff5a;
    --gold-dim: rgba(232, 255, 90, 0.12);

    /* group hues (color-coded report families) */
    --hue-hitters: #ffb454;
    --hue-pitchers: #22d3ee;
    --hue-team: #a78bfa;
    --hue-plays: #34d399;
    --hue-stats: #f472b6;
    --hue-advanced: #818cf8;
    --hue-live: #fb7185;

    /* semantic */
    --pos: #34d399;
    --neg: #fb7185;
    --warn: #fbbf24;
    --info: #38bdf8;

    /* chart series (dense data pages) */
    --chart-1: #fb923c;
    --chart-2: #34d399;
    --chart-3: #a78bfa;
    --chart-4: #fb7185;
    --chart-5: #38bdf8;
    --chart-6: #fbbf24;
    --chart-7: #22d3ee;
    --chart-8: #f472b6;
    --chart-grid: rgba(126, 148, 134, 0.15);
    --seq-1: #052e13;
    --seq-2: #067a24;
    --seq-3: #00a82d;
    --seq-4: #00e64d;
    --seq-5: #7dffb0;
    --div-pos: #34d399;
    --div-neg: #fb7185;

    /* type */
    --font-sans: "Segoe UI Variable Display", -apple-system, BlinkMacSystemFont,
        "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas,
        "Liberation Mono", monospace;
    --text-xs: 0.75rem;
    --text-sm: 0.8125rem;
    --text-md: 0.9375rem;
    --text-base: 1rem;
    --text-lg: 1.25rem;
    --text-xl: 1.6rem;
    --text-2xl: 2.1rem;
    --text-3xl: 2.8rem;
    --leading-tight: 1.15;
    --leading-normal: 1.5;
    --fw-medium: 500;
    --fw-semibold: 600;

    /* spacing scale */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --space-8: 64px;

    /* motion */
    --dur-fast: 120ms;
    --dur: 180ms;
    --dur-slow: 280ms;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);

    /* focus */
    --focus-ring: 0 0 0 2px var(--bg-page), 0 0 0 4px var(--accent);

    /* geometry + effects */
    --radius-sm: 3px;
    --radius: 4px;
    --radius-lg: 6px;
    --shadow-card: inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 10px 30px rgba(0, 0, 0, 0.5);
    --glow-accent: 0 0 0 1px rgba(0, 230, 77, 0.4),
        0 0 24px rgba(0, 230, 77, 0.2);
    --nav-height: 62px;

    /* bootstrap bridging: stock components render dark for free */
    --bs-body-bg: var(--bg-page);
    --bs-body-color: var(--text-primary);
    --bs-body-font-family: var(--font-sans);
    --bs-border-color: var(--border-subtle);
    --bs-border-radius: var(--radius);
    --bs-border-radius-sm: var(--radius-sm);
    --bs-border-radius-lg: var(--radius-lg);
    --bs-link-color: var(--accent);
    --bs-link-hover-color: var(--accent-strong);
    --bs-secondary-color: var(--text-secondary);
    --bs-tertiary-bg: var(--bg-elevated);
    --bs-emphasis-color: #ffffff;
    --bs-primary: var(--accent);
    --bs-primary-rgb: 0, 230, 77;
    --bs-focus-ring-color: var(--accent-dim);
}

/* Accent derivatives — recomputed from whatever --accent is (the operator
   override in base.html sets only --accent). The static values above remain
   for browsers without color-mix (they simply keep the shipped green). */
@supports (color: color-mix(in srgb, red, blue)) {
    :root {
        --accent-strong: color-mix(in srgb, var(--accent) 72%, #ffffff);
        --accent-deep: color-mix(in srgb, var(--accent) 55%, #00150a);
        --accent-dim: color-mix(in srgb, var(--accent) 13%, transparent);
        --grad-accent: linear-gradient(135deg, var(--accent-deep) 0%, var(--accent-2) 100%);
        --glow-accent: 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent),
            0 0 24px color-mix(in srgb, var(--accent) 20%, transparent);
        --focus-ring: 0 0 0 2px var(--bg-page), 0 0 0 4px var(--accent);
        --bs-focus-ring-color: var(--accent-dim);
    }
}
