/* Design tokens. Page colours follow the theme (OS setting, or the header switch stored by header.js).
   The header and footer keep the brand blue in both themes.
   Actions (buttons, switches, links) use blue from the brand family. Red means attention only: errors and the
   unread count on the bell. Gold marks a subscriber, and nothing else. */

:root {
  color-scheme: light;

  --bg: #f6f5f2;
  --surface: #ffffff;
  --surface-2: #dcdad3;
  --poster-bg: #ffffff;
  --text: #1b1c1f;
  --text-muted: #5f616a;
  --accent: #3b6aa0;
  --accent-hover: #325b8a;
  --accent-soft: #e3ecf6;
  --link: #3b6aa0;
  --danger: #c0392b;
  /* Right and wrong answers (quizzes, Mystery Car), and a close guess. */
  --success: #2e7d4f;
  --success-soft: #e4f3ea;
  --danger-soft: #fbe9e7;
  --warn-soft: #fbf1d9;
  /* A notice that must not be missed (the guest post vacation note): aci-admin's warning alert, Chakra orange */
  --notice-warn-bg: #ffedd5;
  --notice-warn-fg: #92310a;
  --border: #e3e1db;
  --border-strong: #d6d4cd;
  --control-border: #c4c1b8;
  --shadow-hover: 0 10px 24px rgba(27, 28, 31, .12);
  --focus-ring: #3b6aa0;
  --premium: #9a7400;
  --premium-from: #b8860b;
  --premium-to: #8a6400;

  --brand: #4c5f7a;
  --brand-deep: #2f3b4c;
  --brand-field: #3e4e65;
  --brand-field-border: #5d7090;
  --brand-input: #26303e;
  --brand-input-border: #4a5a70;
  --brand-line: #3f4d61;
  --brand-label: #9fb0c6;
  --brand-accent: #6f9bd1;
  --brand-button: #ffffff;
  --brand-button-hover: #e6ebf2;
  --on-brand: #ffffff;
  --on-brand-soft: #dbe2ec;
  --on-brand-muted: #c3ccd8;
  --badge: #c0392b;

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --font-heading: 'Montserrat', 'Inter', Arial, sans-serif;

  --radius: 8px;
  --radius-lg: 12px;
  --container: 1240px;
  --header-height: 56px;
}

@media (min-width: 768px) {
  :root {
    --header-height: 64px;
  }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --bg: #111214;
    --surface: #1c1d21;
    --surface-2: #2a2b30;
    --poster-bg: #000000;
    --text: #e8e6e1;
    --text-muted: #9d9a92;
    --accent: #4673ab;
    --accent-hover: #3d6597;
    --accent-soft: #1f2b3a;
    --link: #8fb4e3;
    --danger: #e0625c;
    --success: #5cb87a;
    --success-soft: #1b2e23;
    --danger-soft: #3a2220;
    --warn-soft: #342c17;
    --notice-warn-bg: #3b1106;
    --notice-warn-fg: #fdba74;
    --border: #26272b;
    --border-strong: #2c2d32;
    --control-border: #44474f;
    --shadow-hover: 0 10px 24px rgba(0, 0, 0, .4);
    --focus-ring: #8fb4e3;
    --premium: #e0b44c;
    --premium-from: #f6dc8a;
    --premium-to: #d4a72c;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #111214;
  --surface: #1c1d21;
  --surface-2: #2a2b30;
  --poster-bg: #000000;
  --text: #e8e6e1;
  --text-muted: #9d9a92;
  --accent: #4673ab;
  --accent-hover: #3d6597;
  --accent-soft: #1f2b3a;
  --link: #8fb4e3;
  --danger: #e0625c;
  --success: #5cb87a;
  --success-soft: #1b2e23;
  --danger-soft: #3a2220;
  --warn-soft: #342c17;
  --notice-warn-bg: #3b1106;
  --notice-warn-fg: #fdba74;
  --border: #26272b;
  --border-strong: #2c2d32;
  --control-border: #44474f;
  --shadow-hover: 0 10px 24px rgba(0, 0, 0, .4);
  --focus-ring: #8fb4e3;
  --premium: #e0b44c;
  --premium-from: #f6dc8a;
  --premium-to: #d4a72c;
}
