/* GPeC Audit — brand layer over the Helm token system.
 *
 * Two structural color decisions:
 *   1. The interactive accent is an ink indigo (deep, institutional — the
 *      "jury" color). Everything clickable speaks this voice.
 *   2. Gold is reserved exclusively for scores and awards (stars, medallions,
 *      podium ranks). Gold never means "click me"; it means "this is the mark".
 */

:root,
[data-theme="light"] {
  --accent: oklch(44% 0.115 272);
  --accent-hover: oklch(38% 0.12 272);
  --accent-fg: #ffffff;
  --accent-bg: oklch(95.5% 0.02 272);
  --accent-bg-strong: oklch(91.5% 0.038 272);
  --accent-border: oklch(83% 0.06 272);

  /* Award gold — score-only palette */
  --gold: oklch(62% 0.117 82);
  --gold-strong: oklch(54% 0.115 76);
  --gold-bg: oklch(96% 0.033 85);
  --gold-border: oklch(86.5% 0.072 84);

  /* Display face for page titles, big scores, rank numerals */
  --display-font: "Space Grotesk", "Inter", system-ui, sans-serif;

  /* Squarer geometry: half the Helm defaults (4/6/10/14px). Every rounded-*
   * utility and DS component reads these at runtime. */
  --radius-sm: 2px;
  --radius: 3px;
  --radius-lg: 5px;
  --radius-xl: 7px;
}

[data-theme="dark"] {
  --bg: oklch(20% 0.018 272);
  --bg-subtle: oklch(22.5% 0.02 272);
  --bg-muted: oklch(26% 0.022 272);
  --bg-hover: oklch(28% 0.024 272);
  --surface: oklch(24% 0.02 272);
  --surface-2: oklch(27.5% 0.022 272);

  --accent: oklch(74% 0.085 272);
  --accent-hover: oklch(80% 0.08 272);
  --accent-fg: oklch(17% 0.03 272);
  --accent-bg: oklch(29% 0.05 272);
  --accent-bg-strong: oklch(34% 0.06 272);
  --accent-border: oklch(43% 0.07 272);

  --gold: oklch(80% 0.117 86);
  --gold-strong: oklch(87% 0.122 90);
  --gold-bg: oklch(30% 0.05 82);
  --gold-border: oklch(43% 0.075 84);
}


/* ---------- Accessibility: high contrast ---------- */

[data-contrast="high"] {
  --bg: #ffffff;
  --surface: #ffffff;
  --fg: oklch(12% 0 0);
  --fg-muted: oklch(22% 0 0);
  --fg-subtle: oklch(30% 0 0);
  --fg-faint: oklch(38% 0 0);
  --border: oklch(45% 0 0);
  --border-strong: oklch(25% 0 0);
  --border-subtle: oklch(60% 0 0);
  --focus-ring: 0 0 0 3px oklch(55% 0.2 272);
}
[data-contrast="high"][data-theme="dark"] {
  --bg: oklch(10% 0 0);
  --bg-subtle: oklch(13% 0 0);
  --bg-muted: oklch(18% 0 0);
  --bg-hover: oklch(20% 0 0);
  --surface: oklch(12% 0 0);
  --surface-2: oklch(16% 0 0);
  --fg: oklch(98% 0 0);
  --fg-muted: oklch(90% 0 0);
  --fg-subtle: oklch(82% 0 0);
  --fg-faint: oklch(72% 0 0);
  --border: oklch(60% 0 0);
  --border-strong: oklch(80% 0 0);
  --border-subtle: oklch(45% 0 0);
}

/* ---------- Accessibility: relaxed reading (dyslexia-friendly) ---------- */

[data-reading="relaxed"] body {
  letter-spacing: 0.015em;
  word-spacing: 0.08em;
}
[data-reading="relaxed"] p,
[data-reading="relaxed"] li,
[data-reading="relaxed"] dd {
  line-height: 1.7;
}

/* ---------- Windows High Contrast / forced-colors ---------- */

@media (forced-colors: active) {
  /* Filled status dots/badges lose their background — give them borders. */
  [class*="rounded-full"],
  [class*="rounded-md"] {
    border: 1px solid CanvasText;
  }
}
