/* Docs — help center, reference, field guide. Tokens come from main.css. */

.docs-search {
    width: 100%;
    height: 40px;
    border: 1px solid var(--border);
    background: var(--bg-input);
    border-radius: 8px;
    padding: 0 12px;
    color: var(--text-primary);
    font: inherit;
    font-size: 14px;
}
.docs-search:focus { outline: 2px solid var(--text-primary); outline-offset: 1px; }

.docs-kicker {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.docs-prose h1 {
    font-size: clamp(28px, 4vw, 40px);
    letter-spacing: -.03em;
    line-height: 1.15;
    font-weight: 600;
    margin: 8px 0 12px;
}
.docs-prose .lede {
    font-size: 17px;
    color: var(--text-secondary);
    margin-bottom: 28px;
}
.docs-prose h2 {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -.02em;
    margin: 36px 0 10px;
}
.docs-prose p { color: var(--text-secondary); margin: 0 0 14px; }
.docs-prose ol, .docs-prose ul { margin: 0 0 16px; padding-left: 1.2rem; color: var(--text-secondary); }
.docs-prose li { margin-bottom: 6px; }

.docs-figure {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    margin: 8px 0 18px;
}
.docs-figure img, .docs-figure video, .docs-figure iframe {
    display: block;
    width: 100%;
    height: auto;
    background: #0a0a0a;
    border: 0;
}
.docs-zoom {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
}
.docs-lightbox[open] {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    margin: 0;
    padding: 64px 28px 28px;
    border: 0;
    background: rgba(8, 8, 8, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
}
.docs-lightbox::backdrop { background: rgba(8, 8, 8, 0.94); }
.docs-lightbox form {
    position: absolute;
    top: 16px;
    right: 16px;
    margin: 0;
}
.docs-lightbox img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    margin: 0;
    object-fit: contain;
    background: transparent;
}
.docs-lightbox-close {
    height: 36px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.docs-figure iframe { aspect-ratio: 16 / 9; height: auto; }
.docs-figure figcaption, .docs-figure-empty {
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 10px 12px;
}
.docs-figure-empty {
    aspect-ratio: 16 / 10;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-bottom: 1px dashed var(--border);
}

/* Help center */
.docs-help { max-width: 1080px; margin: 0 auto; padding: 36px 24px 80px; }
.docs-help-hero { text-align: center; padding: 12px 0 28px; }
.docs-help-hero h1 {
    font-size: clamp(32px, 5vw, 48px);
    letter-spacing: -.03em;
    font-weight: 600;
    margin: 0 0 16px;
}
.docs-help-hero form { width: min(560px, 100%); margin: 0 auto; }
.docs-help-hero .docs-search { height: 48px; border-radius: 12px; font-size: 15px; padding: 0 16px; }
.docs-cats {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}
.docs-cats a {
    height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    color: var(--text-secondary);
}
.docs-cats a.on {
    background: var(--text-primary);
    color: var(--bg-page);
    border-color: var(--text-primary);
}
.docs-count { text-align: center; color: var(--text-muted); font-size: 13px; margin: -12px 0 20px; }
.docs-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.docs-col h2 { font-size: 15px; margin-bottom: 4px; }
.docs-col a.docs-hit {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 0;
    border-top: 1px solid var(--border);
}
.docs-col a.docs-hit strong { display: block; font-size: 14px; font-weight: 600; }
.docs-col a.docs-hit span.docs-hit-sum { display: block; font-size: 13px; color: var(--text-muted); }
.docs-tag {
    flex: none;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 5px;
    color: var(--text-muted);
    margin-top: 3px;
}
.docs-empty { text-align: center; color: var(--text-secondary); padding: 32px 0; }

/* Reference */
.docs-ref {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr) 180px;
    gap: 32px;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 24px 80px;
    align-items: start;
}
.docs-crumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
}
.docs-ref > .docs-crumbs { grid-column: 1 / -1; margin-bottom: 0; }
.docs-crumbs svg { width: 14px; height: 14px; flex: none; }
.docs-crumbs a { color: var(--text-muted); }
.docs-crumbs a:hover { color: var(--text-primary); }
.docs-crumbs .current { color: var(--text-primary); font-weight: 600; }
.docs-side, .docs-toc { position: sticky; top: calc(var(--nav-h) + 16px); }
.docs-side .docs-search { margin-bottom: 18px; }
.docs-group { margin-bottom: 18px; }
.docs-group h3 {
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.docs-group a {
    display: block;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-secondary);
}
.docs-group a.on { background: var(--bg-input); color: var(--text-primary); font-weight: 600; }
.docs-toc a {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    padding: 4px 0 4px 10px;
    border-left: 1px solid var(--border);
}
.docs-toc a:hover { color: var(--text-primary); }
.docs-related { margin-top: 28px; padding-top: 8px; border-top: 1px solid var(--border); }
.docs-related a { display: block; padding: 8px 0; color: var(--text-primary); font-weight: 500; }
.docs-related a span { display: block; font-weight: 400; font-size: 13px; color: var(--text-muted); }

.docs-prose .docs-parts {
    list-style: none;
    margin-left: 0;
    padding: 0;
    overflow: hidden;
}
.docs-parts a,
.docs-parts .docs-part-name {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    font-weight: 500;
}
.docs-parts a {
    color: #8ab4ff;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.docs-parts a:hover { color: #c5d8ff; }
.docs-parts .docs-part-name { color: var(--text-primary); }
.docs-parts span {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 13px;
}

/* VS Code–style code windows */
.docs-code {
    margin: 14px 0 22px;
    border: 1px solid #2d2d2d;
    border-radius: 10px;
    overflow: hidden;
    background: #1e1e1e;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.docs-code-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 40px;
    padding: 0 12px;
    background: #252526;
    border-bottom: 1px solid #2d2d2d;
}
.docs-code-dots {
    display: inline-flex;
    gap: 6px;
    flex: none;
}
.docs-code-dots i {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #3e3e42;
}
.docs-code-dots i:nth-child(1) { background: #ff5f57; }
.docs-code-dots i:nth-child(2) { background: #febc2e; }
.docs-code-dots i:nth-child(3) { background: #28c840; }
.docs-code-tab {
    font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, monospace;
    font-size: 12px;
    color: #cccccc;
    background: #1e1e1e;
    border: 1px solid #2d2d2d;
    border-bottom-color: #1e1e1e;
    border-radius: 6px 6px 0 0;
    padding: 6px 10px 7px;
    margin-bottom: -1px;
}
.docs-code-lang {
    margin-left: auto;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #858585;
}
.docs-code-copy {
    height: 28px;
    padding: 0 10px;
    border: 1px solid #3e3e42;
    border-radius: 6px;
    background: #2d2d2d;
    color: #cccccc;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.docs-code-copy:hover {
    background: #3e3e42;
    color: #fff;
}
.docs-code-pre {
    margin: 0;
    padding: 16px 18px;
    overflow-x: auto;
    background: #1e1e1e;
    color: #d4d4d4;
    font-size: 13px;
    line-height: 1.55;
}
.docs-code-pre code {
    font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, monospace;
    background: transparent;
    color: inherit;
}

/* Method reference table */
.docs-methods-wrap {
    margin: 12px 0 22px;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 10px;
}
.docs-methods {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.docs-methods th,
.docs-methods td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.docs-methods thead th {
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--bg-input);
    font-weight: 600;
}
.docs-methods tbody tr:last-child th,
.docs-methods tbody tr:last-child td {
    border-bottom: 0;
}
.docs-methods tbody th code,
.docs-methods .docs-methods-returns code {
    font-family: ui-monospace, 'Cascadia Code', Menlo, Consolas, monospace;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-primary);
}
.docs-methods .docs-methods-returns code {
    font-weight: 500;
    color: var(--text-secondary);
}
.docs-methods td {
    color: var(--text-secondary);
}

/* Field guide */
.docs-guide { max-width: 820px; margin: 0 auto; padding: 28px 24px 80px; }
.docs-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: center;
    margin: 0 0 8px;
}
.docs-split .docs-figure { margin: 0; }
.docs-rel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.docs-rel-grid a {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    display: block;
}
.docs-rel-grid strong { display: block; font-size: 14px; margin-bottom: 4px; }
.docs-rel-grid span { font-size: 13px; color: var(--text-muted); }

.docs-menu-btn,
.docs-side-head { display: none; }
.docs-side-overlay { display: none; }

@media (max-width: 960px) {
    .docs-cols, .docs-ref, .docs-split, .docs-rel-grid { grid-template-columns: 1fr; }
    .docs-ref { min-width: 0; overflow-x: clip; }
    .docs-prose, .docs-figure, .docs-zoom { min-width: 0; max-width: 100%; }
    .docs-toc { display: none; }
    .docs-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        margin-left: -8px;
        padding: 0;
        border: 0;
        border-radius: 8px;
        background: none;
        color: var(--text-primary);
        cursor: pointer;
        flex: none;
    }
    .docs-menu-btn svg { width: 24px; height: 24px; }
    .docs-side-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 150;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s cubic-bezier(0.1, 0.9, 0.2, 1), visibility 0.3s cubic-bezier(0.1, 0.9, 0.2, 1);
    }
    .docs-side-overlay.active { opacity: 1; visibility: visible; }
    .docs-side {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: min(280px, 86vw);
        margin: 0;
        padding: 0 16px 24px;
        background: var(--bg-page);
        z-index: 160;
        overflow-y: auto;
        transform: translateX(-100%);
        box-shadow: var(--shadow-lg);
        transition: transform 0.3s cubic-bezier(0.1, 0.9, 0.2, 1);
    }
    .docs-side.open { transform: translateX(0); }
    .docs-side-head {
        display: flex;
        justify-content: flex-end;
        padding: 16px 0 8px;
        position: sticky;
        top: 0;
        background: var(--bg-page);
    }
    .docs-side-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        padding: 0;
        border: 0;
        border-radius: 8px;
        background: none;
        color: var(--text-secondary);
        cursor: pointer;
    }
}