/* Four coordinated experiments: orbit / latitude, daylight / local noon. */
.page { width: min(1540px, calc(100% - 24px)); }
.topbar { padding: 12px 0 9px; }
.experiment-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); grid-template-rows: minmax(0,.95fr) auto minmax(0,1.05fr); gap: 8px; padding: 8px 0; min-height: 0; }
.experiment-grid > .module-card:not(.module-expanded) { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 8px 10px; }
.experiment-grid > .controls { grid-column: 1 / -1; padding: 5px 0; border-block: 1px solid var(--line); }
.controls { gap: 8px; }
.season-shortcuts { display: flex; gap: 3px; flex: 0 0 auto; }
.season-shortcuts button { padding: 5px 7px; border: 1px solid var(--line); border-radius: 5px; background: var(--deep-2); color: var(--muted); font: 11px var(--body); white-space: nowrap; cursor: pointer; }
.season-shortcuts button:hover,.season-shortcuts button.active { color: var(--sun); border-color: rgba(255,200,90,.65); }
.controls .control-button { padding: 7px 11px; }
.experiment-grid .module-heading { align-items: center; min-height: 29px; margin-bottom: 5px; }
.experiment-grid .module-heading h2 { font: 400 18px var(--display); }
.experiment-grid .module-heading > span { display: none; }
#orbitModule:not(.module-expanded) .intro { position: static; width: calc(100% - 80px); padding: 5px 0; }
#orbitModule:not(.module-expanded) .intro h1 { font-size: 18px; line-height: 1.35; white-space: normal; }
#orbitModule:not(.module-expanded) .expand-main { top: 10px; right: 12px; }
#orbitModule:not(.module-expanded) .scene { display: block; flex: 1; width: 100%; height: 0; min-height: 0; }
#orbitModule:not(.module-expanded) #spaceScene { width: 100%; height: 100%; min-height: 0; aspect-ratio: auto; }
#trackModule:not(.module-expanded) .module-svg { flex: 1; height: 0; min-height: 0; aspect-ratio: auto; }
.module-content { display: grid; grid-template-columns: 120px minmax(0,1fr); gap: 10px; flex: 1; min-height: 0; min-width: 0; }
.module-sidebar { display: flex; flex-direction: column; align-items: stretch; gap: 10px; min-width: 0; min-height: 0; padding-right: 9px; border-right: 1px solid var(--line); overflow-y: auto; scrollbar-width: thin; }
.module-sidebar .module-toolbar { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 6px; min-height: 0; margin: 0; }
.module-sidebar .city-switch { width: 100%; font-size: 11px; }
.module-sidebar .daylight-choice > span { font-size: 10px; }
.module-sidebar .daylight-panel { padding-top: 7px; }
.module-sidebar .duration-row { grid-template-columns: minmax(0,1fr); gap: 5px; margin: 0 0 15px; }
.module-sidebar .duration-row:last-child { margin-bottom: 0; }
.module-sidebar .duration-track { height: 9px; }
.module-visual { display: grid; align-items: center; min-width: 0; min-height: 0; }
.experiment-grid #lightModule .module-visual > .module-svg { width: 100%; height: 100%; min-height: 0; max-height: none; aspect-ratio: auto; }
.noon-module { position: relative; }
.city-switch { border: 1px solid rgba(255,200,90,.5); border-radius: 6px; padding: 6px 5px; min-height: 34px; max-width: 100%; color: var(--sun); background: #172932; font: 11px/1.5 var(--body); white-space: nowrap; cursor: pointer; color-scheme: dark; touch-action: manipulation; }
.city-switch:hover { background: #263d46; }
.city-switch:focus-visible { outline: 2px solid var(--sun); outline-offset: 3px; }
.module-toolbar { display: flex; align-items: center; gap: 8px; min-height: 30px; margin-bottom: 6px; font-size: 11px; }
.daylight-choice { justify-content: space-between; }
#lightModule .demo-backlight { fill: rgba(1,5,10,.97); }
#lightModule .demo-polar-zone.night { fill: #030711; opacity: .7; }
#lightModule .demo-band { stroke-width: .85; stroke-dasharray: 3 4; opacity: .7; }
#lightModule .demo-polar-circle { stroke-width: 1.2; opacity: .8; }
#lightModule #observedLatitude { stroke-width: 1.5; }
#lightModule .demo-polar-summary .demo-polar-label { font-size: 13px; }
#lightModule .demo-polar-summary .polar-callout { font-size: 14px; }
#lightModule .demo-polar-summary .demo-label,#lightModule .demo-ray-caption { font-size: 12px; }
#lightModule #demoReadout { font-size: 13px; }
#demoGlobeZoom .demo-polar-label { font-size: 7.5px; }
#demoGlobeZoom .demo-highlight { font-size: 8px; }
#demoGlobeZoom .demo-angle-text { font-size: 8px; }
.apsis-markers { fill: #ffc85a; }
.apsis-markers circle { stroke: #07131e; stroke-width: 1.2; }
.noon-city-toolbar { flex: 0 0 auto; margin-bottom: 3px; }
.noon-city-toolbar .city-switch { width: 138px; }
.experiment-grid #noonModule .module-content { grid-template-columns: minmax(0,1fr); gap: 0; }
.noon-workspace { display: grid; grid-template-columns: minmax(0,1fr); align-items: center; flex: 1; min-height: 0; }
.noon-workspace svg { display: block; width: 100%; height: auto; overflow: hidden; }
.noon-module:not(.module-expanded) .noon-workspace svg { height: 100%; min-height: 0; max-height: none; }
.noon-workspace svg text { fill: var(--muted); font: 15px var(--body); }
.noon-workspace .noon-svg-caption { font-size: 12px; }
.noon-dome { fill: url(#noonSkyGlass); stroke: #48b5c1; stroke-opacity: .32; stroke-width: 1.2; }
.noon-dome-floor { fill: #48b5c1; fill-opacity: .10; }
.noon-horizon { fill: none; stroke: #48b5c1; stroke-width: 1.2; stroke-opacity: .48; }
.noon-horizon.back { stroke-dasharray: 4 5; stroke-opacity: .28; }
.noon-season-tracks { fill: none; stroke: #ff9651; stroke-opacity: .34; stroke-width: 1.1; stroke-dasharray: 5 5; stroke-linecap: round; stroke-linejoin: round; }
.noon-season-points circle { fill: #ffc85a; fill-opacity: .14; stroke: #ffc85a; stroke-width: 1.3; }
.noon-season-points text { paint-order: stroke; stroke: #0c202d; stroke-width: 3px; }
.noon-clock-labels text { font: 13px var(--mono); fill: #a7bbc3; paint-order: stroke; stroke: #0c202d; stroke-width: 3px; }
.noon-workspace .noon-directions text { fill: #b3c7ca; font-size: 14px; }
.noon-shadow { stroke: #8cd7ff; stroke-width: 1.6; stroke-linecap: round; opacity: .8; }
.noon-cast-shadow { fill: url(#noonShadowShade); stroke: #75b8e8; stroke-opacity: .55; stroke-width: .7; }
.noon-cast-shadow-soft { fill: #75b8e8; opacity: .25; filter: url(#noonShadowBlur); }
.noon-pole-axis { fill: none; stroke: none; }
.noon-pole-body { fill: url(#noonPoleWood); stroke: #573d29; stroke-width: .45; }
.noon-pole-grain { fill: none; stroke: #79512f; stroke-opacity: .55; stroke-width: .4; }
.noon-pole-cap { fill: #edce94; stroke: #93663b; stroke-width: .5; }
.noon-pole-foot { fill: #a57547; stroke: #67482e; stroke-width: .4; }
.noon-pole-contact { fill: #01070d; opacity: .8; }
.noon-incident { fill: none; stroke: #ff9651; stroke-width: 1.7; marker-end: url(#noonArrow); }
.noon-workspace .noon-shadow-label { fill: #8cd7ff; font: 600 15px var(--body); paint-order: stroke; stroke: #07131e; stroke-width: 3px; }
.noon-sun { fill: #ffc85a; }
.noon-sun-halo { fill: rgba(255,200,90,.14); }
.noon-module.module-expanded .noon-workspace { flex: 1; min-height: 0; }
.noon-module.module-expanded .noon-workspace svg { height: 100%; min-height: 0; }
@media (min-width: 641px) {
  .page { height: 100vh; height: 100dvh; min-height: 0; }
  .experiment-grid { flex: 1; }
  .experiment-grid > .controls { flex-wrap: nowrap; }
  .experiment-grid > .controls .progress { order: 0; flex-basis: auto; min-width: 0; }
  .module-expanded .module-content { grid-template-columns: 154px minmax(0,1fr); }
}
@media (max-width: 1100px) {
  .controls .cycle-tag { display: none; }
  .experiment-grid .module-heading h2, #orbitModule:not(.module-expanded) .intro h1 { font-size: 16px; }
  .noon-workspace { gap: 0; }
  .module-content { grid-template-columns: 120px minmax(0,1fr); gap: 7px; }
  .module-sidebar { padding-right: 6px; }
  .experiment-grid .module-heading { gap: 6px; }
  .module-expand { padding: 4px 6px; font-size: 11px; }
}
@media (max-width: 640px) {
  .controls { flex-wrap: wrap; }
  .controls .progress { order: 3; flex-basis: 100%; min-width: 0; }
  .season-shortcuts button { padding: 5px; font-size: 10px; }
  .page { width: 100%; padding: 0 10px; }
  .page { height: auto; min-height: 100dvh; }
  .experiment-grid { grid-template-columns: minmax(0,1fr); grid-template-rows: none; gap: 8px; flex: none; }
  .module-content { min-height: 290px; }
  #orbitModule:not(.module-expanded) .scene { flex: auto; height: clamp(235px,55vw,330px); }
  #trackModule:not(.module-expanded) .module-svg { flex: auto; height: auto; min-height: 0; }
  .noon-workspace { grid-template-columns: minmax(0,1fr); }
  .noon-workspace svg { max-height: none; }
  .noon-module.module-expanded .module-content { min-height: 0; }
  .noon-module.module-expanded .noon-workspace svg { min-height: 0; max-height: none; }
}
@media (pointer: coarse) { .city-switch { min-height: 44px; } }
@media (min-width: 641px) and (max-height: 600px) {
  .module-sidebar { gap: 6px; }
  .module-sidebar .module-toolbar { gap: 4px; }
  .module-sidebar .daylight-panel { padding-top: 4px; font-size: 10px; line-height: 1.3; }
  .module-sidebar .duration-row { gap: 3px; margin-bottom: 6px; }
  .module-sidebar .duration-row:last-child { margin-bottom: 0; }
  .module-sidebar .duration-track { height: 7px; }
}
