/* Research report dedicated stylesheet extracted from template */
/* REFINED WIDTH OVERRIDE - Target specific Ghost containers */
.kg-width-full,
.kg-canvas,
.gh-canvas,
.gh-content,
.post-content,
.post-full-content,
article,
main,
.content-wrapper,
.main-content {
    max-width: none !important;
    width: 100% !important;
}

/* Ensure our research container takes full control */
.research-container {
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    width: 100vw;
    overflow-x: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: var(--base-font-size);
    background: var(--bg-primary);  /* Warm cream background */
    color: var(--text-primary);  /* Warm brown text */
    padding-right: 1rem;  /* Space between content and vertical scrollbar */
}

/* Dark mode support */
html.dark body {
    background: #0f172a;
    color: #e2e8f0;
}

/* === DESIGN SYSTEM - WARM PREMIUM PALETTE === */
:root,
html,
body {
    --primary-navy: #000035;   /* Dark navy to match homepage brand identity */
    --accent-gold: #C9A961;    /* Warm gold (matches landing page) */
    --text-primary: #2C2420;   /* Dark brown (warmer than gray) */
    --text-secondary: #6B5D54; /* Warm taupe */
    --bg-primary: #FAF7F2;     /* Cream (matches landing page) */
    --bg-secondary: #F5F0E8;   /* Warm beige */
    --bg-accent: #E8DFD3;      /* Warm stone */
    --border-light: #E5E7EB;
    --success: #7A8B74;        /* Muted sage green */
    --warning: #f59e0b;
    --danger: #C17557;         /* Warm terracotta */
    --shadow-sm: 0 2px 4px 0 rgba(44, 36, 32, 0.06);
    --shadow-md: 0 4px 8px -1px rgba(44, 36, 32, 0.1);
    --shadow-lg: 0 10px 20px -3px rgba(44, 36, 32, 0.12);
    --header-height: 50px;
    --sidebar-width: 15% !important;  /* Navigation sidebar */
    --content-width: 58% !important;   /* Main content - increased for better readability */
    --metrics-width: 42% !important;   /* Charts sidebar - adjusted to complement content */
    --main-padding: 1.5rem;
    --font-serif: 'Georgia', 'Cambria', 'Times New Roman', serif;
    --gradient-subtle: linear-gradient(135deg, rgba(201, 169, 97, 0.05), rgba(0, 0, 53, 0.02));
    --base-font-size: 15px;
}

html.dark {
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --bg-primary: #1e293b;
    --bg-secondary: #0f172a;
    --bg-accent: #334155;
    --border-light: #334155;
}

/* === MINIMAL HEADER === */
.research-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

html.dark .research-header {
    background: rgba(30, 41, 59, 0.95);
}

.header-brand {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-navy);
    letter-spacing: -0.025em;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.back-to-portal {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary-navy);
    color: white;
    border-radius: 0.375rem;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.back-to-portal:hover {
    background: #162e6e;
    transform: translateX(-2px);
}

.back-to-portal svg {
    width: 16px;
    height: 16px;
}

/* === LAYOUT === */
.report-layout {
    display: flex;
    padding-top: var(--header-height);
    min-height: 100vh;
    width: 100vw;
}

/* Override any embedded layout styles */
.research-container .report-layout,
body .report-layout {
    display: flex !important;
    width: 100vw !important;
}

/* === ENHANCED SIDEBAR - TWO-TONE: NAVY TOP + CREAM BOTTOM === */
.report-sidebar {
    position: fixed;
    left: 0;
    top: var(--header-height);
    width: var(--sidebar-width);  /* 15% of screen */
    height: calc(100vh - var(--header-height));
    background: var(--bg-primary);  /* Cream base - blends with content */
    border-right: 2px solid var(--accent-gold);  /* Gold border */
    overflow-y: auto;
    z-index: 999;
    display: flex;
    flex-direction: column;
}

/* Company Info Section in Sidebar - DARKER CREAM/BEIGE */
.company-info-section {
    padding: 1.25rem 1.5rem;  /* Reduced from 2rem to save space */
    background: #E8DFD3;  /* Darker cream - subtle contrast, no gradient */
    margin: 0;
    border-bottom: 2px solid var(--accent-gold);  /* Gold divider */
}

.company-name {
    font-size: 1.15rem;  /* Further reduced to condense */
    font-weight: 700;
    color: var(--primary-navy);  /* Navy text on darker cream background */
    margin-bottom: 0.4rem;  /* Tighter */
    line-height: 1.2;
}

.company-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.ticker-badge {
    font-weight: 700;
    color: white;  /* White text */
    background: var(--primary-navy);  /* Navy background */
    border: none;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
}

.sector-badge {
    font-size: 0.8125rem;
    color: var(--text-secondary);  /* Taupe text on darker cream */
}

.update-info {
    font-size: 0.75rem;
    color: var(--text-secondary);  /* Taupe text on darker cream */
    margin-bottom: 1rem;
}

/* Outlook Cards in Sidebar */
.outlook-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-top: 1rem;
}

.outlook-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    padding: 0.75rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.outlook-label {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.outlook-value {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
}

.outlook-value.positive,
#growth-outlook.positive,
#income-outlook.positive {
    color: var(--success);
}

.outlook-value.neutral,
#growth-outlook.neutral,
#income-outlook.neutral {
    color: var(--warning);
}

.outlook-value.negative,
#growth-outlook.negative,
#income-outlook.negative {
    color: var(--danger);
}

#earnings-quality.high {
    color: var(--success);
}

#earnings-quality.medium {
    color: var(--warning);
}

#earnings-quality.low {
    color: var(--danger);
}

/* Investment Signals Traffic Light System */
.investment-signals {
    background: white;  /* White box on cream sidebar */
    border: 2px solid var(--accent-gold);  /* Gold frame */
    border-radius: 0.75rem;
    padding: 0.65rem;  /* Reduced to save space */
    margin: 0.65rem 0;  /* Reduced to save space */
    box-shadow: var(--shadow-md);
}

.signals-title {
    font-size: 0.8rem;  /* Slightly smaller */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-navy);  /* Navy text on white */
    margin-bottom: 0.65rem;  /* Reduced */
    text-align: center;
    border-bottom: 2px solid var(--accent-gold);
    padding-bottom: 0.4rem;  /* Reduced */
}

.signals-grid {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;  /* Tighter */
}

.signal-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;  /* Slightly tighter gap */
    padding: 0.2rem 0;  /* Tighter */
}

.signal-label {
    font-size: 0.65rem;  /* Smaller to save space */
    font-weight: 500;
    color: var(--text-primary);  /* Brown text on white box */
    width: 50px;  /* Slightly narrower */
    flex-shrink: 0;
}

.signal-lights {
    display: flex;
    gap: 0.3rem;  /* Tighter gap between lights */
    justify-content: center;
    flex: 1;  /* Take available space */
}

.light {
    width: 16px;  /* Smaller to save space */
    height: 16px;
    border-radius: 50%;
    background: #e5e7eb;
    border: 2px solid #d1d5db;
    transition: all 0.2s ease;
}

/* Active states for traffic lights */
.light.active-green {
    background: var(--success);
    border-color: var(--success);
    box-shadow: 0 0 8px rgba(5, 150, 105, 0.4);
}

.light.active-yellow {
    background: var(--warning);
    border-color: var(--warning);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.light.active-red {
    background: var(--danger);
    border-color: var(--danger);
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.4);
}

/* Signal Value - Visible on right side */
.signal-value {
    font-size: 0.5rem;  /* Smaller to fit "POSITIVE" fully */
    font-weight: 600;
    text-transform: uppercase;
    text-align: right;
    color: var(--text-secondary);
    min-width: 45px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: -0.02em;  /* Slightly tighter letter spacing */
}

/* Valuation Summary */
.valuation-summary {
    margin-top: 0.5rem;  /* Reduced from 1rem */
    padding-top: 0.5rem;  /* Reduced from 1rem */
    border-top: 1px solid var(--border-light);  /* Light border on white */
}

.valuation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;  /* Reduced from 0.75rem */
}

.val-label {
    font-size: 0.75rem;  /* Reduced from 0.875rem */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-navy);  /* Navy text on white */
}

.val-status {
    font-size: 0.7rem;  /* Reduced from 0.75rem */
    font-weight: 600;
    padding: 0.2rem 0.4rem;  /* Reduced from 0.25rem 0.5rem */
    border-radius: 0.25rem;
}

.val-status.undervalued {
    background: rgba(5, 150, 105, 0.1);
    color: var(--success);
}

.val-status.fair {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.val-status.overvalued {
    background: rgba(220, 38, 38, 0.1);
    color: var(--danger);
}

.valuation-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.val-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
}

.val-row span:first-child {
    color: var(--text-secondary);  /* Taupe labels on white */
}

.val-row span:last-child {
    font-weight: 600;
    color: var(--text-primary);  /* Brown values on white */
}

/* Old valuation card - keeping for compatibility */
.valuation-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-top: 0.75rem;
    box-shadow: var(--shadow-sm);
}

.section-feedback {
    margin-top: 1.5rem;
    padding: 1rem;
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    background: var(--bg-secondary);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.section-feedback .feedback-prompt {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.section-feedback .feedback-actions {
    display: flex;
    gap: 0.5rem;
}

.feedback-btn {
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.feedback-btn-more {
    background: rgba(193, 117, 87, 0.12);
    color: var(--danger);
}

.feedback-btn-clear {
    background: rgba(122, 139, 116, 0.15);
    color: var(--success);
}

.feedback-btn:hover {
    transform: translateY(-1px);
}

.feedback-btn:focus-visible {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

.feedback-thanks {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.valuation-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    text-align: center;
}

.valuation-bar-container {
    margin-bottom: 1rem;
}

.valuation-bar {
    position: relative;
    height: 32px;
    margin: 0.5rem 0;
}

.valuation-bar-track {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right,
    var(--success) 0%,
    var(--success) 20%,
    #10b98133 20%,
    #10b98133 40%,
    var(--bg-accent) 40%,
    var(--bg-accent) 60%,
    #dc262633 60%,
    #dc262633 80%,
    var(--danger) 80%,
    var(--danger) 100%
    );
    border-radius: 16px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.valuation-bar-indicator {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 24px;
    background: var(--primary-navy);
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: left 0.3s ease;
}

.valuation-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.625rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.fair-value-info {
    text-align: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-light);
}

.fair-value-label {
    display: block;
    font-size: 0.625rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.fair-value-amount {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-navy);
}

/* Navigation Section */
.nav-section {
    padding: 0.5rem 1.5rem;  /* Further reduced for space */
    flex: 1;
    overflow-y: visible;  /* Remove scrolling */
}

.nav-title {
    font-size: 0.65rem;  /* Further reduced */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);  /* Taupe on cream sidebar */
    margin-bottom: 0.4rem;  /* Tighter */
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin-bottom: 0.2rem;  /* Tighter spacing */
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.4rem 0.65rem;  /* Further reduced */
    color: var(--text-primary);  /* Brown text on cream sidebar */
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    font-size: 0.75rem;  /* Further reduced */
    position: relative;
    line-height: 1.25;  /* Tighter */
}

.nav-link:hover {
    background: rgba(201, 169, 97, 0.15);  /* Gold glow on hover */
    color: var(--primary-navy);
    transform: translateX(2px);
}

.nav-link.active {
    background: var(--primary-navy);  /* Navy background */
    color: white;  /* White text on navy */
    text-shadow: none;
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--accent-gold);  /* Gold accent on navy background */
    border-radius: 0 2px 2px 0;
}

.nav-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;  /* Further reduced */
    height: 1.35rem;
    margin-right: 0.45rem;  /* Tighter */
    background: var(--bg-accent);  /* Warm stone background */
    border-radius: 0.375rem;
    font-size: 0.65rem;  /* Further reduced */
    font-weight: 600;
    flex-shrink: 0;
    color: var(--text-primary);
}

.nav-link.active .nav-number {
    background: rgba(201, 169, 97, 0.3);  /* Gold tint on active navy background */
    color: white;
}

/* Back Button */
.back-section {
    padding: 0 1.5rem 1.5rem;
    border-top: 1px solid var(--border-light);
}

.back-to-home-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.back-to-home-button:hover {
    background: var(--primary-navy);
    color: white;
    border-color: var(--primary-navy);
    transform: translateX(-2px);
}

/* === MAIN CONTENT === */
.report-main {
    margin-left: var(--sidebar-width) !important;  /* Force override */
    background: var(--bg-secondary);
    min-height: calc(100vh - var(--header-height));
    width: calc(100% - var(--sidebar-width)) !important;  /* Force override */
    padding: 1.5rem;  /* Uniform padding - matches left exactly */
    display: grid !important;  /* Force override */
    grid-template-columns: var(--content-width) var(--metrics-width) !important;  /* Force override */
    gap: 2rem;
    align-items: start;
}

.content-wrapper {
    width: 100%;
    padding-right: 1rem;
    font-family: Georgia, 'Times New Roman', serif;
    min-width: 0;  /* Prevent overflow */
}

.content-wrapper p {
    line-height: 1.75;  /* Optimal for readability */
    font-size: 1rem;  /* 16px - improved readability for sophisticated-to-retail audience */
    color: var(--text-primary);
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    margin-bottom: 1.25rem;  /* Better paragraph separation */
    text-align: left;  /* Left-aligned for better readability across screen sizes */
    hyphens: auto;  /* Enable hyphenation */
}

/* First paragraph emphasis */
.content-wrapper > p:first-of-type {
    font-size: 1rem;  /* 16px - slight emphasis over body text */
    line-height: 1.8;
    color: var(--text-primary);
    font-weight: 400;
}

/* Drop cap for first letter */
.content-wrapper > p:first-of-type::first-letter {
    float: left;
    font-size: 2.5rem;  /* More proportional to 16px body text */
    line-height: 2.3rem;
    padding-right: 0.3rem;
    margin-top: 0;
    font-weight: 700;
    color: var(--primary-navy);
}

.content-wrapper h1,
.content-wrapper h2,
.content-wrapper h3,
.content-wrapper h4,
.content-wrapper h5,
.content-wrapper h6 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.3;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--primary-navy);
}

/* Section headers with accent bar */
.content-wrapper h2 {
    font-size: 1.3rem;  /* Reduced from 1.5rem for better proportion */
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--accent-gold);
    margin-bottom: 1.5rem;
}

.content-wrapper h3 {
    font-size: 1.1rem;  /* Reduced from 1.25rem for better proportion */
    padding-left: 1rem;
    border-left: 4px solid var(--primary-navy);
    margin-left: -1rem;
}

/* Highlight boxes for key insights */
.content-wrapper .highlight-box,
.content-wrapper blockquote {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.05), rgba(212, 175, 55, 0.02));
    border-left: 4px solid var(--accent-gold);
    padding: 1.25rem;
    margin: 1.5rem 0;
    border-radius: 0.5rem;
    font-style: italic;
}

/* Lists with better spacing */
.content-wrapper ul,
.content-wrapper ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.content-wrapper li {
    margin-bottom: 0.5rem;
    line-height: 1.75;
    font-size: 1rem;  /* Match paragraph text size */
}

/* Strong/Bold text - use gold for key metrics to balance navy dominance */
.content-wrapper strong {
    color: var(--accent-gold);  /* Gold emphasis for numbers and key points */
    font-weight: 600;
}

/* Keep navy for headings in "In a Nutshell" section */
#in-a-nutshell strong {
    color: var(--primary-navy);
}

/* Tables in content */
.content-wrapper table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
    font-size: 0.8rem;  /* Reduced from 0.9rem for better proportion */
    box-shadow: var(--shadow-sm);
    border-radius: 0.5rem;
    overflow: hidden;
}

.content-wrapper th {
    background: var(--primary-navy);
    color: white;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
}

.content-wrapper td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-light);
}

.content-wrapper tbody tr:hover {
    background: rgba(30, 58, 138, 0.03);
}

/* Ensure all content elements use full width */
.content-wrapper > * {
    max-width: 100%;
}

.content-wrapper .data-table,
.content-wrapper .metrics-grid,
.content-wrapper .highlight-box,
.content-wrapper .analysis-card {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
}

/* Key metrics callouts */
.content-wrapper .metric-callout {
    display: inline-block;
    background: var(--bg-primary);
    border: 2px solid var(--accent-gold);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin: 0.5rem 0.5rem 0.5rem 0;
    font-weight: 600;
    color: var(--primary-navy);
}

/* Investment signal badges */
.content-wrapper .signal-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;  /* Reduced from 0.875rem for better proportion */
    font-weight: 600;
    margin-right: 0.5rem;
}

.content-wrapper .signal-badge.positive {
    background: rgba(5, 150, 105, 0.1);
    color: var(--success);
    border: 1px solid var(--success);
}

.content-wrapper .signal-badge.negative {
    background: rgba(220, 38, 38, 0.1);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.content-wrapper .signal-badge.neutral {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border: 1px solid var(--warning);
}

/* Executive summary box */
.content-wrapper .executive-summary {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-md);
}

.content-wrapper .executive-summary h2 {
    border-bottom: 2px solid var(--primary-navy);
    margin-top: 0;
}

/* Recommendation box */
.content-wrapper .recommendation-box {
    background: linear-gradient(135deg, var(--primary-navy), #2a4a9a);
    color: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-lg);
}

.content-wrapper .recommendation-box h3,
.content-wrapper .recommendation-box p {
    color: white;
}

/* Risk warning box */
.content-wrapper .risk-warning {
    background: rgba(220, 38, 38, 0.05);
    border: 1px solid var(--danger);
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 1.5rem 0;
}

.content-wrapper .risk-warning::before {
    content: "⚠️ ";
    font-size: 1.25rem;
    margin-right: 0.5rem;
}

/* === INVESTOR PROFILES (5-PROFILE STRUCTURE) === */
/* Investor profiles use standard .report-section class with specific styling via ID selector */

/* Investor Profile Summary Table */
.investor-summary-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: var(--bg-primary);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.investor-summary-table thead {
    background: var(--primary-navy);
}

.investor-summary-table th {
    color: white;
    padding: 0.875rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    border-bottom: 2px solid var(--accent-gold);
}

.investor-summary-table td {
    padding: 0.75rem 0.875rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.875rem;
}

.investor-summary-table tbody tr:hover {
    background: rgba(30, 58, 138, 0.03);
}

.investor-summary-table tbody tr:last-child td {
    border-bottom: none;
}

/* Individual Profile Analysis */
.investor-profile-analysis {
    margin: 2rem 0;
}

.investor-profile-analysis p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1rem;
}

.investor-profile-analysis strong {
    color: var(--primary-navy);
    font-weight: 600;
}

.investor-profile-analysis .highlight {
    background: linear-gradient(to bottom, transparent 60%, rgba(212, 175, 55, 0.3) 60%);
    padding: 0 2px;
    font-style: italic;
}

/* === IN A NUTSHELL SECTION (unchanged from original) === */
.in-a-nutshell {
    background: linear-gradient(135deg, #fffbf0 0%, #fff8e8 100%);
    border-left: 5px solid var(--primary-navy);
    border-top: 2px solid var(--accent-gold);
    border-radius: 12px;
    padding: 35px;
    margin: 40px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 53, 0.1);
    position: relative;
    overflow: hidden;
}

.in-a-nutshell::before {
    content: "🥜";
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 48px;
    opacity: 0.15;
}

#in-a-nutshell .section-title {
    color: var(--primary-navy);
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: 700;
}

#in-a-nutshell .section-subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    font-style: italic;
    margin-bottom: 25px;
}

#in-a-nutshell .section-content {
    font-size: 16px;
    line-height: 1.75;
}

#in-a-nutshell ul {
    margin: 20px 0;
    padding-left: 25px;
}

#in-a-nutshell li {
    margin-bottom: 12px;
    line-height: 1.7;
}

#in-a-nutshell strong {
    color: var(--primary-navy);
    font-weight: 600;
}

/* === COLLAPSIBLE SECTIONS === */
.collapsible-section {
    margin-bottom: 1rem;
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.collapsible-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: var(--bg-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.collapsible-header:hover {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-accent) 100%);
}

.collapsible-header.active {
    background: var(--primary-navy);
    color: white;
}

.collapsible-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.collapsible-icon {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.collapsible-header.active .collapsible-icon {
    transform: rotate(180deg);
}

.collapsible-header.active .collapsible-title {
    color: white;
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--bg-primary);
}

.collapsible-section.expanded .collapsible-content {
    max-height: 5000px; /* Large enough for content */
    padding: 1.5rem;
}

/* === METRICS SIDEBAR === */
.metrics-sidebar {
    position: sticky;
    top: calc(var(--header-height) + 2rem);
    height: fit-content;
    max-height: calc(100vh - var(--header-height) - 2rem);
    overflow-y: auto;
    width: 100%;
    /* Hide scrollbar but keep functionality */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.metrics-sidebar::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Edge */
}

.metrics-card {
    background: white;  /* White cards on cream background */
    border: 1px solid var(--border-light);
    border-top: 3px solid var(--accent-gold);  /* Gold accent bar */
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
}

.metrics-card h3 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-navy);  /* Navy headings */
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-light);
}

/* Ensure tables in metrics cards don't overflow */
.metrics-card .table-wrapper {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.metrics-card .sidebar-table {
    font-size: 0.7rem;
    margin: 0;
}

.metrics-card .sidebar-table th,
.metrics-card .sidebar-table td {
    padding: 0.4rem 0.6rem;
}

/* === FORECAST TABLE STYLING === */
.forecast-table-wrapper {
    max-height: calc(100vh - var(--header-height) - 8rem);
    overflow: auto;
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
}

.forecast-table {
    width: 100%;
    font-size: 0.675rem;
    border-collapse: collapse;
    background: var(--bg-primary);
    table-layout: auto;
}

/* Zebra striping */
.forecast-table tbody tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.02);
}

html.dark .forecast-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

/* Section Headers - FIXED WHITE TEXT */
.forecast-table tr.section-header td {
    background: var(--primary-navy);
    color: white !important;
    font-weight: 600;
    padding: 0.4rem 0.5rem;
    text-transform: uppercase;
    font-size: 0.6rem;
    letter-spacing: 0.05em;
    text-align: left;
    border: none;
}

/* Ensure strong tags in section headers are also white */
.forecast-table tr.section-header td strong {
    color: white !important;
}

/* Sticky Headers - Moderate spacing */
.forecast-table thead th {
    position: sticky;
    top: 0;
    background: var(--primary-navy);
    color: white;
    padding: 0.625rem 0.5rem;
    text-align: right;
    font-weight: 600;
    font-size: 0.675rem;
    border-bottom: 2px solid var(--accent-gold);
    z-index: 10;
    min-width: 80px;
}

/* Sticky top-left cell */
.forecast-table thead th:first-child {
    text-align: left;
    z-index: 11;
    min-width: 120px;
}

/* Row Styling - Moderate spacing */
.forecast-table tbody td {
    padding: 0.375rem 0.5rem;
    text-align: right;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.675rem;
    min-width: 70px;
}

/* Sticky first column */
.forecast-table td:first-child,
.forecast-table th:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--bg-primary);
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.05);
}

.forecast-table tbody td:first-child {
    text-align: left;
    font-weight: 500;
    border-right: 1px solid var(--border-light);
    min-width: 135px;
    font-size: 0.65rem;
}

/* Hover effects */
.forecast-table tbody tr:hover {
    background: rgba(30, 58, 138, 0.05);
}

html.dark .forecast-table tbody tr:hover {
    background: rgba(96, 165, 250, 0.05);
}

/* Value Formatting */
.forecast-table .positive {
    color: var(--success);
}

.forecast-table .negative {
    color: var(--danger);
}

/* Important Rows */
.forecast-table tr.total-row td,
.forecast-table tr.summary-row td {
    font-weight: 600;
    border-top: 2px solid var(--border-light);
    border-bottom: 2px solid var(--border-light);
    background: rgba(30, 58, 138, 0.03);
}

/* Sub-metrics styling */
.forecast-table tr.sub-metric td {
    font-size: 0.65rem;
    color: var(--text-secondary);
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
}

.forecast-table tr.sub-metric td:first-child {
    padding-left: 2.5rem;
    font-style: italic;
}

/* Highlight key metrics */
.forecast-table tr[data-metric="revenue"] td:first-child,
.forecast-table tr[data-metric="ebitda"] td:first-child,
.forecast-table tr[data-metric="eps"] td:first-child {
    font-weight: 700;
    background: rgba(212, 175, 55, 0.1);
    border-left: 3px solid var(--accent-gold);
    padding-left: 0.5rem;
}

/* Number formatting */
.forecast-table td.number {
    font-variant-numeric: tabular-nums;
    text-align: right;
}

/* Growth indicators */
.forecast-table .growth-indicator {
    font-size: 0.55rem;
    opacity: 0.7;
    display: block;
}

/* KPI Section */
.forecast-table tr.kpi-row td:first-child {
    padding-left: 1rem;
}

/* Percentage Values */
.forecast-table .percentage {
    font-size: 0.6rem;
    color: var(--text-secondary);
}

/* Period Headers (Actual vs Estimated) */
.forecast-table th.actual {
    background: var(--accent-blue);
}

.forecast-table th.estimated {
    background: var(--text-secondary);
}

/* Scrollbar Styling */
.forecast-table-wrapper::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.forecast-table-wrapper::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.forecast-table-wrapper::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 4px;
}

.forecast-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Table cell alignment and padding improvements */
.forecast-table th,
.forecast-table td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Improve readability for dense tables */
.forecast-table {
    line-height: 1.4;
}

/* Interactive row highlighting */
.forecast-table tbody tr {
    cursor: pointer;
    transition: all 0.15s ease;
}

.forecast-table tbody tr.highlighted {
    background: rgba(212, 175, 55, 0.15) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Metric rows with special shading */
.forecast-table tbody tr.metric-row {
    background: linear-gradient(90deg, rgba(30, 58, 138, 0.08) 0%, rgba(30, 58, 138, 0.04) 100%);
    border-top: 1px solid rgba(30, 58, 138, 0.15);
}

.forecast-table tbody tr.metric-row td {
    font-weight: 500;
    color: var(--primary-navy);
}

.forecast-table tbody tr.metric-row td:first-child {
    font-weight: 600;
    font-size: 0.8125rem;
    font-style: italic;
}

.forecast-table tbody tr.metric-row:hover {
    background: linear-gradient(90deg, rgba(30, 58, 138, 0.12) 0%, rgba(30, 58, 138, 0.06) 100%);
}

/* Dark mode metric rows */
html.dark .forecast-table tbody tr.metric-row {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.12) 0%, rgba(99, 102, 241, 0.06) 100%);
    border-top: 1px solid rgba(99, 102, 241, 0.2);
}

html.dark .forecast-table tbody tr.metric-row td {
    color: #c7d2fe;
}

html.dark .forecast-table tbody tr.metric-row:hover {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.18) 0%, rgba(99, 102, 241, 0.09) 100%);
}

/* Ensure proper column width for metrics */
.forecast-table td:first-child {
    min-width: 165px;
    max-width: 265px;
    padding-left: 0.75rem;
}

/* Better spacing for year columns */
.forecast-table th[colspan] {
    text-align: center;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
}

/* Ensure numbers have breathing room */
.forecast-table td.number {
    padding-right: 0.75rem;
}

/* Unified Sidebar Table Styles */
.sidebar-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-primary);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin: 1rem 0;
    font-size: 0.75rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.sidebar-table th,
.sidebar-table td {
    padding: 0.5rem 0.75rem;
    text-align: right;
    border-bottom: 1px solid var(--border-light);
    white-space: nowrap;
}

.sidebar-table th:first-child,
.sidebar-table td:first-child {
    text-align: left;
    font-weight: 500;
    background: rgba(30, 58, 138, 0.03);
    border-right: 1px solid var(--border-light);
    position: sticky;
    left: 0;
    z-index: 1;
}

.sidebar-table thead th {
    background: var(--bg-secondary);
    font-weight: 600;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-light);
    padding: 0.75rem;
}

/* Table Row Styling */
.sidebar-table tbody tr {
    transition: background-color 0.15s ease;
}

.sidebar-table tbody tr:hover {
    background: rgba(30, 58, 138, 0.02);
}

.sidebar-table tbody tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.01);
}

/* Value Styling */
.sidebar-table .positive {
    color: var(--success);
    font-weight: 600;
}

.sidebar-table .negative {
    color: var(--danger);
    font-weight: 600;
}

/* Valuation Summary Special Row */
.sidebar-table tr.total-row,
.sidebar-table tbody tr:last-child {
    background: var(--bg-secondary);
    font-weight: 700;
}

.sidebar-table tr.total-row td,
.sidebar-table tbody tr:last-child td {
    border-top: 2px solid var(--accent-gold);
    font-weight: 700;
}

/* Responsive Table Wrapper */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-wrapper::-webkit-scrollbar {
    height: 6px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 3px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle svg {
    stroke: var(--text-primary);
}

/* === RESPONSIVE WIDTH ADJUSTMENTS === */

/* DEFAULT: 1400px and above */
/* Uses the root values: --sidebar-width: 15%, --content-width: 58%, --metrics-width: 42% */

/* 1200px to 1400px: Same as default, no changes needed */

/* Tablet: 768px to 1200px - Hide metrics, adjust sidebar */
@media (max-width: 1200px) {
    :root {
        --sidebar-width: 20%;  /* Slightly wider sidebar */
    }

    .report-main {
        margin-left: var(--sidebar-width) !important;
        width: calc(100% - var(--sidebar-width)) !important;
        grid-template-columns: 1fr !important;  /* Single column - content only */
    }

    .metrics-sidebar {
        display: none !important;  /* Hide metrics on tablet */
    }

    .content-wrapper {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Mobile: 768px and below - Hide sidebar, content only */
@media (max-width: 768px) {
    .report-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 280px;  /* Fixed width on mobile */
        position: fixed;
        z-index: 1000;
    }

    .report-sidebar.active {
        transform: translateX(0);
        box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    }

    .report-main {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 1rem;
        grid-template-columns: 1fr !important;
    }

    .metrics-sidebar {
        display: none !important;  /* Hide metrics on mobile */
    }

    .content-wrapper {
        width: 100% !important;
        padding: 0 1rem;
    }

    .mobile-menu-toggle {
        display: block;
    }
}

/* Reading progress indicator */
.reading-progress {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--accent-gold);
    z-index: 1001;
    transition: width 0.1s ease;
}

/* === PRINT STYLES === */
@media print {
    .research-header,
    .report-sidebar {
        display: none;
    }

    .report-main {
        margin-left: 0;
        width: 100%;
        padding: 2rem;
    }

    .content-wrapper {
        flex: 1;
        max-width: 100%;
        padding-right: 0;
    }

    .metrics-sidebar {
        width: 100%;
        max-width: 100%;
        page-break-before: always;
    }
}

/* ==========================================
COMPREHENSIVE CONTENT DESIGN SYSTEM
========================================== */

/* === METRIC CARDS === */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.metric-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    padding: 1rem;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--primary-navy);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.metric-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.metric-card:hover::before {
    opacity: 1;
}

.metric-card .metric-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.metric-card .metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}

.metric-card.positive .metric-value {
    color: var(--success);
}

.metric-card.negative .metric-value {
    color: var(--danger);
}

/* Compact metrics variant */
.metrics-grid.compact {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}

.metrics-grid.compact .metric-card {
    padding: 0.75rem;
}

.metrics-grid.compact .metric-value {
    font-size: 1.125rem;
}

/* Inline metric items */
.metric-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light);
}

.metric-item:last-child {
    border-bottom: none;
}

.metric-item .metric-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.metric-item .metric-value {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* === HIGHLIGHT BOXES === */
.highlight-box {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-accent) 100%);
    border-left: 4px solid var(--primary-navy);
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin: 1.5rem 0;
    box-shadow: var(--shadow-sm);
}

.highlight-box h4 {
    margin: 0 0 0.75rem 0;
    color: var(--primary-navy);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.highlight-box p {
    margin: 0.5rem 0;
    color: var(--text-primary);
    line-height: 1.6;
}

.highlight-box ul {
    margin: 0.5rem 0;
    padding-left: 1.25rem;
}

.highlight-box li {
    margin: 0.5rem 0;
    color: var(--text-primary);
    line-height: 1.5;
}

/* Highlight box variants */
.highlight-box.warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
    border-left-color: var(--warning);
}

.highlight-box.warning h4 {
    color: var(--warning);
}

.highlight-box.success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-left-color: var(--success);
}

.highlight-box.success h4 {
    color: var(--success);
}

/* === RISK GRID === */
.risk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.risk-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    padding: 1rem;
    position: relative;
    transition: all 0.2s ease;
}

.risk-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.risk-type {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.risk-type.high,
.risk-type.negative {
    background: rgba(220, 38, 38, 0.1);
    color: var(--danger);
}

.risk-type.moderate,
.risk-type.medium {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.risk-type.low,
.risk-type.positive {
    background: rgba(5, 150, 105, 0.1);
    color: var(--success);
}

.risk-description {
    color: var(--text-primary);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* === DATA TABLES === */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    background: var(--bg-primary);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin: 1.5rem 0;
}

.data-table thead {
    background: var(--primary-navy);
    border-bottom: 2px solid var(--accent-gold);
}

.data-table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: white;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
}

.data-table tbody tr:hover {
    background: var(--bg-secondary);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Number columns */
.data-table td.number,
.data-table th.number {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* === SECTION STYLING === */
.report-section {
    margin-bottom: 3rem;
}

.section-header {
    border-bottom: 2px solid var(--border-light);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.section-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0.25rem 0 0 0;
}

/* === INTERACTIVE ELEMENTS === */
.expandable {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.expand-icon {
    display: inline-block;
    margin-left: 0.5rem;
    transition: transform 0.2s ease;
    color: var(--text-secondary);
}

.expandable.collapsed .expand-icon {
    transform: rotate(-90deg);
}

.section-content {
    animation: slideDown 0.3s ease;
}

.section-content.collapsed {
    display: none;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === RESPONSIVE OVERRIDES === */
@media (max-width: 768px) {
    /* Increase base font for readability */
    body {
        --base-font-size: 16px;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .risk-grid {
        grid-template-columns: 1fr;
    }

    .data-table {
        font-size: 0.8125rem;
    }

    .metric-card .metric-value {
        font-size: 1.25rem;
    }

    /* === MOBILE SUMMARY VIEW === */
    /* Show only: Investment Overview (dashboard), In a Nutshell, Investor Profiles */

    /* Hide all report sections by default */
    .report-section {
        display: none !important;
    }

    /* Show only key sections */
    #in-a-nutshell {
        display: block !important;
        margin-bottom: 2rem;
    }

    /* Show investor profile sections */
    section[id*="investor-profile"],
    .investor-profile-analysis,
    section:has(.investor-profile-analysis) {
        display: block !important;
    }

    /* Show only Investment Overview dashboard and Financial Forecast chart */
    .ai-viz-container {
        margin-bottom: 2rem;
        padding-right: 0;
        display: flex;
        flex-direction: column;
    }

    /* Hide all visualization cards by default on mobile */
    .ai-viz-card {
        display: none !important;
    }

    /* Show only Investment Overview and Financial Forecast */
    #viz-investment-thesis-dashboard,
    #viz-forecast-table-toggle {
        display: block !important;
    }

    /* Order: Dashboard first, Forecast second */
    #viz-investment-thesis-dashboard {
        order: 1;
    }

    #viz-forecast-table-toggle {
        order: 2;
    }

    /* Make content flow vertically */
    .report-main {
        display: flex !important;
        flex-direction: column !important;
    }

    .content-wrapper {
        order: 1;
    }
}

@media (max-width: 480px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }

    /* Smaller padding for very small screens */
    .content-wrapper {
        padding: 0 0.75rem !important;
    }

    #in-a-nutshell {
        padding: 1.5rem 1rem;
    }
}

/* === IN A NUTSHELL SECTION STYLING === */
#in-a-nutshell {
    background: var(--bg-primary);
    border: 2px solid var(--primary-navy);
    border-radius: 0.75rem;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-md);
}

#in-a-nutshell h2 {
    color: var(--primary-navy);
    font-size: 1.5rem;  /* Reduced from 1.75rem for better proportion */
    margin-bottom: 0.5rem;
    font-weight: 700;
}

#in-a-nutshell .section-subtitle {
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;  /* Reduced from 1rem for better proportion */
}

/* Style the nutshell content */
#in-a-nutshell p {
    line-height: 1.8;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;  /* Reduced from 1rem for consistency */
    color: var(--text-primary);
}

/* First paragraph - make it stand out */
#in-a-nutshell > p:first-of-type,
#in-a-nutshell .section-content > p:first-of-type {
    font-size: 1rem;  /* Reduced from 1.1rem for better proportion */
    font-weight: 500;
    color: var(--primary-navy);
    padding: 1rem;
    background: rgba(30, 58, 138, 0.05);
    border-left: 4px solid var(--accent-gold);
    border-radius: 0.375rem;
    margin-bottom: 1.5rem;
}

/* Create bullet point lists from key points */
#in-a-nutshell ul {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
    list-style: none;
}

#in-a-nutshell ul li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 1rem;
    line-height: 1.7;
    font-size: 0.85rem;  /* Reduced from 0.95rem for better proportion */
}

#in-a-nutshell ul li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--accent-gold);
    font-weight: bold;
    font-size: 1.25rem;
}

/* Highlight key metrics */
#in-a-nutshell strong {
    color: var(--primary-navy);
    font-weight: 600;
    background: linear-gradient(to bottom, transparent 60%, rgba(212, 175, 55, 0.3) 60%);
    padding: 0 2px;
}

/* Add visual separators between main ideas */
#in-a-nutshell hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border-light), transparent);
    margin: 1.5rem 0;
}
