/* ============================================
   VARIABLES & RESET
   ============================================ */
:root {
    --bg-1: #020617;
    --bg-2: #0f172a;
    --surface: #f8fafc;
    --surface-strong: #ffffff;
    --text-main: #0f172a;
    --text-soft: #475569;
    --accent-1: #f59e0b;
    --accent-2: #ea580c;
    --accent-3: #10b981;
    --line: #10b981;
    --node-gray-1: #e5e7eb;
    --node-gray-2: #9ca3af;
    --node-border: #111827;
    --ok: #10b981;
    --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.28);
    --shadow-strong: 0 28px 70px rgba(2, 6, 23, 0.55);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

.hidden {
    display: none !important;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    color: var(--surface);
    min-height: 100%;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background:
        radial-gradient(circle at 8% 12%, rgba(245, 158, 11, 0.15), transparent 28%),
        radial-gradient(circle at 88% 16%, rgba(16, 185, 129, 0.15), transparent 30%),
        linear-gradient(140deg, var(--bg-1) 0%, var(--bg-2) 48%, #1e293b 100%);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   START SCREEN (Redesigned)
   ============================================ */
.start-screen {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 20px;
    overflow-y: auto;
    background:
        radial-gradient(ellipse at 20% 15%, rgba(245, 158, 11, 0.2), transparent 40%),
        radial-gradient(ellipse at 80% 20%, rgba(16, 185, 129, 0.18), transparent 42%),
        radial-gradient(ellipse at 50% 80%, rgba(234, 88, 12, 0.1), transparent 40%),
        linear-gradient(135deg, #020617 0%, #0f172a 55%, #1e293b 100%);
}

.start-screen.hidden {
    display: none;
}

.start-card {
    width: min(820px, 96vw);
    padding: clamp(28px, 5vw, 52px) clamp(20px, 4vw, 48px);
    border-radius: 28px;
    border: 1px solid rgba(248, 250, 252, 0.14);
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
        0 30px 80px rgba(2, 6, 23, 0.6),
        inset 0 1px 0 rgba(248, 250, 252, 0.08);
    text-align: center;
    animation: cardEntry 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes cardEntry {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.start-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.start-card h1 {
    margin: 0;
    font-size: clamp(2rem, 5.5vw, 3.6rem);
    line-height: 1.1;
    color: #f8fafc;
    font-weight: 900;
}

.start-highlight {
    background: linear-gradient(90deg, #fbbf24, #f97316, #10b981);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.start-desc {
    margin: 14px auto 0;
    max-width: 560px;
    color: #94a3b8;
    font-size: clamp(0.95rem, 2vw, 1.12rem);
    line-height: 1.6;
    font-weight: 400;
}

.start-actions {
    margin-top: 28px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.start-btn {
    border: 1px solid rgba(248, 250, 252, 0.28);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.96), rgba(234, 88, 12, 0.96));
    color: #0f172a;
    border-radius: 999px;
    padding: 12px 24px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    box-shadow: 0 10px 20px rgba(234, 88, 12, 0.28);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(234, 88, 12, 0.38);
    filter: saturate(1.08);
}

.start-btn:active {
    transform: translateY(0) scale(0.97);
}

.start-btn:focus-visible {
    outline: 2px solid #f59e0b;
    outline-offset: 3px;
}

.start-btn.secondary {
    background: rgba(248, 250, 252, 0.08);
    border: 1px solid rgba(248, 250, 252, 0.2);
    color: #f8fafc;
    box-shadow: 0 8px 20px rgba(2, 6, 23, 0.3);
}

.start-btn.secondary:hover {
    background: rgba(248, 250, 252, 0.14);
    box-shadow: 0 12px 28px rgba(2, 6, 23, 0.4);
}

.start-btn.rubric-start-btn {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.85), rgba(20, 184, 166, 0.85));
    color: #0f172a;
    border: 1px solid rgba(16, 185, 129, 0.4);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.25);
}

.start-btn.rubric-start-btn:hover {
    box-shadow: 0 14px 28px rgba(16, 185, 129, 0.38);
    filter: saturate(1.08);
}

.btn-icon {
    font-size: 1.1em;
}

/* Team Section */
.team-section {
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px solid rgba(248, 250, 252, 0.1);
}

.team-heading {
    margin: 0 0 20px;
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    color: #94a3b8;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.team-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid rgba(248, 250, 252, 0.1);
    background: rgba(248, 250, 252, 0.04);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.team-card:hover {
    background: rgba(248, 250, 252, 0.08);
    border-color: rgba(16, 185, 129, 0.3);
    transform: translateY(-1px);
}

.team-avatar {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #14b8a6);
    color: #0f172a;
    font-weight: 900;
    font-size: 0.9rem;
    display: grid;
    place-items: center;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.team-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #e2e8f0;
    text-align: left;
}

/* ============================================
   BACKGROUND DECORATION
   ============================================ */
.page-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}

.bg-ring,
.bg-grid {
    position: absolute;
}

.bg-ring {
    width: min(60vmax, 620px);
    height: min(60vmax, 620px);
    border-radius: 50%;
    border: 1px solid rgba(248, 250, 252, 0.15);
    box-shadow: inset 0 0 0 1px rgba(248, 250, 252, 0.05);
}

.bg-ring.one { top: -220px; right: -140px; }
.bg-ring.two { bottom: -260px; left: -160px; }

.bg-grid {
    inset: 0;
    background-image:
        linear-gradient(rgba(248, 250, 252, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(248, 250, 252, 0.03) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
}

/* ============================================
   NAVIGATION
   ============================================ */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px clamp(14px, 3.2vw, 34px);
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(248, 250, 252, 0.12);
}

.brand {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.brand-badge {
    display: inline-block;
    width: fit-content;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    margin-bottom: 1px;
}

.brand-title {
    font-size: clamp(0.85rem, 1.8vw, 1.02rem);
    font-weight: 800;
    letter-spacing: 0.4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-sub {
    color: #cbd5e1;
    font-size: 0.78rem;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nav-pill {
    border: 1px solid rgba(248, 250, 252, 0.18);
    color: #f8fafc;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 999px;
    font-weight: 600;
    padding: 7px 13px;
    font-size: 0.85rem;
    white-space: nowrap;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.nav-home-btn {
    border: 1px solid rgba(248, 250, 252, 0.28);
    color: #f8fafc;
    background: rgba(15, 23, 42, 0.52);
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.82rem;
    font-family: inherit;
    padding: 7px 12px;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.nav-home-btn:hover {
    border-color: #f59e0b;
    transform: translateY(-1px);
    background: rgba(15, 23, 42, 0.66);
}

.nav-rubric-btn {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(248, 250, 252, 0.28);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.8), rgba(20, 184, 166, 0.8));
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 900;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
    display: grid;
    place-items: center;
}

.nav-rubric-btn:hover {
    transform: translateY(-1px) scale(1.06);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
}

.nav-rubric-btn:active {
    transform: scale(0.96);
}

/* ============================================
   MAIN PAGE CONTAINER
   ============================================ */
.page {
    width: min(1460px, 96vw);
    margin: 26px auto 36px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(248, 250, 252, 0.16);
    border-radius: 26px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.app-view.hidden {
    display: none;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    padding: clamp(10px, 2vw, 20px) clamp(18px, 4vw, 46px) 34px;
    border-bottom: 1px solid rgba(248, 250, 252, 0.16);
    text-align: center;
}

.hero h1 {
    margin: 0 auto;
    font-size: clamp(1.8rem, 5vw, 4.1rem);
    line-height: 1.1;
    font-weight: 800;
    max-width: 1040px;
    background: linear-gradient(90deg, #f8fafc 0%, #fcd34d 45%, #fb923c 85%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    margin: 12px auto 0;
    max-width: 860px;
    color: #cbd5e1;
    font-size: clamp(0.92rem, 2vw, 1.15rem);
    line-height: 1.5;
}

.stats {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    opacity: 0.82;
}

.stat {
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.42);
    border: 1px solid rgba(248, 250, 252, 0.14);
    padding: 6px 10px;
}

.stat-label {
    font-size: 0.62rem;
    color: #cbd5e1;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    margin-top: 2px;
    font-size: clamp(0.74rem, 1.3vw, 0.84rem);
    color: #f8fafc;
    font-weight: 700;
}

/* ============================================
   FINAL QUESTION
   ============================================ */
.final-question-launch {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 6px 0 18px;
}

.final-question-panel {
    margin: 0 clamp(14px, 2.4vw, 32px) 30px;
    padding: 18px 20px;
    border-radius: 16px;
    border: 1px solid rgba(248, 250, 252, 0.2);
    background: rgba(15, 23, 42, 0.56);
}

.final-question-panel h2 {
    margin: 0;
    font-size: clamp(1.08rem, 2vw, 1.42rem);
    color: #fcd34d;
}

.final-question-panel p {
    margin: 10px 0 14px;
    color: #e2e8f0;
    line-height: 1.65;
    font-size: 1rem;
}

/* ============================================
   TIMELINE SECTION
   ============================================ */
.timeline-section {
    position: relative;
    padding: 50px clamp(10px, 2.2vw, 28px) 72px;
}

.timeline-wrapper {
    position: relative;
    width: min(1360px, 100%);
    margin: 0 auto;
    padding: 56px 16px 82px;
}

#lasso-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.lasso-path {
    --line-progress-duration: 0.95s;
    fill: none;
    stroke: url(#lasso-gradient);
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset var(--line-progress-duration) cubic-bezier(0.22, 1, 0.36, 1);
    will-change: stroke-dashoffset;
}

.timeline-grid {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 98px;
}

.timeline-row {
    display: flex;
    justify-content: space-around;
    gap: 16px;
}

.timeline-row.reverse {
    flex-direction: row-reverse;
}

/* ============================================
   TIMELINE NODES
   ============================================ */
.node {
    width: 154px;
    border: none;
    background: transparent;
    color: #f8fafc;
    padding: 0;
    margin: 0;
    text-align: center;
    cursor: pointer;
    opacity: 0.45;
    transition: opacity 0.26s ease, transform 0.22s ease;
    -webkit-tap-highlight-color: transparent;
}

.node:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

.node.active,
.node:focus-visible {
    opacity: 1;
}

.node:focus-visible {
    outline: 2px solid #f59e0b;
    outline-offset: 8px;
    border-radius: 16px;
}

.node-circle {
    position: relative;
    width: 76px;
    height: 76px;
    margin: 0 auto;
    border-radius: 50%;
    border: 3px solid var(--node-border);
    background: linear-gradient(150deg, #9ca3af, #6b7280);
    color: #0f172a;
    font-size: 1.45rem;
    font-weight: 900;
    display: grid;
    place-items: center;
    box-shadow: 0 10px 18px rgba(2, 6, 23, 0.24);
    opacity: 0.66;
    transition: opacity 0.24s ease, box-shadow 0.24s ease, transform 0.24s ease, filter 0.24s ease;
    z-index: 1;
}

.node:hover .node-circle {
    transform: scale(1.06);
    box-shadow: 0 14px 24px rgba(2, 6, 23, 0.32);
}

.node-circle::before,
.node-circle::after {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    z-index: 2;
}

.node.active .node-circle {
    opacity: 0.72;
}

.node.lit .node-circle {
    opacity: 1;
    filter: brightness(1.08);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2), 0 16px 30px rgba(16, 185, 129, 0.25);
}

.node.shock .node-circle::before {
    border: 2px solid rgba(16, 185, 129, 0.95);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.25);
    animation: nodeShockWave 0.72s ease-out;
}

.node.shock .node-circle::after {
    background:
        radial-gradient(circle at 50% 0%, rgba(16, 185, 129, 1) 0 9%, transparent 12%),
        radial-gradient(circle at 92% 38%, rgba(245, 158, 11, 1) 0 8%, transparent 11%),
        radial-gradient(circle at 86% 84%, rgba(52, 211, 153, 0.95) 0 7%, transparent 10%),
        radial-gradient(circle at 50% 100%, rgba(16, 185, 129, 1) 0 8%, transparent 11%),
        radial-gradient(circle at 8% 74%, rgba(245, 158, 11, 1) 0 7%, transparent 10%),
        radial-gradient(circle at 10% 24%, rgba(52, 211, 153, 0.95) 0 7%, transparent 10%);
    filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.65));
    animation: nodeSparkBurst 0.72s ease-out;
}

@keyframes nodeShockWave {
    0% { transform: scale(0.6); opacity: 0; }
    22% { opacity: 1; }
    100% { transform: scale(1.38); opacity: 0; }
}

@keyframes nodeSparkBurst {
    0% { transform: scale(0.4); opacity: 0; }
    30% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.22); opacity: 0; }
}

.node.active .node-circle,
.node:hover .node-circle {
    border-color: #020617;
}

.node-flag {
    position: relative;
    z-index: 4;
    width: 58px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
    margin-top: -16px;
    border: 2px solid rgba(248, 250, 252, 0.9);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.35), 0 8px 16px rgba(2, 6, 23, 0.38);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.node:hover .node-flag {
    transform: scale(1.08);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.5), 0 10px 20px rgba(2, 6, 23, 0.4);
}

.node-info {
    margin-top: 14px;
    background: rgba(248, 250, 252, 0.92);
    color: var(--text-main);
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    padding: 10px 12px;
}

.node-country {
    font-size: 1.05rem;
    margin: 0;
    font-weight: 800;
}

.node-year {
    font-size: 0.9rem;
    color: var(--text-soft);
    margin-top: 2px;
    font-weight: 700;
}

/* ============================================
   OVERLAY & DETAIL PANEL
   ============================================ */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.62);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.34s ease, visibility 0.34s;
    z-index: 90;
    will-change: opacity;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

.detail-panel {
    position: fixed;
    left: 50%;
    top: -110%;
    transform: translate(-50%, 0);
    width: min(980px, 92vw);
    max-height: 88vh;
    border-radius: 24px;
    border: 1px solid rgba(248, 250, 252, 0.25);
    background: rgba(248, 250, 252, 0.97);
    color: var(--text-main);
    box-shadow: var(--shadow-strong);
    opacity: 0;
    z-index: 100;
    overflow: auto;
    transition: top 0.62s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.62s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.4s ease;
    will-change: transform, opacity, top;
    -webkit-overflow-scrolling: touch;
}

.panel-header,
.panel-body {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.28s ease, transform 0.36s ease;
}

.detail-panel.active.content-visible .panel-header,
.detail-panel.active.content-visible .panel-body {
    opacity: 1;
    transform: translateY(0);
}

.detail-panel.active {
    top: 50%;
    transform: translate(-50%, -50%);
    opacity: 1;
}

.detail-panel.closing {
    top: 120%;
    transform: translate(-50%, 0);
    opacity: 0;
}

.btn-close {
    position: absolute;
    top: 14px;
    right: 18px;
    border: none;
    background: rgba(15, 23, 42, 0.08);
    color: #1e293b;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    z-index: 20;
    pointer-events: auto;
    transition: background 0.2s ease, transform 0.2s ease;
    font-family: inherit;
}

.btn-close:hover {
    background: rgba(15, 23, 42, 0.16);
    transform: scale(1.08);
}

.btn-close:focus-visible {
    outline: 2px solid #f59e0b;
    outline-offset: 2px;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 34px 32px 14px;
}

.panel-flag {
    width: 80px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 8px 18px rgba(2, 6, 23, 0.25);
    flex-shrink: 0;
}

.panel-title {
    margin: 0;
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    line-height: 1.1;
}

.panel-dates {
    margin-top: 8px;
    color: var(--line);
    font-size: 1.08rem;
    font-weight: 800;
}

.panel-body {
    padding: 0 32px 34px;
}

/* Panel content row: text left, event image right */
.panel-content-row {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.panel-text-col {
    flex: 1;
    min-width: 0;
}

.panel-img-col {
    flex-shrink: 0;
    width: 280px;
}

.panel-event-img-wrap {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: #f1f5f9;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.panel-event-img {
    display: block;
    width: 100%;
    height: 200px;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.detail-panel.active .panel-event-img {
    opacity: 1;
}

.panel-event-caption {
    padding: 10px 12px;
    font-size: 0.82rem;
    color: #475569;
    font-weight: 600;
    line-height: 1.45;
}

.panel-desc {
    margin: 0;
    color: #334155;
    line-height: 1.7;
    font-size: 1.08rem;
    font-weight: 500;
}

.panel-block {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(241, 245, 249, 0.8);
}

.panel-block h3 {
    margin: 0;
    font-size: 0.92rem;
    text-transform: uppercase;
    letter-spacing: 0.45px;
    color: #065f46;
}

.panel-block p {
    margin: 8px 0 0;
    color: #334155;
    line-height: 1.6;
    font-size: 1rem;
    font-weight: 500;
}

.map-wrapper {
    margin-top: 24px;
    background: var(--surface-strong);
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.map-img {
    width: 100%;
    height: 340px;
    object-fit: contain;
    opacity: 0;
    transform: scale(0.94);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.detail-panel.active .map-img {
    opacity: 1;
    transform: scale(1);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    width: min(1320px, 94vw);
    margin: 0 auto 28px;
    text-align: center;
    color: #cbd5e1;
    font-weight: 600;
    font-size: 0.92rem;
}

/* ============================================
   GOSSIP VIEW
   ============================================ */
.gossip-view {
    width: min(1320px, 94vw);
    margin: 0 auto;
    min-height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gossip-centered {
    max-width: 860px;
    width: 100%;
    margin: 0 auto;
    padding: clamp(12px, 2vw, 24px);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

.gossip-title {
    margin: 0;
    font-size: clamp(1.4rem, 3.2vw, 2.2rem);
    color: #fcd34d;
    text-align: center;
}

.gossip-subtitle {
    margin: 4px 0 0;
    font-size: clamp(1rem, 2.2vw, 1.32rem);
    color: #f8fafc;
    text-align: center;
}

.gossip-intro {
    margin: 12px auto 0;
    max-width: 780px;
    border: 1px solid rgba(248, 250, 252, 0.3);
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.95);
    padding: 12px 16px;
    color: #0f172a;
    line-height: 1.6;
    font-size: clamp(0.92rem, 1.6vw, 1.05rem);
    font-weight: 600;
}

.gossip-stage {
    margin-top: 16px;
    touch-action: pan-y pinch-zoom;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.gossip-slide {
    display: none;
}

.gossip-slide.active {
    display: block;
    animation: gossipFadeIn 0.4s ease both;
}

.gossip-slide h4 {
    margin: 16px 0 0;
    color: #fcd34d;
    font-size: clamp(1.2rem, 2.4vw, 1.7rem);
    line-height: 1.28;
    text-align: center;
}

.gossip-slide p {
    margin: 10px auto 0;
    max-width: 780px;
    color: #e2e8f0;
    line-height: 1.72;
    font-size: clamp(0.92rem, 1.6vw, 1.1rem);
}

.gossip-tip {
    border: 1px dashed rgba(248, 250, 252, 0.42);
    border-radius: 12px;
    padding: 10px 12px;
    color: #fcd34d !important;
    font-weight: 700;
    text-align: center;
}

.gossip-image {
    margin: 12px auto;
    max-width: 600px;
    border-radius: 18px;
    border: 1px solid rgba(248, 250, 252, 0.24);
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 16px 28px rgba(2, 6, 23, 0.3);
}

.gossip-image img {
    display: block;
    width: 100%;
    height: clamp(160px, 22vw, 300px);
    object-fit: cover;
}

.gossip-image figcaption {
    margin: 0;
    padding: 12px 14px;
    color: #0f172a;
    font-size: clamp(0.9rem, 1.5vw, 1.08rem);
    font-weight: 700;
    line-height: 1.55;
}

.gossip-controls {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.gossip-nav-btn {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(248, 250, 252, 0.18);
    background: rgba(248, 250, 252, 0.1);
    color: #f8fafc;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: none;
    transition: background 0.2s ease, transform 0.15s ease;
}

.gossip-nav-btn:hover {
    background: rgba(248, 250, 252, 0.2);
    transform: scale(1.08);
}

.gossip-nav-btn:active {
    transform: scale(0.95);
}

.gossip-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.gossip-step-label {
    min-width: auto;
    text-align: center;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: rgba(248, 250, 252, 0.55);
    padding: 4px 10px;
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
}

.gossip-dots {
    margin-top: 6px;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.gossip-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.2);
    transition: width 0.24s ease, background-color 0.24s ease;
}

.gossip-dot.active {
    width: 20px;
    background: linear-gradient(90deg, #10b981, #14b8a6);
}

@keyframes gossipFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   VIEW TRANSITIONS
   ============================================ */
.app-view {
    animation: viewFadeIn 0.4s ease both;
}

@keyframes viewFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   RESPONSIVE: 980px
   ============================================ */
@media (max-width: 980px) {
    .overlay {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .stats {
        justify-content: center;
    }

    .timeline-grid {
        gap: 62px;
    }

    .node {
        width: 132px;
    }

    .node-circle {
        width: 64px;
        height: 64px;
        font-size: 1.2rem;
    }

    .node-flag {
        width: 50px;
        height: 34px;
    }

    .panel-content-row {
        flex-direction: column;
    }

    .panel-img-col {
        width: 100%;
    }

    .panel-event-img {
        height: 220px;
    }
}

/* ============================================
   RESPONSIVE: 720px
   ============================================ */
@media (max-width: 720px) {
    .page {
        width: 98vw;
        border-radius: 18px;
    }

    .hero {
        padding-top: 10px;
        padding-bottom: 22px;
    }

    .hero h1 {
        font-size: clamp(1.6rem, 6vw, 2.6rem);
    }

    .timeline-section {
        padding-top: 34px;
        padding-bottom: 50px;
    }

    .timeline-wrapper {
        padding: 26px 8px 44px;
    }

    .node {
        width: 118px;
    }

    .node-circle {
        width: 58px;
        height: 58px;
        font-size: 1.1rem;
    }

    .node-flag {
        width: 44px;
        height: 30px;
    }

    .detail-panel {
        width: 96vw;
        max-height: 90vh;
        border-radius: 18px;
    }

    .panel-header {
        padding: 28px 18px 10px;
        gap: 12px;
    }

    .panel-body {
        padding: 0 18px 24px;
    }

    .map-img {
        height: 250px;
    }

    .gossip-image img {
        height: 200px;
    }

    .gossip-controls {
        gap: 6px;
    }

    .gossip-step-label {
        font-size: 0.78rem;
    }

    .gossip-nav-btn {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
    }

    .brand-sub {
        display: none;
    }

    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .start-card {
        padding: clamp(20px, 4vw, 32px) clamp(16px, 3vw, 24px);
    }
}

/* ============================================
   RESPONSIVE: 480px (small phones)
   ============================================ */
@media (max-width: 480px) {
    .start-card {
        width: 100%;
        border-radius: 20px;
    }

    .start-card h1 {
        font-size: clamp(1.6rem, 7vw, 2.4rem);
    }

    .start-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .team-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .team-card {
        padding: 8px 10px;
    }

    .team-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .team-name {
        font-size: 0.82rem;
    }

    .page {
        width: 100vw;
        border-radius: 0;
        margin: 0 auto 20px;
    }

    .site-nav {
        padding: 10px 12px;
    }

    .nav-pill {
        display: none;
    }

    .node {
        width: 100px;
    }

    .node-circle {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }

    .node-flag {
        width: 38px;
        height: 26px;
    }

    .node-info {
        padding: 8px;
    }

    .node-country {
        font-size: 0.88rem;
    }

    .node-year {
        font-size: 0.78rem;
    }

    .timeline-grid {
        gap: 50px;
    }

    .lasso-path {
        stroke-width: 6;
    }

    .detail-panel {
        width: 100vw;
        max-height: 94vh;
        border-radius: 16px 16px 0 0;
    }

    .panel-header {
        padding: 22px 14px 8px;
        flex-wrap: wrap;
    }

    .panel-flag {
        width: 60px;
        height: 42px;
    }

    .panel-body {
        padding: 0 14px 20px;
    }

    .panel-event-img {
        height: 160px;
    }

    .map-img {
        height: 180px;
    }

    .gossip-centered {
        padding: 14px;
    }
}

/* ============================================
   MODAL OVERLAYS (shared)
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.34s ease, visibility 0.34s;
    z-index: 140;
    will-change: opacity;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   INTRO MODAL
   ============================================ */
.intro-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    width: min(560px, 92vw);
    padding: clamp(28px, 5vw, 48px) clamp(22px, 4vw, 40px);
    border-radius: 28px;
    border: 1px solid rgba(248, 250, 252, 0.14);
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: var(--shadow-strong);
    text-align: center;
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.36s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.36s;
}

.intro-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.intro-modal-badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.intro-modal-title {
    margin: 0;
    font-size: clamp(1.5rem, 4vw, 2.4rem);
    line-height: 1.12;
    color: #f8fafc;
    font-weight: 900;
}

.intro-modal-desc {
    margin: 14px auto 0;
    max-width: 460px;
    color: #94a3b8;
    font-size: clamp(0.9rem, 1.8vw, 1.05rem);
    line-height: 1.62;
    font-weight: 400;
}

.intro-modal-keys {
    margin: 22px auto 0;
    max-width: 380px;
    padding: 14px 18px;
    border-radius: 14px;
    border: 1px solid rgba(248, 250, 252, 0.15);
    background: rgba(248, 250, 252, 0.06);
}

.intro-key-hint {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
}

.key-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 42px;
    height: 38px;
    border-radius: 8px;
    background: rgba(248, 250, 252, 0.12);
    border: 1px solid rgba(248, 250, 252, 0.2);
    color: #f8fafc;
    font-size: 1.1rem;
    font-weight: 800;
    font-family: inherit;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.intro-modal-keys p {
    margin: 0;
    color: #94a3b8;
    font-size: 0.88rem;
    line-height: 1.5;
    font-weight: 500;
}

.intro-begin-btn {
    margin-top: 22px;
}

/* ============================================
   FINAL QUESTION MODAL
   ============================================ */
.final-question-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    width: min(740px, 92vw);
    max-height: 86vh;
    overflow-y: auto;
    padding: clamp(32px, 5vw, 52px) clamp(24px, 4vw, 44px);
    border-radius: 28px;
    border: 1px solid rgba(248, 250, 252, 0.14);
    background: rgba(248, 250, 252, 0.97);
    color: var(--text-main);
    box-shadow: var(--shadow-strong);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.36s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.36s;
}

.final-question-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.final-question-modal h2 {
    margin: 0;
    font-size: clamp(1.3rem, 3vw, 2rem);
    line-height: 1.25;
    color: #0f172a;
    font-weight: 800;
}

.final-question-modal p {
    margin: 18px 0 0;
    color: #334155;
    font-size: clamp(1rem, 1.8vw, 1.14rem);
    line-height: 1.72;
    font-weight: 500;
}

.final-question-modal .start-btn {
    margin-top: 24px;
}

/* ============================================
   RUBRIC MODAL
   ============================================ */
.rubric-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    width: min(900px, 94vw);
    max-height: 88vh;
    overflow-y: auto;
    padding: clamp(28px, 4vw, 44px) clamp(20px, 3vw, 38px);
    border-radius: 24px;
    border: 1px solid rgba(248, 250, 252, 0.14);
    background: rgba(248, 250, 252, 0.97);
    color: var(--text-main);
    box-shadow: var(--shadow-strong);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.36s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.36s;
}

.rubric-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.rubric-title {
    margin: 0;
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 900;
    color: #0f172a;
    text-align: center;
}

.rubric-instructions {
    margin: 8px 0 0;
    text-align: center;
    color: #475569;
    font-size: 0.95rem;
    font-weight: 500;
}

.rubric-table-wrap {
    margin-top: 20px;
    overflow-x: auto;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.12);
}

.rubric-table {
    width: 100%;
    border-collapse: collapse;
    font-family: inherit;
    font-size: 0.88rem;
}

.rubric-table th {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #f8fafc;
    padding: 12px 10px;
    text-align: center;
    font-weight: 700;
    font-size: 0.82rem;
    line-height: 1.35;
    border: 1px solid rgba(248, 250, 252, 0.08);
}

.rubric-table th:first-child {
    text-align: left;
    min-width: 160px;
}

.rubric-table th small {
    display: block;
    font-weight: 500;
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 3px;
}

.rubric-table td {
    padding: 10px 10px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    text-align: center;
    font-weight: 600;
    color: #0f172a;
}

.rubric-table td:first-child {
    text-align: left;
    font-weight: 700;
    background: rgba(241, 245, 249, 0.6);
}

.rubric-table tbody tr:nth-child(even) {
    background: rgba(241, 245, 249, 0.45);
}

.rubric-table tbody tr:hover {
    background: rgba(16, 185, 129, 0.06);
}

.rubric-legend {
    margin-top: 20px;
    padding: 16px 18px;
    border-radius: 12px;
    background: rgba(241, 245, 249, 0.8);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.rubric-legend h3 {
    margin: 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #065f46;
}

.rubric-legend ol {
    margin: 10px 0 0;
    padding-left: 20px;
}

.rubric-legend li {
    margin-top: 6px;
    color: #334155;
    font-size: 0.88rem;
    line-height: 1.55;
}

.rubric-legend li strong {
    color: #0f172a;
}

.rubric-credit {
    margin-top: 18px;
    padding: 14px 18px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(20, 184, 166, 0.06));
    border: 1px solid rgba(16, 185, 129, 0.18);
    text-align: center;
}

.rubric-credit p {
    margin: 0;
    color: #334155;
    font-size: 0.88rem;
    line-height: 1.55;
    font-weight: 500;
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }
}
