/* Let controls follow the measured heading height instead of overlapping it. */
.stage-top { padding-bottom: 12px; }
.stage-modes { position: relative; top: auto; left: auto; right: auto; margin: 0 66px 0 28px; width: max-content; max-width: calc(100% - 94px); }
.legend { position: relative; top: auto; left: auto; margin: 14px 90px 0 28px; }
.axis-readout { position: relative; top: auto; left: auto; margin: 16px 90px 0 28px; width: fit-content; }
@media (max-width: 1100px) { .stage-modes, .legend, .axis-readout { margin-left: 22px; } .stage-modes { max-width: calc(100% - 88px); } }
@media (max-width: 540px) { .source-label { bottom: 285px; } .stage-modes, .legend, .axis-readout { margin-left: 18px; } .stage-modes { margin-right: 58px; max-width: calc(100% - 76px); } }

.demo-toolbar { position: relative; z-index: 35; border-bottom: 1px solid var(--line); background: #0b202c; padding: 10px 28px; display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; }
.demo-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.demo-toolbar button, .demo-toolbar summary { font-size: 13px; }
.demo-toolbar summary { cursor: pointer; color: var(--ice); padding: 10px 8px; }
#station-edit-status { font-size: 12px; color: var(--muted); }
#demo-message:empty { display: none; }
#demo-message { color: var(--fire); font-size: 12px; }
.demo-help-copy { position: absolute; top: calc(100% + 8px); left: 18px; max-width: 580px; width: calc(100vw - 36px); max-height: 55vh; overflow: auto; padding: 18px; border: 1px solid #527483; border-radius: 9px; background: #0d2533; box-shadow: 0 12px 35px #0008; font-size: 14px; line-height: 1.7; }
.demo-help-copy strong { color: var(--ice); }
#globe { cursor: grab; }
#globe:active { cursor: grabbing; }
@media (min-width: 801px) and (max-width: 1100px) { .source-label { bottom: 292px; } }
body.presenting { overflow: hidden; }
.presenting > header { min-height: 58px; padding-top: 9px; padding-bottom: 9px; }
.presenting .brand span { display: none; }
.presenting .workspace { grid-template-columns: minmax(0,1fr); grid-template-areas: 'stage' 'time'; grid-template-rows: minmax(0,1fr) auto; min-height: 0; height: calc(100dvh - var(--presentation-chrome, 120px)); }
.presenting .panel { display: none; }
.presenting .stage { min-height: 0; }
.presenting .stage-top { display: flex; padding: 14px 22px 8px; }
.presenting .stage-top h1 { font-size: clamp(20px,2.2vw,28px); max-width: none; margin: 3px 0; }
.presenting .stage-top .eyebrow { font-size: 10px; }
.presenting .surface-switch { margin-top: 0; }
.presenting .stage-modes { margin-left: 22px; }
.presenting .legend { margin: 9px 85px 0 22px; font-size: 11px; }
.presenting .axis-readout { margin: 10px 85px 0 22px; font-size: 12px; padding: 8px 12px; }
.presenting .camera { top: 100px; }
.presenting .source-label { left: 22px; bottom: 18px; max-width: 45%; font-size: 12px; }
.presenting .source-label strong { font-size: 15px; }
.presenting .stage-note { display: none; }
.presenting .local-section { width: 255px; bottom: 14px; right: 18px; left: auto; }
.presenting #section-view { height: 108px; }
.presenting .local-title { padding: 8px 10px 4px; font-size: 11px; }
.presenting .section-foot { padding: 5px 10px 8px; font-size: 10px; }
.presenting .time-panel { padding: 12px 22px; }
.presenting .sequence-banner { margin-bottom: 9px; gap: 12px; }
.presenting .sequence-banner strong { font-size: 16px; margin: 3px 0; }
.presenting .sequence-banner p { font-size: 12px; line-height: 1.35; }
.presenting .sequence-percent { font-size: 24px; }
.presenting .timeline { margin: 8px 0 0; }
.presenting .time-stops button { min-height: 26px; }
.presenting .follow-story { margin-top: 5px; }
.presenting .time-note { margin: 5px 0 0; font-size: 10px; }
@media (max-width: 800px) {
  .demo-toolbar { padding: 8px 18px; gap: 6px; }
  .presenting .stage-top { display: block; padding: 10px 18px 6px; }
  .presenting .stage-top h1 { font-size: 20px; }
  .presenting .surface-switch { margin-top: 7px; }
  .presenting .stage-modes { margin-left: 18px; }
  .presenting .legend { margin-left: 18px; }
  .presenting .local-section { display: none; }
  .presenting .stage:has([data-view=cutaway][aria-pressed=true]) .local-section { display: block; width: 195px; }
  .presenting .source-label { left: 18px; bottom: 12px; max-width: 80%; }
  .presenting .stage:has([data-view=cutaway][aria-pressed=true]) .source-label { max-width: 36%; }
  .presenting .sequence-banner p, .presenting .time-note { display: none; }
  .presenting .time-panel { padding: 9px 18px; }
  .presenting .time-value strong { font-size: 18px; }
}
@media (max-width: 540px) {
  .demo-toolbar button { min-height: 34px; padding: 6px 9px; }
  .demo-toolbar summary { padding: 8px 4px; }
  .presenting .stage-top .eyebrow { display: none; }
  .presenting .stage-modes button { min-height: 32px; }
  .presenting .legend { display: none; }
  .presenting .time-stops { display: none; }
  .presenting .sequence-banner strong { font-size: 14px; }
  .presenting .source-label strong { font-size: 13px; }
  .presenting #station-location { font-size: 10px; }
  .presenting .stage:has([data-view=cutaway][aria-pressed=true]) .local-section { display: none; }
  .presenting .stage:has([data-view=cutaway][aria-pressed=true]) .source-label { max-width: 80%; }
  .presenting #section-view { height: 76px; }
}
@media (max-height: 620px) and (min-width: 801px) {
  .presenting .workspace { grid-template-columns: minmax(0,1fr) 300px; grid-template-areas: 'stage time'; grid-template-rows: minmax(0,1fr); }
  .presenting .time-panel { border-top: 0; border-left: 1px solid var(--line); padding: 16px; overflow: auto; }
  .presenting .play-row { flex-wrap: wrap; }
  .presenting .time-value { flex-basis: 100%; margin: 9px 0 0; text-align: left; }
  .presenting .time-value strong { font-size: 22px; }
  .presenting .time-stops { display: grid; grid-template-columns: repeat(3,1fr); gap: 4px 9px; }
  .presenting .time-stops button { text-align: left; }
  .presenting .stage-top .eyebrow { display: none; }
  .presenting .source-label { max-width: 75%; }
  .presenting .sequence-banner p, .presenting .time-note { display: none; }
  .presenting .local-section { display: none; }
  .presenting .stage:has([data-view=cutaway][aria-pressed=true]) .local-section { display: none; }
}
/* Narrow windows scroll instead of compressing the interactive stage. */
@media (max-width: 800px) {
  body.presenting { overflow: auto; }
  .presenting .workspace { height: auto; grid-template-rows: auto auto; }
  .presenting .stage { min-height: 640px; }
  .presenting #globe { right: 24px; }
}
.book-compass{padding:20px 22px;margin-bottom:22px;border:1px solid #466661;border-radius:12px;background:linear-gradient(120deg,#142e31,#10232e);display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px 24px}.book-compass h2{font-family:var(--serif,Georgia,serif);font-size:27px;font-weight:400;line-height:1.15;margin:8px 0 10px}.book-compass p{font-size:14px;line-height:1.65;margin:0;color:#d1deda}.book-compass .book-source,.book-source{font-size:11px;line-height:1.6;color:#9fcebe;margin-top:10px;letter-spacing:.03em}.book-compass .book-scope{grid-column:1/-1;font-size:12px;color:#9fb5bd;border-top:1px solid #3a535a;padding-top:12px}.book-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap;align-content:start;max-width:260px}.book-actions button{min-height:40px;border:1px solid #4a6d70;border-radius:6px;padding:8px 12px;font-size:13px}.book-actions #book-next{background:#b4ded2;color:#0b2428}.book-actions button:disabled{opacity:.35;cursor:default}.book-edition{border-top:1px solid var(--line);padding-top:20px;font-size:12px!important}.book-card{border-top:1px solid #38525b;padding:16px 0}.book-card h3{margin:8px 0;color:#e1eae4;font-size:21px;font-weight:400}.book-card p{margin:8px 0;font-size:14px;line-height:1.7}.book-card .book-source{font-size:11px;color:#9fcebe}.book-card button{margin-top:8px;background:#b4ded2;color:#0b2428;border-radius:6px;padding:10px 15px}#book-dialog{width:min(760px,calc(100% - 28px));max-height:85dvh;overflow:auto}#book-dialog>h2{font-family:Georgia,serif;font-weight:400;font-size:34px;line-height:1.15;margin:16px 0}#book-open{color:#b4ded2}.presenting .book-compass{display:none}@media(max-width:800px){.book-compass{grid-template-columns:1fr;padding:17px}.book-actions{max-width:none}.book-compass h2{font-size:25px}.book-compass p{font-size:13px}#book-dialog>h2{font-size:29px}}@media(min-width:801px){.book-compass{grid-template-columns:1fr}.book-actions{max-width:none}} 
.diagram-link{display:flex;justify-content:space-between;align-items:center;gap:24px;padding:18px 28px;background:linear-gradient(110deg,#163235,#0d2530);border-bottom:1px solid #47665f;border-left:3px solid #e3be80}
.diagram-link h2{font-family:Georgia,serif;font-size:24px;font-weight:400;line-height:1.2;margin:8px 0}
.diagram-link p{color:#b6cbc9;font-size:13px;line-height:1.65;margin:5px 0;max-width:950px}
.diagram-link #diagram-link-status:empty{display:none}.diagram-link-actions{display:flex;gap:12px;flex-direction:column;flex-shrink:0;align-items:flex-start}
.diagram-link-actions button{border:1px solid #75958a;border-radius:5px;padding:9px 13px;background:#b4ded2;color:#102c2e;font-size:13px}
.diagram-link-actions a{font-size:13px;color:#d5e7da}.presenting .diagram-link{display:none}
@media(max-width:800px){.diagram-link{display:block;padding:17px 18px}.diagram-link h2{font-size:22px}.diagram-link-actions{flex-direction:row;flex-wrap:wrap;align-items:center;margin-top:12px}.diagram-link p{font-size:12px}}

.ice-story{margin:18px 0;padding:15px 0 0;border-top:1px solid #42635e}.ice-story-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}.ice-story h4{font-size:15px;font-weight:600;margin:0}.ice-story-heading>span{font-size:9px;letter-spacing:.12em;color:#e3be80}.ice-story>p{font-size:12px;line-height:1.6;color:#b7ceca;margin:9px 0 12px}.ice-story #ice-controls{margin-top:16px}.ice-story .control label{font-size:12px}.ice-story input{accent-color:#d1e8ec}.ice-story .input-note,.ice-source p{font-size:11px;line-height:1.65}.ice-toggle,.ice-focus{display:flex;gap:7px;flex-wrap:wrap;margin:12px 0}.ice-toggle button,.ice-focus button{flex:1;min-width:90px;min-height:37px;padding:7px;font-size:11px}.ice-focus button{color:#b4ded2}.ice-toggle button[aria-pressed=true]{background:#cce2e4;color:#142d36}.ice-source{border-top:1px solid #365953;margin-top:14px}.ice-source summary{font-size:11px;color:#b4ded2;cursor:pointer;padding:12px 0}.ice-source a{font-size:11px}.world-palette .ice{background:#d1e4e9}#ice-view-status{border-left:2px solid #d1e4e9;padding-left:9px}

.legend i.ice-reference{background:#d1e4e9}

/* Ice inspection keeps the full globe alongside independently scrollable controls. */
.ice-exploring .panel-heading .intro{display:none}.ice-exploring .time-panel .book-compass,.ice-exploring .time-panel .sequence-banner,.ice-exploring .time-panel .timeline,.ice-exploring .time-panel .speed-label,.ice-exploring .time-panel .follow-story{display:none}.ice-exploring .source-label{max-width:70%}.ice-exploring .stage-note{display:none}
@media(min-width:801px){.ice-exploring:not(.presenting) .workspace{grid-template-rows:minmax(660px,calc(100dvh - 56px)) auto}.ice-exploring:not(.presenting) .panel{max-height:100dvh;overflow:auto;align-self:start}.ice-exploring .panel-heading .model-context{margin-bottom:12px}}
@media(max-width:800px){.ice-exploring:not(.presenting) .stage{min-height:720px}.ice-exploring .source-label{bottom:26px;max-width:80%}}

#ice-compare{pointer-events:auto;min-height:35px;margin-top:10px;padding:6px 12px;font-size:12px;color:#d8eeec;background:#0b2433ed;border-color:#709594}

.ice-stage{padding:10px;border-left:2px solid #cce4e9;background:#1a3d46;color:#d9ece8;font-size:12px;line-height:1.6}.ice-story .ice-follow{font-size:12px;line-height:1.5;align-items:center;margin:10px 0 14px}.ice-story .ice-follow input{flex:none}#ice-compare{display:block}.ice-exploring.ice-playing .time-panel .timeline{display:block}.ice-exploring.ice-playing .time-panel .speed-label{display:flex}.ice-exploring.ice-playing .time-panel .time-note{display:block}

.comet-launch{margin-top:18px;color:#cde9ec;border-color:#668c8b}.comet-story{margin-top:18px;padding-top:18px;border-top:1px solid #42635e}.comet-story h3{font-family:Georgia,serif;font-size:30px;font-weight:400;line-height:1.18;margin:15px 0}.comet-steps{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-bottom:12px}.comet-steps button{font-size:12px;min-height:39px;padding:8px}.comet-steps button[aria-pressed=true]{background:#cce4e9;color:#102c36}.comet-story .input-note{font-size:12px;line-height:1.7}.comet-exploring .world-settings>.control,.comet-exploring .world-settings>.world-status,.comet-exploring .world-settings>.world-palette,.comet-exploring .world-settings>#world-note,.comet-exploring .world-options,.comet-exploring .ice-story,.comet-exploring #comet-open,.comet-exploring .tabs,.comet-exploring .tab-panel,.comet-exploring .result-panel,.comet-exploring .panel-bottom,.comet-exploring .local-section,.comet-exploring .book-compass,.comet-exploring .follow-story{display:none}.comet-exploring .panel-heading .intro{font-size:13px}.comet-exploring .source-label{max-width:68%}.comet-exploring .stage-note{max-width:430px}.comet-exploring .time-panel .sequence-banner{padding-top:0}
@media(min-width:801px){.comet-exploring:not(.presenting) .workspace{grid-template-rows:minmax(660px,calc(100dvh - 56px)) auto}.comet-exploring:not(.presenting) .panel{max-height:100dvh;overflow:auto;align-self:start}}
@media(max-width:800px){.comet-exploring:not(.presenting) .stage{min-height:700px}.comet-exploring .source-label{bottom:26px;max-width:80%}.comet-exploring .stage-note{display:none}}

.comet-exploring .world-settings>.world-heading{display:none}@media(max-width:800px){.comet-exploring .panel{display:block}}

.comet-exploring #time-stops{display:none}.comet-steps button:last-child{grid-column:1/-1}

.story-controls,.story-scene{display:none}.comet-exploring .story-controls{display:flex;position:absolute;right:28px;bottom:27px;gap:7px;z-index:7}.story-controls button{min-height:43px;background:#c4e5df;color:#102b32;border:1px solid #e3f4e9;border-radius:6px;padding:9px 15px;font-size:13px}.story-controls #story-restart{font-size:22px;padding:5px 12px}.comet-exploring .story-scene{display:block;color:#ffc18e;font-size:11px;letter-spacing:.12em;margin-bottom:10px}.comet-exploring .source-label{bottom:27px;max-width:54%;padding:16px 18px;background:linear-gradient(100deg,#061925f0,#091d2bc2);border-left:2px solid #89b9b6;border-radius:0 8px 8px 0}.comet-exploring .source-label strong{font-family:Georgia,serif;font-size:27px;line-height:1.12;font-weight:400}.comet-exploring .source-label>span:not(.story-scene){font-size:11px;line-height:1.5;margin-top:8px}.comet-exploring .stage-note{font-size:11px;line-height:1.5;max-width:400px;margin-top:9px}.comet-exploring .surface-switch,.comet-exploring .stage-modes{display:none}.comet-exploring .legend{top:145px}.comet-exploring .camera{top:28px}.comet-exploring.impact-now .source-label{border-left-color:#ffaf74;box-shadow:0 0 32px #ff9b5420}.comet-exploring.impact-now .story-scene{color:#ffbd6d}.comet-exploring.impact-now .source-label strong{color:#ffe3c6}
@media(max-width:800px){.comet-exploring .source-label{bottom:89px;left:18px;max-width:calc(100% - 36px);padding:13px 15px}.comet-exploring .source-label strong{font-size:24px}.comet-exploring .story-controls{bottom:25px;right:18px}.comet-exploring .legend{top:112px;left:18px;max-width:75%}.comet-exploring .camera{top:120px}.comet-exploring:not(.presenting) .stage{min-height:740px}.comet-exploring .stage-note{display:none}}
.comet-exploring .legend{position:absolute;margin:0;left:28px;top:142px;max-width:400px}
@media(min-width:801px){.comet-exploring .source-label{max-width:390px}}
@media(max-width:800px){.comet-exploring .legend{left:18px;top:109px;max-width:72%}}
/* The generic presenter writes inline caption offsets; reserve the story controls. */
@media(max-width:800px){.comet-exploring .source-label{bottom:89px!important;max-width:calc(100% - 36px)!important}.comet-exploring:not(.presenting) .stage{min-height:800px}}

.story-controls #story-camera{background:#0c2835e8;color:#d0eae6;border-color:#6e9697;font-size:11px;padding:8px 10px}.story-controls #story-camera[aria-pressed=true]{border-color:#b4ded2;color:#e5f8ec}.comet-exploring .story-controls{flex-wrap:wrap;justify-content:flex-end;max-width:calc(100% - 36px)}
@media(min-width:801px){.comet-exploring .source-label{max-width:390px!important}}

.remnant-source{margin-top:18px;padding-top:17px;border-top:1px solid #42635e}.remnant-source .eyebrow{font-size:9px;letter-spacing:.1em}.remnant-source h4{font-family:Georgia,serif;font-size:24px;font-weight:400;line-height:1.2;margin:10px 0 14px}.remnant-image{display:block;border:1px solid #496c70;border-radius:7px;overflow:hidden;background:#071b27}.remnant-image img{display:block;width:100%;height:auto}.remnant-source p{font-size:12px;line-height:1.65;color:#c0d4d0;margin:12px 0}.remnant-source .input-note{font-size:11px}.remnant-links{display:grid;gap:9px;margin-top:12px}.remnant-links a{font-size:12px;color:#c5e8d9;line-height:1.45}.marker-label.remnant-label{color:#ffe1b0;border-color:#8b6c46;background:#261e17ed;font-size:11px}

#anomaly-open{display:none}.comet-exploring #anomaly-open{display:inline-block;font-size:11px;line-height:1.4;margin-top:10px;color:#d5e8cc;text-decoration:underline;text-underline-offset:3px;pointer-events:auto}

.antarctic-cutaway{position:absolute;z-index:5;right:18px;top:172px;width:44%;padding:14px 14px 12px;border:1px solid #547778;border-radius:10px;background:linear-gradient(135deg,#15313aed,#091d2aee);box-shadow:0 16px 42px #0005}.antarctic-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.antarctic-heading .eyebrow{font-size:9px;letter-spacing:.12em}.antarctic-heading h3{font-family:Georgia,serif;font-size:23px;font-weight:400;line-height:1.12;margin:8px 0 0}.antarctic-heading button{min-height:28px;padding:0 7px;font-size:19px;background:transparent}#antarctic-viewport{height:225px;position:relative;margin:0 -10px;overflow:hidden}#antarctic-labels{position:absolute;inset:0;z-index:2;pointer-events:none}.antarctic-label{position:absolute;font-size:9px;background:#0b2130df;padding:3px 5px;color:#e2efeb;white-space:nowrap;border-radius:3px;border:1px solid #61807c;max-width:150px}.antarctic-key{display:flex;gap:10px;flex-wrap:wrap;font-size:9px;color:#d6e7e1;margin:2px 0 8px}.antarctic-key i{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:4px}.antarctic-key .core{background:#efaf6c}.antarctic-key .rock{background:#b5936b}.antarctic-key .ice{background:#b8e4eb}.antarctic-scope{font-size:9px;line-height:1.5;color:#a9c4c4;margin:6px 0}.antarctic-source{font-size:10px;color:#c5e8d9}.cutaway-launch{display:none}.comet-exploring .cutaway-launch{display:inline-block;font-size:11px;min-height:28px;margin-top:9px;margin-right:10px;padding:4px 8px;pointer-events:auto;border-color:#73968b;color:#d2e8dc}.cutaway-open #globe{top:155px;bottom:155px;right:48%!important;left:0}.cutaway-open .source-label{max-width:44%!important;padding:12px 14px}.cutaway-open .source-label strong{font-size:20px}.cutaway-open .source-label .stage-note,.cutaway-open .source-label #station-location,.cutaway-open .source-label #anomaly-open{display:none}.cutaway-open .source-label .cutaway-launch{display:none}.cutaway-open .camera{top:28px}.cutaway-open .legend{max-width:45%;font-size:10px}
@media(max-width:800px){.cutaway-open:not(.presenting) .stage{min-height:800px}.cutaway-open #globe{top:115px;bottom:460px;right:0!important}.antarctic-cutaway{left:18px;right:18px;top:353px;width:auto;padding:10px 12px 8px}.antarctic-heading h3{font-size:19px;line-height:1.1;margin-top:5px}.antarctic-heading h3 br{display:none}.antarctic-heading .eyebrow{font-size:8px}#antarctic-viewport{height:158px}.antarctic-scope{font-size:8px;margin:4px 0}.antarctic-key{font-size:8px;gap:9px;margin:0 0 4px}.antarctic-source{font-size:9px}.antarctic-label{font-size:8px;padding:2px 4px}.cutaway-open .source-label{bottom:85px!important;max-width:calc(100% - 36px)!important;padding:8px 12px}.cutaway-open .source-label strong{font-size:19px;margin-bottom:0}.cutaway-open .story-scene{font-size:9px;margin-bottom:6px}.cutaway-open .legend{top:85px;max-width:72%;font-size:9px}.cutaway-open .camera{top:112px}.cutaway-open .source-label #anomaly-open{display:none}}
.antarctic-heading button[aria-pressed=true]{color:#dbede5;border-color:#7faaa5}
@media(max-width:800px){#antarctic-viewport{height:178px}}
@media(max-width:800px){.cutaway-open .source-label{display:none}}

@media(min-width:801px) and (max-width:1100px){.comet-exploring .workspace{grid-template-columns:1fr;grid-template-areas:'stage' 'time' 'panel'}.comet-exploring:not(.presenting) .workspace{grid-template-rows:minmax(660px,calc(100dvh - 56px)) auto auto}.comet-exploring:not(.presenting) .panel{max-height:none;overflow:visible}.antarctic-heading h3{font-size:21px}}

@media(min-width:801px) and (max-width:1100px){.comet-exploring:not(.presenting) .stage{min-height:660px}}
@media(min-width:801px) and (max-width:1100px) and (max-height:600px){.comet-exploring:not(.presenting) .workspace{grid-template-rows:620px auto auto}.comet-exploring:not(.presenting) .stage{min-height:620px}#antarctic-viewport{height:195px}}
