/* Design tokens (SPEC 8.5): brand primitives, then semantic tokens AA-checked by scripts/contrast-check.mjs (literal
   hex on purpose). The two dark blocks MUST stay identical (DarkTokensParityTest). */
:root {
  --dt-indigo: #2b3186; --dt-yellow: #f8d027; --dt-red: #ed2024; --dt-dark: #1b2831; --dt-black: #000000;
  --dt-green: #159b48; --dt-hero: #1a00bc;

  --bg: #ffffff; --surface: #fafafa; --surface-2: #e8e8e8;
  --text: #1b2831; --text-muted: #5b5b5b;
  --border: #767779; --divider: #cbcbcb;
  --link: #2b3186; --focus: #2b3186;
  --btn-bg: #2b3186; --btn-bg-hover: #1f2464; --btn-fg: #ffffff;
  --accent: #f8d027; --on-accent: #1b2831;
  --danger: #c8171b; --on-danger: #ffffff; --danger-bg: #fdecec;
  --success: #1a6f3e; --success-bg: #e7f5ec;
  --info: #2b3186; --info-bg: #eceeff;
  --warn: #7a5b00; --warn-bg: #fdf3c4;

  /* chrome (header, footer): dark in both themes */
  --chrome-bg: #000000; --chrome-2: #1b2831; --on-chrome: #ffffff; --chrome-muted: #cbcbcb; --chrome-focus: #f8d027;

  --radius: 4px; --tap: 3rem; --gutter: 1rem; --maxw: 72rem;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Bebas Neue", Impact, "Arial Narrow", sans-serif;
  --font-th: "Noto Sans Thai", "Inter", "Leelawadee UI", "Thonburi", system-ui, sans-serif;
  --font-hi: "Noto Sans Devanagari", "Inter", "Nirmala UI", "Kohinoor Devanagari", system-ui, sans-serif;
  --font-zh: "Inter", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", "Noto Sans CJK TC", system-ui, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121b21; --surface: #1b2831; --surface-2: #24343e;
    --text: #fafafa; --text-muted: #cbcbcb;
    --border: #8a8c8e; --divider: #3a4a54;
    --link: #9aa2ff; --focus: #f8d027;
    --btn-bg: #f8d027; --btn-bg-hover: #ffe066; --btn-fg: #1b2831;
    --accent: #f8d027; --on-accent: #1b2831;
    --danger: #ff7a7d; --on-danger: #1b2831; --danger-bg: #3a1f24;
    --success: #5ad19a; --success-bg: #17352a;
    --info: #9aa2ff; --info-bg: #232a5c;
    --warn: #f8d027; --warn-bg: #3a3410;
  }
}

:root[data-theme="dark"] {
  --bg: #121b21; --surface: #1b2831; --surface-2: #24343e;
  --text: #fafafa; --text-muted: #cbcbcb;
  --border: #8a8c8e; --divider: #3a4a54;
  --link: #9aa2ff; --focus: #f8d027;
  --btn-bg: #f8d027; --btn-bg-hover: #ffe066; --btn-fg: #1b2831;
  --accent: #f8d027; --on-accent: #1b2831;
  --danger: #ff7a7d; --on-danger: #1b2831; --danger-bg: #3a1f24;
  --success: #5ad19a; --success-bg: #17352a;
  --info: #9aa2ff; --info-bg: #232a5c;
  --warn: #f8d027; --warn-bg: #3a3410;
}
