/* Lesson 03: reading scale based on lesson 02; load after all page styles. */
:root {
  --l03-title: clamp(32px, 3.2vw, 50px);
  --l03-body: clamp(22px, 2vw, 31px);
  /* Legacy .lead is not a semantic reason to enlarge a paragraph. */
  --l03-lead: var(--l03-body);
  --l03-question: clamp(25px, 2.15vw, 34px);
  --l03-hint: clamp(18px, 1.35vw, 23px);
  --l03-small: var(--l03-hint);
  --l03-evidence: clamp(25px, 2.15vw, 34px);
  --l03-caption: 13px;
  --l03-control: 18px;
  --l03-copy-gap: 18px;
  --l03-column-gap: 36px;
}

.slide:not(.hero) {
  max-width: 1700px;
  padding: 28px 4vw;
  gap: 20px;
}
.slide:not(.hero) > .slide-head { gap: 18px; }
.slide:not(.hero) > .slide-head h2 {
  font-size: var(--l03-title);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.025em;
}
.slide:not(.hero) .activity-icon { width: 64px; height: 64px; }
.slide:not(.hero) .split {
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: var(--l03-column-gap);
}
.slide:not(.hero) .split.reverse {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
}
.slide:not(.hero) .legend-layout,
.slide:not(.hero) .future-story-layout {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: var(--l03-column-gap);
}
.slide:not(.hero) :is(.copy, .future-story-copy) {
  min-width: 0;
  gap: var(--l03-copy-gap);
}
.slide:not(.hero) .copy > [data-grade] {
  display: grid;
  gap: var(--l03-copy-gap);
}
.slide:not(.hero) > p:not(.source):not(.status-line),
.slide:not(.hero) :is(.copy, .future-story-copy) > p,
.slide:not(.hero) .copy > [data-grade] > p {
  font-size: var(--l03-body);
  line-height: 1.5;
}
.slide:not(.hero) > p.lead,
.slide:not(.hero) :is(.copy, .future-story-copy) > p.lead,
.slide:not(.hero) .copy > [data-grade] > p.lead {
  font-size: var(--l03-lead);
  line-height: 1.5;
}
.slide:not(.hero) > p.small,
.slide:not(.hero) :is(.copy, .future-story-copy) > p.small,
.slide:not(.hero) .copy > [data-grade] > p.small {
  font-size: var(--l03-small);
  line-height: 1.5;
}
.slide:not(.hero) :is(.copy, .future-story-copy) > p.eyebrow {
  font-size: 18px;
}
.slide:not(.hero) :is(.copy, .future-story-copy) > p.source {
  font-size: 12px;
  line-height: 1.5;
}
.slide:not(.hero) .inquiry { padding: 16px 22px; }
.slide:not(.hero) .inquiry > p {
  font-size: var(--l03-question);
  font-weight: 600;
  line-height: 1.4;
}
.slide:not(.hero) .inquiry > small {
  font-size: var(--l03-hint);
  line-height: 1.45;
  margin-top: 8px;
}
.slide.content-revision .model-comparison > p,
.slide.content-revision .evidence-row p {
  font-size: var(--l03-body);
  line-height: 1.5;
}
.slide.content-revision .nesting-explanation .lead {
  font-size: var(--l03-body);
  line-height: 1.5;
}
.slide.content-revision .evidence-row h3 {
  font-size: var(--l03-question);
  line-height: 1.4;
}
.slide:not(.hero) .algorithm-layout .algo-copy {
  font-size: var(--l03-body);
  line-height: 1.5;
}
.slide:not(.hero) .algorithm-layout > div > .small {
  font-size: var(--l03-small);
  line-height: 1.5;
}

/* Answers share the body scale; reserve both lines plus the control at every size. */
.slide.content-revision .observation-reveal {
  height: calc(var(--l03-body) * 3 + var(--l03-hint) * 1.5 + 20px);
  min-height: calc(var(--l03-body) * 3 + var(--l03-hint) * 1.5 + 20px);
}
.slide.content-revision .observation-reveal details { padding-top: 6px; }
.slide.content-revision .observation-reveal summary {
  font-size: var(--l03-hint);
  line-height: 1.5;
  padding: 2px 0;
}
.slide.content-revision .observation-reveal details > p {
  font-size: var(--l03-body);
  line-height: 1.5;
  margin-top: 6px;
}

/* Knowledge and necessary instructions: never shrink just because markup says small. */
.slide[data-slide-id="underground"] .copy > p.small,
.slide[data-slide-id="rules"] .small,
.slide[data-slide-id="rules"] .copy > p.small,
.slide[data-slide-id="entry"] .copy > p.small,
.slide[data-slide-id="round-one"] .copy > p.small,
.slide[data-slide-id="progress"] .copy > p.small,
.slide[data-slide-id="review"] .copy > [data-grade] > p.small,
.slide[data-slide-id="algorithm"] .algorithm-layout > div > p.small {
  font-size: var(--l03-body);
  line-height: 1.5;
  color: var(--ink);
}
.slide:not(.hero) :is(.copy, .future-story-copy) > p.story-speaker,
.slide:not(.hero) .nesting-explanation > .small,
.slide:not(.hero) .model-comparison .scale-note {
  font-size: var(--l03-hint);
  line-height: 1.5;
  color: var(--muted);
}

/* Main questions and takeaway statements have one common emphasis scale. */
.slide[data-slide-id="method-primary"] .copy > [data-grade="lower"] > p:not(.lead):not(.small),
.slide[data-slide-id="summary"] .copy > .story-return,
.slide[data-slide-id="summary"] .copy > [data-grade] > .lead {
  font-size: var(--l03-question);
  font-weight: 600;
  line-height: 1.4;
}
.slide:is([data-slide-id="round-one"], [data-slide-id="round-two"],
          [data-slide-id="method-primary"], [data-slide-id="handbook"]) .copy .lead {
  font-weight: 600;
}

/* Evidence labels are readable; source/credit text remains a separate small tier. */
.slide:not(.hero) .timeline b,
.slide:not(.hero) .inscription-reading strong {
  font-size: var(--l03-evidence);
  line-height: 1.4;
}
.slide:not(.hero) .timeline span,
.slide:not(.hero) .inscription-reading b,
.slide:not(.hero) .copy > .fact {
  font-size: var(--l03-body);
  line-height: 1.5;
}
.slide:not(.hero) .inscription-reading span {
  font-size: var(--l03-hint);
  line-height: 1.5;
}
.slide:not(.hero) .media figcaption {
  font-size: var(--l03-caption);
  line-height: 1.5;
}
.slide:not(.hero) .boards figcaption,
.slide:not(.hero) #algoBoardLabel {
  font-size: var(--l03-hint);
  line-height: 1.5;
}
.slide:not(.hero) .boards :is(#leftCount, #downCount),
.slide:not(.hero) .status-line {
  font-size: var(--l03-body);
  line-height: 1.5;
}
.slide:not(.hero) .boards :is(#leftCount, #downCount) {
  font-weight: 600;
  color: var(--ink);
}
.slide:not(.hero) .algorithm-layout .algo-copy { min-height: 4.5em; }
.slide:not(.hero) .steps span,
.slide:not(.hero) .candidates small {
  font-size: var(--l03-hint);
  line-height: 1.4;
}
.slide:not(.hero) .actions button,
.slide.future-story .future-story-example button {
  font-size: var(--l03-control);
  line-height: 1.4;
}

/* Diagram text is measured in the SVG viewBox, not CSS viewport pixels. */
.slide[data-slide-id="underground"] svg text:not(:last-child) { font-size: 26px; }

/* Put real feedback across the card, so enlarging it does not squeeze a narrow column. */
.slide.future-story .future-story-status {
  font-size: var(--l03-body);
  line-height: 1.5;
  min-height: 4.5em;
}
.slide.future-story .future-story-direction {
  font-size: var(--l03-body);
  line-height: 1.4;
}
.slide.future-story .future-story-blocked .future-story-board { grid-row: 1 / 3; }
.slide.future-story .future-story-blocked .future-story-direction {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
}
.slide.future-story .future-story-blocked button {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
}
.slide.future-story .future-story-blocked .future-story-status {
  grid-column: 1 / -1;
  grid-row: 3;
}

@media (max-height: 760px) and (min-width: 901px) {
  :root {
    --l03-title: 34px;
    --l03-body: 24px;
    --l03-lead: var(--l03-body);
    --l03-question: 26px;
    --l03-hint: 18px;
    --l03-small: var(--l03-hint);
    --l03-evidence: 26px;
    --l03-copy-gap: 12px;
    --l03-column-gap: 25px;
  }
  .slide:not(.hero) { padding: 20px 4vw; gap: 16px !important; }
  .slide:not(.hero) .activity-icon { width: 52px; height: 52px; }
  .slide:not(.hero) .inquiry { padding: 13px 18px; }
}

@media (max-width: 900px) {
  :root {
    --l03-title: 30px;
    --l03-body: 21px;
    --l03-lead: var(--l03-body);
    --l03-question: 25px;
    --l03-hint: 19px;
    --l03-evidence: 26px;
    --l03-copy-gap: 14px;
    --l03-column-gap: 24px;
  }
  .slide:not(.hero) { padding: 24px; gap: 20px; }
  .slide:not(.hero) > .slide-head { gap: 12px; }
  .slide:not(.hero) .activity-icon { width: 55px; height: 55px; }
  .slide:not(.hero) .split,
  .slide:not(.hero) .split.reverse,
  .slide:not(.hero) .legend-layout,
  .slide:not(.hero) .future-story-layout { grid-template-columns: minmax(0, 1fr); }
  .slide.content-revision .observation-reveal { height: auto; }
}

@media (max-width: 430px) {
  .slide:not(.hero) .algorithm-layout .algo-copy { min-height: 7.5em; }
  .slide.future-story .future-story-blocked :is(.future-story-board, .future-story-direction, .future-story-status, button) {
    grid-column: 1;
    grid-row: auto;
  }
}
