/* Design tokens — the single source for color, type, and spacing.
 *
 * Contrast is enforced by tests/test_tokens.py: every text/background pair
 * listed there must be ≥ 4.5:1 (WCAG 2.1 AA, design doc §19), non-text UI
 * ≥ 3:1. Change a color here and the test recomputes the ratios — 4.5:1
 * from first commit is a build gate, not an audit item.
 */

:root {
  /* surfaces */
  --color-bg: #ffffff;
  --color-surface: #f4f2ee;
  --color-surface-raised: #ffffff;
  --color-border: #cfcac1;

  /* text */
  --color-text: #211f1c;
  --color-text-muted: #5c5852;
  --color-text-inverse: #ffffff;

  /* brand + interaction */
  --color-primary: #0c5a89;        /* links, primary buttons (on bg/surface) */
  --color-primary-strong: #094568; /* hover/active */
  --color-on-primary: #ffffff;     /* text on primary-filled elements */
  --color-focus: #b3125f;          /* focus ring — ≥3:1 against bg and surface */

  /* feedback */
  --color-error: #b00020;
  --color-error-bg: #fdeef0;

  /* promoted disclosure badge (always labelled, §11) */
  --color-promoted-bg: #fff3dd;
  --color-promoted-text: #6d4a00;

  /* type */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;
  --leading: 1.55;

  /* spacing (4px scale) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;

  /* shape */
  --radius-sm: 6px;
  --radius-md: 10px;
  --max-width: 72rem;

  /* focus convention: 3px ring offset 2px, everywhere, no exceptions */
  --focus-ring: 3px solid var(--color-focus);
}
