/* Docs layout: sticky sidebar + readable content column. */
.docs-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.docs-sidebar {
  position: sticky;
  top: 74px;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  padding-right: 0.5rem;
}
.docs-nav-group {
  margin-bottom: 1.2rem;
}
.docs-nav-section {
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
  margin: 0 0 0.4rem;
}
.docs-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.docs-sidebar li a {
  display: block;
  padding: 0.28rem 0.6rem;
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.92rem;
  border-left: 2px solid transparent;
}
.docs-sidebar li a:hover {
  color: var(--text);
  text-decoration: none;
  background: var(--surface-2);
}
.docs-sidebar li a.active {
  color: var(--brand);
  border-left-color: var(--brand);
  font-weight: 600;
}

/* Content column typography. */
.docs-content {
  min-width: 0;
}
.doc-eyebrow {
  color: var(--brand);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.2rem;
}
.docs-content h1 {
  font-size: 2rem;
  margin: 0 0 1rem;
}
.docs-content h2 {
  font-size: 1.4rem;
  margin: 2rem 0 0.8rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}
.docs-content h3 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.6rem;
}
.docs-content p,
.docs-content li {
  color: var(--text);
}
.docs-content a {
  text-decoration: underline;
}

/* Mobile: collapse the sidebar behind a toggle. */
.sidebar-toggle {
  display: none;
}
@media (max-width: 820px) {
  .docs-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .sidebar-toggle {
    display: inline-block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem 0.9rem;
    cursor: pointer;
    font-weight: 600;
    width: max-content;
  }
  .docs-sidebar {
    position: static;
    max-height: none;
    display: none;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem;
  }
  .sidebar-toggle-cb:checked ~ .docs-sidebar {
    display: block;
  }
}
