/* Shared Day/Night palette. No account data is stored by the theme control. */
:root {
  color-scheme: dark;
  --bg: #080d10; --surface: #0d151a; --ink: #eef5f4; --muted: #a0adb1; --accent: #a2f6de; --line: #263036;
  --accent-ink: #0a1c17; --accent-soft: #17372e;
  --yes: #f5c162; --yes-bg: #322710; --high: #f5b7a0; --high-bg: #3b241e;
  --ok: #a2f6de; --ok-bg: #17372e;
  --panel: #0d151a; --panel-fg: #eef5f4; --panel-muted: #a0adb1; --panel-line: #263036;
  --f-body: "Inter", "Segoe UI", sans-serif; --f-display: "Inter", "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", monospace; --mono: var(--f-mono); --sans: var(--f-body);
  --network-1: #a2f6de; --network-2: #73dfbc; --network-3: #4ecba5; --network-4: #32b990; --network-idle: #607876;
}
:root[data-theme="light"] {
  --accent-ink: #ffffff; --accent-soft: #e9f5ee;
  --yes: #805000; --yes-bg: #fff0d5; --high: #963c21; --high-bg: #ffede5;
  --ok: #086b58; --ok-bg: #d7eee2;
  --panel: #ffffff; --panel-fg: #112d2a; --panel-muted: #506866; --panel-line: #d4e1dc;
  --network-1: #087b65; --network-2: #138873; --network-3: #209981; --network-4: #30aa8e; --network-idle: #a5bcb5;
}
html { scroll-padding-top: 110px; }
body { font-family: var(--f-body); background: var(--bg); color: var(--ink); }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
/* The accepted night design is the default. Day changes the palette, not the layout. */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.theme-moon { display: none; }
[data-theme="light"] .theme-sun { display: none; }
[data-theme="light"] .theme-moon { display: block; }

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f9f8;
  --surface: #ffffff;
  --ink: #112d2a;
  --muted: #506866;
  --accent: #087b65;
  --line: #d4e1dc;
}
[data-theme="light"] ::selection { background: #b9ead9; color: #112d2a; }
[data-theme="light"] .site-header { border-color: #dce7e2; }
[data-theme="light"] .desktop-nav,
[data-theme="light"] .footer-links { color: #506866; }
[data-theme="light"] .button { color: #ffffff; }
[data-theme="light"] .button:hover { background: #086b58; box-shadow: 0 8px 24px #12634f14; }
[data-theme="light"] .button-small { background: #112d2a; border-color: #112d2a; }
[data-theme="light"] .button-small:hover { background: #24453d; }
[data-theme="light"] .microcopy,
[data-theme="light"] .example-label { color: #506866; }
[data-theme="light"] .visual-topline,
[data-theme="light"] .visual-bottomline { color: #59766e; }
[data-theme="light"] .visual-plus { color: #65867c; }
[data-theme="light"] .visual-bottomline { border-color: #cadfd5; }
[data-theme="light"] .orb-aura { background: radial-gradient(circle, #4eccad23, #88dfc914 45%, transparent 70%); }
[data-theme="light"] #coreGlow stop:first-child { stop-color: #34bda1; stop-opacity: .2; }
[data-theme="light"] #coreGlow stop:last-child { stop-color: #34bda1; }
[data-theme="light"] #orbitLine stop:first-child { stop-color: #167d69; stop-opacity: .5; }
[data-theme="light"] #orbitLine stop:last-child { stop-color: #66a697; stop-opacity: .18; }
[data-theme="light"] .network-line { stroke: #238572; stroke-width: .85; }
[data-theme="light"] .network-point { fill: #087b65; }
[data-theme="light"] .point-halo { fill: #219e80; }
[data-theme="light"] .core-mark { stroke: #087b65; }
[data-theme="light"] .core-mark circle { fill: #087b65; }
[data-theme="light"] .memory-tag {
  color: #31574b;
  background: #ffffffde;
  border-color: #c2dace;
  box-shadow: 0 8px 28px #1b644412;
}
[data-theme="light"] .orbit-caption { color: #506866; }
[data-theme="light"] .platform-names { color: #36544b; }
[data-theme="light"] .platform-names .and-more,
[data-theme="light"] .platforms > .tiny-label,
[data-theme="light"] .platform-note { color: #506866; }
[data-theme="light"] .platform-note a { color: #087b65; }
[data-theme="light"] .memory-section { background: #edf5f0; }
[data-theme="light"] .memory-copy > .example-intro { color: #375e50 !important; }
[data-theme="light"] .example-option { color: #506866; border-color: #bfd1c7; }
[data-theme="light"] .example-option[aria-pressed="true"] { background: #d7eee2; border-color: #2d8268; color: #086b58; }
[data-theme="light"] .memory-example {
  background: linear-gradient(135deg, #ffffff, #f6faf7);
  border-color: #c4dacf;
  box-shadow: 0 20px 70px #174e3810;
}
[data-theme="light"] .example-header,
[data-theme="light"] .example-footer { border-color: #d9e7df; }
[data-theme="light"] .example-header .tiny-label,
[data-theme="light"] .example-content > .tiny-label,
[data-theme="light"] .example-footer { color: #577266; }
[data-theme="light"] .example-fact { color: #214333; }
[data-theme="light"] .example-divider { background: #d9e7df; }
[data-theme="light"] .example-benefit { color: #506b5d; }
[data-theme="light"] .privacy-link { color: #375f52; }
[data-theme="light"] .closing-glow { background: #70d2af3b; }
[data-theme="light"] .footer-bottom { color: #5e7470; }
[data-theme="light"] .footer-bottom a { color: #3a6155; }

@media (max-width: 1050px) {
  .header-inner { gap: 18px; }
  .header-actions { gap: 16px; }
}
@media (max-width: 640px) {
  .theme-toggle { width: 44px; padding: 8px; }
  .theme-label { display: none; }
  .header-actions { gap: 10px; }
}
@media (max-width: 360px) {
  .header-inner { gap: 8px; }
  .header-actions { gap: 6px; }
  .brand { font-size: 19px; gap: 6px; }
  .brand-icon { width: 20px; height: 20px; }
}
