:root { color-scheme: light; }
/* Bleibt unabhängig von Header und Scrollposition erreichbar. */
.theme-toggle {
  position:fixed;right:max(20px, env(safe-area-inset-right));bottom:max(20px, env(safe-area-inset-bottom));z-index:50;
  display:grid;place-items:center;width:52px;height:52px;border:1px solid var(--line);border-radius:50%;
  background:var(--white);color:var(--navy);box-shadow:0 4px 24px rgba(0,0,0,.2);cursor:pointer;
  transition:transform .15s,background-color .15s;
}
.theme-toggle:hover { transform:translateY(-2px); }
.theme-toggle:focus-visible { outline:3px solid var(--pink);outline-offset:4px; }
.theme-toggle svg { width:24px;height:24px;grid-area:1 / 1; }
.theme-icon-sun { display:none; }
html[data-theme="dark"] .theme-icon-moon { display:none; }
html[data-theme="dark"] .theme-icon-sun { display:block; }
html[data-theme="dark"] {
  color-scheme:dark;
  --navy:#eef0f8;
  --navy-soft:#c5cadd;
  --cream:#1b2334;
  --white:#101522;
  --muted:#afb6ca;
  --line:#394158;
  --pink:#ff55af;
  --pink-dark:#ff80c3;
}
html[data-theme="dark"] .hero,
html[data-theme="dark"] .about-section,
html[data-theme="dark"] .article-masthead { background:#111a3d; }
html[data-theme="dark"] .speech-pink { background:#111a3d; }
html[data-theme="dark"] .speech-light { background:#f6f2ed; }
html[data-theme="dark"] .reading-page { background:var(--white); }
html[data-theme="dark"] .article-header,
html[data-theme="dark"] .filter,
html[data-theme="dark"] .card,
html[data-theme="dark"] .article-body blockquote,
html[data-theme="dark"] .article-chart,
html[data-theme="dark"] .article-nav-card,
html[data-theme="dark"] .legal-note { background:#1b2334;border-color:var(--line); }
html[data-theme="dark"] .filter.active,
html[data-theme="dark"] .filter:hover { background:var(--navy);color:var(--white); }
html[data-theme="dark"] .article-body { color:#d7dced; }
html[data-theme="dark"] .chart-tooltip { background:#eef0f8;color:#111a3d; }
@media (max-width:850px) {
  html[data-theme="dark"] nav { background:var(--white); }
}
@media (prefers-reduced-motion:reduce) {
  .theme-toggle { transition:none; }
}
html[data-theme="dark"] .site-header { background:var(--white); }
html[data-theme="dark"] .hero,
html[data-theme="dark"] .about-section,
html[data-theme="dark"] .article-masthead { background:#0c1120; }
html[data-theme="dark"] .hero-visual { background:#8f195a; }
html[data-theme="dark"] .hero-visual::before { background:#aa236b; }
html[data-theme="dark"] .hero-visual .speech-light { background:#eef0f8; }
html[data-theme="dark"] .article-body a { color:#ff80c3; }
html[data-theme="dark"] .article-body figcaption { color:var(--muted); }
