.document-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, .68fr);
  align-items: end;
  gap: clamp(2rem, 6vw, 8rem);
  padding-block: clamp(2rem, 4.5vw, 4.7rem);
}
.document-heading .rubric { color: var(--red); }
.document-heading h1 {
  margin-block: 1.25rem 1.1rem;
  font-size: clamp(3.55rem, 6.7vw, 7rem);
  line-height: .94;
}
.document-intro { font-size: clamp(1rem, 1.4vw, 1.26rem); }
.read-document, .paper-end { display: inline-block; margin-top: .9rem; }
.legal-page .read-document, .legal-page .paper a { color: var(--red); }
.document-tabs {
  display: grid;
  align-self: center;
  border-bottom: 1px solid var(--ink);
}
.document-tabs a {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 2ch 1fr auto;
  align-items: baseline;
  gap: clamp(.85rem, 1.5vw, 1.6rem);
  padding: .7rem clamp(.8rem, 1.7vw, 1.7rem);
  min-height: 3.2rem;
  font-size: clamp(1.02rem, 1.5vw, 1.5rem);
  text-decoration: none;
}
.document-number {
  font: italic 1.65em/1.1 var(--serif);
  letter-spacing: -.075em;
}
.document-tabs a::after { content: "↗" / ""; align-self: center; font-size: 1rem; }
.document-tabs a[aria-current] { color: var(--paper); padding-top: 1.12rem; }
.document-tabs a[aria-current]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--red);
  clip-path: polygon(0 0, 30% 0, calc(30% + .65rem) .4rem, 100% .4rem, 100% 100%, 0 100%);
}
.document-tabs a[aria-current]::after { content: ""; }
.document-tabs a:hover span:last-child, .toc a:hover { text-decoration: underline; text-underline-offset: .2em; }
.document-layout {
  display: grid;
  grid-template-columns: minmax(12rem, 19.5rem) minmax(0, 70ch);
  gap: clamp(2rem, 7.5vw, 8rem);
  align-items: start;
  border-top: 1px solid var(--ink);
  padding-block: clamp(1.4rem, 3vw, 2.8rem) clamp(3rem, 6vw, 6rem);
}
.document-index { min-width: 0; }
.toc summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .4rem 0 .75rem;
  border-bottom: 1px solid var(--ink);
  font-weight: 650;
  list-style: none;
}
.toc summary::after { content: "+" / ""; color: var(--red); font-size: 1.25rem; }
.toc[open] summary::after { content: "−" / ""; }
.toc ol { list-style: none; padding: 0; }
.toc li { border-bottom: 1px solid var(--rule); }
.toc a { display: block; padding: .63rem 0; text-decoration: none; line-height: 1.35; }
.back-to-site { display: inline-block; margin-top: 1.1rem; font-size: .9rem; }
.paper { min-width: 0; font-size: clamp(1rem, 1.08vw, 1.1rem); line-height: 1.65; overflow-wrap: anywhere; }
.updated { color: var(--muted); font: italic 1.04rem/1.5 var(--serif); }
.legal-section { padding-block: 1.5rem; border-bottom: 1px solid var(--rule); scroll-margin-top: 1rem; }
.legal-section h2 { font-size: clamp(1.56rem, 2.45vw, 2.5rem); line-height: 1.09; letter-spacing: -.045em; }
.legal-section h3 { font-size: 1.13rem; line-height: 1.3; margin-top: 1.1rem; }
.legal-section p, .legal-section ul { margin-block: .8rem 0; }
.legal-section ul { padding-inline-start: 1.3rem; }
.legal-section li + li { margin-top: .28rem; }
.legal-section li::marker { color: var(--red); }
.legal-section:target h2 { border-inline-start: 3px solid var(--red); padding-inline-start: .55em; }
.legal-page .end [aria-current] { text-decoration: underline; text-decoration-color: var(--red); }
@media (min-width: 821px) and (min-height: 790px) {
  .document-index { position: sticky; top: 1rem; }
}
@media (max-width: 820px) {
  .document-heading { grid-template-columns: minmax(0, 1fr) minmax(14rem, .78fr); gap: 1.5rem; }
  .document-layout { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .paper { width: min(100%, 70ch); }
}
@media (max-width: 620px) {
  .document-heading { grid-template-columns: minmax(0, 1fr); align-items: start; gap: 1.6rem; }
  .document-heading h1 { font-size: clamp(3.1rem, 12vw, 4.7rem); }
  .document-tabs a { min-height: 44px; }
  .toc a { padding-block: .72rem; }
}
@media print {
  .legal-page { background: white; color: black; }
  .legal-page .wrap { width: 100%; }
  .legal-page .mast, .legal-page .end, .document-tabs, .document-index,
  .read-document, .paper-end { display: none; }
  .document-heading, .document-layout { display: block; padding-block: 1rem; }
  .document-heading h1 { font-size: 34pt; }
  .document-intro, .paper { font-size: 11pt; }
  .legal-section { padding-block: .55rem; }
  .legal-section h2 { font-size: 16pt; }
  .legal-section h2, .legal-section h3 { break-after: avoid; }
  .legal-section:target h2 { border: 0; padding: 0; }
  .paper p, .paper li { orphans: 3; widows: 3; }
}
