.theme-switch { appearance:none; -webkit-appearance:none; border:none; background:linear-gradient(135deg,var(--color-surface-alt),var(--color-surface)); padding:0; width:3.1rem; height:1.6rem; border-radius:2rem; box-shadow:0 2px 4px rgba(0,0,0,.4), inset 0 0 0 1px var(--color-border); display:inline-flex; align-items:center; justify-content:flex-start; cursor:pointer; transition: background var(--duration-base) var(--ease-standard), box-shadow var(--duration-base) var(--ease-standard); margin-left:auto; }
.theme-switch:focus-visible { outline:2px solid var(--color-focus); outline-offset:3px; }
.theme-switch::before { content:""; width:1.3rem; height:1.3rem; border-radius:50%; margin-left:.2rem; background:radial-gradient(circle at 35% 35%, #fff, var(--color-accent-alt)); box-shadow:0 0 0 .5px rgba(0,0,0,.4), 0 2px 4px rgba(0,0,0,.4), 0 0 0.55rem rgba(255,122,0,.5); transform:translateX(0); transition: transform var(--duration-base) var(--ease-standard), background var(--duration-base) var(--ease-standard), box-shadow var(--duration-base) var(--ease-standard); }
[data-theme="light"] .theme-switch { background:linear-gradient(135deg,#ececec,#ffffff); }
[data-theme="light"] .theme-switch::before { background:radial-gradient(circle at 35% 35%, #ffe7d1, var(--color-accent)); box-shadow:0 0 0 .5px rgba(0,0,0,.2), 0 2px 4px rgba(0,0,0,.25), 0 0 .65rem rgba(255,122,0,.55); }
html[data-theme="light"] .theme-switch::before { transform:translateX(1.45rem); }
.theme-switch:active::before { transform: scale(.9) translateX(0); }
html[data-theme="light"] .theme-switch:active::before { transform: scale(.9) translateX(1.45rem); }

@media (prefers-reduced-motion: reduce) { .theme-switch, .theme-switch::before { transition:none; } }

/* Align within nav: push list to the left and keep toggle at end */
.nav .theme-switch { flex-shrink:0; }