/* Docs layout — sidebar + content. Dark theme, matching the splash.
   Inherits tokens, fonts, the sticky .nav and the aurora from style.css. */

.docs-body { background: var(--bg); color: var(--fg-soft); }

/* ─── Shell ─────────────────────────────────────────────────────────── */
.docs-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 0;
  max-width: var(--max);
  margin: 0 auto;
  min-height: calc(100vh - var(--nav-h));
}

/* ─── Sidebar ───────────────────────────────────────────────────────── */
.docs-sidebar {
  position: sticky;
  top: var(--nav-h);
  align-self: start;
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  padding: 28px 20px 60px 24px;
  border-right: 1px solid var(--line);
  font-family: var(--font-sans);
  font-size: 13px;
}
.docs-sidebar::-webkit-scrollbar { width: 8px; }
.docs-sidebar::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; }

.docs-sidebar-section { margin-bottom: 18px; }
.docs-sidebar-section-title {
  display: block; font-family: var(--font-mono);
  font-weight: 500; text-transform: uppercase; letter-spacing: 0.12em;
  font-size: 11px; color: var(--fg-dim);
  padding: 4px 8px; margin-bottom: 6px;
}
.docs-sidebar-section-title:hover { color: var(--fg-soft); }
.docs-sidebar-section-title.active { color: var(--orange); }

.docs-sidebar-list, .docs-sidebar-nested { list-style: none; margin: 0; padding: 0; }
.docs-sidebar-nested { margin-left: 14px; padding-left: 10px; border-left: 1px solid var(--line); margin-top: 4px; }

.docs-sidebar-link {
  display: block; padding: 6px 8px; border-radius: 7px;
  color: var(--fg-mut); line-height: 1.4;
  transition: background .12s, color .12s;
}
.docs-sidebar-link:hover { background: rgba(255,255,255,0.04); color: var(--fg); }
.docs-sidebar-link.active { background: rgba(255,138,61,0.12); color: var(--fg); font-weight: 600; box-shadow: inset 0 0 0 1px rgba(255,138,61,0.25); }
.docs-sidebar > .docs-sidebar-link { font-weight: 600; margin-bottom: 4px; color: var(--fg-soft); }

/* ─── Main / article ────────────────────────────────────────────────── */
.docs-main { padding: 52px 64px 96px; max-width: 840px; width: 100%; }
.docs-article { font-family: var(--font-sans); font-size: 15.5px; line-height: 1.75; color: var(--fg-soft); }
.docs-article > *:first-child { margin-top: 0; }

.docs-article h1 { font-family: var(--font-serif); font-weight: 400; font-size: 46px; line-height: 1.08; letter-spacing: -0.01em; margin: 0 0 24px; color: var(--fg); }
.docs-article h2 { font-family: var(--font-serif); font-weight: 400; font-size: 30px; line-height: 1.2; margin: 52px 0 16px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--fg); letter-spacing: -0.01em; }
.docs-article h3 { font-weight: 600; font-size: 18px; margin: 34px 0 10px; color: var(--fg); letter-spacing: -0.01em; }
.docs-article h4 { font-weight: 600; font-size: 15px; margin: 24px 0 8px; color: var(--fg); }
.docs-article p { margin: 0 0 16px; }
.docs-article strong { font-weight: 600; color: var(--fg); }
.docs-article em { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--fg-soft); font-family: var(--font-serif); }

.docs-article a {
  color: var(--orange-soft); text-decoration: none;
  border-bottom: 1px solid rgba(255,138,61,0.3); transition: color .12s, border-color .12s;
}
.docs-article a:hover { color: var(--orange); border-bottom-color: var(--orange); }

.docs-article ul, .docs-article ol { margin: 0 0 20px; padding-left: 24px; }
.docs-article li { margin-bottom: 6px; }
.docs-article li::marker { color: var(--fg-dim); }
.docs-article li > ul, .docs-article li > ol { margin-top: 6px; margin-bottom: 6px; }

.docs-article code {
  font-family: var(--font-mono); font-size: 0.88em;
  padding: 2px 6px; background: rgba(255,255,255,0.06);
  border: 1px solid var(--line); border-radius: 5px; color: var(--orange-soft);
}
.docs-article pre {
  margin: 0 0 24px; padding: 16px 18px;
  background: #0A0B0C; border: 1px solid var(--line-2);
  color: #E8E8EA; border-radius: 12px; overflow-x: auto;
  font-size: 13px; line-height: 1.6;
}
.docs-article pre code { padding: 0; background: transparent; border: 0; color: inherit; font-size: inherit; }

.docs-article blockquote {
  margin: 20px 0; padding: 14px 18px;
  border-left: 3px solid var(--orange); background: rgba(255,138,61,0.07);
  border-radius: 0 8px 8px 0; color: var(--fg-soft);
}
.docs-article blockquote > *:first-child { margin-top: 0; }
.docs-article blockquote > *:last-child { margin-bottom: 0; }

.docs-article table { width: 100%; border-collapse: collapse; margin: 0 0 24px; font-size: 13.5px; }
.docs-article th, .docs-article td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.docs-article th {
  font-weight: 600; font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-mut);
  background: rgba(255,255,255,0.03); border-bottom: 1px solid var(--line-2);
}
.docs-article td { color: var(--fg-soft); }
.docs-article tr:last-child td { border-bottom: 0; }

.docs-article hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.docs-article input[type="checkbox"] { margin-right: 6px; accent-color: var(--orange); }

/* ─── Article footer ────────────────────────────────────────────────── */
.docs-footer {
  margin-top: 56px; padding-top: 18px; border-top: 1px solid var(--line);
  display: flex; gap: 12px; align-items: center;
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-dim);
}
.docs-status { padding: 2px 8px; border-radius: 999px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; font-size: 9px; }
.docs-status-stable     { background: rgba(91,208,139,0.14); color: #6FE0A0; }
.docs-status-outline    { background: rgba(255,138,61,0.15); color: var(--orange-soft); }
.docs-status-draft      { background: rgba(110,107,255,0.18); color: var(--indigo-soft); }
.docs-status-deprecated { background: rgba(255,255,255,0.08); color: var(--fg-mut); }

/* ─── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .docs-shell { grid-template-columns: 1fr; }
  .docs-sidebar {
    position: static; height: auto; width: 100%;
    border-right: 0; border-bottom: 1px solid var(--line); padding: 20px 24px;
  }
  .docs-main { padding: 32px 24px 64px; }
  .docs-article h1 { font-size: 36px; }
  .docs-article h2 { font-size: 25px; }
}
