:root {
    --color-primary: #320E3B;
    /* Dark Purple */
    --color-accent: #B7990D;
    /* Gold */
    --color-red: #6f1a07;
    --color-bg-light: #F8F9FA;
    --color-bg-dark: #2A0C32;
    /* Slightly darker shade of primary */
    --color-text-dark: #1A1A1A;
    --color-text-light: #FFFFFF;

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    /* -- RQ2-specific tokens ------------------------------------ */
    /* Classification card colours */
    --disc-card-bg: #FFFFFF;
    --disc-card-border: rgba(50, 14, 59, 0.10);
    --disc-card-bg-high: rgba(183, 153, 13, 0.08);
    --disc-card-border-high: rgba(183, 153, 13, 0.45);
    --disc-card-bg-others: rgba(50, 14, 59, 0.04);
    --disc-abbr-bg: rgba(50, 14, 59, 0.08);
    --disc-abbr-color: #320E3B;

    /* Q/A block colours */
    --qa-q-bg: rgba(24, 95, 165, 0.07);
    --qa-q-border: rgba(24, 95, 165, 0.25);
    --qa-tag-q-bg: #185FA5;
    --qa-tag-q-text: #FFFFFF;
    --qa-tag-a-bg: #B7990D;
    --qa-tag-a-text: #FFFFFF;

    /* Chart section */
    --chart-bg: rgba(0, 0, 0, 0.15);

    /* Section bridge arrow */
    --bridge-color: rgba(255, 255, 255, 0.4);
    --bridge-color-light: rgba(50, 14, 59, 0.4);
}

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

html,
body {
    font-family: var(--font-body);
    background-color: var(--color-bg-light);
    color: var(--color-text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    font-weight: 600;
}

.title {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    color: #555;
    max-width: 600px;
}



.section-title {
    font-size: 3rem;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: var(--color-accent);
}

.text {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    max-width: 800px;
    color: #444;
}

.highlight {
    font-weight: 600;
    color: var(--color-primary);
    border-left: 4px solid var(--color-accent);
    padding-left: 1rem;
    margin-top: 2rem;
}

.highlight.centered {
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* -- Reminder Callout Box */
.reminder-callout {
    display: flex;
    gap: 1rem;
    background: rgba(183, 153, 13, 0.05);
    /* very light gold tint */
    border: 1px solid rgba(183, 153, 13, 0.25);
    border-radius: 12px;
    padding: 1.2rem;
    margin-top: 2.5rem;
    align-items: flex-start;
    box-shadow: 0 4px 15px rgba(50, 14, 59, 0.03);
}

.reminder-icon {
    font-size: 1.2rem;
    color: var(--color-accent);
    line-height: 1.1;
    margin-top: 0.1rem;
}

.reminder-content {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
}

.reminder-content strong {
    color: var(--color-primary);
}

/* Layout */
.content-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6rem 0;
    position: relative;
}

.two-column {
    display: flex;
    gap: 4rem;
    align-items: center;
}

.two-column.reverse {
    flex-direction: row-reverse;
}

.text-column {
    flex: 1;
}

.center-content {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.visual-column {
    flex: 1;
}

.visual-column.large {
    flex: 2;
}

/* Dark Section styling */
.dark-section {
    background-color: var(--color-bg-dark);
    color: var(--color-text-light);
}

.dark-section h1,
.dark-section h2,
.dark-section h3 {
    color: var(--color-text-light);
}

.dark-section .text {
    color: rgba(255, 255, 255, 0.9);
}

.dark-section .highlight {
    color: var(--color-accent);
    border-color: var(--color-accent);
}

.dark-section .section-title::after {
    background-color: var(--color-accent);
}

/* Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: color-mix(in srgb, var(--color-bg-dark), transparent 20%);
    /* background-color: var(--color-bg-dark); */
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(50, 14, 59, 0.1);
    transition: all 0.3s ease;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.45rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.20rem;
    font-weight: 600;
    color: var(--color-text-light);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-logo:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}

.logo-img {
    height: 45px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-text-light);
    font-weight: 600;
    font-size: 0.90rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--color-accent);
}

/* Hamburger Menu */
.hamburger-menu {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
    /* Ensure it's above the menu */
}

.hamburger-menu .bar {
    width: 25px;
    height: 3px;
    background-color: var(--color-text-light);
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .hamburger-menu {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        max-width: 300px;
        background-color: var(--color-bg-dark);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3rem;
        transition: right 0.4s ease;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
    }

    .nav-links.active {
        right: 0;
    }

    .hamburger-menu.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger-menu.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger-menu.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* Components */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 30px;
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: var(--font-body);
}

.primary-btn {
    background-color: var(--color-primary);
    color: var(--color-text-light);
    border: 2px solid var(--color-primary);
}

.primary-btn:hover {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-text-light);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(183, 153, 13, 0.2);
}

/* Scroll Indicator */
.scroll-indicator {
    margin-top: 4rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #777;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--color-bg-light);
    border-radius: 15px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background-color: var(--color-accent);
    border-radius: 2px;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 1.5s infinite;
}

@keyframes scroll {
    0% {
        top: 10px;
        opacity: 1;
    }

    100% {
        top: 25px;
        opacity: 0;
    }
}

/* Styling for the list inside the highlight box */
.highlight-list {
    margin-top: 0.75rem;
    margin-left: 1.5rem;
    /* Indents the bullets to align perfectly with the text */
    list-style-type: disc;
    font-weight: 500;
    /* Slightly lighter than the 600 weight of the main highlight text for better readability */
}

.highlight-list li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Ensure the bolded RQ tags stand out using your primary color */
.highlight-list li strong {
    font-weight: 700;
}

/* Team Card Grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.team-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-top: 5px solid transparent;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.team-card.rq1 {
    border-top-color: var(--color-primary);
}

.team-card.rq2 {
    border-top-color: var(--color-accent);
}

.team-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.team-name {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.team-name:hover {
    color: var(--color-accent);
}

.team-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    letter-spacing: 0.5px;
}

.team-card.rq1 .team-badge {
    background-color: var(--color-primary);
    color: #fff;
}

.team-card.rq2 .team-badge {
    background-color: var(--color-accent);
    color: #fff;
}

.role-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.role-tag {
    font-size: 0.75rem;
    background: var(--color-bg-light);
    color: var(--color-text-dark);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.project-section-link {
    color: #444;
    text-decoration: none;
    transition: all 0.2s ease;
}

.project-section-link:hover {
    color: var(--color-accent);
    border-bottom: 2px solid var(--color-accent);
}

/* Progress Bar */
#progress-bar {
    position: fixed;
    top: 48px;
    /* Below the narrowed navbar */
    left: 0;
    width: 0%;
    height: 4px;
    background-color: var(--color-accent);
    z-index: 1001;
    transition: width 0.1s ease;
}

/* Animations */
.fade-in {
    opacity: 0;
    transition: opacity 1.5s ease;
}

.fade-in.visible {
    opacity: 1;
}

.slide-up {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease, transform 1s ease;
}

.slide-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Footer */
.footer {
    padding: 3rem 0;
    text-align: center;
    background-color: var(--color-primary);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer p {
    margin-bottom: 0.5rem;
}

/* Hero Section & Background Map */
.hero {
    position: relative;
    overflow: hidden;
    background-color: var(--color-bg-dark);
}

.hero-bg-logo {
    position: absolute;
    bottom: 0;
    right: 0;
    height: 90%;
    width: auto;
    z-index: 1;
    pointer-events: none;
}

.hero-stats {
    display: flex;
    gap: 4rem;
    margin-top: 4rem;
    z-index: 2;
    position: relative;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.stat-number {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 600;
    font-family: 'Playfair Display', serif;
    color: #ffffff;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.7);
}

.hero-content {
    position: relative;
    z-index: 2;
    pointer-events: none;
    /* Allows mouse interactions to pass through to the map */
    color: var(--color-text-light);

    /* Break out of standard centered 1200px container to sit close to the left margin */
    max-width: 100%;
    width: 100%;
    margin-left: 0;
    margin-right: auto;
    padding-left: 5%;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Sit on the left side on desktop */
}

.hero-content .title {
    color: var(--color-text-light);
    max-width: 600px;
    width: 100%;
}

.hero-content .subtitle {
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    width: 100%;
}

.hero-content .scroll-indicator {
    pointer-events: auto;
    /* Re-enable pointer events for the scroll indicator */
    max-width: 600px;
    width: 100%;
}

/* amCharts Container */
#chartdiv {
    width: 90vw;
    margin-left: calc(-45vw + 50%);
    height: 800px;
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--color-bg-dark);
    box-shadow: 0 20px 40px rgba(50, 14, 59, 0.1);
    border: 1px solid rgba(50, 14, 59, 0.05);
}

#asymmetry_chartdiv {
    width: 70vw;
    margin-left: calc(-35vw + 50%);
    height: 600px;
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--color-bg-dark);
    box-shadow: 0 20px 40px rgba(50, 14, 59, 0.1);
    border: 1px solid rgba(50, 14, 59, 0.05);
}

/* Controls */
.vis-controls {
    margin: 0 auto 1.5rem auto;
    width: fit-content;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: rgba(42, 12, 50, 0.4);
    padding: 1rem 2rem;
    border-radius: 12px;
    /* border: 1px solid rgba(50, 14, 59, 0.2); */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    /* box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2); */
}

.vis-controls label {
    font-family: var(--font-body);
    color: var(--color-text-light);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

#institution-select,
#direction-select,
#org-view-select,
#sunburst-inst-select,
#sunburst-dir-select {
    appearance: none;
    -webkit-appearance: none;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--color-text-light);
    padding: 0.6rem 2.5rem 0.6rem 1.2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-family: var(--font-body);
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    background-size: 1.2em;
}

#institution-select:hover,
#direction-select:hover,
#org-view-select:hover,
#sunburst-inst-select:hover,
#sunburst-dir-select:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: var(--color-text-light);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

#institution-select:focus,
#direction-select:focus,
#org-view-select:focus,
#sunburst-inst-select:focus,
#sunburst-dir-select:focus {
    border-color: var(--color-text-light);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

#institution-select option,
#direction-select option,
#org-view-select option,
#sunburst-inst-select option,
#sunburst-dir-select option {
    background-color: var(--color-bg-dark);
    color: var(--color-text-light);
    font-weight: 500;
}

#institution-select option:hover,
#direction-select option:hover,
#org-view-select option:hover,
#institution-select option:checked,
#direction-select option:checked,
#org-view-select option:checked,
#sunburst-inst-select option:hover,
#sunburst-dir-select option:hover,
#sunburst-inst-select option:checked,
#sunburst-dir-select option:checked {
    background-color: var(--color-accent);
    color: var(--color-primary);
}

/* Insight Cards */
.cards-viz {
    display: flex;
    gap: 2rem;
    justify-content: space-between;
    margin-top: 3rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.insight-card {
    background: #FFFFFF;
    border: 1px solid rgba(50, 14, 59, 0.1);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    flex: 1;
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(50, 14, 59, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.insight-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(50, 14, 59, 0.08);
    border-color: var(--color-accent);
}

.insight-card-icon {
    font-size: 2.5rem;
    color: var(--color-accent);
    margin-bottom: 1.2rem;
}

.insight-card-title {
    font-family: var(--font-heading);
    color: var(--color-primary);
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.insight-card-text {
    font-family: var(--font-body);
    font-size: 1.05rem;
    color: #444;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 900px) {

    .two-column,
    .two-column.reverse {
        flex-direction: column;
        gap: 2rem;
    }

    .title {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .section {
        padding: 6rem 0 4rem 0;
        min-height: auto;
    }

    .hero {
        padding-top: 8rem;
    }

    .hero-content {
        align-items: center;
        /* Center the layout on small screens */
        text-align: center;
        /* Center the text alignment */
        padding-left: 2rem;
        /* Reset to standard mobile padding */
        padding-right: 2rem;
        margin: 0 auto;
    }

    .hero-content .title,
    .hero-content .subtitle {
        max-width: 100%;
        text-align: center;
    }

    .hero-content .scroll-indicator {
        max-width: 100%;
        justify-content: center;
        /* Center the flex elements of the scroll indicator */
    }
}

/* ── Sankey Section ───────────────────────────────────────────────────────── */
.sankey-section {
    background-color: var(--color-bg-light);
}

.sankey-controls-wrapper {
    margin-top: 2.5rem;
}

/* Loading / error states */
.sankey-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--color-text-dark);
    letter-spacing: 1px;
}

.sankey-error {
    color: #f08080;
}

/* ── Sunburst Section ─────────────────────────────────────────────────────── */
.sunburst-section {
    background-color: var(--color-bg-light);
}

#sunburst-chartdiv {
    width: 100%;
    height: 750px;
    border-radius: 12px;
    overflow: hidden;
    background-color: transparent;
    position: relative;
}


/* ── Conclusion Section ──────────────────────────────────────────────────────── */
.conclusion-section {
    padding: 8rem 0;
}

.conclusion-section .two-column {
    align-items: flex-start;
    margin-bottom: 6rem;
}

.conclusion-section .section-title {
    font-size: 2.5rem;
    margin-bottom: 2.5rem;
}

.finale-box {
    margin-top: 6rem;
    padding: 5rem 2rem;
    text-align: center;
    position: relative;
}

.finale-box .title {
    font-size: 3.5rem;
    color: var(--color-accent);
    margin-bottom: 2.5rem;
}

.finale-box .text {
    font-size: 1.4rem;
    line-height: 1.8;
    max-width: 900px;
    margin: 0 auto 2rem;
    color: rgba(255, 255, 255, 0.95);
}

/* ── Research Question Navigation ─────────────────────────────────────────── */
.rq-nav {
    position: fixed;
    top: 50%;
    left: 20px;
    transform: translateY(-50%) translateX(-20px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    pointer-events: none;
    /* Only the buttons should be clickable */
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.rq-nav.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

.rq-btn {
    pointer-events: auto;
    background-color: var(--color-bg-dark);
    border: 1px solid rgba(183, 153, 13, 0.3);
    border-radius: 30px;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 50px;
    height: 50px;
    position: relative;
    box-shadow: 0 4px 15px rgba(50, 14, 59, 0.2);
}

.rq-btn-header {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    min-height: 50px;
}

.rq-btn.active {
    border-color: var(--color-accent);
    height: 160px;
}

.rq-btn:hover {
    border-color: var(--color-accent);
    box-shadow: 0 0 15px rgba(183, 153, 13, 0.3);
}

.rq-btn .rq-num {
    font-family: var(--font-heading);
    color: var(--color-text-light);
    font-weight: 600;
    font-size: 1.2rem;
    min-width: 34px;
    text-align: center;
    transition: color 0.3s ease;
}

.rq-btn.active .rq-num,
.rq-btn:hover .rq-num {
    color: var(--color-accent);
}

.rq-btn .rq-text {
    position: absolute;
    left: 65px;
    top: 5px;
    background-color: var(--color-accent);
    border: 1px solid var(--color-accent);
    color: var(--color-text-dark);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.90rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(50, 14, 59, 0.3);
    pointer-events: none;
}

.rq-btn:hover .rq-text {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.progress-track {
    width: 2px;
    height: 90px;
    background-color: rgba(255, 255, 255, 0.15);
    margin-left: 24px;
    margin-top: 0;
    border-radius: 2px;
    position: relative;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.rq-btn.active .progress-track {
    opacity: 1;
}

.progress-dot {
    width: 10px;
    height: 10px;
    background-color: var(--color-accent);
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: -4px;
    box-shadow: 0 0 8px var(--color-accent);
}

/* Sections visibility toggle */
.rq-section {
    position: absolute;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    left: -9999px;
    width: 100%;
}

.rq-section.active {
    position: relative;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    left: 0;
    animation: fadeInSection 0.5s ease-in-out;
}

@keyframes fadeInSection {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Bubble Chart Custom Legend */
.bubble-legend-wrapper {
    margin-top: 2rem;
}

.custom-legend {
    text-align: center;
    margin-bottom: 2rem;
    font-family: var(--font-body, "Inter", sans-serif);
    color: var(--color-text-dark, #1A1A1A);
}

.custom-legend .legend-title {
    margin-bottom: 12px;
    font-weight: 500;
    font-size: 16px;
}

.custom-legend .legend-items {
    display: flex;
    justify-content: center;
    gap: 30px;
    font-size: 15px;
}

.custom-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-legend .legend-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.custom-legend .legend-dot.universal {
    background-color: #B7990D;
}

.custom-legend .legend-dot.partial {
    background-color: #4a3070;
}

@media (max-width: 900px) {

    /* Research Question Nav (Mobile) */
    .rq-nav {
        top: auto;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%) translateY(20px);
        flex-direction: row;
        gap: 0.5rem;
    }

    .rq-nav.visible {
        transform: translateX(-50%) translateY(0);
    }

    .rq-btn {
        width: auto;
        height: 45px;
        min-height: 45px;
        border-radius: 25px;
        padding: 0 1.2rem;
        flex-direction: row;
        align-items: center;
        justify-content: center;
    }

    .rq-btn .rq-text {
        display: none;
    }

    .rq-btn .progress-track {
        display: none;
    }

    .rq-btn-header {
        width: auto;
        height: 100%;
        min-height: auto;
    }

    .rq-btn.active,
    .rq-btn:hover {
        width: auto;
        height: 45px;
    }
}

/* Hero section specific mobile tweaks */
@media (max-width: 768px) {
    .hero-stats {
        gap: 1.5rem;
        flex-direction: row;
        flex-wrap: wrap;
        margin-top: 2rem;
        justify-content: center;
        width: 100%;
    }

    .stat-item {
        align-items: center;
    }

    .stat-number {
        font-size: clamp(1.1rem, 4vw, 1.6rem);
    }

    .stat-label {
        font-size: clamp(0.65rem, 2.5vw, 0.8rem);
        text-align: center;
    }
}

/* --- Discrete Section Connectors --- */
.section-connector {
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 100;
    margin-top: -75px;
    margin-bottom: -75px;
    pointer-events: none;
    opacity: 0.85;
}

.connector-line {
    stroke-dasharray: 8 8;
    animation: flow-down 1.5s linear infinite;
}

@keyframes flow-down {
    from {
        stroke-dashoffset: 16;
    }

    to {
        stroke-dashoffset: 0;
    }
}

/* --- Flow Visual Container (Index page) --- */
.flow-visual-container {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    font-family: var(--font-body);
    font-size: 1.15rem;
    color: var(--color-primary);
    background: transparent;
    padding: 3.5rem 3rem;
    justify-content: center;
}

.flow-visual-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.flow-visual-country {
    width: 140px;
    font-weight: 600;
}

.flow-visual-svg {
    flex-shrink: 0;
    overflow: visible;
}

.flow-visual-desc {
    width: 180px;
    color: #555;
    font-size: 0.95rem;
}

.flow-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 500;
    padding: 2px 10px;
    border-radius: 20px;
    margin-bottom: 6px;
    text-align: center;
}

.flow-badge-out {
    background: #ede8f4;
    color: #320E3B;
}

.flow-badge-in {
    background: #fdf6d8;
    color: #7a6208;
}

.flow-badge-bal {
    background: #eaf5ee;
    color: #1a6e31;
}

/* --- Hand-drawn Underline --- */
.hand-drawn-underline {
    position: relative;
    display: inline-block;
    white-space: nowrap;
    z-index: 1;
}

.hand-drawn-underline::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: -2%;
    width: 0;
    height: 16px;
    background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none' viewBox='0 0 100 20'%3E%3Cpath d='M2 14 C 20 12, 80 16, 98 13' stroke='%23B7990D' stroke-width='6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat left center;
    background-size: 100% 100%;
    z-index: -1;
    transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.slide-up.visible .hand-drawn-underline::after,
.fade-in.visible .hand-drawn-underline::after,
.hand-drawn-underline.visible::after {
    width: 104%;
    transition-delay: 0.5s;
}

/* --- Hand-drawn Circle --- */
.hand-drawn-circle {
    position: relative;
    display: inline-block;
    white-space: nowrap;
    z-index: 1;
}

.hand-drawn-circle::after {
    content: '';
    position: absolute;
    top: -15%;
    left: -10%;
    width: 120%;
    height: 130%;
    background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none' viewBox='0 0 100 100'%3E%3Cpath d='M 45 8 C 75 2, 98 25, 95 50 C 92 75, 75 98, 50 95 C 25 92, 2 75, 5 50 C 8 25, 30 5, 60 8' stroke='%23B7990D' stroke-width='4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center center;
    background-size: 100% 100%;
    z-index: -1;
    clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
    transition: clip-path 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.slide-up.visible .hand-drawn-circle::after,
.fade-in.visible .hand-drawn-circle::after,
.hand-drawn-circle.visible::after {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    transition-delay: 0.5s;
}

/* --- Flow Aligned Layout --- */
.flow-aligned-container {
    display: flex;
    flex-direction: column;
    gap: 4.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.flow-aligned-row {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.flow-aligned-row:nth-child(even) {
    flex-direction: row-reverse;
}

.flow-aligned-visual {
    flex: 0 0 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.flow-aligned-visual svg {
    width: 100%;
    max-width: 250px;
    overflow: visible;
}

.flow-aligned-text {
    flex: 1;
}

.flow-aligned-text .text {
    margin-bottom: 0;
}

@media (max-width: 900px) {

    .flow-aligned-row,
    .flow-aligned-row:nth-child(even) {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .flow-aligned-visual {
        flex: auto;
        width: 100%;
    }
}

/* ── Org-View Toggle Buttons ──────────────────────────────────────────────── */
.org-view-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    background-color: var(--color-bg-dark);
    border: 1px solid rgba(183, 153, 13, 0.35);
    border-radius: 40px;
    padding: 5px;
    width: fit-content;
    margin: 0 auto;
}

.org-view-btn {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.6rem 1.4rem;
    border: none;
    border-radius: 35px;
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    white-space: nowrap;
}

.org-view-btn .org-btn-icon {
    font-size: 1rem;
    line-height: 1;
    transition: color 0.28s ease;
    color: rgba(183, 153, 13, 0.5);
}

.org-view-btn .org-btn-label {
    transition: color 0.28s ease;
}

/* Hover — light gold shimmer */
.org-view-btn:hover {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(183, 153, 13, 0.12);
}

.org-view-btn:hover .org-btn-icon {
    color: var(--color-accent);
}

/* Active / selected state */
.org-view-btn.active {
    background: linear-gradient(135deg, #B7990D 0%, #d4b441 50%, #B7990D 100%);
    color: var(--color-bg-dark);
    box-shadow:
        0 3px 12px rgba(183, 153, 13, 0.45),
        0 1px 3px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.org-view-btn.active .org-btn-icon {
    color: var(--color-bg-dark);
}

.org-view-btn.active:hover {
    background: linear-gradient(135deg, #c9ab1a 0%, #e0c450 50%, #c9ab1a 100%);
    color: var(--color-bg-dark);
    box-shadow:
        0 5px 18px rgba(183, 153, 13, 0.55),
        0 2px 6px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Focus ring for accessibility */
.org-view-btn:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

@media (max-width: 600px) {
    .org-view-btn {
        padding: 0.6rem 0.9rem;
    }
}

/* ================================================================
   11. §A — LOC CLASSIFICATION PILLS
   ================================================================ */

/* -- RQ section label (small eyebrow above section title) ------- */
.rq-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-accent);
    margin-bottom: 0.75rem;
}

/* -- Discipline section wrapper ---------------------------------- */
.disc-section {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

/* -- Group label (e.g. "LOC Main Classifications") --------------- */
.disc-group-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--color-primary);
    margin-bottom: 0.6rem;
    /* LABEL COLOUR — edit color above */
}

/* -- "Additional Categories" label variant ----------------------- */
.disc-group-label--extra {
    margin-top: 1.6rem;
    color: #666;
}

/* -- Inline note next to "Additional Categories" label ----------- */
.disc-extra-note {
    font-size: 0.7rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: #888;
    font-style: italic;
}

/* -- Short description below group label ------------------------- */
.disc-group-desc {
    font-size: 0.88rem;
    color: #555;
    max-width: 700px;
    line-height: 1.6;
    margin-bottom: 0.9rem;
}

/* -- Pill row (flex-wrap container) ------------------------------ */
.disc-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.5rem;
}

/* -- Individual discipline pill ---------------------------------- */
.disc-pill {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 500;
    /* PILL COLOURS — edit background and color here */
    background: rgba(50, 14, 59, 0.07);
    color: var(--color-primary);
    border: 1px solid rgba(50, 14, 59, 0.15);
    border-radius: 20px;
    padding: 0.25rem 0.75rem;
    white-space: nowrap;
    line-height: 1.4;
}

/* -- Extra category pill variant (Multidisciplinary, Others) ----- */
.disc-pill--extra {
    /* EXTRA PILL COLOURS — edit here */
    background: rgba(183, 153, 13, 0.08);
    color: #6b5800;
    border-color: rgba(183, 153, 13, 0.3);
    font-style: italic;
}

/* -- Extra categories row: pill + mini desc side by side --------- */
.disc-row--extra {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

/* -- Mini card wrapping extra pill + its description ------------- */
.disc-pill-card {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    max-width: 320px;
}

/* -- Description text inside mini card --------------------------- */
.disc-pill-card-desc {
    font-size: 0.78rem;
    color: #777;
    line-height: 1.5;
    padding-left: 0.2rem;
}

/* -- Footnote link (superscript *) ------------------------------- */
.disc-footnote-link {
    color: var(--color-accent);
    text-decoration: none;
    font-size: 0.7rem;
}

.disc-footnote-link:hover {
    text-decoration: underline;
}

/* -- Footnote text at the bottom --------------------------------- */
.disc-footnote {
    font-size: 0.75rem;
    color: #999;
    margin-top: 1.2rem;
    line-height: 1.5;
}

.disc-footnote a {
    color: var(--color-accent);
}

.disc-footnote a:hover {
    text-decoration: underline;
}

/* -- Section bridge (transition text + bouncing arrow) ----------- */
.section-bridge {
    margin-top: 3rem;
    text-align: center;
    color: var(--bridge-color-light);
}

.section-bridge p {
    font-size: 1rem;
    /* font-style: italic; */
    margin-bottom: 0.5rem;
    color: inherit;
}

.section-bridge--dark {
    color: var(--bridge-color);
}

.bridge-arrow {
    display: block;
    font-size: 2rem;
    animation: bounce 1.8s infinite;
    color: var(--color-accent);
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(6px);
    }
}


/* ================================================================
   12. §B — LANDSCAPE SECTION (Question → Answer + Chart)
   ================================================================ */

/* -- Question heading -------------------------------------------- */
.landscape-question {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    font-style: italic;
    color: rgba(255, 255, 255, 0.55);
    /* QUESTION STYLE — edit font-size and color here */
    margin-bottom: 0.6rem;
    letter-spacing: 0.01em;
}

/* -- Answer headline (punchy one-liner) -------------------------- */
.landscape-answer-headline {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--color-accent);
    line-height: 1.25;
    margin-bottom: 2rem;
    max-width: 900px;
    /* ANSWER HEADLINE STYLE — edit font-size and color here */
}

/* -- Two-column body: text left, chart right --------------------- */
.landscape-body {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

/* -- Left text column -------------------------------------------- */
.landscape-text {
    flex: 0 0 360px;
    /* fixed width; adjust px to widen/narrow text column */
    min-width: 0;
}

/* -- Right chart column ------------------------------------------ */
.landscape-chart-col {
    flex: 1;
    min-width: 0;
}

/* -- Institution label above the chart (populated by JS) --------- */
#landscape-inst-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.6rem;
    min-height: 1.2em;
    /* prevents layout shift when text changes */
}

/* -- Chart controls row ----------------------------------------- */
.chart-controls {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 0.8rem;
}

/* -- "View by institution" label --------------------------------- */
.chart-control-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* -- Button group ------------------------------------------------ */
.inst-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

/* -- Individual institution toggle button ----------------------- */
.inst-btn {
    font-family: var(--font-body);
    padding: 0.3rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.inst-btn:hover {
    color: var(--color-text-light);
    border-color: rgba(255, 255, 255, 0.45);
}

/* Active / selected state — edit accent colour here */
.inst-btn.active {
    background: var(--color-accent);
    color: #1a1a1a;
    border-color: var(--color-accent);
}

/* -- Answer explanation text (one size smaller than .text) ------- */
/* EXPLANATION FONT SIZE — edit font-size here */
.landscape-explanation {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    margin-bottom: 1.4rem;
    max-width: 100%;
}

/* -- Chart header (sublabel / back-button row) ------------------- */
.chart-header {
    margin-bottom: 0.5rem;
}

.chart-header-detail {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* -- "← All institutions" back button --------------------------- */
.chart-back-btn {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: transparent;
    color: var(--color-accent);
    border: 1px solid rgba(183, 153, 13, 0.4);
    border-radius: 20px;
    padding: 0.28rem 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.chart-back-btn:hover {
    background: rgba(183, 153, 13, 0.12);
    border-color: var(--color-accent);
}

/* -- Institution name shown in detail view ----------------------- */
.chart-detail-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* -- "Click a bar to drill down" hint text ----------------------- */
.chart-sublabel-hint {
    font-style: italic;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.68rem;
    letter-spacing: 0;
    text-transform: none;
}

.chart-sublabel {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 0.4rem;
    /* SUBLABEL COLOUR — edit color here */
}

/* -- Thin separator between top and bottom chart ---------------- */
.chart-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 1.2rem 0;
}

/* -- Stacked bar canvas (top, always 1 thin bar + legend) ------- */
#landscape-chart-stacked {
    height: 160px;
    /* 1 bar only — increase if legend wraps to more rows */
    width: 100%;
}

/* -- Grouped bar canvas (bottom) -------------------------------- */
#landscape-chart-grouped {
    height: 420px;
    /* GROUPED CHART HEIGHT — increase if bars feel cramped */
    width: 100%;
}

/* -- Chart caption ---------------------------------------------- */
.chart-note {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 0.6rem;
    line-height: 1.5;
}

/* -- Institution callout list (in text column) ------------------- */
.inst-callouts {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.inst-callouts li {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.75);
    padding-left: 0.85rem;
    border-left: 2px solid rgba(183, 153, 13, 0.45);
    line-height: 1.5;
}

.inst-callouts li strong {
    color: var(--color-accent);
    font-weight: 600;
}


/* ================================================================
   §C-2 — SANKEY SECTION
   ================================================================ */

/* ================================================================
   §C-2 — SANKEY SECTION
   ================================================================ */

/* Sankey section — wider than default 1200px content-wrapper */
.rq2-sankey-section .content-wrapper {
    /* SANKEY SECTION WIDTH — edit max-width here */
    max-width: 1400px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Each row: horizontal flex */
.sankey-controls-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    align-items: flex-start;
}

/* Discipline row: two selects side by side, equal width */
.sankey-disc-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.sankey-control-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

/* Hint text next to label */
.sankey-select-hint {
    font-size: 0.68rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0;
    text-transform: none;
}

/* Multiple select box */
.sankey-select--multi {
    font-family: var(--font-body);
    font-size: 0.78rem;
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    padding: 0.2rem 0;
    width: 100%;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
    /* Show all 12 disciplines */
    height: auto;
}

.sankey-select--multi option {
    padding: 4px 10px;
    background: #2A0C32;
    color: rgba(255, 255, 255, 0.85);
}

.sankey-select--multi option:checked {
    background: var(--color-accent);
    color: #1a1a1a;
}

.sankey-select--multi:focus {
    border-color: var(--color-accent);
}

/* Chart wrapper — white semi-transparent background */
.sankey-chart-wrapper {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    padding: 0.75rem;
    margin-top: 0.5rem;
}

/* Sankey chart canvas */
#sankey-chart {
    /* CHART HEIGHT — taller gives nodes more room to spread */
    height: 650px;
    width: 100%;
}

/* Responsive */
@media (max-width: 900px) {
    .sankey-disc-row {
        grid-template-columns: 1fr;
    }

    #sankey-chart {
        height: 380px;
    }
}


/* ================================================================
   §C-1 — SUNBURST SECTION
   ================================================================ */

.sunburst-body {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
    margin-top: 1.5rem;
}

.sunburst-text {
    flex: 0 0 300px;
    min-width: 0;
}

.sunburst-chart-col {
    flex: 1;
    min-width: 0;
}

/* SUNBURST CHART HEIGHT — square looks best */
#sunburst-chart {
    width: 100%;
    height: 500px;
}

/* Info panel */
.sunburst-info {
    margin-top: 1.5rem;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(50, 14, 59, 0.12);
    border-radius: 10px;
    background: rgba(50, 14, 59, 0.03);
    min-height: 80px;
}

.sunburst-info-hint {
    font-size: 0.82rem;
    color: #aaa;
    font-style: italic;
    line-height: 1.5;
}

.sunburst-info-pair {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 0.4rem;
}

.sunburst-info-citing {
    color: var(--color-primary);
}

.sunburst-info-arrow {
    color: var(--color-accent);
    margin: 0 0.2rem;
}

.sunburst-info-cited {
    color: var(--color-primary);
}

.sunburst-info-stat {
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 0.25rem;
    line-height: 1.5;
}

.sunburst-info-count {
    font-size: 0.78rem;
    color: #999;
}

/* Button overrides for light background */
.sunburst-inst-btn.active,
.asymmetry-inst-btn.active {
    background: var(--color-primary) !important;
    color: #fff !important;
    border-color: var(--color-primary) !important;
}

.sunburst-inst-btn:hover {
    color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    background: rgba(50, 14, 59, 0.06) !important;
}

#sunburst-controls,
#asymmetry-controls {
    background-color: transparent;
}

.sunburst-inst-btn,
.asymmetry-inst-btn {
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.sunburst-inst-btn:hover,
.asymmetry-inst-btn:hover {
    color: var(--color-text-light) !important;
    background-color: var(--color-primary) !important;
}

#sunburst-controls .chart-control-label,
#heatmap-controls .chart-control-label,
#asymmetry-controls .chart-control-label {
    color: var(--color-primary) !important;
}

.sunburst-dir-btn,
.heatmap-dir-btn {
    color: var(--color-primary);
    border: 2px solid var(--color-accent);
}

.sunburst-dir-btn:hover,
.heatmap-dir-btn:hover {
    color: var(--color-primary) !important;
    background-color: var(--color-accent);
}

/* ================================================================
   13. RESPONSIVE OVERRIDES
   ================================================================ */

@media (max-width: 900px) {

    /* -- §A: pills wrap naturally on mobile — no change needed -- */
    .disc-row--extra {
        flex-direction: column;
        gap: 0.75rem;
    }

    .disc-pill-card {
        max-width: 100%;
    }

    /* -- §B: stack text above chart on mobile ------------------- */
    .landscape-body {
        flex-direction: column;
        gap: 2rem;
    }

    .landscape-text {
        flex: none;
        width: 100%;
    }

    .landscape-answer-headline {
        font-size: 1.4rem;
    }

    /* -- Chart controls: stack on mobile ------------------------ */
    .chart-controls {
        flex-direction: column;
        align-items: flex-start;
    }

    /* -- Sunburst: stack on mobile ------------------------------ */
    .sunburst-body {
        flex-direction: column;
        gap: 2rem;
    }

    .sunburst-text {
        flex: none;
        width: 100%;
    }

    #sunburst-chart {
        height: 360px;
    }

    /* -- Chart heights on mobile -------------------------------- */
    #landscape-chart-stacked {
        height: 180px;
    }

    #landscape-chart-grouped {
        height: 340px;
    }
}

/* Global Mobile Responsiveness Fixes */
@media (max-width: 900px) {
    .vis-controls {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
        padding: 1rem;
        align-items: stretch;
    }

    #institution-select,
    #direction-select,
    #org-view-select,
    #sunburst-inst-select,
    #sunburst-dir-select {
        width: 100%;
    }

    #chartdiv,
    #asymmetry_chartdiv,
    #sunburst-chartdiv,
    #heatmap_chartdiv,
    #scatter-chartdiv,
    #sankey-chartdiv,
    #bubble-chartdiv {
        width: 100vw !important;
        margin-left: calc(-50vw + 50%) !important;
        height: 65vh !important;
        min-height: 400px;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
    }

    #scatter-chartdiv {
        height: 75vh !important;
        min-height: 600px;
    }

    .cards-viz {
        flex-direction: column;
        gap: 1.5rem;
    }

    .insight-card {
        width: 100%;
    }

    .content-wrapper {
        padding: 0 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    /* Hide Plotly sunburst breadcrumbs (pathbar) on small screens to prevent overflow */
    g.pathbar {
        display: none !important;
    }


}