:root {
    --bg-main: #FAF9F6; /* Cream/Off-white */
    --bg-secondary: #ffffff; /* Pure white for cards */
    --bg-card: #f8f6f0; /* Slightly darker cream for contrast */
    --text-main: #1e293b; /* Deep slate/charcoal */
    --text-secondary: #475569; /* Lighter slate */
    --primary-color: #7f1d1d; /* Deep Burgundy for authority */
    --accent-color: #1e3a8a; /* Oxford Blue for contrast */
    --border: #e2e8f0; /* Soft gray border */
    --border-dark: #cbd5e1; /* Darker border for emphasis */
    --font-heading: 'Cormorant Garamond', serif; /* Classic, authoritative serif */
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --warning-red: #b91c1c;
    --success-green: #047857;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.7;
    overflow-x: hidden;
    font-size: 1.05rem;
}

/* NAVBAR */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(250, 249, 246, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-dark);
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}
.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}
.brand {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.brand span { color: var(--primary-color); }
.nav-links {
    display: flex;
    gap: 2.5rem;
}
.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.nav-links a:hover { color: var(--primary-color); }
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #fff;
    border: 1px solid var(--border-dark);
    border-radius: 6px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all var(--transition);
}
.back-btn:hover {
    background: var(--bg-card);
    border-color: var(--text-main);
}

/* LAYOUT */
.report-container {
    max-width: 1280px;
    margin: 110px auto 4rem;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 4rem;
    align-items: start;
}

/* SIDEBAR */
.sidebar {
    position: sticky;
    top: 110px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.75rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}
.sidebar-header {
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: 1.5rem;
}
.sidebar-header h3 { 
    font-family: var(--font-heading);
    font-size: 1.2rem; 
    font-weight: 700; 
    color: var(--text-main);
    margin: 0;
}
.toc-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.nav-link {
    display: block;
    padding: 0.6rem 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 4px;
    transition: all var(--transition);
    border-left: 3px solid transparent;
}
.nav-link:hover, .nav-link.active {
    background: var(--bg-card);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 600;
}
.meta-box {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.meta-item { margin-bottom: 1.25rem; }
.meta-label { font-size: 0.75rem; color: #64748b; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; display: block; margin-bottom: 0.25rem; }
.meta-value { font-size: 0.9rem; font-family: var(--font-mono); color: var(--text-main); font-weight: 600;}
.badge { display: inline-block; padding: 0.3rem 0.6rem; background: #fef2f2; color: var(--primary-color); border: 1px solid #fecaca; border-radius: 4px; font-size: 0.75rem; font-weight: 800; margin-right: 0.5rem; letter-spacing: 0.5px;}

/* MAIN CONTENT */
.report-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 4rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.05);
}

.hero-section {
    margin-bottom: 4rem;
    padding-bottom: 4rem;
    border-bottom: 1px solid var(--border-dark);
}
.hero-tag {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: var(--text-secondary);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}
.report-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    letter-spacing: -0.02em;
}
.title-sub {
    display: block;
    font-size: 1.4rem;
    font-weight: 400;
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-top: 1rem;
    line-height: 1.4;
    font-style: italic;
}
.lead-text {
    font-size: 1.2rem;
    color: var(--text-main);
    line-height: 1.8;
    margin-top: 2.5rem;
    font-weight: 500;
}
.lead-text::first-letter {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 700;
    float: left;
    margin-right: 0.5rem;
    line-height: 0.8;
    color: var(--primary-color);
}

/* STATS DASHBOARD */
.stats-dashboard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3.5rem;
    padding: 2.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: 8px;
}
.stat-card {
    display: flex;
    flex-direction: column;
    padding-right: 2rem;
    border-right: 1px solid var(--border);
}
.stat-card:last-child {
    border-right: none;
    padding-right: 0;
}
.stat-label { font-size: 0.75rem; color: var(--text-secondary); text-transform: uppercase; font-weight: 700; letter-spacing: 1px; margin-bottom: 0.75rem; }
.stat-value { font-size: 2.5rem; font-weight: 700; font-family: var(--font-heading); color: var(--primary-color); margin-bottom: 0.5rem; line-height: 1;}
.stat-desc { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.4;}

/* SECTIONS */
.section-main { margin-bottom: 5rem; scroll-margin-top: 120px; }
.section-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: flex-end; 
    margin-bottom: 2rem; 
    border-bottom: 2px solid var(--text-main); 
    padding-bottom: 0.75rem; 
}
.section-title { 
    font-family: var(--font-heading);
    font-size: 2.2rem; 
    font-weight: 700; 
    color: var(--text-main); 
    display: flex; 
    align-items: center; 
    gap: 1rem; 
    letter-spacing: -0.01em;
}
.section-number { 
    color: var(--primary-color); 
    font-family: var(--font-mono); 
    font-size: 1.25rem; 
    font-weight: 700; 
    background: #fef2f2;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}
.section-meta { display: flex; gap: 1rem; font-size: 0.8rem; color: var(--text-secondary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;}
.section-priority { color: var(--warning-red); }

.content-block { margin-bottom: 2.5rem; }
.content-block p { margin-bottom: 1.5rem; color: var(--text-secondary); font-size: 1.1rem; }
.content-block p strong { color: var(--text-main); font-weight: 600;}
.content-block h3 { 
    font-family: var(--font-heading);
    font-size: 1.6rem; 
    font-weight: 700; 
    color: var(--accent-color); 
    margin: 2.5rem 0 1.25rem; 
}

/* BOXES (INSTITUTIONAL STYLE) */
.highlight-box { 
    background: #f8fafc; 
    border: 1px solid #cbd5e1; 
    border-left: 4px solid var(--accent-color);
    padding: 2rem; 
    margin: 2.5rem 0; 
}
.highlight-box h4 { 
    font-family: var(--font-heading);
    color: var(--accent-color); 
    margin-bottom: 1rem; 
    font-size: 1.3rem; 
    font-weight: 700;
}
.highlight-box p { color: var(--text-secondary); font-size: 1.05rem; margin-bottom: 0; }

.danger-box { 
    background: #fef2f2; 
    border: 1px solid #fecaca; 
    border-top: 4px solid var(--warning-red); 
    padding: 2rem; 
    margin: 2.5rem 0; 
}
.danger-box h4 { 
    font-family: var(--font-heading);
    color: var(--warning-red); 
    margin-bottom: 1rem; 
    font-size: 1.3rem; 
    font-weight: 700;
}
.danger-box p { color: var(--text-main); font-size: 1.05rem; margin-bottom: 0; }

/* CHARTS CONTAINER */
.chart-container {
    background: #fff;
    border: 1px solid var(--border-dark);
    border-radius: 8px;
    padding: 2rem;
    margin: 2.5rem 0;
    box-shadow: 0 10px 25px rgba(0,0,0,0.02);
}
.chart-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    text-align: center;
}

/* TIMELINE */
.timeline-container {
    position: relative;
    max-width: 100%;
    margin: 3rem 0;
    padding: 2rem 0;
}
.timeline-container::after {
    content: '';
    position: absolute;
    width: 2px;
    background: var(--border-dark);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}
.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}
.timeline-item::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    right: -8px;
    background-color: var(--bg-secondary);
    border: 3px solid var(--primary-color);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}
.left { left: 0; }
.right { left: 50%; }
.right::after { left: -8px; }
.timeline-content {
    padding: 1.5rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}
.timeline-content h4 { font-family: var(--font-heading); font-size: 1.2rem; color: var(--text-main); margin-bottom: 0.5rem; font-weight: 700;}
.timeline-content p { font-size: 0.95rem; margin: 0; }
.timeline-year { font-family: var(--font-mono); font-weight: 700; color: var(--primary-color); font-size: 0.9rem; margin-bottom: 0.25rem; display: block;}

/* CALCULATOR (RE-THEMED) */
.calculator-container { 
    background: #fff; 
    border-radius: 8px; 
    border: 1px solid var(--border-dark); 
    overflow: hidden; 
    margin: 3rem 0; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
}
.calc-header { 
    background: var(--bg-card); 
    padding: 1.5rem 2rem; 
    border-bottom: 1px solid var(--border-dark); 
}
.calc-header h3 { 
    font-family: var(--font-heading);
    font-size: 1.4rem; 
    font-weight: 700; 
    color: var(--text-main); 
    margin: 0; 
}
.calc-body { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; padding: 2.5rem; }
.calc-inputs { display: flex; flex-direction: column; gap: 2rem; }
.input-group label { display: block; font-size: 0.9rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.75rem; }
.range-slider { -webkit-appearance: none; width: 100%; height: 6px; border-radius: 3px; background: #e2e8f0; outline: none; border: 1px solid #cbd5e1; }
.range-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--primary-color); cursor: pointer; transition: 0.2s; box-shadow: 0 2px 5px rgba(0,0,0,0.2);}
.range-slider::-webkit-slider-thumb:hover { transform: scale(1.15); }
.value-display { font-family: var(--font-mono); font-weight: 700; color: var(--accent-color); font-size: 1.1rem; margin-top: 0.75rem; display: block; }
.calc-results { 
    background: var(--bg-main); 
    border-radius: 6px; 
    padding: 2rem; 
    border: 1px solid var(--border); 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
}
.result-box { text-align: center; margin-bottom: 2rem; }
.result-box:last-child { margin-bottom: 0; padding-top: 1.5rem; border-top: 1px dashed var(--border-dark);}
.result-label { font-size: 0.85rem; color: var(--text-secondary); text-transform: uppercase; font-weight: 700; margin-bottom: 0.5rem; letter-spacing: 1px;}
.result-value { font-size: 3rem; font-weight: 700; font-family: var(--font-heading); color: var(--text-main); line-height: 1;}
.result-value.positive { color: var(--success-green); }
.result-value.negative { color: var(--warning-red); }

/* LISTS */
.institutional-list {
    list-style: none;
    margin: 1.5rem 0;
}
.institutional-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
}
.institutional-list li::before {
    content: "■";
    position: absolute;
    left: 0;
    top: 2px;
    color: var(--primary-color);
    font-size: 0.8rem;
}
.institutional-list li strong {
    color: var(--text-main);
}

/* FOOTER ELEMENTS */
.methodology-box {
    background: var(--bg-card);
    border-top: 2px solid var(--text-main);
    padding: 2.5rem;
    margin-top: 4rem;
}
.methodology-box h3 { font-family: var(--font-heading); font-size: 1.4rem; color: var(--text-main); margin-bottom: 1rem;}
.methodology-box p { font-size: 0.95rem; color: var(--text-secondary); margin-bottom: 1rem; }
.disclaimer-box {
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}
.disclaimer-box p { font-size: 0.75rem; color: #94a3b8; text-align: justify; margin-bottom: 0.5rem; font-family: var(--font-mono);}

/* RELATED REPORTS */
.related-reports { margin-top: 5rem; padding-top: 4rem; border-top: 1px solid var(--border-dark); }
.related-reports h3 { font-family: var(--font-heading); font-size: 2rem; margin-bottom: 2.5rem; color: var(--text-main); text-align: center;}
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.related-card { 
    background: #fff; 
    border: 1px solid var(--border); 
    border-radius: 8px; 
    padding: 2rem; 
    text-decoration: none; 
    transition: all var(--transition); 
    display: flex; 
    flex-direction: column; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}
.related-card:hover { transform: translateY(-5px); box-shadow: 0 15px 35px rgba(0,0,0,0.06); border-color: var(--border-dark); }
.related-card-badge { align-self: flex-start; padding: 0.3rem 0.8rem; background: #f1f5f9; color: var(--text-secondary); border: 1px solid #cbd5e1; border-radius: 4px; font-size: 0.75rem; font-weight: 700; margin-bottom: 1.25rem; text-transform: uppercase; letter-spacing: 0.5px; }
.related-card h4 { font-family: var(--font-heading); color: var(--text-main); font-size: 1.3rem; font-weight: 700; margin-bottom: 1rem; line-height: 1.3; }
.related-card p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.6; margin-bottom: 0; }

@media (max-width: 1024px) {
    .report-container { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .stats-dashboard { grid-template-columns: 1fr; padding: 1.5rem; }
    .stat-card { border-right: none; border-bottom: 1px solid var(--border); padding-right: 0; padding-bottom: 1.5rem; margin-bottom: 1.5rem;}
    .stat-card:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0;}
    .calc-body { grid-template-columns: 1fr; }
    .related-grid { grid-template-columns: 1fr; }
    .timeline-container::after { left: 31px; }
    .timeline-item { width: 100%; padding-left: 70px; padding-right: 25px; }
    .timeline-item::after { left: 23px; }
    .right { left: 0%; }
}
@media (max-width: 768px) {
    .report-title { font-size: 2.2rem; }
    .title-sub { font-size: 1.2rem; }
    .report-content { padding: 2rem; }
}

/* FOOTER */
.rp-footer {
    background: #020d07;
    padding: 3rem 2rem 1.5rem;
    border-top: 1px solid rgba(16, 185, 129, .15);
    margin-top: 4rem;
}
.rp-footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}
@media(max-width:768px) {
    .rp-footer-inner {
        grid-template-columns: 1fr;
    }
}
.rp-footer-brand-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: .5rem;
}
.rp-footer-brand-name i {
    color: #10b981;
    margin-right: .4rem;
}
.rp-footer-desc {
    font-size: .85rem;
    color: rgba(255, 255, 255, .45);
    line-height: 1.6;
}
.rp-footer-col-title {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, .45);
    margin-bottom: 1rem;
}
.rp-footer-link {
    display: block;
    text-decoration: none;
    font-size: .85rem;
    color: rgba(255, 255, 255, .6);
    margin-bottom: .5rem;
    transition: color .2s;
}
.rp-footer-link:hover {
    color: #10b981;
}
.rp-footer-bottom {
    max-width: 1280px;
    margin: 1.25rem auto 0;
    text-align: center;
    font-size: .8rem;
    color: rgba(255, 255, 255, .25);
}
.rp-social {
    display: flex;
    gap: .75rem;
    margin-top: 1.25rem;
}
.rp-social a {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, .6);
    font-size: .8rem;
    text-decoration: none;
    transition: background .2s, color .2s;
}
.rp-social a:hover {
    background: #059669;
    color: #fff;
    border-color: transparent;
}
