.doc-intro {
  max-width: var(--reading-width);
  margin-bottom: 48px;
}

.doc-summary {
  color: var(--text-muted);
  font-size: var(--size-h3);
  line-height: 1.7;
}

.doc-layout {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, var(--reading-width));
  align-items: start;
  justify-content: space-between;
  gap: 48px;
}

.doc-layout > .toc {
  flex-direction: column;
  align-items: stretch;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}

.doc-layout > .toc a {
  justify-content: flex-start;
}

.doc-body > section {
  scroll-margin-top: 28px;
}

.doc-body > section + section {
  margin-top: 64px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.doc-body > section > h2:first-child {
  margin-top: 0;
}

.doc-body .faq-answer {
  overflow-wrap: anywhere;
}

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

  .doc-layout > .toc {
    position: static;
    flex-direction: row;
    max-height: none;
    overflow-y: visible;
  }

  .doc-body {
    width: 100%;
    max-width: var(--reading-width);
    margin-inline: auto;
  }
}

@media (max-width: 640px) {
  .doc-intro {
    margin-bottom: 32px;
  }

  .doc-summary {
    font-size: var(--size-body);
  }

  .doc-layout {
    gap: 30px;
  }

  .doc-body > section + section {
    margin-top: 44px;
  }
}