/* Shared light/dark tokens. Light mode keeps the original TG Hiro palette. */
:root {
  color-scheme: light;
  --tg-page-bg: #fff;
  --tg-surface: #fff;
  --tg-alt: #f7fbfe;
  --tg-text: #334155;
  --tg-heading: #102a43;
  --tg-muted: #64748b;
  --tg-copy: #475569;
  --tg-line: #e5edf4;
  --tg-icon-bg: #eef8ff;
  --tg-strong: #174e7a;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --tg-page-bg: #0b1422;
  --tg-surface: #132236;
  --tg-alt: #0e1c2d;
  --tg-text: #d9e5f2;
  --tg-heading: #f0f6fc;
  --tg-muted: #afc0d3;
  --tg-copy: #c1d0df;
  --tg-line: #2d4259;
  --tg-icon-bg: #17344b;
  --tg-strong: #8dd7ff;
  --background-color: #0b1422;
  --default-color: #d9e5f2;
  --heading-color: #f0f6fc;
  --surface-color: #132236;
  --nav-color: #d9e5f2;
  --nav-dropdown-color: #d9e5f2;
  --nav-mobile-background-color: #132236;
  --nav-dropdown-background-color: #132236;
  --bg: #0b1422;
  --card: #132236;
  --text: #f0f6fc;
  --muted: #afc0d3;
  --line: #486078;
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--tg-line);
  border-radius: 50%;
  color: var(--tg-strong);
  background: var(--tg-surface);
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color .18s ease, border-color .18s ease;
}
.theme-toggle:hover { background: var(--tg-icon-bg); border-color: #0ea5e9; }
.theme-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-icon-sun, html[data-theme="dark"] .theme-icon-moon { display: none; }
html[data-theme="dark"] .theme-icon-sun { display: block; }
:where(a, button, input, select, textarea):focus-visible { outline: 3px solid #0ea5e9; outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) {
  html:root { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
