/* Theme switch: Auto / Light / Dark */
:root { color-scheme: light dark; }
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
.theme-switch {
  display: inline-flex; margin: 0; padding: 3px; gap: 2px;
  border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface);
}
.theme-switch label { position: relative; cursor: pointer; }
.theme-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.theme-switch span {
  display: block; padding: 0.45rem 0.7rem; border-radius: 4px;
  font: 600 0.85rem/1 var(--body); color: var(--muted);
}
.theme-switch input:checked + span { background: var(--cobalt-soft); color: var(--ink); }
.theme-switch input:focus-visible + span { outline: 3px solid var(--cobalt); outline-offset: 1px; }
.theme-switch label:hover span { color: var(--ink); }
