/* One theme control for the public header; icons share the same grid cell. */
body.public-site-rebuild .ae-public-nav .ae-nav-theme-toggle {
    display: inline-grid;
    grid-template-columns: 1fr;
    place-items: center;
    align-self: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    margin-left: 8px;
    border: 1px solid var(--ae-nav-border-strong);
    border-radius: 12px !important;
    background: var(--ae-nav-surface);
    color: var(--ae-nav-text);
    box-shadow: none;
    cursor: pointer;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    transition: background-color .18s, border-color .18s;
}
body.public-site-rebuild .ae-public-nav .ae-nav-theme-toggle__icon {
    grid-area: 1 / 1;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    margin: 0;
    color: inherit;
}
.ae-nav-theme-toggle__icon svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
html[data-theme="dark"] .ae-nav-theme-toggle__icon--moon,
html[data-theme="light"] .ae-nav-theme-toggle__icon--sun { visibility: hidden; }
.ae-nav-theme-toggle:hover { border-color: var(--ae-nav-text); }
.ae-nav-theme-toggle:focus-visible { outline: 2px solid var(--ae-nav-text); outline-offset: 4px; }
@media (max-width: 1080px) {
    body.public-site-rebuild .ae-public-nav .ae-nav-theme-toggle { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ae-nav-theme-toggle { transition: none; } }
