:root {
    /* Fallback header height so first paint doesn't overlap content.
       JS overwrites this precisely on DOMContentLoaded. */
    --header-h: 72px;
    --nav-h: 72px;
    --nav-h-mobile: 56px;
    --nav-offset: var(--header-h);
    --green: #1f7a3a;
    --greenSoft: rgba(31, 122, 58, 0.12);
    --red: #c81f2d;
    --redSoft: rgba(200, 31, 45, 0.12);
    --bg: #fafcf9;
    --text: #111827;
    --muted: #344054;
    --card: #ffffff;
    --border: rgba(17, 24, 39, 0.12);
    --radius: 12px;
    --shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
}

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

/* Mobile safety net */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

img,
svg,
video,
canvas {
    max-width: 100%;
    height: auto;
}

.container,
.wrap,
.section,
main,
header,
footer {
    max-width: 100%;
}

[class*="grid"],
[class*="row"],
[class*="col"] {
    min-width: 0;
}

.card,
.panel,
.pill {
    min-width: 0;
}

h1,
h2,
h3,
p,
.title,
.headline {
    overflow-wrap: anywhere;
    word-break: break-word;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-x: none;
    overscroll-behavior-y: auto;
}

html {
    font-size: 17px;
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
}

body {
    position: relative;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: linear-gradient(180deg, #fbfdfb 0%, #f8fbf8 60%, #f7faf7 100%);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    padding-top: var(--header-h);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    z-index: -1;
    opacity: 0.78;
    background:
        radial-gradient(1100px 460px at 12% 2%, rgba(31, 122, 58, 0.035), rgba(31, 122, 58, 0) 58%),
        radial-gradient(900px 420px at 88% 8%, rgba(31, 122, 58, 0.03), rgba(31, 122, 58, 0) 60%),
        linear-gradient(rgba(17, 24, 39, 0.006) 1px, transparent 1px),
        linear-gradient(90deg, rgba(17, 24, 39, 0.006) 1px, transparent 1px),
        linear-gradient(180deg, #fbfdfb 0%, #f8fbf8 60%, #f7faf7 100%);
    background-size: auto, auto, 24px 24px, 24px 24px, auto;
}

.main {
    position: relative;
}

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

    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}

:focus-visible {
    outline: 3px solid var(--green);
    outline-offset: 2px;
}

a {
    color: var(--text);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    text-decoration-color: var(--green);
}

.container {
    width: min(1160px, 92vw);
    max-width: 100%;
    margin: 0 auto;
}

/* Anchor jumps should account for the fixed header */
.section,
[id] {
    scroll-margin-top: calc(var(--header-h) + 16px);
}

/* Hero: add breathing room below fixed navbar (esp. mobile) */
#home {
    padding-top: 12px;
}

.section {
    padding: 60px 0;
    border-top: 1px solid var(--border);
}

h1 {
    font-size: clamp(2.25rem, 5vw, 2.75rem);
    line-height: 1.12;
    letter-spacing: 0.012em;
}

h2 {
    font-size: clamp(1.75rem, 3.4vw, 2rem);
    line-height: 1.2;
    letter-spacing: 0.01em;
    margin-bottom: 20px;
    color: var(--text);
    position: relative;
    display: inline-block;
}

h2::after {
    content: "";
    display: block;
    width: 50px;
    height: 2px;
    background: var(--red);
    margin-top: 8px;
}

h3 {
    font-size: clamp(1.25rem, 2vw, 1.4rem);
    line-height: 1.28;
    letter-spacing: 0.008em;
    color: var(--text);
}

h4 {
    font-size: 1.1rem;
    line-height: 1.35;
    color: var(--text);
}

p {
    font-size: 1.05rem;
    color: var(--muted);
    margin-top: 10px;
    margin-bottom: 0;
}

small,
.muted,
.download-size,
.timeline-sources,
.work-results,
.hero-caption,
.fact-header-label,
.work-filter-group label,
.form-checkbox label,
.form-error,
.form-success,
.stat-label {
    font-size: 0.95rem;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 8px;
    background: var(--text);
    color: #fff;
    padding: 8px 10px;
    border-radius: 6px;
    z-index: 2000;
}

.skip-link:focus {
    top: 8px;
}



.nav.nav-pill {
    margin-top: 0;
    border: 1px solid rgba(17, 24, 39, 0.1);
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 6px 16px rgba(17, 24, 39, 0.08);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
    min-height: 58px;
}

@media (max-width: 420px) {
    /* Keep the navbar from crushing the hero title on very small screens */
    .nav.nav-pill {
        padding: 6px 10px;
        gap: 8px;
    }

    .brand__text {
        display: none;
    }

    .brand__logo {
        width: 36px;
        height: 36px;
    }
}

#site-header.shrink .nav.nav-pill {
    box-shadow: 0 4px 12px rgba(17, 24, 39, 0.05);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: max-content;
}

.logo-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.logo-text {
    font-size: 1rem;
    font-weight: 700;
}

.brand {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: max-content;
    padding: 3px 2px;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.brand::after {
    content: "";
    position: absolute;
    left: 36px;
    right: 4px;
    bottom: -3px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(200, 31, 45, 0.9), rgba(200, 31, 45, 0.22));
    transform: scaleX(0.34);
    transform-origin: left center;
    transition: transform 0.22s ease;
}

.brand:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.brand:hover::after {
    transform: scaleX(1);
}

.brand__mark {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, var(--green) 0%, #166631 100%);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), 0 5px 10px rgba(17, 24, 39, 0.12);
    position: relative;
}

.brand__mark::after {
    content: "";
    position: absolute;
    width: 6px;
    height: 6px;
    right: -1px;
    bottom: -1px;
    border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 0 2px #fff;
}

.brand__name {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: var(--text);
}

.brand__tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(200, 31, 45, 0.28);
    background: rgba(200, 31, 45, 0.06);
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
    padding: 4px 7px;
    text-transform: uppercase;
}

.brand:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 2px rgba(31, 122, 58, 0.36), 0 0 0 5px rgba(200, 31, 45, 0.2);
    border-radius: 8px;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    padding: 6px 12px;
    font-size: 0.95rem;
    cursor: pointer;
}

.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1;
}

.nav-link,
.nav-more-toggle {
    padding: 8px 13px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 1rem;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    line-height: 1.1;
}

.nav-link.active {
    background: var(--greenSoft);
    color: var(--text);
    border-bottom: 2px solid var(--red);
}

.nav-more {
    position: relative;
}

.nav-more-toggle {
    color: var(--muted);
}

.nav-more-toggle:hover {
    background: var(--greenSoft);
}

.nav-more.open .nav-more-toggle {
    background: var(--greenSoft);
    border-bottom: 2px solid var(--red);
    color: var(--text);
}

.nav-more-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 190px;
    list-style: none;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 8px;
    display: none;
    z-index: 20;
}

.nav-more.open .nav-more-menu {
    display: grid;
    gap: 4px;
}

.nav-more-link {
    display: block;
    width: 100%;
    border-radius: 10px;
    padding: 8px 10px;
}

.language-switcher {
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    padding: 2px;
    display: inline-flex;
    gap: 2px;
}

.lang-btn {
    border: 0;
    background: transparent;
    color: var(--muted);
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
}

.lang-btn.active {
    background: var(--green);
    color: #fff;
}

.lang-btn:focus-visible {
    box-shadow: 0 0 0 2px var(--redSoft);
}

.cta-button {
    display: inline-block;
    padding: 11px 18px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    transition: transform 0.24s ease, box-shadow 0.24s ease, background-color 0.24s ease, color 0.24s ease, border-color 0.24s ease;
}

.cta-button.primary {
    background: var(--green);
    color: #fff;
    box-shadow: 0 8px 18px rgba(31, 122, 58, 0.22);
}

.cta-button.primary:hover {
    background: #176332;
    transform: translateY(-2px);
    box-shadow: 0 14px 24px rgba(31, 122, 58, 0.28);
    text-decoration: none;
}

.cta-button.secondary {
    border: 1px solid var(--green);
    color: var(--green);
    background: rgba(255, 255, 255, 0.84);
}

.cta-button.secondary:hover {
    border-color: var(--green);
    background: rgba(31, 122, 58, 0.12);
    transform: translateY(-1px);
    text-decoration: none;
}

.cta-button:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.95), 0 0 0 6px rgba(31, 122, 58, 0.48);
}

.stats-section {
    position: relative;
    z-index: 1;
    margin-top: 16px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
}

.stat-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.stat-number {
    color: var(--green);
    font-size: 1.7rem;
    font-weight: 800;
}

.stat-label {
    color: var(--muted);
    margin-top: 6px;
}

.bio-text,
.credentials-list,
.volunteer-form,
.facts-disclaimer,
.privacy-notice,
.download-item,
.assembly-item,
.media-item,
.work-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.bio-text,
.credentials-list,
.privacy-notice,
.facts-disclaimer {
    padding: 22px;
}

.bio-text p,
.credentials-list p,
.facts-disclaimer p,
.privacy-notice p,
.timeline-desc,
.work-card-summary,
.assembly-excerpt,
.media-item p {
    font-size: 1.05rem;
}

.credential-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.credential-item:last-child {
    border-bottom: 0;
}

.timeline-container {
    max-width: 1120px;
}

.timeline {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 58px;
    row-gap: 24px;
    margin-top: 10px;
    padding: 8px 0;
}

.timeline::before {
    content: "";
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 50%;
    width: 2px;
    transform: translateX(-50%);
    background: rgba(31, 122, 58, 0.32);
    z-index: 1;
}

.timeline-item {
    position: relative;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 22px;
    box-shadow: var(--shadow);
    z-index: 2;
}

.timeline-item:nth-child(odd) {
    grid-column: 1;
}

.timeline-item:nth-child(even) {
    grid-column: 2;
}

.timeline-item::before {
    content: "";
    position: absolute;
    top: 30px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--green);
    background: var(--bg);
    z-index: 4;
}

.timeline-item::after {
    content: "";
    position: absolute;
    top: 37px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--red);
    z-index: 5;
}

.timeline-item:nth-child(odd)::before {
    right: -70px;
}

.timeline-item:nth-child(odd)::after {
    right: -63px;
}

.timeline-item:nth-child(even)::before {
    left: -70px;
}

.timeline-item:nth-child(even)::after {
    left: -63px;
}

/* Timeline reveal + dot pulse */
.timeline-section .tl-dot {
    position: absolute;
    top: 37px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--red);
    z-index: 6;
    pointer-events: none;
}

.timeline-section .timeline-item:nth-child(odd) .tl-dot {
    right: -63px;
}

.timeline-section .timeline-item:nth-child(even) .tl-dot {
    left: -63px;
}

@media (prefers-reduced-motion: no-preference) {
    .timeline-section.motion-ready .tl-card {
        opacity: 0;
        transform: translateY(10px) scale(0.995);
        transition: opacity 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
        will-change: opacity, transform;
    }

    .timeline-section.motion-ready .tl-card.is-visible {
        opacity: 1;
        transform: none;
    }

    .timeline-section.motion-ready .timeline::before {
        transform-origin: top;
        transform: translateX(-50%) scaleY(0);
        transition: transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    .timeline-section.motion-ready.is-active .timeline::before {
        transform: translateX(-50%) scaleY(1);
    }

    .timeline-section .tl-dot.pulse {
        animation: tlPulse 650ms ease-out 1;
    }
}

@keyframes tlPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(200, 31, 45, 0.2);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 0 0 8px rgba(200, 31, 45, 0.08);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(200, 31, 45, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .timeline-section .tl-card {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .timeline-section .tl-dot {
        animation: none;
    }

    .timeline-section .timeline::before {
        transition: none;
        transform: translateX(-50%);
    }
}

.timeline-year {
    display: inline-block;
    background: var(--greenSoft);
    color: var(--green);
    border: 1px solid rgba(31, 122, 58, 0.28);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.timeline-item h4 {
    margin-top: 6px;
}

.timeline-sources {
    margin-top: 12px;
    color: var(--muted);
}

.timeline-sources a {
    color: var(--muted);
    text-decoration: underline;
    text-decoration-color: transparent;
}

.timeline-sources a:hover {
    color: var(--text);
    text-decoration-color: var(--green);
}

/* Timeline list semantics */
#timeline .timeline {
    list-style: none;
    padding-left: 0;
    margin-left: 0;
}

/* EN spacing + type tweaks */
body[data-lang="en"] #timeline .timeline-desc {
    line-height: 1.8;
    margin-top: 12px;
}

body[data-lang="en"] #timeline .timeline-item h4 {
    margin-top: 8px;
    margin-bottom: 8px;
}

body[data-lang="en"] #timeline .timeline-sources {
    font-size: 0.9rem;
    color: var(--muted);
}

.work-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.work-filter-group label {
    display: block;
    color: var(--muted);
    margin-bottom: 6px;
}

.work-filter-select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    padding: 11px;
    font-size: 1rem;
}

.work-results {
    color: var(--muted);
    margin-top: 0;
    margin-bottom: 12px;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.assembly-grid,
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

/* Sabha (Speeches) premium tiles */
.sabha-section {
    --nc-green: #1f7a3a;
    --nc-red: #c81f2d;
    --paper: #fbf8f3;
    --ink: #0f172a;
    --muted: #475467;
}

.sabha-section .assembly-subtitle {
    margin-top: 10px;
    margin-bottom: 18px;
    max-width: 66ch;
    color: var(--muted);
}

/* Sabha grid: force 3 per row on desktop */
.sabha-section .container {
    width: min(1240px, 94vw);
    max-width: 1240px;
    margin: 0 auto;
}

.sabha-section .sabha-grid {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .sabha-section .sabha-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .sabha-section {
        width: 100%;
    }

    .sabha-section .sabha-grid {
        grid-template-columns: repeat(3, minmax(320px, 1fr));
        gap: 22px;
    }

    .sabha-section .container {
        width: min(1320px, 96vw);
        max-width: 1320px;
        padding-left: 6px;
        padding-right: 6px;
    }
}


.sabha-card {
    position: relative;
    background: var(--paper);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 12px 26px rgba(17, 24, 39, 0.08);
    display: grid;
    width: 100%;
    max-width: none;
    gap: 12px;
    min-height: 390px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sabha-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 34px rgba(17, 24, 39, 0.12);
}

.sabha-card:focus-within {
    outline: 2px solid rgba(31, 122, 58, 0.35);
    outline-offset: 2px;
}

.sabha-thumb {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    height: auto;
    background: linear-gradient(135deg, rgba(31, 122, 58, 0.08), rgba(200, 31, 45, 0.08));
}

.sabha-thumb::before {
    content: "â–¦";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(31, 122, 58, 0.35);
    font-size: 2rem;
    z-index: 1;
}

.sabha-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0) 35%, rgba(15, 23, 42, 0.5) 100%);
    z-index: 2;
}

.sabha-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    position: relative;
    z-index: 3;
}

.sabha-card.is-hidden {
    display: none;
}

.sabha-more-wrap {
    margin-top: 22px;
    display: flex;
    justify-content: center;
}

.sabha-more-btn {
    min-width: 168px;
    border-radius: 999px;
    border: 1px solid rgba(31, 122, 58, 0.55);
    background: #fff;
    color: #166534;
    padding: 10px 20px;
    font-size: 0.96rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.sabha-more-btn:hover {
    background: rgba(200, 31, 45, 0.08);
    border-color: rgba(200, 31, 45, 0.45);
    color: #9f1239;
    transform: translateY(-1px);
}

.sabha-more-btn:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 3px rgba(31, 122, 58, 0.2), 0 0 0 6px rgba(200, 31, 45, 0.16);
}

.sabha-thumb.placeholder img {
    opacity: 0;
}

.sabha-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.sabha-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid rgba(31, 122, 58, 0.22);
    background: rgba(31, 122, 58, 0.08);
    color: var(--nc-green);
    font-size: 0.82rem;
    font-weight: 700;
}

.sabha-pill.type {
    border-color: rgba(200, 31, 45, 0.28);
    background: rgba(200, 31, 45, 0.06);
    color: #8a1a24;
}

.sabha-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(31, 122, 58, 0.12);
    color: var(--nc-green);
    font-size: 0.82rem;
    font-weight: 700;
}

.sabha-title {
    font-size: 1.22rem;
    color: var(--ink);
    margin: 0;
    line-height: 1.4;
}

.sabha-short {
    font-size: 0.96rem;
    color: var(--muted);
    margin: 0;
}

.sabha-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.sabha-source-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    padding: 7px 12px;
    border: 1px solid rgba(31, 122, 58, 0.35);
    color: var(--nc-green);
    background: #fff;
    font-weight: 700;
    font-size: 0.9rem;
}

.sabha-source-btn:hover {
    background: rgba(31, 122, 58, 0.08);
    text-decoration: none;
}

.sabha-info-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(15, 23, 42, 0.15);
    background: #fff;
    color: var(--ink);
    font-weight: 800;
    cursor: pointer;
}

body[data-lang="en"] .sabha-section .sabha-short {
    line-height: 1.75;
}

@media (prefers-reduced-motion: no-preference) {
    .sabha-card {
        opacity: 0;
        transform: translateY(8px);
        transition: opacity 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
        will-change: opacity, transform;
    }

    .sabha-card.is-visible {
        opacity: 1;
        transform: translateY(0);
    }

    .sabha-card.is-revealed {
        animation: sabhaCardReveal 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
    }
}

@keyframes sabhaCardReveal {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .sabha-card {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Sabha modal */
.sabha-modal .sabha-modal-content {
    max-width: 560px;
    width: min(92vw, 560px);
}

.sabha-modal-body h2 {
    margin: 0 0 6px;
}

.sabha-modal-body p {
    margin: 0 0 12px;
    color: var(--muted);
}

.sabha-modal-bullets {
    display: grid;
    gap: 6px;
    padding-left: 18px;
    margin: 0 0 12px;
    color: var(--muted);
}

.sabha-modal-sources {
    display: grid;
    gap: 6px;
}

.sabha-modal-sources a {
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: rgba(31, 122, 58, 0.35);
}

/* Legacy section */
.legacy {
    position: relative;
    background: linear-gradient(180deg, #fbf8f3 0%, #f7faf7 100%);
    overflow: hidden;
}

.legacy-container {
    position: relative;
    z-index: 1;
}

.legacy-head {
    max-width: 70ch;
    margin-bottom: 20px;
}

.legacy-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(31, 122, 58, 0.2);
    background: rgba(31, 122, 58, 0.08);
    color: var(--green);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.legacy-subtitle {
    margin-top: 10px;
    color: var(--muted);
    line-height: 1.7;
}

.legacy-stage {
    --legacy-progress: 0%;
    position: relative;
    padding: 12px 0 8px;
}

.legacy-shapes {
    position: absolute;
    inset: -40px 0 -30px;
    pointer-events: none;
}

.legacy-shape {
    position: absolute;
    border-radius: 999px;
    opacity: 0.22;
    filter: blur(0.5px);
}

.legacy-shape.shape-1 {
    width: 240px;
    height: 240px;
    left: -52px;
    top: 8%;
    background: rgba(31, 122, 58, 0.18);
}

.legacy-shape.shape-2 {
    width: 170px;
    height: 170px;
    right: 16%;
    top: 2%;
    background: rgba(200, 31, 45, 0.12);
}

.legacy-shape.shape-3 {
    width: 260px;
    height: 260px;
    right: -70px;
    bottom: -45px;
    background: rgba(31, 122, 58, 0.13);
}

.legacy-timeline-beam {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    background: rgba(31, 122, 58, 0.2);
    pointer-events: none;
    transform: translateY(-50%);
}

.legacy-timeline-beam::after {
    content: "";
    position: absolute;
    top: -1px;
    left: var(--legacy-progress);
    width: 72px;
    height: 4px;
    border-radius: 999px;
    background: rgba(200, 31, 45, 0.72);
    transform: translateX(-36px);
    transition: left 0.4s ease;
}

/* Legacy Carousel */
.legacy-slider {
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-radius: 20px;
    padding: 8px 2px 18px;
    cursor: grab;
    touch-action: pan-y;
}

.legacy-slider::-webkit-scrollbar {
    display: none;
}

.legacy-slider.is-pointer-down,
.legacy-slider.is-dragging {
    cursor: grabbing;
}

.legacy-slides {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 88%;
    gap: 20px;
    align-items: stretch;
}

/* Legacy Profile Redesign */
.legacy-slide {
    scroll-snap-align: center;
    position: relative;
    height: clamp(420px, 60vh, 520px);
    border: 1px solid rgba(15, 23, 42, 0.09);
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(31, 122, 58, 0.03), rgba(255, 255, 255, 0.98));
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.11);
    display: grid;
    grid-template-columns: 1.06fr 0.94fr;
    overflow: hidden;
    transition: transform 260ms ease, box-shadow 260ms ease;
}

.legacy-slide > * {
    position: relative;
    z-index: 2;
}

.legacy-slide.is-active {
    border-color: rgba(31, 122, 58, 0.34);
    box-shadow: 0 18px 34px rgba(17, 24, 39, 0.16);
}

.legacy-slide.legacy-spotlight {
    border-color: rgba(200, 31, 45, 0.46);
    box-shadow: 0 0 0 3px rgba(200, 31, 45, 0.14), 0 18px 34px rgba(17, 24, 39, 0.16);
}

.legacy-slide:focus-within {
    outline: 2px solid rgba(31, 122, 58, 0.45);
    outline-offset: 2px;
}

.legacy-slide-media {
    position: relative;
    min-height: 100%;
    overflow: hidden;
}

.legacy-slide-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(17, 24, 39, 0.1) 0%, rgba(17, 24, 39, 0.02) 100%);
    pointer-events: none;
}

.legacy-slide-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transform: scale(1);
    transition: transform 320ms ease;
}

/* Legacy Card Watermark */
.legacy-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: url("../assets/FSxiD5EUUAAqddO.webp") no-repeat;
    background-size: min(46%, 280px) auto;
    background-position: 90% 78%;
    opacity: 0.045;
    filter: blur(0.8px) saturate(0.9);
    mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0) 34%, rgba(0, 0, 0, 0.75) 66%, rgba(0, 0, 0, 0.95) 100%);
}

/* Legacy Card Premium Polish */
.legacy-glass {
    position: relative;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    align-content: start;
    gap: 0;
    padding: 24px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.78));
    backdrop-filter: blur(7px);
    border-left: 1px solid rgba(31, 122, 58, 0.12);
    overflow: hidden;
}

.legacy-glass::before {
    content: "";
    position: absolute;
    top: 18px;
    bottom: 18px;
    left: 0;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(31, 122, 58, 0.56), rgba(31, 122, 58, 0.2));
}

.legacy-glass::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0.8) 52%, rgba(255, 255, 255, 0.52) 100%);
}

.legacy-glass > * {
    position: relative;
    z-index: 1;
}

.legacy-profile-header {
    display: grid;
    gap: 8px;
    padding-bottom: 12px;
}

.legacy-name {
    margin: 0;
    font-size: clamp(1.58rem, 3.4vw, 2.05rem);
    line-height: 1.18;
    letter-spacing: 0.003em;
}

.legacy-role-chip {
    display: inline-flex;
    width: fit-content;
    border-radius: 999px;
    border: 1px solid rgba(31, 122, 58, 0.3);
    background: rgba(31, 122, 58, 0.08);
    color: #14532d;
    padding: 3px 10px;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.2;
}

.legacy-tagline {
    margin: 0;
    color: #334155;
    font-size: 0.94rem;
    font-weight: 600;
    line-height: 1.6;
    max-width: 52ch;
}

.legacy-profile-divider {
    width: 100%;
    height: 1px;
    background: rgba(100, 116, 139, 0.24);
    margin-top: 2px;
}

.legacy-profile-body {
    overflow: auto;
    min-height: 0;
    padding-right: 4px;
    max-width: 58ch;
    display: grid;
    gap: 12px;
}

.legacy-profile-body::-webkit-scrollbar {
    width: 8px;
}

.legacy-profile-body::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.35);
    border-radius: 999px;
}

.legacy-profile-body::-webkit-scrollbar-track {
    background: rgba(148, 163, 184, 0.12);
}

.legacy-profile-section {
    display: grid;
    gap: 8px;
}

.legacy-profile-title {
    margin: 0;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(71, 84, 103, 0.9);
    font-weight: 800;
    position: relative;
    padding-left: 10px;
}

.legacy-profile-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1px;
    bottom: 1px;
    width: 2px;
    border-radius: 999px;
    background: rgba(31, 122, 58, 0.56);
}

.legacy-profile-list {
    margin: 0;
    padding-left: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.legacy-profile-list li {
    position: relative;
    padding-left: 16px;
    color: #1f2937;
    font-size: 0.92rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.legacy-profile-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.58em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(31, 122, 58, 0.78);
}

.legacy-profile-quote {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.55;
    color: rgba(71, 84, 103, 0.95);
    font-style: italic;
}

.legacy-actions-wrap {
    position: sticky;
    bottom: 0;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(100, 116, 139, 0.2);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.95));
}

.legacy-actions {
    margin-top: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.legacy-btn,
.legacy-source {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 8px 12px;
    border: 1px solid transparent;
}

.legacy-btn {
    color: #fff;
    background: var(--green);
    border-color: rgba(31, 122, 58, 0.4);
    cursor: pointer;
}

.legacy-btn:hover {
    background: #166631;
    text-decoration: none;
}

.legacy-source {
    color: var(--red);
    border-color: rgba(200, 31, 45, 0.35);
    background: rgba(200, 31, 45, 0.08);
}

.legacy-source:hover {
    background: rgba(200, 31, 45, 0.15);
    text-decoration: none;
}

.legacy-btn:focus-visible,
.legacy-source:focus-visible,
.legacy-nav:focus-visible,
.legacy-dot:focus-visible {
    outline: 2px solid rgba(31, 122, 58, 0.44);
    outline-offset: 2px;
}

.legacy-controls {
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.legacy-nav {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(17, 24, 39, 0.15);
    background: #fff;
    color: var(--text);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

.legacy-nav:hover {
    border-color: rgba(31, 122, 58, 0.4);
    color: var(--green);
}

.legacy-nav:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.legacy-dots {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.legacy-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: 0;
    background: rgba(17, 24, 39, 0.2);
    cursor: pointer;
    transition: transform 0.25s ease, background-color 0.25s ease, width 0.25s ease;
}

.legacy-dot.is-active {
    width: 26px;
    background: var(--green);
}

.legacy-live {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

@media (prefers-reduced-motion: no-preference) {
    .legacy-shape {
        animation: legacyFloat 10s ease-in-out infinite;
    }

    .legacy-shape.shape-2 {
        animation-duration: 12s;
    }

    .legacy-shape.shape-3 {
        animation-duration: 11s;
    }

    /* Legacy Motion */
    .legacy-slide {
        opacity: 0;
        transform: translateY(15px);
        transition: opacity 500ms ease-out, transform 500ms ease-out, box-shadow 260ms ease;
    }

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

    .legacy-slide:hover {
        transform: translateY(-6px);
        box-shadow: 0 20px 40px rgba(17, 24, 39, 0.16);
    }

    .legacy-slide:hover .legacy-slide-media img {
        transform: scale(1.02);
    }

    .legacy-motion-item,
    .legacy-motion-li {
        opacity: 0;
        transform: translateY(8px);
        transition: opacity 520ms ease-out, transform 520ms ease-out;
    }

    .legacy-slide.is-active .legacy-motion-item,
    .legacy-slide.is-active .legacy-motion-li {
        opacity: 1;
        transform: translateY(0);
    }

    .legacy-slide.is-active .legacy-motion-item:nth-child(1) { transition-delay: 20ms; }
    .legacy-slide.is-active .legacy-motion-item:nth-child(2) { transition-delay: 80ms; }
    .legacy-slide.is-active .legacy-motion-item:nth-child(3) { transition-delay: 140ms; }
    .legacy-slide.is-active .legacy-motion-item:nth-child(4) { transition-delay: 210ms; }
    .legacy-slide.is-active .legacy-motion-item:nth-child(5) { transition-delay: 280ms; }
    .legacy-slide.is-active .legacy-motion-item:nth-child(6) { transition-delay: 340ms; }
    .legacy-slide.is-active .legacy-motion-li {
        transition-delay: var(--legacy-li-delay, 0ms);
    }
}

@keyframes legacyFloat {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(12px);
    }
}

@media (max-width: 992px) {
    .legacy-slides {
        grid-auto-columns: 92%;
    }

    .legacy-slide {
        grid-template-columns: 1fr;
    }

    .legacy-slide-media {
        min-height: 260px;
    }

    .legacy-glass {
        border-left: 0;
        border-top: 1px solid rgba(31, 122, 58, 0.15);
    }

    .legacy-slide::before {
        background-size: min(38%, 220px) auto;
        background-position: 88% 82%;
        opacity: 0.04;
    }
}

@media (max-width: 640px) {
    .legacy-slides {
        grid-auto-columns: 100%;
        gap: 12px;
    }

    .legacy-slide {
        height: auto;
    }

    .legacy-slide-media {
        min-height: 240px;
    }

    .legacy-glass {
        padding: 18px;
        gap: 10px;
    }

    .legacy-profile-body {
        max-width: none;
    }

    .legacy-slide::before {
        background-size: min(36%, 170px) auto;
        opacity: 0.035;
    }

    .legacy-nav {
        width: 38px;
        height: 38px;
        font-size: 1.3rem;
    }
}

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

    .legacy-shape,
    .legacy-slide,
    .legacy-motion-item,
    .legacy-motion-li,
    .legacy-slide-media img,
    .legacy-dot,
    .legacy-timeline-beam::after {
        animation: none !important;
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

/* Legacy modal */
body.modal-open {
    overflow: hidden;
}

.legacy-modal.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
    z-index: 10050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.legacy-modal.modal-overlay.show {
    display: flex;
}

.legacy-modal .modal-shell {
    width: min(1100px, 100%);
    max-width: 1100px;
    max-height: 92vh;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(17, 24, 39, 0.08);
    background: linear-gradient(180deg, #fffdf8 0%, #f8f6ef 100%);
    box-shadow: 0 24px 54px rgba(17, 24, 39, 0.26);
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    grid-template-rows: 1fr;
}

.legacy-modal-tagline {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.legacy-modal-close {
    top: 12px;
    right: 12px;
}

.legacy-modal-left {
    height: 100%;
}

.legacy-modal-right {
    position: relative;
}

.legacy-modal-media {
    height: 100%;
    position: relative;
    margin: 0;
    overflow: hidden;
    border-right: 1px solid rgba(17, 24, 39, 0.07);
}

.legacy-modal-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(560px 280px at 20% 10%, rgba(31, 122, 58, 0.13), rgba(31, 122, 58, 0)),
        linear-gradient(180deg, rgba(17, 24, 39, 0.05), rgba(17, 24, 39, 0.28));
    pointer-events: none;
}

.legacy-modal-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.modal-image {
    position: relative;
    height: 100%;
    min-height: 320px;
    overflow: hidden;
    background: #f3f4f6;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1);
    transition: transform 0.7s ease;
}

.modal-image:hover img {
    transform: scale(1.03);
}

.modal-image-fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 8px;
    text-align: center;
    padding: 20px;
    color: #334155;
    background: linear-gradient(145deg, #e5e7eb 0%, #f8fafc 100%);
    animation: fallbackFadeIn 240ms ease-out both;
}

.modal-image-fallback[hidden] {
    display: none !important;
}

.modal-image-fallback-icon {
    font-size: 1.35rem;
    line-height: 1;
    animation: fallbackIconFloat 2.4s ease-in-out infinite;
}

.modal-image-fallback-text {
    font-size: 0.9rem;
    font-weight: 700;
}

@keyframes fallbackFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fallbackIconFloat {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

.legacy-modal .legacy-modal-right.modal-content {
    width: auto;
    max-height: none;
    padding: 20px;
    overflow: auto;
    height: 100%;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    display: grid;
    gap: 10px;
    align-content: start;
}

.explore-modal__right {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    padding: 14px 14px 12px;
}

.explore-header {
    flex: 0 0 auto;
    position: sticky;
    top: 0;
    z-index: 5;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.9));
    padding: 12px 56px 12px 14px;
    margin: 0;
}

.explore-scroll {
    flex: 1 1 auto;
    overflow: auto;
    overflow-x: hidden;
    min-height: 0;
    min-width: 0;
    max-width: 100%;
    padding-right: 8px;
    display: grid;
    gap: 10px;
}

.legacy-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
}

.explore-scroll > .panel-block,
.explore-scroll > .legacy-sources-box {
    width: 100%;
    margin: 0;
}

.legacy-modal-right::before {
    content: "";
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 999px;
    top: -90px;
    right: -80px;
    background: radial-gradient(circle, rgba(31, 122, 58, 0.12), rgba(31, 122, 58, 0) 70%);
    pointer-events: none;
    z-index: 0;
}

.legacy-modal-right > * {
    position: relative;
    z-index: 1;
}

.panel-block {
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 14px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
}

.legacy-panel-hero h2 {
    margin: 0;
    line-height: 1.2;
}

.legacy-modal-section-title {
    margin: 0;
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.35;
    color: var(--green);
    font-weight: 800;
    position: relative;
    padding-left: 10px;
}

.legacy-modal-section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1px;
    bottom: 1px;
    width: 3px;
    border-radius: 99px;
    background: rgba(200, 31, 45, 0.8);
}

.legacy-modal-copy {
    margin-top: 8px;
    line-height: 1.62;
    color: var(--muted);
    font-size: 0.93rem;
}

.legacy-modal-chips {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.legacy-modal-chip {
    border: 1px solid rgba(31, 122, 58, 0.2);
    background: rgba(31, 122, 58, 0.08);
    color: var(--green);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 700;
    transition: box-shadow 0.24s ease, transform 0.24s ease;
}

.legacy-modal-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 0 3px rgba(31, 122, 58, 0.1);
}

.legacy-modal-facts {
    margin-top: 8px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.legacy-fact {
    border: 1px solid rgba(17, 24, 39, 0.09);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.9);
    padding: 7px 8px;
    display: grid;
    gap: 2px;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.legacy-fact:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(17, 24, 39, 0.08);
}

.legacy-fact-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    color: var(--green);
    font-weight: 700;
}

.legacy-fact-value {
    font-size: 0.78rem;
    color: #0f172a;
    font-weight: 700;
    line-height: 1.3;
}

.legacy-info-copy {
    margin-top: 8px;
    font-size: 0.93rem;
    line-height: 1.62;
    color: var(--muted);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
}

.legacy-portal-list {
    margin: 8px 0 0;
    padding-left: 17px;
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.58;
}

.legacy-modal-milestones {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.legacy-modal-milestones span {
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(31, 122, 58, 0.08);
    border: 1px solid rgba(31, 122, 58, 0.2);
    color: var(--green);
    font-size: 0.83rem;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.legacy-modal-milestones span:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 0 3px rgba(31, 122, 58, 0.12);
}

.legacy-sources-box {
    margin-top: auto;
    border-color: rgba(200, 31, 45, 0.2);
    background: linear-gradient(180deg, rgba(200, 31, 45, 0.035), #fff);
}

.legacy-sources-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.legacy-copy-btn {
    border: 1px solid rgba(200, 31, 45, 0.35);
    border-radius: 999px;
    background: rgba(200, 31, 45, 0.08);
    color: #8a1a24;
    padding: 5px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

.legacy-copy-btn:hover {
    background: rgba(200, 31, 45, 0.16);
}

.legacy-modal-sources {
    margin-top: 9px;
    display: grid;
    gap: 6px;
}

.legacy-modal-sources a {
    color: #1f2937;
    text-decoration: underline;
    text-decoration-color: rgba(31, 122, 58, 0.35);
    font-size: 0.92rem;
}

.explore-timeline {
    position: relative;
    list-style: none;
    margin: 10px 0 0;
    padding: 0 0 0 4px;
    display: grid;
    gap: 10px;
}

.explore-timeline::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: linear-gradient(180deg, rgba(31, 122, 58, 0.5), rgba(31, 122, 58, 0.12));
    transform-origin: top;
    transform: scaleY(0);
    transition: transform 650ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.legacy-timeline-card.is-visible .explore-timeline::before {
    transform: scaleY(1);
}

.explore-timeline-item {
    position: relative;
    margin-left: 0;
    padding: 8px 10px 8px 36px;
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.86);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.explore-timeline-item::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 15px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 0 3px rgba(200, 31, 45, 0.16);
}

.explore-timeline-item:hover {
    border-color: rgba(31, 122, 58, 0.36);
    box-shadow: 0 10px 20px rgba(17, 24, 39, 0.08);
    transform: translateY(-1px);
}

.explore-timeline-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--green);
    font-size: 0.82rem;
    font-weight: 700;
}

.explore-timeline-title {
    margin-top: 2px;
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.4;
}

.explore-timeline-desc {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.5;
}

.reveal-block {
    opacity: 0;
    transform: translateY(8px) scale(0.994);
    transition: opacity 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal-block.is-visible {
    opacity: 1;
    transform: none;
}

.legacy-modal-actions {
    display: flex;
    gap: 10px;
}

.legacy-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    border: 1px solid transparent;
}

.legacy-action-btn.primary {
    background: var(--green);
    color: #fff;
}

.legacy-action-btn.primary:hover {
    background: #166631;
    text-decoration: none;
}

.legacy-action-btn.outline {
    color: var(--green);
    border-color: rgba(31, 122, 58, 0.35);
    background: rgba(255, 255, 255, 0.9);
}

.legacy-action-btn.outline:hover {
    background: rgba(31, 122, 58, 0.1);
    text-decoration: none;
}

.legacy-modal-portal-list {
    margin: 8px 0 0;
    padding-left: 17px;
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.58;
}

.legacy-readmore-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 0;
    background: transparent;
    color: var(--green);
    font-size: 0.94rem;
    font-weight: 800;
    cursor: pointer;
    padding: 0;
}

.legacy-readmore-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(31, 122, 58, 0.25);
    background: rgba(31, 122, 58, 0.08);
}

.legacy-readmore-panel {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.32s ease;
}

.legacy-readmore.is-expanded .legacy-readmore-icon {
    transform: rotate(45deg);
}

.legacy-modal-updated {
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--muted);
}

@keyframes legacyPanelBlobFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

@media (max-width: 900px) {
    .legacy-modal .modal-shell {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .legacy-modal-media {
        height: clamp(240px, 34vh, 320px);
        border-right: 0;
        border-bottom: 1px solid rgba(17, 24, 39, 0.07);
    }

    .legacy-modal-media img {
        height: 100%;
    }

    .explore-modal__right {
        padding: 10px;
    }

    .explore-header {
        padding: 10px 52px 10px 12px;
    }
}

@media (max-width: 640px) {
    .legacy-modal-facts {
        grid-template-columns: 1fr;
    }

    .legacy-modal-actions {
        flex-wrap: wrap;
    }

    .legacy-action-btn {
        flex: 1 1 160px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .legacy-modal .modal-shell,
    .panel-block {
        backdrop-filter: none !important;
    }

    .legacy-modal-right::before,
    .reveal-block,
    .reveal-block.is-visible,
    .explore-timeline::before,
    .legacy-readmore-panel,
    .legacy-readmore-icon,
    .legacy-modal-chip,
    .legacy-fact,
    .legacy-modal-milestones span,
    .explore-timeline-item,
    .modal-image img,
    .modal-image-fallback,
    .modal-image-fallback-icon {
        animation: none !important;
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }

    .explore-timeline::before {
        transform: scaleY(1) !important;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .legacy-modal-right::before {
        animation: legacyPanelBlobFloat 7s ease-in-out infinite;
    }
}

/* Sabha Baktabya / Speeches & Statements */
.assembly-section .assembly-subtitle {
    margin-top: 10px;
    margin-bottom: 18px;
    max-width: 66ch;
    color: var(--muted);
}

.assembly-section:not(.sabha-section) .assembly-grid {
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 18px;
}

.speech-card {
    position: relative;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 10px;
    min-height: 100%;
}

.speech-card:focus-within {
    outline: 2px solid rgba(31, 122, 58, 0.35);
    outline-offset: 2px;
}

.speech-card__image {
    width: 100%;
    height: 230px;
    overflow: hidden;
    border-radius: 16px;
}

.speech-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.speech-card:hover .speech-card__image img,
.sabha-card:hover .speech-card__image img {
    transform: scale(1.05);
}

.speech-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.speech-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 4px 10px;
    background: var(--greenSoft);
    color: var(--green);
    border: 1px solid rgba(31, 122, 58, 0.25);
    font-size: 0.9rem;
    font-weight: 700;
}

.speech-type {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 4px 10px;
    border: 1px solid rgba(200, 31, 45, 0.25);
    background: rgba(200, 31, 45, 0.06);
    color: #8a1a24;
    font-size: 0.88rem;
    font-weight: 700;
}

.speech-topic {
    font-size: 0.88rem;
    color: var(--muted);
    font-weight: 600;
    letter-spacing: 0.01em;
}

.speech-title {
    font-size: 1.15rem;
    line-height: 1.35;
    color: var(--text);
    margin: 2px 0 0;
}

.speech-one-line {
    margin-top: 6px;
    color: var(--muted);
    font-size: 1rem;
}

.speech-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}

.speech-chip {
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 0.86rem;
    border: 1px solid rgba(31, 122, 58, 0.2);
    background: rgba(31, 122, 58, 0.08);
    color: var(--green);
    font-weight: 700;
}

.speech-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 4px;
}

.speech-source-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    padding: 7px 12px;
    border: 1px solid rgba(31, 122, 58, 0.35);
    color: var(--green);
    background: #fff;
    font-weight: 700;
    font-size: 0.95rem;
}

.speech-source-btn:hover {
    background: var(--greenSoft);
    text-decoration: none;
}

.speech-details-btn {
    background: transparent;
    border: 0;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}

.speech-details {
    margin: 4px 0 0;
    padding-left: 18px;
    color: var(--muted);
    display: none;
    gap: 6px;
}

.speech-details li {
    margin: 0;
    line-height: 1.5;
}

.speech-card.show-details .speech-details {
    display: grid;
}

body[data-lang="en"] .assembly-section .speech-one-line,
body[data-lang="en"] .assembly-section .speech-details {
    line-height: 1.75;
}

body[data-lang="en"] .assembly-section .speech-title {
    margin-top: 6px;
}

@media (prefers-reduced-motion: no-preference) {
    .assembly-section .speech-card {
        opacity: 0;
        transform: translateY(10px);
        transition: opacity 0.55s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
        will-change: opacity, transform;
    }

    .assembly-section .speech-card.is-visible {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .assembly-section .speech-card {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

.work-card,
.assembly-item,
.media-item {
    padding: 22px;
}

.work-card {
    min-height: 290px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 1px solid var(--border);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    overflow: hidden;
    cursor: pointer;
}

.work-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 34px rgba(17, 24, 39, 0.12);
    border-color: rgba(31, 122, 58, 0.48);
}

.work-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.work-card-tag,
.work-meta-pill,
.work-sources-badge,
.assembly-date,
.media-type {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 0.95rem;
    padding: 4px 10px;
    border: 1px solid rgba(31, 122, 58, 0.25);
    background: var(--greenSoft);
    color: var(--green);
    font-weight: 700;
}

.work-card h3,
.assembly-item h3,
.media-item h4 {
    margin-top: 10px;
}

.work-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: auto;
}

.work-card-summary {
    line-height: 1.6;
}

.work-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
}

.work-metric {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 9px;
    font-size: 0.95rem;
    color: var(--muted);
    background: #fff;
    min-height: 64px;
    display: grid;
    align-content: center;
}

.work-metric strong {
    color: var(--text);
    display: block;
    font-size: 1rem;
    line-height: 1.2;
}

.work-metric span {
    display: block;
    margin-top: 2px;
    line-height: 1.2;
}

.work-metric-more {
    color: var(--green);
    background: var(--greenSoft);
    font-weight: 700;
    text-align: center;
}

.work-pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.work-page-btn {
    border: 1px solid rgba(31, 122, 58, 0.4);
    color: var(--green);
    background: #fff;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
}

.work-page-btn:hover:not(:disabled) {
    background: var(--greenSoft);
}

.work-page-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.work-page-indicator {
    color: var(--text);
    font-weight: 700;
    font-size: 1rem;
}

.clamp-2 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

.clamp-3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
}

.facts-accordion {
    display: grid;
    gap: 12px;
}

.fact-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.fact-header {
    padding: 18px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.fact-header-label {
    color: var(--green);
    font-weight: 700;
    margin-bottom: 4px;
}

.fact-body {
    display: none;
    padding: 0 20px 20px;
}

.fact-item.active .fact-body {
    display: block;
}

.fact-toggle {
    color: var(--red);
}

.media-thumb-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.media-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-video-pill {
    position: absolute;
    right: 8px;
    bottom: 8px;
    background: rgba(17, 24, 39, 0.78);
    color: #fff;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 0.95rem;
    font-weight: 700;
}

.downloads-list {
    display: grid;
    gap: 12px;
}

.download-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 20px 22px;
}

.download-btn,
.submit-btn {
    border: 0;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 1rem;
    background: var(--green);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.download-btn:hover,
.submit-btn:hover {
    background: #166631;
}

.volunteer-form {
    padding: 22px;
    display: grid;
    gap: 12px;
}

.volunteer-form input,
.volunteer-form textarea {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 11px;
    font: inherit;
    color: var(--text);
    font-size: 1rem;
}

.form-checkbox {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.form-checkbox label {
    color: var(--muted);
}

.honeypot-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
}

.form-error,
.form-success {
    border-radius: 8px;
    padding: 9px 11px;
}

.form-error {
    background: var(--redSoft);
    color: var(--red);
}

.form-success {
    background: var(--greenSoft);
    color: var(--green);
}

.social-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 0;
}

.social-link {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--greenSoft);
    color: var(--green);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.social-link svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.social-link:hover {
    background: var(--redSoft);
    color: var(--red);
    text-decoration: none;
}

.social-link::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    background: var(--text);
    color: #fff;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.82rem;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    transition: opacity 0.18s ease;
}

.social-link:hover::after,
.social-link:focus-visible::after {
    opacity: 1;
}

.footer {
    border-top: 1px solid var(--border);
    background: #fff;
    padding: 22px 0;
}

.footer p {
    margin-top: 0;
    color: var(--muted);
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.45);
    backdrop-filter: blur(6px);
    z-index: 2000;
}

.modal.show {
    display: grid;
    place-items: center;
}

.modal-content {
    width: min(820px, 92vw);
    max-height: 88vh;
    overflow: auto;
    background: #fff;
    border-radius: 18px;
    padding: 0;
    position: relative;
    box-shadow: 0 20px 44px rgba(17, 24, 39, 0.24);
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    border: 1px solid rgba(31, 122, 58, 0.48);
    background: #fff;
    color: var(--green);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    cursor: pointer;
    z-index: 2;
}

.modal-close:hover {
    color: var(--red);
    border-color: rgba(200, 31, 45, 0.45);
    background: var(--redSoft);
}

#modal-body {
    padding: 28px;
}

.detail-modal-title {
    font-size: clamp(1.4rem, 2.3vw, 1.75rem);
    line-height: 1.28;
    color: var(--text);
    margin-right: 46px;
}

.detail-modal-accent {
    width: 56px;
    height: 2px;
    background: var(--red);
    margin-top: 10px;
}

.detail-modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.detail-modal-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(31, 122, 58, 0.25);
    background: var(--greenSoft);
    color: var(--green);
    padding: 4px 10px;
    font-size: 0.95rem;
    font-weight: 700;
}

.detail-modal-body {
    margin-top: 16px;
    display: grid;
    gap: 16px;
}

.detail-modal-description {
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--muted);
    margin-top: 0;
}

.detail-modal-body h3 {
    font-size: 1.08rem;
    margin-bottom: 8px;
}

.detail-modal-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.detail-modal-metric {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px;
    background: #fff;
}

.detail-modal-metric strong {
    display: block;
    color: var(--text);
    font-size: 1rem;
    line-height: 1.15;
}

.detail-modal-metric span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.95rem;
}

.detail-modal-sources {
    list-style: none;
    display: grid;
    gap: 6px;
    padding: 0;
    margin: 0;
}

.detail-modal-sources a {
    color: var(--green);
    text-decoration: none;
}

.detail-modal-sources a:hover {
    color: var(--red);
    text-decoration: underline;
}

.detail-modal-footer {
    margin-top: 18px;
    border-top: 1px solid var(--border);
    padding-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.detail-modal-note {
    color: var(--muted);
    font-size: 0.95rem;
}

.detail-modal-cta {
    display: inline-flex;
    align-items: center;
    border-radius: 10px;
    background: var(--green);
    color: #fff;
    padding: 9px 14px;
    font-size: 1rem;
    font-weight: 700;
}

.detail-modal-cta:hover {
    background: #166631;
    text-decoration: none;
}

.hidden {
    display: none !important;
}

.back-to-top {
    position: fixed;
    right: 14px;
    bottom: 14px;
    border: 0;
    background: var(--green);
    color: #fff;
    border-radius: 999px;
    padding: 10px 12px;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-to-top.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.section-reveal {
    opacity: 0;
    transform: translateY(20px);
}

.section-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

@media (max-width: 992px) {
    .work-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
}

@media (max-width: 860px) {
    .menu-toggle {
        display: inline-block;
    }

    .nav-menu {
        position: absolute;
        left: 0;
        right: 0;
        top: calc(100% + 6px);
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid var(--border);
        border-radius: 14px;
        box-shadow: var(--shadow);
        padding: 8px;
        display: grid;
        gap: 4px;
        max-height: 0;
        opacity: 0;
        pointer-events: none;
        overflow: hidden;
        transition: max-height 0.25s ease, opacity 0.25s ease;
    }

    .nav-menu.active {
        max-height: 76vh;
        opacity: 1;
        pointer-events: auto;
    }

    .nav-link,
    .nav-more-toggle {
        display: block;
        width: 100%;
        text-align: left;
        border-radius: 10px;
    }

    .nav-more {
        width: 100%;
    }

    .nav-more-menu {
        position: static;
        border: 0;
        box-shadow: none;
        background: transparent;
        padding: 4px 0 0 8px;
        min-width: 0;
    }

    .brand {
        gap: 7px;
    }

    .brand__name {
        font-size: 0.95rem;
    }

    .brand__tag {
        font-size: 0.62rem;
        padding: 3px 6px;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 16px;
    }

    .section {
        padding: 52px 0;
    }

    .nav.nav-pill {
        min-height: 54px;
    }

    .brand__mark {
        width: 22px;
        height: 22px;
        font-size: 0.76rem;
    }

    .brand__tag {
        letter-spacing: 0.06em;
    }

    .timeline {
        grid-template-columns: 1fr;
        row-gap: 16px;
        margin-left: 14px;
        padding-left: 16px;
        border-left: 2px solid rgba(31, 122, 58, 0.32);
    }

    .timeline::before {
        display: none;
    }

    .timeline-item::before {
        left: -28px !important;
        right: auto !important;
        top: 24px;
    }

    .timeline-item::after {
        left: -21px !important;
        right: auto !important;
        top: 31px;
    }

    .timeline-section .tl-dot {
        left: -21px !important;
        right: auto !important;
        top: 31px;
    }

    .timeline-item {
        grid-column: 1 !important;
    }

    .work-controls {
        grid-template-columns: 1fr;
    }

    .work-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .detail-modal-metrics {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .nav-pill,
    .nav.nav-pill {
        padding: 0.55rem 0.75rem !important;
        border-radius: 18px !important;
        display: flex;
        align-items: center;
        flex-wrap: nowrap;
    }

    .brand {
        gap: 0.55rem;
        min-width: 0;
    }

    .brand-name,
    .brand__name {
        font-size: 1.05rem;
    }

    .nav-toggle,
    .menu-toggle {
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
    }

    .language-switcher {
        flex: 0 0 auto;
        white-space: nowrap;
    }
}

@media (max-width: 520px) {
    .brand {
        gap: 6px;
    }

    .brand::after {
        left: 32px;
    }

    .brand__name {
        font-size: 0.9rem;
    }

    .brand__tag {
        font-size: 0.58rem;
        padding: 3px 5px;
    }
}

/* Stats Summary Section */
.stats-summary-section {
    background: linear-gradient(180deg, rgba(252, 254, 252, 0.96) 0%, rgba(248, 252, 248, 0.98) 100%);
}

.stats-summary-section .stats-summary-title {
    margin-bottom: 16px;
}

.stats-summary-section .stats-section {
    margin-top: 0;
}

.stats-summary-section .portal-why-caption {
    margin-top: 18px;
    padding: 12px 14px 12px 16px;
    border-left: 3px solid rgba(31, 122, 58, 0.42);
    border-radius: 0 12px 12px 0;
    background: linear-gradient(90deg, rgba(31, 122, 58, 0.08), rgba(31, 122, 58, 0.02) 56%, rgba(31, 122, 58, 0));
}

.stats-summary-section .portal-why-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.stats-summary-section .portal-why-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(31, 122, 58, 0.28);
    background: rgba(255, 255, 255, 0.88);
    color: #14532d;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.2;
}

.stats-summary-section .portal-why-link {
    font-size: 0.84rem;
    font-weight: 700;
    color: #14532d;
    text-decoration: underline;
    text-decoration-color: rgba(31, 122, 58, 0.34);
    text-underline-offset: 2px;
}

.stats-summary-section .portal-why-link:hover {
    color: #0f172a;
    text-decoration-color: rgba(200, 31, 45, 0.48);
}

.stats-summary-section .portal-why-caption p {
    margin-top: 0;
    font-size: 0.96rem;
    line-height: 1.64;
    color: #334155;
}

@media (max-width: 768px) {
    .stats-summary-section .portal-why-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .stats-summary-section .portal-why-caption {
        margin-top: 16px;
        padding: 11px 12px 11px 14px;
    }
}




.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    height: var(--nav-offset, var(--header-h));
    background: transparent !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 0;
    box-shadow: none;
    transform: translateY(0);
    opacity: 1;
    will-change: transform;
    transition: transform 220ms ease, opacity 220ms ease, background 0.25s ease, box-shadow 0.25s ease;
}

.site-header.scrolled {
    background: transparent;
    box-shadow: none;
}

.site-header.nav-hidden {
    transform: translateY(calc(-1 * (var(--nav-offset, var(--header-h)) + 16px)));
    opacity: 0.98;
    pointer-events: none;
}

.site-header.is-hidden {
    transform: translateY(-120%);
}

/* Hero bilingual toggle */
.hero-lang-switch {
    display: inline-flex;
    gap: 4px;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    width: fit-content;
    margin-bottom: 8px;
}

.hero-lang-btn {
    border: 0;
    background: transparent;
    color: var(--muted);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
}

.hero-lang-btn.active {
    background: var(--green);
    color: #fff;
}

.hero-lang-btn:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
}

/* hero blend override patch */
.hero.hero--blend {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 88vh;
    display: flex;
    align-items: center;
    padding: clamp(5.5rem, 8vw, 7.5rem) 0 clamp(3rem, 5vw, 4.5rem);
    background: #ffffff;
    color: #0f172a;
}

.hero.hero--blend::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background: linear-gradient(96deg, rgba(26, 132, 79, 0.08) 0%, rgba(255, 255, 255, 0.03) 50%, rgba(198, 31, 45, 0.08) 100%);
}

.hero.hero--blend::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.04;
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.08) 1px, transparent 1px);
    background-size: 28px 28px;
}

.hero__bg {
    position: absolute;
    inset: 0;
    z-index: -3;
    overflow: hidden;
}

.hero__bg::before,
.hero__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero__bg::before {
    background:
        radial-gradient(56% 54% at calc(100% - 8vw) 50%, rgba(176, 18, 27, 0.08) 0%, rgba(20, 132, 77, 0.06) 36%, rgba(255, 255, 255, 0) 72%),
        radial-gradient(94% 86% at calc(100% - 6vw) 50%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.84) 78%, #ffffff 100%),
        linear-gradient(90deg, rgba(255, 255, 255, 0) 56%, rgba(255, 255, 255, 0.66) 76%, #ffffff 100%);
    z-index: 4;
}

.hero__bg::after {
    background: linear-gradient(115deg, rgba(194, 24, 39, 0.06) 8%, rgba(255, 255, 255, 0.02) 46%, rgba(24, 125, 69, 0.07) 92%);
    z-index: 5;
}

.hero__niwas,
.hero__flag,
.hero__tree {
    position: absolute;
    max-width: none;
    pointer-events: none;
}

.hero__niwas {
    right: 6vw;
    top: 50%;
    transform: translateY(-50%);
    width: clamp(320px, 40vw, 620px);
    max-width: 88vw;
    height: auto;
    object-fit: contain;
    object-position: right center;
    z-index: 1;
    opacity: 0;
    -webkit-mask-image: radial-gradient(124% 98% at 64% 50%, #000000 56%, rgba(0, 0, 0, 0.88) 70%, rgba(0, 0, 0, 0.52) 82%, transparent 100%);
    mask-image: radial-gradient(124% 98% at 64% 50%, #000000 56%, rgba(0, 0, 0, 0.88) 70%, rgba(0, 0, 0, 0.52) 82%, transparent 100%);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    filter: drop-shadow(0 14px 30px rgba(176, 18, 27, 0.09)) drop-shadow(0 12px 26px rgba(20, 132, 77, 0.09));
    transform-origin: center center;
    animation:
        heroNiwasFadeIn 760ms ease-out 120ms forwards,
        heroNiwasFloat 6.8s ease-in-out 920ms infinite;
}

@supports not ((-webkit-mask-image: radial-gradient(circle, #000 60%, transparent 100%)) or (mask-image: radial-gradient(circle, #000 60%, transparent 100%))) {
    .hero__bg::before {
        background:
            radial-gradient(58% 56% at calc(100% - 8vw) 50%, rgba(176, 18, 27, 0.07) 0%, rgba(20, 132, 77, 0.05) 34%, rgba(255, 255, 255, 0) 70%),
            radial-gradient(98% 88% at calc(100% - 6vw) 50%, rgba(255, 255, 255, 0.08) 44%, rgba(255, 255, 255, 0.9) 82%, #ffffff 100%),
            linear-gradient(90deg, rgba(255, 255, 255, 0.06) 52%, rgba(255, 255, 255, 0.78) 78%, #ffffff 100%);
    }

    .hero__niwas {
        opacity: 0.56;
        filter: drop-shadow(0 12px 24px rgba(15, 23, 42, 0.08));
    }
}

.hero__flag {
    right: -6%;
    top: 6%;
    width: min(60vw, 760px);
    opacity: 0.08;
    transform: rotate(-8deg);
    z-index: 2;
    pointer-events: none;
    user-select: none;
}

.hero__tree {
    left: max(1.2rem, 2.5vw);
    bottom: max(1.2rem, 2.5vw);
    width: min(36vw, 320px);
    opacity: 0.1;
    z-index: 3;
    pointer-events: none;
    user-select: none;
    mix-blend-mode: multiply;
}

@supports not (mix-blend-mode: multiply) {
    .hero__tree {
        opacity: 0.08;
    }
}

.hero__fog {
    position: absolute;
    inset: auto 0 0;
    height: clamp(130px, 22vw, 260px);
    z-index: -2;
    pointer-events: none;
    background: linear-gradient(0deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.32) 46%, rgba(255, 255, 255, 0) 100%);
}

.hero__inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    align-items: center;
    gap: clamp(1.4rem, 4vw, 4rem);
}

.hero__content {
    max-width: 64ch;
    color: #0f172a;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
    opacity: 0;
    transform: translateY(10px);
    animation: heroContentFadeUp 620ms ease-out 60ms forwards;
}

.hero__title {
    position: relative;
    margin: 0;
    font-size: clamp(42px, 5vw, 78px);
    line-height: 1.02;
    letter-spacing: clamp(-1.2px, -0.06vw, -0.4px);
    font-weight: 800;
    color: #b0121b;
}

.hero__title::after {
    content: "";
    display: block;
    width: min(160px, 42vw);
    height: 4px;
    margin-top: 0.7rem;
    border-radius: 999px;
    background:
        linear-gradient(90deg, rgba(20, 132, 77, 0.95), rgba(20, 132, 77, 0.7)) 0 0 / 100% 2px no-repeat,
        linear-gradient(90deg, rgba(176, 18, 27, 0.9), rgba(176, 18, 27, 0.6)) 0 100% / 82% 1px no-repeat;
    transform-origin: left center;
    transform: scaleX(0);
    opacity: 0.5;
    animation: heroHeadlineAccentIn 680ms ease-out 120ms forwards;
}

.hero__rule {
    width: min(220px, 54vw);
    height: 6px;
    margin: 1rem 0 1rem;
    border-radius: 999px;
    background:
        linear-gradient(90deg, rgba(32, 138, 78, 0.95) 0%, rgba(32, 138, 78, 0.95) 76%, rgba(32, 138, 78, 0) 100%),
        linear-gradient(90deg, rgba(205, 40, 55, 0.92) 0%, rgba(205, 40, 55, 0.92) 58%, rgba(205, 40, 55, 0) 100%);
    background-size: 100% 4px, 68% 1px;
    background-position: 0 0, 0 100%;
    background-repeat: no-repeat;
}

.hero__sub {
    margin: 0;
    font-size: clamp(1.02rem, 1.65vw, 1.36rem);
    line-height: 1.55;
    max-width: 640px;
    color: rgba(71, 85, 105, 0.96);
}

.hero__tag {
    margin: 0.75rem 0 0;
    font-size: clamp(0.78rem, 1.05vw, 0.94rem);
    line-height: 1.45;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(15, 23, 42, 0.62);
}

.hero__actions {
    margin-top: 1.2rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

@media (max-width: 980px) {
    .hero.hero--blend {
        min-height: auto;
        padding-top: clamp(5rem, 12vw, 6rem);
    }

    .hero__inner {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .hero__flag {
        width: clamp(250px, 58vw, 500px);
        right: -16%;
    }

    .hero__tree {
        width: clamp(220px, 48vw, 420px);
        left: -16%;
    }

    .hero__niwas {
        right: 50%;
        top: auto;
        bottom: 0;
        transform: translateX(50%) scale(0.98);
        width: min(78vw, 520px);
        opacity: 0;
        animation:
            heroNiwasFadeInMobile 760ms ease-out 120ms forwards,
            heroNiwasFloatMobile 6.8s ease-in-out 920ms infinite;
    }
}

@media (max-width: 640px) {
    .hero.hero--blend {
        padding: 4.8rem 0 2.8rem;
    }

    .hero__title {
        font-size: clamp(1.7rem, 8.4vw, 2.35rem);
    }

    .hero__title::after {
        margin-left: auto;
        margin-right: auto;
    }

    .hero__rule {
        width: min(180px, 62vw);
    }

    .hero__actions {
        gap: 0.6rem;
    }

    .hero__content {
        text-align: center;
    }

    .hero__niwas {
        width: min(88vw, 460px);
        opacity: 0.26;
    }
}

@keyframes heroHeadlineAccentIn {
    from {
        transform: scaleX(0);
        opacity: 0.5;
    }
    to {
        transform: scaleX(1);
        opacity: 1;
    }
}

@keyframes heroContentFadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroNiwasFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50%) scale(0.98);
    }
    to {
        opacity: 0.62;
        transform: translateY(-50%) scale(1);
    }
}

@keyframes heroNiwasFloat {
    0%,
    100% {
        transform: translateY(-50%) scale(1);
    }
    50% {
        transform: translateY(calc(-50% - 3px)) scale(1);
    }
}

@keyframes heroNiwasFadeInMobile {
    from {
        opacity: 0;
        transform: translateX(50%) scale(0.98);
    }
    to {
        opacity: 0.34;
        transform: translateX(50%) scale(1);
    }
}

@keyframes heroNiwasFloatMobile {
    0%,
    100% {
        transform: translateX(50%) scale(1);
    }
    50% {
        transform: translateX(50%) translateY(-3px) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero__title::after {
        animation: none;
        transform: scaleX(1);
        opacity: 1;
    }

    .hero__content {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .hero__niwas {
        animation: none;
        opacity: 0.62;
        transform: translateY(-50%) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) and (max-width: 980px) {
    .hero__niwas {
        opacity: 0.34;
        transform: translateX(50%) scale(1);
    }
}

/* legacy timeline redesign */
.legacy-timeline-section {
    --nc-red: #b0121b;
    --nc-green: #17854d;
    --legacy-ink: #0f172a;
    --legacy-muted: #475569;
    --legacy-border: #e2e8f0;
    --legacy-wash: linear-gradient(145deg, rgba(176, 18, 27, 0.05), rgba(255, 255, 255, 0.96) 36%, rgba(23, 133, 77, 0.06) 100%);
    background: #fff;
    position: relative;
}

.legacy-timeline-container {
    max-width: 1160px;
}

.legacy-timeline-head {
    text-align: center;
    margin-bottom: clamp(1.6rem, 3vw, 2.8rem);
}

.legacy-chip {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(176, 18, 27, 0.24);
    border-radius: 999px;
    padding: 0.28rem 0.72rem;
    color: var(--nc-red);
    background: rgba(176, 18, 27, 0.04);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.legacy-timeline-head h2 {
    margin: 0.7rem 0 0.5rem;
    color: var(--legacy-ink);
    font-size: clamp(1.8rem, 3.1vw, 2.8rem);
}

.legacy-timeline-head p {
    margin: 0 auto;
    max-width: 68ch;
    color: var(--legacy-muted);
}

.legacy-exhibit {
    position: relative;
    border: 1px solid var(--legacy-border);
    border-radius: 28px;
    padding: clamp(1rem, 3vw, 2.1rem);
    background: var(--legacy-wash);
    overflow: clip;
}

.legacy-collage {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.06;
    background:
        linear-gradient(120deg, rgba(176, 18, 27, 0.5), rgba(176, 18, 27, 0) 38%),
        linear-gradient(300deg, rgba(23, 133, 77, 0.46), rgba(23, 133, 77, 0) 40%);
}

.legacy-exhibit-main {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(260px, 0.43fr) minmax(0, 0.57fr);
    gap: clamp(1rem, 2.2vw, 1.8rem);
    align-items: stretch;
}

.legacy-portrait-wrap {
    margin: 0;
    position: relative;
    border-radius: 22px;
    padding: 0.7rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 20px 36px rgba(15, 23, 42, 0.12);
    overflow: hidden;
}

.legacy-portrait-glow {
    position: absolute;
    inset: 10% 12%;
    border-radius: 999px;
    background: radial-gradient(circle at center, rgba(176, 18, 27, 0.1), rgba(23, 133, 77, 0.09) 44%, rgba(255, 255, 255, 0) 70%);
    pointer-events: none;
}

.legacy-portrait-img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center top;
    border-radius: 16px;
    background: linear-gradient(180deg, #f8fafc, #eef2f7);
    transform: translateY(0);
    transition: opacity 360ms ease, transform 360ms ease;
}

.legacy-portrait-cap {
    margin-top: 0.55rem;
    color: #64748b;
    font-size: 0.78rem;
    text-align: center;
}

.legacy-info-panel {
    border-radius: 22px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.9);
    padding: clamp(1rem, 2vw, 1.35rem);
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
    min-height: 100%;
    transition: opacity 280ms ease, transform 280ms ease;
}

.legacy-info-panel.is-updating,
.legacy-portrait-wrap.is-updating {
    opacity: 0.68;
    transform: translateY(6px);
}

.legacy-name {
    margin: 0;
    color: var(--legacy-ink);
    font-size: clamp(1.32rem, 2.3vw, 1.9rem);
    line-height: 1.15;
}

.legacy-museum-label {
    margin: 0;
    width: fit-content;
    max-width: 100%;
    border: 1px solid rgba(23, 133, 77, 0.28);
    background: rgba(23, 133, 77, 0.07);
    color: #0f5131;
    border-radius: 999px;
    padding: 0.28rem 0.72rem;
    font-size: 0.84rem;
    font-weight: 700;
}

.legacy-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.9rem;
}

.legacy-info-block h4 {
    margin: 0 0 0.32rem;
    color: var(--legacy-ink);
    font-size: 0.86rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    position: relative;
}

.legacy-info-block h4::after {
    content: "";
    display: block;
    margin-top: 0.34rem;
    width: 56px;
    height: 2px;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--nc-red), rgba(23, 133, 77, 0.72));
}

.legacy-info-block p {
    margin: 0;
    color: var(--legacy-muted);
}

.legacy-impact-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.5rem;
}

.legacy-impact-list li {
    position: relative;
    margin: 0;
    padding-left: 1rem;
    color: #1e293b;
}

.legacy-impact-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.58em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--nc-green);
    box-shadow: 0 0 0 3px rgba(23, 133, 77, 0.14);
}

.legacy-info-actions {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.62rem;
}

.legacy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    padding: 0.64rem 1rem;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.2;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.legacy-btn-primary {
    background: var(--nc-red);
    color: #fff;
    border: 1px solid var(--nc-red);
}

.legacy-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(176, 18, 27, 0.2);
}

.legacy-btn-secondary {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.18);
    color: #0f172a;
}

.legacy-btn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.1);
}

.legacy-btn:focus-visible,
.legacy-node-btn:focus-visible {
    outline: 2px solid rgba(23, 133, 77, 0.82);
    outline-offset: 2px;
}

.legacy-timeline-nav {
    position: relative;
    margin-top: clamp(1rem, 2.2vw, 1.45rem);
    padding-top: 1rem;
}

.legacy-timeline-track {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.35rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 116, 139, 0.45) transparent;
}

.legacy-timeline-track::-webkit-scrollbar {
    height: 6px;
}

.legacy-timeline-track::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.45);
    border-radius: 999px;
}

.legacy-timeline-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 2px;
    width: var(--legacy-fill, 0%);
    background: linear-gradient(90deg, var(--nc-red), var(--nc-green));
    transition: width 360ms ease;
}

.legacy-node-btn {
    flex: 0 0 auto;
    min-width: 150px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 12px;
    background: #fff;
    color: #0f172a;
    padding: 0.56rem 0.66rem;
    text-align: left;
    display: grid;
    gap: 0.2rem;
    transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
    scroll-snap-align: center;
}

.legacy-node-btn .legacy-node-year {
    color: var(--legacy-muted);
    font-size: 0.76rem;
    font-weight: 700;
}

.legacy-node-btn .legacy-node-name {
    font-size: 0.92rem;
    font-weight: 700;
}

.legacy-node-btn.is-active {
    border-color: rgba(23, 133, 77, 0.62);
    background: linear-gradient(180deg, #ffffff, rgba(23, 133, 77, 0.07));
    transform: translateY(-1px);
}

.legacy-node-btn.is-active .legacy-node-year {
    color: var(--nc-red);
}

.legacy-quote {
    position: relative;
    margin: 1rem 0 0;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.92);
    padding: 1rem 1rem 0.9rem 1.1rem;
}

.legacy-quote-mark {
    position: absolute;
    left: 0.8rem;
    top: 0.2rem;
    color: rgba(176, 18, 27, 0.2);
    font-size: 2.3rem;
    line-height: 1;
}

.legacy-quote p {
    margin: 0;
    padding-left: 1rem;
    color: #1e293b;
    font-size: clamp(1rem, 1.2vw, 1.1rem);
}

.legacy-quote footer {
    margin-top: 0.5rem;
    padding-left: 1rem;
    color: #64748b;
    font-size: 0.86rem;
    font-weight: 700;
}

@media (max-width: 980px) {
    .legacy-exhibit-main {
        grid-template-columns: 1fr;
    }

    .legacy-portrait-wrap {
        max-width: 420px;
        width: 100%;
        margin: 0 auto;
    }

    .legacy-node-btn {
        min-width: 176px;
    }
}

@media (max-width: 640px) {
    .legacy-info-actions {
        grid-template-columns: 1fr;
        display: grid;
    }

    .legacy-btn {
        width: 100%;
    }

    .legacy-timeline-track {
        scroll-snap-type: x mandatory;
    }
}

@media (prefers-reduced-motion: reduce) {
    .legacy-portrait-img,
    .legacy-info-panel,
    .legacy-node-btn,
    .legacy-timeline-fill {
        transition: none !important;
        animation: none !important;
    }
}



/* Shekhar Koirala should remain in color across timeline avatars and detail portraits. */
img[data-figure-id="shekhar"],
.hero-archive__thread-btn:hover img[data-figure-id="shekhar"],
.hero-archive__thread-btn.is-active img[data-figure-id="shekhar"] {
    filter: none !important;
    -webkit-filter: none !important;
}

.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

#timeline .timeline-container {
    max-width: 1180px;
}

.timeline-focus-bar {
    position: sticky;
    top: calc(var(--header-h) + 10px);
    z-index: 20;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.96));
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    padding: 0.85rem;
    display: grid;
    gap: 0.72rem;
    margin-bottom: 0.8rem;
}

.timeline-focus-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}

.timeline-person-tab,
.timeline-category-chip,
.timeline-focus-btn {
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 999px;
    background: #fff;
    color: #0f172a;
    padding: 0.38rem 0.72rem;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.timeline-person-tab.is-active {
    border-color: rgba(200, 31, 45, 0.58);
    background: rgba(200, 31, 45, 0.1);
}

.timeline-category-chip.is-active {
    border-color: rgba(31, 122, 58, 0.56);
    background: rgba(31, 122, 58, 0.12);
}

.timeline-person-tab:hover,
.timeline-category-chip:hover,
.timeline-focus-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.timeline-tools-row {
    gap: 0.45rem 0.58rem;
}

.timeline-search-input {
    flex: 1 1 230px;
    min-width: 180px;
    border: 1px solid rgba(15, 23, 42, 0.16);
    border-radius: 12px;
    padding: 0.52rem 0.66rem;
    background: #fff;
    color: #0f172a;
}

.timeline-results {
    margin-top: 0;
    margin-bottom: 0.84rem;
    color: #475569;
    font-size: 0.9rem;
}

.timeline-archive-feed {
    --timeline-spine: rgba(31, 122, 58, 0.33);
    list-style: none;
    margin: 0;
    padding: 0.4rem 0 0;
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 3rem;
    row-gap: 1.12rem;
}

.timeline-archive-feed::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    transform: translateX(-50%);
    background: linear-gradient(180deg, rgba(31, 122, 58, 0), var(--timeline-spine) 12%, var(--timeline-spine) 88%, rgba(31, 122, 58, 0));
}

.timeline-archive-item {
    position: relative;
}

.timeline-archive-item.is-left {
    grid-column: 1;
}

.timeline-archive-item.is-right {
    grid-column: 2;
}

.timeline-archive-card {
    border: 1px solid rgba(15, 23, 42, 0.13);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    padding: 0.9rem 0.95rem 0.82rem;
    position: relative;
    display: grid;
    gap: 0.46rem;
    cursor: pointer;
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease, opacity 340ms ease;
    opacity: 0;
    transform: translateY(8px);
    animation: timelineCardIn 420ms ease forwards;
}

.timeline-archive-card:hover {
    transform: translateY(-2px);
    border-color: rgba(200, 31, 45, 0.34);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.timeline-archive-card:focus-visible {
    outline: 3px solid rgba(31, 122, 58, 0.45);
    outline-offset: 3px;
}

.timeline-archive-node {
    position: absolute;
    top: 1.22rem;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 2px solid rgba(31, 122, 58, 0.58);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(31, 122, 58, 0.08);
}

.timeline-archive-item.is-left .timeline-archive-node {
    right: -2.07rem;
}

.timeline-archive-item.is-right .timeline-archive-node {
    left: -2.07rem;
}

.timeline-archive-date-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.08rem;
    background: linear-gradient(180deg, rgba(31, 122, 58, 0.12), rgba(200, 31, 45, 0.08));
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 11px;
    padding: 0.42rem 0.56rem;
    width: fit-content;
}

.timeline-archive-bs {
    color: #0f172a;
    font-size: 0.9rem;
    font-weight: 800;
}

.timeline-archive-ad {
    color: #64748b;
    font-size: 0.76rem;
    line-height: 1.2;
}

.timeline-archive-card h4 {
    margin: 0.12rem 0 0;
    font-size: 1.03rem;
}

.timeline-archive-summary {
    margin-top: 0;
    color: #475569;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.timeline-archive-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.54rem;
}

.timeline-archive-cat {
    font-size: 0.78rem;
    font-weight: 700;
    color: #0f172a;
    border: 1px solid rgba(15, 23, 42, 0.16);
    border-radius: 999px;
    padding: 0.16rem 0.52rem;
    background: #f8fafc;
}

.timeline-archive-importance {
    color: #b45309;
    letter-spacing: 0.03em;
    font-size: 0.82rem;
}

.timeline-archive-sources {
    margin-top: 0.12rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.34rem;
    color: #64748b;
    font-size: 0.78rem;
}

.timeline-archive-sources strong {
    color: #334155;
}

.timeline-source-chip {
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 999px;
    padding: 0.16rem 0.48rem;
    background: #fff;
    text-decoration: none;
    color: #334155;
}

.timeline-source-primary {
    border-color: rgba(31, 122, 58, 0.44);
    background: rgba(31, 122, 58, 0.08);
}

.timeline-source-news {
    border-color: rgba(200, 31, 45, 0.34);
    background: rgba(200, 31, 45, 0.08);
}

.timeline-source-wiki {
    border-color: rgba(59, 130, 246, 0.36);
    background: rgba(59, 130, 246, 0.08);
}

.timeline-archive-readmore {
    justify-self: start;
    margin-top: 0.16rem;
    border: 1px solid rgba(15, 23, 42, 0.16);
    border-radius: 9px;
    padding: 0.3rem 0.56rem;
    background: #fff;
    color: #0f172a;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
}

.timeline-archive-empty {
    grid-column: 1 / -1;
    border: 1px dashed rgba(15, 23, 42, 0.24);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.75);
    padding: 0.95rem;
    color: #64748b;
}

.timeline-detail-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    align-items: center;
    justify-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
}

.timeline-detail-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.timeline-detail-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
}

.timeline-detail-panel {
    position: relative;
    width: min(760px, 94vw);
    max-height: 88vh;
    overflow: auto;
    border: 1px solid rgba(15, 23, 42, 0.16);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.28);
    padding: 1rem;
    transform: translateY(10px);
    transition: transform 220ms ease;
}

.timeline-detail-overlay.is-open .timeline-detail-panel {
    transform: translateY(0);
}

.timeline-detail-close {
    position: sticky;
    top: 0.12rem;
    margin-left: auto;
    display: block;
    border: 1px solid rgba(15, 23, 42, 0.22);
    border-radius: 999px;
    background: #fff;
    color: #0f172a;
    width: 36px;
    height: 36px;
    cursor: pointer;
}

.timeline-detail-kicker {
    margin-top: 0.2rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.72rem;
    font-weight: 700;
}

.timeline-detail-title {
    margin: 0.16rem 0 0;
}

.timeline-detail-date {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem;
    margin-top: 0.3rem;
}

.timeline-detail-date-bs {
    font-size: 1.03rem;
    font-weight: 800;
    color: #0f172a;
}

.timeline-detail-date-ad {
    color: #64748b;
}

.timeline-detail-summary {
    margin-top: 0.44rem;
}

.timeline-detail-bullets {
    margin-top: 0.56rem;
    padding-left: 1.1rem;
    color: #334155;
    display: grid;
    gap: 0.36rem;
}

.timeline-detail-media {
    margin-top: 0.74rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
}

.timeline-detail-media img {
    width: 100%;
    max-height: 270px;
    object-fit: cover;
    display: block;
}

.timeline-detail-media figcaption {
    padding: 0.46rem 0.56rem;
    color: #64748b;
    font-size: 0.84rem;
}

.timeline-detail-sources-wrap {
    margin-top: 0.82rem;
}

.timeline-detail-sources-wrap h4 {
    margin: 0;
}

.timeline-detail-sources {
    margin-top: 0.34rem;
    list-style: none;
    padding: 0;
    display: grid;
    gap: 0.28rem;
}

.timeline-detail-sources li {
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
    flex-wrap: wrap;
}

.timeline-source-type {
    color: #64748b;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

body.timeline-detail-open {
    overflow: hidden;
}

@media (min-width: 1024px) {
    .timeline-detail-overlay {
        justify-items: end;
    }

    .timeline-detail-panel {
        width: min(540px, 92vw);
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        border-top: 0;
        border-right: 0;
        border-bottom: 0;
        transform: translateX(16px);
    }

    .timeline-detail-overlay.is-open .timeline-detail-panel {
        transform: translateX(0);
    }
}

@media (max-width: 900px) {
    .timeline-archive-feed {
        grid-template-columns: 1fr;
        row-gap: 0.9rem;
        padding-left: 1.06rem;
    }

    .timeline-archive-feed::before {
        left: 7px;
        transform: none;
    }

    .timeline-archive-item.is-left,
    .timeline-archive-item.is-right {
        grid-column: 1;
    }

    .timeline-archive-item.is-left .timeline-archive-node,
    .timeline-archive-item.is-right .timeline-archive-node {
        left: -1.02rem;
        right: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .timeline-archive-card,
    .timeline-detail-overlay,
    .timeline-detail-panel {
        transition: none !important;
        animation: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

@keyframes timelineCardIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Gallery */

.section-media .section-subtitle{max-width:70ch;color:var(--muted);margin-top:.5rem}
.gallery-toolbar{display:flex;gap:1rem;align-items:center;flex-wrap:wrap;margin:1.25rem 0 1rem}
.gallery-search input{min-width:240px;max-width:420px;width:min(420px,70vw);padding:.6rem .75rem;border-radius:12px;border:1px solid rgba(0,0,0,.12);background:rgba(255,255,255,.75)}
.gallery-grid{display:grid;grid-template-columns:repeat(12,1fr);gap:14px}
.gallery-card{grid-column:span 3;position:relative;border-radius:18px;overflow:hidden;background:rgba(255,255,255,.78);
  border:1px solid rgba(0,0,0,.10);box-shadow:0 14px 34px rgba(0,0,0,.08);cursor:pointer;transform:translateZ(0);transition:transform .2s ease, box-shadow .2s ease}
.gallery-card:hover{transform:translateY(-3px);box-shadow:0 18px 44px rgba(0,0,0,.12)}
.gallery-card img{width:100%;height:clamp(150px,18vw,230px);object-fit:cover;display:block;filter:saturate(1.05)}
.gallery-card .gallery-overlay{position:absolute;inset:auto 0 0 0;padding:12px 14px;
  background:linear-gradient(to top, rgba(0,0,0,.68), rgba(0,0,0,0));color:#fff}
.gallery-title{font-weight:700;font-size:.95rem;line-height:1.2}
.gallery-meta{font-size:.78rem;opacity:.9;margin-top:4px}
@media (max-width:1100px){.gallery-card{grid-column:span 4}.gallery-card img{height:220px}}
@media (max-width:780px){.gallery-card{grid-column:span 6}.gallery-search input{min-width:0;width:100%}}
@media (max-width:520px){.gallery-card{grid-column:span 6}.gallery-card img{height:clamp(150px,38vw,220px)}}
@media (max-width:360px){.gallery-card{grid-column:span 12}}

/* Gallery: progressive loading */
.gallery-more-wrap{display:flex;justify-content:center;margin:16px 0 4px}
.gallery-load-more{
  border:1px solid rgba(31,122,58,.32);
  background:rgba(31,122,58,.10);
  color:#0f4a25;
  border-radius:999px;
  padding:10px 16px;
  font-weight:900;
  cursor:pointer;
}
.gallery-load-more:hover{background:rgba(31,122,58,.16)}
.gallery-load-more:focus-visible{outline:2px solid rgba(31,122,58,.55);outline-offset:2px}

.lightbox{position:fixed;inset:0;display:none;z-index:9999}
.lightbox[aria-hidden="false"]{display:block}
.lightbox-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.72)}
.lightbox-shell{position:relative;max-width:min(980px,92vw);max-height:92vh;margin:4vh auto;background:rgba(255,255,255,.92);
  border-radius:20px;overflow:hidden;border:1px solid rgba(255,255,255,.25);box-shadow:0 28px 70px rgba(0,0,0,.28)}
.lightbox-close{position:absolute;top:10px;right:14px;width:42px;height:42px;border-radius:999px;border:1px solid rgba(0,0,0,.15);
  background:rgba(255,255,255,.86);font-size:26px;cursor:pointer}
.lightbox-figure{margin:0}
.lightbox-figure img{width:100%;max-height:70vh;object-fit:contain;background:#0b0b0b}
.lightbox-caption{padding:14px 16px}
.lightbox-title{font-weight:800}
.lightbox-meta{color:var(--muted);margin-top:4px;font-size:.92rem}
.lightbox-nav{position:absolute;inset:0;display:flex;justify-content:space-between;align-items:center;pointer-events:none}
.lightbox-prev,.lightbox-next{pointer-events:auto;margin:0 8px;width:44px;height:56px;border-radius:14px;border:1px solid rgba(255,255,255,.25);
  background:rgba(0,0,0,.38);color:#fff;font-size:34px;cursor:pointer}

.no-scroll{overflow:hidden}

/* Timeline v2 — Compact, Clean, Themed */
#timeline.person-timeline-section {
    --nc-red: #b51f29;
    --nc-green: #1e6f45;
    --ink: #15201c;
    --muted: #556660;
    --stroke: rgba(21, 32, 28, 0.14);
    --card: #ffffff;
    --shadow: 0 12px 28px rgba(21, 32, 28, 0.1);
    --radius: 14px;
    background:
        radial-gradient(900px 340px at 9% 0%, rgba(30, 111, 69, 0.12), rgba(30, 111, 69, 0)),
        radial-gradient(760px 320px at 91% 14%, rgba(181, 31, 41, 0.1), rgba(181, 31, 41, 0)),
        linear-gradient(180deg, #f9fcf9 0%, #f2f7f3 100%);
}

#timeline .person-timeline-head h2 {
    font-size: clamp(1.35rem, 2.3vw, 1.85rem);
    margin-bottom: 0.35rem;
}

#timeline .person-timeline-subtitle {
    color: var(--muted);
    margin: 0;
    max-width: 74ch;
}

#timeline .person-timeline-controls {
    position: sticky;
    top: calc(var(--header-h) + 10px);
    z-index: 24;
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 20px rgba(21, 32, 28, 0.08);
    padding: 14px;
    margin-bottom: 14px;
}

#timeline .person-tabs,
#timeline .person-tag-chips {
    display: flex;
    gap: 8px;
}

#timeline .person-tabs {
    margin-bottom: 10px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    padding-bottom: 4px;
    scrollbar-width: thin;
}

#timeline .person-tabs::-webkit-scrollbar {
    height: 6px;
}

#timeline .person-tabs::-webkit-scrollbar-thumb {
    background: rgba(21, 32, 28, 0.25);
    border-radius: 999px;
}

#timeline .person-tag-chips {
    flex-wrap: wrap;
}

#timeline .chip,
#timeline .tag {
    border: 1px solid var(--stroke);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    padding: 4px 11px;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.25;
}

#timeline .leader-tab {
    cursor: pointer;
    flex: 0 0 auto;
    scroll-snap-align: start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px 5px 6px;
}

#timeline .leader-tab-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid rgba(21, 32, 28, 0.16);
    background: #eef3ef;
    flex: 0 0 auto;
}

#timeline .leader-tab-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

#timeline .leader-tab-label {
    white-space: nowrap;
}

#timeline .leader-tab.is-active {
    border-color: rgba(181, 31, 41, 0.55);
    background: rgba(181, 31, 41, 0.1);
    color: #82131a;
}

#timeline .chip.tag {
    cursor: pointer;
}

#timeline .chip.tag.is-active {
    border-color: rgba(30, 111, 69, 0.56);
    background: rgba(30, 111, 69, 0.12);
    color: #135033;
}

#timeline .person-timeline-tools {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 1.3fr;
    gap: 8px;
    align-items: start;
}

#timeline .person-search {
    width: 100%;
    border: 1px solid var(--stroke);
    border-radius: 11px;
    background: #fff;
    color: var(--ink);
    padding: 9px 11px;
    min-height: 38px;
}

#timeline .timeline-shell {
    display: grid;
    grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

#timeline .leader-panel {
    position: sticky;
    top: calc(var(--header-h) + 92px);
}

#timeline .leader-accordion-toggle {
    display: none;
}

#timeline .leader-card {
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
    padding: 14px;
    display: grid;
    gap: 10px;
}

#timeline .leader-media {
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 6 / 5;
    background: #eef3ef;
    position: relative;
}

#timeline .leader-portrait {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

#timeline .leader-name {
    margin: 0;
    font-size: clamp(1.08rem, 1.7vw, 1.25rem);
    color: var(--ink);
}

#timeline .leader-role {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

#timeline .leader-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

#timeline .leader-fact-chip {
    border: 1px solid var(--stroke);
    border-radius: 999px;
    background: #fff;
    padding: 2px 8px;
    font-size: 0.74rem;
    color: #2b3d37;
    font-weight: 700;
}

#timeline .leader-quote {
    margin: 0;
    border-left: 3px solid var(--nc-green);
    border-radius: 0 10px 10px 0;
    padding: 8px 10px;
    background: rgba(30, 111, 69, 0.08);
    color: #18372a;
    font-size: 0.9rem;
}

#timeline .leader-highlights {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 4px;
    color: #2f423b;
    font-size: 0.86rem;
}

#timeline .timeline-feed-head {
    display: grid;
    gap: 8px;
    margin-bottom: 10px;
}

#timeline .person-timeline-results {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
}

#timeline .timeline-progress {
    width: 100%;
    height: 4px;
    border-radius: 999px;
    background: rgba(21, 32, 28, 0.1);
    overflow: hidden;
}

#timeline .timeline-progress-fill {
    display: block;
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--nc-red), var(--nc-green));
    transition: width 160ms linear;
}

#timeline .person-timeline-feed {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

#timeline .event {
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
    overflow: hidden;
}

#timeline .event-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(150px, 184px);
    gap: 10px;
    align-items: start;
    padding: 14px;
}

#timeline .date-badge {
    border: 1px solid var(--stroke);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(181, 31, 41, 0.1), rgba(30, 111, 69, 0.1));
    padding: 6px 8px;
    min-width: 94px;
}

#timeline .date-bs {
    font-size: 0.76rem;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.25;
}

#timeline .date-ad {
    font-size: 0.73rem;
    color: var(--muted);
    line-height: 1.25;
}

#timeline .event-content {
    min-width: 0;
    display: grid;
    gap: 6px;
}

#timeline .event-title {
    font-size: clamp(0.98rem, 1.45vw, 1.1rem);
    font-weight: 800;
    line-height: 1.3;
    color: var(--ink);
}

#timeline .event-summary {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#timeline .event-kv {
    color: #31453f;
    font-size: 0.84rem;
}

#timeline .event-kv span {
    color: var(--ink);
    font-weight: 700;
}

#timeline .event-media {
    aspect-ratio: 16 / 10;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(21, 32, 28, 0.08);
    background: #eef3ef;
    position: relative;
}

#timeline .event-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#timeline .event-bottom {
    border-top: 1px solid rgba(21, 32, 28, 0.08);
    padding: 10px 14px 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
}

#timeline .tagrow {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

#timeline .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

#timeline .btn {
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.2;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

#timeline .btn:hover {
    transform: translateY(-1px);
}

#timeline .btn.btn-primary {
    background: var(--nc-red);
    border-color: var(--nc-red);
    color: #fff;
    box-shadow: 0 8px 16px rgba(181, 31, 41, 0.22);
}

#timeline .btn.btn-success {
    background: var(--nc-green);
    border-color: var(--nc-green);
    color: #fff;
    box-shadow: 0 8px 16px rgba(30, 111, 69, 0.22);
}

#timeline .event.reveal {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 460ms ease, transform 460ms ease;
}

#timeline .event.reveal.is-in {
    opacity: 1;
    transform: translateY(0);
}

#timeline .person-timeline-empty {
    border: 1px dashed var(--stroke);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.75);
    color: var(--muted);
    padding: 14px;
}

#timeline .skeleton {
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(255, 255, 255, 0.08) 20%, rgba(255, 255, 255, 0.5) 40%, rgba(255, 255, 255, 0.08) 60%), #dde5de;
    background-size: 220% 100%;
    animation: timelineV2Skeleton 1.2s linear infinite;
}

#timeline .skeleton.is-hidden {
    opacity: 0;
    visibility: hidden;
    transition: opacity 160ms ease;
}

.sources-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    align-items: center;
    justify-items: center;
}

.sources-modal[hidden] {
    display: none;
}

.sources-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 21, 18, 0.58);
}

.sources-modal__panel {
    position: relative;
    width: min(640px, 92vw);
    max-height: 86vh;
    overflow: auto;
    border: 1px solid rgba(21, 32, 28, 0.14);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 22px 44px rgba(15, 21, 18, 0.3);
    padding: 14px;
}

.sources-modal__close {
    border: 1px solid rgba(21, 32, 28, 0.14);
    border-radius: 999px;
    width: 34px;
    height: 34px;
    background: #fff;
    color: #15201c;
    font-size: 1.45rem;
    line-height: 1;
    margin-left: auto;
    display: block;
}

.sources-modal__kicker {
    margin: 6px 0 0;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #1e6f45;
}

.sources-modal__list {
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.sources-modal__list li {
    border: 1px solid rgba(21, 32, 28, 0.14);
    border-radius: 10px;
    padding: 8px 10px;
    background: #f6faf7;
}

.sources-modal__list a {
    color: #123b28;
    text-decoration: underline;
    text-decoration-color: rgba(30, 111, 69, 0.4);
}

body.timeline-modal-open {
    overflow: hidden;
}

@media (max-width: 980px) {
    #timeline .timeline-shell {
        grid-template-columns: 1fr;
    }

    #timeline .leader-panel {
        position: static;
    }

    #timeline .leader-accordion-toggle {
        display: inline-flex;
        width: 100%;
        justify-content: space-between;
        align-items: center;
        border: 1px solid var(--stroke);
        border-radius: 11px;
        background: #fff;
        color: var(--ink);
        font-weight: 700;
        padding: 8px 11px;
        margin-bottom: 8px;
    }

    #timeline .leader-card-wrap[hidden] {
        display: none;
    }

    #timeline .person-timeline-tools {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    #timeline .event-main {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    #timeline .date-badge {
        min-width: 0;
        width: fit-content;
    }

    #timeline .event-media {
        width: 100%;
    }

    #timeline .event-bottom {
        padding: 10px 12px 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #timeline .event.reveal,
    #timeline .event.reveal.is-in,
    #timeline .btn,
    #timeline .timeline-progress-fill,
    #timeline .skeleton {
        transition: none !important;
        animation: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

@keyframes timelineV2Skeleton {
    from {
        background-position: 200% 0;
    }
    to {
        background-position: -20% 0;
    }
}

/* About History Section */
.about-history {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(840px 360px at 6% 0%, rgba(214, 40, 40, 0.08), rgba(214, 40, 40, 0)),
        radial-gradient(900px 360px at 94% 10%, rgba(31, 122, 74, 0.08), rgba(31, 122, 74, 0)),
        linear-gradient(180deg, #fbfdfb 0%, #f7fbf8 100%);
}

.about-history::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("../assets/ui/watermark/tree.svg");
    background-repeat: no-repeat;
    background-position: center 34%;
    background-size: min(620px, 66vw);
    opacity: 0.06;
    pointer-events: none;
}

.about-history__inner {
    position: relative;
    z-index: 1;
}

.about-history__head {
    margin-bottom: 16px;
}

.about-history__head h2 {
    margin-bottom: 8px;
}

.about-history__subtitle {
    margin: 0;
    max-width: 72ch;
    color: #4a5a55;
}

.about-history__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 1fr);
    gap: 18px;
    align-items: start;
}

.history-scenes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.scene-tile {
    border: 1px solid rgba(21, 32, 28, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 24px rgba(21, 32, 28, 0.08);
    padding: 12px;
}

.scene-head h3 {
    margin: 0;
    font-size: 0.92rem;
    color: #14211d;
}

.scene-svg {
    width: 100%;
    height: auto;
    display: block;
    margin-top: 8px;
}

.history-milestones {
    display: grid;
    gap: 10px;
}

.history-milestone-card {
    border: 1px solid rgba(21, 32, 28, 0.13);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 22px rgba(21, 32, 28, 0.08);
    padding: 14px;
}

.history-milestone-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.history-year {
    border: 1px solid rgba(214, 40, 40, 0.34);
    border-radius: 999px;
    background: rgba(214, 40, 40, 0.1);
    color: #a21c1c;
    padding: 3px 10px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.history-icon {
    width: 28px;
    height: 28px;
    color: #1f7a4a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.history-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.history-title {
    margin: 8px 0 4px;
    font-size: clamp(1rem, 1.45vw, 1.08rem);
    line-height: 1.3;
}

.history-desc {
    margin: 0;
    color: #4d5f58;
    line-height: 1.52;
}

.history-more-wrap {
    margin-top: 10px;
}

.about-history .btn {
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.2;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.about-history .btn:hover {
    transform: translateY(-1px);
}

.about-history .btn-primary {
    background: #d62828;
    border-color: #d62828;
    color: #fff;
}

.about-history .btn-success {
    background: #1f7a4a;
    border-color: #1f7a4a;
    color: #fff;
}

.history-more {
    margin-top: 8px;
    border-top: 1px dashed rgba(21, 32, 28, 0.2);
    padding-top: 8px;
    color: #40524b;
    font-size: 0.9rem;
}

.about-history .reveal {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 480ms ease, transform 480ms ease;
}

.about-history .reveal.is-in {
    opacity: 1;
    transform: translateY(0);
}

.crowd-wave {
    transform-origin: center;
    animation: sceneWave 3.4s ease-in-out infinite;
}

.flag-float {
    transform-origin: 159px 32px;
    animation: flagFloat 2.8s ease-in-out infinite;
}

.dust circle {
    animation: dustUp 2.6s ease-in-out infinite;
}

.dust circle:nth-child(2) {
    animation-delay: 0.4s;
}

.dust circle:nth-child(3) {
    animation-delay: 0.8s;
}

.chain-wiggle {
    transform-origin: center;
    animation: chainWiggle 2.6s ease-in-out infinite;
}

.sound-pulse path {
    animation: soundPulse 1.7s ease-in-out infinite;
}

.sound-pulse path:nth-child(2) {
    animation-delay: 0.35s;
}

.ink-path {
    stroke-dasharray: 80;
    stroke-dashoffset: 80;
    animation: writeStroke 2.6s ease-in-out infinite;
}

.sun-rise {
    transform-origin: 184px 30px;
    animation: sunRise 3.2s ease-in-out infinite;
}

.check-draw path {
    stroke-dasharray: 58;
    stroke-dashoffset: 58;
    animation: checkDraw 2.2s ease-in-out infinite;
}

.confetti circle {
    animation: confettiDrift 2.8s ease-in-out infinite;
}

.confetti circle:nth-child(2) {
    animation-delay: 0.35s;
}

.confetti circle:nth-child(3) {
    animation-delay: 0.7s;
}

@keyframes sceneWave {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-1.5px); }
}

@keyframes flagFloat {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(-2.8deg); }
}

@keyframes dustUp {
    0%, 100% { transform: translateY(0); opacity: 0.4; }
    50% { transform: translateY(-5px); opacity: 0.9; }
}

@keyframes chainWiggle {
    0%, 100% { transform: rotate(0deg); }
    30% { transform: rotate(-2deg); }
    65% { transform: rotate(2deg); }
}

@keyframes soundPulse {
    0%, 100% { opacity: 0.25; transform: scale(0.94); }
    50% { opacity: 1; transform: scale(1); }
}

@keyframes writeStroke {
    0% { stroke-dashoffset: 80; }
    45% { stroke-dashoffset: 12; }
    60%, 100% { stroke-dashoffset: 0; }
}

@keyframes sunRise {
    0%, 100% { transform: translateY(1px); opacity: 0.82; }
    50% { transform: translateY(-3px); opacity: 1; }
}

@keyframes checkDraw {
    0% { stroke-dashoffset: 58; }
    45% { stroke-dashoffset: 16; }
    60%, 100% { stroke-dashoffset: 0; }
}

@keyframes confettiDrift {
    0%, 100% { transform: translateY(0); opacity: 0.45; }
    50% { transform: translateY(-6px); opacity: 1; }
}

@media (max-width: 980px) {
    .about-history__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .history-scenes {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .about-history .reveal,
    .about-history .reveal.is-in,
    .crowd-wave,
    .flag-float,
    .dust circle,
    .chain-wiggle,
    .sound-pulse path,
    .ink-path,
    .sun-rise,
    .check-draw path,
    .confetti circle {
        animation: none !important;
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

/* Person Timeline Curve Upgrade */
#timeline {
    --nc-red: #d61f2c;
    --nc-green: #0f7a3a;
    --paper: rgba(255, 255, 255, 0.68);
    --ink: rgba(10, 10, 10, 0.86);
}

#timeline .person-strip {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 18px;
    background: var(--paper);
    backdrop-filter: blur(10px);
    overflow: auto;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

#timeline .person-chip {
    border: 0;
    background: transparent;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 14px;
    transition: transform 0.18s ease, background 0.18s ease;
}

#timeline .person-chip:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.55);
}

#timeline .person-chip:focus-visible {
    outline: 2px solid rgba(214, 31, 44, 0.6);
    outline-offset: 3px;
}

#timeline .avatar-ring {
    width: 72px;
    height: 72px;
    border-radius: 999px;
    padding: 3px;
    background: linear-gradient(135deg, rgba(214, 31, 44, 0.9), rgba(15, 122, 58, 0.75));
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.18s ease, transform 0.18s ease;
}

#timeline .avatar-ring img {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    object-fit: cover;
    display: block;
    background: #fff;
}

#timeline .person-chip.is-legacy img {
    filter: grayscale(100%) contrast(1.05);
    opacity: 0.95;
}

#timeline .person-chip.is-active .avatar-ring {
    box-shadow: 0 0 0 4px rgba(214, 31, 44, 0.18), 0 16px 36px rgba(214, 31, 44, 0.18);
    transform: scale(1.03);
}

#timeline .chip-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

#timeline .chip-label {
    font-size: 12px;
    font-weight: 800;
    color: var(--ink);
}

#timeline .chip-badges {
    display: flex;
    gap: 6px;
}

#timeline .mini-badge {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 12px;
}

#timeline .legacy-curve {
    padding: 8px 0 12px;
}

#timeline .curve-wrap {
    position: relative;
    border-radius: 22px;
    background: var(--paper);
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
    padding: 18px 16px 26px;
}

#timeline .curve-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

#timeline #curvePath {
    stroke: rgba(214, 31, 44, 0.55);
    stroke-width: 5;
    stroke-linecap: round;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    filter: drop-shadow(0 8px 18px rgba(214, 31, 44, 0.12));
}

#timeline .curve-arrowhead {
    fill: rgba(214, 31, 44, 0.55);
    opacity: 0.9;
}

#timeline .curve-events {
    position: relative;
    height: 360px;
}

#timeline .curve-card {
    position: absolute;
    width: 220px;
    padding: 12px 12px 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.1);
    transform: translateY(10px) scale(0.98);
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#timeline .curve-card.is-in {
    opacity: 1;
    transform: translateY(0) scale(1);
    animation: floaty 5s ease-in-out infinite;
}

#timeline .curve-card .age-pill {
    position: absolute;
    top: -14px;
    left: 14px;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 900;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

#timeline .curve-card .event-date {
    margin-bottom: 6px;
}

#timeline .curve-card .date-bs {
    font-size: 12px;
    line-height: 1.3;
    font-weight: 800;
}

#timeline .curve-card .date-ad {
    font-size: 11px;
    line-height: 1.3;
    color: rgba(10, 10, 10, 0.68);
}

#timeline .curve-card .event-title {
    margin: 6px 0;
    font-size: 20px;
    line-height: 1.05;
    font-family: "Caveat", "Patrick Hand", cursive;
    color: rgba(10, 10, 10, 0.88);
}

#timeline .curve-card .event-summary {
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 1.35;
    color: rgba(10, 10, 10, 0.78);
    display: block;
}

#timeline .curve-card .event-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 12px;
    opacity: 0.92;
    margin-bottom: 8px;
}

#timeline .curve-card .tag {
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(15, 122, 58, 0.1);
    border: 1px solid rgba(15, 122, 58, 0.18);
}

#timeline .curve-card::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    background: rgba(214, 31, 44, 0.55);
    border-radius: 999px;
    left: -6px;
    top: 20px;
    box-shadow: 0 0 0 4px rgba(214, 31, 44, 0.12);
}

#timeline .curve-card__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

#timeline .curve-card__actions .btn {
    padding: 7px 11px;
    font-size: 0.75rem;
}

#timeline .curve-fallback {
    border: 1px dashed rgba(21, 32, 28, 0.22);
    border-radius: 12px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.7);
}

@keyframes floaty {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

@media (max-width: 900px) {
    #timeline .curve-events {
        height: 440px;
    }

    #timeline .curve-card {
        width: 200px;
    }
}

@media (max-width: 700px) {
    #timeline .curve-svg {
        display: none;
    }

    #timeline .curve-events {
        height: auto;
        display: grid;
        gap: 12px;
    }

    #timeline .curve-card {
        position: relative;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        opacity: 1;
        width: auto;
    }
}

/* Timeline Event Cards — Premium thumbnail + themed actions */
#timeline .event-card {
    border: 1px solid rgba(15, 23, 42, .10);
    border-radius: 18px;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 10px 30px rgba(2, 6, 23, .10);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

#timeline .event-card__top {
    display: grid;
    grid-template-columns: 120px 1fr 240px;
    gap: 14px;
    padding: 14px;
    align-items: start;
}

#timeline .event-date {
    border: 1px solid rgba(15, 23, 42, .10);
    border-radius: 14px;
    padding: 10px;
    background: rgba(255, 255, 255, .70);
}

#timeline .event-body {
    min-width: 0;
}

#timeline .event-title {
    font-size: 18px;
    font-weight: 900;
    margin: 0 0 6px;
}

#timeline .event-summary {
    color: #64748b;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

#timeline .event-meta {
    margin-top: 10px;
    font-weight: 800;
}

#timeline .event-meta span {
    color: #64748b;
    font-weight: 700;
}

#timeline .event-tags {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#timeline .event-tag {
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, .10);
    background: rgba(255, 255, 255, .65);
    color: #64748b;
    font-weight: 800;
}

#timeline .event-thumb {
    width: 220px;
    max-width: 240px;
    aspect-ratio: 4 / 3;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, .10);
    background: #fff;
    position: relative;
}

#timeline .event-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

#timeline .event-card__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 0 14px 14px;
}

#timeline .btn {
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 900;
    border: 1px solid rgba(15, 23, 42, .10);
    background: rgba(255, 255, 255, .75);
    cursor: pointer;
    transition: transform .12s, box-shadow .12s, background .12s;
}

#timeline .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(2, 6, 23, .12);
}

#timeline .btn-red {
    background: rgba(214, 40, 40, .12);
    border-color: rgba(214, 40, 40, .35);
    color: #d62828;
}

#timeline .btn-green {
    background: rgba(31, 122, 74, .14);
    border-color: rgba(31, 122, 74, .35);
    color: #1f7a4a;
}

#timeline .btn-ico {
    margin-right: 6px;
}

#timeline .event-card.reveal {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 460ms ease, transform 460ms ease;
}

#timeline .event-card.reveal.is-in {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 980px) {
    #timeline .event-card__top {
        grid-template-columns: 110px 1fr;
    }

    #timeline .event-thumb {
        grid-column: 1 / -1;
        width: 100%;
        max-width: none;
        aspect-ratio: 16 / 9;
    }

    #timeline .event-card__actions {
        justify-content: flex-start;
    }
}

/* =============================
   Navbar brand icon + responsive
   ============================= */
.brand{
    display:flex;
    align-items:center;
    gap:12px;
}
.brand__logo{
    width:40px;
    height:40px;
    border-radius:12px;
    object-fit:cover;
    box-shadow:0 10px 18px rgba(2,6,23,.14);
    border:1px solid rgba(15,23,42,.10);
    background:#fff;
}
.brand__text{display:flex; flex-direction:column; line-height:1.05;}

/* Kill any leftover About spacing if anchors exist */
#about{display:none !important;}

/* =============================
   Mobile layout polish
   ============================= */
@media (max-width: 980px){
    .nav.nav-pill{
        padding:10px 12px;
        gap:10px;
    }
    .brand__name{font-size:18px;}
    .brand__tag{font-size:12px;}
}

@media (max-width: 768px){
    .container{padding-left:14px; padding-right:14px;}

    /* Make menu usable on phones */
    .menu-toggle{display:inline-flex;}
    .nav-menu{
        position:absolute;
        top:calc(100% + 10px);
        left:12px;
        right:12px;
        background:rgba(255,255,255,.92);
        backdrop-filter: blur(10px);
        border:1px solid rgba(15,23,42,.10);
        border-radius:18px;
        padding:10px;
        box-shadow:0 18px 40px rgba(2,6,23,.18);
        display:none;
    }
    .nav-menu.is-open{display:block;}
    .nav-menu.active{display:block;}
    .nav-menu li a{display:block; padding:12px 12px; border-radius:12px;}

    .language-switcher{margin-left:auto;}

    /* Hero + exhibit spacing */
    .section{padding:56px 0;}
}

@media (max-width: 520px){
    .brand__logo{width:36px; height:36px; border-radius:10px;}
    .brand__name{font-size:16px;}
    .brand__tag{font-size:11px;}
}

/* Responsive system patch */
:root {
    --container-pad: 20px;
    --header-h: 72px;
    --nav-h: 72px;
    --nav-h-mobile: 56px;
    --nav-offset: var(--header-h);
    --radius: 18px;
}

@media (max-width: 900px) {
    :root { --container-pad: 16px; }
}

@media (max-width: 520px) {
    :root {
        --container-pad: 12px;
        --header-h: 64px;
        --nav-h-mobile: 52px;
    }
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

section {
    scroll-margin-top: calc(var(--header-h) + 16px);
}

.container {
    width: min(1160px, 100%);
    max-width: 100%;
    margin: 0 auto;
    padding-left: var(--container-pad);
    padding-right: var(--container-pad);
}

.site-header {
    height: var(--nav-offset, var(--header-h));
}

.site-header > .container {
    height: 100%;
}

.site-header .nav.nav-pill {
    min-height: 100%;
}

.hero,
#home,
.home-section,
main > section:first-of-type {
    padding-top: calc(var(--header-h) + 18px);
}

button,
a.btn,
.cta-button,
.legacy-btn,
.gallery-load-more,
.submit-btn {
    min-height: 44px;
}

.gallery-more-wrap {
    justify-content: center;
}

#gallery-load-more {
    margin: 16px auto 0;
    display: block;
}

@media (max-width: 900px) {
    .nav.nav-pill {
        position: relative;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: 8px;
        order: 3;
        min-height: 40px;
        padding: 8px 12px;
    }

    .language-switcher {
        margin-left: auto;
        order: 2;
    }

    .nav-menu {
        display: none;
        position: absolute;
        right: var(--container-pad);
        top: calc(var(--header-h) - 6px);
        left: auto;
        width: min(320px, calc(100% - (var(--container-pad) * 2)));
        max-height: none;
        opacity: 1;
        pointer-events: auto;
        padding: 12px;
        border-radius: var(--radius);
        background: rgba(255, 255, 255, 0.92);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(15, 23, 42, 0.1);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
        z-index: 999;
        gap: 8px;
        flex: 0 0 auto;
    }

    .nav-menu[data-open="true"],
    .nav-menu.active,
    .nav-menu.is-open {
        display: grid;
    }

    .nav-link,
    .nav-more-toggle {
        display: block;
        width: 100%;
        text-align: left;
        border-radius: 12px;
        min-height: 44px;
    }

    .nav-more {
        width: 100%;
    }

    .nav-more-menu {
        position: static;
        border: 0;
        box-shadow: none;
        background: transparent;
        padding: 4px 0 0 8px;
        min-width: 0;
    }

}

@media (max-width: 520px) {
    .brand__logo { width: 36px; height: 36px; }
    .brand__tag { display: none; }
    .section { padding: 52px 0; }
    p { font-size: 15px; }
    h1 { font-size: clamp(22px, 6vw, 34px); }
    h2 { font-size: clamp(18px, 4.8vw, 24px); }
    .card,
    .panel,
    .timeline-event-card { padding: 12px; }
}

@media (max-width: 768px) {
    :root {
        --nav-h: var(--nav-h-mobile);
    }

    .site-header {
        height: var(--nav-offset, var(--nav-h-mobile));
    }

    .site-header > .container {
        display: flex;
        align-items: center;
        padding-top: 0;
        padding-bottom: 0;
    }

    .site-header > .container .nav.nav-pill {
        min-height: var(--nav-h-mobile);
        height: var(--nav-h-mobile);
        padding: 6px 10px;
        border-radius: 14px;
        gap: 8px;
    }

    .site-header .brand__logo {
        width: 32px;
        height: 32px;
        border-radius: 9px;
    }

    .site-header .brand {
        gap: 6px;
        padding: 1px 0;
    }

    .site-header .brand__name {
        font-size: 0.95rem;
        line-height: 1;
    }

    .site-header .brand__tag {
        font-size: 0.62rem;
        padding: 3px 6px;
        letter-spacing: 0.06em;
    }

    .site-header .menu-toggle {
        min-height: 34px;
        height: 34px;
        padding: 4px 10px;
        font-size: 0.9rem;
        border-radius: 10px;
    }

    .site-header .lang-btn {
        min-height: 30px;
        padding: 3px 8px;
        font-size: 0.78rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-header {
        transition: background 0.25s ease, box-shadow 0.25s ease;
    }

    .site-header.nav-hidden,
    .site-header.is-hidden {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
}

/* Final responsive hardening */
html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
}

.page-wrap {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

.main,
.section,
.container,
.nav,
.nav.nav-pill,
.nav-menu,
.hero-archive,
.hero-archive__main,
.hero-archive__preview,
.hero-archive__preview-left,
.hero-archive__preview-right,
.legacy-exhibit,
.legacy-exhibit-main,
.legacy-info-panel,
.timeline-clean__controls,
.timeline-clean__list,
#timeline .event-card,
#timeline .event-card__top,
.gallery-grid,
.gallery-card {
    min-width: 0;
    max-width: 100%;
}

@media (max-width: 1024px) {
    .container {
        width: min(1160px, 100%);
    }

    .hero-archive__title {
        max-width: 100%;
    }
}

@media (max-width: 900px) {
    .hero-archive__main,
    .hero-archive__preview,
    .legacy-exhibit-main,
    #timeline .event-card__top {
        grid-template-columns: 1fr !important;
    }

    .hero-archive__main,
    .hero-archive__preview-left,
    .legacy-exhibit-main,
    #timeline .event-card__actions {
        display: flex;
        flex-direction: column !important;
    }

    .nav.nav-pill {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .brand,
    .logo {
        min-width: 0;
        max-width: calc(100% - 132px);
    }

    .brand__text {
        min-width: 0;
    }

    .brand__name,
    .brand__tag {
        display: block;
        overflow-wrap: anywhere;
    }

    .nav-menu {
        right: var(--container-pad);
        width: min(320px, calc(100% - (var(--container-pad) * 2)));
        max-width: calc(100% - (var(--container-pad) * 2));
    }

    #timeline .event-thumb {
        order: -1;
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .hero-archive,
    .legacy-exhibit,
    .timeline-clean,
    .section-media {
        overflow-x: clip;
    }

    h1 { font-size: clamp(28px, 7vw, 56px); }
    h2 { font-size: clamp(22px, 5vw, 40px); }

    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero-archive__title {
        font-size: clamp(28px, 7vw, 56px);
        line-height: 1.15;
        max-width: 100%;
    }

    h1,
    h2,
    h3,
    h4,
    p,
    li,
    a,
    span,
    button,
    label,
    .tc-person__name,
    .gallery-title,
    .gallery-meta,
    #timeline .event-title,
    #timeline .event-summary {
        overflow-wrap: anywhere;
        word-break: break-word;
        white-space: normal;
    }

    #timeline .event-summary,
    .legacy-info-copy,
    .legacy-profile-list li,
    .work-card-summary,
    .work-item-desc,
    .gallery-title {
        -webkit-line-clamp: unset !important;
        line-clamp: unset !important;
        overflow: visible !important;
        display: block;
    }

    .timeline-clean__people,
    .hero-archive__thread,
    .legacy-timeline-track,
    .timeline-row {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
    }

    .timeline-clean__people > *,
    .hero-archive__thread > *,
    .legacy-timeline-track > *,
    .timeline-item {
        scroll-snap-align: start;
    }

    .hero-archive__thread,
    .timeline-clean__people,
    .legacy-timeline-track,
    .timeline-row {
        display: flex;
        gap: 20px;
    }

    .hero-archive__thread-btn,
    .tc-person,
    .legacy-node-btn,
    .timeline-item {
        flex: 0 0 auto;
        min-width: 0;
    }

    .hero-archive__thread-dot {
        width: clamp(70px, 20vw, 120px);
        height: clamp(70px, 20vw, 120px);
    }

    .gallery-card img,
    .tc-card__media,
    #timeline .event-thumb {
        height: auto;
        max-height: none;
        aspect-ratio: 16 / 9;
    }

    .tc-card,
    .gallery-card,
    .card,
    #timeline .event-card,
    .legacy-info-panel,
    .hero-archive__artifact,
    .hero-archive__preview {
        height: auto;
        min-height: 0;
        max-height: none;
    }

    .btn,
    .tc-btn,
    .legacy-btn,
    .cta-button,
    .gallery-load-more,
    .submit-btn {
        width: 100%;
    }

    .nav-menu {
        width: min(320px, calc(100% - (var(--container-pad) * 2)));
    }
}

@media (max-width: 480px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .brand__text {
        display: none;
    }

    .nav-menu {
        width: calc(100% - 24px);
        max-width: calc(100% - 24px);
        right: 12px;
    }

    .legacy-node-btn,
    .hero-archive__thread-btn,
    .tc-person,
    .timeline-item {
        min-width: 0;
    }

    .hero-archive__thread-dot {
        width: clamp(70px, 22vw, 100px);
        height: clamp(70px, 22vw, 100px);
    }
}

/* Component-scoped mobile conflict fixes */
@media (max-width: 768px) {
    .site-header > .container .nav.nav-pill {
        width: min(calc(100% - 24px), 980px);
        margin: 10px auto;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .site-header > .container .nav.nav-pill > * {
        min-width: 0;
    }

    .site-header .brand {
        min-width: 0;
        max-width: 40vw;
    }

    .site-header .brand__name,
    .site-header .brand-title {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 40vw;
    }

    .site-header .menu-toggle {
        flex: 0 0 auto;
        margin-left: 0;
    }

    .site-header .language-switcher {
        flex: 0 0 auto;
        margin-left: 0;
    }

    .hero-archive__timeline {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: flex-start;
    }

    .hero-archive__year-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: auto !important;
        min-width: 64px;
        max-width: 100%;
        padding: 10px 14px;
        border-radius: 999px;
        flex: 0 0 auto;
    }

    .hero-archive__artifact,
    .hero-archive__preview {
        width: 100%;
        max-width: 100%;
    }

    .hero-archive__artifact-figure,
    .hero-archive__preview-image {
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: none;
    }

    .hero-archive__artifact-figure img,
    .hero-archive__preview-image {
        width: 100%;
        height: auto !important;
        aspect-ratio: auto;
        object-fit: contain;
    }

    .hero-archive__thread {
        display: flex !important;
        flex-wrap: nowrap;
        justify-content: flex-start;
        align-items: flex-start;
        gap: 12px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        max-width: 100%;
        padding: 0 2px 10px;
        background: linear-gradient(
            180deg,
            transparent 36px,
            rgba(31, 122, 58, 0.5) 36px,
            rgba(31, 122, 58, 0.5) 38px,
            transparent 38px
        );
        background-repeat: no-repeat;
    }

    .hero-archive__thread::before {
        display: none;
    }

    .hero-archive__thread-btn {
        flex: 0 0 auto;
        min-width: 0;
        scroll-snap-align: center;
    }

    .hero-archive__thread-dot {
        width: clamp(70px, 20vw, 120px);
        height: clamp(70px, 20vw, 120px);
    }

    .hero-archive__actions .cta-button,
    .legacy-info-actions .legacy-btn,
    #timeline .event-card__actions .btn,
    .gallery-more-wrap .gallery-load-more {
        width: 100%;
    }
}

@media (max-width: 430px) {
    .site-header > .container .nav.nav-pill {
        width: min(calc(100% - 20px), 980px);
        gap: 8px;
    }

    .site-header .brand {
        max-width: 44vw;
    }

    .site-header .brand__name,
    .site-header .brand-title {
        max-width: 44vw;
    }

    .hero-archive__year-btn {
        min-width: 64px;
        padding: 9px 12px;
    }

    .hero-archive__thread {
        gap: 10px;
    }
}

/* Header/rails mobile stability */
@media (max-width: 480px) {
    .site-header {
        padding-top: env(safe-area-inset-top);
    }

    .site-header > .container .nav.nav-pill {
        min-height: 48px;
        height: 48px;
        padding: 8px 10px;
        border-radius: 22px;
        width: calc(100% - 20px);
        margin: 8px auto;
        gap: 10px;
        flex-wrap: nowrap;
        justify-content: space-between;
    }

    .site-header .brand {
        max-width: 44vw;
        min-width: 0;
        flex: 0 1 auto;
    }

    .site-header .brand__text {
        display: none;
    }

    .site-header .language-switcher,
    .site-header .lang-switch {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        white-space: nowrap;
        margin-left: auto;
        margin-right: 4px;
    }

    .site-header .language-switcher button,
    .site-header .lang-switch button,
    .site-header .lang-btn {
        min-width: 44px;
    }

    .site-header .menu-toggle {
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
        min-height: 44px;
        padding: 0;
        margin-left: 0;
    }

    .hero-archive__timeline {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: flex-start;
    }

    .hero-archive__year-btn,
    .hero-archive__artifact-year {
        flex: 0 0 auto;
        min-width: 72px;
        width: auto !important;
        text-align: center;
    }
}

[data-overflow="true"] {
    outline: 2px solid rgba(255, 0, 0, 0.35);
}

/* =============================
   Responsive Patch (mobile-first)
   ============================= */
html,
body {
    overflow-x: clip;
}

@supports not (overflow: clip) {
    html,
    body {
        overflow-x: hidden;
    }
}

.container {
    width: min(1100px, 100%);
    margin-inline: auto;
    padding-inline: 16px;
}

@media (min-width: 900px) {
    .container {
        padding-inline: 24px;
    }
}

main,
header,
footer,
.section,
.container,
.card,
.panel,
.pill {
    max-width: 100%;
    min-width: 0;
}

h1,
h2,
h3,
p,
.title,
.headline {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Hero year chips: wrap cleanly on small screens */
@media (max-width: 640px) {
    .hero-archive__timeline {
        display: flex;
        flex-wrap: wrap;
        gap: 10px 12px;
        justify-content: flex-start;
    }

    .hero-archive__year-btn {
        width: auto !important;
        min-width: 0;
        padding: 10px 14px;
        border-radius: 999px;
        flex: 0 0 auto;
    }
}

/* Dedicated people scroller */
.peopleScroller {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    max-width: 100%;
}

.peopleRow {
    display: flex !important;
    gap: 14px;
    padding: 8px 2px;
    width: max-content;
    min-width: 100%;
}

.peopleRow .hero-archive__thread-btn,
.peopleRow .personItem {
    scroll-snap-align: start;
    flex: 0 0 auto;
    min-width: 84px;
    max-width: 110px;
    text-align: center;
}

.peopleRow .hero-archive__thread-dot,
.peopleRow .avatar {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    object-fit: cover;
}

@media (max-width: 360px) {
    .peopleRow .hero-archive__thread-dot,
    .peopleRow .avatar {
        width: 48px;
        height: 48px;
    }
}

@media (min-width: 900px) {
    .peopleScroller {
        overflow: visible;
        scroll-snap-type: none;
    }

    .peopleRow {
        width: 100%;
        min-width: 0;
        justify-content: center;
    }
}

/* Keep side/vertical badges in flow and non-overlapping */
@media (max-width: 768px) {
    .hero-archive__chip,
    .legacy-chip,
    .legacy-kicker,
    .hero-archive__artifact-years {
        position: static !important;
        writing-mode: horizontal-tb !important;
        transform: none !important;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        max-width: 100%;
    }
}

/* =============================
   Navbar final layout + scroll hide
   ============================= */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    height: auto !important;
    --header-translate-y: 0%;
    transform: translate3d(0, var(--header-translate-y), 0);
    transition: transform 230ms ease, box-shadow 200ms ease, background-color 200ms ease;
    will-change: transform;
    background: linear-gradient(to bottom, rgba(248, 251, 248, 0.86), rgba(248, 251, 248, 0)) !important;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    box-shadow: none !important;
}

.site-header > .container {
    width: 100%;
    max-width: 100%;
    padding-top: 8px;
    padding-bottom: 8px;
    padding-left: 0;
    padding-right: 0;
    display: flex;
    justify-content: center;
}

.site-header .nav.nav-pill {
    width: min(1100px, calc(100% - 24px));
    margin-inline: auto;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 56px;
    height: auto;
    padding: 7px 14px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.12);
    overflow: visible;
}

.site-header .brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 0 0 auto;
    padding: 0;
}

.site-header .brand__logo {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    max-width: 38px;
    max-height: 38px;
    object-fit: cover;
}

.site-header .brand__text {
    line-height: 1;
}

.site-header .nav-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 0;
}

.site-header .nav-link,
.site-header .nav-more-toggle {
    line-height: 1;
    white-space: nowrap;
    padding: 8px 12px;
    font-size: 0.94rem;
}

.site-header .language-switcher {
    display: inline-flex;
    align-items: center;
    margin-left: 0;
    flex: 0 0 auto;
}

.site-header .lang-btn {
    line-height: 1;
    min-height: 34px;
    padding: 7px 10px;
    font-size: 0.86rem;
}

.site-header .menu-toggle {
    display: none;
    margin-left: 0;
    flex: 0 0 auto;
    min-height: 36px;
    line-height: 1;
    padding: 6px 11px;
}

.site-header.nav-hidden,
.site-header.is-hidden {
    --header-translate-y: -110%;
}

@media (max-width: 900px) {
    .site-header > .container {
        padding-top: 6px;
        padding-bottom: 6px;
    }

    .site-header .nav.nav-pill {
        width: min(1100px, calc(100% - 16px));
        min-height: 52px;
        gap: 8px;
        padding: 6px 10px;
        position: relative;
    }

    .site-header .brand {
        margin-right: auto;
    }

    .site-header .brand__logo {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        max-width: 36px;
        max-height: 36px;
    }

    .site-header .brand__name {
        font-size: 0.95rem;
    }

    .site-header .brand__tag {
        display: none;
    }

    .site-header .nav-menu {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        left: 8px;
        right: 8px;
        z-index: 10000;
        background: rgba(255, 255, 255, 0.96);
        border: 1px solid rgba(15, 23, 42, 0.12);
        border-radius: 16px;
        box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
        padding: 8px;
        gap: 6px;
        justify-content: initial;
    }

    .site-header .nav-menu[data-open="true"],
    .site-header .nav-menu.active,
    .site-header .nav-menu.is-open {
        display: grid;
    }

    .site-header .nav-link,
    .site-header .nav-more-toggle {
        display: block;
        width: 100%;
        text-align: left;
        padding: 10px 12px;
    }

    .site-header .nav-more {
        width: 100%;
    }

    .site-header .nav-more-menu {
        position: static;
        min-width: 0;
        border: 0;
        box-shadow: none;
        background: transparent;
        padding: 4px 0 0 10px;
    }

    .site-header .language-switcher {
        order: 3;
    }

    .site-header .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        order: 4;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-header {
        transition: none !important;
    }
}

/* =============================
   Mobile image height caps
   ============================= */
@media (max-width: 600px) {
    /* Historical document / event media */
    .timeline-detail-media,
    #timeline .event-thumb {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .timeline-detail-media img,
    #timeline .event-thumb img {
        width: 100%;
        height: clamp(180px, 38vh, 260px);
        max-height: clamp(180px, 38vh, 260px);
        object-fit: cover;
        object-position: center;
        display: block;
    }

    /* Person portrait media */
    #timeline .leader-media {
        width: 100%;
        max-width: 100%;
        height: clamp(180px, 38vh, 260px);
        min-height: 180px;
        max-height: 260px;
        aspect-ratio: auto;
        overflow: hidden;
    }

    #timeline .leader-portrait,
    .legacy-portrait-img {
        width: 100%;
        height: clamp(180px, 38vh, 260px);
        max-height: clamp(180px, 38vh, 260px);
        object-fit: cover;
        object-position: center;
        display: block;
    }

    /* Archive / gallery featured media */
    .hero-archive__artifact-figure,
    .hero-archive__preview-image,
    .gallery-card {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .hero-archive__artifact-figure img,
    .hero-archive__preview-image,
    .gallery-card img {
        width: 100%;
        height: clamp(180px, 38vh, 260px) !important;
        max-height: clamp(180px, 38vh, 260px);
        object-fit: cover !important;
        object-position: center;
        display: block;
    }

    /* Keep captions readable below or on-image */
    .timeline-detail-media figcaption,
    .legacy-portrait-cap {
        padding: 10px 12px;
        margin: 0;
    }

    .gallery-card .gallery-overlay {
        padding: 10px 12px;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0));
    }
}

@media (max-width: 390px) {
    .timeline-detail-media img,
    #timeline .event-thumb img,
    #timeline .leader-media,
    #timeline .leader-portrait,
    .legacy-portrait-img,
    .hero-archive__artifact-figure img,
    .hero-archive__preview-image,
    .gallery-card img {
        height: clamp(170px, 34vh, 240px) !important;
        max-height: 240px;
    }
}

.site-header .desktop-nav {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 auto;
    min-width: 0;
}

.site-header .desktop-nav .nav-menu {
    flex: 1 1 auto;
    min-width: 0;
}

.mobile-menu-trigger,
.mobile-menu-panel {
    display: none;
}

.mobile-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.mobile-nav-menu .nav-link {
    display: block;
    width: 100%;
    text-align: left;
}

@media (max-width: 768px) {
    .site-navbar {
        display: none !important;
    }

    .site-header {
        min-height: 0 !important;
        height: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .site-header > .container {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    .mobile-menu-trigger {
        position: fixed;
        top: 12px;
        right: 12px;
        z-index: 10000;
        background: transparent;
        border: none;
        padding: 8px;
        width: auto;
        height: auto;
        box-shadow: none;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        gap: 4px;
        align-items: center;
        justify-content: center;
    }

    .mobile-menu-trigger .dot {
        width: 4px;
        height: 4px;
        border-radius: 999px;
        background: #1a1a1a;
    }

    .mobile-menu-panel {
        position: fixed;
        top: 44px;
        right: 12px;
        width: min(280px, calc(100vw - 24px));
        background: #fff;
        border-radius: 16px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.18);
        padding: 16px;
        display: none;
        z-index: 10001;
    }

    .mobile-menu-panel.active {
        display: block;
    }
}

@media (min-width: 769px) {
    .mobile-menu-trigger,
    .mobile-menu-panel {
        display: none !important;
    }
}

/* SIMPLE FULLSCREEN IMAGE ALERT */
.kfn-alert {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.kfn-alert.is-open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.kfn-alert-bg {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
}

/* REMOVE BLACK BOX */
.kfn-alert-box {
  position: relative;
  background: transparent;
  padding: 0;
}

/* IMAGE ONLY */
.kfn-alert-img {
  max-width: 96vw;
  max-height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 80px);
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* CLOSE BUTTON */
.kfn-alert-x {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  right: calc(env(safe-area-inset-right, 0px) + 12px);
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  z-index: 10000;
}
