/* Long reading pages of Happy Minds: privacy, terms, cookies, tuition, missed lessons, and the not-found page. It runs in the order a page is read. */

/* The opening: the page's name and one sentence at the left, one marked key at the right. */
.paperOpener {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  column-gap: var(--space-between-columns);
  row-gap: 1.5rem;
  padding: var(--room-under-the-upper-keys) var(--margin-of-the-spread) var(--space-between-sections);
}
.paperOpener > * { grid-column: 1 / -1; }
.openerHead .standfirst { max-width: 40rem; }
.dateKey { min-height: 6.5rem; }
.dateKey .keyNumeral { font-size: 1.75rem; line-height: 1.1; }
.strayKeys { --height-of-a-key: 9rem; }
.strayKeys .keyNumeral { font-size: 1.75rem; line-height: 1.1; }
@media (min-width: 56rem) {
  .paperOpener > .openerHead { grid-column: 1 / span 4; align-self: end; }
  .paperOpener > .dateKey { grid-column: 5 / span 2; min-height: 10rem; }
}

/* The reading body: the list of sections in two columns, the text in four. */
.paperBody {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  column-gap: var(--space-between-columns);
  row-gap: 2rem;
  padding: var(--space-between-sections) var(--margin-of-the-spread);
}
.paperBody > * { grid-column: 1 / -1; }
.indexLabel { margin-bottom: 0.5rem; font-family: var(--face-for-headings); font-size: var(--size-of-a-minor-heading); line-height: 1.15; text-transform: lowercase; }
.sectionIndex a { display: inline-block; padding-block: 0.55rem; }
.sectionIndex + .emailKey { margin-top: 1.25rem; }
@media (min-width: 56rem) {
  .paperBody > .sectionColumn { grid-column: 1 / span 2; }
  .paperBody > .readingSections { grid-column: 3 / span 4; }
}

/* Sections: each head carries its number on a small blue key. */
.readingSections { counter-reset: sectionNumber; max-width: 48rem; }
.paperSection + .paperSection { margin-top: 2.5rem; }
.paperSection h2 {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
  counter-increment: sectionNumber;
}
.paperSection h2::before {
  content: counter(sectionNumber, decimal-leading-zero);
  min-width: 2.75rem;
  padding: 0.2rem 0.4rem 0.35rem;
  background: var(--colour-of-the-blue);
  color: var(--colour-of-the-lemon);
  border-radius: 0 0 0.5rem 0.5rem;
  text-align: center;
  line-height: 1.15;
}
.paperSection ul { margin-top: 0.9rem; }
.paperSection ul + p, .paperSection dl + p { margin-top: 1rem; }
.paperSection .termSheet { margin-top: 0.9rem; }
.paperSection code { font: inherit; overflow-wrap: anywhere; text-decoration: underline; text-decoration-thickness: 0.09em; text-underline-offset: 0.2em; }
.paperSection .quietKey { margin-top: 1rem; }

/* Narrow phones: the numbers sit above the heads so the heads keep their width. */
@media (max-width: 22rem) {
  .paperSection h2 { grid-template-columns: minmax(0, 1fr); }
  .paperSection h2::before { justify-self: start; }
}
