/* Theme switch shared by all pages. Each page sets the --tt-* colours. */
.theme-toggle {
  --tt-track: rgba(127, 127, 127, .18);
  --tt-knob: currentColor;
  --tt-icon-on: #000;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  width: 60px;
  height: 30px;
  padding: 0 7px;
  border: 1px solid var(--tt-border, transparent);
  border-radius: 999px;
  background: var(--tt-track);
  color: inherit;
  cursor: pointer;
}
.theme-toggle svg {
  position: relative;
  z-index: 1;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: color .25s ease;
}
.theme-toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--tt-knob);
  transition: transform .25s ease;
}
[data-theme="dark"] .theme-toggle::after { transform: translateX(30px); }
[data-theme="light"] .theme-toggle .tt-sun,
[data-theme="dark"] .theme-toggle .tt-moon { color: var(--tt-icon-on); }
@media (prefers-reduced-motion: reduce) {
  .theme-toggle::after, .theme-toggle svg { transition: none; }
}
