:root {
    --page-bg: #f6f7f9;
    --article-bg: #ffffff;
    --text: #20242a;
    --muted: #626a73;
    --heading: #15191e;
    --border: #dfe3e8;
    --link: #315f87;
    --link-hover: #1f4567;
    --article-max-width: 850px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--page-bg);
    color: var(--text);
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
    font-size: 1rem;
    line-height: 1.72;
}

a {
    color: var(--link);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.15em;
}

a:hover {
    color: var(--link-hover);
}

.site-header {
    padding: 3.25rem 0 2.75rem;
    background: var(--article-bg);
    border-bottom: 1px solid var(--border);
}

.report-label {
    margin: 0 0 0.65rem;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.site-header h1 {
    max-width: 900px;
    margin: 0;
    color: var(--heading);
    font-size: clamp(2rem, 4vw, 3.15rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.025em;
}

.report-meta {
    margin-top: 1rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.meta-separator {
    display: inline-block;
    margin: 0 0.25em;
    font-weight: 700;
    line-height: 1;
    transform: scale(1.15);
}

.article {
    max-width: var(--article-max-width);
    padding-top: 3.25rem;
    padding-bottom: 5rem;
}

.article > section {
    margin-bottom: 3.25rem;
}

.article section section {
    margin-top: 2rem;
}

.article > section > section:first-of-type {
    margin-top: 1.25rem;
}

.article h2,
.article h3 {
    color: var(--heading);
    scroll-margin-top: 1.5rem;
}

.article h2 {
    margin: 0 0 1rem;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.015em;
}

.article h3 {
    margin: 0 0 0.85rem;
    font-size: 1.3rem;
    font-weight: 650;
    line-height: 1.35;
}

.article p {
    margin: 0 0 1.15rem;
}

.article .primary-question {
    margin: 1.25rem 0 0.85rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border);
    font-weight: 600;
}

.research-questions {
    margin: 1rem 0 1.5rem;
    padding-left: 1.5rem;
}

.research-questions li {
    padding-left: 0.35rem;
    margin-bottom: 1.35rem;
}

.research-questions .question {
    margin-bottom: 0.6rem;
    font-weight: 600;
}

.research-questions li > p:last-child {
    margin-bottom: 0;
}

.article code {
    padding: 0.12em 0.3em;
    border-radius: 0.25rem;
    background: #e6e9ed;
    color: #252a30;
    font-size: 0.9em;
}

.toc {
    font-size: 0.9rem;
    line-height: 1.35;
}

.toc-inner {
    position: sticky;
    top: 2rem;
    max-height: calc(100vh - 4rem);
    padding: 3.25rem 1.75rem 3rem 0;
    overflow-y: auto;
}

.toc-title {
    margin: 0 0 0.8rem;
    color: var(--heading);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.toc a {
    display: block;
    margin: 0;
    padding: 0.38rem 0;
    color: #4c5560;
    text-decoration: none;
}

.toc a:hover {
    color: var(--link-hover);
}

.toc a:not(.toc-sub) {
    padding-left: 1rem;
    text-indent: -1rem;
}

.toc .toc-sub {
    padding-left: 2.5rem;
    text-indent: -1.5rem;
    color: #68717a;
    font-size: 0.86rem;
}

.toc-row {
    display: flex;
    align-items: flex-start;
}

.toc-row > a {
    flex: 1;
    min-width: 0;
}

.toc-toggle {
    flex: 0 0 auto;
    width: 1.65rem;
    height: 1.65rem;
    margin: 0.2rem 0 0 0.15rem;
    padding: 0;
    border: 0;
    border-radius: 0.25rem;
    background: transparent;
    color: #727a83;
}

.toc-toggle::before {
    content: "›";
    display: block;
    font-size: 1.25rem;
    line-height: 1;
    transition: transform 0.15s ease;
}

.toc-toggle[aria-expanded="true"]::before {
    transform: rotate(90deg);
}

.toc-toggle:hover,
.toc-toggle:focus {
    background: #eef1f4;
    color: var(--link-hover);
}

.mobile-toc {
    position: sticky;
    top: 0;
    z-index: 1020;
    padding: 0.6rem 0;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--border);
}

.toc-button {
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--heading);
    font-size: 0.9rem;
    font-weight: 600;
}

.toc-button:hover,
.toc-button:focus {
    border-color: #bbc2ca;
    background: #f7f8fa;
}

.offcanvas-title {
    font-size: 1.15rem;
    font-weight: 700;
}

.toc-mobile a {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.research-figure {
    margin: 2.5rem 0;
}

.research-figure img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
}

.research-figure figcaption {
    margin-top: 0.85rem;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.table-responsive {
    margin: 2rem 0;
}

.research-table {
    margin-bottom: 0;
    font-size: 0.92rem;
    vertical-align: middle;
}

.research-table caption {
    caption-side: top;
    padding: 0 0 0.65rem;
    color: var(--heading);
    font-weight: 650;
}

.research-table th {
    white-space: nowrap;
}

.research-table th,
.research-table td {
    text-align: center;
    vertical-align: middle;
}

.citation {
    text-decoration: none;
    white-space: nowrap;
}

.references-list {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: reference;
    font-size: 0.92rem;
    line-height: 1.55;
}

.references-list li {
    position: relative;
    margin-bottom: 0.9rem;
    padding-left: 2.75rem;
    counter-increment: reference;
    scroll-margin-top: 1.5rem;
}

.references-list li::before {
    content: "[" counter(reference) "]";
    position: absolute;
    left: 0;
    width: 2.25rem;
    text-align: right;
    color: var(--heading);
}

.references-list a {
    overflow-wrap: anywhere;
}

.site-footer {
    padding: 2.5rem 0;
    border-top: 1px solid var(--border);
    background: var(--article-bg);
    color: var(--muted);
    font-size: 0.9rem;
    text-align: center;
}

.back-to-top {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 1015;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    color: var(--heading);
    font-size: 1.45rem;
    font-weight: 450;
    line-height: 1;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(0.35rem);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus {
    border-color: #bbc2ca;
    background: #f7f8fa;
    color: var(--link-hover);
}

@media (min-width: 992px) {
    .article {
        padding-left: 2.75rem;
        border-left: 1px solid var(--border);
    }
}

@media (max-width: 991.98px) {
    .site-header {
        padding: 2.5rem 0 2rem;
    }

    .article {
        max-width: 760px;
        padding-top: 2.5rem;
    }

    .article > section {
        margin-bottom: 3.25rem;
    }

    .article section,
    .references-list li {
        scroll-margin-top: 4rem;
    }
}

@media (max-width: 575.98px) {
    body {
        font-size: 0.97rem;
        line-height: 1.68;
    }

    .site-header h1 {
        font-size: 2rem;
    }

    .article {
        padding-top: 2rem;
        padding-bottom: 3.5rem;
    }

    .article h2 {
        font-size: 1.55rem;
    }

    .article h3 {
        font-size: 1.2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .toc-toggle::before,
    .back-to-top {
        transition: none;
    }
}

/* Print layout for PDF and paper */
@page {
    margin: 0.65in;
}

@media print {
    body {
        background: #fff;
        color: #000;
        font-size: 10.5pt;
        line-height: 1.5;
    }

    .mobile-toc,
    .offcanvas,
    aside,
    .back-to-top {
        display: none !important;
    }

    .container-xl {
        width: 100%;
        max-width: none;
        margin: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .row {
        display: block;
        margin: 0;
    }

    .site-header {
        padding: 0 0 1.5rem;
        background: #fff;
    }

    .site-header h1 {
        font-size: 24pt;
    }

    .article {
        width: 100%;
        max-width: none;
        padding: 1.5rem 0 0;
        border-left: 0;
    }

    .article > section {
        margin-bottom: 1.75rem;
    }

    .article section section {
        margin-top: 1.25rem;
    }

    .article h2 {
        font-size: 16pt;
        break-after: avoid;
    }

    .article h3 {
        font-size: 12.5pt;
        break-after: avoid;
    }

    .table-responsive {
        margin: 1.25rem 0;
        overflow: visible !important;
        break-inside: avoid;
    }

    .research-table {
        width: 100% !important;
        min-width: 0 !important;
        font-size: 9pt;
        line-height: 1.25;
    }

    .research-table th {
        white-space: normal;
    }

    .research-table th,
    .research-table td {
        padding: 0.35rem 0.4rem;
    }

    .research-table tr {
        break-inside: avoid;
    }

    .research-figure {
        margin: 1.5rem 0;
        break-inside: avoid;
    }

    .research-figure img {
        max-width: 100%;
    }
}
