/* Docs layout: sticky sidebar + reading column */
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; padding-top: 40px; padding-bottom: 80px; }
.docs-side { position: sticky; top: 88px; align-self: start; max-height: calc(100vh - 104px); overflow-y: auto; }
.docs-toc summary { display: none; }
.docs-toc nav { display: flex; flex-direction: column; gap: 2px; }
.toc-group { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 6px; }
.toc-group:first-child { margin-top: 0; }
.docs-toc a { color: var(--text-2); text-decoration: none; font-size: 14px; padding: 5px 10px; border-radius: 8px; border-left: 2px solid transparent; }
.docs-toc a:hover { background: var(--bg-alt); color: var(--text); }
.docs-toc a.active { color: var(--text); font-weight: 500; background: var(--bg-alt); }

.docs-main { min-width: 0; max-width: 780px; }
.docs-main section { padding: 8px 0 36px; scroll-margin-top: 84px; }
.docs-main section + section { border-top: 1px solid var(--border); padding-top: 36px; }
.docs-main h1 { font-size: clamp(34px, 5vw, 48px); line-height: 1.1; margin-bottom: 16px; }
.docs-main h2 { font-size: 28px; margin-bottom: 14px; }
.docs-main h3 { font-size: 19px; margin: 28px 0 10px; }
.docs-main p { color: var(--text-2); margin: 0 0 14px; }
.docs-main a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--border-strong); }
.docs-main a:hover { text-decoration-color: var(--text); }
.docs-lead { font-size: 18px; color: var(--muted) !important; }
.docs-main p code, .docs-main li code, .docs-main td code {
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; font-size: 13px; white-space: nowrap;
}
.docs-main .block { margin: 0 0 16px; }
.docs-list { margin: 0 0 14px; padding-left: 20px; display: grid; gap: 8px; color: var(--text-2); }
.table-wrap { overflow-x: auto; margin: 0 0 16px; border: 1px solid var(--border); border-radius: 10px; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table-wrap th { text-align: left; font-weight: 600; background: var(--bg-alt); color: var(--text); }
.table-wrap th, .table-wrap td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--text-2); }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap td:first-child { white-space: nowrap; }
.note { border: 1px solid var(--border); border-left: 3px solid var(--text); background: var(--bg-alt); border-radius: 8px; padding: 12px 16px; }
.docs-foot { display: flex; gap: 10px; color: var(--muted); font-size: 14px; padding-top: 24px; border-top: 1px solid var(--border); }
.docs-foot a { color: var(--muted); }

@media (max-width: 900px) {
  .docs { grid-template-columns: 1fr; gap: 16px; padding-top: 20px; }
  .docs-side { position: static; max-height: none; }
  .docs-toc { border: 1px solid var(--border); border-radius: 10px; padding: 4px 14px; }
  .docs-toc summary { display: block; cursor: pointer; padding: 10px 0; font-weight: 500; }
  .docs-toc nav { padding-bottom: 12px; }
  .table-wrap td:first-child { white-space: normal; }
  .docs-main p code, .docs-main li code, .docs-main td code { white-space: normal; word-break: break-word; }
}
