/* =========================================================
   Theme switch control — the Dark / Light segmented toggle.
   Loads site-wide in <head>. Uses --neo-* tokens, so it reads
   correctly in both themes. Active option is driven by
   <html data-theme> (set before first paint) so there is no
   flicker on a cached logged-out page; aria-pressed is kept in
   sync by JS for assistive tech.
   ========================================================= */

.neo-theme-control {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid var(--neo-line);
    border-radius: 2px;
    overflow: hidden;
    line-height: 1;
    background: transparent;
}
.neo-theme-opt {
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
    border: 0;
    background: transparent;
    color: var(--neo-muted);
    font-family: var(--neo-font-body, Georgia, serif);
    font-size: 0.62rem;
    font-weight: 400;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    padding: 0.5em 0.95em;
    cursor: pointer;
    transition: color 0.25s ease, background-color 0.25s ease;
}
.neo-theme-opt + .neo-theme-opt { border-left: 1px solid var(--neo-line); }
.neo-theme-opt:hover { color: var(--neo-cream); }
.neo-theme-opt:focus-visible { outline: 1px solid var(--neo-gold); outline-offset: -1px; }

/* Active option — keyed off <html data-theme>, with an aria-pressed fallback. */
:root:not([data-theme="light"]) .neo-theme-opt[data-theme-value="dark"],
:root[data-theme="light"] .neo-theme-opt[data-theme-value="light"],
.neo-theme-opt[aria-pressed="true"] {
    background: var(--neo-gold);
    color: var(--neo-ground);
}

/* ── Footer instance ── */
.neo-footer__base .neo-theme-control--footer { flex-shrink: 0; }

/* ── My Preferences (account tab) ── */
.neo-prefs { max-width: 620px; }
.neo-prefs-block { margin: 0 0 8px; }
.neo-prefs__label {
    display: block;
    font-family: var(--neo-font-body);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--neo-gold);
    margin-bottom: 14px;
}
.neo-prefs__note {
    font-family: var(--neo-font-body);
    font-weight: 300;
    font-size: 14px;
    line-height: 1.7;
    color: var(--neo-sand);
    margin: 0 0 20px;
}
.neo-theme-control--preferences { transform: scale(1.1); transform-origin: left center; }
