/* ==========================================================================
   VirtualID — Documentation-site layout layer
   Extends the shared design system (assets/styles.css). Uses ONLY the shared
   :root tokens (--brand, --fg, --border, ...) — no raw hex, no new accents.
   This file adds the docs shell (sidebar + content) that the marketing
   styles.css does not need. Keep design decisions here token-based so the
   docs site stays visually identical to the rest of VirtualID.
   ========================================================================== */

.docs-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 40px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px 20px 80px;
  align-items: start;
}

/* Sidebar */
.docs-nav {
  position: sticky;
  top: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
  padding: 18px 16px;
  font-size: 0.92rem;
}
.docs-nav h4 {
  margin: 16px 0 6px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-faint);
  font-weight: 700;
}
.docs-nav h4:first-child { margin-top: 0; }
.docs-nav a {
  display: block;
  padding: 5px 10px;
  border-radius: var(--radius);
  color: var(--fg-soft);
  text-decoration: none;
  line-height: 1.4;
}
.docs-nav a:hover { background: var(--bg-inset); color: var(--fg); }
.docs-nav a.active {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}

/* Content column */
.docs-content { min-width: 0; }
.docs-content h1 { margin-top: 0; }
.docs-content h2 {
  margin-top: 44px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.docs-content h3 { margin-top: 28px; }
.docs-content p, .docs-content li { color: var(--fg-soft); }
.docs-content code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--bg-inset);
  padding: 1px 5px;
  border-radius: 6px;
  color: var(--fg);
}
.docs-content pre {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--fg);
}
.docs-content pre code { background: none; padding: 0; }
.docs-content .table { margin: 16px 0; }

/* Breadcrumb + eyebrow */
.docs-crumb {
  font-size: 0.82rem;
  color: var(--fg-faint);
  margin-bottom: 6px;
}
.docs-crumb a { color: var(--fg-faint); text-decoration: none; }
.docs-crumb a:hover { color: var(--brand); }

/* Callouts */
.note, .warn-box, .deferred {
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin: 18px 0;
  font-size: 0.92rem;
}
.warn-box { border-left-color: var(--warn); }
.deferred { border-left-color: var(--fg-faint); }
.note strong, .warn-box strong, .deferred strong { color: var(--fg); }

/* Next/prev footer nav */
.docs-pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.docs-pager a {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  text-decoration: none;
  color: var(--fg);
}
.docs-pager a:hover { border-color: var(--brand); }
.docs-pager small { color: var(--fg-faint); display: block; }
.docs-pager .next { text-align: right; }

/* API-reference iframe/embed page */
.api-embed { width: 100%; height: calc(100vh - 60px); border: 0; }

@media (max-width: 860px) {
  .docs-shell { grid-template-columns: 1fr; gap: 20px; }
  .docs-nav { position: static; }
}
