/* Documentation Layout */
.docs-container {
    display: grid;
    grid-template-columns: minmax(240px, 280px) 1fr;
    max-width: 1400px;
    margin: 0 auto;
    padding: clamp(6.5rem, 10vw, 7.5rem) clamp(1.25rem, 4vw, 2.5rem) 2.5rem;
    gap: clamp(2.5rem, 4vw, 4rem);
    min-height: calc(100vh - 200px);
}

/* Sidebar */
.docs-sidebar {
    position: sticky;
    top: calc(2rem + env(safe-area-inset-top));
    height: fit-content;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-section h3 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6B7280;
    margin-bottom: 0.75rem;
}

.sidebar-section a {
    display: block;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.25rem;
    color: #374151;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.15s;
    font-size: 0.9375rem;
}

.sidebar-section a:hover {
    background: #F3F4F6;
    color: #111827;
}

.sidebar-section a.active {
    background: #FEF3C7;
    color: #92400E;
    font-weight: 600;
}

/* Main Content */
.docs-content {
    max-width: 800px;
    min-width: 0;
}

.prose {
    color: #1F2937;
    line-height: 1.75;
}

.prose h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 2.5rem;
    color: #111827;
    line-height: 1.2;
}

.prose h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-top: 3rem;
    margin-bottom: 1rem;
    color: #111827;
}

.prose h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: #111827;
}

.prose p {
    margin-bottom: 1.5rem;
    font-size: 1.0625rem;
}

.prose code {
    font-family: 'JetBrains Mono', monospace;
    background: #F3F4F6;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.875em;
    color: #DC2626;
    overflow-wrap: anywhere;
}

.prose pre {
    background: #1F2937;
    color: #F3F4F6;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

.prose pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

.prose ul, .prose ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.5rem;
}

.prose a {
    color: #D97706;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.prose a:hover {
    color: #B45309;
}

.prose blockquote {
    border-left: 4px solid #FCD34D;
    padding-left: 1.5rem;
    margin: 2rem 0;
    color: #6B7280;
    font-style: italic;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    display: block;
    overflow-x: auto;
}

.prose th {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
}

.prose td {
    border: 1px solid #E5E7EB;
    padding: 0.75rem;
}

/* Info Box */
.info-box {
    background: #EFF6FF;
    border-left: 4px solid #3B82F6;
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    border-radius: 0 6px 6px 0;
}

.info-box p:last-child {
    margin-bottom: 0;
}

/* Warning Box */
.warning-box {
    background: #FEF3C7;
    border-left: 4px solid #F59E0B;
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    border-radius: 0 6px 6px 0;
}

.warning-box p:last-child {
    margin-bottom: 0;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .docs-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: clamp(6rem, 10vw, 7rem) clamp(1.25rem, 4vw, 2rem) 2.5rem;
    }
    
    .docs-sidebar {
        position: static;
        max-height: none;
    }
}

@media (max-width: 640px) {
    .docs-container {
        padding: 6rem 1.25rem 2rem;
    }
    
    .prose h1 {
        font-size: 2.1rem;
        margin-bottom: 2rem;
    }
    
    .prose h2 {
        font-size: 1.5rem;
    }
    
    .prose h3 {
        font-size: 1.2rem;
    }
}
