/* Light is the incumbent design. Dark remaps roles, retaining the same geometry. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #111716;
  --surface: #1A2321;
  --sidebar: #151D1B;
  --quiet: #1D2825;
  --subtle: #25332E;
  --line: #364740;
  --control: #718C81;
  --ink: #E7EFEC;
  --muted: #A9BDB4;
  --action: #55D6BD;
  --action-hover: #7BE4CF;
  --on-action: #102720;
  --mint: #203D32;
  --success: #87DDB4;
  --warning: #F0C575;
  --warning-bg: #3C301C;
  --danger: #F0A3B0;
  --danger-bg: #40262E;
  --on-danger: #32151D;
  --info: #A1C7F0;
  --info-bg: #233549;
  --disabled-bg: #2B3832;
  --disabled-text: #83998E;
  --hover-row: #22312B;
  --selected: #243F34;
  --cover: #20352E;
  --chat: #161F1C;
  --bubble-self: #284638;
  --selection: #345E4D;
  --bar-soft: #6BAB91;
  --shadow: 0 14px 45px rgb(0 0 0 / .32);
  --overlay: rgb(0 0 0 / .65);
  --tooltip-bg: #E7EFEC;
  --tooltip-text: #16271F;
  --series-1: #55D6BD;
  --series-2: #8DB9ED;
  --series-3: #E3B76C;
  --series-4: #E69CAF;
  --gauge-track: #52675D;
  --heat-low-bg: #1D2D25;
  --heat-low-border: #536F60;
  --heat-mid-bg: #365643;
  --heat-mid-border: #6C957D;
  --heat-high-bg: #81B798;
  --heat-high-text: #102B23;
  --heat-high-border: #97C9AC;
}

/* Native select: immediate response, keyboard semantics and no page rerender. */
.presentation-tools { display: flex; align-items: center; gap: 18px; flex: none; }
.theme-control { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.theme-control select { min-height: 40px; padding: 7px 25px 7px 10px; border: 1px solid var(--control); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 12px; cursor: pointer; }
.theme-control select:hover { border-color: var(--action); }
.presentation-header { gap: 22px; }
:root { scrollbar-color: var(--control) var(--paper); }
summary:focus-visible, .chart-table:focus-visible { outline: 3px solid var(--action); outline-offset: 3px; }
dialog { background: var(--surface); }

/* Keep the supplied artwork unchanged and readable on its original light field. */
[data-theme="dark"] .brand img,
[data-theme="dark"] .brand-board img,
[data-theme="dark"] .document-preview img { background: #FFFFFF; border-radius: 6px; }

@media (max-width: 1150px) {
  .presentation-header { gap: 14px; }
  .presentation-tools { gap: 10px; }
}
@media (max-width: 700px) {
  .presentation-header { gap: 0; }
  .presentation-tools { margin-left: auto; gap: 12px; }
  .theme-control { gap: 6px; }
  .presentation-tools .study-label { display: none; }
}
