/* ========================================================
   2026 MA Course Marking Survey — Styles
   Palette: Navy (#0B1D3A) · Gold (#C6A84E) · Slate · Cream
   Fonts: Playfair Display (display) · Source Sans 3 (body)
   ======================================================== */

/* --- Custom Properties --- */
:root {
    --navy:       #0B1D3A;
    --navy-light: #132B52;
    --navy-mid:   #1A3A6B;
    --gold:       #C6A84E;
    --gold-light: #D4BE7A;
    --gold-muted: #A08A3E;
    --cream:      #FAF8F3;
    --slate:      #3E4C5E;
    --slate-light:#6B7A8D;
    --border:     #E2DFD8;
    --card-bg:    #FFFFFF;
    --section-alt: #F4F2EC;
    --text:       #2A2F36;
    --text-light: #5A6370;
    --green:      #2E7D4F;
    --red:        #B85450;
    --radius-sm:  6px;
    --radius-md:  12px;
    --radius-lg:  20px;
    --shadow-sm:  0 1px 3px rgba(11,29,58,.06);
    --shadow-md:  0 4px 20px rgba(11,29,58,.08);
    --shadow-lg:  0 12px 40px rgba(11,29,58,.1);
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body:    'Source Sans 3', 'Segoe UI', sans-serif;
    --font-mono:    'JetBrains Mono', monospace;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background: var(--cream);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-mid); text-decoration: none; }

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 28px;
}

/* --- Floating Nav --- */
.floating-nav {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: calc(100% - 32px);
    max-width: 1080px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .4s ease, transform .4s ease;
}
.floating-nav.visible {
    opacity: 1;
    pointer-events: auto;
}
.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(11, 29, 58, .92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(198, 168, 78, .15);
    border-radius: 50px;
    padding: 8px 12px 8px 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,.25);
}
.nav-logo {
    height: 34px;
    width: auto;
    border-radius: 4px;
}
.nav-links { display: flex; gap: 2px; }
.nav-links a {
    color: rgba(255,255,255,.7);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: .78rem;
    letter-spacing: .03em;
    padding: 8px 12px;
    border-radius: 30px;
    transition: all .25s ease;
    white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active {
    color: #fff;
    background: rgba(198, 168, 78, .2);
}

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--navy);
    overflow: hidden;
    padding: 60px 28px;
}
.hero-grain {
    position: absolute;
    inset: 0;
    opacity: .06;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px;
    pointer-events: none;
}
.hero::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 70%;
    height: 80%;
    background: radial-gradient(ellipse, rgba(198,168,78,.08) 0%, transparent 70%);
    pointer-events: none;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -15%;
    width: 60%;
    height: 60%;
    background: radial-gradient(ellipse, rgba(26,58,107,.4) 0%, transparent 70%);
    pointer-events: none;
}
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    animation: heroIn 1s cubic-bezier(.22,.61,.36,1) forwards;
}
@keyframes heroIn {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}
.hero-eyebrow {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: .85rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 24px;
}
.hero-title {
    font-family: var(--font-display);
    color: #fff;
    margin-bottom: 28px;
    line-height: 1.15;
}
.title-year {
    display: block;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.title-main {
    display: block;
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
    font-weight: 600;
    margin-top: 8px;
}
.hero-subtitle {
    color: rgba(255,255,255,.6);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.7;
}
.hero-committee {
    margin-bottom: 32px;
    padding: 20px 28px;
    background: rgba(198, 168, 78, .08);
    border: 1px solid rgba(198, 168, 78, .2);
    border-radius: var(--radius-md);
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}
.hero-committee-label {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: .85rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 8px;
}
.hero-committee-members {
    color: rgba(255,255,255,.6);
    font-size: .9rem;
    line-height: 1.7;
}
.hero-cta {
    display: inline-block;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: .9rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--navy);
    background: var(--gold);
    padding: 14px 36px;
    border-radius: 50px;
    transition: all .3s ease;
    box-shadow: 0 4px 20px rgba(198,168,78,.3);
}
.hero-cta:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(198,168,78,.4);
}
.hero-scroll-hint {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}
.scroll-line {
    width: 1px;
    height: 48px;
    background: var(--gold);
    animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
    0%, 100% { opacity: .3; transform: scaleY(.6); }
    50%      { opacity: 1;  transform: scaleY(1); }
}

/* --- Sections --- */
.section {
    padding: 100px 0;
}
.section-alt {
    background: var(--section-alt);
}
.section-header {
    text-align: center;
    margin-bottom: 60px;
}
.section-number {
    font-family: var(--font-mono);
    font-size: .8rem;
    font-weight: 500;
    color: var(--gold-muted);
    letter-spacing: .1em;
    display: block;
    margin-bottom: 12px;
}
.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 16px;
    line-height: 1.2;
}
.section-desc {
    color: var(--text-light);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

/* --- Reveal Animation --- */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity .7s cubic-bezier(.22,.61,.36,1),
                transform .7s cubic-bezier(.22,.61,.36,1);
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Stat Cards --- */
.stat-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 60px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}
.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 32px 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all .3s ease;
}
.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
    border-color: var(--gold);
}
.stat-number {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1;
    margin-bottom: 8px;
}
.stat-label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--slate-light);
    text-transform: uppercase;
    letter-spacing: .06em;
}

/* --- Chart Panels --- */
.chart-panel {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
}
.chart-panel-header {
    margin-bottom: 32px;
}
.chart-panel-header h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 6px;
}
.chart-panel-header p {
    color: var(--text-light);
    font-size: .95rem;
}
.chart-container {
    position: relative;
    width: 100%;
}
.chart-container canvas {
    max-height: 380px;
}
.chart-footnote {
    text-align: center;
    font-size: .82rem;
    color: var(--slate-light);
    margin-top: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* Status donut + waffle layout */
.status-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}
.status-left { text-align: center; }
.status-right { text-align: center; }

/* Custom Legend */
.chart-legend-custom {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: .92rem;
    justify-content: center;
}
.legend-swatch {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    flex-shrink: 0;
}
.legend-label {
    font-weight: 600;
    color: var(--text);
}
.legend-value {
    color: var(--slate-light);
    margin-left: 4px;
}

/* --- Waffle Chart --- */
.waffle-container {
    text-align: center;
}
.waffle-title {
    font-size: .82rem;
    font-weight: 600;
    color: var(--slate-light);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 16px;
}
.waffle-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    max-width: 220px;
    margin: 0 auto 16px;
}
.waffle-cell {
    aspect-ratio: 1;
    border-radius: 5px;
    cursor: pointer;
    transition: all .25s ease;
    position: relative;
}
.waffle-cell:hover {
    transform: scale(1.18);
    box-shadow: 0 4px 16px rgba(0,0,0,.2);
    z-index: 2;
}
.waffle-cell .waffle-tip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(11,29,58,.92);
    color: #fff;
    font-size: .75rem;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 10;
}
.waffle-cell:hover .waffle-tip {
    display: block;
}
.waffle-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 18px;
    font-size: .78rem;
    color: var(--slate-light);
}
.waffle-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}
.waffle-legend-swatch {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    display: inline-block;
}

/* --- Chart Drilldown --- */
.chart-drilldown {
    max-height: 0;
    overflow: hidden;
    transition: max-height .5s cubic-bezier(.22,.61,.36,1), padding .3s ease, opacity .3s ease;
    opacity: 0;
}
.chart-drilldown.open {
    max-height: 600px;
    opacity: 1;
    padding-top: 24px;
    margin-top: 16px;
    border-top: 1px solid var(--border);
}
.drilldown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.drilldown-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy);
}
.drilldown-close {
    background: none;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--slate-light);
    font-size: 1.1rem;
    transition: all .2s;
}
.drilldown-close:hover {
    border-color: var(--red);
    color: var(--red);
}
.drilldown-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.drilldown-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 6px 16px 6px 10px;
    font-size: .85rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: all .2s;
}
.drilldown-chip:hover {
    border-color: var(--gold);
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.drilldown-chip .chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════
   LEAFLET MAP
   ═══════════════════════════════════════════ */
.map-controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}
.map-metric-btn {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: .82rem;
    padding: 8px 20px;
    border-radius: 50px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--slate);
    cursor: pointer;
    transition: all .25s ease;
}
.map-metric-btn:hover {
    border-color: var(--gold);
    color: var(--navy);
}
.map-metric-btn.active {
    background: var(--navy);
    color: var(--gold);
    border-color: var(--navy);
}

.map-panel {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 24px;
    align-items: start;
}
.map-wrap {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
}
#maMap {
    height: 480px;
    width: 100%;
    background: #FFFFFF;
    border-radius: var(--radius-md);
    z-index: 1;
}
/* Hide Leaflet attribution if needed; keep small */
.leaflet-control-attribution {
    font-size: 9px !important;
    opacity: .6;
}

/* Custom SVG pin shadow */
.custom-svg-icon {
    filter: drop-shadow(0px 3px 3px rgba(0,0,0,0.35));
    transition: transform .15s ease;
}
.custom-svg-icon:hover {
    transform: scale(1.15);
}

/* Leaflet popup override to match site theme */
.leaflet-popup-content-wrapper {
    border-radius: 10px !important;
    box-shadow: 0 4px 20px rgba(11,29,58,.15) !important;
    font-family: var(--font-body) !important;
}
.leaflet-popup-content {
    margin: 10px 14px !important;
    font-size: .9rem !important;
    line-height: 1.5 !important;
}
.leaflet-popup-content .popup-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    color: var(--navy);
    margin-bottom: 4px;
}
.leaflet-popup-content .popup-meta {
    font-size: .82rem;
    color: var(--slate-light);
}
.leaflet-popup-content .popup-status {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    padding: 2px 8px;
    border-radius: 50px;
    margin-top: 6px;
}
.leaflet-popup-content .popup-btn {
    display: block;
    margin-top: 10px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: .78rem;
    color: var(--navy-mid);
    text-decoration: underline;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
}
.leaflet-popup-content .popup-btn:hover {
    color: var(--gold-muted);
}

/* Leaflet tooltip override */
.leaflet-tooltip {
    font-family: var(--font-body) !important;
    font-size: .82rem !important;
    font-weight: 600 !important;
    color: var(--navy) !important;
    border-radius: 6px !important;
    padding: 4px 10px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.12) !important;
}

/* Map legend */
.map-legend-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.map-legend-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    color: var(--navy);
    margin-bottom: 8px;
}
.map-legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .85rem;
    color: var(--text);
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 6px;
    transition: all .2s;
}
.map-legend-item:hover {
    background: var(--section-alt);
}
.map-legend-item.dimmed {
    opacity: .25;
}
.map-legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    flex-shrink: 0;
}
.map-legend-count {
    margin-left: auto;
    font-weight: 600;
    color: var(--slate-light);
    font-size: .82rem;
}

/* Map detail card */
.map-detail-card {
    margin-top: 24px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0;
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .5s cubic-bezier(.22,.61,.36,1), opacity .3s ease, padding .3s ease;
}
.map-detail-card.open {
    max-height: 500px;
    opacity: 1;
    padding: 32px 40px;
}

/* ═══════════════════════════════════════════
   READINESS HEATMAP
   ═══════════════════════════════════════════ */
.heatmap-panel {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}
.heatmap-legend {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.hm-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .85rem;
    font-weight: 500;
    color: var(--text);
}
.hm-swatch {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    display: inline-block;
}
.hm-green  { background: #2E7D4F; }
.hm-yellow { background: #D4A843; }
.hm-red    { background: #C05A5A; }
.hm-blue   { background: #4A7FB5; }
.hm-gray   { background: #C8C4BC; }

.heatmap-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.heatmap-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 3px;
    min-width: 650px;
}
.heatmap-table th {
    font-family: var(--font-body);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--slate-light);
    padding: 8px 6px;
    text-align: center;
    white-space: nowrap;
}
.heatmap-table th:first-child {
    text-align: left;
    min-width: 180px;
}
.heatmap-table td {
    padding: 0;
    text-align: center;
    vertical-align: middle;
}
.heatmap-table td:first-child {
    text-align: left;
    padding: 6px 8px;
    font-size: .82rem;
    font-weight: 600;
    color: var(--navy);
    white-space: nowrap;
}
.hm-cell {
    width: 100%;
    height: 36px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .2s ease;
    position: relative;
}
.hm-cell:hover {
    transform: scale(1.08);
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0,0,0,.18);
}
.hm-cell-tip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(11,29,58,.94);
    color: #fff;
    font-size: .75rem;
    padding: 6px 10px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 20;
}
.hm-cell:hover .hm-cell-tip {
    display: block;
}
.hm-th-tooltip {
    position: relative;
    cursor: help;
    text-decoration: underline dotted rgba(107, 122, 141, .4);
    text-underline-offset: 3px;
}
.hm-th-tip {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(11,29,58,.94);
    color: #fff;
    font-size: .75rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    padding: 8px 12px;
    border-radius: 6px;
    white-space: normal;
    width: 220px;
    line-height: 1.5;
    pointer-events: none;
    z-index: 20;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.hm-th-tooltip:hover .hm-th-tip {
    display: block;
}
.hm-cell-icon {
    font-size: .9rem;
    opacity: .8;
    color: #fff;
}

/* --- Challenges --- */
.challenges-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 60px;
}
.challenge-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 32px 28px;
    transition: all .35s ease;
    box-shadow: var(--shadow-sm);
}
.challenge-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
    border-color: var(--gold);
}
.challenge-icon {
    color: var(--gold-muted);
    margin-bottom: 16px;
}
.challenge-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 10px;
}
.challenge-card p {
    color: var(--text-light);
    font-size: .92rem;
    line-height: 1.65;
}

/* --- Quotes Carousel --- */
.quotes-panel {
    background: var(--navy);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.quotes-panel::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(ellipse at right, rgba(198,168,78,.06) 0%, transparent 70%);
    pointer-events: none;
}
.quotes-panel h3 {
    font-family: var(--font-display);
    color: var(--gold);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 32px;
    letter-spacing: .04em;
}
.quotes-carousel {
    position: relative;
    min-height: 140px;
}
.quote-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .5s ease, transform .5s ease;
    transform: translateX(20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.quote-slide.active {
    opacity: 1;
    transform: translateX(0);
    position: relative;
}
.quote-slide blockquote {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 400;
    color: rgba(255,255,255,.9);
    font-style: italic;
    line-height: 1.6;
    max-width: 640px;
    margin: 0 auto 16px;
}
.quote-slide cite {
    font-family: var(--font-body);
    font-style: normal;
    font-size: .85rem;
    color: rgba(255,255,255,.4);
    font-weight: 500;
}
.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 28px;
    position: relative;
    z-index: 2;
}
.carousel-btn {
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(255,255,255,.6);
    transition: all .25s ease;
}
.carousel-btn:hover {
    background: rgba(198,168,78,.2);
    border-color: var(--gold);
    color: var(--gold);
}
.carousel-dots {
    display: flex;
    gap: 8px;
}
.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    cursor: pointer;
    transition: all .3s ease;
}
.carousel-dot.active {
    background: var(--gold);
    transform: scale(1.2);
}

/* --- Recommendations --- */
.rec-timeline {
    position: relative;
    padding-left: 60px;
}
.rec-timeline::before {
    content: '';
    position: absolute;
    left: 23px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--gold), var(--border));
}
.rec-item {
    position: relative;
    margin-bottom: 36px;
}
.rec-item:last-child { margin-bottom: 0; }
.rec-marker {
    position: absolute;
    left: -60px;
    top: 4px;
    width: 48px;
    height: 48px;
    background: var(--navy);
    color: var(--gold);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(11,29,58,.15);
    border: 2px solid var(--gold);
    z-index: 1;
}
.rec-content {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px 32px;
    box-shadow: var(--shadow-sm);
    transition: all .3s ease;
}
.rec-content:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--gold);
}
.rec-content h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
}
.rec-content p {
    color: var(--text-light);
    font-size: .95rem;
    line-height: 1.65;
}
.rec-content strong {
    color: var(--navy);
    font-weight: 600;
}

/* --- Institution Explorer --- */
.explorer-filters {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}
.filter-btn {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: .85rem;
    padding: 8px 20px;
    border-radius: 50px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--slate);
    cursor: pointer;
    transition: all .25s ease;
}
.filter-btn:hover {
    border-color: var(--gold);
    color: var(--navy);
}
.filter-btn.active {
    background: var(--navy);
    color: var(--gold);
    border-color: var(--navy);
}

.institution-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}
.inst-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    cursor: pointer;
    transition: all .3s ease;
    position: relative;
    overflow: hidden;
    animation: cardFadeIn .4s ease both;
}
@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.inst-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    transition: width .3s ease;
}
.inst-card[data-status="Fully implemented"]::before { background: #2E7D4F; }
.inst-card[data-status="Implemented with issues"]::before { background: var(--gold); }
.inst-card[data-status="Not implemented"]::before { background: #B85450; }
.inst-card[data-status="Planning stage"]::before { background: var(--navy-mid); }
.inst-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    border-color: var(--gold);
}
.inst-card:hover::before { width: 6px; }
.inst-card-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    color: var(--navy);
    margin-bottom: 6px;
}
.inst-card-status {
    font-size: .78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.inst-card[data-status="Fully implemented"] .inst-card-status { color: #2E7D4F; }
.inst-card[data-status="Implemented with issues"] .inst-card-status { color: var(--gold-muted); }
.inst-card[data-status="Not implemented"] .inst-card-status { color: #B85450; }
.inst-card[data-status="Planning stage"] .inst-card-status { color: var(--navy-mid); }

/* Detail Panel */
.institution-detail-panel {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    display: none;
    position: relative;
    animation: slideUp .4s ease;
}
.institution-detail-panel.open { display: block; }
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.detail-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--slate-light);
    cursor: pointer;
    line-height: 1;
    transition: color .2s;
}
.detail-close:hover { color: var(--navy); }
.detail-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.detail-header h3 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 4px;
}
.detail-status-badge {
    display: inline-block;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 4px 12px;
    border-radius: 50px;
}
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.detail-field-label {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--slate-light);
    margin-bottom: 4px;
}
.detail-field-value {
    font-size: .95rem;
    color: var(--text);
    line-height: 1.5;
}

/* --- Context Box (MassArt) --- */
.context-box {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: var(--card-bg);
    border: 1px solid var(--gold);
    border-left: 4px solid var(--gold);
    border-radius: var(--radius-md);
    padding: 28px 32px;
    margin-top: 32px;
    margin-bottom: 60px;
    box-shadow: var(--shadow-sm);
}
.context-box-icon {
    color: var(--gold-muted);
    flex-shrink: 0;
    margin-top: 2px;
}
.context-box-content h4 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
}
.context-box-content p {
    color: var(--text-light);
    font-size: .92rem;
    line-height: 1.65;
}

/* --- Full Integration Steps --- */
.integration-steps {
    max-width: 800px;
    margin: 0 auto;
}
.integration-step {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    overflow: hidden;
    transition: all .3s ease;
    position: relative;
    padding-left: 56px;
}
.integration-step:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-sm);
}
.integration-step.active {
    border-color: var(--gold);
    box-shadow: var(--shadow-md);
}
.integration-number {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--navy);
    color: var(--gold);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.2rem;
}
.integration-step.active .integration-number {
    background: var(--gold);
    color: var(--navy);
}
.integration-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px 18px 20px;
    cursor: pointer;
}
.integration-header h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--navy);
    margin: 0;
}
.integration-toggle {
    font-size: 1.4rem;
    color: var(--slate-light);
    font-weight: 300;
    transition: transform .3s ease;
    flex-shrink: 0;
}
.integration-step.active .integration-toggle {
    transform: rotate(45deg);
    color: var(--gold-muted);
}
.integration-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s cubic-bezier(.22,.61,.36,1), padding .3s ease;
    padding: 0 24px 0 20px;
}
.integration-step.active .integration-body {
    max-height: 300px;
    padding: 0 24px 20px 20px;
}
.integration-body p {
    color: var(--text-light);
    font-size: .92rem;
    line-height: 1.65;
}

/* --- Year-over-Year Progress --- */
.yoy-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.yoy-comparison {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}
.yoy-comparison-col {
    flex: 1;
    max-width: 280px;
    text-align: center;
    padding: 24px;
    background: var(--section-alt);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}
.yoy-comparison-col-current {
    background: #EAF5EE;
    border-color: var(--green);
}
.yoy-comparison-year {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 16px;
}
.yoy-comparison-col-current .yoy-comparison-year {
    color: var(--green);
}
.yoy-comparison-stats {
    display: flex;
    gap: 20px;
    justify-content: center;
}
.yoy-comparison-stat {
    text-align: center;
}
.yoy-comparison-number {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1;
}
.yoy-comparison-number.green { color: var(--green); }
.yoy-comparison-label {
    font-size: .75rem;
    font-weight: 600;
    color: var(--slate-light);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-top: 6px;
}
.yoy-comparison-arrow {
    font-size: 2rem;
    font-weight: 700;
    color: var(--green);
}
.yoy-section {
    margin-bottom: 28px;
}
.yoy-section-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.yoy-section-icon {
    color: var(--green);
    font-size: 1rem;
}
.yoy-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}
.yoy-card {
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    transition: all .3s ease;
}
.yoy-card:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-sm);
}
.yoy-card.milestone {
    border-left: 4px solid var(--green);
}
.yoy-card.new-participant {
    border-left: 4px solid var(--gold);
}
.yoy-card-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: .95rem;
    color: var(--navy);
    margin-bottom: 8px;
}
.yoy-card-journey {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.yoy-card-arrow {
    color: var(--green);
    font-weight: 700;
    font-size: 1rem;
}
.yoy-pill {
    display: inline-block;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    padding: 3px 10px;
    border-radius: 50px;
    white-space: nowrap;
}
.yoy-pill.prev {
    background: #F0EFEB;
    color: var(--slate-light);
}
.yoy-card-story {
    font-size: .85rem;
    color: var(--text-light);
    line-height: 1.5;
}
.yoy-steady-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.yoy-steady-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 5px 14px 5px 10px;
    font-size: .82rem;
    font-weight: 500;
    color: var(--text);
}
.yoy-steady-chip .chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* --- Glossary --- */
.glossary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.glossary-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    transition: all .3s ease;
}
.glossary-item:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-sm);
}
.glossary-item dt {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 6px;
}
.glossary-item dd {
    font-size: .9rem;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

/* --- Export Button --- */
.explorer-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 36px;
    flex-wrap: wrap;
    gap: 12px;
}
.export-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: .82rem;
    padding: 8px 20px;
    border-radius: 50px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--slate);
    cursor: pointer;
    transition: all .25s ease;
}
.export-btn:hover {
    border-color: var(--gold);
    color: var(--navy);
    box-shadow: var(--shadow-sm);
}
.export-btn svg {
    flex-shrink: 0;
}

/* --- Institution Card Representative --- */
.inst-card-rep {
    font-size: .82rem;
    color: var(--slate-light);
    margin-bottom: 6px;
    font-weight: 500;
}

/* --- Footer --- */
.footer {
    background: var(--navy);
    padding: 48px 0;
}
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}
.footer-logo {
    height: 56px;
    width: auto;
    opacity: .9;
}
.footer-text { text-align: center; }
.footer-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255,255,255,.9);
    margin-bottom: 4px;
}
.footer-copy {
    font-size: .82rem;
    color: rgba(255,255,255,.4);
}
.footer-cc {
    margin-top: 16px;
}
.cc-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,.5);
    font-size: .75rem;
    transition: color .2s;
}
.cc-link:hover {
    color: rgba(255,255,255,.8);
}
.cc-badge {
    height: 20px;
    width: auto;
    opacity: .7;
    transition: opacity .2s;
}
.cc-link:hover .cc-badge {
    opacity: 1;
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .stat-row { grid-template-columns: repeat(2, 1fr); }
    .challenges-grid { grid-template-columns: repeat(2, 1fr); }
    .nav-links a { font-size: .72rem; padding: 6px 8px; }
    .map-panel { grid-template-columns: 1fr; }
    .map-legend-panel { flex-direction: row; flex-wrap: wrap; gap: 6px; }
    .status-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .section { padding: 64px 0; }
    .stat-row { grid-template-columns: 1fr 1fr; gap: 12px; }
    .stat-number { font-size: 2.2rem; }
    .challenges-grid { grid-template-columns: 1fr; }
    .chart-panel { padding: 24px 20px; }
    .rec-timeline { padding-left: 48px; }
    .rec-marker { left: -48px; width: 38px; height: 38px; font-size: .9rem; }
    .rec-timeline::before { left: 18px; }
    .detail-grid { grid-template-columns: 1fr; }
    .nav-links { display: none; }
    .quotes-panel { padding: 32px 24px; }
    .quote-slide blockquote { font-size: 1.05rem; }
    .institution-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
    .map-panel { padding: 16px; }
    #maMap { height: 360px; }
    .heatmap-panel { padding: 16px; }
    .glossary-grid { grid-template-columns: 1fr; }
    .yoy-cards { grid-template-columns: 1fr; }
    .explorer-toolbar { flex-direction: column; align-items: stretch; }
    .explorer-filters { justify-content: center; }
}

@media (max-width: 480px) {
    .stat-row { grid-template-columns: 1fr; }
    .hero { padding: 40px 20px; }
    .explorer-filters { gap: 6px; }
    .filter-btn { font-size: .78rem; padding: 6px 14px; }
    .map-controls { gap: 4px; }
    .map-metric-btn { font-size: .75rem; padding: 6px 12px; }
    #maMap { height: 280px; }
}
