* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background-color: #f7f7f8;
    height: 100vh;
    margin: 0;
    padding: 0;
    font-size: 1.125rem;
    overflow: hidden; /* Prevent body scroll */
}

/* Allow scrolling on the landing page */
body:has(.landing-container) {
    overflow: auto;
    height: auto;
    min-height: 100vh;
}

/* Main responsive layout */
div.main-layout {
    display: flex !important;
    height: 100vh !important;
    width: 100vw !important;
}

div.main-layout div.chat-section {
    flex: 2 !important;
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    background-color: #f7f7f8 !important;
}

div.main-layout div.sidebar {
    flex: 1 !important;
    background: white !important;
    border-left: 1px solid #e5e5e7 !important;
    display: flex !important;
    flex-direction: column !important;
    min-width: 300px !important;
    max-width: 400px !important;
}

div.main-layout div.sidebar div.sidebar-content {
    flex: 1 !important;
    overflow-y: auto !important;
}

div.main-layout div.sidebar div.sidebar-bottom {
    margin-top: auto !important;
    border-top: 1px solid #e5e5e7 !important;
}

.chat-section {
    flex: 2 !important;
    background: #f7f7f8; /* Restored original background */
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    overflow-y: auto !important;
}

.sidebar {
    flex: 1 !important;
    background: white !important; /* Restored original background */
    border-left: 1px solid #e5e5e7 !important;
    display: flex !important;
    flex-direction: column !important;
    min-width: 300px !important;
    max-width: 400px !important;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
}

.sidebar-bottom {
    margin-top: auto;
    border-top: 1px solid #e5e5e7;
}

.header {
    background: white;
    border-bottom: 1px solid #e5e5e7;
    padding: 1.5rem;
    text-align: center;
}

.header h1 {
    color: #1a1a1a;
    font-size: 1.5rem;
    font-weight: 600;
}

.header-subtitle {
    color: #666;
    font-size: 0.875rem;
    font-weight: 400;
    margin-top: 0.25rem;
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    box-shadow: 0 0 0 1px rgba(0,0,0,.1);
    margin: 1rem;
    border-radius: 0.5rem;
    overflow-y: auto;
    min-height: 0; /* Important for flex child to shrink */
}

.messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 0; /* Important for scrolling */
}

.message {
    display: flex;
    gap: 0.75rem;
}

.message.user {
    flex-direction: row-reverse;
}

.message-content {
    max-width: 70%;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    word-wrap: break-word;
}

.message.user .message-content {
    background: #007aff;
    color: white;
    border-bottom-right-radius: 0.25rem;
}

.message.assistant .message-content {
    background: #f1f1f3;
    color: #1a1a1a;
    border-bottom-left-radius: 0.25rem;
}

.avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.message.user .avatar {
    background: #007aff;
    color: white;
}

.message.assistant .avatar {
    background: #10a37f;
    color: white;
}

/* Disclaimer message styling */
.disclaimer-message {
    padding: 1rem;
    margin-bottom: 1rem;
    background: #fef7e0;
    border: 1px solid #f9cc33;
    border-radius: 0.75rem;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.disclaimer-message.hidden {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

.disclaimer-content p {
    margin: 0;
    color: #8b5a00;
    font-size: 0.875rem;
    line-height: 1.5;
    text-align: center;
}

.input-area {
    padding: 1rem;
    border-top: 1px solid #e5e5e7;
    background: white;
}

.input-container {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.input-field {
    flex: 1;
    min-height: 3rem;
    max-height: 8rem;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.75rem;
    resize: none;
    outline: none;
    font-family: inherit;
    font-size: 1.125rem;
    line-height: 1.5;
}

.input-field:focus {
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0,122,255,0.1);
}

.send-button {
    background: #007aff;
    color: white;
    border: none;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: background-color 0.2s;
}

.send-button:hover:not(:disabled) {
    background: #0056b3;
}

.send-button:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

.api-key-container {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 1rem;
    margin: 1rem;
    border-radius: 0.5rem;
    text-align: center;
}

.api-key-input {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    margin: 0 0.5rem;
    width: 300px;
}

.api-key-button {
    background: #007aff;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
}

.confidence-token {
    position: relative;
    cursor: help;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    margin: 0 0.0625rem;
    display: inline-block;
}

.confidence-high {
    background-color: rgba(34, 197, 94, 0.3);
    color: #15803d;
}

.confidence-medium {
    background-color: rgba(245, 158, 11, 0.3);
    color: #d97706;
}

.confidence-low {
    background-color: rgba(239, 68, 68, 0.3);
    color: #dc2626;
}

.tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    white-space: pre-line;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    min-width: 200px;
    max-width: 300px;
    text-align: left;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tooltip::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 8px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
}

.tooltip.above::after {
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: rgba(0, 0, 0, 0.9);
    border-bottom: none;
}

.tooltip.below::after {
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-bottom-color: rgba(0, 0, 0, 0.9);
    border-top: none;
}

.tooltip.visible {
    opacity: 1;
}

.loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
}

.loading-dots {
    display: flex;
    gap: 0.25rem;
}

.loading-dot {
    width: 0.5rem;
    height: 0.5rem;
    background: #6b7280;
    border-radius: 50%;
    animation: pulse 1.4s ease-in-out infinite both;
}

.loading-dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes pulse {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

.legend {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 1.5rem;
    font-size: 0.875rem;
}

.legend-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}

.legend-items {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
}

.token-usage {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.token-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: #6b7280;
}

.token-stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.token-label {
    font-weight: 500;
    color: #374151;
}

.token-count {
    background: #f3f4f6;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #1f2937;
}

.production-notice {
    background: linear-gradient(90deg, #10a37f, #1a7f64);
    color: white;
    text-align: center;
    padding: 0.75rem;
    margin: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(16, 163, 127, 0.3);
}

.production-notice p {
    margin: 0;
    font-weight: 500;
}

.error-notice {
    background: #ff4444;
    color: white;
    padding: 1rem;
    margin: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(255, 68, 68, 0.3);
}

.error-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
}

.error-content p {
    margin: 0;
    opacity: 0.9;
}

/* Temperature Control Styles */
.temperature-control {
    padding: 1.5rem;
    background: white;
    border-bottom: 1px solid #e5e5e7;
}

.temperature-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #333;
    font-weight: 500;
}

#temperatureValue {
    color: #007aff;
    font-weight: 600;
}

.temperature-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    opacity: 0.7;
    transition: opacity 0.2s;
    margin-bottom: 0.5rem;
    appearance: none;
    -webkit-appearance: none;
    position: relative;
}

.temperature-slider::before {
    content: '';
    position: absolute;
    left: 35%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 12px;
    background-color: #007aff;
    border-radius: 1px;
    opacity: 0.6;
}

.temperature-slider:hover {
    opacity: 1;
}

.temperature-slider::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007aff;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s;
}

.temperature-slider::-webkit-slider-thumb:hover {
    background: #0056b3;
    transform: scale(1.1);
}

.temperature-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007aff;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s;
}

.temperature-slider::-moz-range-thumb:hover {
    background: #0056b3;
    transform: scale(1.1);
}

.temperature-range {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #333;
    margin-top: 0.25rem;
    position: relative;
    font-weight: 500;
}

.detent-label {
    position: absolute;
    left: 35%;
    transform: translateX(-50%);
    font-weight: 600;
    color: #007aff;
}

/* Footer placeholder styles */
.footer-placeholder {
    padding: 1rem 1.5rem;
    background: #f1f1f3;
    border-top: 1px solid #e5e5e7;
    text-align: center;
    color: #666;
    font-size: 0.875rem;
}

.footer-placeholder p {
    margin: 0;
}

.build-info {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    opacity: 0.7;
}

.build-link a {
    color: #007aff;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.build-link a:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.commit-info {
    margin-top: 0.25rem;
}

.commit-info code {
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    background: rgba(0, 0, 0, 0.05);
    padding: 0.125rem 0.25rem;
    border-radius: 3px;
    font-size: 0.7rem;
}

/* Output Mode Toggle Styles */
.output-mode-control {
    padding: 1.5rem;
    background: white;
    border-bottom: 1px solid #e5e5e7;
}

.output-mode-label {
    text-align: center;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: #333;
    font-weight: 500;
}

.output-mode-toggle {
    display: flex;
    justify-content: center;
}

.toggle-container {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    gap: 0.5rem;
    min-width: 160px;
    width: 160px;
}

.toggle-checkbox {
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
}

.toggle-label {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    position: relative;
    width: 100%;
    height: 2rem;
}

.toggle-slider {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 3rem;
    height: 1.5rem;
    background-color: #007aff;
    border-radius: 0.75rem;
    transition: background-color 0.3s;
    z-index: 1;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 1.25rem;
    height: 1.25rem;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.toggle-checkbox:checked + .toggle-label .toggle-slider {
    background-color: #10a37f;
}

.toggle-checkbox:checked + .toggle-label .toggle-slider::before {
    transform: translateX(1.5rem);
}

.toggle-text-left,
.toggle-text-right {
    font-size: 0.8rem;
    font-weight: 500;
    color: #666;
    transition: color 0.3s;
    z-index: 2;
    position: relative;
}

.toggle-checkbox:not(:checked) + .toggle-label .toggle-text-left {
    color: #007aff;
    font-weight: 600;
}

.toggle-checkbox:checked + .toggle-label .toggle-text-right {
    color: #10a37f;
    font-weight: 600;
}

/* Markdown Styling */
.markdown-content {
    line-height: 1.6;
    color: #1a1a1a;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    margin: 1rem 0 0.5rem 0;
    font-weight: 600;
    color: #1a1a1a;
}

.markdown-content h1 { font-size: 1.5rem; }
.markdown-content h2 { font-size: 1.3rem; }
.markdown-content h3 { font-size: 1.1rem; }

.markdown-content p {
    margin: 0.5rem 0;
}

.markdown-content strong {
    font-weight: 600;
}

.markdown-content em {
    font-style: italic;
}

.markdown-content code {
    background: #f3f4f6;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-family: 'SFMono-Regular', 'Monaco', 'Consolas', monospace;
    font-size: 0.9em;
    color: #d63384;
}

.markdown-content pre {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 1rem 0;
    overflow-x: auto;
    font-family: 'SFMono-Regular', 'Monaco', 'Consolas', monospace;
    font-size: 0.875rem;
    line-height: 1.4;
}

.markdown-content pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    color: inherit;
}

.markdown-content ul,
.markdown-content ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.markdown-content li {
    margin: 0.25rem 0;
}

.markdown-content blockquote {
    border-left: 4px solid #007aff;
    margin: 1rem 0;
    padding-left: 1rem;
    color: #6b7280;
    font-style: italic;
}

.markdown-content a {
    color: #007aff;
    text-decoration: none;
}

.markdown-content a:hover {
    text-decoration: underline;
}

/* Privacy Policy Modal Styles */
.privacy-modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.privacy-modal-content {
    background-color: #ffffff;
    margin: 2% auto;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.privacy-modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e5e5e7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.privacy-modal-header h2 {
    margin: 0;
    color: #1d1d1f;
    font-size: 1.5rem;
    font-weight: 600;
}

.privacy-modal-close {
    color: #86868b;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.privacy-modal-close:hover,
.privacy-modal-close:focus {
    color: #1d1d1f;
}

.privacy-modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
    line-height: 1.6;
    color: #1d1d1f;
}

.privacy-modal-body h3 {
    color: #1d1d1f;
    font-size: 1.3rem;
    margin: 2rem 0 1rem 0;
    font-weight: 600;
}

.privacy-modal-body h4 {
    color: #424245;
    font-size: 1.1rem;
    margin: 1.5rem 0 0.75rem 0;
    font-weight: 600;
}

.privacy-modal-body p {
    margin: 1rem 0;
    color: #424245;
}

.privacy-modal-body ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.privacy-modal-body li {
    margin: 0.5rem 0;
    color: #424245;
}

.privacy-modal-body a {
    color: #007aff;
    text-decoration: none;
}

.privacy-modal-body a:hover {
    text-decoration: underline;
}

.privacy-important-notice {
    background: #f0f8ff;
    border-left: 4px solid #007aff;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 4px 4px 0;
}

.privacy-important-notice strong {
    color: #1d1d1f;
}

.privacy-modal-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e5e7;
    text-align: center;
    color: #86868b;
    font-size: 0.9rem;
}

.privacy-modal-footer p {
    margin: 0.5rem 0;
}

.privacy-modal-footer a {
    color: #007aff;
}

/* Mobile responsiveness for modal */
@media (max-width: 768px) {
    .privacy-modal-content {
        margin: 1% auto;
        width: 95%;
        max-height: 95vh;
    }
    
    .privacy-modal-header {
        padding: 1rem 1.5rem;
    }
    
    .privacy-modal-header h2 {
        font-size: 1.3rem;
    }
    
    .privacy-modal-body {
        padding: 1.5rem;
    }
    
    .privacy-modal-body h3 {
        font-size: 1.2rem;
    }
    
    .privacy-modal-body h4 {
        font-size: 1.05rem;
    }
}

/* Responsive design for mobile */
@media (max-width: 768px) {
    .main-layout {
        flex-direction: column;
    }
    
    .chat-section {
        flex: 1;
        order: 2;
    }
    
    .sidebar {
        flex: none;
        order: 1;
        border-left: none;
        border-bottom: 1px solid #e5e5e7;
        height: auto;
        max-height: 40vh;
    }
    
    .sidebar-content {
        overflow-y: visible;
    }
    
    .header {
        padding: 1rem;
    }
    
    .header h1 {
        font-size: 1.25rem;
    }
    
    .legend {
        padding: 1rem;
        margin: 1rem;
    }
    
    .legend-items {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .temperature-control {
        padding: 1rem;
    }
    
    .footer-placeholder {
        padding: 0.75rem 1rem;
    }
    
    .build-info {
        font-size: 0.7rem;
    }
    
    .production-notice {
        margin: 0.5rem;
    }
    
    .chat-container {
        margin: 0.5rem;
    }
    
    .toggle-container {
        min-width: 180px;
        gap: 0.75rem;
    }
    
    .toggle-text-left,
    .toggle-text-right {
        font-size: 0.75rem;
    }
}

/* Responsive adjustments for production */
@media (max-width: 768px) {
    .production-notice {
        margin: 0.5rem;
    }
    
    .header-subtitle {
        font-size: 0.8rem;
    }
}

/* ==============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================== */

/* Skip link for keyboard navigation */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 1000;
    border-radius: 0 0 4px 4px;
}

.skip-link:focus {
    top: 0;
}

/* Visually hidden class for screen reader only content */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Enhanced focus styles for better keyboard navigation */
button:focus,
input:focus,
textarea:focus,
a:focus,
[tabindex]:focus {
    outline: 2px solid #4A9EFF !important;
    outline-offset: 2px !important;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .confidence-high {
        background-color: #000 !important;
        color: #fff !important;
        border: 2px solid #fff !important;
    }
    
    .confidence-medium {
        background-color: #666 !important;
        color: #fff !important;
        border: 2px solid #fff !important;
    }
    
    .confidence-low {
        background-color: #fff !important;
        color: #000 !important;
        border: 2px solid #000 !important;
    }
}

/* 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;
        scroll-behavior: auto !important;
    }
}

/* Better modal accessibility */
.privacy-modal[aria-modal="true"] {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.8) !important;
    z-index: 1000 !important;
}

/* Legend improvements */
.legend-description {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 1rem;
    font-style: italic;
}

.legend ul.legend-items {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.legend li.legend-item {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 0.5rem !important;
}

/* Better form labeling */
.api-key-input-group {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

/* Ensure proper heading hierarchy styling */
h1 { font-size: 1.5rem; line-height: 1.2; }
h2 { font-size: 1.3rem; line-height: 1.2; }
h3 { font-size: 1.1rem; line-height: 1.2; }
h4 { font-size: 1rem; line-height: 1.2; }
h5 { font-size: 0.9rem; line-height: 1.2; }

/* Color contrast improvements */
.privacy-important-notice {
    border-left: 4px solid #ff6b35;
    padding-left: 1rem;
    background-color: rgba(255, 107, 53, 0.1);
    margin: 1rem 0;
    border-radius: 0 4px 4px 0;
}

/* Improved button accessibility */
button[aria-label] {
    position: relative;
}

.privacy-modal-close {
    background: none !important;
    border: none !important;
    font-size: 1.5rem !important;
    cursor: pointer !important;
    padding: 0.5rem !important;
    border-radius: 4px !important;
}

.privacy-modal-close:hover {
    background-color: rgba(0, 0, 0, 0.1) !important;
}

/* ==============================================
   DEMO NAVIGATION STYLES
   ============================================== */

.demos-navigation {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e5e7;
}

.demos-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.demo-link {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.demo-link:hover {
    background: #e9ecef;
    border-color: #007aff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.demo-link strong {
    color: #1a1a1a;
    font-weight: 600;
    font-size: 0.9375rem;
}

.demo-link span {
    color: #666;
    font-size: 0.8125rem;
    line-height: 1.3;
}

.demo-link-active {
    background: #007aff;
    border-color: #0056cc;
    color: white;
}

.demo-link-active strong {
    color: white;
}

.demo-link-active span {
    color: rgba(255, 255, 255, 0.8);
}

.demo-link-active:hover {
    background: #0056cc;
    color: white;
    transform: none;
}

/* ==============================================
   END ACCESSIBILITY IMPROVEMENTS
   ============================================== */

/* Home Link Styles */
.home-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #007aff;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    transition: color 0.2s ease;
}

.home-link:hover {
    color: #0056cc;
    text-decoration: underline;
}
