* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0A0F1A;
    --secondary: #0066FF;
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #e74c3c;
    --light: #ecf0f1;
    --dark: #34495e;
    --text: #0A0F1A;
    --color-primary: #0066FF;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: #FFFFFF;
    min-height: 100vh;
}

.navbar {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.logo {
    color: var(--primary);
    font-size: 2rem;
    font-weight: 700;
}

.tagline {
    color: var(--dark);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

main {
    padding-bottom: 3rem;
}

.hero {
    text-align: center;
    color: white;
    margin-bottom: 3rem;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.card h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.analysis-form {
    display: grid;
    gap: 1rem;
    margin-top: 0.5rem;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-row label {
    font-weight: 600;
    color: var(--primary);
}

.form-row input {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid #dfe6e9;
    font-size: 1rem;
}

.form-row input:focus {
    outline: 2px solid var(--secondary);
    border-color: var(--secondary);
}

.form-hint {
    background: #f8f9fa;
    border: 1px dashed #cfd9df;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: #555;
}

.investor-grid, .stock-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.investor-card, .stock-card {
    background: var(--light);
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.investor-card:hover, .stock-card:hover {
    border-color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.investor-card.selected, .stock-card.selected {
    border-color: var(--success);
    background: #e8f8f5;
}

.investor-card h4, .stock-card h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stock-card .ticker {
    font-weight: 700;
    color: var(--secondary);
    font-size: 1.1rem;
}

.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.tab-btn {
    background: var(--light);
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    font-weight: 500;
}

.tab-btn:hover {
    background: var(--secondary);
    color: white;
}

.tab-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.tab-btn.evaluation {
    background: var(--warning);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 500px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--light);
    border-radius: 4px;
    margin: 1rem 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary), var(--success));
    width: 0%;
    animation: progress 30s ease-in-out;
}

@keyframes progress {
    0% { width: 0%; }
    100% { width: 95%; }
}

.loading {
    text-align: center;
    padding: 1.25rem;
    color: var(--dark);
}

.results-header {
    background: white;
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.back-link {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 1rem;
}

.back-link:hover {
    color: var(--primary);
}

#analysis-content {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    min-height: 400px;
    white-space: pre-wrap;
    line-height: 1.8;
}

.investor-activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
}

.investor-activity-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem;
    background: #fdfefe;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.investor-card-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.investor-card-header h4 {
    margin: 0;
    color: var(--primary);
}

.investor-meta {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.investor-totals {
    text-align: right;
    font-size: 0.95rem;
    color: #2c3e50;
    display: grid;
    gap: 0.2rem;
}

.investor-note {
    color: #4b5563;
    font-size: 0.95rem;
    margin: 0.5rem 0 1rem;
}

.history-table-wrapper {
    overflow-x: auto;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.history-table th,
.history-table td {
    border: 1px solid #e5e7eb;
    padding: 0.5rem 0.75rem;
    text-align: left;
}

.history-table th {
    background: #f1f5f9;
    color: #1f2937;
    font-weight: 600;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.btn:hover {
    background: var(--dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--secondary);
}

footer {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
    color: var(--dark);
}

@media print {
    body {
        background: white;
    }
    .navbar, footer, .tabs, .action-buttons, .back-link {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .investor-grid, .stock-grid {
        grid-template-columns: 1fr;
    }

    .investor-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Empty content styling */
.empty-content {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px dashed #f59e0b;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    margin: 1rem 0;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.1);
}

.empty-content p {
    color: #92400e;
    font-size: 1.1rem;
    margin: 0.5rem 0;
    font-weight: 500;
}

/* Enhanced analysis formatting */
.formatted-analysis {
    line-height: 1.8;
    color: #2c3e50;
}

.phase-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
    margin: 1rem 0 1.5rem 0;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.phase-header .phase-number {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-right: 0.5rem;
}

.phase-header h4 {
    display: inline;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

.section-divider {
    border-left: 4px solid #3498db;
    padding-left: 1rem;
    margin: 1rem 0 1rem 0;
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
}

.section-divider h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.2rem;
}

.numbered-item {
    display: flex;
    margin: 1rem 0;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.numbered-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.numbered-item .number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    font-weight: 600;
    margin-right: 1rem;
    flex-shrink: 0;
}

.numbered-item .item-content { flex: 1; color: #374151; line-height: 1.5; font-family: Georgia, 'Times New Roman', serif; }

.analysis-list {
    list-style: none;
    padding-left: 0;
    margin: 1rem 0;
}

.analysis-list li {
    padding: 0.5rem 0 0.5rem 2rem;
    position: relative;
    line-height: 1.6;
}

.analysis-list li:before {
    content: "▸";
    position: absolute;
    left: 0.5rem;
    color: #3498db;
    font-weight: bold;
}

.analysis-paragraph {
    margin: 1rem 0;
    line-height: 1.8;
    font-size: 1.05rem;
}

.metric {
    display: inline-block;
    background: #e8f4f8;
    color: #2c3e50;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    margin: 0 0.2rem;
}

.formatted-analysis strong {
    color: #2c3e50;
    font-weight: 600;
}

/* ===== MODERN REDESIGN STYLES ===== */

.modern-results-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
}

.modern-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 3rem 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.modern-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-5px);
}

.header-content {
    position: relative;
    z-index: 1;
}

.modern-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin: 0 0 0.5rem 0;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.modern-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-weight: 400;
}

.modern-tabs {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    background: white;
    padding: 1rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.modern-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: #5a6c7d;
    transition: all 0.3s ease;
    min-width: 110px;
}

.modern-tab:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.modern-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.modern-tab.evaluation-tab.active {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.4);
}

.tab-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.tab-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modern-content {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    min-height: 500px;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    gap: 1.5rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-state p {
    color: #5a6c7d;
    font-size: 1.1rem;
    font-weight: 500;
}

.modern-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}

.action-btn.secondary {
    background: linear-gradient(135deg, #e0e7ff 0%, #cfd9ff 100%);
    color: #667eea;
}

.action-btn.secondary:hover {
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.25);
}

/* Enhanced investor cards */
.modern-investor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.modern-investor-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #fdfeff 100%);
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 1.25rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.modern-investor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    border-color: #667eea;
}

.investor-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.investor-name-section h4 {
    font-size: 1.3rem;
    color: #2c3e50;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
}

.ownership-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.investor-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-box {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.stat-label {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.2rem;
    color: #2c3e50;
    font-weight: 700;
}

.investor-notes {
    background: #fff9e6;
    border-left: 4px solid #ffc107;
    padding: 1rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    font-style: italic;
    color: #5a6c7d;
}

.transaction-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 1rem;
    font-size: 0.95rem;
}

.transaction-table thead th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.transaction-table thead th:first-child {
    border-top-left-radius: 8px;
}

.transaction-table thead th:last-child {
    border-top-right-radius: 8px;
}

.transaction-table tbody td {
    padding: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    background: white;
}

.transaction-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 8px;
}

.transaction-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 8px;
}

.transaction-table tbody tr:hover td {
    background: #f8f9fa;
}

.transaction-type-buy {
    color: #27ae60;
    font-weight: 600;
}

.transaction-type-sell {
    color: #e74c3c;
    font-weight: 600;
}

/* Summary and source badges */
.summary-box {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    border-left: 4px solid #0284c7;
    padding: 1.5rem;
    border-radius: 10px;
    margin: 1.5rem 0;
    box-shadow: 0 2px 10px rgba(2, 132, 199, 0.1);
}

.summary-box p {
    color: #075985;
    font-size: 1.05rem;
    line-height: 1.7;
    margin: 0;
}

.source-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    font-size: 0.95rem;
    margin-bottom: 2rem;
    border: 2px solid #86efac;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.15);
}

.source-badge strong {
    color: #15803d;
}

/* Print styles */
@media print {
    body {
        background: white;
    }
    
    .navbar, footer, .modern-tabs, .modern-actions, .back-btn {
        display: none !important;
    }
    
    .modern-header {
        background: #667eea;
        box-shadow: none;
    }
    
    .modern-content {
        box-shadow: none;
        page-break-inside: avoid;
    }
}

/* Rich Content Formatting */
.rich-content {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.05rem;
    line-height: 1.9;
    color: #1a202c;
    max-width: 900px;
}

.rich-paragraph {
    margin: 1.5rem 0;
    text-align: justify;
    text-justify: inter-word;
}

.content-header {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
    margin: 2.5rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #667eea;
}

.styled-list {
    margin: 1.5rem 0 1.5rem 2rem;
    padding: 0;
}

.styled-list li {
    margin: 1rem 0;
    line-height: 1.8;
    padding-left: 0.5rem;
}

.styled-list li::marker {
    color: #667eea;
    font-weight: 700;
}

.emphasis {
    color: #2d3748;
    font-weight: 600;
    background: linear-gradient(120deg, #fef3c7 0%, #fde68a 100%);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
}

.metric-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: linear-gradient(135deg, #e0e7ff 0%, #f3f4f6 100%);
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', monospace;
    font-size: 0.95rem;
    margin: 0 0.2rem;
    border: 1px solid #c7d2fe;
    white-space: nowrap;
}

.metric-label {
    color: #4f46e5;
    font-weight: 600;
}

.metric-value {
    color: #1e293b;
    font-weight: 700;
}

.currency {
    font-weight: 600;
    color: #059669;
    font-family: 'SF Mono', 'Monaco', monospace;
}

.percentage {
    font-weight: 600;
    color: #7c3aed;
    font-family: 'SF Mono', 'Monaco', monospace;
}

.year {
    font-weight: 600;
    color: #0891b2;
}

/* Responsive design */
@media (max-width: 768px) {
    .modern-header {
        padding: 2rem 1.5rem;
    }
    
    .modern-title {
        font-size: 1.8rem;
    }
    
    .modern-subtitle {
        font-size: 0.95rem;
    }
    
    .modern-tabs {
        justify-content: center;
    }
    
    .modern-tab {
        min-width: 90px;
        padding: 0.75rem 1rem;
    }
    
    .modern-content {
        padding: 2rem 1.5rem;
    }
    
    .modern-investor-grid {
        grid-template-columns: 1fr;
    }
    
    .investor-stats {
        grid-template-columns: 1fr;
    }
}

/* ===== RICH DOCUMENT STYLES ===== */

.doc-content { font-family: 'Georgia', 'Times New Roman', serif; font-size: 0.95rem; line-height: 1.6; color: #1f2937; max-width: 100%; }

/* Phase Headers */
.doc-phase-header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 0.65rem 0.9rem; border-radius: 7px; margin: 0.8rem 0 0.55rem 0; box-shadow: 0 3px 9px rgba(102, 126, 234, 0.2); display: flex; align-items: center; gap: 0.7rem; }

.phase-badge { background: rgba(255, 255, 255, 0.25); padding: 0.22rem 0.6rem; border-radius: 50px; font-weight: 600; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.4px; border: 1px solid rgba(255, 255, 255, 0.28); }

.phase-title { margin: 0; font-size: 1.05rem; font-weight: 700; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }

/* Section Headers */
.doc-section-header { border-left: 4px solid #667eea; background: linear-gradient(90deg, rgba(102, 126, 234, 0.08) 0%, transparent 100%); padding: 0.75rem 1.25rem; margin: 1.5rem 0 0.75rem 0; border-radius: 0 6px 6px 0; }

.doc-section-header h4 { margin: 0; font-size: 1.1rem; color: #2c3e50; font-weight: 700; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }

/* Regular Headings */
.doc-heading { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 1.1rem; font-weight: 700; color: #374151; margin: 1.25rem 0 0.5rem 0; padding-bottom: 0.3rem; border-bottom: 1px solid #e5e7eb; }

/* Paragraphs */
.doc-paragraph { margin: 0.75rem 0; line-height: 1.6; color: #374151; }

.doc-paragraph:first-letter {
    /* Removed for compact view */
}

/* Numbered Lists */
.doc-numbered-list { list-style: none; counter-reset: doc-counter; padding: 0; margin: 1rem 0; }

.doc-list-item { display: flex; align-items: flex-start; gap: 0.75rem; margin: 0.5rem 0; padding: 0.75rem; background: #f9fafb; border-radius: 6px; border-left: 3px solid #667eea; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); transition: all 0.2s ease; }

.doc-list-item:hover { transform: translateX(4px); box-shadow: 0 2px 8px rgba(102, 126, 234, 0.12); border-left-color: #764ba2; }

.item-number { flex-shrink: 0; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border-radius: 50%; font-weight: 700; font-size: 0.85rem; box-shadow: 0 2px 8px rgba(102, 126, 234, 0.25); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }

.item-content { flex: 1; color: #374151; line-height: 1.5; font-family: Georgia, 'Times New Roman', serif; }

/* Bullet Lists */
.doc-bullet-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.doc-bullet-item {
    position: relative;
    padding-left: 2rem;
    margin: 0.75rem 0;
    line-height: 1.8;
    color: #374151;
}

.doc-bullet-item::before {
    content: '●';
    position: absolute;
    left: 0.5rem;
    color: #667eea;
    font-size: 1.2rem;
    line-height: 1.6;
}

/* Key-Value Pairs */
.doc-key-value-list {
    background: #f9fafb;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border: 1px solid #e5e7eb;
}

.doc-kv-pair {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.doc-kv-pair:last-child {
    border-bottom: none;
}

.kv-key {
    font-weight: 700;
    color: #667eea;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.kv-value {
    color: #374151;
    margin: 0;
}

/* Quotes */
.doc-quote {
    margin: 1rem 0;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 5px solid #f59e0b;
    border-radius: 0 10px 10px 0;
    font-style: italic;
    color: #92400e;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
}

/* Inline Elements */
.bold-text {
    font-weight: 700;
    color: #1f2937;
}

.italic-text {
    font-style: italic;
    color: #4b5563;
}

.inline-code {
    background: #f3f4f6;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #e11d48;
    border: 1px solid #e5e7eb;
}

.metric {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.95em;
    margin: 0 0.25rem;
    white-space: nowrap;
}

.m-label {
    font-weight: 600;
    color: #1e40af;
}

.m-value {
    font-weight: 700;
    color: #1e3a8a;
}

.currency {
    color: #059669;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    background: rgba(16, 185, 129, 0.1);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}

.percentage {
    color: #7c3aed;
    font-weight: 700;
    background: rgba(124, 58, 237, 0.1);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}

.year {
    color: #6b7280;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.number {
    font-weight: 600;
    font-family: 'Courier New', monospace;
    color: #374151;
}

.doc-link {
    color: #2563eb;
    text-decoration: underline;
    transition: color 0.2s;
}

.doc-link:hover {
    color: #1d4ed8;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #9ca3af;
    font-size: 1.1rem;
}

/* Print Adjustments for Documents */
@media print {
    .doc-content { font-family: 'Georgia', 'Times New Roman', serif; font-size: 0.95rem; line-height: 1.6; color: #1f2937; max-width: 100%; }
    
    .doc-phase-header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 1rem 1.5rem; border-radius: 8px; margin: 1.5rem 0 1rem 0; box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25); display: flex; align-items: center; gap: 1rem; }
    
    .doc-list-item { display: flex; align-items: flex-start; gap: 0.75rem; margin: 0.5rem 0; padding: 0.75rem; background: #f9fafb; border-radius: 6px; border-left: 3px solid #667eea; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); transition: all 0.2s ease; }
    
    .metric, .currency, .percentage {
        background: none;
        border: 1px solid #ddd;
    }
}

/* ===== RICH DOCUMENT STYLES ===== */

.doc-header {
    margin: 0 0 0.85rem 0;
    padding: 0 0 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.doc-header h2 {
    font-size: 1.35rem;
    font-weight: 740;
    color: #0f172a;
    margin: 0 0 0.15rem 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.doc-subtitle {
    font-size: 0.95rem;
    color: #475569;
    margin: 0;
    font-weight: 550;
}

.doc-content { font-family: 'Georgia', 'Times New Roman', serif; font-size: 0.95rem; line-height: 1.6; color: #1f2937; max-width: 100%; }

/* Phase Headers */
.doc-phase-header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 0.6rem 0.8rem; border-radius: 7px; margin: 0.7rem 0 0.45rem 0; box-shadow: 0 3px 8px rgba(102, 126, 234, 0.18); display: flex; align-items: center; gap: 0.6rem; }

.phase-badge { background: rgba(255, 255, 255, 0.25); padding: 0.18rem 0.55rem; border-radius: 50px; font-weight: 650; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.38px; border: 1px solid rgba(255, 255, 255, 0.26); }

.phase-title { margin: 0; font-size: 1.02rem; font-weight: 720; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }

/* Section Headers */
.doc-section-header { border-left: 4px solid #667eea; background: linear-gradient(90deg, rgba(102, 126, 234, 0.08) 0%, transparent 100%); padding: 0.55rem 0.95rem; margin: 0.9rem 0 0.45rem 0; border-radius: 0 6px 6px 0; }

.doc-section-header h4 { margin: 0; font-size: 1rem; color: #1f2937; font-weight: 700; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }

/* Regular Headings */
.doc-heading { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 1.03rem; font-weight: 680; color: #334155; margin: 0.7rem 0 0.35rem 0; padding-bottom: 0.2rem; border-bottom: 1px solid #e5e7eb; }

/* Paragraphs */
.doc-paragraph { margin: 0.45rem 0; line-height: 1.5; color: #374151; }

/* Numbered Lists */
.doc-numbered-list { list-style: none; counter-reset: doc-counter; padding: 0; margin: 0.6rem 0; }

.doc-list-item { display: flex; align-items: flex-start; gap: 0.6rem; margin: 0.35rem 0; padding: 0.55rem; background: #f9fafb; border-radius: 6px; border-left: 3px solid #667eea; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04); transition: all 0.2s ease; }

.doc-list-item:hover { transform: translateX(4px); box-shadow: 0 2px 8px rgba(102, 126, 234, 0.12); border-left-color: #764ba2; }

.item-number { flex-shrink: 0; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border-radius: 50%; font-weight: 700; font-size: 0.8rem; box-shadow: 0 2px 6px rgba(102, 126, 234, 0.22); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }

.item-content { flex: 1; color: #374151; line-height: 1.5; font-family: Georgia, 'Times New Roman', serif; }

/* Bullet Lists */
.doc-bullet-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.doc-bullet-item {
    position: relative;
    padding-left: 2.5rem;
    margin: 1rem 0;
    line-height: 1.8;
    color: #374151;
}

.doc-bullet-item::before {
    content: '';
    position: absolute;
    left: 0.75rem;
    color: #667eea;
    font-size: 1.2rem;
    line-height: 1.6;
}

/* Key-Value Pairs */
.doc-key-value-list {
    background: #f9fafb;
    border-radius: 10px;
    padding: 1.25rem;
    margin: 1rem 0;
    border: 1px solid #e5e7eb;
}

.doc-kv-pair {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2rem;
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.doc-kv-pair:last-child {
    border-bottom: none;
}

.kv-key {
    font-weight: 700;
    color: #667eea;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.kv-value {
    color: #374151;
    margin: 0;
    font-family: Georgia, 'Times New Roman', serif;
}

/* Quotes */
.doc-quote {
    margin: 1rem 0;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 5px solid #f59e0b;
    border-radius: 0 10px 10px 0;
    font-style: italic;
    color: #92400e;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
    font-family: Georgia, 'Times New Roman', serif;
}

/* Inline Elements */
.bold-text {
    font-weight: 700;
    color: #1f2937;
}

.italic-text {
    font-style: italic;
    color: #4b5563;
}

.inline-code {
    background: #f3f4f6;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #e11d48;
    border: 1px solid #e5e7eb;
}

.metric {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.95em;
    margin: 0 0.25rem;
    white-space: nowrap;
}

.m-label {
    font-weight: 600;
    color: #1e40af;
}

.m-value {
    font-weight: 700;
    color: #1e3a8a;
}

.currency {
    color: #059669;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    background: rgba(16, 185, 129, 0.1);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}

.percentage {
    color: #7c3aed;
    font-weight: 700;
    background: rgba(124, 58, 237, 0.1);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}

.year {
    color: #6b7280;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.number {
    font-weight: 600;
    font-family: 'Courier New', monospace;
    color: #374151;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #9ca3af;
    font-size: 1.1rem;
}

/* Print Adjustments */
@media print {
    .doc-content { font-family: 'Georgia', 'Times New Roman', serif; font-size: 0.95rem; line-height: 1.6; color: #1f2937; max-width: 100%; }
    
    .doc-phase-header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 1rem 1.5rem; border-radius: 8px; margin: 1.5rem 0 1rem 0; box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25); display: flex; align-items: center; gap: 1rem; }
    
    .doc-list-item { display: flex; align-items: flex-start; gap: 0.75rem; margin: 0.5rem 0; padding: 0.75rem; background: #f9fafb; border-radius: 6px; border-left: 3px solid #667eea; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); transition: all 0.2s ease; }
    
    .metric, .currency, .percentage {
        background: none;
        border: 1px solid #ddd;
    }
}


/* Including magazine-style reading experience */
/* ===== MAGAZINE-STYLE READING EXPERIENCE ===== */

/* Reading Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    z-index: 9999;
    transition: width 0.2s ease;
}

/* Article Container - Magazine Layout */
.article-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 2rem;
    background: white;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Article Header */
.article-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.article-title {
    font-size: 3rem;
    font-weight: 900;
    color: #111827;
    line-height: 1.2;
    margin: 0 0 1rem 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    letter-spacing: -0.02em;
}

.article-subtitle {
    font-size: 1.25rem;
    color: #6b7280;
    line-height: 1.6;
    margin: 0 0 1.5rem 0;
    font-weight: 400;
}

.article-meta {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-top: 1.5rem;
}

.read-time {
    color: #9ca3af;
    font-size: 0.95rem;
    font-weight: 500;
}

.toc-toggle {
    background: #f3f4f6;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: #374151;
    transition: all 0.2s;
}

.toc-toggle:hover {
    background: #e5e7eb;
}

.data-source-badge {
    display: inline-block;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 1rem;
}

/* Executive Summary */
.executive-summary {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 4px solid #f59e0b;
    padding: 1.25rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 3rem;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.15);
}

.executive-summary h3 {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #92400e;
}

.summary-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #78350f;
}

/* Article Layout with Sidebar */
.article-layout {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 1200px) {
    .article-container {
        max-width: 1400px;
    }
    
    .article-layout {
        grid-template-columns: 250px 1fr;
    }
}

/* Table of Contents */
.article-toc {
    position: sticky;
    top: 2rem;
    align-self: start;
    background: #f9fafb;
    border-radius: 8px;
    padding: 1.5rem;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    display: none;
}

@media (min-width: 1200px) {
    .article-toc {
        display: block;
    }
}

.toc-header {
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #374151;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e5e7eb;
}

.toc-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toc-item {
    display: block;
    padding: 0.5rem 0.75rem;
    color: #6b7280;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    line-height: 1.4;
    transition: all 0.2s;
}

.toc-item:hover {
    background: #e5e7eb;
    color: #111827;
    transform: translateX(4px);
}

.toc-item.level-1 {
    font-weight: 600;
    color: #374151;
}

.toc-item.level-2 {
    padding-left: 1.5rem;
}

/* Article Body - Reading Optimized */
.article-body {
    min-width: 0; /* Fix for grid overflow */
}

/* Content Sections */
.content-section {
    margin: 1.5rem 0;
    scroll-margin-top: 2rem;
}

.phase-section {
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    border-left: 5px solid #667eea;
    padding: 1.25rem;
    border-radius: 0 12px 12px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.phase-marker {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.section-heading {
    font-size: 2rem;
    font-weight: 800;
    color: #111827;
    margin: 0;
    line-height: 1.3;
}

.subsection-heading {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 1rem 0;
    line-height: 1.4;
}

.content-heading {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    margin: 1rem 0 1rem 0;
    line-height: 1.4;
}

/* Body Text - Optimized for Reading */
.body-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #374151;
    margin: 1.5rem 0;
    font-family: Georgia, 'Times New Roman', serif;
}

.body-text:first-of-type::first-letter {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
    float: left;
    margin: 0.1rem 0.5rem 0 0;
    color: #667eea;
}

/* Lists - Magazine Style */
.readable-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.list-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin: 1rem 0;
    padding: 1.25rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s;
}

.list-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
    transform: translateX(4px);
}

.list-marker {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.95rem;
}

.bullet-marker {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
    font-size: 1.5rem;
    line-height: 1;
}

.list-content {
    flex: 1;
    font-size: 1.05rem;
    line-height: 1.7;
    color: #374151;
}

/* Callout Boxes */
.callout-box {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    border-left: 4px solid #0284c7;
    padding: 1.5rem;
    margin: 1rem 0;
    border-radius: 0 8px 8px 0;
    font-size: 1.05rem;
    line-height: 1.7;
    color: #0c4a6e;
}

/* Inline Formatting */
.inline-metric {
    background: rgba(102, 126, 234, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    white-space: nowrap;
}

.highlight-currency {
    color: #059669;
    font-weight: 700;
    background: rgba(16, 185, 129, 0.1);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}

.highlight-percent {
    color: #7c3aed;
    font-weight: 700;
    background: rgba(124, 58, 237, 0.1);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}

.highlight-year {
    color: #6b7280;
    font-weight: 600;
}

/* Investor Cards - Compact & Modern */
.investor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.investor-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s;
}

.investor-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border-color: #667eea;
    transform: translateY(-2px);
}

.investor-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.investor-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
    flex: 1;
}

.ownership-pill {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

.investor-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.metric-item {
    background: #f9fafb;
    padding: 0.75rem;
    border-radius: 6px;
}

.metric-label {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.metric-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
}

.investor-note {
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
    padding: 0.75rem;
    margin: 1rem 0;
    font-size: 0.95rem;
    color: #78350f;
    border-radius: 0 4px 4px 0;
}

/* Transaction Details - Collapsible */
.transaction-details {
    margin-top: 1rem;
}

.transaction-summary {
    cursor: pointer;
    font-weight: 600;
    color: #667eea;
    padding: 0.75rem;
    background: #f3f4f6;
    border-radius: 6px;
    user-select: none;
    transition: all 0.2s;
}

.transaction-summary:hover {
    background: #e5e7eb;
}

.transaction-table-compact {
    width: 100%;
    margin-top: 1rem;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.transaction-table-compact thead th {
    background: #f9fafb;
    padding: 0.5rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    font-size: 0.85rem;
}

.transaction-table-compact tbody td {
    padding: 0.5rem;
    border-bottom: 1px solid #f3f4f6;
}

.action-buy {
    color: #059669;
    font-weight: 600;
}

.action-sell {
    color: #dc2626;
    font-weight: 600;
}

/* Empty States */
.empty-content-card {
    text-align: center;
    padding: 4rem 2rem;
    background: #f9fafb;
    border-radius: 12px;
    color: #6b7280;
}

.empty-content-card p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.refresh-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.refresh-btn:hover {
    background: #764ba2;
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 768px) {
    .article-container {
        padding: 2rem 1rem;
    }
    
    .article-title {
        font-size: 2rem;
    }
    
    .article-subtitle {
        font-size: 1.1rem;
    }
    
    .body-text {
        font-size: 1rem;
    }
    
    .investor-grid {
        grid-template-columns: 1fr;
    }
    
    .investor-metrics {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    .reading-progress, .toc-toggle, .article-toc, .transaction-summary {
        display: none !important;
    }
    
    .article-container {
        max-width: 100%;
    }
    
    .body-text {
        font-size: 11pt;
    }
    
    .investor-card {
        page-break-inside: avoid;
    }
}

/* ===== COMPACT MODERN REDESIGN ===== */
.results-header-compact {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
    margin-bottom: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
}

.back-link-compact {
    display: inline-block;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

.back-link-compact:hover {
    background: rgba(255, 255, 255, 0.2);
}

.results-header-compact h1 {
    color: white;
    font-size: 2rem;
    margin: 0;
    font-weight: 700;
}

.analysis-container-compact {
    background: transparent;
    padding: 0;
    margin-bottom: 2rem;
    min-height: auto;
}

.compact-sections-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.compact-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

.compact-section:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.compact-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    background: linear-gradient(to right, #f8f9fa, #ffffff);
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.compact-section:hover .compact-section-header {
    background: linear-gradient(to right, #e8eaf6, #f8f9fa);
}

.compact-section.expanded .compact-section-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-bottom-color: rgba(102, 126, 234, 0.2);
}

.section-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.section-icon {
    font-size: 1.8rem;
    transition: transform 0.3s;
}

.compact-section.expanded .section-icon {
    transform: scale(1.1);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
    margin: 0;
    transition: color 0.3s;
}

.compact-section.expanded .section-title {
    color: white;
}

.pending-badge {
    background: #fef3c7;
    color: #92400e;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.section-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.read-time {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 500;
    transition: color 0.3s;
}

.compact-section.expanded .read-time {
    color: rgba(255, 255, 255, 0.9);
}

.expand-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--primary);
    transition: all 0.3s;
}

.compact-section.expanded .expand-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: rotate(180deg);
}

.compact-section-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.compact-section.expanded .compact-section-body {
    max-height: 50000px;
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.compact-content {
    line-height: 1.7;
    color: #374151;
}

.phase-marker-compact {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin: 1.5rem 0;
}

.phase-num {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.phase-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.compact-heading {
    color: var(--primary);
    font-size: 1.15rem;
    font-weight: 600;
    margin: 1.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.compact-para {
    margin: 0.75rem 0;
    line-height: 1.7;
    color: #4b5563;
}

.compact-list-numbered,
.compact-list-bullet {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.compact-list-numbered li,
.compact-list-bullet li {
    margin: 0.5rem 0;
    line-height: 1.6;
    color: #374151;
}

.insight-box {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin: 1rem 0;
    color: #92400e;
    font-weight: 500;
}

.inline-code {
    background: #f3f4f6;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #e74c3c;
}

.highlight-currency {
    color: #059669;
    font-weight: 600;
}

.highlight-percent {
    color: #3b82f6;
    font-weight: 600;
}

.highlight-year {
    color: #8b5cf6;
    font-weight: 500;
}

.empty-message {
    text-align: center;
    color: #9ca3af;
    padding: 2rem;
    font-style: italic;
}

/* Investors Compact Styles */
.investors-summary {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    color: white;
}

.summary-stat {
    flex: 1;
    text-align: center;
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
}

.investors-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.investor-card-compact {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem;
    transition: all 0.3s;
}

.investor-card-compact:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.investor-header-compact {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 0.5rem;
}

.investor-name-compact {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    line-height: 1.3;
}

.ownership-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.investor-stats-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.stat-compact {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-label-small {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

.stat-value-small {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
}

.transactions-compact {
    margin-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
    padding-top: 0.75rem;
}

.transactions-summary {
    cursor: pointer;
    font-size: 0.85rem;
    color: #3b82f6;
    font-weight: 500;
    list-style: none;
}

.transactions-summary::-webkit-details-marker {
    display: none;
}

.transactions-list {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.transaction-row {
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: 0.75rem;
    font-size: 0.85rem;
    padding: 0.5rem;
    background: white;
    border-radius: 6px;
    align-items: center;
}

.txn-date {
    color: #6b7280;
    font-size: 0.75rem;
}

.txn-action {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.75rem;
}

.txn-action.buy {
    background: #d1fae5;
    color: #065f46;
}

.txn-action.sell {
    background: #fee2e2;
    color: #991b1b;
}

.txn-value {
    color: var(--primary);
    font-weight: 600;
    text-align: right;
}

.more-txns {
    text-align: center;
    color: #6b7280;
    font-size: 0.85rem;
    font-style: italic;
    padding: 0.5rem;
}

.action-buttons-compact {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn-compact {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-compact:active {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .results-header-compact {
        padding: 1.5rem;
    }
    
    .results-header-compact h1 {
        font-size: 1.5rem;
    }
    
    .compact-section-header {
        padding: 1rem;
    }
    
    .section-icon {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
    
    .investors-grid-compact {
        grid-template-columns: 1fr;
    }
    
    .investors-summary {
        flex-direction: column;
        gap: 1rem;
    }
    
    .compact-section.expanded .compact-section-body {
        padding: 1rem;
    }
}

@media print {
    .back-link-compact,
    .action-buttons-compact,
    .expand-icon {
        display: none !important;
    }
    
    .compact-section {
        page-break-inside: avoid;
        margin-bottom: 1rem;
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
    
    .compact-section-header {
        background: white !important;
        border-bottom: 2px solid #e5e7eb !important;
    }
    
    .section-title {
        color: var(--primary) !important;
    }
    
    .compact-section-body {
        max-height: none !important;
        padding: 1rem !important;
        border-top: none !important;
    }
    
    .transactions-compact[open] {
        page-break-inside: avoid;
    }
}


/* ===== PREMIUM HTML-FIRST DOCUMENT RENDERING ===== */

.doc-content { 
    font-family: 'Georgia', 'Times New Roman', serif; 
    font-size: 1rem; 
    line-height: 1.8; 
    color: #1f2937; 
    max-width: 100%; 
}

.doc-phase-header { 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); 
    color: white; 
    padding: 1rem 1.25rem; 
    border-radius: 10px; 
    margin: 2rem 0 1.5rem 0; 
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25); 
    display: flex; 
    align-items: center; 
    gap: 1rem; 
}

.phase-badge { 
    background: rgba(255, 255, 255, 0.25); 
    padding: 0.35rem 0.85rem; 
    border-radius: 50px; 
    font-weight: 700; 
    font-size: 0.75rem; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    border: 1px solid rgba(255, 255, 255, 0.3); 
}

.phase-title { 
    margin: 0; 
    font-size: 1.2rem; 
    font-weight: 700; 
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; 
}

.doc-section-header { 
    border-left: 4px solid #667eea; 
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.08) 0%, transparent 100%); 
    padding: 0.85rem 1.5rem; 
    margin: 2rem 0 1rem 0; 
    border-radius: 0 8px 8px 0; 
}

.doc-section-header h4 { 
    margin: 0; 
    font-size: 1.15rem; 
    color: #2c3e50; 
    font-weight: 700; 
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; 
}

.doc-heading { 
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; 
    color: #111827; 
    font-weight: 700; 
    margin: 2rem 0 1rem 0; 
    line-height: 1.3; 
}

.doc-content h2 { 
    font-size: 1.75rem; 
    color: #111827; 
    border-bottom: 2px solid #e5e7eb; 
    padding-bottom: 0.5rem; 
    margin-top: 2.5rem;
}

.doc-content h3 { 
    font-size: 1.4rem; 
    color: #1f2937; 
}

.doc-content h4 { 
    font-size: 1.2rem; 
    color: #374151; 
}

.doc-divider { 
    border: none; 
    height: 2px; 
    background: linear-gradient(90deg, transparent, #e5e7eb, transparent); 
    margin: 2rem 0; 
}

.doc-paragraph { 
    margin: 1.25rem 0; 
    line-height: 1.8; 
    color: #374151; 
    text-align: justify;
}

.doc-quote { 
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05)); 
    border-left: 4px solid #667eea; 
    padding: 1rem 1.5rem; 
    margin: 1.5rem 0; 
    border-radius: 0 8px 8px 0; 
    font-style: italic; 
    color: #4b5563; 
}

.doc-code-block {
    background: #1f2937;
    color: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.doc-code-block code {
    font-family: 'Courier New', 'Monaco', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Inline formatting - premium badges */

.bold-text { 
    color: #111827; 
    font-weight: 700; 
}

.italic-text { 
    color: #6b7280; 
    font-style: italic; 
}

.inline-code { 
    background: linear-gradient(135deg, #f3e7ff 0%, #e9d5ff 100%); 
    padding: 0.2rem 0.5rem; 
    border-radius: 4px; 
    font-family: 'Courier New', 'Monaco', monospace; 
    font-size: 0.88rem; 
    color: #7c3aed; 
    border: 1px solid #ddd6fe;
    font-weight: 600;
}

.doc-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid rgba(102, 126, 234, 0.3);
    transition: all 0.2s;
}

.doc-link:hover {
    color: #764ba2;
    border-bottom-color: #764ba2;
}

.metric-highlight {
    display: inline-block;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(5, 150, 105, 0.08));
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    border: 1px solid rgba(16, 185, 129, 0.2);
    margin: 0 0.25rem;
}

.metric-label {
    font-weight: 700;
    color: #065f46;
}

.metric-value {
    font-weight: 800;
    color: #047857;
    margin-left: 0.35rem;
}

.currency-badge { 
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%); 
    color: #065f46; 
    padding: 0.15rem 0.5rem; 
    border-radius: 4px; 
    font-weight: 700; 
    font-size: 0.95rem;
    border: 1px solid #6ee7b7;
    display: inline-block;
}

.percentage-badge { 
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); 
    color: #92400e; 
    padding: 0.15rem 0.5rem; 
    border-radius: 4px; 
    font-weight: 700; 
    font-size: 0.95rem;
    border: 1px solid #fcd34d;
    display: inline-block;
}

.year-badge { 
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%); 
    color: #1e3a8a; 
    padding: 0.15rem 0.5rem; 
    border-radius: 4px; 
    font-weight: 600; 
    font-size: 0.9rem;
    border: 1px solid #93c5fd;
    display: inline-block;
}

.number-badge { 
    font-weight: 700; 
    color: #1f2937; 
    font-feature-settings: 'tnum';
    font-variant-numeric: tabular-nums;
}

.ratio-badge {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    color: #5b21b6;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.95rem;
    border: 1px solid #c4b5fd;
    display: inline-block;
}

/* Lists - premium styling */

.doc-numbered-list { 
    list-style: none; 
    counter-reset: item; 
    margin: 1.5rem 0; 
    padding-left: 0; 
}

.doc-list-item { 
    counter-increment: item; 
    display: flex; 
    align-items: flex-start; 
    margin: 1rem 0; 
    padding: 1rem; 
    background: #f9fafb; 
    border-radius: 8px; 
    border-left: 3px solid #667eea;
    transition: all 0.2s;
}

.doc-list-item:hover {
    background: #f3f4f6;
    transform: translateX(4px);
}

.item-number { 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); 
    color: white; 
    min-width: 32px; 
    height: 32px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 50%; 
    font-weight: 700; 
    font-size: 0.9rem; 
    margin-right: 1rem; 
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.item-content { 
    flex: 1; 
    color: #374151; 
    line-height: 1.7; 
}

.doc-bullet-list { 
    list-style: none; 
    margin: 1.5rem 0; 
    padding-left: 0; 
}

.doc-bullet-item { 
    position: relative; 
    padding-left: 2rem; 
    margin: 0.85rem 0; 
    color: #374151; 
    line-height: 1.7; 
}

.doc-bullet-item::before { 
    content: ''; 
    position: absolute; 
    left: 0.5rem; 
    top: 0.6rem; 
    width: 8px; 
    height: 8px; 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); 
    border-radius: 50%; 
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

/* Key-value pairs */

.doc-key-value-list { 
    background: #f9fafb; 
    padding: 1.5rem; 
    border-radius: 10px; 
    margin: 1.5rem 0; 
    border: 1px solid #e5e7eb;
}

.doc-kv-pair { 
    display: grid; 
    grid-template-columns: 200px 1fr; 
    gap: 1rem; 
    padding: 0.75rem 0; 
    border-bottom: 1px solid #e5e7eb; 
}

.doc-kv-pair:last-child { 
    border-bottom: none; 
}

.kv-key { 
    font-weight: 700; 
    color: #1f2937; 
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; 
}

.kv-value { 
    color: #4b5563; 
    margin: 0; 
}

/* Tables */

.doc-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 2rem 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.doc-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.doc-table th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 700;
    color: white;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.doc-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
    background: white;
}

.doc-table tbody tr:hover {
    background: #f9fafb;
}

.doc-table tbody tr:last-child td {
    border-bottom: none;
}

/* Responsive adjustments */

@media (max-width: 768px) {
    .doc-content {
        font-size: 0.95rem;
    }
    
    .doc-kv-pair {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .doc-table {
        font-size: 0.85rem;
    }
    
    .doc-table th,
    .doc-table td {
        padding: 0.75rem;
    }
    
    .doc-paragraph {
        text-align: left;
    }
}

/* Print styles */

@media print {
    .doc-content {
        font-size: 11pt;
        line-height: 1.6;
    }
    
    .doc-phase-header,
    .doc-section-header {
        break-after: avoid;
    }
    
    .doc-list-item,
    .doc-paragraph {
        break-inside: avoid;
    }
}

    background: white;
    padding: 2.5rem 2rem;
    margin-bottom: 0;
    border-radius: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
    margin-bottom: 1rem;
}

.back-btn:hover {
    color: #764ba2;
    transform: translateX(-4px);
}

.stock-title-large {
    font-size: 2.25rem;
    color: var(--primary);
    font-weight: 700;
    margin: 0;
}

.premium-tabs {
    display: flex;
    background: white;
    padding: 0 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: thin;
}

.premium-tabs::-webkit-scrollbar {
    height: 4px;
}

.premium-tabs::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.premium-tabs::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.premium-tab {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.3s;
    white-space: nowrap;
}

.premium-tab:hover {
    color: #667eea;
    background: #f9fafb;
}

.premium-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: #f9fafb;
}

.premium-tab-verdict {
    color: #10b981;
}

.premium-tab-verdict.active {
    color: #10b981;
    border-bottom-color: #10b981;
}

.tab-icon {
    font-size: 1.25rem;
}

.tab-label {
    font-weight: 600;
}

.premium-content {
    background: white;
    min-height: 70vh;
    padding: 3rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    line-height: 1.8;
}

.loading-premium {
    text-align: center;
    padding: 4rem 2rem;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 1.5rem;
    border: 4px solid #f3f4f6;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.action-bar {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 2rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.action-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.action-btn span {
    font-size: 1.25rem;
}

/* Content Formatting */
#analysis-content {
    font-family: Georgia, 'Times New Roman', serif;
    color: #1f2937;
}

#analysis-content h2 {
    font-size: 1.75rem;
    color: #111827;
    margin: 2rem 0 1rem;
    font-weight: 700;
}

#analysis-content h3 {
    font-size: 1.5rem;
    color: #1f2937;
    margin: 1.75rem 0 1rem;
    font-weight: 600;
}

#analysis-content h4 {
    font-size: 1.25rem;
    color: #374151;
    margin: 1.5rem 0 0.75rem;
    font-weight: 600;
}

#analysis-content p {
    margin: 1rem 0;
    line-height: 1.8;
    color: #4b5563;
}

#analysis-content strong {
    color: #1f2937;
    font-weight: 600;
}

#analysis-content em {
    font-style: italic;
    color: #6b7280;
}

#analysis-content code {
    background: #f3f4f6;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #dc2626;
}

#analysis-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

#analysis-content table th {
    background: #f9fafb;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #111827;
    border-bottom: 2px solid #e5e7eb;
}

#analysis-content table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    color: #4b5563;
}

#analysis-content table tr:hover {
    background: #f9fafb;
}

#analysis-content ul, #analysis-content ol {
    margin: 1rem 0 1rem 2rem;
    line-height: 1.8;
}

#analysis-content li {
    margin: 0.5rem 0;
    color: #4b5563;
}

/* Responsive Design */
@media (max-width: 768px) {
    .premium-header {
        padding: 1.5rem 1rem;
    }
    
    .stock-title-large {
        font-size: 1.75rem;
    }
    
    .premium-tabs {
        padding: 0 0.5rem;
    }
    
    .premium-tab {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    .tab-icon {
        font-size: 1.1rem;
    }
    
    .premium-content {
        padding: 1.5rem 1rem;
    }
    
    .action-bar {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
    }
}

@media print {
    .premium-header .back-btn,
    .premium-tabs,
    .action-bar {
        display: none !important;
    }
    
    .premium-content {
        box-shadow: none;
        padding: 0;
    }
}

/* ===== FIRST-PRINCIPLES RESULTS DECK ===== */
.deck-header {
    background: white;
    padding: 2.5rem 2rem;
    margin: 0 0 1rem;
    border-radius: 16px;
    box-shadow: 0 12px 35px rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: flex-start;
}

.deck-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.deck-title {
    margin: 0;
    font-size: 2.3rem;
    color: #0f172a;
    letter-spacing: -0.5px;
}

.deck-subtitle {
    margin: 0.35rem 0 0.75rem;
    color: #475467;
    font-size: 1rem;
}

.deck-actions {
    display: flex;
    gap: 0.5rem;
}

.pill-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}
.pill-primary { background: #eef2ff; color: #4338ca; }
.pill-muted { background: #f3f4f6; color: #4b5563; }

.ghost-btn, .solid-btn {
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ghost-btn { background: #f8fafc; color: #0f172a; border: 1px solid #e2e8f0; }
.ghost-btn:hover { background: #e2e8f0; }
.solid-btn { background: linear-gradient(120deg, #4f46e5, #7c3aed); color: white; box-shadow: 0 10px 30px rgba(124,58,237,0.25); }
.solid-btn:hover { transform: translateY(-1px); box-shadow: 0 15px 35px rgba(124,58,237,0.3); }

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.75rem;
    color: #818cf8;
    margin: 0.2rem 0;
    font-weight: 700;
}

.meta-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin: 0 0 1rem;
}

.meta-card {
    background: white;
    border-radius: 14px;
    padding: 1rem 1.1rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    border: 1px solid #f3f4f6;
}

.meta-label { margin: 0; color: #6b7280; font-size: 0.85rem; }
.meta-value { font-size: 1.6rem; font-weight: 800; margin: 0.15rem 0; color: #0f172a; }
.meta-hint { margin: 0; color: #9ca3af; font-size: 0.85rem; }
.status-good { border-color: #a7f3d0; background: #ecfdf3; }
.status-warn { border-color: #fde68a; background: #fffbeb; }

.deck-shell { background: white; border-radius: 16px; box-shadow: 0 12px 35px rgba(0,0,0,0.08); overflow: hidden; }
.deck-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1px;
    background: #e5e7eb;
}
.deck-tab {
    background: white;
    border: none;
    padding: 0.9rem 1rem;
    font-weight: 700;
    color: #475467;
    cursor: pointer;
    transition: all 0.2s ease;
}
.deck-tab:hover { background: #f4f4f5; color: #111827; }
.deck-tab.active { background: #eef2ff; color: #4338ca; }
.deck-tab.verdict.active { background: #ecfdf3; color: #166534; }

.deck-main { padding: 1.25rem 1.5rem 2rem; min-height: 70vh; }

.section-card {
    background: white;
    border-radius: 16px;
    padding: 0;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.section-head { 
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    padding: 2rem 2.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.section-head h2 { 
    margin: 0; 
    color: #0f172a; 
    letter-spacing: -0.5px; 
    font-size: 2rem;
    font-weight: 800;
}

.section-subtitle { 
    margin: 0.5rem 0 0; 
    color: #6b7280; 
    font-size: 1rem; 
    line-height: 1.5;
}

.section-body { 
    padding: 2.5rem; 
    background: white;
}

.digest-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem 1.75rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.digest-label { 
    text-transform: uppercase; 
    letter-spacing: 0.1em; 
    font-size: 0.75rem; 
    color: #a5b4fc; 
    margin: 0 0 0.75rem; 
    font-weight: 700;
}

.digest-text { 
    margin: 0; 
    font-size: 1.05rem; 
    line-height: 1.7; 
    color: #f1f5f9;
}

.back-link { color: #4338ca; text-decoration: none; font-weight: 700; }
.back-link:hover { text-decoration: underline; }

.doc-content { background: white; border-radius: 12px; padding: 1rem 1.1rem; border: 1px solid #e5e7eb; }
.doc-heading { color: #111827; }
.doc-divider { height: 1px; background: #e5e7eb; margin: 1.25rem 0; }
.council-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
    gap: 1.5rem; 
    margin-top: 2rem; 
}

.council-card { 
    background: white; 
    border: 2px solid #e5e7eb; 
    border-radius: 14px; 
    padding: 1.5rem; 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.council-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.council-card.buy { 
    border-color: #10b981; 
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}

.council-card.hold { 
    border-color: #f59e0b; 
    background: linear-gradient(135deg, #ffffff 0%, #fffbeb 100%);
}

.council-card.avoid { 
    border-color: #ef4444; 
    background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%);
}

.council-head { 
    display: flex; 
    justify-content: space-between; 
    align-items: flex-start; 
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f3f4f6;
}

.council-name { 
    font-weight: 800; 
    color: #0f172a; 
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.council-stance { 
    font-size: 0.75rem; 
    color: white; 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.council-score { 
    font-weight: 800; 
    color: #4338ca; 
    font-size: 1.5rem;
}

.council-meta { 
    display: flex; 
    gap: 1rem; 
    margin: 1rem 0; 
    color: #374151; 
    font-size: 0.95rem; 
    flex-wrap: wrap;
}

.council-meta strong {
    color: #1f2937;
    font-weight: 700;
}

.council-list { 
    margin: 1rem 0; 
}

.council-list strong {
    color: #1f2937;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.council-list ul { 
    margin: 0.5rem 0 0 1.25rem; 
    padding: 0; 
}

.council-list li { 
    margin: 0.5rem 0; 
    color: #4b5563; 
    line-height: 1.6;
}

.council-list.muted li { 
    color: #6b7280; 
    font-style: italic;
}

.council-actions { 
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
}

.council-actions strong {
    color: #1f2937;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.council-actions ul { 
    margin: 0.5rem 0 0 1.25rem; 
}

.consensus-card { 
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); 
    color: #e5e7eb; 
    padding: 2rem 2.5rem; 
    border-radius: 16px; 
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); 
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.consensus-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 1rem; 
}

.consensus-label { 
    font-size: 0.85rem; 
    letter-spacing: 0.1em; 
    text-transform: uppercase; 
    color: #a5b4fc; 
    font-weight: 700;
}

.consensus-stance { 
    font-weight: 800; 
    padding: 0.4rem 1rem; 
    border-radius: 20px; 
    background: white; 
    color: #111827; 
    font-size: 0.9rem;
}

.consensus-summary {
    font-size: 1.15rem;
    line-height: 1.7;
    color: #f1f5f9;
    margin: 1rem 0 1.5rem 0;
}

.consensus-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.consensus-meta > div {
    color: #cbd5e1;
}

.consensus-meta strong {
    color: #f1f5f9;
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.consensus-summary { margin: 0.25rem 0 0.75rem; line-height: 1.5; }
.consensus-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.5rem; font-size: 0.95rem; }

.reader-mobile-actions { display: none; }
@media (max-width: 900px) {
    .deck-header { flex-direction: column; }
    .deck-actions { width: 100%; justify-content: flex-start; }
    .deck-tabs { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
    .deck-main { padding: 1rem; }
    .reader-mobile-actions { display: flex; gap: 0.5rem; margin: 1rem 0; }
}

/* ===== PRIME READER LAYOUT (COMPACT) ===== */
.prime-header {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    background: #ffffff;
    padding: 1.25rem 1.5rem;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.05);
    margin-bottom: 0.85rem;
}

.prime-header-left {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.prime-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.stock-subtitle {
    color: #6b7280;
    font-size: 1rem;
}

.prime-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.4rem;
}

.prime-chip,
.prime-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    font-size: 0.9rem;
    color: #374151;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
}

.prime-pill-primary {
    background: #eef2ff;
    color: #4338ca;
    border-color: #e0e7ff;
}

.prime-header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.pill-ghost,
.pill-solid {
    border: 1px solid #e5e7eb;
    background: white;
    color: #1f2937;
    padding: 0.65rem 1.2rem;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pill-ghost:hover { color: #4338ca; border-color: #c7d2fe; }

.pill-solid {
    background: linear-gradient(120deg, #667eea, #764ba2);
    color: white;
    border: none;
    box-shadow: 0 10px 24px rgba(102, 126, 234, 0.25);
}

.pill-solid:hover { filter: brightness(1.03); }

.prime-shell {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 0.9rem;
    align-items: start;
}

.prime-nav {
    position: sticky;
    top: 1rem;
    background: #ffffff;
    border-radius: 14px;
    padding: 0.55rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.05);
    display: grid;
    gap: 0.3rem;
}

.prime-nav-btn {
    width: 100%;
    text-align: left;
    background: transparent;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.6rem 0.8rem;
    font-weight: 600;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.15s ease;
}

.prime-nav-btn:hover { border-color: #c7d2fe; color: #4338ca; background: #f8fafc; }
.prime-nav-btn.active { border-color: #4338ca; background: #eef2ff; color: #312e81; }
.prime-nav-btn.verdict { border-color: #bbf7d0; color: #065f46; }
.prime-nav-btn.verdict.active { background: #ecfdf3; border-color: #34d399; color: #047857; }

.prime-content {
    background: #ffffff;
    border-radius: 14px;
    padding: 1.35rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.05);
    line-height: 1.6;
    max-width: 920px;
}

.prime-content article,
.prime-content .doc-content { max-width: 820px; margin: 0 auto; }

/* ===== MINIMAL READER LAYOUT ===== */
.reader-header {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    background: #ffffff;
    padding: 1.1rem 1.35rem;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
    margin-bottom: 0.85rem;
}

.reader-header-left { display: flex; flex-direction: column; gap: 0.35rem; }
.reader-title-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.reader-title { margin: 0; font-size: 1.3rem; font-weight: 750; color: #0f172a; }
.reader-subtitle { margin: 0; color: #475569; font-size: 0.95rem; }

.chip-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.25rem 0.65rem; border-radius: 999px; font-size: 0.85rem; border: 1px solid #e5e7eb; background: #f8fafc; color: #334155; }
.chip-accent { background: #eef2ff; border-color: #c7d2fe; color: #3730a3; }

.reader-actions { display: flex; gap: 0.6rem; align-items: center; }
.btn-ghost, .btn-solid { border-radius: 10px; padding: 0.5rem 0.95rem; font-weight: 650; border: 1px solid #e5e7eb; background: #fff; color: #0f172a; cursor: pointer; transition: all 0.15s ease; }
.btn-ghost:hover { color: #3730a3; border-color: #c7d2fe; }
.btn-solid { background: linear-gradient(120deg, #6366f1, #8b5cf6); color: #fff; border: none; box-shadow: 0 10px 18px rgba(99,102,241,0.2); }
.btn-solid:hover { filter: brightness(1.04); }

.reader-shell { display: grid; grid-template-columns: 200px 1fr; gap: 0.85rem; align-items: start; }

.reader-nav { position: sticky; top: 0.75rem; background: #ffffff; border-radius: 12px; padding: 0.45rem; box-shadow: 0 6px 16px rgba(0,0,0,0.05); display: grid; gap: 0.3rem; }
.reader-nav-btn { width: 100%; text-align: left; border: 1px solid #e5e7eb; background: #fff; border-radius: 10px; padding: 0.55rem 0.75rem; font-weight: 650; color: #475569; cursor: pointer; transition: all 0.15s ease; }
.reader-nav-btn:hover { border-color: #c7d2fe; color: #3730a3; background: #f8fafc; }
.reader-nav-btn.active { border-color: #6366f1; background: #eef2ff; color: #312e81; }
.reader-nav-btn.verdict { border-color: #bbf7d0; color: #065f46; }
.reader-nav-btn.verdict.active { background: #ecfdf3; border-color: #34d399; color: #047857; }

.reader-main { background: #ffffff; border-radius: 12px; padding: 1.1rem; box-shadow: 0 6px 16px rgba(0,0,0,0.05); line-height: 1.55; max-width: 960px; }

.section-card { border: 1px solid #e5e7eb; border-radius: 12px; padding: 1.05rem 1rem; display: flex; flex-direction: column; gap: 0.65rem; background: #fff; }
.section-head h2 { margin: 0; font-size: 1.15rem; font-weight: 750; color: #0f172a; }
.section-subtitle { margin: 0.15rem 0 0; color: #475569; font-size: 0.95rem; }
.section-body { display: flex; flex-direction: column; gap: 0.45rem; }

.loading-compact { text-align: center; padding: 2.5rem 1rem; color: #475569; }
.empty-note { 
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%); 
    border: 2px dashed #cbd5e1; 
    color: #475569; 
    padding: 2rem 2.5rem; 
    border-radius: 12px; 
    text-align: center;
    font-size: 1.05rem;
    line-height: 1.6;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #64748b;
}

.empty-state p {
    font-size: 1.1rem;
    margin: 0;
}

.reader-mobile-actions { display: none; gap: 0.5rem; margin-top: 0.75rem; }
.back-link { color: #475569; text-decoration: none; font-weight: 650; }
.back-link:hover { color: #3730a3; }

@media (max-width: 1024px) {
    .reader-shell { grid-template-columns: 1fr; }
    .reader-nav { position: static; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}

@media (max-width: 768px) {
    .reader-header { flex-direction: column; align-items: flex-start; }
    .reader-actions { display: none; }
    .reader-mobile-actions { display: flex; }
    .reader-main { padding: 0.9rem; }
}

.prime-content h2 { margin: 1.1rem 0 0.65rem; font-size: 1.55rem; }
.prime-content h3 { margin: 0.95rem 0 0.5rem; font-size: 1.25rem; }
.prime-content h4 { margin: 0.75rem 0 0.35rem; font-size: 1.05rem; }
.prime-content p,
.prime-content .doc-paragraph { margin: 0.5rem 0; line-height: 1.6; font-size: 0.98rem; }
.prime-content ul,
.prime-content ol { margin: 0.6rem 0 0.6rem 1.4rem; }
.prime-content li { margin: 0.25rem 0; }

.prime-mobile-actions {
    display: none;
    margin-top: 1.25rem;
    gap: 0.75rem;
}

@media (max-width: 1024px) {
    .prime-header { flex-direction: column; align-items: flex-start; }
    .prime-shell { grid-template-columns: 1fr; }
    .prime-nav { position: static; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}

@media (max-width: 768px) {
    .prime-header { padding: 1.25rem 1rem; }
    .prime-content { padding: 1.25rem; }
    .prime-header-actions { display: none; }
    .prime-mobile-actions { display: flex; }
}

/* ===== ULTRA-COMPACT READABLE LAYOUT ===== */
/* Optimized for zero-whitespace, high information density */

.doc-content {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', system-ui, sans-serif !important;
    font-size: 0.875rem !important;
    line-height: 1.45 !important;
    color: #111827 !important;
    letter-spacing: -0.01em !important;
}

.doc-content h2 {
    font-size: 1.15rem !important;
    margin: 0.9rem 0 0.45rem !important;
    padding-bottom: 0.3rem !important;
    line-height: 1.25 !important;
    font-weight: 700 !important;
}

.doc-content h3 {
    font-size: 1rem !important;
    margin: 0.75rem 0 0.35rem !important;
    line-height: 1.3 !important;
    font-weight: 600 !important;
}

.doc-content h4 {
    font-size: 0.9rem !important;
    margin: 0.6rem 0 0.3rem !important;
    line-height: 1.3 !important;
    font-weight: 600 !important;
    color: #374151 !important;
}

.doc-content p {
    margin: 0.35rem 0 !important;
    line-height: 1.45 !important;
}

.doc-content ul, .doc-content ol {
    margin: 0.35rem 0 0.35rem 1.2rem !important;
    padding: 0 !important;
}

.doc-content li {
    margin: 0.2rem 0 !important;
    line-height: 1.4 !important;
}

.doc-content table {
    margin: 0.6rem 0 !important;
    font-size: 0.825rem !important;
}

.doc-content th {
    padding: 0.4rem 0.65rem !important;
}

.doc-content td {
    padding: 0.35rem 0.65rem !important;
}

.doc-paragraph {
    margin: 0.35rem 0 !important;
    line-height: 1.45 !important;
}

.doc-quote {
    padding: 0.65rem 1rem !important;
    margin: 0.6rem 0 !important;
}

.doc-divider {
    margin: 1.25rem 0 !important;
}

.doc-table-wrapper {
    margin: 0.6rem 0 !important;
}

.doc-list-item {
    margin: 0.2rem 0 !important;
}

.section-header {
    margin: 1rem 0 0.5rem !important;
}

.phase-header {
    margin: 0.85rem 0 0.4rem !important;
    padding: 0.4rem 0.7rem !important;
}

/* Compact badges */
.currency-badge, .percentage-badge, .number-badge {
    padding: 0.1rem 0.35rem !important;
    font-size: 0.8rem !important;
    margin: 0 0.15rem !important;
}

/* Tight council cards */
.council-card {
    padding: 0.8rem !important;
    margin: 0.6rem 0 !important;
}

.council-member-name {
    font-size: 1rem !important;
    margin-bottom: 0.3rem !important;
}

.council-stance {
    margin: 0.3rem 0 !important;
}

.council-section {
    margin: 0.5rem 0 !important;
}

.council-section h4 {
    margin: 0.4rem 0 0.2rem !important;
    font-size: 0.85rem !important;
}

/* Compact investor cards */
.investor-card {
    padding: 0.75rem !important;
    margin: 0.5rem 0 !important;
}

.investor-header {
    margin-bottom: 0.4rem !important;
}

.investor-name {
    font-size: 1rem !important;
    line-height: 1.3 !important;
}

.investor-metrics {
    margin: 0.35rem 0 !important;
}

.metric-item {
    margin: 0.25rem 0.5rem 0.25rem 0 !important;
}

/* Reduce content container padding */
.premium-content {
    padding: 1.5rem !important;
}

#analysis-content {
    font-size: 0.875rem !important;
    line-height: 1.45 !important;
}

#analysis-content h2 {
    font-size: 1.15rem !important;
    margin: 0.9rem 0 0.45rem !important;
}

#analysis-content h3 {
    font-size: 1rem !important;
    margin: 0.75rem 0 0.35rem !important;
}

#analysis-content h4 {
    font-size: 0.9rem !important;
    margin: 0.6rem 0 0.3rem !important;
}

#analysis-content p {
    margin: 0.35rem 0 !important;
    line-height: 1.45 !important;
}

/* Responsive: Even tighter on mobile */
@media (max-width: 768px) {
    .premium-content {
        padding: 1rem !important;
    }
    
    .doc-content {
        font-size: 0.85rem !important;
    }
    
    .doc-content h2 {
        font-size: 1.05rem !important;
    }
}

/* Print: Ultra-compact */
@media print {
    .doc-content {
        font-size: 9pt !important;
        line-height: 1.3 !important;
    }
    
    .doc-content h2 {
        font-size: 12pt !important;
        margin: 8pt 0 4pt !important;
    }
    
    .doc-content p {
        margin: 3pt 0 !important;
    }
}
