/*
 * Alii design tokens.
 *
 * One scale for colour, type, spacing, radius and elevation. Pages consume
 * these instead of re-declaring literal values in per-component <style> blocks.
 *
 * Contrast ratios in the comments are against white unless stated otherwise.
 * The brand mint (--alii-green) is a decorative fill only: white text on it
 * measures 1.98:1, so anything carrying white text uses --alii-teal-action.
 */

:root {
    /* ── Brand teal ─────────────────────────────────────────── */
    --alii-teal-tint: #EAF6F3; /* active nav rows, info panels            */
    --alii-teal-tint-border: #C9E8E1;
    --alii-teal-brand: #7FC5BA; /* the brand mint - fills behind dark text */
    --alii-teal-mark: #0C8A78; /* chart marks, validated for CVD          */
    --alii-teal-action: #0A7A6B; /* buttons + bars carrying white  5.24:1   */
    --alii-teal-text: #1F6F63; /* teal text on white             5.98:1   */
    --alii-teal-deep: #0E3B35; /* text on --alii-teal-tint                */

    /* ── Accent / exclude ───────────────────────────────────── */
    --alii-orange-tint: #FBEDE8;
    --alii-orange-brand: #E7511F; /* existing brand accent                   */
    --alii-orange-fill: #C4451D; /* white text                     4.98:1   */
    --alii-orange-text: #B03E19; /* on white                       5.92:1   */

    /* ── Amber / maybe / needs attention ────────────────────── */
    --alii-amber-tint: #FAF1E0;
    --alii-amber-fill: #9A6510; /* white text                     4.95:1   */
    --alii-amber-text: #8A5B0D; /* on white                       5.86:1   */
    --alii-amber-deep: #6E4809;

    /* ── Neutrals ───────────────────────────────────────────── */
    --alii-ink: #17201E; /* headings                      16.64:1   */
    --alii-ink-2: #43514E; /* body                           8.31:1   */
    --alii-ink-3: #66736F; /* muted, still AA                4.94:1   */
    --alii-line: #E3E9E7;
    --alii-line-soft: #EFF3F2;
    --alii-surface: #FFFFFF;
    --alii-ground: #F4F7F6;
    --alii-scroll-thumb: #C9D4D1; /* visible on surface and ground alike */
    --alii-scroll-thumb-hover: #9FADA9;

    /* ── Pipeline palette ───────────────────────────────────────
       Validated for colour-vision deficiency: all five pass the
       lightness band, chroma floor, CVD separation, normal-vision
       floor and 3:1 contrast against the surface. Adjacent-pair
       tritan separation sits in the 6-8 band, which is legal only
       with secondary encoding - hence the 2px gaps between segments
       and the legend carrying every count.
       Keep the order; the checks were run on it.                   */
    --alii-pipe-processing: #7B4FB5;
    --alii-pipe-voting: #C4841B;
    --alii-pipe-extracting: #3A5FD0;
    --alii-pipe-included: #0C8A78;
    --alii-pipe-excluded: #C4451D;

    /* ── Spacing ────────────────────────────────────────────── */
    --alii-space-1: 4px;
    --alii-space-2: 8px;
    --alii-space-3: 12px;
    --alii-space-4: 16px;
    --alii-space-5: 20px;
    --alii-space-6: 24px;
    --alii-space-8: 32px;
    --alii-space-10: 40px;

    /* ── Radius ─────────────────────────────────────────────── */
    --alii-radius-sm: 6px;
    --alii-radius-md: 8px;
    --alii-radius-lg: 11px;
    --alii-radius-xl: 14px;
    --alii-radius-pill: 999px;

    /* ── Elevation ──────────────────────────────────────────── */
    --alii-shadow-sm: 0 1px 2px rgba(23, 32, 30, .06);
    --alii-shadow-md: 0 4px 14px rgba(23, 32, 30, .08);
    --alii-shadow-lg: 0 12px 32px rgba(23, 32, 30, .12);

    /* ── Type ───────────────────────────────────────────────── */
    --alii-font: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --alii-text-page: 24px;
    --alii-text-title: 19px;
    --alii-text-panel: 15px;
    --alii-text-body: 13.5px;
    --alii-text-ui: 12.5px;
    --alii-text-meta: 11.5px;
    --alii-text-label: 10.5px;

    /* ── Focus ──────────────────────────────────────────────── */
    --alii-focus-ring: 0 0 0 2px #FFFFFF, 0 0 0 4px var(--alii-teal-action);

    /* ── Layout ─────────────────────────────────────────────── */
    --alii-topbar-height: 3.5rem;
    --alii-bucket-rail-width: 250px;
}

/*
 * Legacy aliases. Existing pages reference these names directly; they now
 * resolve to steps that pass contrast. --alii-green keeps the brand mint
 * because it is used as a decorative fill in places that do not carry text.
 */
:root {
    --alii-green: var(--alii-teal-brand);
    --alii-grey: var(--alii-ground);
    --alii-grey-text: var(--alii-ink-3);
    --alii-green-selected: var(--alii-teal-tint);
    --alii-secondary-color: var(--alii-orange-brand);
    --alii-green-hover: #0B8172;
    --alii-green-active: var(--alii-teal-action);
    --alii-green-focus: var(--alii-teal-action);
    --alii-green-focus-shadow: var(--alii-focus-ring);
}
