/* ── Homepage: Story Mode + Dashboard ──────────────────── */

.story-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    position: relative;
    padding: 60px 24px;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.8s cubic-bezier(0.22, 1, 0.36, 1),
                filter 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    filter: blur(10px);
}
.story-section[data-section="cluster"],
.story-section[data-section="faces"] {
    min-height: 70vh;
}
.hero-network {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.hero-network-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    text-align: center;
    width: 100px;
    transition: transform 0.2s;
}
.hero-network-node:hover {
    transform: translateY(-4px);
}
.hero-network-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}
.hero-network-mono {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    border: 2px solid var(--border);
    font-family: var(--font-display);
    font-size: 24px;
    color: var(--gold);
}
.hero-network-node span {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.2;
}
.story-section[data-section="compact-hero"] {
    min-height: auto;
}
.story-section.visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

/* Skip button */
.story-skip {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 50;
    background: rgba(26, 29, 40, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-family: var(--font);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.dash-widget {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s, border-color 0.3s;
    position: relative;
    opacity: 0;
    transform: translateY(24px);
    animation: widgetIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.dash-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-dark), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}
.dash-widget:nth-child(1) { animation-delay: 0.05s; }
.dash-widget:nth-child(2) { animation-delay: 0.12s; }
.dash-widget:nth-child(3) { animation-delay: 0.19s; }
.dash-widget:nth-child(4) { animation-delay: 0.26s; }
.dash-widget:nth-child(5) { animation-delay: 0.33s; }
.dash-widget:nth-child(6) { animation-delay: 0.40s; }
.dash-widget:nth-child(7) { animation-delay: 0.47s; }
.dash-widget:nth-child(8) { animation-delay: 0.54s; }
.dash-widget:nth-child(9) { animation-delay: 0.61s; }
@keyframes widgetIn {
    to { opacity: 1; transform: translateY(0); }
}
.dash-widget:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
    border-color: rgba(200, 168, 84, 0.15);
}
.dash-widget:hover::before {
    opacity: 1;
}
.dash-widget__title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--text-dim);
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    display: flex;
    align-items: center;
    gap: 10px;
}
.dash-widget__title svg {
    opacity: 0.5;
    flex-shrink: 0;
}

/* ── Stat Cells (DB widget) ────────────────────────── */
.stat-cell {
    background: var(--bg-surface);
    padding: 20px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    text-align: center;
    transition: border-color 0.3s, transform 0.3s;
}
.stat-cell:hover {
    border-color: rgba(200, 168, 84, 0.2);
    transform: translateY(-2px);
}
.stat-cell__value {
    font-size: 28px;
    font-weight: 600;
    color: var(--gold);
    font-family: var(--font-display);
    line-height: 1;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}
.stat-cell__label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
}
.story-skip:hover {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--gold-dark);
}
.story-skip .arrow { font-size: 16px; }

/* Scroll indicator */
.scroll-hint {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-dim);
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: scrollPulse 2s ease-in-out infinite;
}
.scroll-hint .chevron {
    width: 24px;
    height: 24px;
    border-right: 2px solid var(--gold-dark);
    border-bottom: 2px solid var(--gold-dark);
    transform: rotate(45deg);
    animation: chevronBounce 2s ease-in-out infinite;
}
@keyframes scrollPulse { 0%,100% { opacity: 0.4; } 50% { opacity: 1; } }
@keyframes chevronBounce { 0%,100% { transform: rotate(45deg) translate(0,0); } 50% { transform: rotate(45deg) translate(4px,4px); } }

/* ── Section 1: Date Intro ────────────────────────────── */
.intro-date {
    font-family: var(--font-display);
    color: var(--gold);
    text-align: center;
}
.intro-date__day {
    font-size: clamp(5rem, 15vw, 12rem);
    font-weight: 600;
    line-height: 1;
    opacity: 0;
    transform: scale(0.8);
    transition: all 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.visible .intro-date__day {
    opacity: 1;
    transform: scale(1);
}
.intro-date__month {
    font-size: clamp(1.5rem, 4vw, 3rem);
    color: var(--gold-light);
    margin-top: 8px;
    letter-spacing: 6px;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 1s 0.4s;
}
.visible .intro-date__month { opacity: 1; }
.intro-date__tagline {
    font-family: var(--font);
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-top: 32px;
    opacity: 0;
    transition: opacity 1s 0.8s;
}
.visible .intro-date__tagline { opacity: 1; }

/* Particles BG */
.particles-canvas {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}

/* ── Globe container ─────────────────────────────────── */
.globe-container {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    pointer-events: none;
}
.globe-container canvas {
    pointer-events: auto;
}
.globe-glow {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(200,168,84,0.12) 0%, transparent 70%);
    pointer-events: none;
    animation: globePulse 4s ease-in-out infinite;
}
@keyframes globePulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.15); opacity: 1; }
}

/* Page-level fade-in for returning users (P6) */
@keyframes pageIn {
    from { opacity: 0; filter: blur(8px); }
    to   { opacity: 1; filter: blur(0); }
}
.page-fade-in {
    animation: pageIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ── Section 2: Hero person ──────────────────────────── */
.hero-person {
    text-align: center;
    max-width: 600px;
}
.hero-person__photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--gold-dark);
    box-shadow: 0 0 60px rgba(200, 168, 84, 0.2);
    margin-bottom: 24px;
    opacity: 0;
    transform: scale(0.7);
    transition: all 1s 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.visible .hero-person__photo {
    opacity: 1;
    transform: scale(1);
}
.hero-person__monogram {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 600;
    margin: 0 auto 24px;
    border: 3px solid var(--gold-dark);
    box-shadow: 0 0 60px rgba(200, 168, 84, 0.2);
    opacity: 0;
    transform: scale(0.7);
    transition: all 1s 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.visible .hero-person__monogram {
    opacity: 1;
    transform: scale(1);
}
.hero-person__monogram--bishop { background: linear-gradient(135deg, #3a2e10 0%, #1a1505 100%); color: #f0d080; }
.hero-person__monogram--priest { background: linear-gradient(135deg, #2a1e10 0%, #15100a 100%); color: #c8a060; }
.hero-person__monogram--layperson { background: linear-gradient(135deg, #1a1e28 0%, #0e1018 100%); color: #8b92a8; }

.hero-person__name {
    font-family: var(--font-display);
    font-size: 2.2rem;
    color: var(--gold-light);
    margin-bottom: 8px;
    opacity: 0;
    transition: opacity 0.8s 0.5s;
}
.visible .hero-person__name { opacity: 1; }

.hero-person__years {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    opacity: 0;
    transition: opacity 0.8s 0.6s;
}
.visible .hero-person__years { opacity: 1; }

.hero-person__fact {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 500px;
    margin: 0 auto;
    opacity: 0;
    transition: opacity 0.8s 0.8s;
}
.visible .hero-person__fact { opacity: 1; }

.hero-person__label {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--gold-dark);
    margin-bottom: 24px;
    opacity: 0;
    transition: opacity 0.8s 0.1s;
}
.visible .hero-person__label { opacity: 1; }

/* ── Section 3: Faces Gallery ────────────────────────── */
.faces-section__label {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--gold-light);
    text-align: center;
    margin-bottom: 12px;
}
.faces-section__count {
    font-size: 3.5rem;
    font-weight: 600;
    font-family: var(--font-display);
    color: var(--gold);
    text-align: center;
    margin-bottom: 8px;
}
.faces-section__sub {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 48px;
}
.faces-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    max-width: 900px;
}
.face-card {
    width: 100px;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: pointer;
}
.face-card:hover { transform: translateY(-4px) !important; }
.visible .face-card { opacity: 1; transform: translateY(0); }

.face-card__img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    transition: border-color 0.3s, box-shadow 0.3s;
    margin-bottom: 8px;
}
.face-card:hover .face-card__img {
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(200, 168, 84, 0.3);
}
.face-card__monogram {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 600;
    border: 2px solid var(--border);
    margin: 0 auto 8px;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.face-card:hover .face-card__monogram {
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(200, 168, 84, 0.3);
}
.face-card__name {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.3;
}
.face-card__year {
    font-size: 10px;
    color: var(--text-dim);
    margin-top: 2px;
}


/* ── Section 5: Cluster viz ──────────────────────────── */
.cluster-section {
    text-align: center;
    max-width: 700px;
}
.cluster-section__title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--gold-light);
    margin-bottom: 40px;
}
.cluster-bars {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}
.cluster-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.visible .cluster-bar { opacity: 1; transform: translateX(0); }
.cluster-bar__label {
    flex: 0 0 160px;
    text-align: right;
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cluster-bar__track {
    flex: 1;
    height: 28px;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
}
.cluster-bar__fill {
    height: 100%;
    border-radius: var(--radius);
    transition: width 1.2s 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    width: 0;
    display: flex;
    align-items: center;
    padding-left: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #000;
}
.visible .cluster-bar__fill { /* width set by JS */ }

.cluster-bar__fill--rank { background: linear-gradient(90deg, var(--gold-dark), var(--gold)); }
.cluster-bar__fill--cause { background: linear-gradient(90deg, #8b3030, #c75050); }
.cluster-bar__fill--region { background: linear-gradient(90deg, #2a4a7a, var(--accent)); }
.cluster-bar__fill--canon { background: linear-gradient(90deg, #2a6a4a, var(--success)); }

/* ── Section 6: Big stat counter ─────────────────────── */
.stat-counter {
    text-align: center;
}
.stat-counter__number {
    font-family: var(--font-display);
    font-size: clamp(4rem, 12vw, 8rem);
    font-weight: 600;
    color: var(--gold);
    line-height: 1;
    opacity: 0;
    transition: opacity 1s 0.2s;
}
.visible .stat-counter__number { opacity: 1; }
.stat-counter__label {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-top: 16px;
    opacity: 0;
    transition: opacity 1s 0.6s;
}
.visible .stat-counter__label { opacity: 1; }
.stat-counter__sub {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-top: 8px;
    opacity: 0;
    transition: opacity 1s 1s;
}
.visible .stat-counter__sub { opacity: 1; }

/* ── Dashboard ───────────────────────────────────────── */
.dashboard {
    padding: 0 0 80px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s, transform 0.6s;
    position: relative;
}
.dashboard.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Cinematic Header ──────────────────────────────── */
.dashboard__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 48px;
    padding: 48px 0 32px;
    border-bottom: 1px solid var(--border);
    position: relative;
}
.dashboard__header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), transparent);
}
.dashboard__title {
    font-family: var(--font-display);
    font-size: 2.4rem;
    color: var(--gold-light);
    letter-spacing: -0.5px;
    line-height: 1;
}
.dashboard__date {
    font-size: 13px;
    color: var(--text-dim);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 500;
}

/* ── Stats Ribbon ──────────────────────────────────── */
.stats-ribbon {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1px;
    background: var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 32px;
}
.stats-ribbon__cell {
    background: var(--bg-card);
    padding: 28px 24px;
    text-align: center;
    position: relative;
    transition: background 0.3s;
}
.stats-ribbon__cell:hover {
    background: var(--bg-hover);
}
.stats-ribbon__value {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 600;
    color: var(--gold);
    line-height: 1;
    margin-bottom: 6px;
    letter-spacing: -1px;
}
.stats-ribbon__label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-dim);
    font-weight: 500;
}

/* ── Dashboard grid ────────────────────────────────── */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
}

/* Wide widget (spans full grid) */
.dash-widget--wide {
    grid-column: 1 / -1;
}

/* Persons list in dashboard */
.dash-person-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s;
}
.dash-person-row:last-child { border-bottom: none; }
.dash-person-row:hover { background: var(--bg-hover); margin: 0 -8px; padding: 10px 8px; border-radius: var(--radius); }

.dash-person-row__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.dash-person-row__mono {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    flex-shrink: 0;
    border: 1px solid var(--border);
}
.dash-person-row__info { flex: 1; min-width: 0; }
.dash-person-row__name { font-size: 14px; font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-person-row__meta { font-size: 12px; color: var(--text-dim); }

/* Tag pill */
.tag-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 500;
    background: rgba(200, 168, 84, 0.1);
    color: var(--gold);
    border: 1px solid rgba(200, 168, 84, 0.2);
}
.tag-pill--danger {
    background: rgba(199, 80, 80, 0.1);
    color: var(--danger);
    border-color: rgba(199, 80, 80, 0.2);
}
.tag-pill--accent {
    background: rgba(123, 147, 196, 0.1);
    color: var(--accent);
    border-color: rgba(123, 147, 196, 0.2);
}

/* Upcoming mini cards */
.upcoming-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.upcoming-card:last-child { border-bottom: none; }
.upcoming-card__date {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.upcoming-card__date-day {
    font-size: 18px;
    font-weight: 600;
    font-family: var(--font-display);
    color: var(--text-primary);
    line-height: 1;
}
.upcoming-card__date-month {
    font-size: 9px;
    text-transform: uppercase;
    color: var(--text-dim);
    letter-spacing: 1px;
}
.upcoming-card__info { flex: 1; }
.upcoming-card__count { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.upcoming-card__preview { font-size: 12px; color: var(--text-dim); margin-top: 2px; }

/* Stat mini */
.stat-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.stat-mini:last-child { border-bottom: none; }
.stat-mini__icon {
    font-size: 24px;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    border-radius: var(--radius);
}
.stat-mini__label { font-size: 13px; color: var(--text-secondary); }
.stat-mini__value { font-size: 20px; font-weight: 600; color: var(--text-primary); font-family: var(--font-display); }

/* ── CTA at end of story ─────────────────────────────── */
.story-cta {
    display: flex;
    gap: 16px;
    margin-top: 32px;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    transition: opacity 0.8s 1.2s;
}
.visible .story-cta { opacity: 1; }

/* ── Custom Scrollbars ───────────────────────────────── */
.dash-widget > div::-webkit-scrollbar,
.dashboard::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.dash-widget > div::-webkit-scrollbar-track,
.dashboard::-webkit-scrollbar-track {
    background: transparent;
}
.dash-widget > div::-webkit-scrollbar-thumb,
.dashboard::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.0);
    border-radius: 4px;
    transition: background 0.3s ease;
}
.dash-widget > div:hover::-webkit-scrollbar-thumb,
.dashboard:hover::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
}
.dash-widget > div::-webkit-scrollbar-thumb:hover,
.dashboard::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ── Tooltips ────────────────────────────────────────── */
.hm-tooltip {
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    background: rgba(15, 15, 18, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 12px;
    color: var(--text-primary);
    max-width: 300px;
    font-size: 13px;
    line-height: 1.4;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s, transform 0.2s;
}
.hm-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}
.hm-tooltip__title {
    font-weight: 600;
    color: var(--gold-light);
    margin-bottom: 4px;
}
.hm-tooltip__meta {
    color: var(--text-dim);
    font-size: 12px;
}
.hm-tooltip__desc {
    margin-top: 6px;
    color: var(--text-secondary);
}

/* ── Icons & Network ─────────────────────────────────── */
.cause-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    font-size: 14px;
    cursor: help;
    transition: background 0.2s, transform 0.2s;
}
.cause-icon:hover {
    background: rgba(255, 50, 50, 0.2);
    transform: scale(1.1);
}

.hero-network {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    justify-content: center;
}
.hero-network-node {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px 4px 4px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    font-size: 11px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}
.hero-network-node:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--gold-dark);
    color: var(--text-primary);
}
.hero-network-img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}
.hero-network-mono {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    font-size: 10px;
    font-weight: bold;
}

/* ── Wide widget (spans full grid) ────────────────────── */
.dash-widget--wide {
    grid-column: 1 / -1;
}

/* ── Progress bars ───────────────────────────────────── */
.progress-row {
    margin-bottom: 14px;
}
.progress-row:last-child { margin-bottom: 0; }
.progress-row__head {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.progress-row__track {
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    overflow: hidden;
}
.progress-row__fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Leaflet overrides for dashboard map ─────────────── */
#dayMap .leaflet-popup-content-wrapper {
    background: var(--bg-card);
    color: var(--text-primary);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
#dayMap .leaflet-popup-tip { background: var(--bg-card); }
#dayMap .leaflet-popup-content { margin: 8px 12px; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
    .story-section { padding: 40px 16px; min-height: 80vh; }
    .faces-grid { gap: 10px; }
    .face-card { width: 72px; }
    .face-card__img, .face-card__monogram { width: 56px; height: 56px; }
    .hero-person__photo, .hero-person__monogram { width: 140px; height: 140px; }
    .cluster-bar__label { flex: 0 0 100px; font-size: 11px; }
    .dash-grid { grid-template-columns: 1fr; }
    .story-skip { bottom: 16px; right: 16px; }
    .hero-network { gap: 12px; }
    .hero-network-node { flex: 0 0 52px; }
    .hero-person__name { font-size: 1.8rem; }
    .intro-date__day { font-size: 5rem; }
    .dashboard__header { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 480px) {
    .dash-grid { gap: 12px; }
    .dash-widget { padding: 16px; }
    .dash-widget__title { font-size: 16px; }
    .face-card { width: 60px; }
    .face-card__img, .face-card__monogram { width: 48px; height: 48px; }
    .stat-counter__number { font-size: 3rem; }
    .story-cta { flex-direction: column; gap: 8px; }
    .story-cta .btn { width: 100%; text-align: center; }
}
