#document { padding-block: clamp(2.5rem, 4vw, 3.5rem); overflow-wrap: break-word }
.doc-intro { max-width: 46rem; margin-bottom: clamp(1.5rem, 3vw, 2.4rem) }
#document h1, #document h2 { font-family: Georgia, serif; font-weight: 400; text-wrap: balance }
#document h1 { font-size: clamp(2.65rem, 7vw, 5rem); line-height: 1.06; letter-spacing: -.045em; hyphens: auto }
#document .meta { color: var(--muted); margin: .8rem 0 1.65rem; font-size: .85rem }
.doc-intro .lead { font: 400 clamp(1.15rem, 2vw, 1.42rem)/1.52 Georgia, serif; margin-bottom: .9rem }
.doc-intro p + p { margin-top: .6rem }
.doc-layout { display: grid; grid-template-columns: minmax(10rem, 1fr) minmax(0, 2.8fr); column-gap: clamp(2rem, 6vw, 5rem); border-top: 1px solid var(--rule) }
.doc-index { position: sticky; top: 1rem; align-self: start; max-height: calc(100dvh - 2rem); overflow-x: hidden; overflow-y: auto; padding-block: clamp(1.6rem, 4vw, 2.7rem) }
.doc-index details { border: 0 }
.doc-index summary { padding-inline: .25rem; padding-top: 0; font-size: .88rem; font-weight: 600; justify-content: space-between; color: var(--ink) }
.doc-index summary::after { content: ''; width: .4rem; height: .4rem; border: solid currentColor; border-width: 0 1px 1px 0; transform: rotate(45deg) }
.doc-index details[open] summary::after { transform: rotate(225deg) }
.doc-index nav { display: grid; gap: .1rem; padding: .4rem .25rem }
#document .doc-index a { padding: .35rem .7rem; border-left: 2px solid var(--rule); color: var(--muted); font-size: .83rem; line-height: 1.4; text-decoration: none }
#document .doc-index a:is(:hover,:focus-visible,[aria-current]) { border-color: var(--accent); color: var(--accent); background: var(--surface) }
.doc-sections section { padding-block: clamp(1.6rem, 4vw, 2.7rem); scroll-margin-top: 1rem }
.doc-sections section + section { border-top: 1px solid var(--rule) }
#document h2 { font-size: clamp(1.65rem, 3vw, 2.3rem); line-height: 1.16; letter-spacing: -.035em; margin-bottom: .95rem }
.doc-sections p, .doc-sections li { line-height: 1.68 }
.doc-sections p + p, .doc-sections ul { margin-top: .85rem }
.doc-sections ul { padding-left: 1.3rem; margin-bottom: 0 }
#document a { color: var(--accent) }
#document .important { font-weight: 600 }
@media (max-width: 959px) {
  .doc-layout { display: block }
  .doc-index { position: static; max-height: none; border-block: 1px solid var(--rule); margin-bottom: 1.2rem; padding-block: .3rem }
  .doc-index summary { min-height: 44px; padding-block: .6rem }
  #document .doc-index a { display: flex; align-items: center; min-height: 44px }
  .doc-index nav { padding-bottom: .85rem }
}
@media (prefers-reduced-motion: no-preference) {
  .doc-index a, .doc-index summary::after { transition: color 180ms, border-color 180ms, background-color 180ms, transform 180ms }
  .doc-index details[open] nav { animation: settle-in 180ms ease-out }
  #document .section-entered { animation: legal-enter 320ms ease-out }
  @keyframes legal-enter { from { opacity: .75; translate: 0 4px } }
}

@media (max-width: 360px) {
  #document h1 { font-size: 2.3rem; hyphens: manual }
}

@media (min-width: 960px) {
  .doc-layout:has(.doc-index details:not([open])) { display: block }
  .doc-layout:has(.doc-index details:not([open])) > * { max-width: 42rem; margin-inline: auto }
  .doc-index:has(details:not([open])) { position: static; padding-bottom: 0 }
}
