/* Deck-specific media framing. Main typography comes from clean-academic. */
.reveal .slides section .teaching-caption { text-align: center; }
.reveal .slides section .original-figure img { object-fit: contain; }
.reveal .slides section .figure-labels { display: flex; justify-content: space-around; width: 100%; }
.reveal .slides section .figure-labels p { margin: 0; }
.reveal .slides section .two-column-figure { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 36px; }
.reveal .slides section .two-column-figure img { max-width: 100%; }

/* Preserve the complete publisher frame even for non-16:9 source videos. */
.reveal video.video-inline { object-fit: contain; }

/* Only empty outer margins fall outside this framing viewport. */
.reveal .slides section .value-viewport {
  width: 1100px;
  height: 440px;
  overflow: hidden;
  flex: 0 0 440px;
  margin-left: auto;
  margin-right: auto;
}
.reveal .slides section .value-viewport img {
  display: block;
  width: 1100px;
  height: auto;
  max-height: none;
  margin: 0;
  transform: translateY(-125px);
}
.reveal .slides section .counterfactual-rows {
  display: grid;
  grid-template-columns: 210px 1fr;
  align-items: stretch;
  gap: 22px;
  width: 100%;
}
.reveal .slides section .action-row-labels {
  display: grid;
  grid-template-rows: 1fr 1fr;
  align-items: center;
}
.reveal .slides section .action-row-labels p {
  margin: 0;
  text-align: left;
  color: #012169;
  font-weight: 600;
}
.reveal .slides section .counterfactual-rows img { width: 100%; height: auto; }
.reveal .slides section .r-stack img { margin: 0; }

/* Keep both path-question states at teaching scale inside Reveal's grid stack. */
.reveal .slides section#many-actions .r-stack {
  width: 1168px;
  height: 430px;
  flex: 0 0 430px;
}
.reveal .slides section#many-actions .r-stack > div,
.reveal .slides section#many-actions .r-stack > div > p {
  width: 100%;
  height: 100%;
  margin: 0;
}
.reveal .slides section#many-actions .r-stack img {
  display: block;
  width: 1168px;
  height: 430px;
  max-height: 430px;
  object-fit: contain;
}

/* Readable panel views of the unchanged original ACT figure in the appendix. */
.reveal .slides section#backup-act .act-detail-stack {
  width: 1168px;
  height: 430px;
  flex: 0 0 430px;
}
.reveal .slides section#backup-act .act-detail-stack > div {
  width: 100%;
  height: 430px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.reveal .slides section#backup-act .act-architecture-viewport {
  width: 1168px;
  height: 340px;
  overflow: hidden;
}
.reveal .slides section#backup-act .act-architecture-viewport img {
  width: 1168px;
  max-width: none;
  height: auto;
  max-height: none;
  margin: 0;
  display: block;
  transform: translateY(-38px);
}
.reveal .slides section#backup-act .act-timeline-viewport {
  width: 520px;
  height: 430px;
  overflow: hidden;
}
.reveal .slides section#backup-act .act-timeline-viewport img {
  width: 1500px;
  max-width: none;
  height: auto;
  max-height: none;
  margin: 0;
  display: block;
  transform: translate(-76px, -574px);
}

/* Repeated six-part roadmap; reading order follows the lecture down each column. */
.reveal .slides section.roadmap-slide .lecture-roadmap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(3, 98px);
  grid-auto-flow: column;
  gap: 20px 36px;
  width: 1168px;
  margin: 30px auto 24px;
}
.reveal .slides section.roadmap-slide .roadmap-step {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 12px 16px;
  border-bottom: 2px solid #d3dbe6;
  color: #4a5b73;
  text-align: left;
  line-height: 1.2;
  box-sizing: border-box;
}
.reveal .slides section.roadmap-slide .roadmap-number { color: #61728a; }
.reveal .slides section.roadmap-slide .current {
  background: #f3ebdc;
  border-bottom: 4px solid #b9975b;
  color: #012169;
  font-weight: 600;
}
.reveal .slides section.roadmap-slide .current .roadmap-number { color: #012169; }
.reveal .slides section.roadmap-slide .completed { color: #354962; }
.reveal .slides section.roadmap-slide .roadmap-question { margin-top: 16px; }
.reveal .slides section#human-thinking .columns { width: 100%; gap: 70px; align-items: flex-start; }
.reveal .slides section#human-thinking .column { padding: 12px 24px; }
.reveal .slides section#human-thinking .column > p:first-child { color: #012169; }

/* Large teaching labels sit outside unchanged publisher diagrams. */
.reveal .slides section .hirobot-guide {
  display: grid; grid-template-columns: 600px 1fr; gap: 40px;
  align-items: center; width: 1168px;
}
.reveal .slides section .hirobot-guide img { width: 600px; max-height: 440px; object-fit: contain; }
.reveal .slides section .hirobot-guide p { text-align: left; margin: 24px 0; }
.reveal .slides section .value-phase-labels,
.reveal .slides section .value-axis-labels {
  display: flex; justify-content: space-between; width: 1100px;
  color: #012169; line-height: 1.1; margin: 0 auto;
}
.reveal .slides section .value-phase-labels { padding: 0 44px; box-sizing: border-box; }
.reveal .slides section .value-axis-labels { padding: 0 44px; box-sizing: border-box; }
.reveal .slides section#value .value-viewport { margin-top: 0; margin-bottom: 0; }

/* Compact comparison tables use the same teaching size as body text. */
.reveal .slides section table { font-size: 1em; }
.reveal .slides section#interfaces table { width: 1168px; }
.reveal .slides section#interfaces th,
.reveal .slides section#interfaces td { padding: 16px 18px; }

.reveal .slides section#interfaces table { table-layout: fixed; }
.reveal .slides section#interfaces col:nth-child(1) { width: 25% !important; }
.reveal .slides section#interfaces col:nth-child(2) { width: 37% !important; }
.reveal .slides section#interfaces col:nth-child(3) { width: 38% !important; }
.reveal .slides section .espresso-comparison {
  display: grid; grid-template-columns: 520px 1fr; gap: 54px;
  align-items: center; width: 1168px; height: 486px;
}
.reveal .slides section .espresso-comparison > img {
  height: 470px; width: auto; max-height: 470px;
  margin: 0 auto; object-fit: contain;
}
.reveal .slides section .espresso-key { display: grid; gap: 34px; }
.reveal .slides section .espresso-key-row {
  display: grid; grid-template-columns: 42px 1fr; gap: 24px; align-items: center;
}
.reveal .slides section .espresso-key-row p { text-align: left; margin: 16px 0; }
.reveal .slides section .espresso-swatch {
  display: block; width: 38px; height: 70px; border: 2px solid #333; border-radius: 2px;
}
.reveal .slides section .espresso-sft { background: #fce8aa; }
.reveal .slides section .espresso-recap { background: #ffd83e; }

/* Mechanism content is stepped by the presenter, never by an autoplay timer. */
.reveal .slides section .mechanism { position: relative; width: 1168px; }
.reveal .slides section .mechanism .chart-figure { margin: 0; }
.reveal .slides section .mechanism-svg { display: block; width: 100%; height: auto; }
.reveal .slides section .build-steps { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.reveal .slides section .build-step { display: inline-block; width: 1px; height: 1px; }

/* The original teaching diagram is paired with large role labels. */
.reveal .slides section .source-bridge {
  display: grid; grid-template-columns: 650px 1fr; gap: 50px;
  align-items: center; width: 1168px;
}
.reveal .slides section .source-bridge img { width: 650px; height: 426px; object-fit: contain; }
.reveal .slides section .source-bridge p { text-align: left; margin: 28px 0; }

/* Three-column learning-signal table at body size; fixed widths so no cell wraps at 1280x720. */
.reveal .slides section#signal-summary table { width: 1168px; table-layout: fixed; }
.reveal .slides section#signal-summary th:nth-child(1), .reveal .slides section#signal-summary td:nth-child(1) { width: 30%; }
.reveal .slides section#signal-summary th:nth-child(2), .reveal .slides section#signal-summary td:nth-child(2) { width: 28%; }
.reveal .slides section#signal-summary th:nth-child(3), .reveal .slides section#signal-summary td:nth-child(3) { width: 42%; }

/* Stepped mechanism diagrams: the active cells (cream/gold) must beat the pending navy cells on a projector,
   so the active fill is darker, its edge thicker, and the gold matches the theme's text gold. */
.reveal .mechanism-svg rect[fill="#f3ebdc"] { fill: #efd9a6; stroke-width: 4; }
.reveal .mechanism-svg [stroke="#b9975b"] { stroke: #9a7b3f; }
.reveal .mechanism-svg text[fill="#b9975b"] { fill: #9a7b3f; }
