/* Theme toggle button. Black (default) look first; silver overrides scoped to html[data-theme=silver]. */
:root{color-scheme:dark}
html[data-theme="silver"]{color-scheme:light}
.theme-toggle{position:relative;flex:none;width:44px;height:44px;border-radius:50%;display:grid;place-items:center;padding:0;cursor:pointer;touch-action:manipulation;background:var(--graphite);border:1px solid var(--line);color:var(--silver);transition:background .2s,color .2s,border-color .2s}
.theme-toggle svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.theme-toggle .glow{opacity:0;transition:opacity .25s}
.theme-toggle[aria-pressed="true"]{color:#8c2433;border-color:rgba(140,36,51,.45)}
.theme-toggle[aria-pressed="true"] .glow{opacity:1}
.theme-toggle[aria-pressed="false"] .bulb{fill:rgba(196,200,205,.12)}
.theme-toggle:hover{border-color:var(--silver);color:var(--white)}
.theme-toggle:focus-visible{outline:2px solid var(--white);outline-offset:2px}
.rail .theme-toggle{opacity:1;transform:none;animation:none;color:var(--white)}
.rail .theme-toggle:hover{background:var(--chrome);color:var(--black);transform:scale(1.1)}
html[data-theme="silver"] .theme-toggle{background:linear-gradient(145deg,#fbfbfc,#dfe2e6);border-color:rgba(140,36,51,.45);color:#8c2433;box-shadow:inset 0 1px 0 #fff}
html[data-theme="silver"] .theme-toggle[aria-pressed="true"] .bulb{fill:rgba(140,36,51,.16)}
html[data-theme="silver"] .theme-toggle:hover,html[data-theme="silver"] .theme-toggle:focus-visible{background:#8c2433;color:#fff}
html[data-theme="silver"] .rail .theme-toggle:hover{transform:scale(1.1)}
@media (max-width:700px){.nav .right{gap:6px}.nav .theme-toggle{width:44px;height:44px}.nav .logo{font-size:18px;font-stretch:100%;letter-spacing:.025em}}
@media (max-width:380px){.nav .logo span{display:none}}
@media (max-height:620px){
  .rail{display:grid;grid-template-columns:repeat(2,44px);gap:4px;padding:6px 8px;top:auto;bottom:calc(76px + env(safe-area-inset-bottom,0px));transform:none;max-height:calc(100dvh - 162px - env(safe-area-inset-bottom,0px));overflow:auto}
}
@media (max-height:300px){
  .rail{grid-template-columns:repeat(3,44px)}
}
@media (prefers-reduced-motion:reduce){.theme-toggle,.theme-toggle .glow{transition:none!important}}
