/* ================================================================
   AILANG Parse — Docs Page Layout
   Shared grid (sidebar + content), typography, and responsive rules
   Used by: all docs pages with sidebar navigation
   ================================================================ */

/* Grid layout */
.dp-docs-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: start;
}

/* Sidebar */
.dp-docs-sidebar {
  position: sticky;
  top: 72px;
  max-height: calc(100vh - 88px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.dp-docs-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dp-docs-sidebar a {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 6px;
  border-left: 2px solid transparent;
  transition: all 0.15s;
  line-height: 1.4;
}
.dp-docs-sidebar a:hover {
  color: var(--dp-blue);
  background: var(--dp-blue-faded);
  border-left-color: var(--dp-blue-border);
}
.dp-docs-sidebar a.active {
  color: var(--dp-blue);
  background: var(--dp-blue-faded);
  border-left-color: var(--dp-blue);
  font-weight: 600;
}

/* Content typography */
.dp-docs-content {
  min-width: 0;
}
.dp-docs-content h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 48px 0 16px;
  padding-top: 16px;
  border-top: 2px solid var(--border);
  letter-spacing: -0.5px;
}
.dp-docs-content h2:first-child {
  margin-top: 0;
  border-top: none;
  padding-top: 0;
}
.dp-docs-content h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 28px 0 10px;
  letter-spacing: -0.2px;
}
.dp-docs-content p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 14px;
}
.dp-docs-content ul, .dp-docs-content ol {
  margin: 0 0 16px 20px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}
.dp-docs-content li { margin-bottom: 4px; }
.dp-docs-content code:not([class*="language-"]) {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--bg-input);
  color: var(--dp-blue);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.dp-docs-content pre {
  margin: 0 0 20px;
  border-radius: var(--radius);
  border: 1px solid rgba(0, 179, 122, 0.1);
}
.dp-docs-content pre code {
  font-size: 13px;
  line-height: 1.7;
}

/* Responsive */
@media (max-width: 900px) {
  .dp-docs-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .dp-docs-sidebar {
    position: static;
    max-height: none;
    padding: 0 0 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
  }
  .dp-docs-sidebar nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }
  .dp-docs-sidebar a {
    border-left: none;
    border-bottom: 2px solid transparent;
    padding: 6px 12px;
    font-size: 11px;
  }
  .dp-docs-sidebar a.active {
    border-left: none;
    border-bottom-color: var(--dp-blue);
  }
}
