/* ============================================================================
   Docs page — sticky TOC + scrollable content
   ============================================================================ */
body.app .docs-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 32px;
    align-items: start;
}
body.app .docs-toc {
    position: sticky;
    top: 80px;
    align-self: start;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    padding-right: 8px;
}
body.app .docs-toc__title {
    font-size: 11px;
    font-weight: 600;
    color: var(--m-text-faint);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 12px;
}
body.app .docs-toc__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
body.app .docs-toc__list a {
    display: block;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--m-text-muted);
    text-decoration: none;
    border-radius: 6px;
    border-left: 2px solid transparent;
    transition: background 120ms ease, color 120ms ease;
}
body.app .docs-toc__list a:hover {
    background: var(--m-surface-2);
    color: var(--m-text);
}
body.app .docs-toc__list a.is-active {
    background: var(--m-accent-soft);
    color: var(--m-accent);
    border-left-color: var(--m-accent);
}
body.app .docs-content {
    max-width: 820px;
    min-width: 0;
}
body.app .docs-section {
    background: var(--m-surface);
    border: 1px solid var(--m-border);
    border-radius: var(--m-radius);
    padding: 28px;
    margin-bottom: 16px;
    box-shadow: var(--m-shadow-xs);
    scroll-margin-top: 80px;
}
body.app .docs-content h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--m-text);
    margin: 0 0 8px;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 12px;
}
body.app .docs-content h2 .anchor {
    color: var(--m-text-faint);
    font-size: 14px;
    text-decoration: none;
    opacity: 0;
    transition: opacity 120ms ease;
}
body.app .docs-content h2:hover .anchor { opacity: 1; }
body.app .docs-content h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--m-text);
    margin: 24px 0 8px;
}
body.app .docs-content p {
    color: var(--m-text-muted);
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 12px;
}
body.app .docs-content ul,
body.app .docs-content ol {
    color: var(--m-text-muted);
    font-size: 14px;
    line-height: 1.6;
    padding-left: 22px;
    margin: 0 0 12px;
}
body.app .docs-content li { margin-bottom: 6px; }
body.app .docs-content li code,
body.app .docs-content p code {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 12.5px;
    background: var(--m-surface-2);
    color: var(--m-accent);
    padding: 1px 6px;
    border-radius: 4px;
    border: 1px solid var(--m-border);
}
body.app .docs-content pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 16px 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 12px 0;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 12.5px;
    line-height: 1.6;
    position: relative;
}
body.app .docs-content pre code {
    background: transparent;
    color: inherit;
    border: 0;
    padding: 0;
    font-size: inherit;
}
body.app .docs-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 5px;
    padding: 3px 8px;
    font-size: 11px;
    font-family: var(--m-font);
    font-weight: 500;
    cursor: pointer;
    transition: background 120ms ease;
}
body.app .docs-copy-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}
body.app .docs-content kbd {
    background: var(--m-surface-2);
    border: 1px solid var(--m-border);
    border-bottom-width: 2px;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 11.5px;
    font-family: var(--m-font);
    font-weight: 500;
    color: var(--m-text);
}
body.app .docs-content blockquote {
    border-left: 3px solid var(--m-accent);
    background: var(--m-accent-soft);
    padding: 12px 16px;
    margin: 12px 0;
    border-radius: 0 8px 8px 0;
    font-size: 13.5px;
    color: var(--m-text);
}
body.app .docs-content blockquote p:last-child { margin-bottom: 0; }
body.app .docs-content blockquote strong {
    color: var(--m-accent);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.06em;
    display: block;
    margin-bottom: 4px;
}
body.app .docs-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 13.5px;
}
body.app .docs-content table th,
body.app .docs-content table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--m-divider);
}
body.app .docs-content table th {
    background: var(--m-surface-2);
    font-weight: 600;
    color: var(--m-text);
    font-size: 12.5px;
}
body.app .docs-content table td { color: var(--m-text); }
body.app .docs-content table td code { font-size: 12px; }

@media (max-width: 991.98px) {
    body.app .docs-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    body.app .docs-toc {
        position: static;
        max-height: none;
        order: -1;
        background: var(--m-surface);
        border: 1px solid var(--m-border);
        border-radius: var(--m-radius);
        padding: 16px;
    }
}


