.weather-page-tornadoes .site-header {
    z-index: 2200;
    background: rgba(247, 242, 234, 0.96);
    box-shadow: 0 1px 0 rgba(31, 42, 48, 0.08);
}

.weather-page-tornadoes .main-shell {
    position: relative;
    z-index: 1;
    overflow-x: clip;
    padding-top: 24px;
}

.tornadoes-page-shell {
    display: grid;
    gap: 24px;
}

.tornadoes-hero,
.tornadoes-layout {
    display: grid;
    gap: 22px;
}

.tornadoes-hero {
    grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.9fr);
    align-items: stretch;
}

.tornadoes-hero__copy,
.tornadoes-status-card,
.tornadoes-main-card,
.t-panel-card {
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.58);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-md);
}

.tornadoes-hero__copy,
.tornadoes-main-card,
.t-panel-card,
.tornadoes-status-card {
    padding: 24px;
}

.tornadoes-hero h1 {
    margin: 8px 0 14px;
    font-size: clamp(2rem, 4vw, 3.35rem);
    line-height: 1.04;
    font-family: var(--font-display);
}

.tornadoes-hero__lead {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.72;
    color: var(--text-soft);
    max-width: 74ch;
}

.tornadoes-hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.tornadoes-hero__badges span,
.t-status-pill,
.t-source-chip,
.t-report-chip,
.t-legend-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
}

.tornadoes-hero__badges span {
    background: rgba(15, 118, 110, 0.08);
    color: var(--accent);
    border: 1px solid rgba(15, 118, 110, 0.12);
}

.tornadoes-status-card {
    display: grid;
    align-content: start;
    gap: 16px;
}

.tornadoes-status-card__row,
.tornadoes-status-card__grid {
    display: grid;
    gap: 12px;
}

.tornadoes-status-card__row {
    grid-template-columns: 1fr auto;
    align-items: center;
}

.tornadoes-status-card__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tornadoes-status-card__grid div span,
.tornadoes-metric span,
.t-panel-stats dt {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-soft);
    margin-bottom: 6px;
}

.tornadoes-status-card__grid strong,
.tornadoes-metric strong,
.t-panel-stats dd {
    margin: 0;
    font-size: 1.04rem;
    font-weight: 800;
}

.tornadoes-status-card__note,
.t-situation-copy,
.t-map-popup__desc,
.t-map-popup__meta,
.t-map-popup__time,
.t-source-row p,
.tlegend-note,
.tornadoes-map-note {
    color: var(--text-soft);
    line-height: 1.65;
}

.t-status-pill[data-state="ok"] { background: rgba(34, 197, 94, 0.14); color: #166534; }
.t-status-pill[data-state="warning"] { background: rgba(249, 115, 22, 0.14); color: #c2410c; }
.t-status-pill[data-state="error"] { background: rgba(220, 38, 38, 0.16); color: #991b1b; }
.t-status-pill[data-state="loading"] { background: rgba(15, 23, 42, 0.08); color: #334155; }

.tornadoes-layout {
    grid-template-columns: minmax(0, 1.75fr) minmax(290px, 0.8fr);
    align-items: start;
}

.tornadoes-main-card {
    position: relative;
    z-index: 0;
    display: grid;
    gap: 18px;
}

.tornadoes-toolbar {
    display: grid;
    gap: 16px;
}

.tornadoes-toolbar__summary,
.tornadoes-toolbar__controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.tornadoes-metric {
    min-width: 145px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(244, 239, 231, 0.9);
    border: 1px solid rgba(31, 42, 48, 0.08);
}

.t-control-switch,
.t-day-picker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(31, 42, 48, 0.1);
    background: rgba(252, 250, 246, 0.9);
    font-weight: 700;
}

.t-day-picker select {
    border: 0;
    background: transparent;
    font-weight: 800;
    color: var(--text);
}

.tornadoes-map-wrap {
    position: relative;
    z-index: 0;
    isolation: isolate;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(31, 42, 48, 0.1);
    min-height: 620px;
}

.tornadoes-map {
    min-height: 620px;
    background: #0f172a;
}


.tornadoes-map-loader {
    position: absolute;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.82), rgba(241, 245, 249, 0.72));
    backdrop-filter: blur(4px);
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.tornadoes-map-loader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.tornadoes-map-loader__card {
    max-width: 360px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
    text-align: center;
}

.tornadoes-map-loader__card strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1rem;
}

.tornadoes-map-loader__card span {
    display: block;
    color: var(--text-soft);
    line-height: 1.55;
}


.tornadoes-map .leaflet-popup-content-wrapper {
    border-radius: 18px;
    padding: 0;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.tornadoes-map .leaflet-popup-content {
    margin: 0;
    width: min(310px, calc(100vw - 92px)) !important;
    max-height: min(420px, calc(100vh - 180px));
    overflow: auto;
    overscroll-behavior: contain;
}

.tornadoes-map .leaflet-popup-tip-container {
    margin-top: -1px;
}

.t-map-popup {
    display: grid;
    gap: 10px;
    padding: 14px;
}

.t-map-popup__head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: start;
}

.t-map-popup__title {
    margin: 0;
    font-size: 0.97rem;
    line-height: 1.35;
    font-weight: 800;
}

.t-map-popup__metaGrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.t-map-popup__head .t-status-pill {
    flex-shrink: 0;
}

.t-map-popup__metaItem {
    padding: 9px 10px;
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.t-map-popup__metaItem span {
    display: block;
    font-size: 0.73rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-soft);
    margin-bottom: 4px;
}

.t-map-popup__metaItem strong {
    display: block;
    font-size: 0.92rem;
}

.t-map-popup__sections {
    display: grid;
    gap: 8px;
}

.t-map-popup__section {
    padding: 10px 11px;
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.t-map-popup__section h4 {
    margin: 0 0 6px;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-soft);
}

.t-map-popup__section p {
    margin: 0;
    line-height: 1.6;
    color: var(--text);
}

.tornadoes-side {
    display: grid;
    gap: 16px;
}

.t-panel-card__head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
}

.t-panel-card__head h2 {
    margin: 0;
    font-size: 1.05rem;
}

.t-panel-toggle {
    border: 0;
    background: rgba(15, 118, 110, 0.08);
    color: var(--accent);
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 800;
}

.t-panel-body {
    display: none;
}

.t-panel-body.is-open {
    display: block;
}

.t-panel-stats {
    display: grid;
    gap: 12px;
    margin: 0;
}

.t-panel-stats div {
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.t-source-list,
.t-legend-list {
    display: grid;
    gap: 12px;
}

.t-source-row,
.t-legend-group {
    padding: 14px;
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.94);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.t-source-row strong,
.t-legend-group h3 {
    display: block;
    margin-bottom: 6px;
}

.t-source-chip[data-state="live"],
.t-source-chip[data-state="cache"] { background: rgba(34, 197, 94, 0.14); color: #166534; }
.t-source-chip[data-state="stale-cache"] { background: rgba(249, 115, 22, 0.14); color: #c2410c; }
.t-source-chip[data-state="error"] { background: rgba(220, 38, 38, 0.16); color: #991b1b; }

.t-legend-items {
    display: grid;
    gap: 10px;
}

.t-legend-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: start;
}

.t-legend-swatch {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    border-radius: 6px;
    border: 1px solid rgba(15, 23, 42, 0.15);
}

.t-report-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
}

.torn-report-marker,
.torn-hotspot-marker {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #0f172a;
    border: 2px solid #fff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.32);
}

.torn-hotspot-marker {
    position: relative;
    width: 22px;
    height: 22px;
    background: linear-gradient(180deg, #b91c1c 0%, #7f1d1d 100%);
}

.torn-hotspot-marker::before,
.torn-hotspot-marker::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px solid rgba(220, 38, 38, 0.35);
}

.torn-hotspot-marker::before {
    animation: tornPulse 1.9s ease-out infinite;
}

.torn-hotspot-marker::after {
    inset: 3px 6px auto 6px;
    height: 10px;
    width: 10px;
    border-radius: 60% 60% 35% 35%;
    border: 0;
    background: rgba(255, 255, 255, 0.88);
    transform: rotate(16deg);
    animation: tornSpin 3.5s linear infinite;
}

@keyframes tornPulse {
    0% { transform: scale(0.75); opacity: 0.7; }
    70% { transform: scale(1.5); opacity: 0; }
    100% { opacity: 0; }
}

@keyframes tornSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .torn-hotspot-marker::before,
    .torn-hotspot-marker::after {
        animation: none;
    }
}

@media (max-width: 1100px) {
    .tornadoes-hero,
    .tornadoes-layout {
        grid-template-columns: 1fr;
    }

    .tornadoes-map-wrap,
    .tornadoes-map {
        min-height: 560px;
    }
}

@media (max-width: 720px) {
    .tornadoes-hero__copy,
    .tornadoes-main-card,
    .t-panel-card,
    .tornadoes-status-card {
        padding: 18px;
    }

    .tornadoes-toolbar__summary,
    .tornadoes-toolbar__controls,
    .tornadoes-status-card__grid {
        grid-template-columns: 1fr;
        display: grid;
    }

    .tornadoes-toolbar__controls {
        gap: 10px;
    }

    .t-control-switch,
    .t-day-picker,
    .button {
        width: 100%;
        justify-content: space-between;
    }

    .tornadoes-map-wrap,
    .tornadoes-map {
        min-height: 440px;
    }

    .t-map-popup__metaGrid {
        grid-template-columns: 1fr;
    }

    .tornadoes-map .leaflet-popup-content {
        width: min(286px, calc(100vw - 70px)) !important;
        max-height: min(360px, calc(100vh - 150px));
    }

    .t-map-popup {
        padding: 12px;
    }
}
