/* Page-level fallbacks. The bundled Scroll Craft engine remains unchanged. */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.concept-demo [hidden], .northstar-demo [hidden] { display: none !important; }
.concept-demo button, .northstar-demo button { touch-action: manipulation; }
.concept-demo main, .northstar-demo main { overflow: visible; }

/* If JS fails, every chapter is present in normal document reading order. */
html:not(.demo-enhanced) :is(.northstar-world,.northstar-friction,.northstar-expertise,.northstar-summit,.signal-topology,.signal-provenance,.aperture-conviction,.aperture-cut,.aperture-specimens) { height: auto; }
html:not(.demo-enhanced) :is(.northstar-world__sticky,.northstar-friction__sticky,.northstar-expertise__sticky,.northstar-summit__sticky,.signal-topology__sticky,.signal-provenance__sticky,.aperture-conviction__sticky,.aperture-cut__sticky,.aperture-specimens__sticky) { position: relative; height: auto; min-height: 80svh; }
html:not(.demo-enhanced) :is(.signal-topology__chapters,.aperture-cut__chapters) { position: relative; top: auto; right: auto; bottom: auto; left: auto; width: auto; padding: 28rem 1rem 4rem; display: grid; gap: 1rem; }
html:not(.demo-enhanced) :is(.signal-topology__chapters,.aperture-cut__chapters) article { position: relative; max-width: 44rem; width: auto; top: auto; right: auto; bottom: auto; left: auto; opacity: 1; transform: none; }
html:not(.demo-enhanced) :is(.signal-probe,.signal-probe-status,.aperture-facet-controls,.aperture-cut__status) { display: none; }
html:not(.demo-enhanced) [data-demo-pan-track] { transform: none; }
html:not(.demo-enhanced) :is(.northstar-expertise__viewport,.signal-source-viewport,.aperture-specimens__viewport) { overflow-x: auto; }
html:not(.demo-enhanced) .northstar-summit__veil { opacity: 1; clip-path: none; }
html:not(.demo-enhanced) .northstar-summit__route path { stroke-dashoffset: 0; }
html:not(.demo-enhanced) .aperture-object { pointer-events: none; }
html:not(.demo-enhanced) .signal-question form > div { display: none; }
html:not(.demo-enhanced) .signal-question form::before { content: "Enable JavaScript to try the local sample. Nothing is uploaded."; display: block; padding-block: .5rem; font-size: .9rem; }
html:not(.demo-enhanced) .demo-reveal { opacity: 1; transform: none; }

/* A failed page-specific script must not hide its story behind the shared
   reveal readiness flag. Other page enhancements may still be working. */
.aperture-v2:not(.aperture-motion-ready) .aperture-cut { height: auto; }
.aperture-v2:not(.aperture-motion-ready) .aperture-cut__sticky { position: relative; height: auto; min-height: 0; }
.aperture-v2:not(.aperture-motion-ready) .aperture-cut__chapters { position: relative; right: auto; bottom: auto; left: auto; width: auto; padding: 28rem 1rem 4rem; display: grid; gap: 1rem; }
.aperture-v2:not(.aperture-motion-ready) .aperture-cut__chapters article { position: relative; opacity: 1; transform: none; }
.aperture-v2:not(.aperture-motion-ready) :is(.aperture-facet-controls,.aperture-cut__status) { display: none; }

/* Panning remains native and reachable when movement is reduced. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  :is(.northstar-expertise,.signal-provenance,.aperture-specimens) { height: auto; padding-block: 4rem; }
  :is(.northstar-expertise__sticky,.signal-provenance__sticky,.aperture-specimens__sticky) { position: relative; height: auto; min-height: 0; }
  :is(.northstar-expertise__viewport,.signal-source-viewport,.aperture-specimens__viewport) { overflow-x: auto; }
  [data-demo-pan-track] { transform: none !important; }
  .demo-reveal { opacity: 1; transform: none; }
}

/* A short landscape viewport cannot safely hold full-screen pinned copy. */
@media (max-height: 600px) {
  :is(.northstar-friction,.northstar-expertise,.signal-topology,.signal-provenance,.aperture-conviction,.aperture-cut,.aperture-specimens) { height: auto; }
  :is(.northstar-friction__sticky,.northstar-expertise__sticky,.signal-topology__sticky,.signal-provenance__sticky,.aperture-conviction__sticky,.aperture-cut__sticky,.aperture-specimens__sticky) { position: relative; height: auto; min-height: 0; padding-block: 5rem; }
  :is(.signal-topology__chapters,.aperture-cut__chapters) { position: relative; right: auto; bottom: auto; left: auto; width: auto; padding: 24rem 1rem 5rem; display: grid; gap: 1rem; }
  :is(.signal-topology__chapters,.aperture-cut__chapters) article { position: relative; opacity: 1; transform: none; max-width: 42rem; }
  :is(.northstar-expertise__viewport,.signal-source-viewport,.aperture-specimens__viewport) { overflow-x: auto; }
  [data-demo-pan-track] { transform: none !important; }
}
