:root {
    /* Base Palette - Linear/Vercel Style */
    --bg-background: #000000;
    --bg-secondary: #0a0a0a;
    --bg-card: #111111;
    --text-primary: #ededed;
    --text-secondary: #a1a1aa;
    --text-tertiary: #52525b;
    --border-color: #27272a;
    --border-hover: #3f3f46;
    
    /* Brand Colors */
    --primary: #ffffff; /* Linear style uses white text on black for primary actions */
    --primary-foreground: #000000;
    --accent: #2563eb; /* Blue accent for links/highlights */
    --accent-glow: rgba(37, 99, 235, 0.15);
    
    /* Status */
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;

    /* Metrics */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;
    
    /* Layout */
    --container-width: 1200px;
    --header-height: 64px;
}

/* Light Theme Variables */
body.light-mode {
    --bg-background: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-card: #ffffff;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-tertiary: #9ca3af;
    --border-color: #e5e7eb;
    --border-hover: #d1d5db;
    --primary: #000000;
    --primary-foreground: #ffffff;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--font-sans);
    background-color: var(--bg-background);
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-top: 0;
}

a { color: var(--text-primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--text-secondary); }

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.grid { display: grid; gap: 2rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Docs Layout */
.docs-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 4rem;
}

.docs-sidebar {
    position: sticky;
    top: 100px;
    height: calc(100vh - 100px);
    overflow-y: auto;
}

@media (max-width: 768px) {
    .docs-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .docs-sidebar {
        position: static;
        height: auto;
        margin-bottom: 2rem;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 1rem;
    }
}

/* Header & Nav */
.navbar {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9000;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

/* Light mode navbar background */
body.light-mode .navbar {
    background: rgba(255, 255, 255, 0.85);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-link {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}
.nav-link:hover { color: var(--text-primary); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-full); /* Linear style pill buttons */
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
}
.btn-primary:hover {
    background: #e5e5e5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-color);
}
.btn-secondary:hover {
    border-color: var(--text-secondary);
    background: var(--bg-secondary);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}
.btn-ghost:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* Cards & Sections */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: border-color 0.2s;
}

.card:hover {
    border-color: var(--border-hover);
}

/* Hero Section */
.hero {
    padding: 8rem 0 6rem;
    text-align: center;
    background: radial-gradient(ellipse at top, rgba(37,99,235,0.15) 0%, rgba(0,0,0,0) 50%);
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    background: linear-gradient(to bottom right, #ffffff 0%, #a1a1aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

/* Features */
.feature-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.feature-wide {
    grid-column: span 3;
}

@media (max-width: 768px) {
    .feature-wide {
        grid-column: auto;
    }
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
    background: var(--bg-secondary);
}

.footer-col h4 { margin-bottom: 1rem; font-size: 0.9rem; color: var(--text-primary); }
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a { color: var(--text-secondary); font-size: 0.9rem; }
.footer-col a:hover { color: var(--text-primary); }

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.badge-accent {
    background: rgba(37, 99, 235, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(37, 99, 235, 0.3);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

/* ============================================================
   ACCESSIBILITY FEATURES - WCAG 2.1 AA Compliance
   ============================================================ */

/* Screen Reader Only - visually hidden but accessible */
.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;
}

/* Skip Link - WCAG 2.4.1 Bypass Blocks */
.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--primary-foreground);
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    z-index: 10000;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 1rem;
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* Focus Indicators - WCAG 2.4.7 Focus Visible */
:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* Enhanced focus for accessibility mode */
body.a11y-focus-highlight *:focus,
body.a11y-focus-highlight *:focus-visible {
    outline: 4px solid #ff6b00 !important;
    outline-offset: 4px !important;
    box-shadow: 0 0 0 8px rgba(255, 107, 0, 0.3) !important;
}

/* High Contrast Mode - WCAG 1.4.3, 1.4.6 */
body.a11y-high-contrast {
    --bg-background: #000000;
    --bg-secondary: #000000;
    --bg-card: #000000;
    --text-primary: #ffffff;
    --text-secondary: #ffffff;
    --text-tertiary: #ffffff;
    --border-color: #ffffff;
    --border-hover: #ffffff;
    --primary: #ffff00;
    --primary-foreground: #000000;
    --accent: #00ffff;
}

body.a11y-high-contrast a {
    color: #ffff00 !important;
    text-decoration: underline !important;
}

body.a11y-high-contrast button,
body.a11y-high-contrast .btn {
    border: 2px solid #ffffff !important;
}

/* Inverted Colors */
body.a11y-invert-colors {
    filter: invert(1) hue-rotate(180deg);
}

body.a11y-invert-colors img,
body.a11y-invert-colors video,
body.a11y-invert-colors svg {
    filter: invert(1) hue-rotate(180deg);
}

/* Dyslexia-Friendly Font - WCAG 1.4.12 Text Spacing */
body.a11y-dyslexia-font {
    font-family: 'OpenDyslexic', 'Comic Sans MS', 'Arial', sans-serif !important;
    letter-spacing: 0.1em;
    word-spacing: 0.2em;
}

body.a11y-dyslexia-font * {
    font-family: inherit !important;
}

/* Increased Line Height - WCAG 1.4.12 Text Spacing */
body.a11y-line-height {
    line-height: 2 !important;
}

body.a11y-line-height p,
body.a11y-line-height li,
body.a11y-line-height span,
body.a11y-line-height div {
    line-height: 2 !important;
}

/* Highlight Links - WCAG 1.4.1 Use of Color */
body.a11y-highlight-links a {
    background-color: #ffff00 !important;
    color: #000000 !important;
    padding: 2px 4px !important;
    text-decoration: underline !important;
    font-weight: bold !important;
}

/* Large Cursor */
body.a11y-cursor-large,
body.a11y-cursor-large * {
    cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="%23000" stroke="%23fff" stroke-width="1" d="M4 4l7.07 17 2.51-7.39L21 11.07z"/></svg>') 0 0, auto !important;
}

/* Stop Animations - WCAG 2.3.3 Animation from Interactions */
body.a11y-stop-animations,
body.a11y-stop-animations * {
    animation: none !important;
    transition: none !important;
}

/* Respect Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Font Size Scaling */
body.a11y-font-1 { font-size: 106.25%; }
body.a11y-font-2 { font-size: 112.5%; }
body.a11y-font-3 { font-size: 118.75%; }
body.a11y-font-4 { font-size: 125%; }
body.a11y-font-5 { font-size: 131.25%; }

/* ============================================================
   COOKIE CONSENT BANNER
   ============================================================ */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem;
    z-index: 9999;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-banner[hidden] {
    display: none;
}

.cookie-banner-content {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-banner-text {
    flex: 1;
    min-width: 300px;
}

.cookie-banner-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    color: var(--text-primary);
}

.cookie-banner-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

.cookie-banner-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Cookie Preferences Panel */
.cookie-preferences-panel {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem;
    margin-top: 1rem;
    border-radius: var(--radius-lg);
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
}

.cookie-preferences-panel[hidden] {
    display: none;
}

.cookie-preferences-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.cookie-preferences-header h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.cookie-preferences-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.cookie-preferences-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.cookie-preferences-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cookie-category {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.cookie-category-info h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
    color: var(--text-primary);
}

.cookie-category-info p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Cookie Toggle Switch */
.cookie-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.cookie-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-label {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    background: var(--border-color);
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.2s;
}

.cookie-toggle-label::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--text-primary);
    border-radius: 50%;
    transition: transform 0.2s;
}

.cookie-toggle input:checked + .cookie-toggle-label {
    background: var(--accent);
}

.cookie-toggle input:checked + .cookie-toggle-label::after {
    transform: translateX(20px);
}

.cookie-toggle input:disabled + .cookie-toggle-label {
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-toggle input:focus-visible + .cookie-toggle-label {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.cookie-always-on {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cookie-preferences-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.cookie-learn-more {
    font-size: 0.875rem;
    color: var(--accent);
    text-decoration: underline;
}

.cookie-learn-more:hover {
    color: var(--text-primary);
}

/* ============================================================
   FLOATING WIDGETS (Bottom Left)
   ============================================================ */

.floating-widgets {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
}

/* Widget Toggle Button */
.widget-toggle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.widget-toggle:hover {
    background: var(--bg-secondary);
    border-color: var(--border-hover);
    transform: scale(1.05);
}

.widget-toggle:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.widget-toggle[hidden] {
    display: none;
}

/* Accessibility Widget */
.accessibility-widget {
    position: relative;
}

.accessibility-toggle {
    background: linear-gradient(135deg, var(--accent) 0%, #1d4ed8 100%);
    border-color: transparent;
    color: #ffffff;
}

.accessibility-toggle:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

/* Cookie Widget */
.cookie-widget-toggle {
    background: var(--bg-card);
}

/* Widget Panel */
.widget-panel {
    position: absolute;
    bottom: 60px;
    left: 0;
    width: 320px;
    max-height: 80vh;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    animation: fadeInUp 0.2s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.widget-panel[hidden] {
    display: none;
}

.widget-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.widget-panel-header h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.widget-panel-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.widget-panel-close:hover {
    color: var(--text-primary);
}

.widget-panel-body {
    padding: 1rem 1.25rem;
}

/* Accessibility Panel Sections */
.accessibility-section {
    margin-bottom: 1.25rem;
}

.accessibility-section:last-child {
    margin-bottom: 0;
}

.accessibility-section h4 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    margin: 0 0 0.75rem;
}

.accessibility-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.accessibility-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem;
    min-width: 70px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.75rem;
}

.accessibility-option:hover {
    background: var(--bg-background);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.accessibility-option[aria-pressed="true"] {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
}

.accessibility-option:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.accessibility-reset-all {
    width: 100%;
    margin-top: 0.5rem;
}

.accessibility-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.accessibility-statement-link {
    font-size: 0.8125rem;
    color: var(--accent);
    text-decoration: underline;
}

/* ============================================================
   LEGAL PAGES STYLING
   ============================================================ */

.legal-page {
    padding: 4rem 0;
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.legal-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(to bottom right, #ffffff 0%, #a1a1aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.legal-meta {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.legal-intro {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--accent);
}

.legal-section {
    margin-bottom: 2.5rem;
}

.legal-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.legal-section h2::before {
    content: '';
    width: 4px;
    height: 1.5rem;
    background: var(--accent);
    border-radius: 2px;
}

.legal-section h3 {
    font-size: 1.125rem;
    margin: 1.5rem 0 0.75rem;
    color: var(--text-primary);
}

.legal-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.legal-section ul {
    color: var(--text-secondary);
    line-height: 1.8;
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.legal-section li {
    margin-bottom: 0.5rem;
}

.legal-highlight {
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin: 1rem 0;
}

.legal-highlight strong {
    color: var(--text-primary);
}

.legal-company-info {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 3rem;
}

.legal-company-info h3 {
    font-size: 1rem;
    margin: 0 0 1rem;
    color: var(--text-primary);
}

.legal-company-info p {
    margin: 0.25rem 0;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.legal-company-info a {
    color: var(--accent);
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */

@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        max-width: 100%;
    }

    .cookie-banner-text {
        min-width: 0;
    }

    .cookie-banner-actions {
        justify-content: center;
    }

    .cookie-preferences-footer {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .floating-widgets {
        bottom: 1rem;
        left: 1rem;
    }

    .widget-panel {
        width: calc(100vw - 2rem);
        max-width: 320px;
    }

    .legal-header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .cookie-banner {
        padding: 1rem;
    }

    .cookie-banner-actions {
        flex-direction: column;
        width: 100%;
    }

    .cookie-banner-actions .btn {
        width: 100%;
    }

    .cookie-preferences-footer {
        flex-direction: column;
    }

    .accessibility-options {
        justify-content: center;
    }
}

/* Docs TOC */
.toc-link {
    color: var(--text-secondary);
    display: block;
    text-decoration: none;
    font-size: 0.9rem;
    border-left: 2px solid transparent;
    padding-left: 1rem;
    transition: all 0.2s;
}

.toc-link:hover {
    color: var(--text-primary);
}

.toc-link.active {
    color: var(--accent) !important;
    border-left-color: var(--accent) !important;
}

/* Mobile Menu Styles */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-card);
        border-bottom: 1px solid var(--border-color);
        padding: 1.5rem;
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.open {
        display: flex;
        animation: slideDown 0.2s ease-out;
    }

    .nav-links {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .nav-link {
        display: block;
        padding: 0.5rem 0;
    }

    .nav-actions {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .nav-actions .btn {
        width: 100%;
    }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Language Dropdown */
.lang-switch {
    position: relative;
    z-index: 101;
}

.lang-dropdown {
    position: relative;
    display: inline-block;
}

.lang-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--bg-card);
    min-width: 140px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 1000;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    margin-top: 0.5rem;
    animation: fadeIn 0.2s ease-out;
    white-space: nowrap; /* Prevent wrapping */
}

.lang-dropdown:hover .lang-dropdown-content,
.lang-dropdown:focus-within .lang-dropdown-content {
    display: flex; /* Use flex to ensure proper stacking */
    flex-direction: column; /* Stack items vertically */
}

.lang-dropdown-item {
    color: var(--text-secondary);
    padding: 0.6rem 1rem;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.lang-dropdown-item:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.lang-dropdown-item.active {
    color: var(--accent);
    font-weight: 500;
    background-color: rgba(37, 99, 235, 0.05);
}

/* System Notifications */
.system-notification-bar {
    width: 100%;
    z-index: 9999;
    font-size: 0.95rem;
    line-height: 1.5;
}

.animate-slide-down {
    animation: slideDown 0.5s ease-out forwards;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
