/*
  Pump page template — mirrors the "Side-Channel Pump" frame in Figma (SPS Website).
  Shared by the secondary pages. Layered on top of each page's own stylesheet.

  Layout: header → view bar (eyebrow, title, view tabs) → flow path
  (chapter row + viewport beside a chapter panel) → part labels → stage
  sequence → cutaway figure → footer.
  Type: Barlow for display, Inter for text.
*/

:root {
  --font-display: 'Barlow', Inter, system-ui, sans-serif;
  --pp-pad: 48px;
}

/* ---------- page shell ---------- */
body > main {
  display: block;
  flex: none;
  min-height: 0;
}
.viewer {
  display: flex;
  flex-direction: column;
  border-right: 0;
}

/* ---------- view bar ---------- */
.view-bar {
  align-items: flex-end;
  padding: 20px var(--pp-pad) 16px;
}
.eyebrow {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  line-height: 17px;
  color: var(--orange);
}
.view-bar .view-heading h1 {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.view-bar .view-heading h1 span {
  font-weight: 500;
  color: var(--text-2);
}
.view-bar .orbit-hint {
  margin-top: 9px;
  font-size: 10px;
  line-height: 15px;
  letter-spacing: 0.04em;
}
.view-bar .view-tabs button {
  height: 32px;
  padding: 0 16px;
}
.view-bar .view-tabs button.active {
  background: #14344d;
}

/* ---------- flow path ---------- */
.flow-path {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 var(--pp-pad) 24px;
}

.chapter-row {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
}
.chapters {
  display: flex;
  gap: 8px;
  padding: 0;
  border: 0;
  grid-template-columns: none;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.chapters::-webkit-scrollbar {
  display: none;
}
.chapters button {
  flex: none;
  flex-direction: row;
  align-items: flex-end;
  gap: 4px;
  padding: 14px 12px 12px 4px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: none;
  text-align: left;
  white-space: nowrap;
}
.chapters button:hover {
  background: none;
  border-color: transparent;
  color: var(--text);
}
.chapters button.active {
  background: none;
  border-bottom-color: var(--orange);
}
.chapters button b {
  font-family: Inter, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 12.5px;
  color: var(--text-2);
}
.chapters button.active b,
.chapters button:hover b {
  color: var(--text);
}
.chapter-num {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  line-height: 16px;
  color: var(--text-3);
}
.live-pill {
  align-self: center;
  flex: none;
  gap: 6px;
  padding: 4px 10px 4px 8px;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.18em;
  line-height: 15px;
}

.flow-body {
  display: flex;
  align-items: stretch;
}
.flow-body .viewport {
  flex: 0 0 69.07%;
  min-height: 0;
  aspect-ratio: 703 / 358;
  border: 1px solid #354858;
  border-radius: var(--r);
}
.flow-body .view-tools {
  right: 23px;
  bottom: 23px;
}
.flow-body .model-legend {
  left: 23px;
  bottom: 44px;
}
.flow-body .model-note {
  left: 23px;
  right: auto;
  bottom: 22px;
}

.chapter-panel {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 64px 0 64px 24px;
}
.chapter-panel h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.chapter-panel .intro {
  margin: 0;
  font-size: 12px;
  line-height: 20.3px;
  color: var(--text-2);
}

/* ---------- part labels + stage sequence ---------- */
#labels {
  padding: 13px var(--pp-pad);
}
#stageSequence {
  padding: 14px var(--pp-pad) 12px;
}
.sequence-row {
  grid-template-columns: 104px repeat(4, 130px);
  width: max-content;
  max-width: 100%;
}
#stageSequence p {
  max-width: 674px;
}

/* ---------- cutaway figure ---------- */
.cutaway-figure {
  padding: 40px var(--pp-pad) 48px;
}
.cutaway-head .eyebrow {
  display: block;
}
.cutaway-head h2 {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 33px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 10px 0 12px;
}
.cutaway-head p {
  line-height: 21.7px;
}
.cutaway-link {
  max-width: none;
}

/* ---------- footer ---------- */
footer {
  padding: 12px var(--pp-pad);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  line-height: 15.75px;
}

/* ---------- guided tour transport is not part of this template ---------- */
.transport[hidden] {
  display: none;
}

/* ---------- theatre (enlarged) view ---------- */
html.theatre .viewer {
  overflow: auto;
}
html.theatre .flow-path {
  flex: 1;
  padding: 0;
  gap: 0;
}
html.theatre .chapter-row {
  padding: 0 var(--pp-pad);
}
html.theatre .flow-body {
  flex: 1;
}
html.theatre .flow-body .viewport {
  flex: 1;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
}
html.theatre .chapter-panel {
  display: none;
}

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  :root {
    --pp-pad: 32px;
  }
  .flow-body {
    flex-direction: column;
  }
  .flow-body .viewport {
    flex: none;
    width: 100%;
  }
  .chapter-panel {
    padding: 20px 0 0;
  }
}

@media (max-width: 720px) {
  :root {
    --pp-pad: 16px;
  }
  .view-bar {
    align-items: stretch;
    padding: 14px var(--pp-pad);
  }
  .flow-body .viewport {
    aspect-ratio: auto;
    min-height: 360px;
  }
  .flow-body .model-note {
    display: none;
  }
  .flow-body .model-legend {
    bottom: 16px;
  }
  .live-pill {
    display: none;
  }
  .sequence-row {
    grid-template-columns: repeat(2, 1fr);
    width: auto;
  }
  .sequence-row span:first-child {
    grid-column: 1 / -1;
  }
  footer {
    padding: 14px var(--pp-pad);
  }
}
