/* ===== DOCS PAGE ===== */
.docs {
  max-width: 1240px; margin: 0 auto; padding: 36px 24px 90px;
  display: grid; grid-template-columns: 250px 1fr; gap: 48px; align-items: start;
}

/* ---- Sidebar / table of contents ---- */
.docs__sidebar { position: sticky; top: 88px; max-height: calc(100vh - 108px); overflow-y: auto; }
.docs__toggle { display: none; }
.docs__toc-title {
  font-size: .76rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted-2); margin-bottom: 12px; padding-left: 12px;
}
.docs__toc { display: flex; flex-direction: column; gap: 1px; list-style: none; }
.docs__toc a {
  display: block; padding: 7px 12px; border-radius: 8px; border-left: 2px solid transparent;
  color: var(--muted); font-size: .9rem; line-height: 1.3;
  transition: color .15s, background .15s, border-color .15s;
}
.docs__toc a:hover { color: var(--text); background: rgba(255,255,255,.03); }
.docs__toc a.is-active { color: var(--lime); border-left-color: var(--lime); background: rgba(182,255,60,.06); }

/* ---- Main column ---- */
.docs__main { min-width: 0; }
.doc-hero { padding-bottom: 22px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.doc-hero h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -.02em; margin: 8px 0 14px; }
.doc-hero p { color: var(--muted); font-size: 1.05rem; line-height: 1.7; max-width: 720px; }
.doc-hero p + p { margin-top: 12px; }

/* ---- Content typography ---- */
.doc-content { min-width: 0; }
.doc-section { padding-top: 30px; margin-top: 34px; border-top: 1px solid var(--line); }
.doc-section:first-child { border-top: 0; margin-top: 18px; padding-top: 0; }
.doc-content h2 { font-size: clamp(1.55rem, 3vw, 2.05rem); letter-spacing: -.01em; margin-bottom: 18px; scroll-margin-top: 88px; }
.doc-content h3 { font-size: 1.15rem; margin: 28px 0 10px; color: var(--text); }
.doc-content p { color: var(--muted); line-height: 1.75; margin-bottom: 14px; }
.doc-content strong { color: var(--text); }
.doc-content a { color: var(--lime); }
.doc-content ul, .doc-content ol { color: var(--muted); line-height: 1.7; margin: 0 0 16px; padding-left: 22px; }
.doc-content li { margin-bottom: 7px; }
.doc-content ul { list-style: disc; }
.doc-content ol { list-style: decimal; }
.doc-content li > ul, .doc-content li > ol { margin: 8px 0 0; }

/* inline code */
.doc-content code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .85em;
  background: rgba(255,255,255,.06); border: 1px solid var(--line); border-radius: 5px;
  padding: 1px 6px; color: #e6c98a;
}

/* code blocks */
.doc-content pre {
  background: #0a1320; border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 18px; overflow-x: auto; margin: 0 0 18px;
}
.doc-content pre code { background: none; border: 0; padding: 0; color: #cfe3ff; font-size: .85rem; line-height: 1.6; white-space: pre; }

/* tables */
.doc-table { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--line); border-radius: 12px; }
.doc-table table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 480px; }
.doc-table th, .doc-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc-table thead th { background: rgba(255,255,255,.03); color: var(--text); font-weight: 600; white-space: nowrap; }
.doc-table tbody tr:last-child td { border-bottom: 0; }
.doc-table td { color: var(--muted); }

/* callouts */
.doc-callout {
  background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--blue);
  border-radius: 10px; padding: 14px 16px; margin: 0 0 18px; color: var(--muted); line-height: 1.65;
}
.doc-callout p { margin: 0; }
.doc-callout p + p { margin-top: 8px; }
.doc-callout strong { color: var(--text); }
.doc-callout--glance { border-left-color: var(--lime); background: rgba(182,255,60,.05); }
.doc-callout--glance strong { color: var(--lime); }
.doc-callout--warn { border-left-color: #ffc44d; background: rgba(255,196,77,.05); }
.doc-callout--warn strong { color: #ffc44d; }

/* ---- Responsive ---- */
@media (max-width: 980px) {
  .docs { grid-template-columns: 1fr; gap: 0; padding-top: 24px; }
  .docs__sidebar {
    position: static; max-height: none; overflow: visible; margin-bottom: 26px;
    border: 1px solid var(--line); border-radius: 12px; background: var(--panel);
  }
  .docs__toggle {
    display: flex; align-items: center; justify-content: space-between; width: 100%;
    padding: 14px 16px; background: none; border: 0; color: var(--text); font-weight: 600;
    cursor: pointer; font-size: .95rem;
  }
  .docs__toggle svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
  .docs__sidebar.is-open .docs__toggle svg { transform: rotate(180deg); }
  .docs__nav { display: none; padding: 0 10px 14px; }
  .docs__sidebar.is-open .docs__nav { display: block; }
  .docs__toc-title { display: none; }
}
