/* Dark theme (theme.js sets <html data-theme="dark">). The page's colours read var(--d-…, <light colour>): unset in
   the light theme, so it keeps its own colours; here each group gets its dark one. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1120; --panel: #161b2e; --ink: #e8ebf5; --muted: #9aa3bd; --line: #2b3250;
  --indigo: #6676f5; --indigo-soft: #262d55; --boost-soft: #3a2a14;
  --d-panel: #161b2e; --d-glass: #161b2eeb; --d-panel2: #1c2238; --d-line: #2b3250; --d-soft: #262d55; --d-soft-line: #3a4380;
  --d-ok: #12322a; --d-ok-ink: #6ee7b0; --d-bad: #3a1a1f; --d-bad-ink: #ffadb1; --d-warn: #3a2c12; --d-warn-ink: #ffd28a;
  --d-info: #1a2a4a; --d-info-ink: #bfdbfe; --d-ink: #e8ebf5; --d-muted: #9aa3bd;
}
/* The side bar's words and icons, and the stage's open list button, in light ink: the light theme's dark indigo does not read on dark. */
:root[data-theme="dark"] { --nav-ink: #d3d8fc; --nav-line: #8f9bff55; }
:root[data-theme="dark"] .sidenav :is(.sn-k:not(.pn-treat > .sn-k), .fold, .sn-caret), :root[data-theme="dark"] .sidenav .sn-who small:not(.low) { color: #aab3ee; }
:root[data-theme="dark"] .mer-list[aria-expanded="true"] { color: #d3d8fc; }
:root[data-theme="dark"] .sidenav.sidenav.mode .pn-tiles > button svg { background: #3a4380; color: #e3e6ff; }
:root[data-theme="dark"] .sidenav.sidenav.mode .pn-tiles > button.on { color: #d3d8fc; }
/* The Theme choice's swatches in Settings. */
:is(.set-bones, .bstyles) .sw-t-light { background: linear-gradient(135deg, #fff 50%, #e8eafc 50%); }
:is(.set-bones, .bstyles) .sw-t-dark { background: linear-gradient(135deg, #161b2e 50%, #262d55 50%); }
:is(.set-bones, .bstyles) .sw-t-auto { background: linear-gradient(135deg, #fff 50%, #161b2e 50%); }
/* The logo is dark ink on a clear ground: light ink on the dark panels, its colours kept. */
:root[data-theme="dark"] :is(.brand-logo, .sidenav .sn-head img) { filter: invert(1) hue-rotate(180deg); }
/* The tour's card stands out from the dark panels around it: a lighter ground with a pale edge. */
:root[data-theme="dark"] .tour-card { background: #2d3668; box-shadow: 0 0 0 1px #9aa5ff8c, 0 24px 60px -20px #000c; }
:root[data-theme="dark"] .tour-card p { color: #dfe3f8; }
:root[data-theme="dark"] .tour-card :is(.tour-n, .tour-x) { color: #b9c1ee; }
:root[data-theme="dark"] .tour-back { background: #3a4480; border-color: #9aa5ff66; color: #e3e6ff; }
:root[data-theme="dark"] .tour-dots i:not(.on) { background: #56609c; }

/* The account menu: the light card's purple name band over a deep indigo card that stands off the navy panels (account.css). */
:root[data-theme="dark"] .acct-menu { background: #1f2550; border-color: #3a4380; color: #eef0ff; box-shadow: 0 18px 44px #00000099; --d-panel2: #2a3166; --indigo: #8f9bff; --muted: #a9b0e0; --line: #3a4380; --d-out: #ff6b6f; }
/* Dark theme over the light background: the body-tool column keeps its light colours, or its icons (light ink) vanish
   on the white buttons. */
:root[data-theme="dark"]:not([data-bg="dark"]) :is(.tools, .home, .shr) { --bt-card: #fff; --bt-tile: #f1f2f6; --bt-soft: #e8eafc; --bt-ink: #141821; --bt-line: #dde1e8; --bt-acc: #4b5bdc; }
