/* Lessons: the question column. Runs in the order the page is read. */
.lessonsListing { background: var(--colour-of-the-lemon); }

/* The first window: words at the left, three jump keys beside them, each as tall as the words and carrying its lesson's photograph. */
.wayKeys .keyFace { min-height: 6.5rem; font-size: var(--size-of-reading-text); }
.wayKeys .keyPicture {
  position: relative;
  display: block;
  flex: none;
  height: 7rem;
  overflow: hidden;
  background: var(--colour-of-the-navy);
  border-radius: 0 0 0.5rem 0.5rem;
}
.wayKeys .keyPicture img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
}
.wayName { font-size: var(--size-of-reading-text); }
.openerNote { max-width: 32rem; font-size: 1.0625rem; line-height: 1.45; }
@media (min-width: 56rem) {
  .spreadOpener > .wayKeys { grid-column: 3 / 7; align-self: stretch; }
  .wayKeys { --height-of-a-key: 18rem; }
  .wayKeys .keyFace { min-height: var(--height-of-a-key); }
  .wayKeys .keyPicture { flex: 1 1 9rem; height: auto; min-height: 9rem; }
  .openerNote { font-size: 1.125rem; }
}

/* The row that narrows the list: four keys, one row, each named for a setup. Without script it stays out of the way. */
.lessonSpread { padding-top: 0; }
.kindPicker { display: none; margin-bottom: 2rem; }
.js .kindPicker { display: block; }
.kindLabel { display: block; margin-bottom: 0.5rem; font-size: var(--size-of-small-text); text-decoration: underline; text-decoration-thickness: 0.14em; text-underline-offset: 0.25em; }
.kindRow { display: flex; flex-wrap: nowrap; gap: 0.3rem; overflow-x: auto; padding-bottom: 0.4rem; }
.kindKey {
  flex: none;
  min-height: 2.75rem;
  padding: 0.55rem 1.15rem 0.65rem;
  background: var(--colour-of-the-blue);
  color: var(--colour-of-the-lemon);
  border: 0;
  border-radius: 0 0 var(--curve-of-a-key-foot) var(--curve-of-a-key-foot);
  font-size: 1.0625rem;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--time-of-an-ink-change) linear, color var(--time-of-an-ink-change) linear;
}
.kindKey:hover { background: var(--colour-of-the-navy); }
.kindKey.picked { background: var(--colour-of-the-orange); color: var(--colour-of-the-navy); }
.kindCount { min-height: 1.4em; margin-top: 0.4rem; font-size: var(--size-of-small-text); }
@media (min-width: 56rem) {
  .kindRow { flex-wrap: wrap; overflow: visible; }
}

/* The index on six columns: every picture and every key starts on the same edge of the same grid. */
.lessonIndex { row-gap: clamp(2rem, 6vh, 4rem); }
.lessonIndex.narrowed { row-gap: 2rem; }
.bandHeading { display: grid; gap: 0.6rem; }
.bandHeading .restBar { margin: 0; }
.bandHeading p { max-width: 44rem; font-size: var(--size-of-reading-text); }
@media (min-width: 56rem) {
  .bandHeading { grid-template-columns: repeat(6, minmax(0, 1fr)); column-gap: var(--space-between-columns); }
  .bandHeading .restBar { grid-column: 1 / -1; }
  .bandHeading h2 { grid-column: 1 / 3; }
  .bandHeading p { grid-column: 3 / 7; }
}

/* One lesson, one arrangement everywhere: the picture, its name and description, the question key right under them. */
.lessonEntry {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.8rem;
  align-content: start;
  align-items: start;
  min-width: 0;
}
.lessonPicture { min-width: 0; }
.lessonCaption { display: grid; gap: 0.5rem; align-content: start; min-width: 0; font-size: var(--size-of-reading-text); line-height: 1.45; }
.lessonCaption > p { margin-top: 0; font-size: 1.0625rem; }
.lessonCaption h3 a { text-decoration-thickness: 0.07em; }
.lessonCaption .keyBullets { font-size: var(--size-of-reading-text); }
.lessonCaption .keyBullets li + li { margin-top: 0.35rem; }
.lessonCaption > .lessonQuestion { margin-top: 0.4rem; }
@media (min-width: 56rem) {
  .lessonCaption > p { font-size: 1.1875rem; }
}

/* The question key: as tall as its two lines, never a slab. */
.lessonQuestion {
  justify-content: flex-start;
  gap: 0.2rem;
  min-height: 0;
  padding: 0.7rem 0.95rem 0.85rem;
  font-size: 1.1875rem;
  line-height: 1.3;
}
.questionLabel { font-size: 0.95rem; text-decoration: underline; text-decoration-thickness: 0.1em; text-underline-offset: 0.2em; }

/* Sizes on a desk screen: a row's pictures share one crop height; a large lesson's picture is as tall as the caption and key beside it. */
.largeEntry, .midEntry, .smallEntry, .mirrored { min-width: 0; }
@media (min-width: 56rem) {
  .lessonEntry.largeEntry {
    grid-column: 1 / -1;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    column-gap: var(--space-between-columns);
    align-items: stretch;
  }
  .largeEntry .lessonPicture { grid-column: 1 / 4; grid-row: 1; position: relative; min-height: clamp(16rem, 24vw, 22rem); }
  .largeEntry .lessonPicture img { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; }
  .largeEntry .lessonCaption { grid-column: 4 / 7; grid-row: 1; }
  .largeEntry.mirrored .lessonPicture { grid-column: 4 / 7; }
  .largeEntry.mirrored .lessonCaption { grid-column: 1 / 4; }
  .lessonEntry.midEntry { grid-column: span 3; }
  .midEntry .lessonPicture img { aspect-ratio: auto; height: clamp(15rem, 27vw, 24rem); }
  .lessonEntry.smallEntry { grid-column: span 2; }
  .smallEntry .lessonPicture img { aspect-ratio: auto; height: clamp(11rem, 18vw, 17rem); }
}
@media (min-width: 75rem) {
  .largeEntry .lessonPicture { grid-column: 1 / 5; }
  .largeEntry .lessonCaption { grid-column: 5 / 7; }
  .largeEntry.mirrored .lessonPicture { grid-column: 3 / 7; }
  .largeEntry.mirrored .lessonCaption { grid-column: 1 / 3; }
}

/* The seven questions as a list on a hard cut to blue. */
.askSpread { padding-top: calc(var(--space-between-sections) * 0.9); }
.askSpread .sixColumns { align-items: start; }
.askNote { display: grid; gap: 1rem; }
.askList { margin: 0; padding: 0; list-style: none; }
.askList li { position: relative; padding-left: 1.5rem; }
.askList li + li { margin-top: 1rem; }
.askList li::before {
  content: "";
  position: absolute;
  top: 0.4em;
  left: 0;
  width: 0.55rem;
  height: 0.9rem;
  background: currentColor;
  border-radius: 0 0 0.2rem 0.2rem;
}
.askList li.marked::before { background: var(--colour-of-the-orange); }
.askList li > span { font-size: 1.125rem; line-height: 1.4; }
.askList li > a { display: inline-block; margin-left: 0.5rem; padding-block: 0.35rem; }
@media (min-width: 56rem) {
  .askSpread .askNote { grid-column: 1 / 3; }
  .askSpread .askList { grid-column: 3 / 7; }
  .askList li > span { font-size: 1.375rem; line-height: 1.35; }
}

/* The hand-off before the poster: two keys cut to the height of what they say. */
.lessonHandoff { padding-top: var(--space-between-sections); }
.lessonHandoff > .keyFace { min-height: 3.25rem; padding: 1rem 1.1rem 1.15rem; }
