/* NIGHT 51 — Proactive Design System Tokens
 *
 * Single source of truth for layout/chart/sparkline constraints, series colors,
 * trend (inverted) colors, percentile bands, spacing scale, typography.
 *
 * Cascade Layers — DETERMINISTIC, no !important needed.
 * Layer order: later layers always win, regardless of selector specificity.
 * `enforcement` is declared LAST so layout-enforcement.css always wins.
 */
@layer reset, base, components, utilities, enforcement;

:root {
    /* Layout constraints — charts and content ALWAYS centered */
    --content-max-width: 1120px;
    --content-margin: 0 auto;
    --content-padding: 0 1.5rem;

    /* Chart constraints */
    --chart-max-width: 1120px;
    --chart-margin: 0 auto;
    --chart-min-height: 300px;
    --chart-border-radius: 8px;

    /* Sparkline constraints */
    --sparkline-width: 120px;
    --sparkline-height: 32px;
    --sparkline-stroke-width: 1.5;

    /* Series colors (NO bars, only lines) */
    --series-perm: #22c55e;        /* green — PERM line */
    --series-lca: #3b82f6;         /* blue — LCA line */
    --series-warn: #ef4444;        /* red — WARN line */
    --series-combined: #a855f7;    /* purple — combined */

    /* Trend colors (INVERTED: up = bad, down = good) */
    --trend-up: #ef4444;           /* red — filing increase = bad */
    --trend-down: #22c55e;         /* green — filing decrease = good */
    --trend-flat: #eab308;         /* yellow — sideways */

    /* Percentile badge colors */
    --pctile-danger: #dc2626;      /* 1st-20th */
    --pctile-warning: #f59e0b;     /* 21st-40th */
    --pctile-neutral: #6b7280;     /* 41st-60th */
    --pctile-good: #22c55e;        /* 61st-80th */
    --pctile-great: #059669;       /* 81st-100th */

    /* Spacing scale (Night 51 named scale; coexists with numeric --space-1..24 from design_tokens.css) */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Typography */
    --font-body: 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --font-size-xs: 11px;
    --font-size-sm: 13px;
    --font-size-base: 15px;
    --font-size-lg: 18px;
    --font-size-xl: 24px;
    --font-size-2xl: 32px;
}
