:root {
  --story-copy-duration: 220ms;
  --story-film-duration: 140ms;
  --story-hold: 15svh;
  --story-gutter: clamp(2rem, 5.5vw, 5rem);
}

/*
 * Static first: every step remains a normal article with its authored poster.
 * The sticky overlay below is enabled only by the runtime capability class.
 */
.story-chapter {
  --story-canvas-top: #fdf4e7;
  --story-canvas-bottom: #b3cfdb;
  position: relative;
  background: var(--surface);
}

/* Contained films extend their own flat edge colors into the spare stage bands. */
.story-chapter[data-current-step="request"],
.story-chapter[data-current-step="request-context"],
.story-chapter[data-current-step="request-consequence"] {
  --story-canvas-top: #fef3e7;
  --story-canvas-bottom: #dce5e8;
}

.story-chapter[data-current-step="owners"],
.story-chapter[data-current-step="unowned"] {
  --story-canvas-top: #fcf2e8;
  --story-canvas-bottom: #fcf2e7;
}

.story-chapter[data-current-step="missing-role"],
.story-chapter[data-current-step="officer"] {
  --story-canvas-top: #fbf2e8;
  --story-canvas-bottom: #e1e7e9;
}

.story-chapter[data-current-step="prompt"],
.story-chapter[data-current-step="tool-action"],
.story-chapter[data-current-step="model-cost"],
.story-chapter[data-current-step="runtime"],
.story-chapter[data-current-step="policy"] {
  --story-canvas-top: #fcf2e7;
  --story-canvas-bottom: #fbf1e7;
}

.story-chapter[data-current-step="scenario-tool"] {
  --story-canvas-top: #fdf1e3;
  --story-canvas-bottom: #e1e7e9;
}

.story-chapter[data-current-step="scenario-context"] {
  --story-canvas-top: #fef3e6;
  --story-canvas-bottom: #e2e8ea;
}

.story-chapter[data-current-step="scenario-model"] {
  --story-canvas-top: #fcf0e2;
  --story-canvas-bottom: #e5e9ea;
}

.story-chapter[data-current-step="outcomes"] {
  --story-canvas-top: #f9eee2;
  --story-canvas-bottom: #dbe4e5;
}

.story-chapter[data-current-step="agent-tool"] {
  --story-canvas-top: #faf4ee;
  --story-canvas-bottom: #faf5ee;
}

.story-chapter[data-current-step="agent-data"] {
  --story-canvas-top: #f7f1ec;
  --story-canvas-bottom: #f6f0eb;
}

.story-chapter[data-current-step="agent-consequence"] {
  --story-canvas-top: #f8f3ee;
  --story-canvas-bottom: #f9f3ee;
}

.story-chapter[data-current-step="convergence"],
.story-chapter[data-current-step="invitation"] {
  --story-canvas-top: #f6f0eb;
  --story-canvas-bottom: #f5f0eb;
}

.story-rail {
  position: relative;
}

.story-stage {
  display: none;
}

.story-steps {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.story-step {
  display: grid;
  width: min(calc(100% - clamp(2rem, 8vw, 7rem)), 68rem);
  min-height: 88dvh;
  margin-inline: auto;
  padding-block: clamp(3.5rem, 8vw, 7rem);
  border-top: 1px solid var(--rule);
  align-content: center;
}

.story-step:first-child {
  border-top: 0;
}

.story-copy {
  max-width: 38rem;
}

.story-copy h1 {
  font-size: clamp(3rem, 7vw, 5rem);
}

.story-copy h2,
.story-copy h3 {
  font-size: clamp(2rem, 5vw, 3.8rem);
}

.story-copy > p {
  max-width: 68ch;
  margin-top: var(--space-4);
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.25vw, 1.12rem);
  font-weight: 550;
}

.story-eyebrow {
  margin: 0 0 var(--space-4) !important;
  color: var(--signal-deep) !important;
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero-subhead {
  max-width: 60ch !important;
  font-weight: 650 !important;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-5);
}

.story-step-fallback {
  width: 100%;
  margin-top: var(--space-6);
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--surface);
}

.story-step-fallback img {
  width: 100%;
  height: auto;
  max-height: 58dvh;
  border: 0;
  border-radius: 0;
  object-fit: contain;
}

/* Static story: a measured editorial spread, never a cinematic rail dump. */
@media (min-width: 768px) {
  html:not(.story-capable) .story-step {
    width: min(calc(100% - clamp(3rem, 8vw, 8rem)), 76rem);
    grid-template-columns: minmax(0, 0.88fr) minmax(22rem, 1.12fr);
    gap: clamp(2.5rem, 6vw, 6.5rem);
    align-items: center;
  }

  html:not(.story-capable) [data-story-step="boundary"] .story-copy,
  html:not(.story-capable) [data-story-step="owners"] .story-copy,
  html:not(.story-capable) [data-story-step="officer"] .story-copy,
  html:not(.story-capable) [data-story-step="tool-action"] .story-copy,
  html:not(.story-capable) [data-story-step="runtime"] .story-copy,
  html:not(.story-capable) [data-story-step="scenario-context"] .story-copy,
  html:not(.story-capable) [data-story-step="outcomes"] .story-copy,
  html:not(.story-capable) [data-story-step="agent-data"] .story-copy,
  html:not(.story-capable) [data-story-step="invitation"] .story-copy {
    grid-column: 2;
  }

  html:not(.story-capable) [data-story-step="boundary"] .story-step-fallback,
  html:not(.story-capable) [data-story-step="owners"] .story-step-fallback,
  html:not(.story-capable) [data-story-step="officer"] .story-step-fallback,
  html:not(.story-capable) [data-story-step="tool-action"] .story-step-fallback,
  html:not(.story-capable) [data-story-step="runtime"] .story-step-fallback,
  html:not(.story-capable) [data-story-step="scenario-context"] .story-step-fallback,
  html:not(.story-capable) [data-story-step="outcomes"] .story-step-fallback,
  html:not(.story-capable) [data-story-step="agent-data"] .story-step-fallback,
  html:not(.story-capable) [data-story-step="invitation"] .story-step-fallback {
    grid-row: 1;
    grid-column: 1;
  }

  html:not(.story-capable) .story-step-fallback {
    margin-top: 0;
  }
}

@media (min-width: 768px) and (max-height: 649px) {
  html:not(.story-capable) [data-story-chapter="threshold"] .story-step:first-child {
    min-height: calc(100svh - var(--header-height));
    padding-block: var(--space-4);
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.9fr);
    gap: var(--space-7);
  }

  html:not(.story-capable) [data-story-chapter="threshold"] .story-copy h1 {
    font-size: clamp(2.6rem, 5vw, 3.5rem);
  }

  html:not(.story-capable) [data-story-chapter="threshold"] .story-copy > p {
    font-size: 0.95rem;
    line-height: 1.48;
  }

  html:not(.story-capable) [data-story-chapter="threshold"] .hero-actions {
    margin-top: var(--space-3);
  }

  html:not(.story-capable) [data-story-chapter="threshold"] .story-step-fallback img {
    max-height: calc(100svh - var(--header-height) - 2rem);
  }
}

html:not(.story-capable) [data-story-chapter="officer-decision"] .story-steps {
  counter-reset: decision-state;
}

html:not(.story-capable) [data-story-chapter="officer-decision"] [data-story-step="prompt"],
html:not(.story-capable) [data-story-chapter="officer-decision"] [data-story-step="tool-action"],
html:not(.story-capable) [data-story-chapter="officer-decision"] [data-story-step="model-cost"],
html:not(.story-capable) [data-story-chapter="officer-decision"] [data-story-step="runtime"],
html:not(.story-capable) [data-story-chapter="officer-decision"] [data-story-step="policy"] {
  counter-increment: decision-state;
}

html:not(.story-capable) [data-story-chapter="officer-decision"] [data-story-step="prompt"] .story-copy::after,
html:not(.story-capable) [data-story-chapter="officer-decision"] [data-story-step="tool-action"] .story-copy::after,
html:not(.story-capable) [data-story-chapter="officer-decision"] [data-story-step="model-cost"] .story-copy::after,
html:not(.story-capable) [data-story-chapter="officer-decision"] [data-story-step="runtime"] .story-copy::after,
html:not(.story-capable) [data-story-chapter="officer-decision"] [data-story-step="policy"] .story-copy::after {
  display: block;
  margin-top: var(--space-5);
  color: var(--signal-deep);
  content: "Decision " counter(decision-state) " of 5";
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* JS-static modes expose a direct art index while retaining all source articles. */
.has-js:not(.story-capable) [data-story-chapter="officer-decision"] .story-stage,
.has-js:not(.story-capable) [data-story-chapter="scenario-outcomes"] .story-stage,
.has-js:not(.story-capable) [data-story-chapter="agentic-escalation"] .story-stage {
  position: relative;
  display: grid;
  width: min(calc(100% - clamp(2rem, 7vw, 7rem)), 76rem);
  min-height: 88dvh;
  margin-inline: auto;
  padding-block: clamp(2rem, 6dvh, 4.5rem);
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 0.42fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  border-block: 1px solid var(--rule);
  background: var(--surface);
  overflow: visible;
  isolation: isolate;
}

.has-js:not(.story-capable) .story-stage .story-media {
  display: none;
}

.has-js:not(.story-capable) .story-control-panels {
  min-width: 0;
  min-height: min(62dvh, 42rem);
  grid-row: 1;
  grid-column: 1;
}

.story-control-panel[hidden] {
  display: none !important;
}

.has-js:not(.story-capable) .story-control-panel {
  width: 100%;
  outline-offset: 6px;
}

.has-js:not(.story-capable) .story-control-panel-art,
.has-js:not(.story-capable) .story-control-panel-art img {
  width: 100%;
  height: min(62dvh, 42rem);
  border: 0;
  border-radius: 0;
  background: var(--surface);
  object-fit: contain;
}

.has-js:not(.story-capable) .story-director {
  display: grid;
  min-width: 0;
  grid-row: 1;
  grid-column: 2;
  align-self: center;
  border-block: 1px solid var(--rule-strong);
  background: transparent;
}

.has-js:not(.story-capable) .story-director button {
  position: relative;
  min-width: 0;
  min-height: 44px;
  padding: 0.8rem 0.9rem;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  color: var(--ink-soft);
  background: transparent;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.3;
  text-align: left;
}

.has-js:not(.story-capable) .story-director button:last-child {
  border-bottom: 0;
}

.has-js:not(.story-capable) .story-director button[aria-selected="true"] {
  color: var(--signal-deep);
  background: var(--field);
  box-shadow: inset 4px 0 0 var(--signal-deep);
}

.story-director-result {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.has-js.story-capable .story-control-panels,
.has-js.story-capable .story-director-result {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

/*
 * The synchronous seed reserves the capable rail geometry without suppressing
 * authored content. Every copy block and fallback poster remains the usable
 * presentation until the module director projects coherent semantic state.
 */
html.has-js:is(.story-preflight, .story-static-shell) .story-rail {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

html.has-js:is(.story-preflight, .story-static-shell) [data-story-chapter] .story-stage {
  position: sticky;
  top: var(--header-height);
  z-index: var(--z-art);
  display: block;
  width: 100%;
  min-height: 0;
  height: calc(100svh - var(--header-height));
  margin: 0;
  padding: 0;
  grid-area: 1 / 1;
  align-self: start;
  border: 0;
  overflow: clip;
  isolation: isolate;
  background: var(--surface);
}

html.has-js.story-static-shell .story-stage .story-media,
html.has-js:is(.story-preflight, .story-static-shell) .story-control-panels,
html.has-js:is(.story-preflight, .story-static-shell) .story-director {
  display: none;
}

html.has-js.story-preflight .story-stage .story-media,
html.has-js.story-preflight .story-stage .story-media picture,
html.has-js.story-preflight .story-stage .story-media img,
html.has-js.story-preflight .story-stage .story-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

html.has-js.story-preflight .story-stage .story-media {
  z-index: var(--z-art);
  display: block;
  margin: 0;
  overflow: hidden;
  background: var(--surface);
  pointer-events: none;
}

html.has-js.story-preflight .story-stage .story-media img,
html.has-js.story-preflight .story-stage .story-media video {
  max-width: none;
  object-fit: contain;
  object-position: var(--scene-position, center);
}

html.has-js.story-preflight .story-stage .story-poster,
html.has-js.story-preflight .story-stage [data-story-video] {
  opacity: 0;
}

html.has-js.story-preflight
  [data-story-chapter="threshold"] .story-stage [data-story-poster="question"] {
  opacity: 1;
}

html.has-js:is(.story-preflight, .story-static-shell) .story-steps {
  position: relative;
  z-index: var(--z-story);
  width: 100%;
  min-width: 0;
  grid-area: 1 / 1;
  padding: 0 0 var(--story-hold);
}

html.has-js:is(.story-preflight, .story-static-shell) .story-step {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 64svh;
  margin: 0;
  padding: clamp(1.5rem, 4svh, 2.75rem) var(--story-gutter);
  border: 0;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

html.has-js:is(.story-preflight, .story-static-shell) .story-step:last-child,
html.has-js:is(.story-preflight, .story-static-shell) [data-story-chapter="officer-decision"] .story-step {
  min-height: 72svh;
}

html.has-js:is(.story-preflight, .story-static-shell) .story-step .story-step-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  background: var(--surface);
}

html.has-js:is(.story-preflight, .story-static-shell) .story-step-fallback img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
}

html.has-js:is(.story-preflight, .story-static-shell) .story-step .story-copy {
  position: relative;
  z-index: 1;
  width: min(100%, 38rem);
  max-width: 38rem;
  padding: clamp(1.2rem, 2.6vw, 2.25rem) clamp(1.25rem, 3.5vw, 3rem);
  grid-row: auto;
  grid-column: auto;
  background: rgb(251 245 236 / 92%);
  isolation: isolate;
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

html.has-js:is(.story-preflight, .story-static-shell) .story-copy h1 {
  font-size: clamp(3.05rem, 4.5vw, 4.35rem);
  font-weight: 800;
  letter-spacing: -0.067em;
  line-height: 0.98;
}

html.has-js:is(.story-preflight, .story-static-shell) .story-copy h2,
html.has-js:is(.story-preflight, .story-static-shell) .story-copy h3 {
  font-size: clamp(2.15rem, 3.55vw, 3.7rem);
  line-height: 1;
}

html.has-js:is(.story-preflight, .story-static-shell) .story-copy > p {
  max-width: 65ch;
  font-size: clamp(0.96rem, 1.1vw, 1.08rem);
  line-height: 1.58;
}

html.has-js:is(.story-preflight, .story-static-shell)
  [data-story-chapter="officer-decision"] .story-step .story-copy::after {
  display: none;
}

/* The shared cinematic plane */
.has-js.story-capable .story-rail {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.has-js.story-capable .story-stage {
  position: sticky;
  top: var(--header-height);
  z-index: var(--z-art);
  display: block;
  width: 100%;
  height: calc(100svh - var(--header-height));
  grid-area: 1 / 1;
  align-self: start;
  overflow: clip;
  isolation: isolate;
  background: var(--surface);
}

.has-js.story-capable [data-story-chapter="request-authority"] .story-stage::after {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 3;
  height: 17svh;
  content: "";
  background:
    radial-gradient(circle at 28% 50%, var(--signal) 0 0.36rem, transparent 0.4rem),
    linear-gradient(
      90deg,
      transparent 0 8%,
      rgb(125 168 177 / 55%) 8% 28%,
      var(--signal) 28% 42%,
      rgb(125 168 177 / 55%) 42% 92%,
      transparent 92%
    );
  background-position: center, center;
  background-repeat: no-repeat;
  background-size: 100% 100%, 100% 1px;
  pointer-events: none;
}

.has-js.story-capable .story-media,
.has-js.story-capable .story-media picture,
.has-js.story-capable .story-media img,
.has-js.story-capable .story-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.has-js.story-capable .story-media {
  z-index: var(--z-art);
  margin: 0;
  overflow: hidden;
  background: var(--story-canvas-top);
  pointer-events: none;
}

.has-js.story-capable .story-media::before,
.has-js.story-capable .story-media::after {
  position: absolute;
  right: 0;
  left: 0;
  z-index: 0;
  height: 50%;
  content: "";
  pointer-events: none;
}

.has-js.story-capable .story-media::before {
  top: 0;
  background: var(--story-canvas-top);
}

.has-js.story-capable .story-media::after {
  bottom: 0;
  background: var(--story-canvas-bottom);
}

.has-js.story-capable .story-media img,
.has-js.story-capable .story-media video {
  max-width: none;
  object-fit: contain;
  object-position: var(--scene-position, center);
  filter: none;
  transform: none;
}

.has-js.story-capable .story-poster,
.has-js.story-capable [data-story-video] {
  opacity: 0;
  transition: opacity var(--story-film-duration) var(--ease-out);
}

.has-js.story-capable .story-poster {
  z-index: 1;
  transition: none;
}

.has-js.story-capable [data-media-state="loading"] .story-poster:first-child {
  opacity: 1;
  transition: none;
}

.has-js.story-capable .story-poster img[data-src]:not([src]) {
  visibility: hidden;
}

.has-js.story-capable [data-story-video] {
  z-index: 2;
}

.story-video[data-current-film="true"][data-media-state="ready"] {
  opacity: 1;
}

.has-js.story-capable [data-current-step="question"] [data-story-poster="question"],
.has-js.story-capable [data-current-step="boundary"] [data-story-poster="boundary"],
.has-js.story-capable [data-current-step="request"] [data-story-poster="request"],
.has-js.story-capable [data-current-step="request-context"] [data-story-poster="request-context"],
.has-js.story-capable [data-current-step="request-consequence"] [data-story-poster="request-consequence"],
.has-js.story-capable [data-current-step="owners"] [data-story-poster="owners"],
.has-js.story-capable [data-current-step="unowned"] [data-story-poster="unowned"],
.has-js.story-capable [data-current-step="missing-role"] [data-story-poster="missing-role"],
.has-js.story-capable [data-current-step="officer"] [data-story-poster="officer"],
.has-js.story-capable [data-current-step="prompt"] [data-story-poster="prompt"],
.has-js.story-capable [data-current-step="tool-action"] [data-story-poster="tool-action"],
.has-js.story-capable [data-current-step="model-cost"] [data-story-poster="model-cost"],
.has-js.story-capable [data-current-step="runtime"] [data-story-poster="runtime"],
.has-js.story-capable [data-current-step="policy"] [data-story-poster="policy"],
.has-js.story-capable [data-current-step="scenario-tool"] [data-story-poster="scenario-tool"],
.has-js.story-capable [data-current-step="scenario-context"] [data-story-poster="scenario-context"],
.has-js.story-capable [data-current-step="scenario-model"] [data-story-poster="scenario-model"],
.has-js.story-capable [data-current-step="outcomes"] [data-story-poster="outcomes"],
.has-js.story-capable [data-current-step="agent-tool"] [data-story-poster="agent-tool"],
.has-js.story-capable [data-current-step="agent-data"] [data-story-poster="agent-data"],
.has-js.story-capable [data-current-step="agent-consequence"] [data-story-poster="agent-consequence"],
.has-js.story-capable [data-current-step="convergence"] [data-story-poster="convergence"],
.has-js.story-capable [data-current-step="invitation"] [data-story-poster="invitation"] {
  opacity: 1;
}

.has-js.story-capable [data-media-state="loading"] .story-poster:not(:first-child) {
  opacity: 0;
}

.has-js.story-capable .story-poster[data-story-continuity-poster="true"] {
  opacity: 1;
  transition: none;
}

.has-js.story-capable [data-story-continuity-plane] {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  pointer-events: none;
  transition: none;
}

/* V03 authority names remain live HTML and reveal from the scroll-owned film clock. */
.authority-owner-layer {
  display: none;
}

.has-js.story-capable [data-story-chapter="request-authority"] .authority-owner-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: block;
  margin: 0;
  padding: 0;
  color: var(--ink);
  list-style: none;
  pointer-events: none;
}

.has-js.story-capable .authority-owner-layer li {
  position: absolute;
  padding: 0.18rem 0.42rem;
  border-left: 2px solid var(--signal);
  background: rgb(251 245 236 / 82%);
  box-shadow: 0 0 18px rgb(251 245 236 / 72%);
  font-size: clamp(0.8rem, 1.2vw, 1.08rem);
  font-weight: 800;
  letter-spacing: 0.025em;
  line-height: 1.15;
  opacity: 0;
  transform: translate(-50%, calc(-50% + 10px));
  transition:
    opacity 180ms var(--ease-out),
    transform 260ms var(--ease-out);
}

.has-js.story-capable .authority-owner-layer [data-authority-owner="security"] {
  top: 29%;
  left: 20%;
}

.has-js.story-capable .authority-owner-layer [data-authority-owner="ai"] {
  top: 29%;
  left: 80%;
}

.has-js.story-capable .authority-owner-layer [data-authority-owner="it"] {
  top: 66%;
  left: 20%;
}

.has-js.story-capable .authority-owner-layer [data-authority-owner="finance"] {
  top: 66%;
  left: 80%;
}

.has-js.story-capable [data-current-step="owners"] .authority-owner-layer[data-owner-reveal="1"] li:nth-child(1),
.has-js.story-capable [data-current-step="owners"] .authority-owner-layer[data-owner-reveal="2"] li:nth-child(-n + 2),
.has-js.story-capable [data-current-step="owners"] .authority-owner-layer[data-owner-reveal="3"] li:nth-child(-n + 3),
.has-js.story-capable [data-current-step="owners"] .authority-owner-layer[data-owner-reveal="4"] li,
.has-js.story-capable [data-current-step="unowned"] .authority-owner-layer li {
  opacity: 1;
  transform: translate(-50%, -50%);
}

/* V04 resolves the fragmented islands with the live Frostbridge bridge mark. */
.frostbridge-bridge-logo {
  display: none;
}

.has-js.story-capable [data-story-chapter="officer-decision"] .frostbridge-bridge-logo {
  position: absolute;
  top: 48.5%;
  left: 48.9%;
  z-index: 4;
  display: block;
  width: clamp(20rem, 36vw, 62rem);
  opacity: 0;
  transform: translate(-50%, -25%) scale(0.82);
  transform-origin: 50% 25%;
  pointer-events: none;
  transition:
    opacity 240ms var(--ease-out),
    transform 480ms var(--ease-out);
}

.has-js.story-capable .frostbridge-bridge-logo img {
  position: static;
  inset: auto;
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  background: transparent;
  object-fit: contain;
}

.has-js.story-capable
  [data-story-chapter="officer-decision"][data-current-step="officer"]
  .frostbridge-bridge-logo[data-bridge-logo-reveal="true"] {
  opacity: 1;
  transform: translate(-50%, -25%) scale(1);
}

/* Ordered beats share the stage plane and create the physical scroll rail. */
.has-js.story-capable .story-steps {
  position: relative;
  z-index: var(--z-story);
  width: 100%;
  min-width: 0;
  grid-area: 1 / 1;
  padding: 0 0 var(--story-hold);
  pointer-events: none;
}

.has-js.story-capable .story-step {
  display: grid;
  width: 100%;
  min-height: 64svh;
  margin: 0;
  padding: clamp(1.5rem, 4svh, 2.75rem) var(--story-gutter);
  border: 0;
  align-items: center;
}

.has-js.story-capable .story-step:last-child {
  min-height: 72svh;
}

.has-js.story-capable [data-story-chapter="officer-decision"] [data-story-step="prompt"],
.has-js.story-capable [data-story-chapter="officer-decision"] [data-story-step="tool-action"],
.has-js.story-capable [data-story-chapter="officer-decision"] [data-story-step="model-cost"],
.has-js.story-capable [data-story-chapter="officer-decision"] [data-story-step="runtime"],
.has-js.story-capable [data-story-chapter="officer-decision"] [data-story-step="policy"] {
  min-height: 72svh;
}

.has-js.story-capable .story-step-fallback {
  display: none;
}

.has-js.story-capable .story-copy {
  --story-paper-wash: linear-gradient(
    90deg,
    transparent 0%,
    rgb(251 245 236 / 95%) 10%,
    rgb(251 245 236 / 92%) 64%,
    rgb(251 245 236 / 54%) 82%,
    transparent 100%
  );
  position: relative;
  width: min(100%, 38rem);
  max-width: 38rem;
  padding: clamp(1.2rem, 2.6vw, 2.25rem) clamp(1.25rem, 3.5vw, 3rem);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  isolation: isolate;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  visibility: hidden;
  transition:
    opacity var(--story-copy-duration) var(--ease-out),
    transform var(--story-copy-duration) var(--ease-out);
}

.has-js.story-capable .story-copy::before {
  position: absolute;
  inset: -2.25rem -3rem;
  z-index: -1;
  content: "";
  background: var(--story-paper-wash);
  -webkit-mask-image: linear-gradient(0deg, transparent 0%, #000 16%, #000 84%, transparent 100%);
  mask-image: linear-gradient(0deg, transparent 0%, #000 16%, #000 84%, transparent 100%);
  pointer-events: none;
}

.has-js.story-capable .story-step[aria-current="step"] .story-copy {
  opacity: 1;
  pointer-events: auto;
  transform: none;
  visibility: visible;
}

.has-js.story-capable .story-copy h1 {
  font-size: clamp(3.05rem, 4.5vw, 4.35rem);
  font-weight: 800;
  letter-spacing: -0.067em;
  line-height: 0.98;
}

.has-js.story-capable .story-copy h2,
.has-js.story-capable .story-copy h3 {
  font-size: clamp(2.15rem, 3.55vw, 3.7rem);
  line-height: 1;
}

.has-js.story-capable .story-copy > p {
  max-width: 65ch;
  font-size: clamp(0.96rem, 1.1vw, 1.08rem);
  line-height: 1.58;
}

.has-js.story-capable .story-disclosure {
  max-width: 62ch;
  font-size: 0.75rem !important;
  line-height: 1.45 !important;
}

/* Left and upper-third placements follow each film's authored negative space. */
:is(.story-preflight, .story-static-shell, .has-js.story-capable) [data-story-step="question"] .story-copy,
:is(.story-preflight, .story-static-shell, .has-js.story-capable) [data-story-step="boundary"] .story-copy,
:is(.story-preflight, .story-static-shell, .has-js.story-capable) [data-story-step="request"] .story-copy,
:is(.story-preflight, .story-static-shell, .has-js.story-capable) [data-story-step="request-context"] .story-copy,
:is(.story-preflight, .story-static-shell, .has-js.story-capable) [data-story-step="request-consequence"] .story-copy,
:is(.story-preflight, .story-static-shell, .has-js.story-capable) [data-story-step="missing-role"] .story-copy,
:is(.story-preflight, .story-static-shell, .has-js.story-capable) [data-story-step="officer"] .story-copy,
:is(.story-preflight, .story-static-shell, .has-js.story-capable) [data-story-step="prompt"] .story-copy,
:is(.story-preflight, .story-static-shell, .has-js.story-capable) [data-story-step="agent-tool"] .story-copy,
:is(.story-preflight, .story-static-shell, .has-js.story-capable) [data-story-step="agent-data"] .story-copy,
:is(.story-preflight, .story-static-shell, .has-js.story-capable) [data-story-step="agent-consequence"] .story-copy,
:is(.story-preflight, .story-static-shell, .has-js.story-capable) [data-story-step="convergence"] .story-copy {
  justify-self: start;
  align-self: start;
}

:is(.story-preflight, .story-static-shell, .has-js.story-capable) [data-story-step="question"] .story-copy,
:is(.story-preflight, .story-static-shell, .has-js.story-capable) [data-story-step="boundary"] .story-copy,
:is(.story-preflight, .story-static-shell, .has-js.story-capable) [data-story-step="request"] .story-copy,
:is(.story-preflight, .story-static-shell, .has-js.story-capable) [data-story-step="request-context"] .story-copy,
:is(.story-preflight, .story-static-shell, .has-js.story-capable) [data-story-step="request-consequence"] .story-copy,
:is(.story-preflight, .story-static-shell, .has-js.story-capable) [data-story-step="missing-role"] .story-copy,
:is(.story-preflight, .story-static-shell, .has-js.story-capable) [data-story-step="officer"] .story-copy,
:is(.story-preflight, .story-static-shell, .has-js.story-capable) [data-story-step="convergence"] .story-copy {
  margin-top: clamp(0.75rem, 2svh, 1.5rem);
}

:is(.story-preflight, .story-static-shell, .has-js.story-capable) [data-story-step="owners"] .story-copy,
:is(.story-preflight, .story-static-shell, .has-js.story-capable) [data-story-step="unowned"] .story-copy {
  --story-paper-wash: linear-gradient(
    90deg,
    transparent 0%,
    rgb(251 245 236 / 90%) 14%,
    rgb(251 245 236 / 97%) 50%,
    rgb(251 245 236 / 90%) 86%,
    transparent 100%
  );
  justify-self: center;
  align-self: start;
  text-align: center;
}

:is(.story-preflight, .story-static-shell, .has-js.story-capable) [data-story-step="tool-action"] .story-copy,
:is(.story-preflight, .story-static-shell, .has-js.story-capable) [data-story-step="model-cost"] .story-copy,
:is(.story-preflight, .story-static-shell, .has-js.story-capable) [data-story-step="runtime"] .story-copy,
:is(.story-preflight, .story-static-shell, .has-js.story-capable) [data-story-step="policy"] .story-copy,
:is(.story-preflight, .story-static-shell, .has-js.story-capable) [data-story-step="scenario-tool"] .story-copy,
:is(.story-preflight, .story-static-shell, .has-js.story-capable) [data-story-step="scenario-context"] .story-copy,
:is(.story-preflight, .story-static-shell, .has-js.story-capable) [data-story-step="scenario-model"] .story-copy {
  --story-paper-wash: linear-gradient(
    270deg,
    transparent 0%,
    rgb(251 245 236 / 95%) 10%,
    rgb(251 245 236 / 92%) 64%,
    rgb(251 245 236 / 54%) 82%,
    transparent 100%
  );
  justify-self: end;
  align-self: start;
}

:is(.story-preflight, .story-static-shell, .has-js.story-capable) [data-story-step="model-cost"] .story-copy,
:is(.story-preflight, .story-static-shell, .has-js.story-capable) [data-story-step="policy"] .story-copy {
  --story-paper-wash: linear-gradient(
    90deg,
    transparent 0%,
    rgb(251 245 236 / 95%) 10%,
    rgb(251 245 236 / 92%) 64%,
    rgb(251 245 236 / 54%) 82%,
    transparent 100%
  );
  justify-self: start;
}

:is(.story-preflight, .story-static-shell, .has-js.story-capable) [data-story-step="outcomes"] .story-copy {
  justify-self: start;
  align-self: end;
}

:is(.story-preflight, .story-static-shell, .has-js.story-capable) [data-story-step="invitation"] .story-copy {
  --story-paper-wash: linear-gradient(
    90deg,
    transparent 0%,
    rgb(251 245 236 / 92%) 13%,
    rgb(251 245 236 / 98%) 50%,
    rgb(251 245 236 / 92%) 87%,
    transparent 100%
  );
  justify-self: center;
  align-self: start;
  text-align: center;
}

:is(.story-preflight, .story-static-shell, .has-js.story-capable) [data-story-step="invitation"] .contact-action {
  justify-items: center;
}

/* Direct scenario and agentic controls remain above the art plane. */
.has-js.story-capable .story-director {
  position: absolute;
  right: var(--story-gutter);
  bottom: clamp(1rem, 2.5svh, 1.75rem);
  z-index: var(--z-controls);
  display: flex;
  max-width: calc(100% - (2 * var(--story-gutter)));
  align-items: stretch;
  justify-content: flex-end;
  border-block: 1px solid var(--rule-strong);
  background: rgb(251 245 236 / 94%);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.has-js.story-capable [data-story-chapter][data-proximity="active"] .story-director {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.has-js.story-capable .story-director button {
  position: relative;
  min-width: 7.5rem;
  min-height: 44px;
  padding: 0.65rem 0.9rem;
  border: 0;
  border-right: 1px solid var(--rule);
  border-radius: 0;
  color: var(--ink-soft);
  background: transparent;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.25;
  text-align: left;
  transition:
    color var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out);
}

.has-js.story-capable .story-director button:last-child {
  border-right: 0;
}

.has-js.story-capable .story-director button::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  content: "";
  background: var(--signal-deep);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-fast) var(--ease-out);
}

.has-js.story-capable .story-director button:hover {
  color: var(--ink);
  background: var(--field);
}

.has-js.story-capable .story-director button[aria-selected="true"] {
  color: var(--signal-deep);
  background: var(--field);
}

.has-js.story-capable .story-director button[aria-selected="true"]::after {
  transform: scaleX(1);
}

@media (min-width: 768px) and (max-width: 1023px) {
  :root {
    --story-gutter: clamp(1.75rem, 4vw, 2.75rem);
  }

  html:is(.story-preflight, .story-static-shell, .has-js.story-capable) .story-step .story-copy {
    --story-paper-wash: linear-gradient(
      0deg,
      transparent 0%,
      rgb(251 245 236 / 96%) 14%,
      rgb(251 245 236 / 91%) 78%,
      transparent 100%
    );
    width: min(100%, 36rem);
  }

  html:is(.story-preflight, .story-static-shell, .has-js.story-capable) .story-step .story-copy {
    justify-self: start;
    align-self: end;
    margin: 0 0 clamp(4rem, 11svh, 6.5rem);
    text-align: left;
  }

  .has-js.story-capable .story-director {
    right: var(--story-gutter);
    left: var(--story-gutter);
    max-width: none;
  }

  .has-js.story-capable .story-director button {
    flex: 1 1 0;
    min-width: 0;
  }
}

@media (max-width: 767px) {
  .story-step {
    width: min(calc(100% - 2rem), 40rem);
    padding-block: var(--space-10);
  }

  .story-copy h1 {
    font-size: clamp(2.65rem, 12.5vw, 4.3rem);
  }

  .story-copy h2,
  .story-copy h3 {
    font-size: clamp(2rem, 9vw, 3.1rem);
  }

  .story-step-fallback {
    margin-top: var(--space-5);
  }

  .hero-actions,
  .contact-action {
    align-items: stretch;
  }

  .hero-actions .button,
  .contact-action .button {
    width: 100%;
  }

  .story-director {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-5);
  }

  .story-director button {
    min-height: 44px;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--rule-strong);
    border-radius: 0;
    color: var(--ink);
    background: var(--surface);
  }

  .has-js:not(.story-capable) [data-story-chapter="officer-decision"] .story-stage,
  .has-js:not(.story-capable) [data-story-chapter="scenario-outcomes"] .story-stage,
  .has-js:not(.story-capable) [data-story-chapter="agentic-escalation"] .story-stage {
    width: min(calc(100% - 2rem), 40rem);
    padding-block: var(--space-8);
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-5);
    align-content: center;
  }

  .has-js:not(.story-capable) .story-control-panels {
    min-height: min(52dvh, 31rem);
    grid-row: 1;
    grid-column: 1;
  }

  .has-js:not(.story-capable) .story-control-panel-art,
  .has-js:not(.story-capable) .story-control-panel-art img {
    height: min(52dvh, 31rem);
  }

  .has-js:not(.story-capable) .story-director {
    grid-row: 2;
    grid-column: 1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin-top: 0;
  }

  .has-js:not(.story-capable) .story-director button,
  .has-js:not(.story-capable) .story-director button:last-child {
    border: 0;
    border-right: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
  }

  .has-js:not(.story-capable) .story-director button:nth-child(even) {
    border-right: 0;
  }

  .has-js:not(.story-capable) .story-director button[aria-selected="true"] {
    box-shadow: inset 0 -3px 0 var(--signal-deep);
  }
}

@media (prefers-reduced-motion: reduce) {
  .story-poster,
  [data-story-video],
  .story-copy,
  .authority-owner-layer li,
  .frostbridge-bridge-logo,
  .story-director button,
  .story-director button::after {
    transition: none !important;
  }
}

@media (forced-colors: active) {
  .story-step,
  .story-director,
  .story-director button {
    border-color: CanvasText;
  }

  .has-js.story-capable .story-copy {
    background: Canvas;
  }

  .has-js.story-capable .story-director {
    background: Canvas;
  }

  .has-js.story-capable .story-director button[aria-selected="true"] {
    color: Highlight;
    background: Canvas;
  }

  .has-js:not(.story-capable) .story-director button[aria-selected="true"],
  .has-js.story-capable .story-director button[aria-selected="true"] {
    border: 2px solid Highlight;
  }

  .has-js.story-capable .story-director button::after {
    background: Highlight;
  }
}
