.legal-page {
  --legal-content-offset: calc(var(--progress-nav-height, 6.25rem) + 1.25rem);
  background: var(--paper);
}
.legal-hero { padding-block: clamp(2.75rem, 7vw, 6rem); border-bottom: 1px solid var(--line); background: var(--canvas); }
.legal-hero h1 { max-width: 15ch; font-size: clamp(2.5rem, 7vw, 6.25rem); overflow-wrap: anywhere; }
.legal-hero p { max-width: 60ch; margin-top: 1rem; color: var(--muted); }

.toc-layout {
  display: grid;
  grid-template-columns: minmax(10rem, 13.75rem) minmax(0, 44rem);
  align-items: start;
  gap: 2rem clamp(2rem, 6vw, 6rem);
  padding-block: clamp(2rem, 5vw, 4.5rem);
}
.toc-sidebar { position: sticky; top: var(--legal-content-offset); }
.toc-sidebar .label { margin-bottom: .75rem; }
.toc-list { display: flex; flex-direction: column; max-height: max(2.75rem, calc(100vh - var(--legal-content-offset) - 4rem)); overflow: auto; }
.toc-link {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding: .38rem .65rem .38rem .9rem;
  border-inline-start: 2px solid var(--line);
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.4;
  text-decoration: none;
}
.toc-link[data-toc-depth='3'] { padding-inline-start: 1.65rem; }
.toc-link[data-toc-status='active'] { border-color: var(--accent); background: var(--sage); color: var(--ink); font-weight: 700; }
.toc-link:focus-visible { outline-offset: -3px; }
.toc-article { grid-column: 2; min-width: 0; overflow-wrap: anywhere; }
.toc-article :is(h2, h3) { scroll-margin-top: var(--legal-content-offset); }
.toc-article h2 { margin-bottom: .8rem; font-size: clamp(1.65rem, 3.5vw, 2.6rem); }
.toc-article h2:not(:first-child) { margin-top: 2.2rem; padding-top: 2.2rem; border-top: 1px solid var(--line); }
.toc-article h3 { margin: 1.4rem 0 .45rem; font-size: clamp(1.25rem, 2.25vw, 1.55rem); }
.toc-article p + p { margin-top: .85rem; }
.toc-article ul { margin-block: .8rem; padding-inline-start: 1.25rem; }
.toc-article li + li { margin-top: .45rem; }

@media (max-width: 48rem) {
  .toc-layout { grid-template-columns: minmax(0, 1fr); }
  .toc-sidebar { position: static; }
  .toc-list { max-height: none; overflow: visible; }
  .toc-article { grid-column: 1; }
}
