/* ============================================================
FINANCIAL DASHBOARD - EXTERNAL CSS FILE
All non-critical styles that load after initial render
============================================================ */

/* ===== INTRO DASHBOARD ===== */

.methodology-section {
    margin-bottom: 4rem;
}

.methodology-section h2 {
    font-size: 2rem;
    margin: 0 0 2rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-icon {
    font-size: 2rem;
}

.methodology-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .methodology-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.methodology-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.methodology-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.methodology-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.methodology-card h3 {
    font-size: 1.25rem;
    margin: 0 0 1rem 0;
    color: #1e293b;
}

.methodology-content {
    color: #475569;
}

.methodology-content ul,
.methodology-content ol {
    margin: 0.5rem 0 1rem 1.5rem;
}

.methodology-content li {
    margin-bottom: 0.25rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background: #f1f5f9;
    border-radius: 6px;
    font-size: 0.75rem;
    margin-right: 0.5rem;
}

/* Data Sources */
.data-sources {
    margin-top: 3rem;
}

.data-sources h3 {
    font-size: 1.5rem;
    margin: 0 0 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sources-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .sources-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.source-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.source-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.source-logo {
    width: 60px;
    height: 60px;
    background: #1e293b;
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.sec-source .source-logo {
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
}

.alpha-source .source-logo {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
}

.source-header h4 {
    margin: 0;
    font-size: 1.25rem;
    color: #1e293b;
}

.source-content {
    padding: 1.5rem;
}

.source-content p {
    margin: 0 0 1rem 0;
    color: #475569;
}

.source-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    margin-top: 1rem;
}

.source-link:hover {
    text-decoration: underline;
}

/* FAQ Section */
.faq-section {
    margin-bottom: 4rem;
}

.faq-section h2 {
    font-size: 2rem;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.faq-intro {
    color: #64748b;
    margin: 0 0 2rem 0;
    font-size: 1.125rem;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.faq-question {
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: white;
    border: none;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
}

.faq-question:hover {
    background: #f8fafc;
}

.faq-question[aria-expanded="true"] {
    background: #f8fafc;
}

.faq-question[aria-expanded="true"] .faq-toggle {
    transform: rotate(45deg);
}

.faq-number {
    background: #3b82f6;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    margin-right: 1rem;
    flex-shrink: 0;
}

.faq-text {
    flex: 1;
    text-align: left;
}

.faq-toggle {
    font-size: 1.5rem;
    font-weight: 300;
    transition: transform 0.3s ease;
    color: #64748b;
    margin-left: 1rem;
}

.faq-answer {
    padding: 1.5rem;
    background: white;
    border-top: 1px solid #e2e8f0;
    color: #475569;
}

.faq-answer p {
    margin: 0 0 1rem 0;
}

/* Support CTA */
.support-cta {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border-radius: 16px;
    padding: 2rem;
    margin-top: 3rem;
    text-align: center;
}

.support-content {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.support-icon {
    font-size: 3rem;
}

.support-text h3 {
    font-size: 1.75rem;
    margin: 0 0 0.5rem 0;
}

.support-text p {
    opacity: 0.9;
    margin: 0 0 1.5rem 0;
}

.support-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.support-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid white;
    background: transparent;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.support-btn:hover {
    background: white;
    color: #3b82f6;
}

/* ===== PERFORMANCE TABLE ===== */

.fp-table-container {
    margin-top: 20px;
    overflow-x: auto;
}

.fp-main-table-wrapper {
    max-height: 600px;
    overflow: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.fp-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
    font-size: 14px;
    min-width: 2000px;
}

.fp-table th {
    background-color: #28a745;
    color: white;
    padding: 12px 8px;
    text-align: center;
    font-weight: bold;
    text-transform: uppercase;
    border: 1px solid #1e7e34;
    position: sticky;
    top: 0;
    z-index: 10;
}

.fp-table th.sl-no-column {
    position: sticky;
    left: 0;
    z-index: 20;
}

.fp-table td {
    padding: 8px;
    border-bottom: 1px solid #ddd;
    border-right: 1px solid #eee;
    text-align: center;
}

.fp-table td.sl-no-column {
    position: sticky;
    left: 0;
    background-color: #28a745;
    color: white;
    font-weight: bold;
    z-index: 5;
}

.fp-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.fp-table tr:nth-child(even) td.sl-no-column {
    background-color: #28a745;
}

.fp-table tr:hover {
    background-color: #e9ecef;
}

.fp-table tr:hover td.sl-no-column {
    background-color: #218838;
}

.fp-filter-table {
    background-color: #e8f5e8 !important;
    border: 2px solid #28a745;
    border-radius: 5px;
    margin-bottom: 20px;
}

.hidden {
    display: none;
}

.positive {
    color: #28a745;
    font-weight: bold;
}

.negative {
    color: #dc3545;
    font-weight: bold;
}

.sl-no-column {
    background-color: #28a745;
    color: white;
    font-weight: bold;
    min-width: 60px;
}

.fp-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.fp-pagination button {
    padding: 8px 15px;
    border: 1px solid #28a745;
    background-color: white;
    color: #28a745;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.fp-pagination button:hover:not(:disabled) {
    background-color: #28a745;
    color: white;
}

.fp-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.fp-pagination-info {
    color: #28a745;
    font-weight: bold;
    margin: 0 10px;
}

/* ===== INSIGHTS DASHBOARD ===== */

.insights-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e1e5e9;
}

.insights-section h2 {
    color: #2d3748;
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.insights-section h2 .icon {
    font-size: 1.4rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    background: #edf2f7;
}

.stat-label {
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2d3748;
}

/* Commentary */
.commentary-content {
    line-height: 1.7;
    color: #4a5568;
    font-size: 1.05rem;
}

.commentary-content h3 {
    color: #2d3748;
    margin-top: 25px;
    margin-bottom: 15px;
}

.commentary-content ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.commentary-content li {
    margin-bottom: 8px;
}

.commentary-content strong {
    color: #2d3748;
}

/* Trends Grid */
.trends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.trend-card {
    background: #f8fafc;
    padding: 25px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.trend-card h3 {
    color: #2d3748;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.performer-list {
    list-style: none;
    padding: 0;
    margin: 15px 0 0 0;
}

.performer-list li {
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.performer-list li:last-child {
    border-bottom: none;
}

/* ===== LEADERS DASHBOARD ===== */

.dashboard-hero {
    text-align: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.dashboard-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
}

.dashboard-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0 0 1.5rem 0;
}

.quick-stats {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.stat-pill {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    backdrop-filter: blur(10px);
}

.stat-icon {
    font-size: 1rem;
}

/* Featured Leaders */
.featured-leaders {
    margin-bottom: 2rem;
}

.featured-leaders h2,
.comparison-tools h2,
.market-insights h2 {
    font-size: 1.25rem;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-icon {
    font-size: 1.25rem;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

.featured-card {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    position: relative;
    overflow: hidden;
}

.featured-rank {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #f3f4f6;
    color: #374151;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.featured-ticker {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.featured-growth {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.featured-growth.positive {
    color: #059669;
}

.featured-growth.negative {
    color: #dc2626;
}

.trend-icon {
    font-size: 1.25rem;
}

.featured-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #374151;
}

/* Leaderboard Tabs */
.leaderboard-tabs {
    display: flex;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 0.25rem;
    margin-bottom: 1.5rem;
}

.tab-btn {
    flex: 1;
    padding: 0.75rem 0.5rem;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    text-align: center;
}

.tab-btn.active {
    background: white;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

/* Leaderboard Tables */
.leaderboard-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .leaderboard-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

.leaderboard-section h3 {
    font-size: 1rem;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.leaderboard-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.table-header {
    display: grid;
    grid-template-columns: 60px 1fr 100px 80px;
    background: #f9fafb;
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.75rem;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
}

.table-row {
    display: grid;
    grid-template-columns: 60px 1fr 100px 80px;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
}

.table-row:last-child {
    border-bottom: none;
}

.header-cell, .row-cell {
    display: flex;
    align-items: center;
}

.rank-badge {
    width: 1.75rem;
    height: 1.75rem;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.positive { color: #059669; }
.negative { color: #dc2626; }
.neutral { color: #374151; }

/* ===== VISUALIZATIONS ===== */

.viz-hero {
    margin-bottom: 3rem;
    text-align: center;
}

.viz-hero h2 {
    font-size: 1.75rem;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.viz-subtitle {
    color: #334155;
    margin: 0 0 2rem 0;
    font-size: 1.125rem;
}

.hero-chart-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    background: white;
}

.hero-chart-container svg {
    width: 100%;
    height: auto;
    display: block;
    background: white;
}

.chart-overlay {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hero-chart-container:hover .chart-overlay {
    opacity: 1;
}

.chart-action {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.chart-action:hover {
    background: white;
    transform: translateY(-1px);
    box-shadow: 0 1px 3px 0 rgba(0,0,0,0.1);
}

/* Gallery Section */
.viz-gallery {
    margin-bottom: 3rem;
}

.gallery-header {
    margin-bottom: 2rem;
}

.gallery-header h3 {
    font-size: 1.5rem;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gallery-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.filter-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Chart Cards */
.chart-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chart-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.chart-header {
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chart-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.chart-badge {
    background: #e2e8f0;
    color: #334155;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.chart-container {
    position: relative;
    height: 300px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.chart-container svg {
    width: 100%;
    height: 100%;
    max-height: 280px;
}

.chart-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chart-btn {
    padding: 0.375rem 0.75rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.chart-btn:hover {
    background: #e2e8f0;
}

.chart-stats,
.correlation-stats {
    font-size: 0.875rem;
    color: #334155;
}

.stat {
    margin-right: 1rem;
}

/* ===== SP500 MAIN DASHBOARD ===== */

.fd-commentary {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    border-left: 4px solid #3b82f6;
    position: relative;
}

.fd-chart-commentary {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left-color: #1d4ed8;
}

.fd-commentary-badge {
    display: inline-block;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.fd-chart-commentary .fd-commentary-badge {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

.fd-commentary p {
    margin: 0;
    color: #475569;
    line-height: 1.6;
    font-size: 0.95rem;
}

.fd-table-container {
    overflow-x: auto;
    border-radius: 10px;
    margin-top: 20px;
}

.fd-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.fd-table th {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 18px 16px;
    font-weight: 600;
    text-align: left;
    font-size: 0.95rem;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.fd-table th:last-child {
    border-right: none;
}

.fd-table th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6 0%, #1d4ed8 100%);
}

.fd-table td {
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.95rem;
    color: #475569;
    transition: all 0.2s ease;
}

.fd-table tr:hover td {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    color: #1e293b;
}

.fd-table tr:last-child td {
    border-bottom: none;
}

.fd-chart-container {
    height: 380px;
    margin: 20px 0;
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e2e8f0;
}

/* ===== MOBILE OPTIMIZATIONS ===== */

@media (max-width: 768px) {
    /* Performance Table */
    .fp-table {
        font-size: 12px;
    }
    
    .fp-table th,
    .fp-table td {
        padding: 6px 4px;
    }
    
    .fp-main-table-wrapper {
        max-height: 500px;
    }
    
    .fp-pagination {
        flex-direction: column;
        gap: 8px;
    }
    
    .sl-no-column {
        min-width: 50px;
    }
    
    /* Insights */
    .insights-section {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .trends-grid {
        grid-template-columns: 1fr;
    }
    
    /* Leaders Dashboard */
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .table-header,
    .table-row {
        grid-template-columns: 50px 1fr 80px 70px;
        padding: 0.625rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .comparison-grid {
        grid-template-columns: 1fr;
    }
    
    .tab-btn {
        padding: 0.625rem 0.375rem;
        font-size: 0.8125rem;
    }
    
    /* Visualizations */
    .viz-hero h2 {
        font-size: 1.5rem;
    }
    
    .gallery-controls {
        justify-content: center;
    }
    
    .chart-footer {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    .chart-btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    /* Performance Table */
    .financial-performance-container {
        margin: 10px 0;
    }
    
    .fp-controls {
        padding: 10px;
    }
    
    .fp-table {
        font-size: 11px;
    }
    
    .fp-table th,
    .fp-table td {
        padding: 4px 2px;
    }
    
    /* Intro */
    .intro-hero {
        padding: 1.5rem 1rem;
    }
    
    .intro-hero h2 {
        font-size: 1.75rem;
        flex-direction: column;
    }
    
    .hero-stats {
        gap: 1rem;
    }
    
    .stat-item {
        min-width: 70px;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    /* Leaders */
    .dashboard-title {
        font-size: 1.5rem;
    }
    
    .dashboard-subtitle {
        font-size: 0.875rem;
    }
    
    .quick-stats {
        flex-direction: column;
        align-items: center;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    /* Visualizations */
    .viz-hero h2 {
        font-size: 1.25rem;
    }
    
    .viz-subtitle {
        font-size: 1rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* Touch-friendly sizes for mobile */
.tab-btn,
.featured-card {
    min-height: 44px;
}

.table-row {
    min-height: 52px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .methodology-card,
    .faq-question,
    .support-btn,
    .chart-card,
    .chart-action,
    .chart-btn,
    .filter-btn,
    .featured-card,
    .tab-btn,
    .stat-card {
        transition: none;
    }
    
    .faq-toggle {
        transition: none;
    }
}

/* Accessibility focus styles */
.faq-question:focus,
.support-btn:focus,
.chart-action:focus,
.chart-btn:focus,
.filter-btn:focus,
.tab-btn:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.error {
    background: #fee2e2;
    color: #dc2626;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    margin: 1rem 0;
}