/* Long-form pages: privacy, terms, cookies, payment, cancellation. Numbered sections, a contents panel beside the text. */
.legal {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem) var(--gap);
  padding: clamp(1.5rem, 5vh, 3.25rem) var(--gutter) clamp(2.5rem, 9vh, 6.5rem);
  counter-reset: sec toc;
}
.legal__head { display: grid; gap: 1rem; justify-items: start; }
.legal__head h1 { font-size: var(--t-screen); line-height: 1.06; }
.legal__head .lead { max-width: 38em; }

/* Contents panel */
.toc h2 { font-size: var(--t-name); line-height: 1.18; }
.toc ol { margin-top: 0.75rem; }
.toc li { counter-increment: toc; }
.toc li + li { margin-top: 0.1rem; }
.toc a {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  min-height: 2.75rem;
  padding-block: 0.4rem;
  font-size: 1.0625rem;
  line-height: 1.3;
}
.toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--display); font-style: italic; flex: none; }

/* Body: numbered sections */
.legal__body { min-width: 0; max-width: 42rem; }
.sec { counter-increment: sec; scroll-margin-top: 1rem; }
.sec + .sec { margin-top: clamp(1.75rem, 4vh, 2.75rem); }
.sec h2 { display: flex; gap: 0.6em; align-items: baseline; font-size: var(--t-name); line-height: 1.18; }
.sec h2::before { content: counter(sec, decimal-leading-zero); flex: none; font-size: 0.8em; }
.sec > * + * { margin-top: 0.9em; }
.sec ul { list-style: disc; padding-left: 1.3em; }
.sec li + li { margin-top: 0.45em; }
.sec address { font-style: normal; display: grid; gap: 0.1rem; }
.sec .facts { margin-top: 0.5rem; font-size: 1.0625rem; }
.sec .facts dd { max-width: 60%; }
.sec button.pill { margin-top: 0.25rem; }

/* Hand-off at the foot */
.legal__hand { display: grid; gap: 1rem; }
.legal__hand p { font-size: var(--t-lead); line-height: 1.35; max-width: 34em; }
.legal__hand .pill-row > * { flex: 1 1 15rem; }

/* 404 */
.lost { display: grid; gap: clamp(1rem, 2.4vh, 1.75rem); align-content: center; }
.lost .passes { margin-top: 0.25rem; }
.lost .passes li { font-size: 1rem; }

@media (min-width: 48rem) {
  .legal { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; }
  .legal__head { grid-column: 1 / -1; }
  .toc { grid-column: 1 / span 4; }
  .legal__body { grid-column: 6 / -1; max-width: none; }
  .legal__body .sec { max-width: 44rem; }
  .legal__hand { grid-column: 1 / -1; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; }
  .legal__hand .pill-row { flex-direction: column; }
  .lost-wrap { align-items: center; }
}
