/* Theme switch: System / Light / Dark, in the footer of every page.
   Shared by the company pages (site.css) and the DunDunDun pages
   (_style.css); it only reads tokens both stylesheets define. */

.theme-switch {
  display: inline-flex;
  width: fit-content;
  margin: 0;
  padding: 3px;
  border: 0;
  border-radius: 999px;
  background: var(--bg-alt);
}

.theme-switch legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.theme-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.theme-switch label {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.theme-switch input:checked + label {
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.theme-switch input:focus-visible + label {
  outline: 2px solid var(--focus, var(--brand-ink));
  outline-offset: 2px;
}
