/* Agreement — readable glass document with a sticky heading index. */

.page-doc .section {
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
}

.page-doc .doc-layout {
  display: grid;
  grid-template-columns: minmax(12.5rem, 16.5rem) minmax(0, 75ch);
  column-gap: clamp(1.15rem, 2.4vw, 2.25rem);
  align-items: start;
  justify-content: center;
}

.page-doc .doc-toc {
  min-width: 0;
}

.page-doc .doc-toc ol {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin: 0;
  padding: 0.35rem 0 0;
}

.page-doc .doc-toc a {
  display: block;
  padding: 0.38rem 0.7rem;
  border-left: 2px solid transparent;
  border-radius: 0 10px 10px 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
  text-decoration: none;
}

.page-doc .doc-toc a:hover,
.page-doc .doc-toc a:focus-visible {
  color: var(--text);
  border-left-color: var(--mint);
  background: rgba(61, 220, 151, 0.06);
}

.page-doc .doc-sheet {
  width: 100%;
  max-width: 75ch;
  padding: clamp(1.35rem, 2.6vw, 2.25rem) clamp(1.15rem, 2.4vw, 2.1rem) clamp(1.55rem, 3vw, 2.5rem);
  background:
    linear-gradient(180deg, rgba(61, 220, 151, 0.06), transparent 7.5rem),
    rgba(255, 255, 255, 0.045);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

.page-doc .doc-sheet::before {
  content: "";
  display: block;
  width: 2.6rem;
  height: 2px;
  margin-bottom: 1.15rem;
  background: linear-gradient(90deg, var(--mint), var(--cyan));
}

.page-doc h1.section-title {
  font-family: var(--display);
  font-size: clamp(1.55rem, 2.4vw, 2.05rem);
}

.page-doc h1.section-title::before {
  content: none;
  display: none;
}

.page-doc .section-intro {
  max-width: none;
  margin-top: 0.7rem;
  font-size: 1.02rem;
  line-height: 1.7;
}

.page-doc .doc-prose {
  max-width: 75ch;
  margin-top: 1.35rem;
  font-size: 1.02rem;
  line-height: 1.75;
}

.page-doc .doc-prose h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.55rem;
  margin: 1.65rem 0 0.55rem;
  padding: 0.15rem 0 0.15rem 0.75rem;
  border-left: 2px solid rgba(61, 220, 151, 0.75);
  font-size: 1.12rem;
  scroll-margin-top: 6.4rem;
}

.page-doc .doc-prose h3:first-child {
  margin-top: 0.15rem;
}

.page-doc .doc-num {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--mint);
}

.page-doc .doc-prose li::marker {
  color: var(--mint);
}

.page-doc .doc-prose a {
  font-weight: 500;
}

html.js-motion .page-doc [data-reveal] {
  opacity: 1;
  transform: none;
}

@media (min-width: 1041px) {
  .page-doc .doc-toc {
    position: sticky;
    top: 5.75rem;
    max-height: calc(100vh - 7.5rem);
    overflow: auto;
  }
}

@media (max-width: 1040px) {
  .page-doc .doc-layout {
    grid-template-columns: minmax(0, 75ch);
  }

  .page-doc .doc-toc ol {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.4rem;
    overflow-x: auto;
    padding: 0 0 0.35rem;
    scrollbar-width: thin;
  }

  .page-doc .doc-toc a {
    white-space: nowrap;
    border-left: 0;
    border-radius: 999px;
    border: 1px solid var(--hairline);
    background: rgba(255, 255, 255, 0.03);
  }

  .page-doc .doc-toc a:hover,
  .page-doc .doc-toc a:focus-visible {
    border-color: rgba(61, 220, 151, 0.55);
  }
}

@media (max-width: 720px) {
  .page-doc .doc-sheet {
    padding: 1.2rem 1.05rem 1.4rem;
  }

  .page-doc .doc-prose h3 {
    scroll-margin-top: 5.6rem;
  }
}
