/* Quorble design tokens.
   Every value here is lifted from design/palettes.html (the chosen direction).
   Rules behind them are in design/README.md. Do not add colours here without
   adding them to the palette page first.
   The indigo Competitive accent (#443C9C and its spoiler shade #7A74BF) was
   retired on 2026-10-31: no component reads it. Co-op and Competitive share
   every token; only the content differs. */

:root {
  /* ---- Neutral base (shared by both modes) ---- */
  --color-bg: #F4F3EF;        /* cream page background */
  --color-surface: #FFFFFF;   /* word rows, bars */
  --color-ink: #23262B;       /* primary text */
  --color-ink-2: #6B7078;     /* secondary text: 4.5:1 on cream */
  --color-line: #D9D7D0;      /* hairline borders */

  /* ---- Accents, the same in both modes ---- */
  --color-coop: #6F8F6A;      /* sage: the matched word's outline and the primary button */
  --color-spoiler: #5E7F9A;   /* the spoiler link, text only */

  /* ---- Danger: failed spoiler, penalty, urgent timer. The only red. ---- */
  --color-danger: #C62828;

  /* ---- Timer ramp: the bar moves through these by stage ---- */
  --timer-calm: #5B8C8C;      /* teal-grey */
  --timer-warn: #D9A441;      /* amber */
  --timer-urgent: #C62828;    /* same as --color-danger; the seconds figure goes red with it */

  /* ---- Player colours, all cool or neutral, none near the indigo.
     Each has a paired text colour for a letter on the dot. Contrast figures
     are letter-on-dot, as shown on the palette page: 4.5+ suits any text,
     3+ suits large bold letters only. ---- */
  --player-1: #2A6F97;  --player-1-ink: var(--color-surface);  /* 5.5 */
  --player-2: #2F8F8F;  --player-2-ink: var(--color-surface);  /* 3.9, large bold only */
  --player-3: #4E8A4A;  --player-3-ink: var(--color-surface);  /* 4.2, large bold only */
  --player-4: #8E5FA8;  --player-4-ink: var(--color-surface);  /* 4.8 */
  --player-5: #5B6B7C;  --player-5-ink: var(--color-surface);  /* 5.5 */
  --player-6: #1E5A4A;  --player-6-ink: var(--color-surface);  /* 8.0 */
  --player-7: #9AC36A;  --player-7-ink: var(--color-ink);      /* 7.5 */
  --player-8: #8FC4DE;  --player-8-ink: var(--color-ink);      /* 8.0 */
  --player-9: #7A7265;  --player-9-ink: var(--color-surface);  /* 4.7 */
  --player-10: #C3B3E0; --player-10-ink: var(--color-ink);     /* 7.8 */
  --player-11: #A7B8A0; --player-11-ink: var(--color-ink);     /* 7.2 */
  --player-12: #2B3A5C; --player-12-ink: var(--color-surface); /* 11.3 */

  /* ---- Type ---- */
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace; /* token values and codes only, never game UI */

  --text-xs: 12px;    /* footnotes, token values */
  --text-sm: 13px;    /* notes, timer seconds */
  --text-md: 14px;    /* top line, score line */
  --text-base: 15px;  /* body, lead, failed spoiler row */
  --text-lg: 17px;    /* word row */
  --text-xl: 21px;    /* section heading */
  --text-2xl: 26px;   /* the matched word */
  --text-3xl: 30px;   /* page title */

  --leading-tight: 1.1;   /* titles, the matched word */
  --leading-snug: 1.25;   /* small labels */
  --leading-normal: 1.4;  /* body */

  --weight-regular: 400;
  --weight-semibold: 600; /* headings, emphasised figures, spoiler link */
  --weight-bold: 700;     /* letter on a player dot only */

  /* ---- Space (4px steps; --space-half is for the 6/10/14 gaps inside a component) ---- */
  --space-half: 2px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 48px;

  /* ---- Shape: one radius, one hairline, one emphasis border ---- */
  --radius: 8px;
  --border: 1px;
  --border-strong: 2px;  /* the matched word's outline only */
  --border-focus: 2px;   /* focused control: drawn inside the hairline as an outline, never a glow */
  --color-focus: var(--color-ink); /* focus is ink, so a focused field is never mistaken for the matched word */

  /* ---- Sizes ---- */
  --dot: 10px;        /* player dot on a word row */
  --dot-lg: 52px;     /* player dot with a letter, e.g. in the room list */
  --bar: 8px;         /* timer bar height */
  --measure: 480px;   /* phone-first column width */

  /* ---- Controls: every input and button is one of these two heights, so they sit on one row ---- */
  --control: 48px;    /* plain input (room code, player name) and every button */
  --control-lg: 56px; /* the word entry box, and the Submit button beside it */

  /* ---- Motion: short, small, no bounce. Off entirely under prefers-reduced-motion (app.css only animates under
     no-preference). Distances stay at or under --move. ---- */
  --dur-fast: 150ms;  /* a mark popping in, a stamp */
  --dur-med: 250ms;   /* a screen fading in, a row rising */
  --dur-slow: 400ms;  /* a count-up, a burst, a highlight fading */
  --stagger: 50ms;    /* between rows that arrive one after another; capped so a list is in by ~600ms */
  --ease-out: cubic-bezier(.2, .7, .3, 1);   /* decelerates, never overshoots */
  --ease-in-out: cubic-bezier(.45, 0, .55, 1);
  --move: 6px;        /* how far anything travels */
  --color-highlight: color-mix(in srgb, var(--color-coop) 18%, transparent);   /* the winner's brief highlight: sage, faint */
}
