/*
 * RCC dark scheme (operator decision 2026-11-02). Load it after rcc-brand.css.
 *
 * It follows the browser's light/dark setting, but only on pages whose <html>
 * carries data-rcc-color-scheme="system". Surfaces render that attribute and
 * link this file from the one site switch rcc_web_color_scheme, so all RCC
 * pages change together and stay light until the switch is turned on. The
 * second selector outranks the Home-look blues that surfaces set on .rcc-brand.
 * Copies are synchronized by scripts/sync-rcc-branding.py.
 */
@media (prefers-color-scheme: dark) {
  :root[data-rcc-color-scheme="system"],
  :root[data-rcc-color-scheme="system"] .rcc-brand {
    color-scheme: dark;
    --rcc-navy: #8fb4ec;
    --rcc-navy-2: #b3cdf4;
    --rcc-cyan: #8c9eff;
    --rcc-cyan-light: #1d2c42;
    --rcc-cyan-strong: #a8b8ff;
    --rcc-green: #81c995;
    --rcc-red: #f28b82;
    --rcc-amber: #e8c15a;
    --rcc-ink: #e6e8eb;
    --rcc-muted: #a9b1bb;
    --rcc-line: #30353c;
    --rcc-paper: #1a1d21;
    --rcc-background: #121417;
    --rcc-surface-start: #1a1d21;
    --rcc-topbar-surface: #1a1d21;
    --rcc-border-soft: #30353c;
    --rcc-border-topbar: rgba(255, 255, 255, .12);
    --rcc-hero-end: #1d2c42;
    --rcc-hero-text: #a9b1bb;
    --rcc-status-dot: #81c995;
    --rcc-success-bg: #183323;
    --rcc-success-text: #a8dab5;
    --rcc-error-bg: #3b1d1c;
    --rcc-error-text: #f6aea9;
    --rcc-warning-bg: #352c12;
    --rcc-warning-text: #f3d77a;
    --rcc-unknown-bg: #23272d;
    --rcc-unknown-text: #a9b1bb;
    --rcc-input-border: #7d8590;
    --rcc-surface-sunken: #23272d;
    --rcc-focus-ring: rgba(143, 180, 236, .35);
    --rcc-code-bg: #23272d;
    --rcc-code-border: #30353c;
    --rcc-success-border: #3d6b4a;
    --rcc-error-border: #7a3b38;
    --rcc-warning-border: #6b5a22;
    --rcc-danger-bg: #2a1a1a;
    --rcc-danger-severe-border: #7a3b38;
    --rcc-status-dot-halo: rgba(129, 201, 149, .18);
    --rcc-shadow: 0 2px 6px rgba(0, 0, 0, .5);
    --rcc-shadow-sm: 0 1px 3px rgba(0, 0, 0, .4);
    --rcc-home-edge: #2b3036;
    --rcc-home-divider: #3a4048;
  }
  :root[data-rcc-color-scheme="system"] .rcc-brand .topbar { background: var(--rcc-paper); color: var(--rcc-ink); }
  :root[data-rcc-color-scheme="system"] .rcc-brand .topbar .brand-copy strong { color: var(--rcc-navy); }
  :root[data-rcc-color-scheme="system"] .rcc-brand .topbar .button.compact { border-color: var(--rcc-line); color: var(--rcc-navy); }
  /* The hospital logo is dark artwork for white backgrounds. */
  :root[data-rcc-color-scheme="system"] .rcc-brand .brand-logo,
  :root[data-rcc-color-scheme="system"] .rcc-brand .brand img { padding: 4px 8px; border-radius: 4px; background: #fff; }
}
