/* Legal and policy pages: long text set as numbered count cards under a contents grid. Loaded after site.css. */
.legal-open { padding-bottom: clamp(1.25rem, 3vw, 2.25rem); }
.legal-open .lead { max-width: 30em; }
.legal-updated {
  width: fit-content;
  padding: .25rem .75rem;
  border: var(--line) solid var(--ink);
  font-size: var(--fs-small);
  line-height: 1.4;
}

/* CONTENTS: a boxed grid of numbered links; the ink shows through the gaps as the dividers. */
.toc {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--line);
  margin: 0;
  padding: 0;
  list-style: none;
  border: var(--line) solid var(--ink);
  background: var(--ink);
}
.toc li { background: var(--ground); }
.toc li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.toc a {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  height: 100%;
  min-height: 2.75rem;
  padding: .5rem .625rem;
  font-size: var(--fs-small);
  line-height: 1.2;
  text-decoration: none;
}
.toc__n { font-size: 1.5rem; line-height: 1; font-variant-numeric: tabular-nums; }
.toc a:hover, .toc a:focus-visible { background: var(--accent); color: var(--on-accent); text-decoration: underline; }
.toc a:focus-visible { outline-color: var(--ink); outline-offset: calc(var(--line) * -2); }
@media (min-width: 48rem) {
  .toc { grid-template-columns: minmax(0, 1fr); }
  .toc a { padding-inline: var(--pad); }
}

/* SECTIONS: each numbered section is a count card, number left, text right, 3px ink rule above. */
.legal-body { max-width: 58rem; }
.legal-sec {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .5rem 1.25rem;
  padding-block: clamp(1.25rem, 3vw, 2rem);
  border-top: var(--line) solid var(--ink);
}
.legal-sec:last-child { border-bottom: var(--line) solid var(--ink); }
.legal-sec__n {
  font: 400 clamp(2.25rem, 1.5rem + 3vw, 3.5rem)/1 var(--text);
  font-variant-numeric: tabular-nums;
}
@media (min-width: 40rem) {
  .legal-sec { grid-template-columns: 5.5rem minmax(0, 1fr); }
}
.legal-sec__body { min-width: 0; max-width: 38em; }
.legal-sec__body > * + * { margin-top: .9em; }
.legal-sec__body > h2 + * { margin-top: .75rem; }
.legal-sec__body .timetable { margin-top: 1rem; }
.legal-sec__body .timetable > div { padding-block: .625rem; }
.legal-sec code { font: inherit; overflow-wrap: anywhere; padding: 0 .25em; border: var(--line) solid var(--ink); }
.legal-sec .btn { margin-top: .25rem; }

/* 404: the count board, shortened to four rows. */
.lost .opening__text, .lost .opening__media { grid-column: 1 / -1; }
.lost .lead { max-width: 36em; }
.lost .count-rows { max-width: 64rem; }
.lost .count-row { min-height: 3.5rem; padding-block: .5rem; align-items: center; }
.lost .count-row__num { font-size: clamp(2.25rem, 1.5rem + 3vw, 3.5rem); }
.lost .count-row__label { font-size: var(--fs-h3); }
