.docs-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 760px);
  gap: 64px;
  align-items: start;
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 40px 120px;
}
.docs-toc {
  position: sticky;
  top: 88px;
  padding: 8px 0;
}
.docs-toc p {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 12px;
}
.docs-toc a {
  display: block;
  padding: 6px 10px;
  margin: 0 -10px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  border-right: 2px solid transparent;
  transition: color 0.15s ease, background 0.15s ease;
}
.docs-toc a:hover {
  color: var(--blue-600);
  background: rgba(37, 99, 235, 0.06);
}
.docs-toc a.is-active {
  color: var(--blue-700);
  font-weight: 600;
  background: rgba(37, 99, 235, 0.1);
  border-right-color: var(--blue-600);
}
.docs-content h1 { margin: 0 0 12px; }
.docs-content .lede {
  font-size: 18px;
  color: var(--text-secondary);
  margin: 0 0 40px;
  max-width: 56ch;
}
.docs-content section {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}
.docs-content section:first-of-type { border-top: 0; padding-top: 0; }
.docs-content h2 { margin: 0 0 12px; }
.docs-content h3 { margin: 28px 0 8px; }
.docs-content p { color: var(--text-secondary); margin: 0 0 14px; }
.docs-content ul, .docs-content ol {
  color: var(--text-secondary);
  padding-inline-start: 20px;
  margin: 0 0 16px;
  line-height: 2;
}
.docs-content li + li { margin-top: 2px; }
.docs-content strong { color: var(--text-primary); font-weight: 600; }
.step-list { list-style: none; padding: 0; margin: 0 0 16px; }
.step-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
.step-list li:last-child { border-bottom: 0; }
.step-n {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--blue-100); color: var(--blue-700);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
}
.step-list b { color: var(--text-primary); display: block; margin-bottom: 4px; }
.callout {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  background: var(--bg-surface);
  margin: 16px 0 20px;
}
.callout.warn { border-color: #fde68a; background: #fffbeb; }
.callout.ok { border-color: #bbf7d0; background: #f0fdf4; }
.callout p { margin: 0; }
.code-wrap { position: relative; margin: 16px 0 24px; }
.code-wrap .code { margin: 0; padding-top: 48px; }
.copy-btn,
.code-wrap .copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  left: auto;
  inset-inline: auto;
  min-height: 32px;
  padding: 4px 12px;
  font-size: 12px;
  color: #fff;
  background: var(--blue-600);
  border-color: transparent;
}
.copy-btn:hover,
.code-wrap .copy-btn:hover {
  color: #fff;
  background: var(--blue-700);
}
.attr { color: #93c5fd; }
.str { color: #86efac; }
.kw { color: #c4b5fd; }
.cm { color: #94a3b8; }
.docs-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 12px 0 20px; }
.docs-table th {
  text-align: start; font-size: 12px; color: var(--text-muted); font-weight: 500;
  padding: 10px 8px; border-bottom: 1px solid var(--border);
}
.docs-table td { padding: 12px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.docs-table code {
  font-size: 12px;
  background: var(--gray-100);
  padding: 2px 6px;
  border-radius: 6px;
  direction: ltr;
  display: inline-block;
}
.docs-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 28px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-surface-soft, #f8fafc);
  max-width: 440px;
}
.docs-tab {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
}
.docs-tab:hover { color: var(--text-primary); }
.docs-tab.is-active {
  background: #fff;
  color: var(--blue-700);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.docs-inline-tab {
  border: 0;
  background: none;
  color: var(--blue-600);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.docs-panel[hidden],
.docs-toc[hidden] { display: none !important; }
.docs-toc .toc-group {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 8px;
}
@media (max-width: 900px) {
  .docs-layout { grid-template-columns: 1fr; padding: 32px 16px 96px; gap: 24px; }
  .docs-toc { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
  .docs-tabs { max-width: none; }
}
