/* One shared navbar/admin/error Light ↔ Dark switch. */
.fnss-theme-switch {
    -webkit-tap-highlight-color:transparent;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:0;
    min-height:40px;
    flex:0 0 auto;
    padding:5px;
    border:1px solid rgba(57,255,20,.23);
    border-radius:999px;
    background:#112014;
    color:#ebf5ed;
    font:800 11px/1 Inter,Arial,sans-serif;
    letter-spacing:.15px;
    cursor:pointer;
    box-shadow:0 4px 14px rgba(0,0,0,.12);
    transition:background .18s ease,border-color .18s ease,box-shadow .18s ease;
}
.fnss-theme-switch:hover {border-color:#39ff14;box-shadow:0 0 0 3px rgba(57,255,20,.09)}
.fnss-theme-switch:focus-visible {outline:2px solid #39ff14;outline-offset:3px}
.fnss-theme-switch-track {
    position:relative;
    display:grid;
    grid-template-columns:27px 27px;
    align-items:center;
    width:58px;
    height:28px;
    padding:2px;
    border:1px solid #3a533d;
    border-radius:999px;
    background:#050d07;
    color:#b7c8bb;
}
.fnss-theme-switch-track svg {
    position:relative;
    z-index:1;
    width:16px;
    height:16px;
    margin:auto;
    fill:none;
    stroke:currentColor;
    transition:color .18s ease;
    pointer-events:none;
}
.fnss-theme-switch-thumb {
    position:absolute;
    z-index:0;
    top:2px;
    left:2px;
    width:25px;
    height:22px;
    border-radius:999px;
    background:#dff6e2;
    box-shadow:0 2px 6px rgba(0,0,0,.18);
    transform:translateX(27px);
    transition:transform .18s ease,background .18s ease;
}
html[data-theme="dark"] .fnss-theme-switch-sun {color:#859c89}
html[data-theme="dark"] .fnss-theme-switch-moon {color:#176e2e}
html[data-theme="light"] .fnss-theme-switch {
    border-color:#bfdcc7;
    background:#fff;
    color:#2a5736;
    box-shadow:0 5px 14px rgba(28,85,43,.08);
}
html[data-theme="light"] .fnss-theme-switch:hover {border-color:#299049;box-shadow:0 0 0 3px rgba(40,137,66,.1)}
html[data-theme="light"] .fnss-theme-switch:focus-visible {outline-color:#187d30}
html[data-theme="light"] .fnss-theme-switch-track {
    color:#5d8267;
    border-color:#b7dac0;
    background:#e7f5ea;
}
html[data-theme="light"] .fnss-theme-switch-thumb {
    background:#fff;
    border:1px solid #c1dfc8;
    transform:translateX(0);
}
html[data-theme="light"] .fnss-theme-switch-sun {color:#bf7a11}
html[data-theme="light"] .fnss-theme-switch-moon {color:#678b73}
/* Prevent the old generic light navbar anchor/button rule overriding the control. */
html[data-theme="light"] .site-navbar .fnss-theme-switch {color:#2a5736}
html[data-theme="dark"] .site-navbar .fnss-theme-switch {color:#ebf5ed}
/* Existing two-part Login/Register segment: one coherent light/dark navigation control. */
html[data-theme="light"] .site-navbar .nav-auth-cluster {
    background:#fff;
    border-color:#c2dec9;
    box-shadow:0 5px 16px rgba(29,75,40,.08);
}
html[data-theme="light"] .site-navbar .nav-auth-cluster > a {
    background:#fff;
    color:#376044;
    border-color:#d6e7da;
}
html[data-theme="light"] .site-navbar .nav-auth-cluster > a:hover:not(.is-active) {
    background:#eaf6ed;
    color:#176e2e;
}
html[data-theme="light"] .site-navbar .nav-auth-cluster > a.is-active {
    background:#187d30 !important;
    color:#fff !important;
    border-color:#187d30;
}
html[data-theme="light"] .site-navbar .nav-auth-cluster > a.is-active:hover {
    background:#126b28 !important;
    color:#fff !important;
}
html[data-theme="dark"] .site-navbar .nav-auth-cluster > a.is-active {
    background:#39ff14;
    color:#061106;
}
@media (max-width:700px) {
    .site-navbar .fnss-theme-switch {order:5;min-height:36px;padding:4px}
    .site-navbar .fnss-theme-switch-track {width:54px;grid-template-columns:25px 25px}
    .site-navbar .fnss-theme-switch-thumb {width:23px;transform:translateX(25px)}
    html[data-theme="light"] .site-navbar .fnss-theme-switch-thumb {transform:translateX(0)}
}
@media (prefers-reduced-motion:reduce) {
    .fnss-theme-switch,.fnss-theme-switch-track svg,.fnss-theme-switch-thumb {transition:none}
}
