/* Long legal text on the sheet: numbered sections, a contents list, a receipt-width measure. */
.legal-meta {
  display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; margin-top: calc(var(--line) * .5);
  font-size: .75rem; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-soft);
}
.legal-meta span + span::before { content: "/"; margin-right: 1.5rem; color: var(--rule); }

/* Contents: one ruled line per section, numbered like list items */
.toc { counter-reset: toc; border-top: var(--hair) solid var(--rule); max-width: 44rem; }
.toc li { counter-increment: toc; border-bottom: var(--hair) solid var(--rule); }
.toc a {
  display: flex; align-items: baseline; gap: 1rem; min-height: 2.75rem; padding: .6rem 0;
  font-family: var(--display); font-size: clamp(1.25rem, 2.2vw, 1.75rem); line-height: 1.1; letter-spacing: -.02em;
}
.toc a::before {
  content: counter(toc, decimal-leading-zero); flex: none; min-width: 1.75rem;
  font-family: var(--mono); font-size: .75rem; letter-spacing: .06em; color: var(--ink-soft);
}
.toc a:hover, .toc a:focus-visible { color: var(--pen); text-decoration: underline; text-underline-offset: .22em; }

/* Numbered sections */
.legal { counter-reset: sec; max-width: 44rem; }
.legal > section { counter-increment: sec; }
.legal h2 { display: flex; align-items: baseline; gap: 1rem; line-height: 1.02; }
.legal h2::before {
  content: counter(sec, decimal-leading-zero); flex: none; min-width: 1.75rem;
  font-family: var(--mono); font-size: .75rem; letter-spacing: .06em; color: var(--ink-soft);
}
.legal section > * + * { margin-top: 1.1rem; }
.legal section > h2 { margin-top: calc(var(--line) * .9); }
.legal section:first-child > h2 { margin-top: 0; }
.legal p, .legal li { max-width: 40rem; }
.legal strong { font-weight: 400; background: linear-gradient(transparent 62%, var(--rule) 62%); }

/* Cookie facts as a till slip, and the reopen button */
.legal .tally { border-top: .125rem dotted var(--rule); max-width: 36rem; }
.legal .tally dd { font-size: .875rem; }
.legal-reopen { min-width: 14rem; margin-top: .5rem; }

/* 404 list */
.lost-lines { max-width: 44rem; margin-top: calc(var(--line) * .5); }
.lost-lines .line { display: flex; align-items: baseline; gap: 1rem; font-size: clamp(2rem, 6vw, 4.5rem); padding-right: .5rem; }
.lost-lines a.line:hover, .lost-lines a.line:focus-visible { color: var(--pen); }
.lost-n { flex: none; min-width: 2.4rem; font-family: var(--mono); font-size: .75rem; letter-spacing: .06em; color: var(--ink-soft); }
.lost-lines .strike { max-width: calc(100% - 3.5rem); }

@media (min-width: 60rem) {
  .legal-body > .note + .toc, .legal-body > .note + .legal { margin-top: 0; }
  .legal-body > .toc { margin-bottom: calc(var(--line) * 1.5); }
}
