/* ── Documentation Styles ── */

.docs-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: calc(100vh - 64px);
  margin-top: 64px;
}

/* ── Sidebar ── */
.docs-sidebar {
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
  background: var(--si-darker);
  border-right: 1px solid var(--si-border);
  padding: 24px 0;
}

.docs-sidebar::-webkit-scrollbar { width: 4px; }
.docs-sidebar::-webkit-scrollbar-thumb { background: var(--si-border); border-radius: 2px; }

.docs-search {
  padding: 0 16px;
  margin-bottom: 20px;
}
.docs-search input {
  width: 100%;
  padding: 10px 14px 10px 36px;
  background: var(--si-card);
  border: 1px solid var(--si-border);
  border-radius: 8px;
  color: var(--si-text);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}
.docs-search input:focus { border-color: var(--si-accent); }
.docs-search input::placeholder { color: var(--si-muted); }
.docs-search-icon {
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--si-muted);
  font-size: 13px;
  pointer-events: none;
}

.docs-nav-section {
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--si-muted);
  margin-top: 16px;
}

.docs-nav-link {
  display: block;
  padding: 6px 16px 6px 28px;
  font-size: 13px;
  color: var(--si-muted);
  text-decoration: none;
  transition: all 0.15s;
  border-left: 2px solid transparent;
}
.docs-nav-link:hover { color: var(--si-text); background: rgba(59,130,246,0.05); }
.docs-nav-link.active { color: var(--si-accent-light); border-left-color: var(--si-accent); background: rgba(59,130,246,0.05); }
.docs-nav-link.hidden { display: none; }

/* ── Content ── */
.docs-content {
  padding: 40px 60px 80px;
  max-width: 900px;
}

.docs-content h1 {
  font-size: 2.5rem;
  margin-bottom: 8px;
}
.docs-content h2 {
  font-size: 1.75rem;
  margin-top: 48px;
  margin-bottom: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--si-border);
}
.docs-content h2:first-of-type { border-top: none; margin-top: 32px; }
.docs-content h3 {
  font-size: 1.25rem;
  margin-top: 32px;
  margin-bottom: 12px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
}
.docs-content p {
  color: var(--si-muted);
  margin-bottom: 16px;
  line-height: 1.8;
}
.docs-content ul, .docs-content ol {
  color: var(--si-muted);
  margin-bottom: 16px;
  padding-left: 24px;
}
.docs-content li { margin-bottom: 8px; line-height: 1.7; }
.docs-content strong { color: var(--si-text); }
.docs-content code {
  background: var(--si-card);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--si-accent-light);
}
.docs-content pre {
  background: var(--si-darker);
  border: 1px solid var(--si-border);
  border-radius: 8px;
  padding: 16px 20px;
  overflow-x: auto;
  margin-bottom: 20px;
  font-size: 13px;
  line-height: 1.6;
}
.docs-content pre code {
  background: none;
  padding: 0;
  color: var(--si-green);
}
.docs-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 13px;
}
.docs-content th {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 2px solid var(--si-border);
  color: var(--si-muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.docs-content td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--si-border);
}

.docs-breadcrumb {
  font-size: 13px;
  color: var(--si-muted);
  margin-bottom: 8px;
}
.docs-breadcrumb a { color: var(--si-accent-light); }

.docs-callout {
  background: rgba(59,130,246,0.05);
  border: 1px solid rgba(59,130,246,0.15);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 20px;
  font-size: 14px;
}
.docs-callout.warning {
  background: rgba(245,158,11,0.05);
  border-color: rgba(245,158,11,0.15);
}

/* ── Search Results ── */
.search-no-results {
  padding: 16px;
  color: var(--si-muted);
  font-size: 13px;
  text-align: center;
  display: none;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { position: relative; top: 0; height: auto; border-right: none; border-bottom: 1px solid var(--si-border); }
  .docs-content { padding: 24px 20px 60px; }
}
