.docs-wrap { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.docs-main { padding: 42px 0 72px; }
.docs-hero { max-width: 820px; margin-bottom: 32px; }
.docs-hero .lede { margin: 14px 0 0; color: var(--muted); font-size: 18px; }
.docs-layout { display: grid; grid-template-columns: 240px minmax(0, 780px); gap: 54px; align-items: start; }
.docs-toc { position: sticky; top: 24px; padding: 18px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 3px 3px 0 var(--line); }
.docs-toc strong { display: block; margin-bottom: 8px; }
.docs-toc ol { margin: 0; padding-left: 22px; }
.docs-toc li { margin: 5px 0; font-size: 14px; line-height: 1.35; }
.docs-toc a { text-underline-offset: 3px; }
.docs-content { min-width: 0; }
.docs-content section { scroll-margin-top: 28px; padding: 0 0 42px; border-bottom: 1px solid var(--rule); }
.docs-content section + section { padding-top: 12px; }
.docs-content h2 { font: 700 clamp(28px, 4vw, 36px)/1.12 Georgia, serif; margin-top: 34px; }
.docs-content h3 { margin-top: 28px; }
.docs-content h4 { margin: 22px 0 4px; font-size: 16px; }
.docs-content p, .docs-content li { max-width: 76ch; }
.docs-content a { text-underline-offset: 3px; }
.docs-content pre { max-width: 100%; overflow-x: auto; margin: 14px 0 20px; padding: 17px 19px; border: 2px solid var(--line); border-radius: 11px; background: var(--ink); color: #f6f1e6; font: 500 13px/1.65 "JetBrains Mono", ui-monospace, monospace; }
.docs-content :not(pre) > code { padding: 2px 5px; border-radius: 5px; background: #efe7da; font: 500 .88em/1.4 "JetBrains Mono", ui-monospace, monospace; }
.docs-content .callout { margin: 18px 0; padding: 15px 17px; border: 2px solid var(--line); border-radius: 11px; background: #fcebc6; }
.docs-content .callout p { margin: 0; }
.docs-content .safe { background: #edf6e9; }
.docs-content .danger { background: #fde9df; }
.docs-table { max-width: 100%; overflow-x: auto; margin: 16px 0 22px; border: 2px solid var(--line); border-radius: 11px; background: var(--surface); }
.docs-table table { width: 100%; min-width: 600px; border-collapse: collapse; }
.docs-table th, .docs-table td { padding: 12px 14px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.docs-table tr:last-child th, .docs-table tr:last-child td { border-bottom: 0; }
.docs-table th { background: #f7efe2; }
.docs-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 0; }
.docs-button { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 2px solid var(--line); border-radius: 9px; background: var(--amber); box-shadow: 3px 3px 0 var(--line); font-weight: 700; text-decoration: none; }
.docs-button.secondary { background: var(--surface); }
.back-top { display: inline-block; margin-top: 16px; font-size: 14px; font-weight: 650; }
@media (max-width: 860px) {
  .docs-layout { grid-template-columns: 1fr; gap: 16px; }
  .docs-toc { position: static; }
}
@media (max-width: 560px) {
  .docs-wrap { width: min(100% - 28px, 1180px); }
  .docs-main { padding-top: 30px; }
}
