/* Keep readable word boundaries and leave line lengths responsive. */
main :is(p, li, h2, h3) {
  word-break: keep-all;
  overflow-wrap: break-word;
}
main p,
main .faq summary {
  text-wrap: pretty;
}
main :is(h2, h3),
main :is(.program-phases, .semester-cards, .foundations, .benefit-grid, .project-grid) p,
main :is(.foundations, .benefit-grid, .applicant-traits) li,
main .week-session p {
  text-wrap: balance;
}

/* Planned word groupings may become lines on roomy desktop cards. */
.program-phases > li {
  container: phase-copy / inline-size;
}
.semester-cards > li {
  container: semester-copy / inline-size;
}
@media (min-width: 961px) {
  @container phase-copy (min-width: 24rem) {
    .phase-copy-line { display: block; }
  }
  @container semester-copy (min-width: 13rem) {
    .semester-copy-line { display: block; }
  }
}

main .people-panel p:not(.eyebrow),
main :is(.routine, .session-note) p {
  text-wrap: balance;
}

/* A 320px preview needs a full line for each session's copy. */
@media (max-width: 359px) {
  .program-timetable .program-week { grid-template-columns: minmax(0, 1fr); }
  .program-timetable .program-week > .week-session { border-left: 0; }
  .program-timetable .week-session + .week-session { border-top: 1px solid var(--line); }
}
