/* ===== Layout ===== */
.report-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(3rem, 6vh, 5rem) 0;
    align-items: start;
}

.report-content {
    max-width: 820px;
}

/* Hero byline */
.report-byline {
    margin-top: 1rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.8);
}
.report-byline strong { color: var(--gold-light); font-weight: 700; }
.report-byline-sep { margin: 0 0.5rem; opacity: 0.55; }

/* Memo block (the in-character policy memos) */
.memo-block {
    background: var(--off-white);
    border-left: 4px solid var(--gold);
    padding: 1.75rem 2rem 1.5rem;
    margin: 2.5rem 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--navy);
}
.memo-header {
    text-align: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid rgba(10, 37, 64, 0.15);
}
.memo-header strong { display: block; font-size: 0.95rem; }
.memo-meta { margin: 0 0 1rem; }
.memo-meta p { margin: 0; font-family: 'Courier New', Courier, monospace; color: var(--navy); }
.memo-meta strong { color: var(--gold-dark); display: inline-block; min-width: 70px; }
.memo-block h4 { font-family: 'Courier New', Courier, monospace; font-weight: 700; font-size: 0.92rem; color: var(--gold-dark); text-transform: uppercase; letter-spacing: 1px; margin: 1.25rem 0 0.4rem; }
.memo-block p { font-family: 'Courier New', Courier, monospace; font-size: 0.92rem; line-height: 1.65; color: var(--navy); margin: 0 0 0.85rem; }
.memo-block ol, .memo-block ul { font-family: 'Courier New', Courier, monospace; font-size: 0.92rem; line-height: 1.65; margin: 0.5rem 0 1rem 1.5rem; }
.memo-block li { margin-bottom: 0.4rem; }

/* End-matter (Disclaimer / Acknowledgements / Copyright) */
.report-endmatter {
    margin-top: 4rem;
    padding-top: 2.5rem;
    border-top: 1px solid rgba(10, 37, 64, 0.15);
}
.report-endmatter h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.25rem;
    color: var(--navy);
    margin: 2rem 0 0.6rem;
    font-weight: 600;
}
.report-endmatter h3:first-child { margin-top: 0; }
.report-endmatter p {
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--mid-gray);
    margin-bottom: 1rem;
}
.report-endmatter .copyright {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(10, 37, 64, 0.08);
    font-size: 0.8rem;
    color: var(--mid-gray);
    text-align: center;
}

/* ===== Download Report Button ===== */
.generate-pdf-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    background: var(--gold);
    color: var(--navy);
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 2.5rem;
}

.generate-pdf-btn:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(218, 165, 32, 0.4);
}

.generate-pdf-btn svg {
    width: 16px;
    height: 16px;
}

/* ===== Sticky TOC ===== */
.toc-sidebar {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding-right: 1rem;
}

.toc-sidebar h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(218, 165, 32, 0.3);
    letter-spacing: 0.5px;
}

.toc-sidebar ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.toc-sidebar > ul > li {
    margin-bottom: 0.25rem;
}

.toc-sidebar > ul > li > a {
    display: block;
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--mid-gray);
    text-decoration: none;
    border-left: 2px solid transparent;
    transition: all 0.3s ease;
    line-height: 1.4;
}

.toc-sidebar > ul > li > a:hover,
.toc-sidebar > ul > li > a.active {
    color: var(--navy);
    border-left-color: var(--gold);
    background: rgba(218, 165, 32, 0.06);
}

.toc-sidebar > ul > li > a.active {
    font-weight: 600;
    color: var(--gold-dark);
}

.toc-sub {
    margin: 0.15rem 0 0.25rem 0.75rem !important;
}

.toc-sub li a {
    display: block;
    padding: 0.3rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--light-gray);
    text-decoration: none;
    border-left: 2px solid transparent;
    transition: all 0.3s ease;
    line-height: 1.4;
}

.toc-sub li a:hover,
.toc-sub li a.active {
    color: var(--navy);
    border-left-color: var(--gold-light);
}

.toc-sub li a.active {
    font-weight: 600;
    color: var(--gold-dark);
}

/* ===== Report Article ===== */
.report-content h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.6rem, 2.5vw, 2rem);
    color: var(--navy);
    font-weight: 600;
    margin: 3rem 0 1rem;
    line-height: 1.3;
    padding-top: 1rem;
}

.report-content h2:first-of-type {
    margin-top: 0;
}

.report-content h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.2rem, 1.8vw, 1.4rem);
    color: var(--gold-dark);
    font-weight: 600;
    margin: 2rem 0 0.75rem;
}

.report-content h4 {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    color: var(--navy);
    font-weight: 600;
    margin: 1.5rem 0 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.report-content p {
    font-size: clamp(0.95rem, 1.1vw, 1.05rem);
    color: var(--navy);
    line-height: 1.85;
    margin-bottom: 1.25rem;
    font-weight: 300;
}

.report-content ul,
.report-content ol {
    margin: 0.75rem 0 1.25rem 1.5rem;
}

.report-content li {
    font-size: clamp(0.95rem, 1.1vw, 1.05rem);
    color: var(--navy);
    line-height: 1.75;
    margin-bottom: 0.5rem;
    font-weight: 300;
}

.report-content li strong {
    font-weight: 600;
}

.report-content li p {
    margin-top: 0.5rem;
}

/* ===== Inline figures (hero, charts, illustrations) ===== */
.report-content figure {
    margin: 2rem 0;
    max-width: 100%;
}
.report-content figure img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 2px;
}
.report-content figure figcaption {
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--mid-gray);
    font-style: italic;
    margin-top: 0.6rem;
    text-align: center;
    padding: 0 0.5rem;
}

/* ===== Sources / references list at the foot of the report ===== */
.report-content ol.sources {
    list-style: decimal;
    margin: 1.5rem 0 2rem 1.75rem;
    padding: 0;
    font-size: 0.85rem;
    line-height: 1.6;
}
.report-content ol.sources li {
    font-size: 0.85rem;
    line-height: 1.55;
    margin-bottom: 0.6rem;
    color: var(--navy);
}
.report-content ol.sources a {
    color: var(--ocean);
    text-decoration: underline;
    word-break: break-word;
}

/* ===== Crimson Callout ===== */
.crimson-callout {
    background: #8B1A1A;
    color: #ffffff;
    padding: 2rem 2.5rem;
    margin: 2rem 0;
    border-radius: 2px;
}

.crimson-callout p {
    color: #ffffff !important;
    font-weight: 300 !important;
    font-size: 0.95rem !important;
    line-height: 1.8 !important;
    margin-bottom: 1rem !important;
}

.crimson-callout p:last-child {
    margin-bottom: 0 !important;
}

/* ===== Memo Styling ===== */
.memo {
    max-width: 720px;
    margin: 2.5rem auto;
    border: 1px solid #ccc;
    border-left: 4px solid var(--gold);
    background: #fafaf8;
    padding: 2rem 2.5rem;
    font-family: 'Courier New', Courier, monospace;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.memo-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #ccc;
}

.memo-header-title {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.memo-header-sub {
    font-size: 0.8rem;
    font-style: italic;
}

.memo-fields {
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    line-height: 1.8;
}

.memo-fields strong {
    display: inline-block;
    width: 60px;
}

.memo-section-label {
    font-weight: 700;
    text-decoration: underline;
    font-size: 0.9rem;
    margin: 1.5rem 0 0.75rem;
    letter-spacing: 1px;
}

.memo p {
    font-family: 'Courier New', Courier, monospace !important;
    font-size: 0.85rem !important;
    line-height: 1.75 !important;
    margin-bottom: 1rem !important;
    font-weight: 400 !important;
}

.memo ol,
.memo ul {
    margin: 0.75rem 0 1rem 1.5rem;
}

.memo li {
    font-family: 'Courier New', Courier, monospace !important;
    font-size: 0.85rem !important;
    line-height: 1.75 !important;
    margin-bottom: 0.5rem !important;
}

/* ===== Section Divider ===== */
.section-divider {
    border: none;
    border-top: 1px solid rgba(218, 165, 32, 0.2);
    margin: 3rem 0;
}

/* ===== Publication Nav ===== */
.pub-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid rgba(218, 165, 32, 0.2);
}

.pub-nav a {
    text-decoration: none;
    transition: all 0.3s ease;
}

.pub-nav-back {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--ocean);
}

.pub-nav-back:hover {
    color: var(--ocean-dark);
}

.pub-nav-next {
    text-align: right;
    margin-left: auto;
}

.pub-nav-prev {
    text-align: left;
    margin-right: auto;
}

.pub-nav-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--light-gray);
    margin-bottom: 0.25rem;
}

.pub-nav-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--navy);
    transition: color 0.3s ease;
}

.pub-nav-next:hover .pub-nav-title,
.pub-nav-prev:hover .pub-nav-title {
    color: var(--gold-dark);
}

/* ===== Publication Header ===== */
.publication-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-bottom: 2px solid rgba(218, 165, 32, 0.3);
}

.publication-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.3rem, 2.2vw, 1.7rem);
    font-weight: 700;
    color: var(--navy);
    letter-spacing: 0.5px;
}

.publication-logo img {
    width: 32px;
    height: 32px;
}

/* ===== Responsive ===== */
@media (max-width: 968px) {
    .report-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .toc-sidebar {
        position: relative;
        top: 0;
        max-height: none;
        padding: 1.5rem;
        background: var(--off-white);
        border: 1px solid rgba(218, 165, 32, 0.15);
        margin-bottom: 2rem;
    }
}

@media (max-width: 640px) {
    .memo {
        padding: 1.25rem 1rem;
    }

    .crimson-callout {
        padding: 1.5rem 1.25rem;
    }
}

/* ===== Print Styles ===== */
@media print {
    header, footer, .toc-sidebar, .generate-pdf-btn, .mobile-menu, .mobile-nav {
        display: none !important;
    }

    .page-hero {
        padding: 1rem 0 !important;
        background: none !important;
    }

    .page-hero::before {
        display: none !important;
    }

    .page-hero h1 {
        color: var(--navy) !important;
        font-size: 2rem !important;
    }

    .page-hero h1 em {
        color: var(--gold-dark) !important;
    }

    .page-hero p {
        color: var(--mid-gray) !important;
    }

    .report-layout {
        display: block !important;
        padding: 0 !important;
    }

    .report-content {
        max-width: 100% !important;
    }

    .print-header {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 1rem;
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
        border-bottom: 2px solid var(--gold);
    }

    .print-header img {
        width: 50px;
        height: 50px;
    }

    .print-header span {
        font-family: 'Cormorant Garamond', serif;
        font-size: 1.2rem;
        font-weight: 600;
        color: var(--navy);
    }

    .memo {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ccc;
        border-left: 4px solid var(--gold);
    }

    .crimson-callout {
        break-inside: avoid;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    @page {
        margin: 2cm;
    }
}

.print-header {
    display: none;
}
