/*
 * LOOP Food — chapter direction V4
 *
 * Progressive enhancement for the chapters after the pizza method. The layer
 * transfers only the interaction grammar documented in the local motion map:
 * one protagonist, one current state and one readable consequence at a time.
 * No borrowed assets, canvas, gradients, blur or continuous animation loops.
 */

/* -------------------------------------------------------------------------- */
/* Journey — the ticket is the protagonist, the rail is its context.          */
/* -------------------------------------------------------------------------- */

.chapter-v4-ready .journey-section {
  height: 340svh;
  min-height: 170rem;
  padding: 0;
  overflow: clip;
  background: var(--world-blue);
}

.chapter-v4-ready .journey-section::before {
  display: none;
}

.chapter-v4-ready .journey-stage-v4 {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  height: 100svh;
  min-height: 44rem;
  padding: calc(var(--world-header-h) + 1.25rem) var(--world-gutter) 1.25rem;
  overflow: hidden;
  color: var(--world-ink);
  background: var(--world-blue);
}

.chapter-v4-ready .journey-heading {
  z-index: 6;
  grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.45fr);
  gap: 1rem 5vw;
}

.chapter-v4-ready .journey-heading h2 {
  max-width: 9ch;
  font-size: clamp(3.35rem, 5.8vw, 7rem);
  line-height: 0.86;
}

.chapter-v4-ready .journey-heading > p:last-child {
  max-width: 26rem;
  margin: 0;
}

.chapter-v4-ready .journey-theatre {
  position: relative;
  z-index: 3;
  display: block;
  min-height: 0;
  padding: 0;
}

.chapter-v4-ready .journey-ticket {
  position: absolute;
  top: 43%;
  left: var(--chapter-ticket-left, 10%);
  z-index: 5;
  width: clamp(11rem, 14vw, 15rem);
  min-height: clamp(14rem, 18vw, 18.5rem);
  margin: 0;
  border: 2px solid var(--world-ink);
  box-shadow: 10px 10px 0 rgba(21, 19, 15, 0.22);
  transform: translate3d(calc(-50% + var(--ticket-x, 0px)), -50%, 0)
    rotate(calc(var(--chapter-ticket-rotation, -4deg) + var(--ticket-rotation, 0deg))) !important;
  transition:
    left 720ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 520ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 520ms ease;
  will-change: left, transform;
}

.chapter-v4-ready .journey-section[data-chapter-journey-active="0"] {
  --chapter-ticket-left: 10%;
  --chapter-ticket-rotation: -4deg;
}

.chapter-v4-ready .journey-section[data-chapter-journey-active="1"] {
  --chapter-ticket-left: 26%;
  --chapter-ticket-rotation: -2deg;
}

.chapter-v4-ready .journey-section[data-chapter-journey-active="2"] {
  --chapter-ticket-left: 42%;
  --chapter-ticket-rotation: 1deg;
}

.chapter-v4-ready .journey-section[data-chapter-journey-active="3"] {
  --chapter-ticket-left: 58%;
  --chapter-ticket-rotation: -1deg;
}

.chapter-v4-ready .journey-section[data-chapter-journey-active="4"] {
  --chapter-ticket-left: 74%;
  --chapter-ticket-rotation: 2deg;
}

.chapter-v4-ready .journey-section[data-chapter-journey-active="5"] {
  --chapter-ticket-left: 90%;
  --chapter-ticket-rotation: 4deg;
}

.chapter-v4-ready .journey-rail {
  position: absolute;
  right: 0;
  bottom: 2.35rem;
  left: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border-top: 2px solid rgba(21, 19, 15, 0.58);
}

.chapter-v4-ready .journey-rail li,
.chapter-v4-ready .journey-rail li.is-active {
  min-height: 7.5rem;
  padding: 1.35rem clamp(0.5rem, 1.1vw, 1.1rem) 0;
  border-right: 1px solid rgba(21, 19, 15, 0.24);
  opacity: 0.72;
  transition:
    opacity 260ms ease,
    background-color 260ms ease,
    color 260ms ease;
}

.chapter-v4-ready .journey-rail li:last-child {
  border-right: 0;
}

.chapter-v4-ready .journey-rail li.is-current {
  color: var(--world-cream);
  background: var(--world-ink);
  opacity: 1;
}

.chapter-v4-ready .journey-rail h3 {
  margin: 0.25rem 0 0;
  color: inherit;
  font-size: clamp(0.82rem, 1.1vw, 1.05rem);
  font-weight: 800;
  transition: font-size 260ms ease;
}

.chapter-v4-ready .journey-rail p {
  max-height: 0;
  margin: 0;
  overflow: hidden;
  color: inherit;
  font-size: 0.8rem;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(0.45rem);
  transition:
    max-height 260ms ease,
    margin 260ms ease,
    opacity 220ms ease,
    transform 260ms ease;
}

.chapter-v4-ready .journey-rail li.is-current h3 {
  font-size: clamp(1rem, 1.5vw, 1.35rem);
}

.chapter-v4-ready .journey-rail li.is-current p {
  max-height: 3.2rem;
  margin-top: 0.45rem;
  opacity: 1;
  transform: none;
}

.chapter-v4-ready .journey-stop,
.chapter-v4-ready .journey-rail li.is-active .journey-stop {
  border-color: var(--world-ink);
  color: var(--world-ink);
  background: var(--world-blue);
}

.chapter-v4-ready .journey-rail li.is-current .journey-stop {
  border-color: var(--world-ink);
  color: var(--world-ink);
  background: var(--world-mustard);
}

.chapter-v4-ready .journey-section .scene-footnote {
  position: absolute;
  right: var(--world-gutter);
  bottom: 0.55rem;
  left: var(--world-gutter);
  z-index: 7;
  margin: 0;
  color: var(--world-ink);
  font-size: 0.68rem;
  opacity: 0.72;
}

/* -------------------------------------------------------------------------- */
/* Channels — capacity is the hub; each channel is a governed route.          */
/* -------------------------------------------------------------------------- */

.chapter-v4-ready .channels-section {
  min-height: 112svh;
  overflow: clip;
}

.chapter-v4-ready .channels-section::before {
  display: none;
}

.chapter-v4-ready .channel-list {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(11rem, 16vw, 15rem) minmax(0, 1fr);
  grid-template-rows: repeat(2, minmax(13rem, auto));
  gap: clamp(1.5rem, 4vw, 5rem);
  min-height: 38rem;
  margin-top: clamp(3rem, 7vh, 6rem);
  border: 0;
}

.chapter-v4-ready .channel-hub-v4 {
  position: relative;
  z-index: 4;
  grid-row: 1 / 3;
  grid-column: 2;
  align-self: center;
  justify-self: center;
  display: grid;
  place-content: center;
  width: clamp(10.5rem, 15vw, 14rem);
  aspect-ratio: 1;
  padding: 1rem;
  border: 2px solid var(--world-ink);
  border-radius: 50%;
  color: var(--world-ink);
  background: var(--world-mustard);
  box-shadow: 8px 8px 0 var(--world-ink);
  text-align: center;
  transition:
    transform 440ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 260ms ease;
}

.chapter-v4-ready .channel-hub-v4::before {
  position: absolute;
  inset: -1rem;
  border: 1px solid rgba(21, 19, 15, 0.45);
  border-radius: 50%;
  content: "";
}

.chapter-v4-ready .channel-hub-v4[data-channel-hub-active] {
  transform: rotate(-2deg) scale(1.035);
}

.chapter-v4-ready .channel-hub-v4 strong,
.chapter-v4-ready .channel-hub-v4 span {
  display: block;
}

.chapter-v4-ready .channel-hub-v4 strong {
  font-size: clamp(1.15rem, 2vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1;
}

.chapter-v4-ready .channel-hub-v4 span {
  max-width: 9rem;
  margin-top: 0.55rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1.35;
  text-transform: uppercase;
}

.chapter-v4-ready .channel-hub-v4__copy {
  display: none;
}

.chapter-v4-ready .channel {
  position: relative;
  align-self: center;
  min-width: 0;
  min-height: 10rem;
  border: 0;
  background: transparent;
}

.chapter-v4-ready .channel:nth-of-type(1) {
  grid-row: 1;
  grid-column: 1;
}

.chapter-v4-ready .channel:nth-of-type(2) {
  grid-row: 1;
  grid-column: 3;
}

.chapter-v4-ready .channel:nth-of-type(3) {
  grid-row: 2;
  grid-column: 1;
}

.chapter-v4-ready .channel:nth-of-type(4) {
  grid-row: 2;
  grid-column: 3;
}

.chapter-v4-ready .channel::after {
  position: absolute;
  top: 3.5rem;
  width: clamp(2rem, 4vw, 5rem);
  height: 2px;
  background: rgba(21, 19, 15, 0.34);
  content: "";
  transition: background-color 240ms ease;
}

.chapter-v4-ready .channel:nth-of-type(odd)::after {
  right: calc(clamp(2rem, 4vw, 5rem) * -1);
}

.chapter-v4-ready .channel:nth-of-type(even)::after {
  left: calc(clamp(2rem, 4vw, 5rem) * -1);
}

.chapter-v4-ready .channel[open]::after {
  background: var(--world-ink);
}

.chapter-v4-ready .channel summary {
  position: relative;
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) 2rem;
  gap: 0.75rem;
  min-height: 7rem;
  padding: 1.15rem 0;
  border-top: 2px solid var(--world-ink);
  border-bottom: 1px solid rgba(21, 19, 15, 0.28);
  background: transparent;
}

.chapter-v4-ready .channel h3 {
  align-self: center;
  font-size: clamp(1.8rem, 3.4vw, 3.5rem);
  line-height: 0.96;
}

.chapter-v4-ready .channel__type {
  position: absolute;
  bottom: 0.55rem;
  left: 2.75rem;
  display: block;
  color: rgba(21, 19, 15, 0.7);
  font-size: 0.62rem;
}

.chapter-v4-ready .channel__toggle {
  align-self: center;
}

.chapter-v4-ready .channel[open] {
  background: transparent;
}

.chapter-v4-ready .channel[open] summary {
  color: var(--world-ink);
  border-top-color: var(--world-coral);
}

.chapter-v4-ready .channel__body {
  display: block;
  max-width: 31rem;
  padding: 1rem 0 0 2.75rem;
}

.chapter-v4-ready .channel__body p {
  color: var(--world-ink);
  font-size: 0.95rem;
  line-height: 1.5;
}

.chapter-v4-ready .channel__body .channel__condition {
  color: rgba(21, 19, 15, 0.72);
  font-size: 0.76rem;
}

/* -------------------------------------------------------------------------- */
/* Operations — real hotspots around a hub, one explanatory panel per map.    */
/* -------------------------------------------------------------------------- */

.chapter-v4-ready .operations-section {
  overflow: clip;
}

.chapter-v4-ready .operations-section::before {
  display: none;
}

.chapter-v4-ready .control-deck {
  position: relative;
  display: grid;
  grid-template-columns: minmax(17rem, .72fr) minmax(0, 1.28fr);
  margin-top: clamp(3rem, 6vw, 6rem);
  overflow: clip;
  border: 2px solid var(--world-ink);
  color: var(--world-cream);
  background: var(--world-ink);
  box-shadow: .7rem .7rem 0 var(--world-coral);
}

.chapter-v4-ready .control-deck::before {
  display: none;
  content: none;
}

.chapter-v4-ready .control-deck__intro {
  display: flex;
  min-height: 38rem;
  flex-direction: column;
  padding: clamp(1.7rem, 3vw, 3.2rem);
  background:
    radial-gradient(circle at 12% 86%, rgba(201, 93, 51, .42), transparent 28%),
    var(--world-ink);
}

.chapter-v4-ready .control-deck__intro > p:first-child {
  margin: 0 0 auto;
  color: var(--world-coral);
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.chapter-v4-ready .control-deck__intro h3 {
  margin: 0 0 1.35rem;
  font-size: clamp(3rem, 5.3vw, 6.2rem);
  font-weight: 520;
  letter-spacing: -.065em;
  line-height: .88;
}

.chapter-v4-ready .control-deck__intro h3 em {
  color: var(--world-coral);
  font-style: normal;
}

.chapter-v4-ready .control-deck__intro > p:nth-of-type(2) {
  max-width: 31rem;
  margin: 0;
  color: rgba(255, 249, 233, .73);
  font-size: clamp(.92rem, 1.1vw, 1.08rem);
  line-height: 1.62;
}

.chapter-v4-ready .control-deck__pulse {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  margin-top: 2rem;
  color: rgba(255, 249, 233, .82);
  font-size: .66rem;
  font-weight: 750;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.chapter-v4-ready .control-deck__pulse i {
  width: .58rem;
  height: .58rem;
  border: 1px solid var(--world-cream);
  border-radius: 50%;
  background: var(--world-coral);
  box-shadow: 0 0 0 0 rgba(201, 93, 51, .55);
  animation: none;
}

.chapter-v4-ready .control-deck__ledger {
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--world-cream);
  color: var(--world-ink);
}

.chapter-v4-ready .control-deck__ledger li {
  display: grid;
  min-height: 6.3rem;
  grid-template-columns: 2.2rem minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(.8rem, 1.8vw, 1.5rem);
  padding: 1rem clamp(1.1rem, 2.2vw, 2.2rem);
  border-bottom: 1px solid rgba(17, 16, 13, .24);
  transition: color 260ms ease, background-color 260ms ease;
}

.chapter-v4-ready .control-deck__ledger li:last-child {
  border-bottom: 0;
}

.chapter-v4-ready .control-deck__ledger li:hover,
.chapter-v4-ready .control-deck__ledger li:focus-within {
  color: var(--world-ink);
  background: var(--world-cream);
}

.chapter-v4-ready .control-deck__ledger li > span {
  align-self: start;
  padding-top: .28rem;
  color: #ac4b29;
  font-family: var(--font-mono, monospace);
  font-size: .64rem;
  font-weight: 800;
}

.chapter-v4-ready .control-deck__ledger li:hover > span,
.chapter-v4-ready .control-deck__ledger li:focus-within > span {
  color: #ac4b29;
}

.chapter-v4-ready .control-deck__ledger h4 {
  margin: 0 0 .28rem;
  font-size: clamp(1.12rem, 1.5vw, 1.45rem);
  font-weight: 650;
  letter-spacing: -.035em;
}

.chapter-v4-ready .control-deck__ledger p {
  max-width: 34rem;
  margin: 0;
  color: rgba(17, 16, 13, .62);
  font-size: .85rem;
  line-height: 1.45;
}

.chapter-v4-ready .control-deck__ledger li:hover p,
.chapter-v4-ready .control-deck__ledger li:focus-within p {
  color: rgba(17, 16, 13, .62);
}

.chapter-v4-ready .control-deck__ledger small {
  padding: .42rem .62rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: .57rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.chapter-v4-ready .control-deck__condition {
  grid-column: 1 / -1;
  margin: 0;
  padding: .85rem clamp(1.1rem, 2.2vw, 2.2rem);
  border-top: 1px solid rgba(255, 249, 233, .25);
  color: rgba(255, 249, 233, .68);
  background: var(--world-ink);
  font-size: .68rem;
  line-height: 1.45;
}

@keyframes control-deck-pulse {
  0% { box-shadow: 0 0 0 0 rgba(201, 93, 51, .55); }
  65%, 100% { box-shadow: 0 0 0 .65rem rgba(201, 93, 51, 0); }
}

.chapter-v4-ready .system-maps {
  align-items: stretch;
  gap: clamp(2rem, 5vw, 6rem);
}

.chapter-v4-ready .system-map {
  --map-ink: var(--world-cream);
  --map-surface: var(--world-ink);
  position: relative;
  min-height: 43rem;
  padding: 2rem;
  overflow: hidden;
  border: 0;
  border-top: 2px solid var(--map-ink);
  border-bottom: 2px solid var(--map-ink);
  border-radius: 0;
  color: var(--map-ink);
  background: var(--map-surface);
}

.chapter-v4-ready .system-map--outside {
  --map-ink: var(--world-ink);
  --map-surface: var(--world-coral);
}

.chapter-v4-ready .system-map::before,
.chapter-v4-ready .system-map::after {
  position: absolute;
  z-index: 0;
  background: currentColor;
  content: "";
  opacity: 0.26;
  pointer-events: none;
}

.chapter-v4-ready .system-map::before {
  top: 45%;
  right: 10%;
  left: 10%;
  height: 1px;
}

.chapter-v4-ready .system-map::after {
  top: 20%;
  bottom: 30%;
  left: 50%;
  width: 1px;
}

.chapter-v4-ready .system-map__title {
  position: relative;
  z-index: 4;
  color: var(--map-ink);
}

.chapter-v4-ready .system-map__title > span,
.chapter-v4-ready .system-map__title h3 {
  color: inherit;
}

.chapter-v4-ready .system-map__hub,
.chapter-v4-ready .system-map--outside .system-map__hub {
  position: absolute;
  top: 45%;
  left: 50%;
  z-index: 3;
  display: flex;
  width: clamp(8.5rem, 11vw, 10.5rem);
  height: auto;
  aspect-ratio: 1;
  margin: 0;
  border: 2px solid var(--map-ink);
  color: var(--map-surface);
  background: var(--map-ink);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.2);
  transform: translate(-50%, -50%);
}

.chapter-v4-ready .system-map__hub > span,
.chapter-v4-ready .system-map__hub small,
.chapter-v4-ready .system-map--outside .system-map__hub small {
  color: inherit;
}

.chapter-v4-ready .system-map__nodes {
  position: static;
  border: 0;
}

.chapter-v4-ready .system-node {
  position: static;
  border: 0;
}

.chapter-v4-ready .system-node summary {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: clamp(8.5rem, 14vw, 12rem);
  min-height: 3.35rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: var(--map-ink);
  background: var(--map-surface);
  font-size: 0.86rem;
  line-height: 1.15;
  transition:
    color 220ms ease,
    background-color 220ms ease,
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.chapter-v4-ready .system-node summary:focus-visible {
  outline: 0;
  box-shadow: inset 0 0 0 3px currentColor;
}

.chapter-v4-ready .system-node:nth-child(1) summary {
  top: 22%;
  left: 4%;
}

.chapter-v4-ready .system-node:nth-child(2) summary {
  top: 22%;
  right: 4%;
}

.chapter-v4-ready .system-node:nth-child(3) summary {
  top: 57%;
  left: 4%;
}

.chapter-v4-ready .system-node:nth-child(4) summary {
  top: 57%;
  right: 4%;
}

.chapter-v4-ready .system-node[open] summary,
.chapter-v4-ready .system-map--outside .system-node[open] summary {
  color: var(--map-surface);
  background: var(--map-ink);
  transform: translateY(-0.2rem);
}

.chapter-v4-ready .system-node > p {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

.chapter-v4-ready .system-panel-v4 {
  position: absolute;
  right: 8%;
  bottom: 1.5rem;
  left: 8%;
  z-index: 4;
  min-height: 7.4rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--map-ink);
  color: var(--map-ink);
  background: var(--map-surface);
}

.chapter-v4-ready .system-panel-v4__title {
  display: block;
  margin: 0 0 0.45rem;
  color: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.chapter-v4-ready .system-panel-v4 p {
  max-width: 34rem;
  margin: 0;
  color: inherit;
  font-size: 0.92rem;
  line-height: 1.48;
  opacity: 0.82;
}

/* -------------------------------------------------------------------------- */
/* Return and final CTA — a ticket closes the operational loop.                */
/* -------------------------------------------------------------------------- */

.chapter-v4-ready .return-section {
  min-height: 92svh;
  padding-right: max(var(--world-gutter), 30vw);
}

.chapter-v4-ready .return-section::before {
  display: none;
}

.chapter-v4-ready .return-loop {
  position: relative;
  z-index: 3;
}

.chapter-v4-ready .return-loop span,
.chapter-v4-ready .return-loop i {
  opacity: 0;
  transform: translateY(0.75rem);
  transition:
    opacity 420ms ease,
    transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.chapter-v4-ready .return-section.is-in-view .return-loop span,
.chapter-v4-ready .return-section.is-in-view .return-loop i {
  opacity: 1;
  transform: none;
}

.chapter-v4-ready .return-section.is-in-view .return-loop span:nth-of-type(2),
.chapter-v4-ready .return-section.is-in-view .return-loop i:nth-of-type(1) {
  transition-delay: 100ms;
}

.chapter-v4-ready .return-section.is-in-view .return-loop span:nth-of-type(3),
.chapter-v4-ready .return-section.is-in-view .return-loop i:nth-of-type(2) {
  transition-delay: 200ms;
}

.chapter-v4-ready .return-section.is-in-view .return-loop span:nth-of-type(4),
.chapter-v4-ready .return-section.is-in-view .return-loop i:nth-of-type(3) {
  transition-delay: 300ms;
}

.chapter-v4-ready .chapter-ticket-v4 {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: clamp(10rem, 14vw, 13rem);
  min-height: 14rem;
  padding: 1.2rem;
  border: 2px solid var(--world-ink);
  color: var(--world-ink);
  background: var(--world-cream);
  box-shadow: 9px 9px 0 rgba(21, 19, 15, 0.28);
  opacity: 0;
  transform: translate3d(0, 2rem, 0) rotate(6deg);
  transition:
    opacity 440ms ease,
    transform 760ms cubic-bezier(0.22, 1, 0.36, 1);
}

.chapter-v4-ready .is-in-view > .chapter-ticket-v4,
.chapter-v4-ready .is-in-view .chapter-ticket-v4 {
  opacity: 1;
  transform: rotate(2deg);
}

.chapter-v4-ready .chapter-ticket-v4 > span,
.chapter-v4-ready .chapter-ticket-v4 > small {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.35;
  text-transform: uppercase;
}

.chapter-v4-ready .chapter-ticket-v4 > strong {
  margin-block: auto;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  letter-spacing: -0.045em;
  line-height: 1;
}

.chapter-v4-ready .chapter-ticket-v4 > .chapter-ticket-v4__rule {
  display: block;
  width: 100%;
  height: 1px;
  margin-top: auto;
  background: currentColor;
}

.chapter-v4-ready .return-section > .chapter-ticket-v4 {
  position: absolute;
  top: 50%;
  right: clamp(7%, 11vw, 14%);
  z-index: 4;
  transform: translate3d(0, 3rem, 0) rotate(9deg);
}

.chapter-v4-ready .return-section.is-in-view > .chapter-ticket-v4 {
  transform: translateY(-50%) rotate(3deg);
}

.chapter-v4-ready .diagnostic-section > .chapter-ticket-v4 {
  position: absolute;
  top: 33%;
  left: clamp(17rem, 31vw, 36rem);
  z-index: 6;
  width: clamp(8.5rem, 11vw, 10.5rem);
  min-height: 11.5rem;
  transform: translate3d(-2rem, 2rem, 0) rotate(-8deg);
}

.chapter-v4-ready .diagnostic-section.is-in-view > .chapter-ticket-v4 {
  transform: rotate(-3deg);
}

.chapter-v4-ready .diagnostic-brief summary {
  min-height: 4.25rem;
  border: 2px solid var(--world-ink);
  box-shadow: 5px 5px 0 rgba(21, 19, 15, 0.28);
  transition:
    transform 200ms ease,
    box-shadow 200ms ease;
}

.chapter-v4-ready .diagnostic-brief summary:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 rgba(21, 19, 15, 0.28);
}

.chapter-v4-ready .diagnostic-brief[open] summary {
  transform: none;
  box-shadow: 3px 3px 0 rgba(21, 19, 15, 0.28);
}

/* -------------------------------------------------------------------------- */
/* Tablet and mobile — compositions are rebuilt, not cropped.                  */
/* -------------------------------------------------------------------------- */

@media (max-width: 68rem) {
  .chapter-v4-ready .control-deck {
    grid-template-columns: minmax(0, 1fr);
  }

  .chapter-v4-ready .control-deck__intro {
    min-height: clamp(26rem, 48svh, 32rem);
  }

  .chapter-v4-ready .control-deck__condition {
    grid-column: 1;
  }

  .chapter-v4-ready .journey-section {
    height: 380svh;
    min-height: 180rem;
  }

  .chapter-v4-ready .journey-stage-v4 {
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 42rem;
    padding: calc(var(--world-header-h) + 1rem) var(--world-gutter) 1rem;
  }

  .chapter-v4-ready .journey-heading {
    grid-template-columns: minmax(0, 1fr) minmax(15rem, 0.55fr);
  }

  .chapter-v4-ready .journey-heading h2 {
    font-size: clamp(3rem, 7.5vw, 5.5rem);
  }

  .chapter-v4-ready .journey-ticket {
    top: 45%;
    width: clamp(9rem, 17vw, 12rem);
    min-height: clamp(12rem, 21vw, 15rem);
  }

  .chapter-v4-ready .journey-rail li,
  .chapter-v4-ready .journey-rail li.is-active {
    min-height: 6.5rem;
  }

  .chapter-v4-ready .channel-list {
    grid-template-columns: minmax(0, 1fr) 10rem minmax(0, 1fr);
    gap: 1.5rem 2rem;
  }

  .chapter-v4-ready .channel-hub-v4 {
    width: 9.5rem;
  }

  .chapter-v4-ready .channel h3 {
    font-size: clamp(1.55rem, 4vw, 2.6rem);
  }

  .chapter-v4-ready .channel::after {
    width: 2rem;
  }

  .chapter-v4-ready .channel:nth-of-type(odd)::after {
    right: -2rem;
  }

  .chapter-v4-ready .channel:nth-of-type(even)::after {
    left: -2rem;
  }

  .chapter-v4-ready .system-maps {
    grid-template-columns: 1fr;
  }

  .chapter-v4-ready .system-map {
    min-height: 39rem;
  }

  .chapter-v4-ready .system-node summary {
    width: clamp(9rem, 24vw, 13rem);
  }

  .chapter-v4-ready .diagnostic-section > .chapter-ticket-v4 {
    top: auto;
    bottom: 6rem;
    left: clamp(11rem, 32vw, 19rem);
  }
}

/* The hub layout stops being legible before the phone breakpoint. */
@media (max-width: 53.75rem) {
  .chapter-v4-ready .channels-section {
    min-height: auto;
  }

  .chapter-v4-ready .channel-list {
    display: flex;
    flex-direction: column;
    min-height: 0;
    gap: 0;
    margin-top: 2.5rem;
  }

  .chapter-v4-ready .channel-hub-v4 {
    order: -1;
    width: 9.25rem;
    margin: 0 auto 2.75rem;
  }

  .chapter-v4-ready .channel {
    min-height: 0;
  }

  .chapter-v4-ready .channel::after {
    display: none;
  }

  .chapter-v4-ready .channel summary {
    min-height: 5.5rem;
  }

  .chapter-v4-ready .channel h3 {
    font-size: clamp(1.55rem, 7.6vw, 2.35rem);
  }

  .chapter-v4-ready .channel__body {
    padding: .9rem 0 1.5rem 2.75rem;
  }
}

@media (max-width: 48rem) {
  .chapter-v4-ready .journey-section {
    height: 440svh;
    min-height: 190rem;
  }

  .chapter-v4-ready .journey-stage-v4 {
    min-height: 40rem;
    padding: calc(var(--world-header-h) + 0.75rem) var(--world-gutter) 0.8rem;
  }

  .chapter-v4-ready .journey-heading {
    display: block;
  }

  .chapter-v4-ready .journey-heading .section-kicker {
    margin-bottom: 0.65rem;
  }

  .chapter-v4-ready .journey-heading h2 {
    max-width: 11ch;
    font-size: clamp(2.5rem, 10.7vw, 4.25rem);
    line-height: 0.9;
  }

  .chapter-v4-ready .journey-heading > p:last-child {
    max-width: 33rem;
    margin-top: 0.8rem;
    font-size: 0.9rem;
    line-height: 1.42;
  }

  .chapter-v4-ready .journey-theatre {
    display: grid;
    grid-template-columns: minmax(7rem, 0.72fr) minmax(0, 1.28fr);
    gap: 1.25rem;
    align-items: center;
    padding-top: 0.75rem;
  }

  .chapter-v4-ready .journey-ticket {
    position: relative;
    top: auto;
    left: auto;
    align-self: center;
    width: min(100%, 9.5rem);
    min-height: 12rem;
    transform: translate3d(var(--ticket-x, 0px), 0, 0)
      rotate(calc(var(--chapter-ticket-rotation, -3deg) + var(--ticket-rotation, 0deg))) !important;
  }

  .chapter-v4-ready .journey-rail {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    display: flex;
    flex-direction: column;
    align-self: stretch;
    justify-content: center;
    border-top: 0;
    border-left: 2px solid rgba(21, 19, 15, 0.58);
  }

  .chapter-v4-ready .journey-rail li,
  .chapter-v4-ready .journey-rail li.is-active {
    min-height: 3.55rem;
    padding: 0.5rem 0.4rem 0.5rem 1.2rem;
    border-right: 0;
  }

  .chapter-v4-ready .journey-rail li.is-current {
    min-height: 6rem;
  }

  .chapter-v4-ready .journey-stop {
    top: 0.7rem;
    left: -0.9rem;
  }

  .chapter-v4-ready .journey-rail h3 {
    font-size: 0.88rem;
  }

  .chapter-v4-ready .journey-rail li.is-current h3 {
    font-size: 1.05rem;
  }

  .chapter-v4-ready .journey-rail li.is-current p {
    max-height: 3rem;
    font-size: 0.72rem;
  }

  .chapter-v4-ready .journey-section .scene-footnote {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    display: block;
    margin-top: 1.25rem;
  }

  .chapter-v4-ready .channels-section {
    min-height: auto;
  }

  .chapter-v4-ready .channel-list {
    display: flex;
    flex-direction: column;
    min-height: 0;
    gap: 0;
    margin-top: 2.5rem;
  }

  .chapter-v4-ready .channel-hub-v4 {
    order: -1;
    width: 9.25rem;
    margin: 0 auto 2.75rem;
  }

  .chapter-v4-ready .channel {
    min-height: 0;
  }

  .chapter-v4-ready .channel::after {
    display: none;
  }

  .chapter-v4-ready .channel summary {
    min-height: 5.5rem;
  }

  .chapter-v4-ready .channel h3 {
    font-size: clamp(1.55rem, 7.6vw, 2.35rem);
  }

  .chapter-v4-ready .channel__body {
    padding: 0.9rem 0 1.5rem 2.75rem;
  }

  .chapter-v4-ready .operations-section {
    min-height: auto;
  }

  .chapter-v4-ready .control-deck {
    grid-template-columns: 1fr;
    box-shadow: .45rem .45rem 0 var(--world-coral);
  }

  .chapter-v4-ready .control-deck::before {
    display: none;
  }

  .chapter-v4-ready .control-deck__intro {
    min-height: 24rem;
    padding: 1.5rem;
  }

  .chapter-v4-ready .control-deck__intro h3 {
    margin-top: 3.75rem;
    font-size: clamp(3.1rem, 15vw, 5rem);
  }

  .chapter-v4-ready .control-deck__condition {
    grid-column: 1;
  }

  .chapter-v4-ready .control-deck__ledger li {
    grid-template-columns: 1.8rem minmax(0, 1fr) auto;
    gap: .65rem .85rem;
    min-height: 0;
    padding: 1.15rem 1rem;
  }

  .chapter-v4-ready .control-deck__ledger p {
    grid-column: 2 / -1;
  }

  .chapter-v4-ready .control-deck__ledger small {
    align-self: start;
    padding: .34rem .48rem;
    font-size: .64rem;
  }

  .chapter-v4-ready .system-map {
    min-height: 37rem;
    padding: 1.4rem 0.25rem;
  }

  .chapter-v4-ready .system-map__title {
    padding-inline: 0.5rem;
  }

  .chapter-v4-ready .system-map__hub,
  .chapter-v4-ready .system-map--outside .system-map__hub {
    top: 37%;
    width: 8rem;
  }

  .chapter-v4-ready .system-map::before {
    top: 37%;
    right: 7%;
    left: 7%;
  }

  .chapter-v4-ready .system-map::after {
    top: 18%;
    bottom: 42%;
  }

  .chapter-v4-ready .system-node summary {
    width: min(41%, 10rem);
    min-height: 3rem;
    padding: 0.65rem 0.75rem;
    font-size: 0.74rem;
  }

  .chapter-v4-ready .system-node:nth-child(1) summary {
    top: 17%;
    left: 0;
  }

  .chapter-v4-ready .system-node:nth-child(2) summary {
    top: 17%;
    right: 0;
  }

  .chapter-v4-ready .system-node:nth-child(3) summary {
    top: 48%;
    left: 0;
  }

  .chapter-v4-ready .system-node:nth-child(4) summary {
    top: 48%;
    right: 0;
  }

  .chapter-v4-ready .system-panel-v4 {
    right: 0;
    bottom: 1rem;
    left: 0;
    min-height: 8rem;
    padding: 1rem;
  }

  .chapter-v4-ready .system-panel-v4 p {
    font-size: 0.84rem;
  }

  .chapter-v4-ready .return-section {
    min-height: auto;
    padding-right: var(--world-gutter);
    padding-bottom: 4rem;
  }

  .chapter-v4-ready .return-section > .chapter-ticket-v4 {
    position: relative;
    top: auto;
    right: auto;
    width: min(11rem, 64vw);
    min-height: 12rem;
    margin: 3rem 0 0 auto;
  }

  .chapter-v4-ready .return-section.is-in-view > .chapter-ticket-v4 {
    transform: rotate(2deg);
  }

  .chapter-v4-ready .return-loop {
    align-items: flex-start;
    flex-direction: column;
  }

  .chapter-v4-ready .return-loop i {
    transform: rotate(90deg) translateX(0.5rem);
  }

  .chapter-v4-ready .return-section.is-in-view .return-loop i {
    transform: rotate(90deg);
  }

  .chapter-v4-ready .diagnostic-section > .chapter-ticket-v4 {
    top: auto;
    bottom: 3.25rem;
    left: 1rem;
    width: 8rem;
    min-height: 9.5rem;
    padding: 0.9rem;
  }
}

@media (max-width: 23rem) {
  .chapter-v4-ready .control-deck__ledger li {
    grid-template-columns: 1.8rem minmax(0, 1fr);
  }

  .chapter-v4-ready .control-deck__ledger small {
    grid-column: 2;
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chapter-v4-ready .control-deck__pulse i {
    animation: none;
  }

  .chapter-v4-ready .control-deck__ledger li {
    transition: none;
  }
}

/* Short landscape cannot sustain a pinned editorial theatre safely. */
@media (max-height: 42rem) and (min-width: 49rem) {
  .chapter-v4-ready .journey-section {
    height: auto;
    min-height: 0;
  }

  .chapter-v4-ready .journey-stage-v4 {
    position: relative;
    height: auto;
    min-height: 0;
    padding: calc(var(--world-header-h) + 1rem) var(--world-gutter) 3rem;
    overflow: visible;
  }

  .chapter-v4-ready .journey-theatre {
    padding-top: 2rem;
  }

  .chapter-v4-ready .journey-ticket {
    position: relative;
    top: auto;
    left: auto;
    width: 10rem;
    min-height: 12rem;
    transform: rotate(-3deg) !important;
  }

  .chapter-v4-ready .journey-rail {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    margin-top: 2rem;
  }

  .chapter-v4-ready .journey-rail li,
  .chapter-v4-ready .journey-rail li.is-active {
    min-height: 7rem;
    opacity: 1;
  }

  .chapter-v4-ready .journey-rail p {
    max-height: 3rem;
    margin-top: 0.4rem;
    opacity: 1;
    transform: none;
  }

  .chapter-v4-ready .journey-section .scene-footnote {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    margin-top: 1.5rem;
  }

  .chapter-v4-ready .return-section,
  .chapter-v4-ready .diagnostic-section {
    min-height: 42rem;
  }
}

/* Motion-safe fallback keeps every step readable and removes pinned travel. */
@media (prefers-reduced-motion: reduce) and (max-width: 0px) {
  .chapter-v4-ready .journey-section {
    height: auto;
    min-height: 0;
  }

  .chapter-v4-ready .journey-stage-v4 {
    position: relative;
    display: block;
    height: auto;
    min-height: 0;
    padding: calc(var(--world-header-h) + 1rem) var(--world-gutter) 4rem;
    overflow: visible;
  }

  .chapter-v4-ready .journey-theatre {
    display: grid;
    grid-template-columns: minmax(9rem, 0.4fr) minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
    padding-top: 3rem;
  }

  .chapter-v4-ready .journey-ticket {
    position: sticky;
    top: calc(var(--world-header-h) + 1rem);
    left: auto;
    width: min(100%, 13rem);
    min-height: 15rem;
    transform: none !important;
  }

  .chapter-v4-ready .journey-rail {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    display: flex;
    flex-direction: column;
    border-top: 0;
    border-left: 2px solid rgba(21, 19, 15, 0.58);
  }

  .chapter-v4-ready .journey-rail li,
  .chapter-v4-ready .journey-rail li.is-active,
  .chapter-v4-ready .journey-rail li.is-current {
    min-height: 5rem;
    padding: 0.5rem 0.5rem 1rem 1.5rem;
    color: var(--world-ink);
    background: transparent;
    opacity: 1;
  }

  .chapter-v4-ready .journey-rail p,
  .chapter-v4-ready .journey-rail li.is-current p {
    max-height: none;
    margin-top: 0.35rem;
    overflow: visible;
    color: inherit;
    opacity: 1;
    transform: none;
  }

  .chapter-v4-ready .journey-stop {
    top: 0.55rem;
    left: -0.9rem;
  }

  .chapter-v4-ready .journey-section .scene-footnote {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    margin-top: 2rem;
  }

  .chapter-v4-ready .journey-ticket,
  .chapter-v4-ready .channel-hub-v4,
  .chapter-v4-ready .channel,
  .chapter-v4-ready .system-node summary,
  .chapter-v4-ready .return-loop span,
  .chapter-v4-ready .return-loop i,
  .chapter-v4-ready .chapter-ticket-v4,
  .chapter-v4-ready .diagnostic-brief summary {
    transition: none !important;
  }

  .chapter-v4-ready .return-loop span,
  .chapter-v4-ready .return-loop i,
  .chapter-v4-ready .chapter-ticket-v4 {
    opacity: 1;
    transform: none !important;
  }
}
