html.dark {
  --background: 220 13% 8%; --foreground: 45 10% 94%;
  --card: 220 11% 11%; --card-foreground: 45 10% 94%;
  --popover: 220 11% 11%; --popover-foreground: 45 10% 94%;
  --primary: 45 10% 94%; --primary-foreground: 220 13% 8%;
  --secondary: 220 9% 15%; --secondary-foreground: 45 10% 94%;
  --muted: 220 9% 15%; --muted-foreground: 220 6% 72%;
  --border: 220 7% 34%; --input: 220 7% 34%;
  --silver: 220 6% 72%;
  --gradient-hero: hsl(220 13% 8%); --gradient-primary: hsl(45 10% 94%);
  --gradient-silver: hsl(220 9% 15%); --gradient-card: hsl(220 11% 11%);
  --gradient-nav: hsl(220 13% 8%);
  --sidebar-background: 220 11% 11%; --sidebar-foreground: 45 10% 94%;
  --sidebar-primary: 45 10% 94%; --sidebar-primary-foreground: 220 13% 8%;
  --sidebar-accent: 220 9% 15%; --sidebar-accent-foreground: 45 10% 94%;
  --sidebar-border: 220 7% 34%;
  /* Standalone MegaBrands research documents use the source package's tokens. */
  --ink: #efeeea; --paper: #121418; --off: #202328;
  --g6: #b3b6bd; --g4: #969aa3; --g2: #454a53; --g1: #292d34;
  --redd: #ff735e;
  --surf: #202328; --line: #454a53; --mut: #b3b6bd;
}
/* Keep existing dark hero treatments and footer contrast intact. */
html.dark[data-wcrc-document] body { background: var(--paper); color: var(--ink); }
html.dark footer:not(.ft) { --primary: 220 15% 5%; --primary-foreground: 45 10% 94%; }
html.dark header img[src="/wcrc-logo.webp"], html.dark .logo img { background: #fff; }
.wcrc-static-theme-toggle { flex-shrink: 0; padding: 8px 10px; min-height: 40px; border: 1px solid var(--g2, #454a53); background: var(--paper, #fff); color: var(--ink, #0a0a0a); font: 600 .7rem 'JetBrains Mono', monospace; cursor: pointer; }
.wcrc-static-theme-toggle:hover { border-color: var(--red); }
.wcrc-static-theme-toggle:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
html.dark .hd { background: var(--paper); }
html.dark :is(.lead,.tiers p,.pills p,.tl p,.faq details p,.steps p,.zones p,.mods p) { color: #d2d4d9; }
html.dark :is(.filters input,.filters select,.btn.o) { background: var(--paper); color: var(--ink); }
html.dark :is(.btn:not(.o),.tag:not(.b2b)) { color: #121418; }
html.dark[data-wcrc-document="megabrands"] th { color: #121418; }
html.dark .btn.o:hover, html.dark .chips a:hover { color: #121418; }
html.dark :is(.band,.ft) { background: #080a0d; }
html.dark .band .btn { color: #fff; }
html.dark .ev div { background: #30343c; }
html.dark .ev div:nth-child(2) { background: #555; }
html.dark .ev div:nth-child(3) { background: var(--red); }
html.dark[data-wcrc-document="model"] :is(.top,.sim) { background: #080a0d; }
html.dark[data-wcrc-document="model"] .dek { color: #d2d4d9; }
html.dark[data-wcrc-document="model"] .card { background: var(--paper); }
html.dark[data-wcrc-document="model"] .btnr:hover { color: #121418; }
html.dark .ccd { background: #121418; color: #efeeea; }
html.dark .ccd .egg { --egg: #202328; }
html.dark .ccd section:not(.dark) .hair { border-color: #454a53; background: #454a53; }
html.dark .ccd section:not(.dark) .hair > * { background: #202328; }
html.dark .cc-demo-warning { background: #2b2020; color: #efeeea; }
@media print { .wcrc-static-theme-toggle { display: none; } }
