/* Documentation site layout */
.docs-body {
  padding-top: 64px;
}

.docs-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: calc(100vh - 64px);
  max-width: 1280px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .docs-shell {
    grid-template-columns: 1fr;
  }
}

.docs-sidebar {
  position: sticky;
  top: 64px;
  align-self: start;
  height: calc(100vh - 64px);
  overflow-y: auto;
  padding: 24px 16px 48px 24px;
  border-right: 1px solid var(--border);
  background: var(--bg-secondary);
}

@media (max-width: 900px) {
  .docs-sidebar {
    position: relative;
    top: 0;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
  }
}

.docs-sidebar-title {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 12px;
  padding: 0 10px;
}

.docs-sidebar-group {
  margin-bottom: 20px;
}

.docs-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.docs-nav li {
  margin-bottom: 2px;
}

.docs-nav a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.docs-nav a:hover {
  color: var(--text);
  background: var(--glass);
}

.docs-nav a.is-active {
  color: var(--text);
  background: var(--accent-soft);
  border: 1px solid var(--border-accent);
  font-weight: 600;
}

.docs-main {
  padding: 32px 32px 80px;
  min-width: 0;
}

@media (max-width: 640px) {
  .docs-main {
    padding: 24px 20px 64px;
  }
}

.docs-breadcrumb {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.docs-breadcrumb a {
  color: var(--text-muted);
}

.docs-breadcrumb a:hover {
  color: var(--accent);
}

.docs-prose {
  max-width: 760px;
}

.docs-prose h1 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0 0 16px;
}

.docs-prose h2 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 40px 0 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

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

.docs-prose h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 28px 0 10px;
}

.docs-prose h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 20px 0 8px;
}

.docs-prose p,
.docs-prose li {
  color: var(--text-muted);
  line-height: 1.7;
}

.docs-prose p {
  margin: 0 0 16px;
}

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

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

.docs-prose ul,
.docs-prose ol {
  margin: 0 0 16px;
  padding-left: 1.4em;
}

.docs-prose li {
  margin-bottom: 6px;
}

.docs-prose li::marker {
  color: var(--accent);
}

.docs-prose blockquote {
  margin: 20px 0;
  padding: 12px 16px;
  border-left: 3px solid var(--accent);
  background: var(--glass);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-muted);
}

.docs-prose blockquote p:last-child {
  margin-bottom: 0;
}

.docs-prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

.docs-prose code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.15em 0.4em;
  border-radius: 6px;
  color: var(--text);
}

.docs-prose pre {
  margin: 16px 0 24px;
  padding: 16px 18px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
}

.docs-prose pre code {
  background: none;
  padding: 0;
  font-size: 0.8rem;
  line-height: 1.55;
  color: #c9d1d9;
}

.docs-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 0.88rem;
  display: block;
  overflow-x: auto;
}

.docs-prose th,
.docs-prose td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.docs-prose th {
  background: var(--bg-muted);
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}

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

.docs-prose td code {
  font-size: 0.78rem;
}

/* Docs hub (index) */
.docs-hub-hero {
  margin-bottom: 32px;
}

.docs-hub-hero h1 {
  margin-bottom: 12px;
}

.docs-hub-hero p {
  color: var(--text-muted);
  max-width: 640px;
  margin: 0;
}

.docs-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 28px;
}

@media (max-width: 700px) {
  .docs-card-grid {
    grid-template-columns: 1fr;
  }
}

.docs-card {
  display: block;
  padding: 20px 22px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, transform 0.2s;
}

.docs-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
  color: inherit;
}

.docs-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--text);
}

.docs-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.docs-card-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.docs-footer-note {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.docs-footer-note a {
  color: var(--accent);
}
