/* ============================================
   DOCS — Sidebar + Content Layout
   ============================================ */

.docs-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 24px 80px;
  gap: 48px;
  min-height: 100vh;
}

/* Sidebar */
.docs-sidebar {
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding-right: 16px;
  border-right: 1px solid var(--border);
}

.docs-sidebar::-webkit-scrollbar {
  width: 4px;
}

.docs-sidebar::-webkit-scrollbar-thumb {
  background: var(--bg-3);
  border-radius: 2px;
}

.docs-nav-group {
  margin-bottom: 28px;
}

.docs-nav-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 10px;
  padding-left: 12px;
}

.docs-nav-link {
  display: block;
  font-size: 13.5px;
  color: var(--text-2);
  padding: 6px 12px;
  border-radius: 6px;
  border-left: 2px solid transparent;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  margin-bottom: 1px;
}

.docs-nav-link:hover {
  color: var(--text);
  background: var(--bg-2);
}

.docs-nav-link.active {
  color: var(--accent);
  background: var(--accent-dim);
  border-left-color: var(--accent);
}

/* Content area */
.docs-content {
  max-width: 720px;
  padding-bottom: 120px;
}

.docs-content h1 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.docs-content > .docs-subtitle {
  font-size: 18px;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 48px;
}

.docs-content h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 56px;
  margin-bottom: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  scroll-margin-top: 100px;
}

.docs-content h2:first-of-type {
  margin-top: 0;
  border-top: none;
  padding-top: 0;
}

.docs-content h3 {
  font-size: 18px;
  font-weight: 700;
  margin-top: 36px;
  margin-bottom: 12px;
  scroll-margin-top: 100px;
}

.docs-content p {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 16px;
}

.docs-content ul,
.docs-content ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.docs-content li {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 6px;
}

.docs-content code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  color: #60a5fa;
}

.docs-content pre {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 20px;
  overflow-x: auto;
}

.docs-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-2);
}

.docs-content strong {
  color: var(--text);
  font-weight: 600;
}

.docs-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.docs-content a:hover {
  color: #60a5fa;
}

/* Heading anchors */
.heading-anchor {
  color: var(--text-3);
  text-decoration: none;
  margin-left: 8px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.docs-content h2:hover .heading-anchor,
.docs-content h3:hover .heading-anchor {
  opacity: 1;
}

/* Callout boxes */
.docs-callout {
  background: var(--accent-dim);
  border: 1px solid rgba(59,130,246,0.3);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 20px;
}

.docs-callout p {
  color: var(--text);
  margin-bottom: 0;
  font-size: 14px;
}

.docs-callout strong {
  color: var(--accent);
}

/* Responsive */
@media (max-width: 900px) {
  .docs-layout {
    grid-template-columns: 1fr;
    padding-top: 80px;
    gap: 32px;
  }

  .docs-sidebar {
    position: static;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding-right: 0;
    padding-bottom: 24px;
    display: flex;
    gap: 16px;
    overflow-x: auto;
    flex-wrap: wrap;
  }

  .docs-nav-group {
    margin-bottom: 0;
  }

  .docs-nav-link {
    white-space: nowrap;
    border-left: none;
    border-bottom: 2px solid transparent;
  }

  .docs-nav-link.active {
    border-left-color: transparent;
    border-bottom-color: var(--accent);
  }
}
