/* ── Docs Header ── */
.docs-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  height: 60px;
}

.docs-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 1.5rem;
}

.docs-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-text);
  font-weight: 600;
  font-size: 1.125rem;
  text-decoration: none;
}

.docs-logo:hover { text-decoration: none; }

.docs-logo-img {
  width: 24px;
  height: auto;
}

.docs-header-nav a {
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  opacity: 0.6;
  transition: opacity 0.15s;
}

.docs-header-nav a:hover {
  opacity: 1;
  text-decoration: none;
}

.docs-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-text);
  cursor: pointer;
  padding: 0.5rem;
}

.docs-nav-home {
  display: block;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
}

.docs-nav-home:hover {
  color: var(--color-text);
  text-decoration: none;
}

/* ── Docs Layout ── */
.docs-layout {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  min-height: calc(100vh - 60px);
}

/* ── Sidebar ── */
.docs-sidebar {
  width: 260px;
  flex-shrink: 0;
  padding: 2rem 1.5rem;
  border-right: 1px solid var(--color-border);
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
}

.docs-nav-group {
  margin-bottom: 1.5rem;
}

.docs-nav-group h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.docs-nav-group a {
  display: block;
  padding: 0.35rem 0.75rem;
  margin: 0.1rem 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}

.docs-nav-group a:hover {
  color: var(--color-text);
  background: var(--color-surface);
  text-decoration: none;
}

.docs-nav-group a.active {
  color: var(--color-accent);
  background: rgba(25, 141, 160, 0.1);
}

/* ── Main Content ── */
.docs-main {
  flex: 1;
  min-width: 0;
  padding: 2.5rem 3rem;
}

.docs-content {
  max-width: 780px;
}

/* ── Typography ── */
.docs-content h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.docs-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.docs-content h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.docs-content p {
  margin-bottom: 1rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.docs-content p strong { color: var(--color-text); }

.docs-content ul, .docs-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.docs-content li {
  margin-bottom: 0.25rem;
  color: var(--color-text-muted);
}

.docs-content code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--color-surface);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--color-border);
}

.docs-content pre {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.docs-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.85rem;
}

.docs-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.docs-content th, .docs-content td {
  text-align: left;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--color-border);
}

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

.docs-content td {
  color: var(--color-text-muted);
}

.docs-content blockquote {
  border-left: 3px solid var(--color-accent);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  background: rgba(25, 141, 160, 0.05);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.docs-content blockquote p {
  margin-bottom: 0;
}

.docs-content hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2rem 0;
}

/* ── Hero / Intro ── */
.docs-hero {
  margin-bottom: 2.5rem;
}

.docs-hero p {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  max-width: 600px;
}

/* ── Feature Cards (for overview page) ── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  transition: border-color 0.15s;
}

.feature-card:hover {
  border-color: var(--color-accent);
}

.feature-card h4 {
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.feature-card p {
  font-size: 0.8rem;
  margin: 0;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .docs-sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    bottom: 0;
    width: 280px;
    background: var(--color-bg);
    z-index: 99;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    border-right: 1px solid var(--color-border);
  }

  .nav-open .docs-sidebar {
    transform: translateX(0);
  }

  .docs-menu-toggle {
    display: block;
  }

  .docs-main {
    padding: 1.5rem;
  }

  .docs-content h1 { font-size: 1.75rem; }
  .docs-content h2 { font-size: 1.25rem; }
}
