/* docs: 3 columns (sidebar, text, on-this-page). Light paper, same quiet system. */
.docs-body { background: var(--bg); }
.docs { display: grid; grid-template-columns: 240px minmax(0, 1fr) 210px; gap: clamp(28px, 5vw, 64px); padding-top: 56px; padding-bottom: 112px; align-items: start; }
.dn { position: sticky; top: calc(var(--hdr) + 28px); max-height: calc(100vh - var(--hdr) - 56px); overflow: auto; padding-right: 8px; }
.dn-toggle { display: none; }
.dn-g { margin-bottom: 26px; }
.dn h4, .dtoc h4 { margin: 0 0 10px; font-family: var(--f-mono); font-weight: 500; font-size: 11.5px; letter-spacing: .02em; color: var(--mute); }
.dn a { display: block; position: relative; padding: 6px 12px; margin-left: -12px; border-radius: 8px; text-decoration: none; font-size: 14.5px; font-weight: 500; color: var(--mute); transition: color .15s, background .15s; }
.dn a:hover { color: var(--text); }
.dn a.on { color: var(--text); background: var(--bg-3); }
.dc { min-width: 0; max-width: 740px; }
.dc .eyebrow { margin-bottom: 18px; }
.dc .h-lg { margin-bottom: 18px; font-size: clamp(34px, 4vw, 52px); }
.dc .lead { margin: 0 0 8px; }
.dtoc { position: sticky; top: calc(var(--hdr) + 28px); display: grid; gap: 2px; max-height: calc(100vh - var(--hdr) - 56px); overflow: auto; border-left: 1px solid var(--line); padding-left: 18px; }
.dtoc a { display: block; padding: 4px 0; font-size: 13.5px; text-decoration: none; color: var(--mute); position: relative; line-height: 1.4; }
.dtoc a.l3 { padding-left: 12px; font-size: 13px; }
.dtoc a:hover { color: var(--text); }
.dtoc a.on { color: var(--text); font-weight: 500; }
.dtoc a.on::before { content: ''; position: absolute; left: -19px; top: 4px; bottom: 4px; width: 1px; background: var(--signal); }

.prose { margin-top: 32px; font-size: 17px; line-height: 1.72; color: var(--text-2); }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { font-family: var(--f-display); font-weight: 600; font-size: 29px; letter-spacing: -.03em; line-height: 1.12; margin-top: 2.4em; padding-top: 1.2em; border-top: 1px solid var(--line); position: relative; color: var(--text); }
.prose h3 { font-family: var(--f-display); font-weight: 600; font-size: 20px; letter-spacing: -.02em; margin-top: 1.9em; position: relative; color: var(--text); }
.prose .anc { position: absolute; left: -22px; top: 0; text-decoration: none; color: var(--mute); font-family: var(--f-mono); font-weight: 400; opacity: 0; transition: opacity .15s; }
.prose h2 .anc { top: 1.2em; }
.prose h2:hover .anc, .prose h3:hover .anc { opacity: 1; }
.prose a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-2); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: text-decoration-color .15s; }
.prose a:hover { text-decoration-color: var(--text); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--mute); }
.prose strong { font-weight: 600; color: var(--text); }
.prose code { background: var(--bg-3); color: var(--text); }
.prose pre { margin-top: 1.4em; padding-top: 36px; }
.prose pre[data-lang]::before { content: attr(data-lang); position: absolute; left: 16px; top: 10px; font-family: var(--f-mono); font-size: 10.5px; color: #77777d; }
.prose pre:not([data-lang]) { padding-top: 22px; }
.cp { position: absolute; right: 10px; top: 8px; height: 24px; padding: 0 10px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px; background: transparent; color: #8d8d93; font-family: var(--f-mono); font-size: 10.5px; }
.cp:hover { color: #fff; border-color: #fff; }
.prose .tbl-wrap { margin-top: 1.4em; }
.prose .tbl { font-size: 14.5px; line-height: 1.55; color: var(--text-2); }
.prose .tbl code { font-size: 12.5px; white-space: nowrap; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.6em 0; }
.callout { position: relative; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); padding: 16px 20px; font-size: 16px; }
.callout > * + * { margin-top: .6em; }
.callout p { margin: 0; }
.callout-k { display: block; font-family: var(--f-mono); font-weight: 500; font-size: 11px; color: var(--mute); margin-bottom: 4px; }
.callout.warn { border-color: rgba(224, 57, 45, .35); }
.callout.warn .callout-k { color: var(--signal); }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 80px; }
.pg { display: grid; gap: 4px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; background: var(--bg-2); transition: border-color .15s; }
.pg:hover { border-color: var(--text); }
.pg small { font-family: var(--f-mono); font-size: 11px; color: var(--mute); }
.pg b { font-family: var(--f-display); font-weight: 500; font-size: 17px; color: var(--text); }
.pg.next { text-align: right; }

@media (max-width: 1100px) { .docs { grid-template-columns: 220px minmax(0, 1fr); } .dtoc { display: none; } }
@media (max-width: 800px) {
  .docs { grid-template-columns: minmax(0, 1fr); padding-top: 24px; }
  .dn { position: static; max-height: none; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); padding: 0; }
  .dn-toggle { display: block; width: 100%; height: 48px; padding: 0 16px; border: 0; background: none; text-align: left; font-family: var(--f-mono); font-size: 12px; }
  .dn-in { display: none; padding: 4px 16px 12px; }
  .dn.open .dn-in { display: block; }
  .prose .anc { display: none; }
  .pager { grid-template-columns: 1fr; }
}
