/* SPL Governance Documentation Styles - 2025 */

/* ===== LAYER DEFINITIONS ===== */
@layer reset, tokens, base, layout, components, utilities;

/* ===== DESIGN TOKENS (INHERITED FROM MAIN SITE) ===== */
@layer tokens {
    :root {
        /* Color System - 2025 Vibrant Palette */
        --primary-500: #26a65b;
        --primary-400: #36d278;
        --primary-600: #1e8449;
        --primary-700: #0d4d29;
        --primary-900: #041e10;
        
        /* Neon Accents */
        --accent-cyan: #00f5ff;
        --accent-purple: #8b5cf6;
        --accent-pink: #ec4899;
        
        /* Glassmorphism Colors */
        --glass-bg: rgba(10, 10, 10, 0.8);
        --glass-border: rgba(38, 166, 91, 0.2);
        --glass-highlight: rgba(255, 255, 255, 0.1);
        
        /* Surfaces */
        --surface-primary: #000000;
        --surface-secondary: #0a0a0a;
        --surface-tertiary: #121212;
        --surface-elevated: #1a1a1a;
        
        /* Documentation specific colors */
        --docs-bg: #0a0a0a;
        --docs-sidebar-bg: #000000;
        --docs-content-bg: #0f0f0f;
        --docs-border: rgba(255, 255, 255, 0.08);
        --docs-code-bg: #1a1a1a;
        
        /* Text Hierarchy */
        --text-primary: #ffffff;
        --text-secondary: #e0e0e0;
        --text-tertiary: #a0a0a0;
        --text-muted: #666666;
        --text-code: #f8f8f2;
        
        /* Spacing Scale */
        --space-xs: 0.25rem;
        --space-sm: 0.5rem;
        --space-md: 1rem;
        --space-lg: 1.5rem;
        --space-xl: 2rem;
        --space-2xl: 3rem;
        --space-3xl: 4rem;
        --space-4xl: 6rem;
        
        /* Documentation Layout */
        --sidebar-width: 280px;
        --toc-width: 240px;
        --content-max-width: 800px;
        --header-height: 64px;
        
        /* Typography Scale */
        --font-xs: 0.75rem;
        --font-sm: 0.875rem;
        --font-base: 1rem;
        --font-lg: 1.125rem;
        --font-xl: 1.25rem;
        --font-2xl: 1.5rem;
        --font-3xl: 1.875rem;
        --font-4xl: 2.25rem;
        
        /* Font Families */
        --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
        --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
        
        /* Font Weights */
        --font-light: 300;
        --font-normal: 400;
        --font-medium: 500;
        --font-semibold: 600;
        --font-bold: 700;
        --font-extrabold: 800;
        
        /* Border Radius */
        --radius-sm: 0.375rem;
        --radius-md: 0.75rem;
        --radius-lg: 1rem;
        --radius-xl: 1.5rem;
        
        /* Shadows */
        --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
        --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        --shadow-glow: 0 0 20px rgba(38, 166, 91, 0.3);
        
        /* Transitions */
        --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
        --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
        --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    /* Dark theme (default) */
    [data-theme="dark"] {
        --docs-bg: #0a0a0a;
        --docs-sidebar-bg: #000000;
        --docs-content-bg: #0f0f0f;
        --docs-code-bg: #1a1a1a;
    }
    
    /* Light theme */
    [data-theme="light"] {
        --docs-bg: #ffffff;
        --docs-sidebar-bg: #f8f9fa;
        --docs-content-bg: #ffffff;
        --docs-code-bg: #f6f8fa;
        --text-primary: #24292f;
        --text-secondary: #57606a;
        --text-tertiary: #8b949e;
        --text-muted: #a1a8b0;
        --docs-border: rgba(0, 0, 0, 0.08);
    }
}

/* ===== RESET & BASE ===== */
@layer reset {
    *, *::before, *::after {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
    }
    
    html {
        scroll-behavior: smooth;
        scroll-padding-top: calc(var(--header-height) + 2rem);
    }
    
    body {
        font-family: var(--font-sans);
        font-weight: var(--font-normal);
        line-height: 1.6;
        color: var(--text-primary);
        background: var(--docs-bg);
        overflow-x: hidden;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    code, pre {
        font-family: var(--font-mono);
    }
    
    img, svg {
        display: block;
        max-width: 100%;
        height: auto;
    }
    
    button {
        font-family: inherit;
        cursor: pointer;
        border: none;
        background: none;
    }
    
    a {
        color: inherit;
        text-decoration: none;
    }
    
    ul, ol {
        list-style: none;
    }
    
    table {
        border-collapse: collapse;
        width: 100%;
    }
}

/* ===== DOCUMENTATION LAYOUT ===== */
@layer layout {
    .docs-layout {
        display: grid;
        grid-template-columns: var(--sidebar-width) 1fr var(--toc-width);
        min-height: calc(100vh - var(--header-height));
        margin-top: var(--header-height);
    }
    
    .docs-sidebar {
        background: var(--docs-sidebar-bg);
        border-right: 1px solid var(--docs-border);
        position: sticky;
        top: var(--header-height);
        height: calc(100vh - var(--header-height));
        overflow-y: auto;
    }
    
    .docs-main {
        background: var(--docs-content-bg);
        min-height: calc(100vh - var(--header-height));
        display: flex;
        flex-direction: column;
    }
    
    .docs-content {
        flex: 1;
        max-width: var(--content-max-width);
        padding: var(--space-2xl);
        margin: 0 auto;
        width: 100%;
    }
    
    .docs-toc {
        background: var(--docs-sidebar-bg);
        border-left: 1px solid var(--docs-border);
        position: sticky;
        top: var(--header-height);
        height: calc(100vh - var(--header-height));
        overflow-y: auto;
        padding: var(--space-lg);
    }
}

/* ===== HEADER NAVIGATION ===== */
@layer components {
    .docs-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: var(--header-height);
        background: var(--glass-bg);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        border-bottom: 1px solid var(--docs-border);
        z-index: 1000;
    }
    
    .docs-nav {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 100%;
        padding: 0 var(--space-lg);
        max-width: 100%;
    }
    
    .nav-brand {
        display: flex;
        align-items: center;
        gap: var(--space-sm);
    }
    
    .brand-link {
        display: flex;
        align-items: center;
        transition: var(--transition-normal);
        
        &:hover {
            transform: scale(1.05);
        }
    }
    
    .docs-label {
        font-family: var(--font-mono);
        font-size: var(--font-sm);
        color: var(--text-tertiary);
        font-weight: var(--font-medium);
    }
    
    .nav-search {
        flex: 1;
        max-width: 400px;
        margin: 0 var(--space-xl);
    }
    
    .search-container {
        position: relative;
        display: flex;
        align-items: center;
    }
    
    .search-icon {
        position: absolute;
        left: var(--space-sm);
        width: 16px;
        height: 16px;
        color: var(--text-muted);
        z-index: 1;
    }
    
    .search-input {
        width: 100%;
        padding: var(--space-sm) var(--space-sm) var(--space-sm) var(--space-2xl);
        padding-right: 60px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid var(--docs-border);
        border-radius: var(--radius-md);
        color: var(--text-primary);
        font-size: var(--font-sm);
        transition: var(--transition-normal);
        
        &::placeholder {
            color: var(--text-muted);
        }
        
        &:focus {
            outline: none;
            border-color: var(--primary-400);
            box-shadow: 0 0 0 3px rgba(38, 166, 91, 0.1);
        }
    }
    
    .search-shortcut {
        position: absolute;
        right: var(--space-sm);
        background: rgba(255, 255, 255, 0.1);
        color: var(--text-muted);
        padding: 2px 6px;
        border-radius: 4px;
        font-size: 11px;
        font-family: var(--font-mono);
    }
    
    .nav-actions {
        display: flex;
        align-items: center;
        gap: var(--space-md);
    }
    
    .nav-link {
        color: var(--text-secondary);
        font-size: var(--font-sm);
        font-weight: var(--font-medium);
        padding: var(--space-sm) var(--space-md);
        border-radius: var(--radius-md);
        transition: var(--transition-normal);
        display: flex;
        align-items: center;
        gap: var(--space-xs);
        
        &:hover {
            color: var(--primary-400);
            background: rgba(38, 166, 91, 0.1);
        }
    }
    
    .github-icon {
        width: 16px;
        height: 16px;
    }
    
    .theme-toggle {
        width: 36px;
        height: 36px;
        border-radius: var(--radius-md);
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid var(--docs-border);
        color: var(--text-secondary);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: var(--transition-normal);
        
        &:hover {
            background: rgba(255, 255, 255, 0.1);
            color: var(--primary-400);
        }
        
        svg {
            width: 16px;
            height: 16px;
        }
        
        .moon-icon {
            display: none;
        }
    }
    
    [data-theme="light"] .theme-toggle {
        .sun-icon {
            display: none;
        }
        
        .moon-icon {
            display: block;
        }
    }
}

/* ===== SIDEBAR NAVIGATION ===== */
@layer components {
    .sidebar-content {
        padding: var(--space-lg);
    }
    
    .nav-section {
        margin-bottom: var(--space-2xl);
    }
    
    .nav-section-title {
        font-size: var(--font-sm);
        font-weight: var(--font-semibold);
        color: var(--text-primary);
        margin-bottom: var(--space-md);
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .nav-section-list {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }
    
    .nav-item {
        display: block;
        padding: var(--space-xs) var(--space-sm);
        color: var(--text-secondary);
        font-size: var(--font-sm);
        border-radius: var(--radius-sm);
        transition: var(--transition-normal);
        position: relative;
        
        &:hover {
            color: var(--text-primary);
            background: rgba(255, 255, 255, 0.05);
        }
        
        &.active {
            color: var(--primary-400);
            background: rgba(38, 166, 91, 0.1);
            font-weight: var(--font-medium);
            
            &::before {
                content: '';
                position: absolute;
                left: 0;
                top: 0;
                bottom: 0;
                width: 3px;
                background: var(--primary-400);
                border-radius: 0 2px 2px 0;
            }
        }
    }
}

/* ===== TABLE OF CONTENTS ===== */
@layer components {
    .toc-container {
        position: sticky;
        top: var(--space-lg);
    }
    
    .toc-title {
        font-size: var(--font-sm);
        font-weight: var(--font-semibold);
        color: var(--text-primary);
        margin-bottom: var(--space-md);
    }
    
    .toc-nav {
        display: flex;
        flex-direction: column;
        gap: var(--space-xs);
    }
    
    .toc-link {
        display: block;
        padding: var(--space-xs) 0;
        color: var(--text-tertiary);
        font-size: var(--font-sm);
        transition: var(--transition-normal);
        border-left: 2px solid transparent;
        padding-left: var(--space-sm);
        
        &:hover {
            color: var(--text-secondary);
        }
        
        &.active {
            color: var(--primary-400);
            border-left-color: var(--primary-400);
        }
        
        &.toc-h3 {
            padding-left: var(--space-md);
            font-size: var(--font-xs);
        }
    }
}

/* ===== CONTENT SECTIONS ===== */
@layer components {
    .docs-section {
        margin-bottom: var(--space-4xl);
        
        &:last-child {
            margin-bottom: 0;
        }
    }
    
    .section-header {
        margin-bottom: var(--space-2xl);
    }
    
    .section-title {
        font-size: var(--font-3xl);
        font-weight: var(--font-extrabold);
        color: var(--text-primary);
        margin-bottom: var(--space-md);
        line-height: 1.2;
    }
    
    .section-subtitle {
        font-size: var(--font-lg);
        color: var(--text-secondary);
        line-height: 1.5;
    }
    
    .docs-section h2 {
        font-size: var(--font-2xl);
        font-weight: var(--font-bold);
        color: var(--text-primary);
        margin: var(--space-3xl) 0 var(--space-lg);
        border-bottom: 1px solid var(--docs-border);
        padding-bottom: var(--space-sm);
        
        &:first-child {
            margin-top: 0;
        }
    }
    
    .docs-section h3 {
        font-size: var(--font-xl);
        font-weight: var(--font-semibold);
        color: var(--text-primary);
        margin: var(--space-2xl) 0 var(--space-md);
    }
    
    .docs-section h4 {
        font-size: var(--font-lg);
        font-weight: var(--font-semibold);
        color: var(--text-primary);
        margin: var(--space-xl) 0 var(--space-sm);
    }
    
    .docs-section p {
        color: var(--text-secondary);
        margin-bottom: var(--space-md);
        line-height: 1.7;
    }
    
    .section-description {
        font-size: var(--font-lg);
        color: var(--text-secondary);
        margin-bottom: var(--space-xl);
    }
}

/* ===== CODE BLOCKS ===== */
@layer components {
    code {
        background: var(--docs-code-bg);
        color: var(--text-code);
        padding: 2px 6px;
        border-radius: 4px;
        font-size: 0.9em;
        font-weight: var(--font-medium);
    }
    
    pre {
        background: var(--docs-code-bg);
        border: 1px solid var(--docs-border);
        border-radius: var(--radius-md);
        padding: var(--space-lg);
        overflow-x: auto;
        margin: var(--space-lg) 0;
        position: relative;
        
        code {
            background: none;
            padding: 0;
            color: inherit;
            font-size: var(--font-sm);
            line-height: 1.6;
        }
    }
    
    /* Prism.js theme customization */
    .token.comment,
    .token.prolog,
    .token.doctype,
    .token.cdata {
        color: #6a737d;
        font-style: italic;
    }
    
    .token.property,
    .token.tag,
    .token.boolean,
    .token.number,
    .token.constant,
    .token.symbol,
    .token.deleted {
        color: #79b8ff;
    }
    
    .token.selector,
    .token.attr-name,
    .token.string,
    .token.char,
    .token.builtin,
    .token.inserted {
        color: var(--primary-400);
    }
    
    .token.operator,
    .token.entity,
    .token.url,
    .language-css .token.string,
    .style .token.string {
        color: #f97583;
    }
    
    .token.atrule,
    .token.attr-value,
    .token.keyword {
        color: #b392f0;
    }
    
    .token.function,
    .token.class-name {
        color: #ffab70;
    }
    
    .token.regex,
    .token.important,
    .token.variable {
        color: #f97583;
    }
}

/* ===== FEATURE CARDS ===== */
@layer components {
    .content-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: var(--space-lg);
        margin: var(--space-2xl) 0;
    }
    
    .feature-card {
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid var(--docs-border);
        border-radius: var(--radius-lg);
        padding: var(--space-lg);
        transition: var(--transition-normal);
        
        &:hover {
            border-color: var(--primary-400);
            box-shadow: 0 4px 12px rgba(38, 166, 91, 0.1);
        }
    }
    
    .card-icon {
        font-size: var(--font-xl);
        margin-bottom: var(--space-md);
    }
    
    .feature-card h3 {
        font-size: var(--font-lg);
        font-weight: var(--font-semibold);
        color: var(--text-primary);
        margin-bottom: var(--space-sm);
    }
    
    .feature-card p {
        color: var(--text-secondary);
        font-size: var(--font-sm);
        margin: 0;
    }
}

/* ===== TABBED CONTENT ===== */
@layer components {
    .installation-tabs,
    .example-tabs {
        margin: var(--space-lg) 0;
    }
    
    .tab-buttons {
        display: flex;
        gap: 2px;
        background: rgba(255, 255, 255, 0.05);
        border-radius: var(--radius-md) var(--radius-md) 0 0;
        padding: 4px;
    }
    
    .tab-button {
        padding: var(--space-sm) var(--space-md);
        border-radius: var(--radius-sm);
        background: none;
        color: var(--text-secondary);
        font-size: var(--font-sm);
        font-weight: var(--font-medium);
        transition: var(--transition-normal);
        cursor: pointer;
        
        &:hover {
            color: var(--text-primary);
            background: rgba(255, 255, 255, 0.05);
        }
        
        &.active {
            color: var(--primary-400);
            background: var(--docs-code-bg);
        }
    }
    
    .tab-content {
        border: 1px solid var(--docs-border);
        border-top: none;
        border-radius: 0 0 var(--radius-md) var(--radius-md);
        overflow: hidden;
    }
    
    .tab-panel {
        display: none;
        
        &.active {
            display: block;
        }
        
        pre {
            margin: 0;
            border: none;
            border-radius: 0;
        }
    }
}

/* ===== STEP GUIDE ===== */
@layer components {
    .step-guide {
        margin: var(--space-xl) 0;
    }
    
    .step {
        display: flex;
        gap: var(--space-lg);
        margin-bottom: var(--space-2xl);
        position: relative;
        
        &:not(:last-child)::after {
            content: '';
            position: absolute;
            left: 18px;
            top: 40px;
            bottom: -24px;
            width: 2px;
            background: var(--docs-border);
        }
    }
    
    .step-number {
        flex-shrink: 0;
        width: 36px;
        height: 36px;
        background: var(--primary-500);
        color: var(--surface-primary);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: var(--font-bold);
        font-size: var(--font-sm);
    }
    
    .step-content {
        flex: 1;
        
        h3 {
            margin-top: 0;
            margin-bottom: var(--space-sm);
        }
        
        p {
            margin-bottom: var(--space-md);
        }
    }
}

/* ===== CONCEPT CARDS ===== */
@layer components {
    .concept-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: var(--space-lg);
        margin: var(--space-xl) 0;
    }
    
    .concept-card {
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid var(--docs-border);
        border-radius: var(--radius-lg);
        padding: var(--space-lg);
        
        h3 {
            color: var(--primary-400);
            margin-top: 0;
            margin-bottom: var(--space-sm);
        }
        
        p {
            margin-bottom: var(--space-md);
        }
    }
    
    .concept-details {
        margin-top: var(--space-md);
        
        strong {
            color: var(--text-primary);
            font-size: var(--font-sm);
        }
        
        ul {
            margin-top: var(--space-sm);
            padding-left: var(--space-md);
            
            li {
                color: var(--text-tertiary);
                font-size: var(--font-sm);
                margin-bottom: var(--space-xs);
                position: relative;
                
                &::before {
                    content: '•';
                    position: absolute;
                    left: -12px;
                    color: var(--primary-400);
                }
            }
        }
    }
}

/* ===== API DOCUMENTATION ===== */
@layer components {
    .api-section {
        margin: var(--space-2xl) 0;
        border: 1px solid var(--docs-border);
        border-radius: var(--radius-lg);
        overflow: hidden;
    }
    
    .api-method {
        background: rgba(255, 255, 255, 0.02);
        padding: var(--space-lg);
        margin: 0;
        font-family: var(--font-mono);
        font-size: var(--font-lg);
        color: var(--primary-400);
        border-bottom: 1px solid var(--docs-border);
    }
    
    .api-description {
        padding: var(--space-lg);
        color: var(--text-secondary);
        border-bottom: 1px solid var(--docs-border);
    }
    
    .api-params {
        padding: var(--space-lg);
        border-bottom: 1px solid var(--docs-border);
        
        h4 {
            margin-top: 0;
            margin-bottom: var(--space-md);
        }
    }
    
    .params-table {
        width: 100%;
        border-collapse: collapse;
        
        th {
            background: rgba(255, 255, 255, 0.05);
            padding: var(--space-sm);
            text-align: left;
            color: var(--text-primary);
            font-size: var(--font-sm);
            font-weight: var(--font-semibold);
            border-bottom: 1px solid var(--docs-border);
        }
        
        td {
            padding: var(--space-sm);
            color: var(--text-secondary);
            font-size: var(--font-sm);
            border-bottom: 1px solid var(--docs-border);
            
            code {
                font-size: var(--font-xs);
            }
        }
    }
    
    .api-example {
        padding: var(--space-lg);
        
        h4 {
            margin-top: 0;
            margin-bottom: var(--space-md);
        }
        
        pre {
            margin: 0;
        }
    }
}

/* ===== NOTE BOXES ===== */
@layer components {
    .note-box {
        display: flex;
        gap: var(--space-sm);
        padding: var(--space-md);
        border-radius: var(--radius-md);
        margin: var(--space-lg) 0;
        border-left: 4px solid;
        
        &.info {
            background: rgba(59, 130, 246, 0.1);
            border-left-color: #3b82f6;
        }
        
        &.warning {
            background: rgba(245, 158, 11, 0.1);
            border-left-color: #f59e0b;
        }
        
        &.error {
            background: rgba(239, 68, 68, 0.1);
            border-left-color: #ef4444;
        }
        
        &.success {
            background: rgba(34, 197, 94, 0.1);
            border-left-color: #22c55e;
        }
    }
    
    .note-icon {
        flex-shrink: 0;
        font-size: var(--font-lg);
    }
    
    .note-content {
        flex: 1;
        color: var(--text-secondary);
        
        strong {
            color: var(--text-primary);
        }
    }
}

/* ===== EXAMPLE CONTAINERS ===== */
@layer components {
    .example-container {
        margin: var(--space-xl) 0;
        
        h3 {
            margin-bottom: var(--space-md);
        }
    }
}

/* ===== FOOTER ===== */
@layer components {
    .docs-footer {
        background: var(--docs-sidebar-bg);
        border-top: 1px solid var(--docs-border);
        padding: var(--space-2xl) var(--space-lg) var(--space-lg);
        margin-top: var(--space-4xl);
    }
    
    .footer-content {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-xl);
        max-width: 1200px;
        margin: 0 auto;
    }
    
    .footer-section {
        h4 {
            font-size: var(--font-sm);
            font-weight: var(--font-semibold);
            color: var(--text-primary);
            margin-bottom: var(--space-md);
        }
        
        ul {
            display: flex;
            flex-direction: column;
            gap: var(--space-sm);
        }
        
        a {
            color: var(--text-tertiary);
            font-size: var(--font-sm);
            transition: var(--transition-normal);
            
            &:hover {
                color: var(--primary-400);
            }
        }
    }
    
    .footer-bottom {
        border-top: 1px solid var(--docs-border);
        padding-top: var(--space-lg);
        margin-top: var(--space-xl);
        text-align: center;
        color: var(--text-muted);
        font-size: var(--font-sm);
        
        p {
            margin-bottom: var(--space-xs);
        }
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@layer utilities {
    @media (max-width: 1200px) {
        .docs-layout {
            grid-template-columns: var(--sidebar-width) 1fr;
        }
        
        .docs-toc {
            display: none;
        }
    }
    
    @media (max-width: 768px) {
        .docs-layout {
            grid-template-columns: 1fr;
        }
        
        .docs-sidebar {
            position: fixed;
            top: var(--header-height);
            left: -100%;
            width: 280px;
            height: calc(100vh - var(--header-height));
            z-index: 999;
            transition: var(--transition-normal);
            
            &.open {
                left: 0;
            }
        }
        
        .docs-content {
            padding: var(--space-lg);
        }
        
        .nav-search {
            display: none;
        }
        
        .docs-nav {
            padding: 0 var(--space-md);
        }
        
        .step {
            flex-direction: column;
            gap: var(--space-md);
            
            &:not(:last-child)::after {
                display: none;
            }
        }
        
        .content-grid,
        .concept-grid {
            grid-template-columns: 1fr;
        }
        
        .footer-content {
            grid-template-columns: 1fr;
            gap: var(--space-lg);
        }
    }
    
    @media (max-width: 480px) {
        .section-title {
            font-size: var(--font-2xl);
        }
        
        .docs-section h2 {
            font-size: var(--font-xl);
        }
        
        .tab-buttons {
            flex-wrap: wrap;
        }
        
        .params-table {
            font-size: var(--font-xs);
        }
    }
}

/* ===== ACCESSIBILITY ===== */
@layer utilities {
    /* Focus styles */
    *:focus-visible {
        outline: 2px solid var(--primary-400);
        outline-offset: 2px;
    }
    
    /* Reduced motion support */
    @media (prefers-reduced-motion: reduce) {
        *, *::before, *::after {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
        }
    }
    
    /* High contrast support */
    @media (prefers-contrast: high) {
        :root {
            --docs-border: rgba(255, 255, 255, 0.3);
        }
    }
    
    /* Screen reader only */
    .sr-only {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .docs-header,
    .docs-sidebar,
    .docs-toc,
    .docs-footer {
        display: none;
    }
    
    .docs-layout {
        grid-template-columns: 1fr;
        margin-top: 0;
    }
    
    .docs-content {
        max-width: none;
        padding: 0;
    }
    
    pre {
        background: #f6f8fa;
        border: 1px solid #e1e4e8;
    }
    
    code {
        background: #f6f8fa;
    }
}