.cinematic {
  position: relative;
  background: var(--ps-graphite);
  color: var(--ps-porcelain);
  isolation: isolate;
}
.cinematic-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ps-space-4);
  min-height: var(--ps-space-16);
  border-bottom: var(--ps-rule) solid var(--ps-rule-dark);
}
.cinematic-toolbar .technical {
  color: var(--ps-slate);
}
.view-control {
  min-height: var(--ps-space-12);
  padding: var(--ps-space-2) 0;
  border: 0;
  background: var(--ps-graphite);
  color: var(--color-bronze);
  text-decoration: underline;
  text-underline-offset: 0.25em;
  font-size: var(--ps-small-size);
  cursor: pointer;
}
.view-control[hidden] {
  display: none;
}
.view-control:disabled {
  color: var(--ps-slate);
  cursor: default;
  text-decoration: none;
}
.cinematic-stage {
  display: block;
  visibility: hidden;
  position: sticky;
  top: 0;
  height: 38svh;
  margin-bottom: -38svh;
  /* Narrow screens: the scene band stays in front; copy scrolls beneath it. */
  z-index: 1;
  overflow: hidden;
  background: var(--ps-graphite);
  pointer-events: none;
}
.cinematic-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.cinematic[data-enhanced="true"] .cinematic-stage {
  visibility: visible;
}
.cinematic[data-enhanced="true"] .chapter-picture {
  visibility: hidden;
}
/* Keep focused or anchored content clear of the pinned band (WCAG 2.4.11). */
@media (max-width: 1023px) {
  html:has(.cinematic[data-enhanced="true"]) {
    scroll-padding-top: calc(38svh + var(--ps-space-4));
  }
}
.chapter {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding-bottom: var(--ps-space-16);
}
.chapter-picture {
  display: block;
  width: 100%;
  height: 38svh;
  flex: 0 0 38svh;
  overflow: hidden;
}
.chapter-picture img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.chapter-container {
  flex: 1;
  display: flex;
  align-items: center;
}
.chapter-copy {
  width: 100%;
  padding-block: var(--ps-space-8);
  background: var(--ps-graphite);
}
.chapter-index {
  color: var(--color-bronze);
  margin-bottom: var(--ps-space-6);
  display: flex;
  gap: var(--ps-space-4);
  align-items: center;
}
.chapter-index::before {
  content: "";
  display: block;
  width: var(--ps-space-8);
  height: var(--ps-rule);
  background: var(--color-bronze);
}
.chapter-copy h1,
.chapter-copy h2 {
  margin-bottom: var(--ps-space-6);
}
.chapter-copy .eyebrow {
  color: var(--color-bronze);
  margin-bottom: var(--ps-space-6);
}
.chapter-copy .small {
  color: var(--ps-slate);
}
.chapter-copy .chapter-note {
  margin-top: var(--ps-space-8);
  padding-top: var(--ps-space-4);
  border-top: var(--ps-rule) solid var(--color-bronze);
}
.chapter-copy .actions {
  margin-top: var(--ps-space-8);
}
.chapter-copy .legend {
  list-style: none;
  padding: 0;
  margin: var(--ps-space-8) 0 0;
  display: grid;
  gap: var(--ps-space-4);
}
.legend li {
  display: flex;
  align-items: baseline;
  gap: var(--ps-space-3);
}
.legend .technical {
  color: var(--color-bronze);
}
.cinematic + .technology {
  border-top: var(--ps-rule) solid var(--color-bronze);
}
@media (min-width: 1024px) {
  .cinematic {
    --cinematic-container: min(
      1200px,
      calc(100vw - 2 * clamp(20px, 5vw, 80px))
    );
    --cinematic-left: calc(
      (100vw - var(--cinematic-container)) / 2 + var(--cinematic-container) *
        0.4
    );
  }
  .cinematic-stage {
    height: 100svh;
    margin-bottom: -100svh;
    z-index: -1;
  }
  .chapter {
    padding-block: var(--ps-space-24);
    justify-content: center;
  }
  .chapter-container {
    flex: initial;
  }
  .chapter-picture {
    position: absolute;
    inset: 0 0 0 auto;
    width: calc(100% - var(--cinematic-left));
    height: 100%;
  }
  .chapter-copy {
    width: 40%;
    padding-right: var(--ps-space-6);
  }
  .chapter-copy h1 {
    max-width: 8.8em;
  }
  .cinematic-stage canvas {
    width: calc(100% - var(--cinematic-left));
    margin-left: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cinematic-stage {
    display: none !important;
  }
  .cinematic .chapter-picture {
    visibility: visible !important;
  }
}
@media print {
  .cinematic-stage,
  .cinematic-toolbar {
    display: none !important;
  }
  .cinematic .chapter-picture {
    visibility: visible !important;
  }
  .chapter {
    min-height: auto;
    break-inside: avoid;
  }
}
