/* ============================================
   Docs pages — layout, sidebar, sections
   ============================================ */
.docs-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 3rem;
    align-items: start;
}

.docs-sidebar {
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.docs-sidebar a {
    display: block;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.15s;
    border-left: 2px solid transparent;
}

.docs-sidebar a:hover {
    color: var(--text);
    background: var(--surface);
}

.docs-sidebar a.active {
    color: var(--primary-bright);
    border-left-color: var(--primary-bright);
    background: rgba(99, 102, 241, 0.06);
}

.docs-nav-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    padding: 0.85rem 0.75rem 0.2rem;
    margin: 0;
}

.docs-content {
    min-width: 0;
}

.docs-section {
    padding-bottom: 2.5rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--border);
}

.docs-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.docs-section h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 1rem 0;
}

.docs-section p {
    color: var(--text-muted);
    line-height: 1.7;
}

.docs-section pre {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    overflow-x: auto;
    margin: 0.75rem 0;
    font-size: 0.85rem;
    line-height: 1.6;
}

.docs-section pre + pre {
    margin-top: 0.4rem;
}

.docs-section code {
    font-family: var(--font-mono);
    font-size: 0.875em;
}

.docs-callout {
    background: rgba(99, 102, 241, 0.07);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-left: 3px solid var(--primary-bright);
    border-radius: var(--radius-sm);
    padding: 0.9rem 1.1rem;
    margin: 1rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

.docs-callout-warn {
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.25);
    border-left-color: var(--error);
}

.docs-steps {
    color: var(--text-muted);
    padding-left: 1.5rem;
    line-height: 1.8;
}

.docs-steps li {
    padding: 0.2rem 0;
}

.docs-platform-tabs {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
}

.docs-platform-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.6rem 1rem;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.15s;
    margin-bottom: -1px;
    border-radius: 0;
    font-family: var(--font-sans);
}

.docs-platform-tab:hover {
    color: var(--text);
}

.docs-platform-tab.active {
    color: var(--primary-bright);
    border-bottom-color: var(--primary-bright);
}

@media (max-width: 768px) {
    .docs-layout {
        grid-template-columns: 1fr;
    }

    .docs-sidebar {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.25rem;
        border-bottom: 1px solid var(--border);
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }

    .docs-nav-label {
        display: none;
    }

    .docs-sidebar a {
        border-left: none;
        border-bottom: 2px solid transparent;
        border-radius: var(--radius-sm);
        padding: 0.3rem 0.6rem;
        font-size: 0.82rem;
    }

    .docs-sidebar a.active {
        border-bottom-color: var(--primary-bright);
        border-left: none;
    }
}
