/* ProductDocs - quiet documentation surface */

.docs-container {
    --docs-bg: #ffffff;
    --docs-fg: #111827;
    --docs-muted: #6b7280;
    --docs-accent: #2563eb;

    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    max-width: 1200px;
    min-height: calc(100vh - 80px);
    margin: 0 auto;
    background: var(--docs-bg);
    color: var(--docs-fg);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.6;
}

html.dark .docs-container {
    --docs-bg: #030712;
    --docs-fg: #f9fafb;
    --docs-muted: #9ca3af;
    --docs-accent: #60a5fa;
}

.docs-sidebar {
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
    overflow-y: auto;
    padding: 32px 16px;
    border-right: 1px solid color-mix(in srgb, var(--docs-muted) 28%, transparent);
    background: var(--docs-bg);
    scrollbar-width: thin;
}

.docs-sidebar::-webkit-scrollbar {
    width: 4px;
}

.docs-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.docs-sidebar::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--docs-muted) 45%, transparent);
    border-radius: 8px;
}

.docs-sidebar-mobile-header {
    display: none;
}

.docs-sidebar-section {
    margin-bottom: 16px;
}

.docs-sidebar-title {
    margin-bottom: 8px;
    padding: 0 12px;
    color: var(--docs-muted);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.docs-sidebar-link {
    display: block;
    margin-bottom: 6px;
    padding: 6px 12px 6px 10px;
    border-left: 2px solid transparent;
    border-radius: 0 8px 8px 0;
    color: var(--docs-fg);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    text-decoration: none;
}

.docs-sidebar-link:hover {
    background: color-mix(in srgb, var(--docs-accent) 8%, transparent);
    color: var(--docs-fg);
    text-decoration: none;
}

.docs-sidebar-link.active {
    border-left-color: var(--docs-accent);
    font-weight: 500;
}

.docs-content {
    width: 100%;
    max-width: 880px;
    padding: 48px;
}

.docs-content h1,
.docs-content h2,
.docs-content h3,
.docs-content p {
    margin-top: 0;
}

.docs-content h1 {
    margin-bottom: 8px;
    color: var(--docs-fg);
    font-size: 32px;
    font-weight: 500;
    line-height: 1.25;
}

.docs-content h2 {
    margin-bottom: 8px;
    color: var(--docs-fg);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
}

.docs-content h3 {
    color: var(--docs-fg);
    font-size: 18px;
    font-weight: 500;
    line-height: 1.4;
}

.docs-content p {
    margin-bottom: 16px;
    color: var(--docs-muted);
}

.docs-content a {
    color: var(--docs-fg);
    text-decoration: none;
}

.docs-content a:hover {
    color: var(--docs-accent);
    text-decoration: none;
}

.docs-content ul,
.docs-content ol {
    margin: 0 0 16px;
    padding-left: 24px;
}

.docs-content li {
    margin-bottom: 8px;
    color: var(--docs-fg);
}

.docs-content code {
    padding: 0 4px;
    border-radius: 4px;
    background: color-mix(in srgb, var(--docs-muted) 12%, transparent);
    color: var(--docs-fg);
    font-family: "Cascadia Code", Consolas, monospace;
    font-size: 0.9em;
}

.docs-content pre {
    margin: 0 0 24px;
    overflow-x: auto;
    padding: 16px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--docs-muted) 14%, transparent);
    color: var(--docs-fg);
    font-size: 14px;
    line-height: 1.6;
}

.docs-content pre code {
    padding: 0;
    background: transparent;
}

.docs-hero {
    margin-bottom: 48px;
}

.docs-hero p {
    max-width: 760px;
    margin-bottom: 0;
    font-size: 16px;
    line-height: 1.6;
}

.docs-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 48px;
}

.docs-feature-card {
    padding: 24px;
    border: 1px solid color-mix(in srgb, var(--docs-muted) 28%, transparent);
    border-radius: 8px;
}

.docs-feature-card:hover {
    border-color: color-mix(in srgb, var(--docs-muted) 58%, transparent);
}

.docs-feature-card a {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: 500;
}

.docs-feature-card p {
    margin-bottom: 0;
}

.docs-category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
}

.docs-category-block p {
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.6;
}

.docs-category-block nav {
    display: grid;
    gap: 6px;
}

.docs-category-block a {
    font-size: 14px;
    line-height: 1.5;
}

.docs-callout {
    margin-bottom: 24px;
    padding: 16px;
    border-left: 2px solid var(--docs-accent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--docs-muted) 10%, transparent);
    color: var(--docs-fg);
}

.docs-sidebar-toggle {
    display: none;
}

.docs-sidebar-overlay {
    display: none;
}

@media (max-width: 899px) {
    .docs-container {
        display: block;
        min-height: auto;
    }

    .docs-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 60;
        width: 260px;
        height: 100vh;
        padding-top: 24px;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
    }

    .docs-sidebar.open {
        transform: translateX(0);
    }

    .docs-sidebar-overlay {
        position: fixed;
        inset: 0;
        z-index: 55;
        display: none;
        background: rgba(0, 0, 0, 0.35);
    }

    .docs-sidebar-overlay.open {
        display: block;
    }

    .docs-sidebar-mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        margin-bottom: 24px;
        padding: 0 12px;
        color: var(--docs-fg);
        font-size: 14px;
        font-weight: 500;
    }

    .docs-sidebar-mobile-header button,
    .docs-sidebar-toggle {
        border: 1px solid color-mix(in srgb, var(--docs-muted) 28%, transparent);
        border-radius: 8px;
        background: var(--docs-bg);
        color: var(--docs-fg);
        cursor: pointer;
        font: inherit;
        font-weight: 500;
    }

    .docs-sidebar-mobile-header button {
        padding: 8px 12px;
    }

    .docs-sidebar-toggle {
        display: inline-flex;
        margin-bottom: 32px;
        padding: 8px 16px;
    }

    .docs-content {
        max-width: none;
        padding: 32px 24px 48px;
    }

    .docs-feature-grid,
    .docs-category-grid {
        grid-template-columns: 1fr;
    }
}
