/* tokens.css — the one palette, type and motion scale. Load first, every page. */
/* Ratios below are WCAG 2.x contrast against the page ground, measured with
   relative luminance; tests/a11y.mjs asserts every text pair and no violet. */

:root {
  /* Palette (plan section 4). No violet anywhere in this set. */
  --bg: #080B12;            /* page ground */
  --surface: #0F1520;       /* cards, nav */
  --surface-2: #16202F;     /* hover surface */
  --border: #24314A;        /* hairlines */
  --border-strong: #5B6E93; /* focus, active — 3.84:1 on --bg, 3.20:1 on --surface-2 */
  --text: #E6EAF2;          /* body, 16.3:1 on --bg */
  --text-dim: #A6B0C2;      /* captions, 9.0:1 on --bg */
  --accent: #A9FF3D;        /* primary action, active nav, XP fill, 16.0:1 on --bg */
  --accent-ink: #0A0F18;    /* text on --accent, 15.6:1 */
  --accent-2: #2BD6FF;      /* links, focus ring, 11.4:1 on --bg */
  --gold: #FFC94A;          /* achievement chips, 11.9:1 on --surface */
  --coral: #FF7A59;         /* "new" markers, 7.7:1 on --bg */
  --error: #FF5D7A;         /* form errors only, 6.2:1 on --surface; hue ~349 deg, so the hue-based no-violet test passes */

  /* Type families. Body text is the system stack; the woff2 only carries the display face. */
  --font-display: 'Chakra Petch', system-ui, sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-num: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Type scale: display, body, HUD, numerals. Nothing outside these. */
  --size-display: clamp(2.25rem, 6vw, 4.5rem);
  --size-body: 1.0625rem;   /* 17px */
  --size-hud: 0.75rem;      /* 12px */
  --size-num: 0.875rem;     /* 14px */
  --leading-display: 1.02;
  --leading-body: 1.65;
  --tracking-hud: 0.12em;
  --measure: 68ch;

  /* Motion — consumed by components.css and motion.css. */
  --m-in: 150ms;
  --m-out: 120ms;
  --m-press: 90ms;
  --m-panel: 200ms;
  --m-img: 600ms;
  --ease: cubic-bezier(.2,.8,.2,1);
  --ease-enter: cubic-bezier(.22,1,.36,1);

  /* Shape and layout. */
  --radius: 6px;
  --wrap: 1160px;
}

/* Latin subset, weight 600 only. OFL — see ../fonts/OFL.txt. */
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  src: url('../fonts/chakra-petch-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
