/* public/css/tokens.css
   The design system's tokens (the board's "A design system, then every page
   reworked", step 1): the one place colours, type, spacing, shapes and
   breakpoints are decided. Components (components.css) and reworked pages
   use only these; the older pages keep style.css until their turn.

   The identity: a management game's dashboard. Night-blue chrome (headers,
   page bands), light panels for the data, the pitch green of the logo as the
   brand and trophy gold as the accent. Every pair of text and background
   the components use meets WCAG AA (4.5:1; test/designSystem.test.js). */

:root {
    /* Brand: the pitch (the logo's green) and the trophy (its gold). */
    --ds-color-brand: #0f7a3a;
    --ds-color-brand-strong: #0a5c2b;
    --ds-color-brand-soft: #e3f3e8;
    --ds-color-on-brand: #ffffff;
    --ds-color-accent: #f2b705;
    --ds-color-accent-strong: #7a5800;
    --ds-color-accent-soft: #fff4cc;
    --ds-color-on-accent: #1d1600;

    /* Night: the chrome around the data (the page header band). */
    --ds-color-night: #0f1b2d;
    --ds-color-night-raised: #1a2a42;
    --ds-color-on-night: #eef3fa;
    --ds-color-on-night-muted: #a9b8cc;

    /* Panels and text. */
    --ds-color-bg: #eef1f5;
    --ds-color-surface: #ffffff;
    --ds-color-surface-sunken: #f5f7fa;
    --ds-color-border: #dbe1e8;
    --ds-color-border-strong: #b9c3cf;
    --ds-color-text: #14202e;
    --ds-color-text-muted: #515e70;
    --ds-color-focus: #2f6fd6;

    /* Results and states. */
    --ds-color-win: #1d7f45;
    --ds-color-draw: #626d7c;
    --ds-color-loss: #c22f3c;
    --ds-color-success: #18703d;
    --ds-color-success-soft: #e3f5ea;
    --ds-color-warning: #945600;
    --ds-color-warning-soft: #fff1dc;
    --ds-color-danger: #c22f3c;
    --ds-color-danger-soft: #fde8ea;
    --ds-color-info: #2a63c0;
    --ds-color-info-soft: #e6effc;

    /* League zones (league tables). */
    --ds-color-promotion: #1d7f45;
    --ds-color-promotion-soft: #eaf7ef;
    --ds-color-playoff: #945600;
    --ds-color-playoff-soft: #fff4e2;
    --ds-color-relegation: #c22f3c;
    --ds-color-relegation-soft: #fdecee;
    /* The player's own club, wherever it is listed. */
    --ds-color-own: #f2b705;
    --ds-color-own-soft: #fff8dd;

    /* Positions: keeper amber, defence blue, midfield green, attack red. */
    --ds-color-gk: #945600;
    --ds-color-df: #2a63c0;
    --ds-color-mf: #1d7f45;
    --ds-color-fw: #c22f3c;

    /* Type. One family; numbers in columns of equal width. */
    --ds-font-sans: 'Roboto', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
    --ds-font-size-xs: 0.75rem;
    --ds-font-size-sm: 0.875rem;
    --ds-font-size-md: 1rem;
    --ds-font-size-lg: 1.125rem;
    --ds-font-size-xl: clamp(1.25rem, 0.6vw + 1.05rem, 1.5rem);
    --ds-font-size-2xl: clamp(1.5rem, 1.4vw + 1.1rem, 2.25rem);
    --ds-font-size-stat: clamp(1.5rem, 1vw + 1.2rem, 2rem);
    --ds-font-weight-regular: 400;
    --ds-font-weight-medium: 500;
    --ds-font-weight-bold: 700;
    --ds-line-height-tight: 1.2;
    --ds-line-height-body: 1.5;
    /* Small uppercase labels (card titles, table heads, stat labels). */
    --ds-label-tracking: 0.06em;

    /* Spacing: a 4px step. */
    --ds-space-1: 0.25rem;
    --ds-space-2: 0.5rem;
    --ds-space-3: 0.75rem;
    --ds-space-4: 1rem;
    --ds-space-5: 1.5rem;
    --ds-space-6: 2rem;
    --ds-space-7: 3rem;
    /* The page's side gutter: tighter on phones. */
    --ds-gutter: clamp(0.75rem, 2.5vw, 1.5rem);
    --ds-content-max: 80rem;

    /* Shapes. */
    --ds-radius-sm: 4px;
    --ds-radius-md: 8px;
    --ds-radius-lg: 12px;
    --ds-radius-pill: 999px;
    --ds-shadow-sm: 0 1px 2px rgba(15, 27, 45, 0.08);
    --ds-shadow-md: 0 2px 8px rgba(15, 27, 45, 0.1), 0 1px 2px rgba(15, 27, 45, 0.06);
    --ds-border-width: 1px;
    --ds-focus-ring: 0 0 0 3px rgba(47, 111, 214, 0.45);

    /* Breakpoints, as Bulma's (custom properties can't be used in @media;
       these name the values the components use):
       phone < 769px · tablet 769px · desktop 1024px · wide 1216px. */
    --ds-bp-tablet: 769px;
    --ds-bp-desktop: 1024px;
    --ds-bp-wide: 1216px;

    /* Motion: short, and none for those who ask for less. */
    --ds-duration: 150ms;
}

@media (prefers-reduced-motion: reduce) {
    :root {
        --ds-duration: 0ms;
    }
}
