/* Public distant-space layer: dark foundation -> haze/stars -> all content. */
html[data-space-atmosphere]{--space-base:#070a0f;--space-haze-opacity:.5;--los-dark-bg:#070a0f;--los-dark-panel:#10151d;--los-dark-raised:#202633;--los-dark-line:#59616f}
html[data-space-atmosphere]:not([data-lore-theme=light]){--los-bg:#070a0f;--los-panel:#10151de8;--los-raised:#202633;--los-line:#59616f}
html[data-space-atmosphere] body{isolation:isolate}
#space-scene{position:fixed;inset:0;z-index:-1;pointer-events:none;overflow:hidden;background:var(--space-base);color:var(--los-accent);contain:strict}
.space-fog{position:absolute;inset:0;mix-blend-mode:screen;opacity:var(--space-haze-opacity)}
.space-fog-canvas{display:block;width:100%;height:100%}
/* Quiet, image-free fallback if WebGL is unavailable or its context is lost. */
.space-fog[data-renderer=fallback]{background:radial-gradient(ellipse at 85% 20%,#36344045,transparent 55%),radial-gradient(ellipse at 15% 80%,#343a4540,transparent 55%)}
.space-fog[data-renderer=fallback] canvas{visibility:hidden}
.space-stars{position:absolute;inset:0;background:url('/observatory/assets/distant-space-stars.svg') center/cover no-repeat;opacity:.78}
/* Remove the rejected grain, mineral washes and engraved background ornaments.
   The selected quartz art on the four sheets is deliberately unaffected. */
html[data-space-atmosphere]:not([data-lore-theme=light]) :is(.space-shell,.cosmic-story,.cosmic-stage,.cosmic-stage .solar-viewport,.discovery-flow,.discovery-flow>section,.footer,[data-testid^=public-][data-testid$=-surface],[data-testid=public-collection],[data-testid=report-offer-paper],[data-testid=public-site-footer],[data-testid=public-almanac-surface]>div:nth-child(2)){
 background-color:transparent!important;background-image:none!important;
}
html[data-space-atmosphere] .cosmic-story .cosmic-vignette{background:linear-gradient(90deg,#070a0f50,transparent 55%)!important}
html[data-space-atmosphere] .discovery-flow::before{display:none!important}
html[data-space-atmosphere] [data-testid=public-persistent-stars]{display:none!important}
html[data-space-atmosphere] .header{background:#070a0fe8}
/* Keep the atmosphere continuous through the public-page hero and reading
   wrappers. Editorial imagery and chart/report paper retain their own colors. */
html[data-space-atmosphere]:not([data-lore-theme=light]) [data-testid=public-signup-surface] [style*="background-image: linear-gradient"][style*="var(--los-bg"]{background-image:none!important;background-color:transparent!important}
html[data-space-atmosphere]:not([data-lore-theme=light]) [data-testid^=public-][data-testid$=-surface]:not([data-testid=public-signup-surface])>div:nth-child(2){background-color:transparent!important}
html[data-space-atmosphere]:not([data-lore-theme=light]) [data-testid=public-site-header]{background:transparent;border-bottom:1px solid var(--los-line-22)}
html[data-space-atmosphere]:not([data-lore-theme=light]) [data-testid=public-signup-surface]::before{display:none}
html[data-space-atmosphere]:not([data-lore-theme=light]) .reading-specimen{background:#10151de8;box-shadow:none}
/* One coherent field surface, including the legacy name/email autofill rules. */
html[data-space-atmosphere] [data-testid=public-signup-surface] :is(input:not([type=checkbox]):not([type=radio]),textarea){background-color:var(--los-panel)!important;color:var(--los-text)!important;-webkit-text-fill-color:var(--los-text)!important;caret-color:var(--los-accent)!important;box-shadow:0 0 0 1000px var(--los-panel) inset!important}
html[data-space-atmosphere] [data-testid=public-signup-surface] :is(input,textarea)::placeholder{color:var(--los-muted)!important;-webkit-text-fill-color:var(--los-muted)!important;opacity:1}
html[data-space-atmosphere] :is([data-testid=signup-submit],[data-testid=public-faq-send],[data-testid=public-contact-send],.space-accent-action){background:var(--los-accent)!important;color:var(--los-on-accent)!important;border-radius:2px;box-shadow:none!important}
html[data-space-atmosphere] :is([data-testid=signup-submit],[data-testid=public-faq-send],[data-testid=public-contact-send],.space-accent-action) *{color:var(--los-on-accent)!important}
html[data-space-atmosphere] :is([data-testid=signup-submit],.space-accent-action)[aria-disabled=true]{opacity:.55}
html[data-space-atmosphere] body[data-lore-chart-entry=true] [data-testid=public-home-intro]{border:0!important;margin:0!important;background:transparent!important;max-height:none!important;overflow:visible!important;z-index:50}
html[data-space-atmosphere] [data-testid=public-reports-surface]>div:has(>[data-testid=public-site-header]){z-index:50;overflow:visible}
html[data-space-atmosphere] [data-testid=public-site-header] [role=navigation]:has([data-testid^=landing-mobile-nav-]){background:var(--los-bg)!important;box-shadow:0 12px 28px #0005}
/* The chart route only needs the header from the legacy hero. Hiding the hero
   children explicitly avoids cropping the navigation dropdown with the hero. */
html[data-space-atmosphere] body[data-lore-chart-entry=true] [data-testid=public-home-intro]>:not(:has([data-testid=public-site-header])){display:none!important}
/* Preserve a readable light mode. The space study itself is a dark treatment. */
html[data-space-atmosphere][data-lore-theme=light] #space-scene{display:none}
html[data-space-atmosphere][data-lore-theme=light] .cosmic-story{background:var(--space-base)}
@media(forced-colors:active){#space-scene{display:none!important}}
@media(max-width:760px){.space-fog{opacity:calc(var(--space-haze-opacity)*.9)}.space-stars{background-size:auto 100%;background-position:60% center;opacity:.68}}
