/*
 * Token layer 2 — the light theme.
 *
 * Roles only, and the complete set: a role defined here and missing from
 * theme_dark.css is a visible omission rather than a component that silently
 * falls back to nothing. Nothing theme-independent belongs in this file —
 * primitives, type, spacing and radii live in tokens.css, which is linked
 * alongside both theme sheets.
 *
 * This is the unconditional sheet: its roles sit on bare :root, so light is what
 * the document shows until data-theme="dark" says otherwise. That also makes it
 * the safe fallback for a browser that never ran the head script.
 */

:root {
    /* --- Browser chrome --------------------------------------------------- */
    /* The counterpart to theme_dark.css: it keeps the browser drawing its own
       controls light even where the operating system is set to dark. */

    color-scheme: light;

    /* --- Surfaces and lines ---------------------------------------------- */

    --color-surface: var(--bl-gray-0);
    --color-surface-sunken: var(--bl-gray-50);
    --color-border: var(--bl-gray-100);
    --color-border-strong: var(--bl-gray-200);

    /* --- Text -------------------------------------------------------------*/

    --color-text-primary: var(--bl-gray-1000);
    --color-text-secondary: var(--bl-gray-700);
    --color-text-muted: var(--bl-gray-500);
    --color-link: var(--bl-blue-600);

    /* --- Accent and focus -------------------------------------------------*/
    /* The ground a primary action is drawn on, what reads on top of it, and
       the ring every focused control takes. */

    --color-accent: var(--bl-gray-1000);
    --color-on-accent: var(--bl-gray-0);
    --color-focus: var(--bl-blue-600);

    /* --- Overlays ---------------------------------------------------------*/
    /* What a modal dims the page behind it with, and the lift an overlay has
       off the surface it covers. */

    --color-scrim: color-mix(in srgb, var(--bl-gray-1000) 40%, transparent);
    --shadow-overlay: 0 8px 24px color-mix(in srgb, var(--bl-gray-1000) 16%, transparent);

    /* --- Status families --------------------------------------------------*/

    --color-critical-fg: var(--bl-red-500);
    --color-critical-bg: var(--bl-red-50);
    --color-critical-border: var(--bl-red-100);

    --color-warn-fg: var(--bl-amber-500);
    --color-warn-bg: var(--bl-amber-50);
    --color-warn-border: var(--bl-amber-100);

    --color-ok-fg: var(--bl-green-500);
    --color-ok-bg: var(--bl-green-50);
    --color-ok-border: var(--bl-green-100);

    --color-info-fg: var(--bl-blue-500);
    --color-info-bg: var(--bl-blue-50);
    --color-info-border: var(--bl-blue-100);

    --color-neutral-fg: var(--bl-gray-700);
    --color-neutral-bg: var(--bl-gray-50);
    --color-neutral-border: var(--bl-gray-200);

    /* --- Chart series ramp ------------------------------------------------*/
    /* A numbered sequence, not a set of meanings: a chart that encodes status
       uses the status roles above instead. */

    --chart-1: var(--bl-blue-500);
    --chart-2: var(--bl-green-500);
    --chart-3: var(--bl-amber-500);
    --chart-4: var(--bl-red-500);
    --chart-5: var(--bl-violet-500);
    --chart-6: var(--bl-teal-500);
    --chart-7: var(--bl-pink-500);
    --chart-8: var(--bl-slate-500);

    /* --- Chart ramps -----------------------------------------------------*/
    /* One hue per Insights view, step 1 the palest. The largest value takes
       the heaviest step, so it is the strongest mark on the chart. */

    --chart-channels-1: var(--bl-ramp-blue-1);
    --chart-channels-2: var(--bl-ramp-blue-2);
    --chart-channels-3: var(--bl-ramp-blue-3);
    --chart-channels-4: var(--bl-ramp-blue-4);
    --chart-channels-5: var(--bl-ramp-blue-5);
    --chart-channels-6: var(--bl-ramp-blue-6);

    --chart-classification-1: var(--bl-ramp-teal-1);
    --chart-classification-2: var(--bl-ramp-teal-2);
    --chart-classification-3: var(--bl-ramp-teal-3);
    --chart-classification-4: var(--bl-ramp-teal-4);
    --chart-classification-5: var(--bl-ramp-teal-5);
    --chart-classification-6: var(--bl-ramp-teal-6);

    --chart-flow-1: var(--bl-ramp-ink-1);
    --chart-flow-2: var(--bl-ramp-ink-2);
    --chart-flow-3: var(--bl-ramp-ink-3);
    --chart-flow-4: var(--bl-ramp-ink-4);
    --chart-flow-5: var(--bl-ramp-ink-5);
    --chart-flow-6: var(--bl-ramp-ink-6);

    /* A missing value (Unclassified, Unknown), and what a series fades to
       while another is hovered. */
    --chart-gap: var(--bl-gray-400);
    --chart-muted: var(--bl-gray-200);

    /* --- Avatar tones -----------------------------------------------------*/
    /* Eight pale grounds with the deep ink of the same hue, one picked per
       name so the same person always wears the same colour. A sequence, not a
       set of meanings: no tone says anything about whom it marks. */

    --color-avatar-1-bg: var(--bl-red-50);
    --color-avatar-1-fg: var(--bl-red-800);
    --color-avatar-2-bg: var(--bl-amber-50);
    --color-avatar-2-fg: var(--bl-amber-800);
    --color-avatar-3-bg: var(--bl-green-50);
    --color-avatar-3-fg: var(--bl-green-800);
    --color-avatar-4-bg: var(--bl-blue-50);
    --color-avatar-4-fg: var(--bl-blue-800);
    --color-avatar-5-bg: var(--bl-gray-100);
    --color-avatar-5-fg: var(--bl-gray-700);
    --color-avatar-6-bg: color-mix(in srgb, var(--bl-violet-500) 12%, var(--bl-gray-0));
    --color-avatar-6-fg: color-mix(in srgb, var(--bl-violet-500) 70%, var(--bl-gray-1000));
    --color-avatar-7-bg: color-mix(in srgb, var(--bl-pink-500) 12%, var(--bl-gray-0));
    --color-avatar-7-fg: color-mix(in srgb, var(--bl-pink-500) 70%, var(--bl-gray-1000));
    --color-avatar-8-bg: color-mix(in srgb, var(--bl-teal-500) 12%, var(--bl-gray-0));
    --color-avatar-8-fg: color-mix(in srgb, var(--bl-teal-500) 70%, var(--bl-gray-1000));
}
