/* ==========================================================================
   Splitter — documentation page layout.
   styles.css supplies the design tokens + shared components (buttons, nav,
   code blocks, notes, cards); this file only adds what's specific to a
   two-column docs page: the sidebar, scroll-spy states and reference tables.
   ========================================================================== */

.docs-header { padding: 140px 0 36px; border-bottom: 1px solid var(--line); }
.docs-header .eyebrow { margin-bottom: 12px; }
.docs-header h1 {
  font-size: clamp(2rem, 1.6rem + 1.6vw, 2.85rem);
  line-height: 1.08; letter-spacing: -.03em; font-weight: 820; color: #fff;
}
.docs-header p { margin-top: 14px; color: var(--muted); font-size: 1rem; max-width: 40rem; }

.docs-shell {
  display: grid; grid-template-columns: 232px 1fr; gap: 56px;
  padding: 44px 0 110px; align-items: start;
}

/* --------------------------------------------------------------- sidebar */
.docs-sidebar {
  position: sticky; top: 86px;
  max-height: calc(100vh - 106px); overflow-y: auto;
  padding-right: 10px; padding-bottom: 20px;
  scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
.docs-sidebar::-webkit-scrollbar { width: 5px; }
.docs-sidebar::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 3px; }

.docs-nav-group { margin-bottom: 24px; }
.docs-nav-label {
  font-family: var(--mono); font-size: .66rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--dim); margin-bottom: 9px; padding-left: 11px;
}
.docs-nav-group ul { list-style: none; display: grid; gap: 1px; }
.docs-nav-group a {
  display: block; font-size: .83rem; color: var(--muted); padding: 6px 11px;
  border-radius: var(--r); border-left: 2px solid transparent;
  transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}
.docs-nav-group a:hover { color: #fff; background: rgba(148, 163, 184, .05); }
.docs-nav-group a.active {
  color: var(--em-2); border-left-color: var(--em-2);
  background: rgba(52, 211, 153, .07); font-weight: 600;
}

.docs-toc-toggle {
  display: none; width: 100%; align-items: center; justify-content: space-between;
  font-family: var(--mono); font-size: .82rem; font-weight: 600; color: var(--text);
  padding: 12px 14px; margin-bottom: 18px;
  border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--panel);
}
.docs-toc-toggle svg { width: 16px; height: 16px; transition: transform .25s var(--ease); color: var(--em-2); }
.docs-toc-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

/* --------------------------------------------------------------- content */
.docs-content { min-width: 0; max-width: 760px; }

.docs-section { scroll-margin-top: 92px; }
.docs-section + .docs-section { margin-top: 60px; padding-top: 36px; border-top: 1px solid var(--line); }

.docs-section .eyebrow { margin-bottom: 10px; }
.docs-section h2 {
  font-size: clamp(1.4rem, 1.2rem + .7vw, 1.7rem);
  letter-spacing: -.025em; font-weight: 780; color: #fff;
}
.docs-section h3 {
  font-size: 1.06rem; font-weight: 700; color: #fff;
  margin: 30px 0 10px; letter-spacing: -.015em;
}
.docs-section h3:first-of-type { margin-top: 26px; }
.docs-section > p, .docs-section .docs-body p { color: var(--muted); font-size: .95rem; margin: 14px 0; }
.docs-section ul, .docs-section ol {
  color: var(--muted); font-size: .93rem; padding-left: 1.25em; display: grid; gap: 8px; margin: 14px 0;
}
.docs-section li::marker { color: var(--em-2); }
.docs-section .code { margin: 14px 0; }
.docs-section .note { margin: 20px 0; }

.docs-lede { font-size: .95rem; color: var(--muted); margin-top: 12px; }

/* code block copy button — reuses .copy's visual language, injected by docs.js */
.code-wrap { position: relative; }
.code-wrap .copy { position: absolute; top: 8px; right: 8px; padding: 6px 9px; font-size: .68rem; }
.code-wrap .copy svg { width: 12px; height: 12px; }

/* ------------------------------------------------------------------ table */
.dtable-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: var(--r-lg); }
.dtable { width: 100%; border-collapse: collapse; font-size: .82rem; min-width: 520px; }
.dtable th, .dtable td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.dtable thead th {
  font-family: var(--mono); text-transform: uppercase; letter-spacing: .06em;
  font-size: .66rem; color: var(--dim); background: rgba(148, 163, 184, .03);
}
.dtable tbody tr:last-child td { border-bottom: 0; }
.dtable td { color: var(--muted); }
.dtable td code { white-space: nowrap; }
.dtable .m { font-family: var(--mono); font-size: .74rem; font-weight: 700; }
.dtable .m.get    { color: var(--em-2); }
.dtable .m.post   { color: #7dd3fc; }
.dtable .m.delete { color: var(--danger); }

/* --------------------------------------------------------------- callouts */
.docs-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 16px 0; }
.mini-card {
  padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel);
}
.mini-card h4 { font-size: .88rem; font-weight: 700; color: #fff; margin-bottom: 6px; }
.mini-card p { font-size: .84rem; color: var(--muted); margin: 0; }

/* --------------------------------------------------------------- next/prev */
.docs-footer-nav {
  margin-top: 80px; padding-top: 28px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}

/* --------------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .docs-shell { grid-template-columns: 1fr; gap: 0; }
  .docs-toc-toggle { display: flex; }
  .docs-sidebar {
    position: static; max-height: 0; overflow: hidden; padding: 0;
    transition: max-height .3s var(--ease);
  }
  .docs-sidebar.open { max-height: 1400px; padding-bottom: 18px; }
  .docs-content { max-width: none; }
}

@media (max-width: 760px) {
  .docs-header { padding: 116px 0 28px; }
  .docs-grid-2 { grid-template-columns: 1fr; }
}
