.theme-toggle {
  position: relative;
  width: 58px;
  height: 34px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid #cbd3df;
  border-radius: 999px;
  background: #e5e9f0;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
.theme-toggle:focus-visible { outline: 3px solid rgb(26 115 232 / 35%); outline-offset: 3px; }
.theme-toggle-track {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 7px;
  color: #69778c;
}
.theme-toggle-track svg { width: 13px; height: 13px; }
.theme-toggle-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 4px rgb(23 35 52 / 28%);
  transition: transform .2s ease, background .2s ease;
}
.theme-toggle[aria-checked="true"] { border-color: #31527a; background: #263a55; }
.theme-toggle[aria-checked="true"] .theme-toggle-track { color: #9fb9dc; }
.theme-toggle[aria-checked="true"] .theme-toggle-thumb { transform: translateX(24px); background: #dce8f8; }

:root[data-theme="dark"] .theme-toggle {
  border-color: #31527a;
  background: #263a55;
}
:root[data-theme="dark"] .theme-toggle:hover { border-color: #3a5478; }
:root[data-theme="dark"] .theme-toggle-track { color: #9fb9dc; }
:root[data-theme="dark"] .theme-toggle-thumb { transform: translateX(24px); background: #dce8f8; }

