/* Training page: the opening, three pass panels, the marked-up passage, the teachers, the hand-off. */

/* Opening: the title runs the full width at poster scale; the sentence and the working-note photograph share the row under it */
.tr-open { align-items: start; }
.tr-open h1 { font-size: clamp(2.25rem, 10.5vw, 3rem); }
.tr-open__title { align-self: start; }
.tr-open__lead { align-self: start; }
.tr-open__pic img { aspect-ratio: 16 / 9; }

/* Chapters share a modest rhythm */
.tr-passes, .tr-marks, .tr-crew, .tr-next {
  align-content: start;
  padding-block: clamp(2.5rem, 8vh, 5.5rem);
}
.tr-passes { row-gap: clamp(1.25rem, 3vw, 2.25rem); padding-top: clamp(1.5rem, 4vh, 2.5rem); }
.tr-passes__lead { align-self: end; }

/* Pass panels: a wide pale panel with one hero frame beside it; the copy is set large so it fills the panel */
.pass { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); align-items: stretch; }
.pass .panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-width: 0;
  padding: clamp(1.25rem, 2vw, 2rem);
}
.pass .panel > * + * { margin-top: 1rem; }
.pass .panel p { max-width: 34em; font-size: clamp(1.1875rem, 1.61vw, 1.375rem); line-height: 1.4; }
.pass .shot { align-content: start; min-width: 0; --frame: 4 / 3; }
.pass .panel .cap { border-color: var(--fg); }

/* The marked-up passage: one sentence, three copies, one column of rows */
.tr-marks { row-gap: clamp(1rem, 2.5vw, 1.75rem); }
.tr-marks__rows { display: grid; }
.mark-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem var(--gap);
  align-items: center;
  padding-block: clamp(1.25rem, 3vw, 2.25rem);
  border-top: var(--line) dotted var(--ink);
  border-radius: 0;
}
.mark-row:last-child { border-bottom: var(--line) dotted var(--ink); }
.mark-row__label { display: grid; gap: 0.75rem; justify-items: start; align-content: center; }
.mark-row__label p { max-width: 22em; }
.passage {
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.6rem, 3.1vw, 3rem);
  line-height: 1.95;
  letter-spacing: normal;
}
.passage .ln { display: block; }

/* Pencil marks: a tall heavy slash, a heavy tick seated above its word, a bold floor number below */
.passage .sl {
  margin-inline: 0.12em;
  font-family: var(--text);
  font-style: normal;
  font-size: 1.3em;
  line-height: 1;
  vertical-align: -0.06em;
  -webkit-text-stroke: 0.045em currentColor;
}
.passage ruby { ruby-position: over; ruby-align: center; }
.passage--under ruby { ruby-position: under; }
.passage rt {
  font-family: var(--text);
  font-style: normal;
  font-size: max(1.25rem, 0.6em);
  line-height: 1.1;
  -webkit-text-stroke: 0.035em currentColor;
}

/* Breath tick: a short slanted stroke drawn right above the word it belongs to, as heavy as the slashes */
.passage .tk {
  position: relative;
  display: inline-block;
  line-height: 1;
}
.passage .tk::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -0.32em;
  width: 0.11em;
  height: 0.4em;
  margin-left: -0.055em;
  border-radius: 0.03em;
  background: currentColor;
  transform: skewX(-20deg);
}

/* Teachers and the floor tape */
.tr-crew { align-items: center; }
.tr-crew__text > * + * { margin-top: 1.25rem; }
.tr-crew__text p { max-width: 30em; }
.tr-crew__text .lead { margin-top: 1.5rem; font-size: 1.375rem; line-height: 1.4; max-width: 25em; }
.tr-crew__text .facts { margin-top: 2.25rem; max-width: 34em; }
.tr-crew__text .facts > div { padding-block: 0.85rem; }
.tr-crew__pic img { aspect-ratio: var(--frame, 1 / 1); }

/* Hand-off */
.tr-next { padding-bottom: clamp(2.5rem, 8vh, 5rem); }
.tr-next__panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem var(--gap); align-items: center; }
.tr-next__panel > * + * { margin-top: 0; }
.tr-next__body { display: grid; gap: 1.25rem; }
.tr-next__body .pill-row > * { flex: 1 1 14rem; }

@media (min-width: 48rem) {
  /* The opening sits up under the contents line and lets the next chapter show */
  .poster.tr-open {
    container-type: inline-size;
    min-height: 0;
    align-content: start;
    padding-top: 0.5rem;
    padding-bottom: 0.75rem;
  }
  .tr-open h1 { font-size: min(7.4vw, 8.5rem); font-size: min(8vw, 10cqi, 8.5rem); }
  .tr-open__pic img { aspect-ratio: 21 / 9; max-height: 38vh; }

  .pass { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .pass .panel { grid-column: 1 / span 7; grid-row: 1; }
  .pass .shot { grid-column: 8 / span 5; grid-row: 1; }
  .pass--flip .panel { grid-column: 6 / span 7; }
  .pass--flip .shot { grid-column: 1 / span 5; }
  .mark-row { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .mark-row__label { grid-column: 1 / span 4; }
  .passage { grid-column: 5 / -1; }
  .tr-next__panel { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .tr-next__panel h2 { grid-column: 1 / span 6; }
  .tr-next__body { grid-column: 7 / -1; }
}

@media (max-width: 47.99rem) {
  .tr-open__pic { margin-top: 0.25rem; }
  .tr-passes__lead { align-self: start; }
  .passage { font-size: clamp(1.5rem, 7vw, 1.9rem); }
}
