.home-theme-switch{position:relative;isolation:isolate;display:grid;grid-template-columns:repeat(3,1fr);gap:0;margin:0;padding:3px;min-width:224px;border:1px solid #8f9f95;border-radius:20px;background:#adb8ab;color:#29413e;font-size:11px;line-height:1.4;letter-spacing:0}
.home-theme-switch::before{content:'';position:absolute;z-index:-1;top:3px;bottom:3px;left:3px;width:calc((100% - 6px)/3);border-radius:17px;background:#f3dfb4;box-shadow:0 1px 5px #26332b25;transition:transform .22s ease}
.home-theme-switch[data-mode="night"]::before{transform:translateX(100%)}.home-theme-switch[data-mode="nocturne"]::before{transform:translateX(200%)}
.home-theme-switch label{padding:6px 10px;cursor:pointer;white-space:nowrap;text-align:center;border-radius:16px}.home-theme-switch label span{margin-right:3px}
.home-theme-switch input,.theme-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.home-theme-switch input:focus-visible+label{outline:2px solid #aa6e19;outline-offset:2px}.home-theme-switch input:checked+label{font-weight:750;color:#173d3d}
/* Shared selector and page frame. Astronomical canvases retain their rendering. */
body .home-theme-switch label{color:inherit}body .home-theme-switch input:checked+label{color:#173d3d}
html[data-site-theme="night"] .home-theme-switch{background:#14283d;border-color:#516a80;color:#cfdeec}html[data-site-theme="night"] .home-theme-switch::before{background:#e4c38c}
body.night .home-theme-switch{background:#291310;border-color:#713e33;color:#d59a8a}body.night .home-theme-switch::before{background:#71372b}body.night .home-theme-switch input:checked+label{color:#ffd2bb}
html[data-theme-scope="inner"][data-site-theme="day"] body{background:#080f1e;color:#29434e;color-scheme:light}
html[data-theme-scope="inner"][data-site-theme="day"] body:before{opacity:.8}
html[data-theme-scope="inner"][data-site-theme="day"] .top,html[data-theme-scope="inner"][data-site-theme="day"] main,html[data-theme-scope="inner"][data-site-theme="day"] .footer{background:#d4d3c8;width:min(1320px,calc(100% - 72px));margin-inline:auto}
html[data-theme-scope="inner"][data-site-theme="day"] .top{background:#d7d7ce}html[data-theme-scope="inner"][data-site-theme="day"] main{padding-bottom:30px;overflow:clip}html[data-theme-scope="inner"][data-site-theme="day"] .footer{margin-top:0;padding-top:40px}
html[data-theme-scope="inner"][data-site-theme="day"] .portal-return{background:#c6cac0}
html[data-theme-scope="inner"][data-site-theme="day"] .top a,html[data-theme-scope="inner"][data-site-theme="day"] .top summary{color:#304852}
html[data-theme-scope="inner"][data-site-theme="day"] .portal-nav-links,html[data-theme-scope="inner"][data-site-theme="day"] .portal-nav-sublinks{background:#e0ded1;color:#29434e}
html[data-theme-scope="inner"][data-site-theme="day"] .portal-primary>a[aria-current],html[data-theme-scope="inner"][data-site-theme="day"] .portal-nav-group.is-current>summary{color:#175c55}
html[data-theme-scope="inner"][data-site-theme="day"] :is(h1,h2,h3,h4){color:#183b4b}
html[data-theme-scope="inner"][data-site-theme="day"] :is(.eyebrow,h1 em){color:#855a22}
html[data-theme-scope="inner"][data-site-theme="day"] .top .brand .portal-logo{background:#ede6d4}
html[data-theme-scope="inner"][data-site-theme="day"] :is(input,select,textarea){color-scheme:light}
html[data-theme-scope="inner"][data-site-theme="day"] .btn.primary{background:#175c55;color:#fff;border-color:#175c55}
html[data-theme-scope="inner"][data-site-theme="day"] .pn-stage .pn-hud{color:#ced9e8}
html[data-theme-scope="inner"][data-site-theme="day"] .pn-stage .pn-hud :is(strong,span){color:inherit}
html[data-theme-scope="inner"][data-site-theme="day"] .pn-stage{color-scheme:dark}
html[data-site-theme="nocturne"] body:before{opacity:.07}
@media(max-width:800px){html[data-theme-scope="inner"][data-site-theme="day"] .top,html[data-theme-scope="inner"][data-site-theme="day"] main,html[data-theme-scope="inner"][data-site-theme="day"] .footer{width:calc(100% - 24px)}}
@media(max-width:540px){html[data-theme-scope="inner"][data-site-theme="day"] .top,html[data-theme-scope="inner"][data-site-theme="day"] main,html[data-theme-scope="inner"][data-site-theme="day"] .footer{width:100%}.portal-header-tools{flex:1 1 100%;min-width:0;flex-wrap:wrap;justify-content:flex-end;gap:7px}.home-theme-switch{min-width:0;flex:1}.home-theme-switch label{font-size:10px;padding:6px 4px}.home-theme-switch label span{margin-right:1px}}
@media(prefers-reduced-motion:reduce){.home-theme-switch::before{transition:none}}
@media print{.home-theme-switch{display:none}}
/* Explicit paired colours for navigation and interactive planetarium controls. */
html[data-site-theme="day"] body .top :is(.portal-nav-links,.portal-nav-sublinks){background:#e5e3d8;border-color:#8a9990;color:#243e49}
html[data-site-theme="day"] body .top :is(.portal-nav-group[open],.portal-nav-subgroup[open])>summary,
html[data-site-theme="day"] body .top :is(.portal-nav-links a,.portal-nav-sublinks a,.portal-nav-subgroup>summary):is(:hover,:focus-visible,[aria-current]),
html[data-site-theme="day"] body .top .portal-nav-subgroup.is-current>summary{background:#c5d1c5;color:#183e39;border-color:#718c7e}
html[data-site-theme="day"] body .top :is(.portal-nav-links a,.portal-nav-sublinks a,.portal-nav-subgroup>summary){color:#243e49}
html[data-site-theme="day"] body .top summary:after{color:#71501f}
html[data-site-theme="day"] body .portal-menu-toggle{background:#e5e3d8;color:#243e49;border-color:#718c7e}
html[data-site-theme="day"] body .planetarium-page :is(.pn-button,.pn-sidebar-tabs button){background:#eeece2;color:#203c49;border-color:#718579;text-shadow:none}
html[data-site-theme="day"] body .planetarium-page :is(.pn-button,.pn-sidebar-tabs button):hover{background:#d3dfd2;color:#153d36;border-color:#42695a}
html[data-site-theme="day"] body .planetarium-page :is(.pn-button[aria-pressed="true"],.pn-button[aria-expanded="true"],.pn-sidebar-tabs button[aria-selected="true"],.pn-primary){background:#245e53!important;color:#fff!important;border-color:#245e53!important}
html[data-site-theme="day"] body .planetarium-page :is(.pn-button,.pn-sidebar-tabs button):focus-visible{outline:3px solid #9b641c;outline-offset:2px}
html[data-site-theme="day"] body .planetarium-page .pn-button svg{color:inherit;opacity:1;filter:none}
html[data-site-theme="day"] body .planetarium-page :is(.pn-quick-panel,.pn-fullscreen-time .pn-time-controls,.pn-scope-dialog,.pn-time-dialog){background:#e5e3d8;color:#203c49;border-color:#718579;color-scheme:light}
html[data-site-theme="day"] body .planetarium-page :is(.pn-mode-compact,.pn-fullscreen-time label,.pn-scope-dialog label,.pn-time-dialog label){color:#203c49;text-shadow:none}
html[data-site-theme="day"] body .planetarium-page :is(input,select){color-scheme:light}
html[data-site-theme="day"] body .planetarium-page .pn-stage :is(select,input){background:#eeece2;color:#203c49;border-color:#718579}

html[data-site-theme="day"] body .planetarium-page .pn-floating-controls .pn-mode-compact{background:#e5e3d8;padding:5px;border-radius:6px;color:#203c49}

/* Shared night frame: same outer bounds as the existing day/home shell.
   Scope only the two top bars; no canvas, height, grid or overflow changes. */
html:is([data-site-theme="night"],[data-site-theme="nocturne"]) body > :is(.top,.sky-news){width:min(1320px,calc(100% - 72px));max-width:100%;margin-inline:auto;box-sizing:border-box}
@media(max-width:800px){html:is([data-site-theme="night"],[data-site-theme="nocturne"]) body > :is(.top,.sky-news){width:calc(100% - 24px)}}
@media(max-width:540px){html:is([data-site-theme="night"],[data-site-theme="nocturne"]) body > :is(.top,.sky-news){width:100%}}

/* Shared catalogue guides: nocturne only; day and standard night unchanged. */
html[data-site-theme="nocturne"] .cat-card{background:linear-gradient(140deg,#28120e,#190b09);border-color:#79463d;color:#d6a397}
html[data-site-theme="nocturne"] .cat-note{background:#230d0b;border-color:#aa6b55;color:#d6a397}
html[data-site-theme="nocturne"] :is(.cat-card .cat-number,.cat-hero h1 em,.cat-card a,.cat-section code){color:#dfa38c}
html[data-site-theme="nocturne"] .cat-card small{color:#c18f83}
html[data-site-theme="nocturne"] .cat-form input{background:#2a100d;color:#e1ada0;border-color:#935c50;color-scheme:dark}
html[data-site-theme="nocturne"] .cat-form input::placeholder{color:#bf8c80;opacity:1}
html[data-site-theme="nocturne"] .cat-table :is(th,td){border-color:#79463d}
html[data-site-theme="nocturne"] :is(.cat-card,.cat-section) :focus-visible{outline:3px solid #d58e78;outline-offset:3px}
/* Mobile shared navigation shell: match readable day/red-night palettes. */
@media(max-width:800px){
html[data-site-theme="day"] body .top .home-nav-shell>nav.portal-primary{background:#e0ded1;border-color:#9da99c;color:#29434e}
html[data-site-theme="day"] body .top .home-nav-shell[open]>.home-nav-toggle{background:#c9d0bf;color:#29434e}
html[data-site-theme="nocturne"] body .top .home-nav-shell>nav.portal-primary{background:#21100e;border-color:#603124;color:#ffbba7}
html[data-site-theme="nocturne"] body .top .home-nav-shell[open]>.home-nav-toggle{background:#361814;color:#ffbba7}
}
/* Shared header relief: the same framed navigation depth on every language/page.
   Insets stay inside the approved header bounds; no change to the six-zone strip. */
html[data-site-theme] body .top{box-shadow:inset 0 1px 0 #ffffff18,inset 0 -18px 24px -22px #000b}
html[data-site-theme=day] body .top{box-shadow:inset 0 1px 0 #ffffff66,inset 0 -18px 24px -22px #26332b99}
html[data-site-theme=nocturne] body .top{box-shadow:inset 0 1px 0 #ab69551c,inset 0 -18px 24px -22px #000d}
/* Native date/time picker contrast in dark themes; leaves stored values unchanged. */
html:is([data-site-theme=night],[data-site-theme=nocturne]) input:is([type=date],[type=time],[type=datetime-local]){color-scheme:dark}
html[data-site-theme=day] input:is([type=date],[type=time],[type=datetime-local]){color-scheme:light}

/* Audit80: shared dynamically inserted sky-quality controls, not the model. */
html body select.observer-sky-quality{display:block;box-sizing:border-box;width:100%;max-width:100%;min-width:0;min-height:44px;padding:10px 12px;margin-top:7px;border:1px solid #73879e;border-radius:6px;font:inherit;line-height:1.35;background:#142338;color:#e6edf4;color-scheme:dark}
html[data-site-theme=day] body select.observer-sky-quality{background:#fff;color:#24404a;border-color:#697e7d;color-scheme:light}
html[data-site-theme=nocturne] body select.observer-sky-quality{background:#291310;color:#f0b7a7;border-color:#a56556;color-scheme:dark}
html[data-site-theme=day] body select.observer-sky-quality:disabled{background:#e0ded1;color:#526669}
html body select.observer-sky-quality option{background:inherit;color:inherit}
html body select.observer-sky-quality:focus-visible{outline:3px solid currentColor;outline-offset:3px}
