.document-page {
  --doc-ink: #30242d;
  --doc-accent: #9d315d;
  --doc-muted: #685661;
  --doc-line: #e6d3d5;
  background: #fff9f3;
  color: var(--doc-ink);
}

.doc-paper {
  min-height: 60vh;
}

.doc-wrap {
  width: min(1120px, calc(100% - clamp(40px, 10vw, 128px)));
  margin-inline: auto;
  padding-block: clamp(42px, 6.4vw, 96px) clamp(64px, 8vw, 120px);
}

.doc-intro {
  padding-bottom: clamp(28px, 3.8vw, 56px);
}

.doc-paper h1,
.doc-paper h2 {
  margin: 0;
  color: var(--doc-ink);
  font-family: "Bricolage Grotesque", "DM Sans", sans-serif;
  font-weight: 700;
  letter-spacing: -.055em;
  text-wrap: balance;
}

.doc-paper h1 {
  max-width: 17ch;
  font-size: clamp(2.6rem, 6.2vw, 5.2rem);
  line-height: 1.03;
}

.doc-intro p,
.doc-body p {
  max-width: 65ch;
  margin: 1em 0 0;
  font-family: "DM Sans", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

.doc-intro p {
  margin-top: 1.35rem;
  color: var(--doc-muted);
}

.doc-layout {
  display: grid;
  grid-template-columns: minmax(12rem, 0.8fr) minmax(0, 2fr);
  column-gap: clamp(36px, 7vw, 110px);
  align-items: start;
  border-top: 1px solid var(--doc-line);
  padding-top: clamp(28px, 4vw, 56px);
}

.doc-contents {
  position: sticky;
  top: 2rem;
  width: 100%;
  border-left: 3px solid #d5adc2;
  padding-inline-start: 1rem;
}

.doc-contents p {
  margin: 0 0 .45rem;
  color: var(--doc-ink);
  font-family: "Bricolage Grotesque", "DM Sans", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -.025em;
}

.doc-contents ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.doc-contents a {
  display: inline-block;
  max-width: 100%;
  padding-block: .34rem;
  color: var(--doc-muted);
  font-size: .96rem;
  line-height: 1.4;
  text-decoration: none;
}

.doc-paper a:hover,
.doc-contents a:focus-visible {
  color: var(--doc-accent);
  text-decoration: underline;
  text-underline-offset: .17em;
}

.doc-body {
  max-width: 43rem;
}

.doc-body h2 {
  padding-top: clamp(1.8rem, 3.8vw, 3.15rem);
  font-size: clamp(1.6rem, 2.45vw, 2.25rem);
  line-height: 1.12;
  letter-spacing: -.04em;
  scroll-margin-top: 1.75rem;
}

.doc-body h2:first-child {
  padding-top: 0;
}

.doc-intro a,
.doc-body a {
  color: var(--doc-accent);
  font-weight: 650;
  text-decoration: underline;
  text-decoration-thickness: .075em;
  text-underline-offset: .17em;
}

.doc-paper a:focus-visible {
  outline: 2px solid var(--doc-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (max-width: 760px) {
  .doc-layout {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 2rem;
  }

  .doc-contents {
    position: static;
  }

  .doc-contents a {
    padding-block: .48rem;
  }

  .doc-body h2 {
    scroll-margin-top: 1rem;
  }
}

@media (max-height: 580px) {
  .doc-contents {
    position: static;
  }
}

.document-page .site-footer a[aria-current="page"] {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .2em;
}

@media print {
  .document-page .site-header,
  .document-page .site-footer,
  .document-page .skip-link,
  .doc-contents {
    display: none;
  }

  .document-page {
    background: white;
    color: black;
  }

  .doc-wrap,
  .doc-body {
    width: auto;
    max-width: none;
    padding: 0;
  }

  .doc-layout {
    display: block;
  }

  .doc-body h2 {
    break-after: avoid;
  }
}
