/* =====================================================================
   LIVE EARTH  —  page-only styles (/live_earth/live_earth.css)
   Same look as Daily Picks: warm paper cards, serif type, museum-label
   red accents. Loaded after ../style.css, so the site header, nav and
   footer stay identical to every other page.
   ===================================================================== */

:root {
    --le-ink: #1b1a17;
    --le-muted: #6b665c;
    --le-faint: #9a948a;
    --le-rule: #e4dfd5;
    --le-paper: #ffffff;
    --le-wash: #f7f4ee;
    --le-space: #070a14;
    --le-accent: #8a2b1d;
    --le-live: #d63a2a;
    --le-link: #1b1a17;
    --le-link-visited: #8a2b1d;
    --le-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
                Georgia, "Times New Roman", Times, serif;

    /* earthquake magnitudes */
    --m2: #e6b04a;
    --m3: #e08a35;
    --m4: #d4592c;
    --m5: #b52a22;
    --m6: #6e0d18;
}

.site-title,
.site-title:visited {
    color: inherit;
    text-decoration: none;
}

main.le-main {
    display: block;
    grid-template-columns: none;
    max-width: 1240px;
    width: 100%;
    margin: 6px auto 0;
    font-family: var(--le-serif);
    color: var(--le-ink);
}

main.le-main p {
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
    color: inherit;
}

/* ---------------------------------------------------------------------
   Heading
   --------------------------------------------------------------------- */

.le-hero {
    text-align: center;
    padding: 28px 0 34px;
}

main.le-main .le-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 6px;
    font-size: 0.8rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--le-accent);
}

.le-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--le-live);
    box-shadow: 0 0 0 0 rgba(214, 58, 42, 0.5);
    animation: le-pulse 2.4s ease-out infinite;
}

@keyframes le-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(214, 58, 42, 0.45); }
    70%  { box-shadow: 0 0 0 9px rgba(214, 58, 42, 0); }
    100% { box-shadow: 0 0 0 0 rgba(214, 58, 42, 0); }
}

main.le-main .le-title {
    font-size: clamp(1.9rem, 4.2vw, 2.9rem);
    font-style: italic;
    line-height: 1.15;
}

main.le-main .le-clock {
    margin-top: 12px;
    font-size: 1.02rem;
    color: var(--le-muted);
    font-variant-numeric: tabular-nums;
}

.le-sep {
    margin: 0 6px;
    color: var(--le-faint);
}

.le-hero::after {
    content: "";
    display: block;
    width: 64px;
    height: 1px;
    margin: 26px auto 0;
    background: var(--le-accent);
    opacity: 0.6;
}

/* ---------------------------------------------------------------------
   Cards (shared)
   --------------------------------------------------------------------- */

.le-card {
    min-width: 0;
    background: var(--le-paper);
    border: 1px solid var(--le-rule);
    border-radius: 10px;
    padding: 20px 22px 18px;
    box-shadow: 0 1px 2px rgba(40, 30, 10, 0.04), 0 6px 18px rgba(40, 30, 10, 0.05);
    display: flex;
    flex-direction: column;
}

.le-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 14px;
}

.le-num {
    flex: 0 0 auto;
    min-width: 1.6em;
    font-size: 1.05rem;
    font-style: italic;
    color: var(--le-accent);
}

.le-head-text { min-width: 0; }

.le-label {
    margin: 0;
    font-size: 1.22rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--le-ink);
}

main.le-main .le-source {
    margin-top: 2px;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--le-faint);
    line-height: 1.4;
}

.le-card-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 14px;
    margin-top: auto;
    padding-top: 14px;
}

.le-link {
    font-size: 0.9rem;
    color: var(--le-link);
    text-decoration: underline;
    text-decoration-color: rgba(27, 26, 23, 0.3);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s ease;
}
.le-link:visited { color: var(--le-link-visited); text-decoration-color: rgba(138, 43, 29, 0.35); }
.le-link:hover { text-decoration-color: currentColor; }

.le-updated {
    font-size: 0.78rem;
    font-style: italic;
    color: var(--le-faint);
}

main.le-main .le-note {
    margin-top: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--le-muted);
}

main.le-main .le-big-label {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--le-faint);
}

main.le-main .le-big {
    margin-top: 2px;
    font-size: 1.6rem;
    font-style: italic;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.le-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 16px 0 0;
    padding: 12px 0 0;
    border-top: 1px solid var(--le-rule);
}

.le-stats dt {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--le-faint);
}

.le-stats dd {
    margin: 2px 0 0;
    font-size: 1.02rem;
    font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------------
   I + II  top row
   --------------------------------------------------------------------- */

.le-top {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr);
    gap: 28px;
    align-items: stretch;
}

/* Tabs */
.le-tabs {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    margin-bottom: 14px;
    border-radius: 999px;
    background: var(--le-wash);
    border: 1px solid var(--le-rule);
    align-self: flex-start;
    max-width: 100%;
    overflow-x: auto;
}

.le-tabs button {
    padding: 6px 14px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    font: inherit;
    font-size: 0.92rem;
    color: var(--le-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
}

.le-tabs button:hover { color: var(--le-ink); }

.le-tabs button[aria-selected="true"] {
    background: var(--le-ink);
    color: #fff;
}

.le-tabs button:focus-visible,
.le-orbit-frame:focus-visible,
.le-aurora-frame:focus-visible {
    outline: 2px solid var(--le-accent);
    outline-offset: 3px;
}

/* Satellite frame */
.le-orbit-frame {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-height: 640px;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 8px;
    overflow: hidden;
    background: radial-gradient(ellipse at center, #111a33 0%, var(--le-space) 70%);
    cursor: zoom-in;
}

.le-orbit-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.le-orbit[aria-busy="true"] .le-orbit-frame img { opacity: 0.35; }

.le-orbit[aria-busy="true"] .le-orbit-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.07) 50%, transparent 80%);
    background-size: 220% 100%;
    animation: le-shimmer 1.6s linear infinite;
}

@keyframes le-shimmer {
    from { background-position: 120% 0; }
    to   { background-position: -120% 0; }
}

.le-empty-msg {
    display: none;
    position: absolute;
    inset: 0;
    align-items: center;
    justify-content: center;
    font-style: italic;
    color: #8c93a8;
}
.le-orbit.is-empty .le-empty-msg { display: flex; }
.le-orbit.is-empty .le-orbit-frame img { display: none; }

.le-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(7, 10, 20, 0.62);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    color: #e9ecf4;
    font-family: var(--le-serif);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
}

.le-badge.is-live::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ff5a47;
    animation: le-blink 2.4s ease-in-out infinite;
}

@keyframes le-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

main.le-main .le-caption {
    margin-top: 14px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #45413a;
}

/* Earthquake list */
main.le-main .le-quake-summary {
    padding: 10px 12px;
    font-size: 0.95rem;
    line-height: 1.45;
    background: var(--le-wash);
    border-left: 2px solid var(--le-accent);
    border-radius: 0 4px 4px 0;
}

.le-quake-list {
    list-style: none;
    margin: 10px 0 0;
    padding: 0 4px 0 0;
    flex: 1 1 0;
    min-height: 260px;
    max-height: 640px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.le-quake a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 6px;
    border-bottom: 1px solid var(--le-rule);
    color: inherit;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.15s ease;
}

.le-quake:last-child a { border-bottom: 0; }
.le-quake a:hover { background: var(--le-wash); }

.le-mag {
    flex: 0 0 auto;
    width: 2.6em;
    height: 2.6em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
}
.le-mag.m2 { background: var(--m2); color: #3d2a05; }
.le-mag.m3 { background: var(--m3); }
.le-mag.m4 { background: var(--m4); }
.le-mag.m5 { background: var(--m5); }
.le-mag.m6 { background: var(--m6); }

.le-quake-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.le-quake-place {
    font-size: 0.96rem;
    line-height: 1.3;
}

.le-quake-meta {
    font-size: 0.78rem;
    color: var(--le-faint);
}

/* ---------------------------------------------------------------------
   III  world map
   --------------------------------------------------------------------- */

.le-world { margin-top: 28px; }

.le-map {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 1;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--le-rule);
    background: #dfe7ea;
}

.le-map-base,
.le-map-night,
.le-map-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.le-map-night { image-rendering: auto; }

/* Earthquake dots */
.le-dot circle {
    stroke: rgba(255, 255, 255, 0.9);
    stroke-width: 1.2;
    opacity: 0.85;
    transition: opacity 0.15s ease;
    transform-box: fill-box;
    transform-origin: center;
}
.le-dot.m2 circle { fill: var(--m2); }
.le-dot.m3 circle { fill: var(--m3); }
.le-dot.m4 circle { fill: var(--m4); }
.le-dot.m5 circle { fill: var(--m5); }
.le-dot.m6 circle { fill: var(--m6); }
.le-dot:hover circle,
.le-dot.is-hot circle {
    opacity: 1;
    stroke: var(--le-ink);
    stroke-width: 2.5;
}
.le-dot.is-hot circle:last-child { transform: scale(1.6); }

.le-dot .le-dot-pulse {
    fill: none !important;
    stroke: var(--m5) !important;
    stroke-width: 2 !important;
    animation: le-ripple 2.2s ease-out infinite;
}

@keyframes le-ripple {
    from { transform: scale(1); opacity: 0.9; }
    to   { transform: scale(3); opacity: 0; }
}

/* Natural events */
.le-ev-track {
    fill: none;
    stroke: #5a4fb3;
    stroke-width: 1.6;
    stroke-dasharray: 3 4;
    opacity: 0.7;
}
.le-ev-storm .le-ev-ring { fill: rgba(90, 79, 179, 0.18); stroke: #5a4fb3; stroke-width: 1.6; }
.le-ev-storm .le-ev-core { fill: #5a4fb3; }
.le-ev-fire .le-ev-core { fill: #f07a1a; stroke: #fff; stroke-width: 1; }
.le-ev-volcano .le-ev-core { fill: #8f1d12; stroke: #fff; stroke-width: 1; }
.le-ev:hover .le-ev-core { stroke: var(--le-ink); stroke-width: 2; }

/* Space Station */
.le-iss-footprint {
    fill: rgba(14, 116, 144, 0.08);
    stroke: rgba(14, 116, 144, 0.45);
    stroke-width: 1;
    stroke-dasharray: 4 4;
}
.le-iss-track {
    fill: none;
    stroke: #0e7490;
    stroke-width: 1.8;
    stroke-dasharray: 2 5;
    stroke-linecap: round;
}
.le-iss-halo { fill: rgba(14, 116, 144, 0.18); animation: le-halo 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.le-iss-panel { fill: #0e7490; stroke: #fff; stroke-width: 1; }
.le-iss-body { fill: #fff; stroke: #0e7490; stroke-width: 1.4; }

@keyframes le-halo {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.35); opacity: 0.5; }
}

/* Sun */
.le-sun-glow { fill: rgba(255, 196, 61, 0.28); }
.le-sun-core { fill: #ffbf2e; stroke: #fff; stroke-width: 1.5; }

/* Legend */
.le-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    font-size: 0.86rem;
    color: var(--le-muted);
}

.le-legend li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.le-key {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.le-key-night  { background: rgba(18, 26, 54, 0.55); border-radius: 3px; }
.le-key-sun    { background: #ffbf2e; }
.le-key-quake  { background: var(--m4); }
.le-key-iss    { background: #0e7490; border-radius: 3px; }
.le-key-storm  { background: rgba(90, 79, 179, 0.25); border: 1.6px solid #5a4fb3; }
.le-key-fire   { background: #f07a1a; transform: rotate(45deg) scale(0.8); border-radius: 1px; }
.le-key-volcano{ width: 0; height: 0; border-radius: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 12px solid #8f1d12; }

.le-storms {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--le-rule);
}

main.le-main .le-storms-title {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--le-faint);
}

.le-storm-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 8px 22px;
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
}

.le-storm-list li {
    display: flex;
    flex-direction: column;
    padding-left: 12px;
    border-left: 2px solid #5a4fb3;
}

.le-storm-list a {
    color: var(--le-ink);
    font-style: italic;
    text-decoration: none;
}
.le-storm-list a:hover { text-decoration: underline; }

.le-storm-meta {
    font-size: 0.8rem;
    color: var(--le-faint);
}

main.le-main .le-fineprint {
    margin-top: 12px;
    font-size: 0.8rem;
    font-style: italic;
    color: var(--le-faint);
}

/* ---------------------------------------------------------------------
   IV, V, VI
   --------------------------------------------------------------------- */

.le-trio {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
    margin-top: 28px;
    align-items: stretch;
}

/* Aurora */
.le-aurora-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

main.le-main .le-kp {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: 2px;
}

.le-kp-value {
    font-size: 2.6rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: #2f7d4f;
}
.le-kp-value.is-active { color: #c27a12; }
.le-kp-value.is-storm  { color: var(--le-live); }

.le-kp-max {
    font-size: 1rem;
    color: var(--le-faint);
}

main.le-main .le-kp-label {
    margin-top: 4px;
    font-style: italic;
    font-size: 0.95rem;
}

.le-aurora-frame {
    flex: 0 0 auto;
    width: 112px;
    height: 112px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    overflow: hidden;
    background: var(--le-space);
    cursor: zoom-in;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.le-aurora-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.18);
    display: block;
}
.le-aurora-frame:not(.is-loaded) img { visibility: hidden; }

.le-kp-bars {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    height: 46px;
    margin-top: 16px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--le-rule);
}

.le-kp-bar {
    flex: 1;
    border-radius: 3px 3px 0 0;
    background: #9cc7ad;
}
.le-kp-bar.is-active { background: #e2b45c; }
.le-kp-bar.is-storm  { background: #e0705f; }

/* Sun & Moon */
.le-sun-arc {
    width: 100%;
    max-width: 260px;
    margin: 0 auto;
    display: block;
}

.le-horizon { stroke: var(--le-rule); stroke-width: 1.5; }
.le-arc { fill: none; stroke: #e9c46a; stroke-width: 1.5; stroke-dasharray: 3 4; }
.le-sun-dot { fill: #ffbf2e; stroke: #fff; stroke-width: 2; filter: drop-shadow(0 0 4px rgba(255, 180, 40, 0.8)); }
.le-sun-dot.is-night { fill: #c9c4b8; filter: none; }

main.le-main .le-sun-status {
    text-align: center;
    font-style: italic;
    color: var(--le-muted);
    font-size: 0.95rem;
}

main.le-main .le-daydiff { margin-top: 6px; font-size: 0.82rem; }

.le-moon {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--le-rule);
}

.le-moon-svg {
    width: 64px;
    height: 64px;
    flex: 0 0 auto;
}

.le-moon-dark { fill: #2a2d3a; }
.le-moon-lit  { fill: #f4efdf; }

main.le-main .le-moon-name { font-size: 1.15rem; font-style: italic; }
main.le-main .le-moon-pct,
main.le-main .le-moon-next { font-size: 0.86rem; color: var(--le-muted); }

/* Loading state for small cards */
.le-card[aria-busy="true"] .le-big,
.le-card[aria-busy="true"] .le-stats dd {
    color: var(--le-faint);
}

.le-colophon {
    max-width: 44em;
    margin: 30px auto 0 !important;
    text-align: center;
    font-size: 0.85rem !important;
    font-style: italic;
    color: var(--le-faint) !important;
}

/* ---------------------------------------------------------------------
   Lightbox (same as Daily Picks)
   --------------------------------------------------------------------- */

.lightbox {
    max-width: min(94vw, 1400px);
    max-height: 94vh;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: visible;
}
.lightbox::backdrop { background: rgba(6, 8, 14, 0.9); }
.lightbox figure { margin: 0; text-align: center; }
.lightbox img {
    display: block;
    max-width: min(94vw, 1400px);
    max-height: 86vh;
    margin: 0 auto;
    object-fit: contain;
}
.lightbox figcaption {
    margin-top: 10px;
    font-family: var(--le-serif);
    font-style: italic;
    color: #e9e5dc;
}
.lightbox-close {
    position: fixed;
    top: 14px;
    right: 18px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.25); }

/* ---------------------------------------------------------------------
   Small screens
   --------------------------------------------------------------------- */

@media (max-width: 900px) {
    .le-top { grid-template-columns: 1fr; }
    .le-quake-list { max-height: 420px; flex: none; }
}

@media (max-width: 700px) {
    .le-hero { padding: 16px 0 24px; }
    .le-card { padding: 16px; }
    .le-top, .le-trio { gap: 20px; }
    .le-world, .le-trio { margin-top: 20px; }
    .le-sep { display: none; }
    main.le-main .le-clock > span:not(.le-sep) { display: block; }
    .le-legend { font-size: 0.8rem; gap: 6px 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .le-live-dot, .le-badge.is-live::before, .le-dot .le-dot-pulse, .le-iss-halo,
    .le-orbit[aria-busy="true"] .le-orbit-frame::after { animation: none; }
}

/* =====================================================================
   IV. THE UNITED STATES, RIGHT NOW
   ===================================================================== */

.le-us { margin-top: 28px; }

.le-us-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 18px;
    margin-bottom: 14px;
}

.le-us-controls .le-tabs { margin-bottom: 0; }

.le-toggles {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    font-size: 0.92rem;
    color: var(--le-muted);
}

.le-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.le-toggle input { accent-color: var(--le-accent); width: 15px; height: 15px; }

.le-play {
    padding: 6px 14px;
    border: 1px solid var(--le-rule);
    border-radius: 999px;
    background: var(--le-paper);
    font: inherit;
    font-size: 0.9rem;
    color: var(--le-ink);
    cursor: pointer;
    transition: background 0.2s ease;
}
.le-play:hover { background: var(--le-wash); }
.le-play[aria-pressed="true"] { background: var(--le-ink); color: #fff; border-color: var(--le-ink); }
.le-play:disabled { opacity: 0.6; cursor: progress; }
.le-play:focus-visible, .le-toggle input:focus-visible { outline: 2px solid var(--le-accent); outline-offset: 2px; }

.le-us-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
    align-items: start;
}

.le-usmap {
    position: relative;
    width: 100%;
    aspect-ratio: 1200 / 665.4;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--le-rule);
    background: #dfe7ea;
}

.le-usmap-base,
.le-usmap-base svg,
.le-usmap-base img,
.le-usmap-radar,
.le-usmap-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.le-usmap-base .us-states path { fill: #f6f2ea; stroke: #bdb5a6; stroke-width: 0.9; }
.le-usmap-base .us-borders { stroke: #cfc6b7; }

.le-usmap-radar {
    opacity: 0.82;
    pointer-events: none;
}
.le-usmap-radar[hidden] { display: none; }

.le-radar-badge { top: auto; bottom: 10px; left: 10px; }
.le-radar-badge[hidden] { display: none; }

/* Warnings */
.le-alert-state { fill-opacity: 0.16; stroke-opacity: 0.55; stroke-width: 1.4; }
.le-alert-poly  { fill-opacity: 0.38; stroke-width: 1.6; }
.le-alert-poly:hover { fill-opacity: 0.6; }

/* City temperatures */
.le-city rect { stroke: rgba(255, 255, 255, 0.95); stroke-width: 1.5; }
.le-city-temp {
    font-family: var(--le-serif);
    font-size: 17px;
    font-weight: 700;
    text-anchor: middle;
    fill: #1b1a17;
}
.le-city-name {
    font-family: var(--le-serif);
    font-size: 12px;
    text-anchor: middle;
    fill: #4a463f;
    paint-order: stroke;
    stroke: rgba(246, 242, 234, 0.9);
    stroke-width: 3px;
}

/* Air quality (EPA colours, slightly softened) */
.aqi-1 { --aqi: #4cbb5a; --aqi-ink: #12351a; }
.aqi-2 { --aqi: #f2d43a; --aqi-ink: #3d3307; }
.aqi-3 { --aqi: #f08a24; --aqi-ink: #3f2005; }
.aqi-4 { --aqi: #de3a2f; --aqi-ink: #fff; }
.aqi-5 { --aqi: #8f3f97; --aqi-ink: #fff; }
.aqi-6 { --aqi: #7e0023; --aqi-ink: #fff; }

.le-aqi-dot { fill: var(--aqi); stroke: #fff; stroke-width: 1.2; fill-opacity: 0.9; }
.le-aqi-dot:hover { stroke: var(--le-ink); stroke-width: 2; }

.le-aqi-pill {
    display: inline-block;
    padding: 1px 9px;
    border-radius: 999px;
    background: var(--aqi, var(--le-wash));
    color: var(--aqi-ink, var(--le-ink));
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Legend */
.le-us-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 30px;
    margin-top: 12px;
}

.le-scale {
    display: grid;
    grid-template-columns: auto;
    gap: 3px;
    min-width: 180px;
    font-size: 0.78rem;
    color: var(--le-faint);
}
.le-scale[hidden] { display: none; }

.le-scale-label {
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.le-scale-bar {
    display: block;
    height: 8px;
    border-radius: 4px;
}
.le-scale-radar { background: linear-gradient(90deg, #04e9e7, #019ff4, #02fd02, #01c501, #fdf802, #fd9500, #fd0000, #bc0000, #f800fd); }
/* -10°C … 38°C, same stops as tempColor() in live-earth.js */
.le-scale-temp  { background: linear-gradient(90deg, rgb(96,123,217), rgb(127,179,230) 21%, rgb(159,211,199) 42%, rgb(242,210,122) 58%, rgb(240,163,91) 77%, rgb(217,83,79) 94%); }

.le-scale-ends {
    display: flex;
    justify-content: space-between;
}

.le-aqi-keys {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    color: var(--le-muted);
}
.le-aqi-keys span { display: inline-flex; align-items: center; gap: 5px; }
.le-aqi-keys i { width: 10px; height: 10px; border-radius: 50%; background: var(--aqi); display: inline-block; }

/* Side panel */
.le-us-side {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.le-nyc {
    padding: 14px 16px;
    border-radius: 8px;
    background: var(--le-wash);
}

.le-nyc-now {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 4px;
}

.le-nyc-temp {
    font-size: 3rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

main.le-main .le-nyc-cond { font-style: italic; font-size: 1.05rem; }
main.le-main .le-nyc-feels { font-size: 0.86rem; color: var(--le-muted); }

.le-nyc .le-stats { border-top-color: #e6e0d4; }

.le-forecast {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #e6e0d4;
}
.le-forecast[hidden] { display: none; }
main.le-main .le-forecast-name { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--le-faint); }
main.le-main .le-forecast-text { margin-top: 4px; font-size: 0.9rem; line-height: 1.5; color: #45413a; }

.le-warning-list {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
}

.le-warning {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 7px 0;
    border-bottom: 1px solid var(--le-rule);
}
.le-warning:last-child { border-bottom: 0; }

.le-warning-swatch {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    margin-top: 6px;
    border-radius: 2px;
}

.le-warning-body { display: flex; flex-direction: column; }
.le-warning-name { font-size: 0.95rem; }
.le-warning-states { font-size: 0.78rem; color: var(--le-faint); }

.le-warning-empty {
    padding: 6px 0;
    font-size: 0.9rem;
    font-style: italic;
    color: var(--le-muted);
}

/* =====================================================================
   VIII. EARTH'S POPULATION
   ===================================================================== */

.le-people { margin-top: 28px; }

.le-people-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    gap: 28px;
    align-items: start;
}

main.le-main .le-pop {
    margin-top: 4px;
    font-size: clamp(2rem, 4.4vw, 3rem);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
}

.le-stats-4 { grid-template-columns: repeat(2, 1fr); }

.le-people-map {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(170px, 1fr);
    gap: 18px;
    align-items: start;
}

.le-minimap {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 1;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--le-rule);
}

.le-minimap img,
.le-minimap svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.le-pop-bubble {
    fill: rgba(138, 43, 29, 0.32);
    stroke: rgba(138, 43, 29, 0.8);
    stroke-width: 1.5;
    transition: fill 0.15s ease;
}
.le-pop-bubble.is-hot { fill: rgba(138, 43, 29, 0.6); stroke-width: 2.5; }

.le-pop-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.86rem;
}

.le-pop-list li {
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: 8px;
    padding: 3px 4px;
    border-radius: 4px;
    cursor: default;
}
.le-pop-list li.is-hot { background: var(--le-wash); }

.le-pop-num { color: var(--le-muted); font-variant-numeric: tabular-nums; }

.le-pop-bar {
    grid-column: 1 / -1;
    height: 3px;
    margin-top: 2px;
    border-radius: 2px;
    background: rgba(138, 43, 29, 0.55);
}

/* ---- Small screens for the new sections ---- */

@media (max-width: 1000px) {
    .le-us-layout { grid-template-columns: 1fr; }
    .le-us-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
    .le-people-layout { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
    .le-us, .le-people { margin-top: 20px; }
    .le-people-map { grid-template-columns: 1fr; }
    .le-pop-list { columns: 2; column-gap: 16px; }
    .le-pop-list li { break-inside: avoid; }
    .le-city-name { display: none; }
}

/* ---- Under the U.S. map: snapshot tiles + New York next 12 hours ---- */

.le-us-extra {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--le-rule);
    display: grid;
    gap: 18px;
}

.le-snapshot {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

.le-snap {
    padding: 12px 14px;
    border-radius: 8px;
    background: var(--le-wash);
    min-width: 0;
}

.le-snap dt {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--le-faint);
}

.le-snap dd {
    margin: 4px 0 0;
    display: flex;
    flex-direction: column;
}

.le-snap-big {
    font-size: 1.35rem;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.le-snap-sub {
    margin-top: 2px;
    font-size: 0.82rem;
    line-height: 1.35;
    color: var(--le-muted);
}

.le-hourly-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 16px;
}

main.le-main .le-hourly-summary {
    font-size: 0.92rem;
    font-style: italic;
    color: var(--le-muted);
}

.le-hourly-chart {
    position: relative;
    margin-top: 6px;
}

.le-hourly-chart svg {
    display: block;
    width: 100%;
    height: 168px;
    overflow: visible;
}

.le-hr-area  { fill: rgba(138, 43, 29, 0.07); }
.le-hr-line  { fill: none; stroke: var(--le-accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.le-hr-dot   { fill: var(--le-paper); stroke: var(--le-accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.le-hr-bar   { fill: #6f9fd8; }
.le-hr-base  { stroke: var(--le-rule); stroke-width: 1; vector-effect: non-scaling-stroke; }
.le-hr-cross { stroke: var(--le-faint); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.le-hr-hit   { fill: transparent; cursor: crosshair; }

.le-hr-label,
.le-hr-axis {
    font-family: var(--le-serif);
    text-anchor: middle;
}
.le-hr-label { font-size: 14px; fill: var(--le-ink); }
.le-hr-small { font-size: 11.5px; fill: var(--le-muted); }
.le-hr-axis  { font-size: 12px; fill: var(--le-faint); }
.le-hr-axis-left { text-anchor: start; letter-spacing: 0.06em; text-transform: uppercase; font-size: 10.5px; }

.le-hourly-tip {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 7px 11px;
    border-radius: 6px;
    background: var(--le-ink);
    color: #f6f2ea;
    font-size: 0.82rem;
    line-height: 1.35;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
.le-hourly-tip[hidden] { display: none; }

.le-visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

@media (max-width: 1000px) {
    .le-snapshot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
