/* Theme: the company light / dark palette and font, as in the other company apps
 * (cm-coding "Light/dark theme"). It re-points the design system's semantic tokens
 * (tokens.css) at that palette, so every hr-* component and styles.css follows it
 * without a colour of its own.
 *
 * Cascade: light is the base; the OS dark setting applies automatically unless the
 * user has chosen light; an explicit dark choice (data-theme="dark") always wins.
 */
:root {
  --font-sans: system-ui, -apple-system, "Sukhumvit Set", "Noto Sans Thai", sans-serif;
  --font-thai: system-ui, -apple-system, "Sukhumvit Set", "Noto Sans Thai", sans-serif;
  color-scheme: light;

  --surface-page: #f3f5f9;
  --surface-card: #ffffff;
  --surface-sunken: #f3f5f9;
  --surface-stage: #eef1f6;
  --border: #d5dbe6;
  --border-strong: #667085;
  --ink: #1b2433;
  --ink-muted: #667085;
  --ink-link: #0a5bd6;
  --heading: #0b3a82;
  --action: #0a5bd6;
  --action-hover: #084bb0;
  --on-action: #ffffff;
  --accent: #0a5bd6;
  --on-accent: #ffffff;
  --focus-ring: #0a5bd6;
  --success: #1b7f3b;
  --warning: #7a5b00;
  --danger: #c62828;
  --shadow-card: 0 1px 3px rgba(16, 24, 40, 0.12);
  --shadow-overlay: 0 8px 32px rgba(16, 24, 40, 0.24);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --surface-page: #0f141c;
    --surface-card: #18202c;
    --surface-sunken: #0f141c;
    --surface-stage: #121a25;
    --border: #2c394b;
    --border-strong: #9aa6b8;
    --ink: #e6ebf2;
    --ink-muted: #9aa6b8;
    --ink-link: #9cc2ff;
    --heading: #9cc2ff;
    --action: #4b8dff;
    --action-hover: #7aa8ff;
    --on-action: #06142e;
    --accent: #4b8dff;
    --on-accent: #06142e;
    --focus-ring: #9cc2ff;
    --success: #6fd48b;
    --warning: #f2cf6b;
    --danger: #ff7b7b;
    --shadow-card: none;
    --shadow-overlay: 0 12px 40px rgba(0, 0, 0, 0.7);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --surface-page: #0f141c;
  --surface-card: #18202c;
  --surface-sunken: #0f141c;
  --surface-stage: #121a25;
  --border: #2c394b;
  --border-strong: #9aa6b8;
  --ink: #e6ebf2;
  --ink-muted: #9aa6b8;
  --ink-link: #9cc2ff;
  --heading: #9cc2ff;
  --action: #4b8dff;
  --action-hover: #7aa8ff;
  --on-action: #06142e;
  --accent: #4b8dff;
  --on-accent: #06142e;
  --focus-ring: #9cc2ff;
  --success: #6fd48b;
  --warning: #f2cf6b;
  --danger: #ff7b7b;
  --shadow-card: none;
  --shadow-overlay: 0 12px 40px rgba(0, 0, 0, 0.7);
}

/* headings sit on the adaptive page/card, so they get their own colour token */
h1, h2, .h1, .h2, .card > h2 { color: var(--heading); }
