/* Instruments page: blue ground, the instrument keyboard, the hand-off. Read top to end. */

.instrumentsGround { padding-bottom: 0; }

/* The first window: picture on the left three columns, words on the right three, both hung from one top edge. */
.instrumentOpener {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  column-gap: var(--space-between-columns);
  row-gap: 1.5rem;
  align-items: start;
  padding: var(--room-under-the-upper-keys) var(--margin-of-the-spread) var(--space-between-sections);
}
.instrumentOpener > * { grid-column: 1 / -1; }
.instrumentWords { order: -1; display: grid; justify-items: start; align-content: start; gap: 0.2rem; }
.instrumentWords h1 { margin-bottom: 0.4rem; }
.instrumentWords p { max-width: 36rem; }
.instrumentWords .standfirst { margin-top: 0; margin-bottom: 0.6rem; }
.instrumentWords p + p { margin-top: 0; }
.instrumentWords .emailKey { margin-top: 0.8rem; }
@media (min-width: 56rem) {
  .instrumentOpener > .instrumentPicture { grid-column: 1 / span 3; }
  /* The words hang from the top edge of the print; the email key sits straight under the last paragraph. */
  .instrumentOpener > .instrumentWords {
    grid-column: 4 / span 3;
    order: 0;
  }
  .instrumentPicture img { height: clamp(18rem, calc(100vh - 13rem), 34rem); aspect-ratio: auto; }
}

/* The keyboard: one row of tall lemon keys, the last one orange. */
.keyboardSection {
  padding: 0 var(--margin-of-the-spread) var(--space-between-sections);
}
.keyboardIntro {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  column-gap: var(--space-between-columns);
  row-gap: 1rem;
  margin-bottom: 1.75rem;
}
.keyboardIntro > * { grid-column: 1 / -1; }
.keyboardWords p + p { margin-top: 0.8em; }
@media (min-width: 56rem) {
  .keyboardIntro > h2 { grid-column: 1 / span 2; }
  .keyboardIntro > .keyboardWords { grid-column: 3 / span 4; }
}

.instrumentKeyboard {
  --height-of-a-key: 19rem;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.35rem;
}
.instrumentKey {
  justify-content: flex-end;
  gap: 0.5rem;
  min-height: 8.5rem;
  padding: 1rem 1rem 1.2rem;
}
.instrumentKey h3 { font-size: var(--size-of-a-spread-heading); }
.instrumentClass { font-size: var(--size-of-reading-text); line-height: 1.25; text-decoration: underline; text-decoration-thickness: 0.09em; text-underline-offset: 0.2em; }
.instrumentKey .smallPrint { margin-top: 0.2rem; }
.instrumentKey:focus-visible { outline: 0.2rem solid var(--colour-of-the-orange); outline-offset: 0.2rem; }

/* Side by side, every key shares three rows: the name stands on the first row's foot, the link and the note hang from the next two. */
@media (min-width: 40rem) {
  .instrumentKeyboard {
    grid-auto-flow: row;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-columns: auto;
    grid-auto-rows: 1fr auto auto;
  }
  .instrumentKey {
    display: grid;
    grid-row: span 3;
    grid-template-rows: 1fr auto auto;
    row-gap: 0.5rem;
    min-height: 12rem;
  }
  .instrumentKey h3 { align-self: end; }
  .instrumentKey .instrumentClass, .instrumentKey .smallPrint { align-self: start; }
  @supports (grid-template-rows: subgrid) {
    .instrumentKey { grid-template-rows: subgrid; }
  }
  @supports not (grid-template-rows: subgrid) {
    .instrumentKey .instrumentClass { min-height: 2.5em; }
    .instrumentKey .smallPrint { min-height: 5.6em; }
  }
}
@media (min-width: 56rem) {
  .instrumentKeyboard { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .instrumentKey { min-height: var(--height-of-a-key); }
}

/* The hand-off before the poster: a sentence of running text, then two short keys whose large labels fill them. */
.instrumentHandoff {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: 0.35rem;
  row-gap: 1.5rem;
  align-items: start;
  padding: 0.5rem var(--margin-of-the-spread) var(--space-between-sections);
}
.handoffLine {
  max-width: 44rem;
  margin: 0;
  font-family: var(--face-for-reading);
  font-size: 1.375rem;
  line-height: 1.4;
}
.instrumentHandoff .onwardKeys {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0;
}
.instrumentHandoff .onwardKeys > a.keyFace {
  grid-column: auto;
  min-height: 7rem;
  padding: 1rem 1rem 1.2rem;
  font-size: 1.375rem;
  line-height: 1.25;
}
@media (min-width: 40rem) {
  .instrumentHandoff { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .handoffLine { padding-right: 1.5rem; }
  .instrumentHandoff .onwardKeys > a.keyFace { min-height: 8rem; }
}
@media (min-width: 56rem) {
  /* The same five columns as the keyboard: the two keys stand under voice and the orange key. */
  .instrumentHandoff { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .handoffLine { grid-column: 1 / span 3; }
  .instrumentHandoff .onwardKeys { grid-column: 4 / span 2; }
  .instrumentHandoff .onwardKeys > a.keyFace { min-height: 9rem; }
}
