/* ==========================================================================
   Wortham Laboratories — Design System v2
   World-class biotech aesthetic: refined dark theme, generous spacing,
   soft radii, layered shadows, smooth animations.
   ========================================================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
    --color-base:        #080B12;
    --color-surface:     #0F1520;
    --color-surface-alt: #0C1018;
    --color-card:        #141C2B;
    --color-border:      #1A2435;
    --color-accent:      #00C2CB;
    --color-text:        #F0F4F8;
    --color-muted:       #8892A4;

    --accent-hover:      #00D9E3;
    --font-family:       'Inter', sans-serif;

    --shadow-sm:  0 1px 3px rgba(0,0,0,0.04);
    --shadow-md:  0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg:  0 8px 24px rgba(0,0,0,0.12);

    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-reveal: cubic-bezier(0.16, 1, 0.3, 1);

    --nav-height: 88px;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 18px;
    line-height: 1.78;
    color: var(--color-text);
    background-color: var(--color-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 300ms var(--ease-smooth);
}

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

p + p {
    margin-top: 1.25em;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
    line-height: 1.15;
    color: var(--color-text);
}

.hero-headline {
    font-size: clamp(3rem, 7vw, 6rem);
    font-weight: 600;
    letter-spacing: -0.03em;
}

.page-h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 600;
}

.section-h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.dept-h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.stat-number {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 800;
    color: var(--color-accent);
    font-feature-settings: 'tnum';
}

.caption {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--color-muted);
}

.subline {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--color-muted);
    font-style: italic;
}

/* ---------- Layout ---------- */
.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 4vw, 3rem);
}

/* Justify body copy in content sections — paragraphs, accordion, card blurbs.
   Excluded: headings, stats, nav, labels, short UI text. */
.section p,
.accordion__content p,
.country-card__blurb,
.circle-block__body,
.footer__disclaimer {
    text-align: justify;
    -webkit-hyphens: none;
    hyphens: none;
}

.section {
    padding: 8vh 0;
}

.section--surface {
    background-color: var(--color-surface);
}

.section--base {
    background-color: var(--color-base);
}

.section--alt {
    background-color: var(--color-surface-alt);
}

/* Background image section with overlay */
.section--bg {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.section--bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: var(--color-base);
    opacity: 0.85;
    z-index: 1;
}

.section--bg > .container {
    position: relative;
    z-index: 2;
}

/* ---------- Navigation ---------- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(8, 11, 18, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    transition: background-color 500ms var(--ease-smooth);
}

.nav__inner {
    display: flex;
    align-items: center;
    height: var(--nav-height);
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 4vw, 3rem);
    gap: 1.5rem;
}

.nav__logo img {
    height: 42px;
    width: auto;
}

.nav__logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.nav__logo-img {
    height: 60px;
    width: auto;
    display: block;
}

.nav__links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
    margin-left: auto;
    order: 1;
}

.nav__link {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-muted);
    text-decoration: none;
    transition: color 300ms var(--ease-smooth);
}

.nav__link:hover,
.nav__link--active {
    color: var(--color-accent);
}

/* Language Switcher — prominent flag-based design */
.nav__lang {
    position: relative;
    flex-shrink: 0;
    order: 2;
}

.nav__lang-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--color-text);
    font-family: var(--font-family);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 0.5rem 1rem;
    border-radius: 24px;
    cursor: pointer;
    transition: background 300ms var(--ease-smooth), border-color 300ms var(--ease-smooth), box-shadow 300ms var(--ease-smooth);
}

.nav__lang-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--color-accent);
    box-shadow: 0 0 0 1px var(--color-accent), var(--shadow-md);
}

.nav__lang-flag {
    width: 1.4em;
    line-height: 1;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.1);
}

.nav__lang-code {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.nav__lang-chevron {
    width: 10px;
    height: 6px;
    opacity: 0.6;
    transition: transform 300ms var(--ease-smooth), opacity 300ms var(--ease-smooth);
}

.nav__lang-btn:hover .nav__lang-chevron {
    opacity: 1;
}

/* ---------- Language Selection Modal ---------- */
.lang-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 300ms var(--ease-smooth), visibility 300ms var(--ease-smooth);
}

.lang-modal.active {
    opacity: 1;
    visibility: visible;
}

.lang-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 11, 18, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.lang-modal__panel {
    position: relative;
    width: 90vw;
    max-width: 820px;
    max-height: 85vh;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(16px) scale(0.97);
    transition: transform 300ms var(--ease-reveal);
}

.lang-modal.active .lang-modal__panel {
    transform: translateY(0) scale(1);
}

.lang-modal__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
}

.lang-modal__title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-muted);
    white-space: nowrap;
}

.lang-modal__search {
    flex: 1;
    padding: 0.5rem 1rem;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    color: var(--color-text);
    font-family: var(--font-family);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 300ms var(--ease-smooth), box-shadow 300ms var(--ease-smooth);
}

.lang-modal__search:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(0, 194, 203, 0.1);
}

.lang-modal__search::placeholder {
    color: var(--color-muted);
    opacity: 0.6;
}

.lang-modal__close {
    background: none;
    border: none;
    color: var(--color-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    transition: color 200ms var(--ease-smooth), background 200ms var(--ease-smooth);
    line-height: 1;
}

.lang-modal__close:hover {
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.06);
}

.lang-modal__body {
    overflow-y: auto;
    padding: 1.25rem 1.5rem 1.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) transparent;
}

.lang-modal__body::-webkit-scrollbar {
    width: 6px;
}

.lang-modal__body::-webkit-scrollbar-track {
    background: transparent;
}

.lang-modal__body::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 3px;
}

.lang-modal__group {
    margin-bottom: 1.5rem;
}

.lang-modal__group:last-of-type {
    margin-bottom: 0;
}

.lang-modal__group-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(0, 194, 203, 0.15);
}

.lang-modal__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.5rem;
}

.lang-modal__item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    text-decoration: none;
    color: var(--color-muted);
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 200ms var(--ease-smooth), color 200ms var(--ease-smooth);
}

.lang-modal__item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--color-text);
}

.lang-modal__item--active {
    background: rgba(0, 194, 203, 0.1);
    color: var(--color-accent);
}

.lang-modal__item--active:hover {
    background: rgba(0, 194, 203, 0.15);
    color: var(--color-accent);
}

.lang-modal__flag {
    width: 1.5em;
    line-height: 1;
    flex-shrink: 0;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.lang-modal__name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lang-modal__empty {
    text-align: center;
    color: var(--color-muted);
    font-size: 0.95rem;
    padding: 2rem 0;
}

/* Hamburger (mobile only) */
.nav__hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    order: 3;
}

.nav__hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-text);
    transition: transform 500ms var(--ease-smooth), opacity 500ms var(--ease-smooth);
}

/* ---------- Buttons ---------- */
.btn-primary {
    display: inline-block;
    background-color: var(--color-accent);
    color: var(--color-base);
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    padding: 16px 40px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,194,203,0.2);
    transition: background-color 500ms var(--ease-smooth), box-shadow 500ms var(--ease-smooth);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    color: var(--color-base);
    box-shadow: 0 4px 16px rgba(0,194,203,0.3);
}

.btn-ghost {
    display: inline-block;
    background: transparent;
    color: var(--color-accent);
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    padding: 16px 40px;
    border: 1.5px solid var(--color-accent);
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 500ms var(--ease-smooth), color 500ms var(--ease-smooth);
}

.btn-ghost:hover {
    background-color: var(--color-accent);
    color: var(--color-base);
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 70vh;
    padding-top: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

/* Hero slideshow system */
.hero__slides {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero__slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s var(--ease-smooth);
}

.hero__slide.active {
    opacity: 1;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8,11,18,0.6) 0%, rgba(8,11,18,0.8) 100%);
    z-index: 1;
}

/* Bottom fade-out gradient */
.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, var(--color-base) 0%, transparent 100%);
    z-index: 2;
    pointer-events: none;
}

/* Hero stopwatch ambient animation */
.hero__stopwatch {
    position: absolute;
    right: 6%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    pointer-events: none;
    color: var(--color-accent);
    opacity: 0.25;
    width: clamp(280px, 35vw, 500px);
    height: auto;
}

.hero__stopwatch-svg {
    width: 100%;
    height: auto;
    display: block;
}

.hero__second-hand {
    transform-origin: 100px 125px;
    animation: stopwatch-sweep 60s linear infinite;
}

@keyframes stopwatch-sweep {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .hero__second-hand {
        animation: none;
    }
    .hero__stopwatch {
        opacity: 0.04;
    }
}

/* Tablet: center it */
@media (max-width: 1024px) {
    .hero__stopwatch {
        right: 50%;
        transform: translate(50%, -50%);
        opacity: 0.22;
    }
}

/* Mobile: centered, large, visible */
@media (max-width: 768px) {
    .hero__stopwatch {
        right: 50%;
        transform: translate(50%, -50%);
        opacity: 0.20;
        width: 320px;
    }
}

/* Legacy canvas support (kept for backwards compat, hidden by default) */
.hero__canvas {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.hero__content {
    position: relative;
    z-index: 10;
    max-width: 900px;
    padding: 2rem;
}

.hero__headline {
    font-size: clamp(3rem, 7vw, 6rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.hero__subline {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-weight: 400;
    color: var(--color-muted);
    font-style: italic;
    margin-bottom: 2.5rem;
}

.hero__body {
    font-size: 1.1rem;
    color: #ffffff;
    font-weight: 700;
    max-width: 800px;
    margin: 0 auto 2rem;
    line-height: 1.78;
    text-align: justify;
    -webkit-hyphens: none;
    hyphens: none;
}

.hero__cta {
    margin-top: 1rem;
}

/* Page hero (non-home) */
.page-hero {
    position: relative;
    padding: calc(var(--nav-height) + 5rem) 0 4rem;
    text-align: center;
    background-size: cover;
    background-position: center;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: var(--color-base);
    opacity: 0.88;
    z-index: 1;
}

.page-hero > .container {
    position: relative;
    z-index: 2;
}

.page-hero__title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 600;
    margin-bottom: 1rem;
}

.page-hero__subline {
    font-size: 1.25rem;
    color: var(--color-muted);
    font-style: italic;
    max-width: 700px;
    margin: 0 auto;
}

/* ---------- Department Cards ---------- */
.dept-card {
    background-color: var(--color-card);
    box-shadow: var(--shadow-sm);
    border-radius: 20px;
    padding: 2.5rem;
    transition: transform 500ms var(--ease-smooth), box-shadow 500ms var(--ease-smooth), background-color 500ms var(--ease-smooth);
}

.dept-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background-color: #1A2236;
}

.dept-card__icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    color: var(--color-accent);
    transition: color 500ms var(--ease-smooth);
}

.dept-card:hover .dept-card__icon {
    color: var(--color-text);
}

.dept-card__icon img,
.dept-card__icon svg {
    width: 48px;
    height: 48px;
}

.dept-card__title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.dept-card__body {
    color: var(--color-muted);
    line-height: 1.78;
}

/* ---------- Stats Bar ---------- */
/* ---------- Showcase (Stats + Report Split) ---------- */
.showcase {
    background-color: var(--color-surface-alt);
    padding: 3rem 0;
}

.showcase__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: stretch;
}

.showcase__stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    text-align: center;
    padding: 2rem;
}

.showcase__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.showcase__number {
    font-size: clamp(3rem, 6vw, 4.5rem);
    font-weight: 800;
    color: var(--color-accent);
    line-height: 1;
    font-feature-settings: 'tnum';
}

.showcase__number--zero {
    font-size: clamp(2rem, 4vw, 3rem);
}

.showcase__label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
    margin-top: 0.5rem;
}

.showcase__divider {
    width: 80px;
    height: 1px;
    background: var(--color-border);
}

/* Report Card */
.showcase__report {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--color-text);
    background: linear-gradient(135deg, rgba(0,194,203,0.08) 0%, rgba(0,194,203,0.02) 100%);
    border: 1px solid rgba(0,194,203,0.2);
    border-radius: 16px;
    padding: 2.5rem;
    overflow: hidden;
    transition: border-color 400ms ease, box-shadow 400ms ease, transform 400ms ease;
}

.showcase__report:hover {
    border-color: rgba(0,194,203,0.5);
    box-shadow: 0 0 40px rgba(0,194,203,0.12), 0 8px 32px rgba(0,0,0,0.3);
    transform: translateY(-2px);
}

.showcase__map-bg {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    overflow: hidden;
}

.showcase__map-svg {
    width: 110%;
    height: auto;
    color: rgba(0,194,203,0.07);
    transition: color 600ms ease;
}

.showcase__report:hover .showcase__map-svg {
    color: rgba(0,194,203,0.13);
}

.showcase__report-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.showcase__report-badge {
    display: inline-block;
    background: var(--color-accent);
    color: var(--color-base);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    margin-bottom: 1.25rem;
}

.showcase__report-title {
    font-size: clamp(1.3rem, 2.5vw, 1.75rem);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    color: #ffffff;
}

.showcase__report-sub {
    font-size: 0.95rem;
    color: var(--color-muted);
    margin-bottom: 1.75rem;
    font-style: italic;
}

.showcase__report-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-accent);
    letter-spacing: 0.03em;
    transition: gap 300ms ease;
}

.showcase__report:hover .showcase__report-cta {
    gap: 0.85rem;
}

.showcase__report-cta svg {
    transition: transform 300ms ease;
}

.showcase__report:hover .showcase__report-cta svg {
    transform: translateX(3px);
}

/* Keep stats-bar for report page */
.stats-bar {
    background-color: var(--color-surface-alt);
    padding: 3rem 0;
    text-align: center;
}

.stats-bar__content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.stats-bar__item {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
}

.stats-bar__number {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 800;
    color: var(--color-accent);
    display: block;
    line-height: 1;
    font-feature-settings: 'tnum';
}

.stats-bar__divider {
    width: 1px;
    height: 60px;
    background-color: var(--color-border);
}

/* ---------- Three Circles ---------- */
/* ---------- Arena Tabs ---------- */
.arena-tabs {
    max-width: 900px;
    margin: 0 auto;
}

.arena-tabs__nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid rgba(255,255,255,0.1);
}

.arena-tabs__btn {
    flex: 1;
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--color-muted);
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 300ms ease, border-color 300ms ease, background 300ms ease;
    margin-bottom: -2px;
}

.arena-tabs__btn:hover {
    color: var(--color-text);
    background: rgba(255,255,255,0.03);
}

.arena-tabs__btn--active {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

.arena-tabs__panels {
    position: relative;
}

.arena-tabs__panel {
    display: none;
    padding: 2.5rem 2rem;
    background: var(--color-card);
    border-radius: 0 0 16px 16px;
    box-shadow: var(--shadow-sm);
    animation: tabFadeIn 350ms ease;
}

.arena-tabs__panel--active {
    display: block;
}

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

.arena-tabs__body {
    color: var(--color-muted);
    line-height: 1.85;
    text-align: justify;
    -webkit-hyphens: none;
    hyphens: none;
    font-size: 1.05rem;
}

.arena-tabs__citation {
    font-size: 0.8rem;
    color: var(--color-muted);
    font-style: italic;
    margin-top: 1.25rem;
}

/* Legacy classes kept for other uses */
.circle-block__body {
    color: var(--color-muted);
    line-height: 1.78;
}

.circle-block__citation {
    font-size: 0.8rem;
    color: var(--color-muted);
    font-style: italic;
    margin-top: 1rem;
}

/* ---------- Video Embed ---------- */
.video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ---------- Footer ---------- */
.footer {
    background-color: var(--color-base);
    border-top: none;
    box-shadow: 0 -1px 0 var(--color-border);
    padding: 6rem 0 3rem;
    color: var(--color-muted);
    font-size: 0.9rem;
}

.footer__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer__address {
    line-height: 1.8;
}

.footer__address strong {
    color: var(--color-text);
    font-weight: 700;
}

.footer__tagline {
    font-style: italic;
    color: var(--color-accent);
    margin-top: 1.5rem;
    font-size: 1rem;
}

.footer__disclaimer {
    font-size: 0.8rem;
    font-style: italic;
    color: var(--color-muted);
    box-shadow: 0 -1px 0 var(--color-border);
    padding-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer__copyright {
    font-size: 0.8rem;
    color: var(--color-muted);
    text-align: center;
}

/* ---------- Contact Form ---------- */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    color: var(--color-text);
    font-family: var(--font-family);
    font-size: 1rem;
    transition: border-color 300ms var(--ease-smooth), box-shadow 300ms var(--ease-smooth);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(0,194,203,0.1);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

/* Honeypot field — hidden from humans, visible to bots */
.form-hp {
    position: absolute;
    left: -9999px;
}

/* Qualifier question */
.qualifier {
    background-color: var(--color-card);
    box-shadow: var(--shadow-sm);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.qualifier__question {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.qualifier__option {
    display: block;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background-color: var(--color-surface);
    box-shadow: var(--shadow-sm);
    border: none;
    border-radius: 12px;
    color: var(--color-text);
    cursor: pointer;
    transition: box-shadow 300ms var(--ease-smooth), background-color 300ms var(--ease-smooth);
}

.qualifier__option:hover {
    box-shadow: 0 0 0 1.5px var(--color-accent);
}

.qualifier__option--selected {
    box-shadow: 0 0 0 1.5px var(--color-accent);
    background-color: rgba(0, 194, 203, 0.1);
}

/* ---------- Graphs / Charts Common ---------- */
.graph-container {
    background-color: var(--color-card);
    box-shadow: var(--shadow-sm);
    border-radius: 20px;
    padding: 2.5rem;
    margin: 3rem 0;
}

.graph-container canvas {
    max-width: 100%;
}

.graph-title {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.graph-wrapper {
    position: relative;
    width: 100%;
}

.graph-source {
    font-size: 0.75rem;
    color: var(--color-muted);
    font-style: italic;
    margin-top: 1rem;
}

/* Stat highlight (transfusion) */
.stat-highlight {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-highlight__number {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 800;
    color: var(--color-accent);
    font-feature-settings: 'tnum';
}

.stat-highlight__arrow {
    font-size: 3rem;
    color: var(--color-accent);
}

.stat-highlight__label {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
}

/* ---------- Calculator Widget ---------- */
.calculator {
    background-color: var(--color-card);
    box-shadow: var(--shadow-sm);
    border-radius: 20px;
    padding: 2.5rem;
    margin: 3rem 0;
    position: relative;
    overflow: hidden;
}

/* Subtle gradient header bar replacing border-top accent */
.calculator::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-accent) 0%, rgba(0,194,203,0.3) 100%);
    border-radius: 20px 20px 0 0;
}

.calculator__title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.calculator__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.calculator__inputs {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.calculator__field label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.calculator__select,
.calculator__input {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    color: var(--color-text);
    font-family: var(--font-family);
    font-size: 1rem;
    transition: border-color 300ms var(--ease-smooth);
}

.calculator__select:focus,
.calculator__input:focus {
    outline: none;
    border-color: var(--color-accent);
}

.calculator__slider {
    width: 100%;
    margin-top: 0.5rem;
}

.calculator__output {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.calculator__result {
    background-color: var(--color-surface);
    border-radius: 16px;
    padding: 1.25rem;
    text-align: center;
}

.calculator__result--highlight {
    background-color: rgba(0, 194, 203, 0.08);
}

.calculator__label {
    display: block;
    font-size: 0.85rem;
    color: var(--color-muted);
    margin-bottom: 0.5rem;
}

.calculator__value {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: var(--color-accent);
    font-feature-settings: 'tnum';
}

/* Legacy aliases */
.calculator__controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.calculator__stat {
    text-align: center;
}

.calculator__stat-value {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--color-accent);
    line-height: 1;
    margin-bottom: 0.5rem;
    font-feature-settings: 'tnum';
}

.calculator__stat-label {
    font-size: 0.85rem;
    color: var(--color-muted);
}

/* Custom slider styling */
.calculator input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: var(--color-border);
    border-radius: 3px;
    outline: none;
}

.calculator input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-accent);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,194,203,0.3);
}

.calculator input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-accent);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0,194,203,0.3);
}

/* ---------- World Map ---------- */
.world-map {
    margin: 3rem 0;
}

.world-map svg {
    width: 100%;
    height: auto;
}

/* ---------- Hemorrhagic Shock Classification ---------- */
.shock-chart {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 3rem 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background-color: var(--color-card);
}

.shock-band {
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 4px solid transparent;
    transition: background-color 300ms var(--ease-smooth);
}

.shock-band + .shock-band {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

/* Color-coded severity accents */
.shock-band--i {
    border-left-color: #22C55E;
}

.shock-band--ii {
    border-left-color: #EAB308;
}

.shock-band--iii {
    border-left-color: #F97316;
}

.shock-band--iv {
    border-left-color: #EF4444;
}

.shock-bands {
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    overflow: hidden;
    background-color: var(--color-surface);
}

.shock-band__class,
.shock-band__header {
    font-weight: 700;
    font-size: 1.1rem;
    min-width: 100px;
}

.shock-band__volume,
.shock-band__detail {
    flex: 1;
    padding: 0 2rem;
    color: var(--color-muted);
}

.shock-band__status,
.shock-band__symptoms {
    font-weight: 600;
    text-align: right;
    min-width: 200px;
}

/* ---------- Transfusion Cost Visual ---------- */
.transfusion-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    padding: 3rem 0;
    text-align: center;
}

.transfusion-visual__amount {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 800;
    color: var(--color-accent);
    font-feature-settings: 'tnum';
}

.transfusion-visual__arrow {
    font-size: 3rem;
    color: var(--color-accent);
}

.transfusion-visual__result {
    max-width: 400px;
}

.transfusion-visual__result h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* ---------- Admin Styles ---------- */
.admin-layout {
    padding-top: var(--nav-height);
    min-height: 100vh;
}

.admin-sidebar {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    width: 250px;
    height: calc(100vh - var(--nav-height));
    background-color: var(--color-surface);
    box-shadow: 1px 0 0 var(--color-border);
    padding: 2rem 0;
    overflow-y: auto;
}

.admin-sidebar__link {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--color-muted);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 12px 12px 0;
    margin-right: 0.5rem;
    transition: background-color 500ms var(--ease-smooth), color 500ms var(--ease-smooth);
}

.admin-sidebar__link:hover,
.admin-sidebar__link--active {
    background-color: var(--color-card);
    color: var(--color-accent);
}

.admin-content {
    margin-left: 250px;
    padding: 2rem;
}

.admin-table-wrapper {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background-color: var(--color-card);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
}

.admin-table th {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: var(--color-surface);
}

.admin-table td {
    color: var(--color-text);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.admin-table tr:hover td {
    background-color: rgba(255,255,255,0.02);
}

.badge--on {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: rgba(0, 194, 203, 0.15);
    color: var(--color-accent);
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge--off {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: rgba(239, 68, 68, 0.15);
    color: #EF4444;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Alert messages */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
}

.alert--success {
    background-color: rgba(0, 194, 203, 0.1);
    color: var(--color-accent);
}

.alert--error {
    background-color: rgba(239, 68, 68, 0.1);
    color: #EF4444;
}

/* ---------- Admin Buttons ---------- */
.btn {
    display: inline-block;
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.6rem 1.25rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 200ms, box-shadow 200ms;
    line-height: 1.4;
}

.btn--primary {
    background-color: var(--color-accent);
    color: var(--color-base);
    box-shadow: 0 2px 8px rgba(0,194,203,0.2);
}

.btn--primary:hover {
    background-color: var(--accent-hover);
    box-shadow: 0 4px 16px rgba(0,194,203,0.3);
}

.btn--danger {
    background-color: rgba(239,68,68,0.15);
    color: #EF4444;
}

.btn--danger:hover {
    background-color: rgba(239,68,68,0.25);
}

.btn--ghost {
    background: transparent;
    color: var(--color-accent);
    border: 1.5px solid var(--color-accent);
}

.btn--ghost:hover {
    background-color: var(--color-accent);
    color: var(--color-base);
}

.btn--sm {
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
}

.btn--full {
    display: block;
    width: 100%;
    text-align: center;
}

/* ---------- Admin Login Page ---------- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-bg);
    padding: 2rem;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background-color: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

.login-card__logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-card__title {
    font-family: var(--font-family);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--color-text);
    text-align: center;
    margin-bottom: 1.5rem;
}

/* ---------- Admin Stat Cards ---------- */
.admin-stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.admin-stat-card {
    background-color: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 1.5rem;
    text-decoration: none;
    transition: border-color 200ms, box-shadow 200ms;
}

.admin-stat-card:hover {
    border-color: var(--color-accent);
    box-shadow: 0 4px 20px rgba(0,194,203,0.1);
}

.admin-stat-card__number {
    display: block;
    font-family: var(--font-family);
    font-weight: 800;
    font-size: 2rem;
    color: var(--color-accent);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.admin-stat-card__label {
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--color-muted);
}

/* ---------- Admin Form Helpers ---------- */
.admin-form-card {
    background-color: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.admin-form-card__title {
    font-family: var(--font-family);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-text);
    margin-bottom: 1rem;
}

.admin-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.admin-toolbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.admin-toolbar__title {
    font-family: var(--font-family);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--color-text);
    margin-right: auto;
}

.admin-band-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.admin-band-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    border-radius: 12px;
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 0.75rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--color-border);
}

.admin-band-pill__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* Background slot cards */
.admin-bg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.admin-bg-card {
    background-color: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 1.25rem;
}

.admin-bg-card__label {
    font-family: var(--font-family);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-text);
    margin-bottom: 0.75rem;
}

.admin-bg-card__preview {
    width: 100%;
    height: 140px;
    border-radius: 10px;
    overflow: hidden;
    background-color: var(--color-surface);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-bg-card__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-bg-card__placeholder {
    color: var(--color-muted);
    font-size: 0.8rem;
}

.admin-opacity-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.admin-opacity-row input[type="range"] {
    flex: 1;
    accent-color: var(--color-accent);
}

.admin-opacity-row__value {
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--color-accent);
    min-width: 35px;
    text-align: right;
}

/* ---------- Sticky Page Section Nav ---------- */
.page-nav {
    position: sticky;
    top: var(--nav-height);
    z-index: 900;
    background: rgba(8, 11, 18, 0.92);
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    box-shadow: 0 1px 0 var(--color-border);
}

.page-nav__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 3vw, 2rem);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.page-nav__inner::-webkit-scrollbar {
    display: none;
}

.page-nav__link {
    flex-shrink: 0;
    padding: 0.75rem 1.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color 300ms var(--ease-smooth), border-color 300ms var(--ease-smooth);
}

.page-nav__link:hover {
    color: var(--color-text);
}

.page-nav__link--active {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

/* Anchor offset — keep heading visible below both fixed nav + sticky page-nav.
   Fixed nav = 88px, sticky page-nav ≈ 40px, total ≈ 128px + 12px breathing room */
section[id] {
    scroll-margin-top: 140px;
}

/* ---------- Chart Pair (side-by-side on desktop) ---------- */
.chart-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 3rem;
}

.chart-pair__item .graph-container {
    margin: 0;
    height: 100%;
}

/* ---------- Accordion (Department Cards) ---------- */
.accordion {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.accordion__item {
    background: var(--color-card);
    border-radius: 16px;
    overflow: hidden;
    transition: box-shadow 300ms var(--ease-smooth);
}

.accordion__item:hover {
    box-shadow: var(--shadow-md);
}

.accordion__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: none;
    border: none;
    color: var(--color-text);
    font-family: var(--font-family);
    cursor: pointer;
    text-align: left;
    transition: background 200ms var(--ease-smooth);
}

.accordion__header:hover {
    background: rgba(255, 255, 255, 0.03);
}

.accordion__icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    color: var(--color-accent);
}

.accordion__icon img,
.accordion__icon svg {
    width: 36px;
    height: 36px;
}

/* SVGs loaded via <img> can't inherit currentColor — use filter to colorize.
   brightness(0) makes black, invert(1) makes white, then sepia/saturate/hue-rotate
   tints to the accent cyan (#00C2CB). */
.accordion__icon img {
    filter: brightness(0) invert(72%) sepia(60%) saturate(500%) hue-rotate(140deg) brightness(1.05);
}

.accordion__title {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 600;
}

.accordion__chevron {
    flex-shrink: 0;
    color: var(--color-muted);
    transition: transform 300ms var(--ease-smooth), color 300ms var(--ease-smooth);
}

.accordion__item--open .accordion__chevron {
    transform: rotate(180deg);
    color: var(--color-accent);
}

.accordion__body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 400ms var(--ease-smooth);
}

.accordion__content {
    padding: 0 1.5rem 1.5rem;
    color: var(--color-muted);
    line-height: 1.78;
}

.accordion__content p {
    margin-bottom: 1rem;
}

.accordion__content p:last-child {
    margin-bottom: 0;
}

.accordion__content h4 {
    color: var(--color-text);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Styled list items for clinical sections */
.section ul {
    list-style: none;
    padding-left: 0;
}

.section ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--color-muted);
}

.section ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.7em;
    width: 6px;
    height: 6px;
    background: var(--color-accent);
    border-radius: 50%;
}

/* ---------- Report Map ---------- */
.report-map {
    width: 100%;
    min-height: 500px;
}

.report-map svg {
    width: 100%;
    height: auto;
}

.report-map__legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 1rem 0;
}

.report-map__legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 11px;
    color: var(--color-muted);
    text-transform: uppercase;
}

.report-map__swatch {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    flex-shrink: 0;
}

/* ---------- Index Methodology Accordion ---------- */
.index-accordion {
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    background: rgba(255,255,255,0.02);
    overflow: hidden;
}
.index-accordion__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    cursor: pointer;
    list-style: none;
}
.index-accordion__trigger::-webkit-details-marker { display: none; }
.index-accordion__title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}
.index-accordion__chevron {
    transition: transform 300ms ease;
    flex-shrink: 0;
    opacity: 0.5;
}
.index-accordion[open] .index-accordion__chevron {
    transform: rotate(180deg);
}
.index-accordion__body {
    padding: 0 1.5rem 1.5rem;
    font-size: 0.92rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.75);
}
.index-accordion__body h4 {
    color: rgba(255,255,255,0.9);
    font-size: 0.95rem;
    margin: 1.25rem 0 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.index-accordion__body ol,
.index-accordion__body ul {
    padding-left: 1.25rem;
    margin: 0.5rem 0;
}
.index-accordion__body li {
    margin-bottom: 0.4rem;
}
.index-accordion__bands li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin-bottom: 0.5rem;
}
.index-accordion__bands {
    padding-left: 0 !important;
}

/* ---------- Nation Directory ---------- */
.nation-dir__heading {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.5);
    margin-bottom: 1rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.nation-dir__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2px;
}
.nation-dir__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.65rem;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: rgba(255,255,255,0.85);
    font-family: inherit;
    font-size: 0.82rem;
    cursor: pointer;
    text-align: left;
    transition: background 150ms;
}
.nation-dir__item:hover {
    background: rgba(255,255,255,0.06);
}
.nation-dir__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.nation-dir__flag {
    font-size: 1rem;
    line-height: 1;
    flex-shrink: 0;
}
.nation-dir__flag .fi {
    font-size: 1.15rem;
    border-radius: 2px;
}
.nation-dir__name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (max-width: 600px) {
    .nation-dir__grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    .nation-dir__item {
        font-size: 0.78rem;
        padding: 0.4rem 0.5rem;
    }
}

/* ---------- Map Tooltip ---------- */
.map-tooltip {
    position: fixed;
    pointer-events: none;
    z-index: 3000;
    background: #161D2C;
    border: 1px solid #1E2A3A;
    border-radius: 6px;
    padding: 10px 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 150ms;
}

.map-tooltip.active {
    opacity: 1;
}

.map-tooltip__name {
    font-family: var(--font-family);
    font-weight: 700;
    font-size: 13px;
    color: #F0F4F8;
}

.map-tooltip__score {
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 11px;
    color: #8892A4;
}

/* ---------- Country Card Backdrop ---------- */
.country-card__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(8,11,18,0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 300ms, visibility 300ms;
}

.country-card__backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* ---------- Country Card Panel ---------- */
.country-card {
    position: fixed;
    right: 0;
    top: 0;
    width: 420px;
    height: 100vh;
    z-index: 2000;
    background: #111827;
    box-shadow: -8px 0 40px rgba(0,0,0,0.6);
    transform: translateX(420px);
    transition: transform 300ms ease-out;
    overflow-y: auto;
    scrollbar-width: thin;
    display: flex;
    flex-direction: column;
}

.country-card::-webkit-scrollbar {
    width: 6px;
}

.country-card::-webkit-scrollbar-track {
    background: transparent;
}

.country-card::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 3px;
}

.country-card.active {
    transform: translateX(0);
}

.country-card__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8892A4;
    background: rgba(30,42,58,0.6);
    border: 1px solid rgba(30,42,58,0.8);
    border-radius: 50%;
    cursor: pointer;
    z-index: 1;
    transition: color 200ms, background 200ms;
}

.country-card__close svg {
    width: 18px;
    height: 18px;
}

.country-card__close:hover {
    color: #F0F4F8;
    background: rgba(255,68,68,0.25);
    border-color: rgba(255,68,68,0.4);
}

/* Country Card — Hero Panel */
.country-card__hero {
    padding: 24px 24px 20px;
    background: #0A0D14;
    background-image: radial-gradient(circle at top left, rgba(0,194,203,0.06) 0%, transparent 60%);
    border-bottom: 1px solid #1E2A3A;
    flex-shrink: 0;
}

.country-card__identity {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.country-card__flag {
    flex-shrink: 0;
    line-height: 1;
}

.country-card__identity-text {
    min-width: 0;
}

.country-card__name {
    font-family: var(--font-family);
    font-weight: 800;
    font-size: 1.125rem;
    color: #F0F4F8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.2;
    overflow-wrap: break-word;
}

.country-card__region {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 11px;
    color: #8892A4;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-top: 2px;
}

.country-card__gap {
    text-align: center;
    margin-bottom: 12px;
}

.country-card__gap-label {
    display: block;
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 10px;
    color: #8892A4;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 2px;
}

.country-card__gap-number {
    display: block;
    font-family: var(--font-family);
    font-weight: 800;
    font-size: 3rem;
    line-height: 1.1;
}

.country-card__gap-band {
    display: block;
    font-family: var(--font-family);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 2px;
}

.country-card__mmr {
    text-align: center;
    margin-bottom: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(30,42,58,0.5);
}

.country-card__mmr-label {
    display: block;
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 9px;
    color: #8892A4;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-bottom: 4px;
}

.country-card__mmr-number {
    font-family: var(--font-family);
    font-weight: 800;
    font-size: 24px;
    color: #F0F4F8;
}

.country-card__mmr-unit {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 11px;
    color: #8892A4;
    margin-left: 4px;
}

.country-card__blurb {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 12px;
    color: #8892A4;
    line-height: 1.55;
    margin-top: 4px;
}

/* Country Card — Data Panel */
.country-card__data {
    padding: 20px 24px 24px;
    flex-grow: 1;
}

.country-card__bars {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bar-row {
    display: block;
    margin-bottom: 2px;
}

.bar-row__header {
    display: block;
}

.bar-row--expandable .bar-row__header:hover .bar-row__label {
    color: var(--color-accent);
}

.bar-row__label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 9px;
    color: #8892A4;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 5px;
    transition: color 200ms;
}

.bar-row__chevron {
    display: inline-block;
    vertical-align: middle;
    color: #8892A4;
    transition: transform 200ms, color 200ms;
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    min-width: 12px;
}

.bar-row--expandable .bar-row__header:hover .bar-row__chevron {
    color: var(--color-accent);
}

.bar-row--open .bar-row__chevron {
    transform: rotate(180deg);
}

.bar-row__track {
    display: inline-block;
    vertical-align: middle;
    width: calc(100% - 40px);
    height: 6px;
    background: #1E2A3A;
    border-radius: 3px;
    overflow: hidden;
}

.bar-row__fill {
    height: 100%;
    border-radius: 3px;
    width: 0;
    transition: width 600ms ease-out;
}

.bar-row__fill.animated {
    /* width set dynamically by JS via inline style */
}

.bar-row__score {
    display: inline-block;
    vertical-align: middle;
    font-family: var(--font-family);
    font-weight: 700;
    font-size: 11px;
    width: 32px;
    text-align: right;
}

.bar-row__summary {
    max-height: 0;
    overflow: hidden;
    transition: max-height 300ms ease, padding 300ms ease;
    font-size: 0.8rem;
    line-height: 1.6;
    color: #8892A4;
    padding: 0 0 0 2px;
    border-left: 2px solid transparent;
}

.bar-row--open .bar-row__summary {
    max-height: 300px;
    padding: 8px 0 12px 10px;
    border-left-color: var(--color-accent);
}

.country-card__divider {
    height: 1px;
    background: #1E2A3A;
    margin: 20px 0;
}

.country-card__summary-label {
    font-family: var(--font-family);
    font-weight: 700;
    font-size: 10px;
    color: #00C2CB;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    display: block;
    margin-bottom: 8px;
}

.country-card__summary-text {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 12px;
    color: #8892A4;
    line-height: 1.6;
    max-height: 80px;
    overflow: hidden;
    transition: max-height 400ms ease;
}

.country-card__summary-text.expanded {
    max-height: 1200px;
}

.country-card__summary-toggle {
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 12px;
    color: #00C2CB;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 0 0;
    display: block;
}

.country-card__citation {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 10px;
    color: #4A5568;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #1E2A3A;
    line-height: 1.5;
}

/* ---------- Country Card — Mobile ---------- */
@media (max-width: 768px) {
    .country-card {
        width: 100vw;
        height: auto;
        max-height: 92vh;
        bottom: 0;
        top: auto;
        right: auto;
        left: 0;
        border-radius: 16px 16px 0 0;
        transform: translateY(100%);
    }

    .country-card.active {
        transform: translateY(0);
    }

    .country-card__hero {
        padding: 18px;
    }

    .country-card__data {
        padding: 18px;
    }

    .country-card__gap-number {
        font-size: 2.5rem;
    }
}

/* ---------- Country Card — Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .country-card,
    .country-card__backdrop,
    .bar-row__fill,
    .map-tooltip {
        transition: none;
    }
}

/* ---------- Country Card — RTL ---------- */
[dir="rtl"] .country-card {
    left: 0;
    right: auto;
    transform: translateX(-420px);
    box-shadow: 8px 0 40px rgba(0,0,0,0.6);
}

[dir="rtl"] .country-card.active {
    transform: translateX(0);
}

[dir="rtl"] .bar-row__label {
    text-align: left;
}

[dir="rtl"] .bar-row__score {
    text-align: left;
}

[dir="rtl"] .bar-row__summary {
    padding-left: 0;
    padding-right: 10px;
    border-left: none;
    border-right: 2px solid transparent;
}

[dir="rtl"] .bar-row--open .bar-row__summary {
    border-right-color: var(--color-accent);
}

[dir="rtl"] .country-card__close {
    right: auto;
    left: 16px;
}

@media (max-width: 768px) {
    [dir="rtl"] .country-card {
        left: 0;
        right: auto;
        transform: translateY(100%);
    }

    [dir="rtl"] .country-card.active {
        transform: translateY(0);
    }
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.text-accent { color: var(--color-accent); }
.text-muted  { color: var(--color-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ---------- Scroll Reveal Animation ---------- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 800ms var(--ease-reveal), transform 800ms var(--ease-reveal);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Responsive ---------- */

/* Tablet */
@media (max-width: 1024px) {
    .arena-tabs__btn {
        font-size: 0.9rem;
        padding: 0.75rem 0.75rem;
    }

    .arena-tabs__panel {
        padding: 2rem 1.5rem;
    }

    .footer__inner {
        grid-template-columns: 1fr;
    }

    .calculator__controls {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        display: none;
    }

    .admin-content {
        margin-left: 0;
    }
}

/* Tablet — chart pair stacks */
@media (max-width: 900px) {
    .chart-pair {
        grid-template-columns: 1fr;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .page-nav__link {
        padding: 0.6rem 0.75rem;
        font-size: 0.7rem;
    }

    .accordion__header {
        padding: 1rem 1.25rem;
        gap: 0.75rem;
    }

    .accordion__content {
        padding: 0 1.25rem 1.25rem;
    }

    .nav__links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: rgba(8, 11, 18, 0.95);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        padding: 1rem 0;
    }

    .nav__links.active {
        display: flex;
    }

    .nav__link {
        padding: 0.75rem 2rem;
    }

    .nav__hamburger {
        display: flex;
    }

    .nav__lang {
        margin-right: 1rem;
    }

    .nav__lang-code {
        display: none;
    }

    .nav__lang-chevron {
        display: none;
    }

    .nav__lang-btn {
        padding: 0.4rem 0.7rem;
    }

    .lang-modal__panel {
        width: 95vw;
        max-height: 90vh;
        border-radius: 16px;
    }

    .lang-modal__header {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 1rem;
    }

    .lang-modal__title {
        width: 100%;
        order: -1;
    }

    .lang-modal__search {
        flex: 1;
        min-width: 0;
    }

    .lang-modal__body {
        padding: 1rem;
    }

    .lang-modal__grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .section {
        padding: 6vh 0;
    }

    .container {
        padding: 0 1.25rem;
    }

    .showcase__grid {
        grid-template-columns: 1fr;
    }

    .showcase__report {
        min-height: 280px;
    }

    .stats-bar__content {
        flex-direction: column;
    }

    .stats-bar__divider {
        width: 60px;
        height: 1px;
    }

    .transfusion-visual {
        flex-direction: column;
    }

    .shock-band {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .shock-band__status {
        text-align: left;
    }

    .calculator__grid {
        grid-template-columns: 1fr;
    }

    .calculator__output {
        grid-template-columns: 1fr;
    }

    .shock-band__symptoms {
        text-align: left;
    }

    .dept-card {
        padding: 2rem;
    }

    .arena-tabs__panel {
        padding: 1.5rem 1rem;
    }

    .arena-tabs__body {
        text-align: left;
    }
}

/* ---------- RTL Support for Arabic ---------- */
[dir="rtl"] .nav__links {
    flex-direction: row-reverse;
}

/* Modal is centered, no RTL flip needed for positioning */

[dir="rtl"] .dept-card {
    /* No border-left accent to flip; shadows are symmetric */
}

[dir="rtl"] .admin-sidebar {
    left: auto;
    right: 0;
    box-shadow: -1px 0 0 var(--color-border);
}

[dir="rtl"] .admin-sidebar__link {
    border-radius: 12px 0 0 12px;
    margin-right: 0;
    margin-left: 0.5rem;
}

[dir="rtl"] .admin-content {
    margin-left: 0;
    margin-right: 250px;
}

[dir="rtl"] .shock-band {
    border-left: none;
    border-right: 4px solid transparent;
}

[dir="rtl"] .shock-band--i {
    border-right-color: #22C55E;
}

[dir="rtl"] .shock-band--ii {
    border-right-color: #EAB308;
}

[dir="rtl"] .shock-band--iii {
    border-right-color: #F97316;
}

[dir="rtl"] .shock-band--iv {
    border-right-color: #EF4444;
}

@media (max-width: 1024px) {
    [dir="rtl"] .admin-content {
        margin-right: 0;
    }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .hero__slide {
        transition: none;
    }

    .hero__canvas {
        display: none;
    }

    .hero {
        background: linear-gradient(180deg, var(--color-base) 0%, var(--color-surface) 100%);
    }

    .dept-card,
    .circle-block,
    .btn-primary,
    .btn-ghost,
    .nav__link,
    a {
        transition: none;
    }
}

/* On narrow screens, justified text creates gaps — revert to left-align */
@media (max-width: 480px) {
    .section p,
    .accordion__content p,
    .country-card__blurb,
    .circle-block__body,
    .footer__disclaimer {
        text-align: left;
        hyphens: none;
    }
}
