/* PostPilot - documentation & legal layout (public + panel) */
.doc{display:grid;grid-template-columns:260px minmax(0,1fr);gap:2.2rem;align-items:start}
.toc{position:sticky;top:88px;max-height:calc(100vh - 110px);overflow:auto;padding-right:.2rem}
.toc-box{border:1px solid var(--line);border-radius:18px;background:#fff;padding:.4rem;box-shadow:var(--sh-sm,0 4px 14px rgba(15,23,42,.05))}
.toc-box summary{list-style:none;cursor:pointer;padding:.7rem .9rem;font-weight:700;font-size:.78rem;text-transform:uppercase;letter-spacing:.09em;color:var(--muted);display:flex;justify-content:space-between;align-items:center;min-height:44px}
.toc-box summary::-webkit-details-marker{display:none}.toc-box summary::after{content:"";width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);transition:transform .25s;margin-right:.2rem}.toc-box[open] summary::after{transform:rotate(-135deg)}
.toc ol{list-style:none;margin:0;padding:.2rem;display:grid;gap:.1rem}
.toc a{display:flex;align-items:center;gap:.6rem;padding:.5rem .7rem;min-height:40px;border-radius:12px;color:var(--ink-2);text-decoration:none;font-size:.92rem;border-left:3px solid transparent;transition:background .2s,color .2s}
.toc a span{display:inline-grid;place-items:center;width:1.5rem;height:1.5rem;border-radius:8px;background:#f1f5f9;font-size:.74rem;font-weight:700;flex:none}
.toc a:hover{background:#f8fafc;color:var(--ink)}.toc a[aria-current]{background:#eef2ff;color:#3730a3;font-weight:650;border-left-color:#6366f1}.toc a[aria-current] span{background:#6366f1;color:#fff}
.toc-other{margin:.8rem .4rem 0}
.doc-hero .doc-date{display:inline-flex;align-items:center;gap:.4rem;margin:.8rem 0 0;padding:.35rem .85rem;border-radius:999px;background:#fff;border:1px solid var(--line);font-size:.85rem;color:var(--muted)}.doc-date .i{width:15px;height:15px}
.doc-body{max-width:78ch}.doc-s{scroll-margin-top:96px;padding:0 0 1.6rem;margin-bottom:1.6rem;border-bottom:1px solid var(--line)}.doc-s:last-of-type{border-bottom:0}
.doc-s h2{display:flex;align-items:center;gap:.7rem;font-size:1.4rem;margin:0 0 .8rem;line-height:1.25}
.doc-n{display:inline-grid;place-items:center;flex:none;width:2rem;height:2rem;border-radius:10px;background:linear-gradient(135deg,#6366f1,#8b5cf6);color:#fff;font-size:.9rem}
.doc-s p,.doc-s li{line-height:1.75;color:var(--ink-2)}.doc-s ul{padding-left:1.2rem;display:grid;gap:.45rem;margin:.4rem 0 1rem}.doc-s li::marker{color:#6366f1}
.anchor-copy{all:unset;box-sizing:border-box;display:inline-grid;place-items:center;width:34px;height:34px;border-radius:10px;cursor:pointer;color:var(--muted);opacity:0;transition:opacity .2s,background .2s}
.anchor-copy .i{width:16px;height:16px}.doc-s h2:hover .anchor-copy,.anchor-copy:focus-visible,.endpoint h3:hover .anchor-copy{opacity:1}.anchor-copy:hover{background:#eef2ff;color:#4f46e5}.anchor-copy.is-copied{opacity:1;color:#059669;background:#ecfdf5}
@media(hover:none){.anchor-copy{opacity:.55}}
/* API docs */
.apid .doc-body{max-width:none}
.apid-card{background:#fff;border:1px solid var(--line);border-radius:20px;padding:1.4rem;margin-bottom:1.2rem;scroll-margin-top:96px}
.apid-card h2,.apid-card h3{margin:0 0 .6rem}.apid-card p{line-height:1.7;color:var(--ink-2)}
.ep-head{display:flex;align-items:center;gap:.7rem;flex-wrap:wrap;margin-bottom:.5rem}.ep-head h3{margin:0;font-size:1.12rem;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;overflow-wrap:anywhere}
.mbadge{display:inline-block;min-width:4.4rem;text-align:center;padding:.28rem .7rem;border-radius:10px;font-weight:800;font-size:.78rem;letter-spacing:.05em;color:#fff}.mb-get{background:#059669}.mb-post{background:#2563eb}.mb-del{background:#dc2626}
.ep-sum{margin:0 0 1rem;color:var(--ink-2)}.ep-sub{font-size:.78rem;text-transform:uppercase;letter-spacing:.09em;color:var(--muted);margin:1.1rem 0 .5rem;font-weight:700}
.ptable{width:100%;border-collapse:collapse;font-size:.92rem}.ptable th{text-align:left;font-size:.75rem;text-transform:uppercase;letter-spacing:.07em;color:var(--muted);padding:.55rem .7rem;border-bottom:1px solid var(--line)}.ptable td{padding:.65rem .7rem;border-bottom:1px solid #f1f5f9;vertical-align:top}.ptable code{background:#eef2ff;color:#3730a3;padding:.1rem .4rem;border-radius:6px;font-size:.85em}
.req{display:inline-block;padding:.1rem .5rem;border-radius:999px;font-size:.72rem;font-weight:700}.req-y{background:#fee2e2;color:#b91c1c}.req-n{background:#f1f5f9;color:#475569}
.codebox{position:relative;border-radius:16px;overflow:hidden;background:#0f172a;margin:.4rem 0 1rem}
.codebox-h{display:flex;align-items:center;justify-content:space-between;gap:.6rem;padding:.4rem .6rem .4rem 1rem;background:#1e293b;color:#94a3b8;font-size:.78rem;min-height:44px}
.codebox pre{margin:0;padding:1rem 1.1rem;overflow:auto;color:#e2e8f0;font-size:.86rem;line-height:1.6;max-height:520px;tab-size:2}.codebox code{background:none;color:inherit;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;white-space:pre}
.copy-code{all:unset;box-sizing:border-box;cursor:pointer;padding:.35rem .8rem;min-height:32px;display:inline-flex;align-items:center;border-radius:8px;background:rgba(255,255,255,.08);color:#e2e8f0;font-size:.78rem;font-weight:650;transition:background .2s}.copy-code:hover{background:rgba(255,255,255,.18)}.copy-code.is-copied{background:#059669;color:#fff}.copy-code:focus-visible{outline:2px solid #a5b4fc}
.ctabs-bar{display:flex;gap:.2rem;overflow-x:auto}.ctabs-bar [role=tab]{all:unset;box-sizing:border-box;cursor:pointer;padding:.45rem .9rem;min-height:36px;border-radius:9px;color:#94a3b8;font-weight:650;font-size:.82rem}.ctabs-bar [role=tab][aria-selected=true]{background:#334155;color:#fff}.ctabs-bar [role=tab]:focus-visible{outline:2px solid #a5b4fc}
.cpane[hidden]{display:none}.ctabs .codebox{margin-bottom:0}
.rl-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.8rem;margin:.6rem 0}.rl-grid div{padding:1rem;border-radius:14px;background:#f8fafc;border:1px solid var(--line)}.rl-grid b{display:block;font-size:1.3rem;color:#4338ca}.rl-grid span{font-size:.85rem;color:var(--muted)}
.errt td:first-child{white-space:nowrap}.http{display:inline-block;padding:.12rem .55rem;border-radius:8px;font-weight:800;font-size:.8rem;background:#f1f5f9}.h2xx{background:#dcfce7;color:#166534}.h4xx{background:#fef3c7;color:#92400e}.h5xx{background:#fee2e2;color:#991b1b}
@media(max-width:900px){.doc{grid-template-columns:minmax(0,1fr);gap:1rem}.doc>*{min-width:0}.apid-card,.endpoint,.codeblk,pre{max-width:100%}pre{overflow-x:auto}.toc{position:static;max-height:none}.doc-s h2{font-size:1.2rem}}
@media(max-width:560px){.apid-card{padding:1rem;border-radius:16px}.ptable thead{display:none}.ptable,.ptable tbody,.ptable tr,.ptable td{display:block;width:100%}.ptable tr{padding:.5rem 0;border-bottom:1px solid #f1f5f9}.ptable td{border:0;padding:.15rem 0}.ptable td[data-label]::before{content:attr(data-label)": ";font-weight:700;color:var(--muted);font-size:.78rem}}
