.legal-doc {
  counter-reset: legal-section;
}

.legal-doc h2 {
  counter-increment: legal-section;
  counter-reset: legal-subsection;
}

.legal-doc h2::before {
  content: counter(legal-section) '. ';
}

.legal-doc h3 {
  counter-increment: legal-subsection;
}

.legal-doc h3::before {
  content: counter(legal-section) '.' counter(legal-subsection) ' ';
}

.legal-doc h2[id],
.legal-doc h3[id] {
  scroll-margin-top: 96px;
}

.legal-doc a {
  display: inline;
}
