/* ── Light theme (dark is the default, defined in variables.css) ───────────────
   Applied when <html data-theme="light">. Accent colours are darkened so text and
   badges keep >= 4.5:1 contrast on white; the "-dim" tints are stronger because
   8% alpha is invisible on a light background. */
:root[data-theme="light"] {
  color-scheme: light;
  --bg-base: #f3f5fa;
  --bg-surface: #ffffff;
  --bg-elevated: #eceff7;
  --bg-hover: #e3e8f4;
  --bg-active: #dae1f2;
  --border: #d6dbe8;
  --border-light: #c3cadb;
  --text-primary: #181e30;
  --text-secondary: #444d66;
  --text-muted: #626b86;
  --accent: #3459d4;
  --accent-dim: #3459d41c;
  --accent-hover: #2848b8;
  --green: #0b7a52;
  --green-dim: #0b7a5220;
  --amber: #9a5b00;
  --amber-dim: #b2690022;
  --red: #c42f2f;
  --red-dim: #c42f2f1c;
  --purple: #6a3dc0;
  --purple-dim: #6a3dc01c;
  --teal: #087590;
  --teal-dim: #08759020;
  --code-text: #1d6b3a;
  --code-text-warm: #7a4a14;
}
/* panel-scoped accents (layout.css hard-codes their hover colours for dark) */
:root[data-theme="light"] #panel-dashboard, :root[data-theme="light"] #panel-qa { --accent-hover: #065c72; }
:root[data-theme="light"] #panel-xsl, :root[data-theme="light"] #panel-codesearch, :root[data-theme="light"] #panel-buildsession,
:root[data-theme="light"] #panel-triage, :root[data-theme="light"] #panel-simulator { --accent-hover: #52299e; }
:root[data-theme="light"] .diff-line.add { background: #0b7a5220; }
:root[data-theme="light"] .diff-line.del { background: #c42f2f1c; }
:root[data-theme="light"] .xsl-output { background: var(--bg-elevated); }
:root[data-theme="light"] #login-overlay { background: var(--bg-base) !important; }
:root[data-theme="light"] ::-webkit-scrollbar-thumb { background: var(--border-light); }
/* smooth switch, but never on first paint */
html.theme-ready body, html.theme-ready .card, html.theme-ready #sidebar, html.theme-ready #topbar { transition: background-color .2s, color .2s, border-color .2s; }
