/* ── DOCS LAYOUT ── */
.docs-wrapper {
  display: flex;
  min-height: calc(100vh - 88px);
  padding-top: 88px;
}

/* ── SIDEBAR ── */
.docs-sidebar {
  width: 240px;
  flex-shrink: 0;
  position: sticky;
  top: 88px;
  height: calc(100vh - 88px);
  overflow-y: auto;
  padding: 1.5rem 1rem 2rem 1.5rem;
  border-right: 1px solid var(--border);
  background: var(--bg-off);
}
.docs-sidebar-group {
  margin-bottom: 1.5rem;
}
.docs-sidebar-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.5rem;
  padding-left: 0.5rem;
}
.docs-sidebar a {
  display: block;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}
.docs-sidebar a:hover {
  color: var(--text);
  background: var(--bg);
}
.docs-sidebar a.active {
  color: var(--accent);
  background: var(--accent-bg);
  font-weight: 600;
}

/* ── MOBILE SIDEBAR TOGGLE ── */
.docs-sidebar-toggle {
  display: none;
  position: fixed;
  top: 96px;
  left: 0.75rem;
  z-index: 50;
  background: var(--bg-off);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
}
.docs-sidebar-toggle:hover {
  color: var(--text);
  border-color: var(--accent);
}

/* ── CONTENT ── */
.docs-content {
  flex: 1;
  max-width: 800px;
  padding: 2rem 2.5rem 4rem;
}

/* ── TYPOGRAPHY ── */
.docs-content h1 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--accent);
  color: var(--text);
}
.docs-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}
.docs-content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.docs-content p {
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}
.docs-content strong {
  color: var(--text);
  font-weight: 600;
}
.docs-content a {
  color: var(--accent);
  text-decoration: none;
}
.docs-content a:hover {
  text-decoration: underline;
}
.docs-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* ── LISTS ── */
.docs-content ul, .docs-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}
.docs-content li {
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 0.25rem;
}
.docs-content li strong {
  color: var(--text);
}

/* ── TABLES ── */
.docs-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
}
.docs-content thead th {
  text-align: left;
  font-weight: 600;
  color: var(--text);
  padding: 0.5rem 0.75rem;
  border-bottom: 2px solid var(--border);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.docs-content tbody td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: top;
}
.docs-content tbody tr:hover {
  background: var(--bg-off);
}

/* ── CODE ── */
.docs-content code {
  font-family: 'SF Mono', 'Consolas', 'Liberation Mono', monospace;
  font-size: 0.82rem;
  background: var(--bg-off);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.15rem 0.35rem;
  color: var(--accent);
}
.docs-content pre {
  background: var(--dark);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
}
.docs-content pre code {
  background: none;
  border: none;
  padding: 0;
  color: rgba(255,255,255,0.8);
  font-size: 0.8rem;
  line-height: 1.6;
}

/* ── BLOCKQUOTES ── */
.docs-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.5rem 1rem;
  margin: 1rem 0;
  background: var(--bg-off);
  border-radius: 0 6px 6px 0;
}
.docs-content blockquote p {
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

/* ── SEE ALSO ── */
.docs-content p:last-child {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .docs-sidebar {
    display: none;
    position: fixed;
    top: 88px;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    z-index: 50;
    border-right: none;
    padding-bottom: 4rem;
  }
  .docs-sidebar.open {
    display: block;
  }
  .docs-sidebar-toggle {
    display: block;
  }
  .docs-content {
    margin-left: 0;
    padding: 3.5rem 1.5rem 4rem;
  }
}
