/*
 * The design tokens, approved by Nasser (D20, docs/DESIGN_UI.md §2), copied from prototype/assets/tokens.css.
 * The one place for colour, type, radius, shadow and motion. Same names as the family's
 * game-ui tokens where they exist (--brand, --accent, --surface, --ink …).
 *
 * Identity: midnight ink (header, TV) with the family's yellow for the main action, and the two team colours, neon
 * pink and electric blue, which also carry the signature: a pink-to-blue line under the header. Team colours were
 * checked for the three kinds of colour blindness (docs/brand/_tools/cvd.py, CIEDE2000 ≥ 20) and always come with a
 * pattern too: stripes for the first team, dots for the second.
 */
:root {
  color-scheme: light;
  /* Brand */
  --brand: #191c45;
  --brand-2: #262a66;
  --brand-ink: #262a66;
  --on-brand: #ffffff;
  --path: #f5c518;
  --gu-font: 'Tajawal', 'Poppins', system-ui, sans-serif;
  --gu-font-latin: 'Poppins', 'Tajawal', system-ui, sans-serif;
  --brand-soft: #e9eafb;
  --accent: #f5c518;
  --accent-2: #e0a800;
  --on-accent: #191c45;
  /* Surfaces and text */
  --bg: #f1f2f8;
  --surface: #ffffff;
  --surface-2: #f7f8fc;
  --ink: #171a3a;
  --muted: #646887;
  --line: #e2e4f0;
  --ok: #16a34a;
  --ok-soft: #e7f7ed;
  --bad: #e11d48;
  --bad-soft: #fde8ee;
  /* Teams */
  --team-a: #e5177a;
  --team-a-2: #ff4d9d;
  --team-a-soft: #fde6f1;
  --team-a-mark: #8a0045;
  --team-b: #0a84d6;
  --team-b-2: #38b6ff;
  --team-b-soft: #e1f2fd;
  /* Phone mode's third and fourth players (D19): amber with horizontal lines, green with a grid */
  --team-c: #e07b00;
  --team-c-soft: #fff1de;
  --team-d: #109a6a;
  --team-d-soft: #e0f6ee;
  --team-b-mark: #003e6b;
  /* The board */
  --cell: #ffffff;
  --cell-edge: #d9dcef;
  --cell-ink: #191c45;
  --cell-pick: #f5c518;
  --board-bg: #e9eaf6;
  /* The tiles (wesh-app#183, «اللمسة الفنية»): the bed is a tray lit from above, an empty tile's edge, and how much
     black a coloured tile's edge takes */
  --bed-top: #dde0f2;
  --bed-bottom: #c9cde6;
  --cell-lip: #b9bedc;
  --lip: 32%;
  /* TV (always dark) */
  --tv-bg: #0b0d22;
  --tv-bg-2: #1b1854;
  --tv-surface: rgba(255, 255, 255, .06);
  --tv-line: rgba(255, 255, 255, .12);
  --tv-ink: #f3f4ff;
  --tv-muted: #a8acd6;
  --tv-cell: #23275a;
  --tv-cell-ink: #f3f4ff;
  --tv-bed-top: #14173a;
  --tv-bed-bottom: #080a1c;
  --tv-cell-lip: #0e1030;
  /* Type */
  --font: 'Tajawal', system-ui, sans-serif;
  --font-num: 'Poppins', 'Tajawal', system-ui, sans-serif;
  --fs-xs: 12px;
  --fs-sm: 14px;
  --fs-md: 16px;
  --fs-lg: 19px;
  --fs-xl: 24px;
  --fs-2xl: 30px;
  --fs-3xl: 40px;
  /* Shape */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 999px;
  --gap: 16px;
  --tap: 48px;
  --shadow-1: 0 1px 2px rgba(23, 26, 58, .06), 0 2px 8px rgba(23, 26, 58, .05);
  --shadow-2: 0 4px 14px rgba(23, 26, 58, .10), 0 1px 3px rgba(23, 26, 58, .06);
  --shadow-cta: 0 4px 0 var(--accent-2);
  /* Motion */
  --t-fast: 120ms;
  --t-med: 240ms;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --brand: #0f1130;
  --brand-2: #1d2056;
  --brand-soft: #23275a;
  --bg: #0b0d22;
  --surface: #161a3d;
  --surface-2: #1c2049;
  --ink: #eef0ff;
  --muted: #a3a8d0;
  --line: #2a2f63;
  --ok-soft: #0f2f22;
  --bad-soft: #3a1022;
  --team-a: #f72585;
  --team-a-soft: #3c0f2a;
  --team-a-mark: #4a0020;
  --team-b: #22b8ee;
  --team-b-soft: #0c2b44;
  --team-c: #ff9a1f;
  --team-c-soft: #3a2608;
  --team-d: #22c38a;
  --team-d-soft: #0c3326;
  --team-b-mark: #002a40;
  --cell: #23275a;
  --cell-edge: #333873;
  --cell-ink: #eef0ff;
  --board-bg: #11143a;
  --bed-top: #14173a;
  --bed-bottom: #080a1c;
  --cell-lip: #0e1030;
  --lip: 55%;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-2: 0 6px 18px rgba(0, 0, 0, .35);
  --brand-ink: #7cc8f5;
}

/* The device's dark mode when the person has not chosen (theme.js sets data-theme when they do). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #0f1130;
    --brand-2: #1d2056;
    --brand-soft: #23275a;
    --bg: #0b0d22;
    --surface: #161a3d;
    --surface-2: #1c2049;
    --ink: #eef0ff;
    --muted: #a3a8d0;
    --line: #2a2f63;
    --ok-soft: #0f2f22;
    --bad-soft: #3a1022;
    --team-a: #f72585;
    --team-a-soft: #3c0f2a;
    --team-a-mark: #4a0020;
    --team-b: #22b8ee;
    --team-b-soft: #0c2b44;
    --team-c: #ff9a1f;
    --team-c-soft: #3a2608;
    --team-d: #22c38a;
    --team-d-soft: #0c3326;
    --team-b-mark: #002a40;
    --cell: #23275a;
    --cell-edge: #333873;
    --cell-ink: #eef0ff;
    --board-bg: #11143a;
    --bed-top: #14173a;
    --bed-bottom: #080a1c;
    --cell-lip: #0e1030;
    --lip: 55%;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-2: 0 6px 18px rgba(0, 0, 0, .35);
    --brand-ink: #7cc8f5;
  }
}
