/* Docs layout: wider container + left sidebar. Loads on top of /style.css. */
.wrap.wide { max-width: 1040px; }

.docs {
  display: flex;
  gap: 44px;
  align-items: flex-start;
}

.sidebar {
  flex: 0 0 196px;
  position: sticky;
  top: 24px;
  font-size: 14px;
  line-height: 1.5;
}
.sidebar h4 {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 20px 0 6px;
}
.sidebar h4:first-child { margin-top: 0; }
.sidebar a {
  display: block;
  padding: 3px 0;
  color: var(--muted);
}
.sidebar a:hover { color: var(--ink); text-decoration: none; }
.sidebar a.active { color: var(--accent-dark); font-weight: 600; }

.docs-main { flex: 1 1 auto; min-width: 0; }
.docs-main h1 { margin-bottom: 6px; }
.docs-main table { border-collapse: collapse; width: 100%; margin: 16px 0; font-size: 15px; }
.docs-main th, .docs-main td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.docs-main th { color: var(--muted); font-weight: 600; }
.docs-main td code { white-space: nowrap; }

/* section anchors */
.docs-main h2 { scroll-margin-top: 20px; }
.docs-main h2 a.anchor, .docs-main h3 a.anchor { color: var(--border); margin-left: 8px; font-weight: 400; }
.docs-main h2:hover a.anchor { color: var(--accent); }

@media (max-width: 740px) {
  /* Stacked layout. align-items must reset from the desktop 'flex-start' to
     'stretch' so .docs-main fills the column instead of shrink-wrapping to its
     widest code line (which would overflow the viewport and zoom the page out). */
  .docs { flex-direction: column; gap: 8px; align-items: stretch; }
  .sidebar { position: static; flex-basis: auto; margin-bottom: 20px; }
}
