/* Documentation pages only (/docs/...): a sidebar beside the content and an
   in-page table of contents. Tokens only; see docs/wiki/docs-section.md. */
.docs-layout {
  display: grid;
  grid-template-columns: 13.5rem minmax(0, 1fr);
  gap: var(--s-7);
  align-items: start;
  padding-block: var(--s-7) var(--s-8);
}
.docs-nav {
  position: sticky;
  top: calc(var(--header-h) + var(--s-4));
  font-size: var(--text-sm);
}
.docs-nav__title {
  margin: 0 0 var(--s-3);
  color: var(--fg-muted);
  font-size: var(--text-xs);
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.docs-nav ul { margin: 0; padding: 0; list-style: none; }
.docs-nav li + li { margin-top: var(--s-1); }
.docs-nav a {
  display: block;
  padding: var(--s-2) var(--s-3);
  border-radius: var(--radius);
  color: var(--fg);
  font-weight: 500;
  text-decoration: none;
}
.docs-nav a:hover { background: var(--accent-soft); color: var(--accent-soft-fg); }
.docs-nav a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent-soft-fg);
  font-weight: 650;
}
.docs-content { min-width: 0; }
.docs-content > * + * { margin-top: var(--s-5); }
.docs-content > section + section { margin-top: var(--s-7); }
.docs-content section > * + * { margin-top: var(--s-4); }
.docs-content :is(h2, h3)[id] { scroll-margin-top: calc(var(--header-h) + var(--s-5)); }
.docs-content h2 { margin-bottom: 0; }
.docs-content section > h3 { margin-top: var(--s-6); margin-bottom: 0; }
.docs-content p, .docs-content ul, .docs-content ol { margin-bottom: 0; }
.docs-content :is(p, ul, ol, dl):not(.feature-grid) { max-width: var(--measure); }
.docs-content pre, .docs-content .table-wrap, .docs-content .callout { margin-bottom: 0; }
.toc {
  padding: var(--s-4) var(--s-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  font-size: var(--text-sm);
}
.toc__title {
  margin: 0 0 var(--s-2);
  color: var(--fg-muted);
  font-size: var(--text-xs);
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.toc ol { margin: 0; padding-left: 1.25em; columns: 2; column-gap: var(--s-6); }
.toc li { break-inside: avoid; }
.step-list { padding-left: 1.25em; }
.step-list > li + li { margin-top: var(--s-2); }
.pager { display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: space-between; }
@media (max-width: 56em) {
  .docs-layout { grid-template-columns: minmax(0, 1fr); gap: var(--s-5); padding-block: var(--s-6) var(--s-7); }
  .docs-nav { position: static; padding: var(--s-3) var(--s-4); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
  .docs-nav ul { display: flex; flex-wrap: wrap; gap: var(--s-1); }
  .docs-nav li + li { margin-top: 0; }
}
@media (max-width: 40em) {
  .toc ol { columns: 1; }
}
