/* Full-bleed homepage (see DESIGN.md): each section is a band; panels within
   a band sit edge to edge and share 1px borders, and bands have breathing
   room between them. */
.home {
    width: 100%;
    padding-bottom: 3rem;
    font-family: var(--font-sans);
}

.home > section + section {
    margin-top: 3rem;
}

@media (max-width: 480px) {
    .home > section + section {
        margin-top: 2rem;
    }
}

.home h2 {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-heading);
}

.home-notice {
    grid-column: 1 / -1;
    margin: 0;
    padding: 0.6rem 1.5rem;
    border-bottom: 1px solid var(--color-info-border);
    background-color: var(--color-info-bg);
    color: var(--color-info-text);
    font-size: 0.9rem;
}

/* ── Introduction: photo wheel + text ──────────────────────────────────── */
.home-intro {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    border-bottom: 1px solid var(--color-border);
}

/* Beside the photos: the welcome line */
.home-intro__side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.home-intro__text {
    max-width: 52rem;
    padding: 2rem 2.5rem 1.25rem;
}



.home-intro__eyebrow {
    margin: 0 0 0.75rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-accent);
}

.home-intro h1 {
    margin: 0 0 1.25rem;
    font-family: var(--font-display);
    letter-spacing: -0.01em;
    font-weight: 700;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    line-height: 1.15;
    color: var(--color-heading);
}

.home-intro__text > p:not(.home-intro__eyebrow) {
    margin: 0 0 1rem;
    line-height: 1.65;
}

.home-intro__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.75rem;
}

.home-intro__link {
    padding: 0.65rem 1.25rem;
    border: 1px solid var(--color-button-bg);
    background-color: var(--color-button-bg);
    color: var(--color-button-text);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color 0.15s ease-in-out;
}

.home-intro__link:hover {
    background-color: var(--color-button-hover);
}

.home-intro__link--quiet {
    border-color: var(--color-border-strong);
    background-color: transparent;
    color: var(--color-text);
}

.home-intro__link--quiet:hover {
    background-color: var(--color-surface-hover);
}

.home-intro__link:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* No photos: the text takes the full width */
.home-intro:has(.photo-wheel[hidden]) {
    grid-template-columns: minmax(0, 1fr);
}

/* Photo wheel: fills the left column; photos scroll sideways (js/photo-wheel.js).
   Its height grows with the window (the photos are 4:3), so a wide screen
   shows the photo, not a thin strip of it */
.photo-wheel {
    position: relative;
    min-height: clamp(420px, 34vw, 860px);
    overflow: hidden;
    border-right: 1px solid var(--color-border);
    background-color: var(--color-surface-muted);
}

.photo-wheel__slides img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.9s cubic-bezier(0.65, 0, 0.35, 1);
}

/* Moved into place off-screen before sliding in, without animating */
.photo-wheel__slides img.is-parked {
    transition: none;
}

/* Still advances, but swaps instantly instead of sliding */
@media (prefers-reduced-motion: reduce) {
    .photo-wheel__slides img {
        transition: none;
    }
}

/* Caption and dots, in a black strip across the bottom of the photo */
.photo-wheel__bar {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 2.75rem;
    padding: 0 0.5rem 0 1rem;
    background-color: rgba(0, 0, 0, 0.85);
    color: #f2f4f6;
}

/* Nothing to show (one photo, no caption): no strip */
.photo-wheel__bar:not(:has(.photo-wheel__caption:not(:empty), .photo-wheel__dots:not([hidden]))) {
    display: none;
}

.photo-wheel__caption {
    margin: 0;
    padding-block: 0.6rem;
    font-size: 0.8rem;
    line-height: 1.4;
}

.photo-wheel__dots {
    display: flex;
    align-self: stretch;
    margin-left: auto;
}

.photo-wheel__dots[hidden] {
    display: none;
}

/* The button is a comfortable target; the dot is drawn inside it */
.photo-wheel__dot {
    display: grid;
    place-items: center;
    width: 1.75rem;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
}

.photo-wheel__dot::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%; /* the one round shape on the site: see DESIGN.md */
    background-color: rgba(255, 255, 255, 0.45);
    transition: background-color 0.15s;
}

.photo-wheel__dot:hover::before {
    background-color: rgba(255, 255, 255, 0.8);
}

.photo-wheel__dot[aria-current="true"]::before {
    background-color: var(--color-accent-hover);
}

.photo-wheel__dot:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: -4px;
}

@media (pointer: coarse) {
    .photo-wheel__dot {
        width: 2.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .photo-wheel__dot::before {
        transition: none;
    }
}

/* Wide screens: the photo takes half the band */
@media (min-width: 1700px) {
    .home-intro {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .home-intro__text {
        padding: 2.5rem 3rem 1.5rem;
    }

}

@media (max-width: 900px) {
    .home-intro {
        grid-template-columns: minmax(0, 1fr);
    }

    .photo-wheel {
        min-height: 0;
        aspect-ratio: 4 / 3;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
    }

    .home-intro__text {
        padding: 1.5rem 1.5rem 1rem;
    }
}

@media (max-width: 480px) {
    .home-intro__text {
        padding: 1.25rem 1rem 0.75rem;
    }

}

/* ── Flights table + map ───────────────────────────────────────────────── */
.home-live {
    border-bottom: 1px solid var(--color-border);
    scroll-margin-top: 5rem;
}

/* The map across the top of the page, with boxes floating on it: a word
   about the site over the tasked flights (left), the active storms (right),
   the photos (bottom right). js/home.js keeps the storms and aircraft in the
   open space they leave. On phones they stack below the map. */
.home-live .home-map {
    min-height: clamp(620px, 88vh, 980px);
}

.home-float {
    position: absolute;
    z-index: var(--z-overlay);
}

.home-float__box {
    border: 1px solid var(--map-tag-border);
    background-color: var(--color-surface);
}

.home-float--left {
    top: 1rem;
    bottom: 1rem;
    left: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: clamp(22rem, 30vw, 34rem);
    pointer-events: none; /* the gap between the boxes passes the pointer to the map */
}

.home-float--left > * {
    pointer-events: auto;
}

/* The photos, 4:3, at the bottom of the left column */
.home-float__box--photos {
    flex: none;
    margin-top: auto;
    overflow: hidden;
}

.home-float__box--photos .photo-wheel {
    min-height: 0;
    aspect-ratio: 4 / 3;
    border: none;
}

.home-float__box--intro {
    padding: 1rem 1.25rem;
}

.home-float__title {
    margin: 0 0 0.4rem;
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 1.9vw, 1.9rem);
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--color-heading);
}

.home-float__box--intro p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--color-text-muted);
}

.home-float--right {
    top: 1rem;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: clamp(18rem, 23vw, 26rem);
    pointer-events: none; /* the gap between the boxes passes the pointer to the map */
}

.home-float--right > * {
    pointer-events: auto;
}

.home-float__box--storms {
    flex: none;
    max-height: 40%;
    overflow: auto;
}

/* The tasked flights take what's left of the column, scrolling when they run long */
.home-float--right .home-float__box--flights {
    flex: 0 1 auto;
    min-height: 0;
    overflow: auto;
}

/* Compact in the narrow column */
.home-float__box--flights .missions {
    font-size: 0.8rem;
}

.home-float__box--flights .missions :is(th, td) {
    padding: 0.35rem 0.4rem;
}

.home-float__box--flights .missions :is(th, td):first-child {
    padding-left: 0;
}

.home-float__box--flights .missions :is(th, td):last-child {
    padding-right: 0;
}

.home-float__box--flights .status {
    padding: 0.05rem 0.35rem;
    font-size: 0.72rem;
}

/* The legend, at the bottom of the right column */
.home-float .home-map__overlay {
    position: static;
    flex: none;
    margin-top: auto;
    max-width: none;
}

.home-float .home-panel {
    padding: 0.9rem 1.1rem;
}

.home-storms {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.home-panel__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.home-panel__more {
    font-size: 0.85rem;
    color: var(--color-accent);
    white-space: nowrap;
}

.storm-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.storm-list > li + li {
    border-top: 1px solid var(--color-border);
}

.storm-list__skel {
    display: grid;
    gap: 0.4rem;
    padding: 0.75rem 0;
}

.storm-list a {
    display: grid;
    grid-template-columns: 1.4rem minmax(0, 1fr);
    gap: 0 0.6rem;
    align-items: center;
    padding: 0.7rem 0.25rem;
    color: var(--color-text);
    text-decoration: none;
    transition: background-color 0.15s;
}

.storm-list a:hover,
.storm-list a:focus-visible {
    background-color: var(--color-surface-hover);
}

/* The storm symbols hold still here (they turn on the map) */
.storm-list .storm-marker__spin { animation: none; }

.storm-list svg {
    grid-row: span 2;
    width: 1.3rem;
    height: 1.3rem;
    color: var(--map-mark, var(--color-text));
}

.storm-list__name {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.5rem;
    font-weight: 700;
}

.storm-list__meta {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.storm-list__empty {
    padding: 0.75rem 0;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* Section bands (Data, Tools and research): a full-width navy bar with the
   section's name, so each part of the page is easy to find */
.home-band {
    margin: 0;
    padding: 0.85rem 1.5rem;
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-transform: none;
    color: var(--header-text, #fff);
    background-color: var(--header-bg);
}

.home .home-band {
    font-size: 1.35rem;
    letter-spacing: -0.01em;
    text-transform: none;
    color: var(--header-text, #fff);
}

.home-band__body {
    padding: 1.5rem 1.5rem 0;
}

/* Tools and research: a column per menu group, no rules between items */
.link-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
    gap: 1.5rem 2.5rem;
}

.link-group__title {
    margin: 0 0 0.75rem;
    padding-bottom: 0.4rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-accent);
    border-bottom: 2px solid var(--color-accent);
}

.link-group__list {
    display: grid;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.link-group__link {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--color-heading);
    text-decoration: none;
}

.link-group__link:hover,
.link-group__link:focus-visible {
    color: var(--color-accent);
    text-decoration: underline;
}

.link-group__desc {
    margin: 0.2rem 0 0;
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--color-text-muted);
}

.home-panel {
    padding: 1.25rem 1.5rem;
}

.home-panel--flights {
    border-right: 1px solid var(--color-border);
}

@media (max-width: 900px) {
    .home-live .home-map {
        display: flex;
        flex-direction: column;
        min-height: 0;
        background-color: transparent;
    }

    .home-live .recon-map {
        position: relative;
        height: max(300px, 70vw);
        background-color: var(--map-sea);
    }

    .home-float {
        position: static;
        width: auto;
        max-height: none;
    }

    .home-float__box {
        border: none;
        border-top: 1px solid var(--color-border);
    }

    .home-float--left {
        gap: 0;
    }

    .home-float__box--intro {
        padding: 1.25rem 1.5rem;
    }

    .home-float .home-panel {
        padding: 1.25rem 1.5rem;
    }

    .home-live .home-map__overlay {
        position: static;
        max-width: none;
        border: none;
        border-top: 1px solid var(--color-border);
        background-color: var(--color-surface);
    }

    /* Satellite: the legend under the map is a dark strip, so its light keys show */
    .home-live .home-map.is-satellite .home-map__overlay {
        background-color: #0b141c;
    }
}

.home-panel__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.home-panel__meta,
.home-panel__foot {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.home-panel__meta {
    font-family: var(--font-sans);
}

.home-panel__foot {
    margin: 0.75rem 0 0;
}

@media (max-width: 480px) {
    .home-panel {
        padding: 1rem;
    }

    .home-notice {
        padding-inline: 1rem;
    }

    .missions {
        font-size: 0.85rem;
    }

    .missions th,
    .missions td {
        padding-inline: 0.3rem;
    }

    .status {
        padding-inline: 0.4rem;
        white-space: normal;
    }
}

.missions {
        font-size: 0.85rem;
    }

    .missions th,
    .missions td {
        padding-inline: 0.3rem;
    }

    .missions th:first-child,
    .missions td:first-child {
        padding-left: 0;
    }

    .missions th:last-child,
    .missions td:last-child {
        padding-right: 0;
    }

    .status {
        padding-inline: 0.4rem;
        white-space: normal;
    }
}


.home-panel__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.home-panel__meta,
.home-panel__foot {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.home-panel__foot {
    margin: 0.75rem 0 0;
}

.missions {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.missions th {
    padding: 0 0.5rem 0.4rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    border-bottom: 1px solid var(--color-border);
}

.missions td {
    padding: 0.55rem 0.5rem;
    vertical-align: top;
    border-bottom: 1px solid var(--color-border);
}

.missions th:first-child,
.missions td:first-child {
    padding-left: 0;
}

.missions th:last-child,
.missions td:last-child {
    padding-right: 0;
}

.missions tbody tr:last-child td {
    border-bottom: none;
}

.missions tbody tr[data-callsign]:hover,
/* Airborne flights open on the Recon Flights page */
.missions tbody tr.is-link { cursor: pointer; }
.missions a.missions__primary { color: inherit; text-decoration: none; }
.missions a.missions__primary:hover { text-decoration: underline; }
.missions a.missions__primary:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.recon-map [data-callsign] { cursor: pointer; }
.recon-map__link:focus-visible { outline: none; }
/* A storm opens its page on Data by Storm: its symbol and tag show it on hover */
.recon-map__storm-link { cursor: pointer; }
.recon-map__storm-link:hover .recon-map__tag-box,
.recon-map__storm-link:focus-visible .recon-map__tag-box { stroke: var(--color-accent); }
.recon-map__storm-link:hover .recon-map__storm,
.recon-map__storm-link:focus-visible .recon-map__storm { filter: drop-shadow(0 0 2px var(--map-sea)); }
.recon-map__link:focus-visible .recon-map__aircraft { stroke: var(--color-accent); stroke-width: 2.5; }

.missions tbody tr.is-highlighted {
    background-color: var(--color-surface-hover);
}

.missions__primary {
    display: block;
    font-weight: 600;
}

.missions__secondary {
    display: block;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.missions__time {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Finished flights, folded under the tasked ones */
.missions-done {
    margin-top: 1rem;
    border-top: 1px solid var(--color-border);
}

.missions-done summary {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 0;
    cursor: pointer;
    list-style: none;
}

.missions-done summary::-webkit-details-marker { display: none; }

/* A chevron that turns when open */
.missions-done summary::before {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    border-right: 2px solid var(--color-text-muted);
    border-bottom: 2px solid var(--color-text-muted);
    transform: rotate(-45deg);
    transition: transform 0.15s ease;
}

.missions-done details[open] summary::before { transform: rotate(45deg); }
.missions-done summary:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.missions-done__title {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.missions-done__count { font-weight: 400; }

@media (prefers-reduced-motion: reduce) {
    .missions-done summary::before { transition: none; }
}

.missions__empty {
    padding: 1.5rem 0.5rem;
    text-align: center;
    color: var(--color-text-muted);
}

.status {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    background-color: var(--color-surface-muted);
    color: var(--color-text-muted);
}

.status--enroute {
    background-color: var(--status-enroute-bg);
    color: var(--status-enroute-text);
}

.status--on_station {
    background-color: var(--status-station-bg);
    color: var(--status-station-text);
}

.status--returning {
    background-color: var(--status-returning-bg);
    color: var(--status-returning-text);
}

.status--cancelled {
    text-decoration: line-through;
}

/* ── Map ───────────────────────────────────────────────────────────────── */
/* Greyscale scope for the storms and the map; recon (aircraft, their
   tracks and tags) and flight plans in the nav bar's navy, apart from the storm labels. The map fills its column; js/home.js
   draws it at whatever size that is. */
.home-map {
    --map-sea: #bfcfdf;   /* JTWC's chart colors: grey-blue sea, sand land, brown coast */
    --map-land: #efdf8f;
    --map-coast: #9f5f00;
    --map-grid: rgba(95, 95, 95, 0.28);
    --map-label: #5f5f5f;
    --map-mark: #1f2328;
    --map-mark-soft: #5b6168;
    --map-track: rgba(31, 35, 40, 0.45);
    --map-tag-bg: rgba(255, 255, 255, 0.88);
    --map-tag-border: #9aa0a6;
    --map-recon: var(--header-bg, #0b3d5c);    /* live aircraft: the nav bar's navy, like the plans */
    --map-recon-track: rgba(11, 61, 92, 0.55);
    --map-plan: var(--header-bg, #0b3d5c);    /* committed flight plans: the nav bar's navy, apart from the live tracks */
    --map-radii-34: #bf001f;    /* wind radii, JTWC's colors: 34 kt red, 50 kt dark red, 64 kt magenta */
    --map-radii-50: #8f1f3f;
    --map-radii-64: #bf00ff;

    position: relative;
    min-height: clamp(360px, 62vh, 680px);
    background-color: var(--map-sea);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .home-map {
        --map-sea: #1c2733;
        --map-land: #3b3523;
        --map-coast: #7a5420;
        --map-grid: rgba(255, 255, 255, 0.09);
        --map-label: #8a9098;
        --map-mark: #e8eaed;
        --map-mark-soft: #a9afb6;
        --map-track: rgba(232, 234, 237, 0.4);
        --map-tag-bg: rgba(21, 24, 28, 0.85);
        --map-tag-border: #5b6168;
        --map-recon: hsl(203, 60%, 44%);
        --map-recon-track: rgba(45, 128, 180, 0.6);
        --map-plan: hsl(203, 60%, 44%);    /* the nav navy, lightened to show on the dark map */
    --map-radii-34: #ff5a6e;
    --map-radii-50: #e0708f;
    --map-radii-64: #d77bff;
    }
}

:root[data-theme="dark"] .home-map {
    --map-sea: #1c2733;
    --map-land: #3b3523;
    --map-coast: #7a5420;
    --map-grid: rgba(255, 255, 255, 0.09);
    --map-label: #8a9098;
    --map-mark: #e8eaed;
    --map-mark-soft: #a9afb6;
    --map-track: rgba(232, 234, 237, 0.4);
    --map-tag-bg: rgba(21, 24, 28, 0.85);
    --map-tag-border: #5b6168;
    --map-recon: hsl(203, 60%, 44%);
    --map-recon-track: rgba(45, 128, 180, 0.6);
    --map-plan: hsl(203, 60%, 44%);    /* the nav navy, lightened to show on the dark map */
    --map-radii-34: #ff5a6e;
    --map-radii-50: #e0708f;
    --map-radii-64: #d77bff;
}

@media (max-width: 900px) {
    .home-map {
        min-height: max(300px, 70vw);
    }
}

.recon-map {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    user-select: none;
}

/* Title, update time and legend, pinned to the map's top-right corner */
.home-map__overlay {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    max-width: calc(100% - clamp(22rem, 30vw, 34rem) - 3rem); /* clear of the left column */
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--map-tag-border);
    background-color: var(--map-tag-bg);
}

.home-map__title {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    margin: 0.45rem 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--map-mark-soft);
}

.map-legend li {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.map-legend li[hidden] { display: none; }

.map-legend svg {
    width: 12px;
    height: 12px;
    overflow: visible;
}

.map-legend svg.map-legend__wide {
    width: 24px;
}

@media (max-width: 480px) {
    .home-map__overlay {
        top: 0.5rem;
        right: 0.5rem;
        padding: 0.4rem 0.6rem;
    }
}

/* ── Satellite background (js/home.js: the Map / Satellite switch) ──────
   GOES GeoColor under the map. The drawn land goes (a faint coastline
   stays), and the marks switch to colors that read on dark imagery and
   white cloud: white storms, a bright recon color, dark halos and boxes.
   (html:root: outranks the dark theme's :root:not(...) .home-map colors) */
html:root .home-map.is-satellite {
    --map-sea: #0b141c;          /* the halo round marks, and under the image while it loads */
    --map-grid: rgba(255, 255, 255, 0.2);
    --map-label: rgba(255, 255, 255, 0.85);
    --map-mark: #ffffff;
    --map-mark-soft: #dfe6ee;
    --map-track: rgba(255, 255, 255, 0.6);
    --map-tag-bg: rgba(11, 20, 28, 0.86);
    --map-tag-border: rgba(255, 255, 255, 0.4);
    --map-recon: #ffc93c;
    --map-recon-track: rgba(255, 201, 60, 0.75);
    --map-plan: #7fd3ff;
    --map-radii-34: #ff5a6e;
    --map-radii-50: #ff9db0;
    --map-radii-64: #e08cff;
}

.recon-map__sat:not([href]) {
    display: none;
}

.home-map.is-satellite .recon-map__land {
    fill: none;
    stroke: rgba(255, 255, 255, 0.35);
}

.home-map.is-satellite .recon-map__grid-label {
    paint-order: stroke;
    stroke: rgba(0, 0, 0, 0.6);
    stroke-width: 3px;
}

/* The legend box goes dark with the imagery */
.home-map.is-satellite .home-map__overlay {
    color: #e8eaed;
}

.home-map.is-satellite .home-map__title h2 {
    color: #ffffff;
}

/* Map / Satellite: two small buttons in the legend's title row */
.home-map__base {
    display: inline-flex;
    margin-left: auto;
}

.home-map__base button {
    min-height: 1.75rem;
    padding: 0 0.6rem;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-button-neutral-text);
    background-color: var(--color-button-neutral-bg);
    border: 1px solid var(--color-button-neutral-border);
    border-radius: 0;
    cursor: pointer;
}

.home-map__base button + button {
    border-left: none;
}

.home-map__base button:hover {
    background-color: var(--color-button-neutral-hover);
}

.home-map__base button[aria-pressed="true"] {
    color: var(--color-button-text);
    background-color: var(--color-button-bg);
    border-color: var(--color-button-bg);
}

.home-map__base button:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 1px;
}

.home-map__sat-note {
    margin: 0.35rem 0 0;
    font-size: 0.72rem;
    color: var(--map-mark-soft);
}

.home-map__sat-note[hidden] {
    display: none;
}

.recon-map__land {
    fill: var(--map-land);
    stroke: var(--map-coast);
    stroke-width: 0.5;
}

.recon-map__grid {
    fill: none;
    stroke: var(--map-grid);
    stroke-width: 1;
}

.recon-map__grid-label {
    fill: var(--map-label);
    font-size: 11px;
}

/* Storm symbols (js/storm-symbols.js): painted in currentColor, with a
   thin sea-colored edge so they stand off the land and tracks */
.recon-map__storm {
    color: var(--map-mark);
    stroke: var(--map-sea);
    stroke-width: 12;         /* symbol units (261 across): ~1 px */
    paint-order: stroke;
}

.recon-map__storm.storm-marker--td {
    stroke: currentColor;     /* the ring is all stroke (its own width) */
}

.recon-map__storm.storm-marker--invest {
    color: var(--map-mark-soft);
    stroke-dasharray: 26 18;
}

/* A slow turn, the way the storm does (south of the equator: clockwise) */
.storm-marker__spin {
    animation: storm-spin 9s linear infinite;
}

.storm-marker__spin.is-south {
    animation-direction: reverse;
}

@keyframes storm-spin {
    to { transform: rotate(-360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .storm-marker__spin { animation: none; }
}

/* "No active reconnaissance flights", in the middle of the map */
.recon-map__none {
    font-family: var(--font-sans);
    font-size: 20px;
    font-weight: 700;
    fill: var(--color-error);
    stroke: var(--map-sea);
    stroke-width: 5px;
    stroke-linejoin: round;
    paint-order: stroke;
    pointer-events: none;
}

/* Wind radii: a ring per threshold, quadrant by quadrant */
.recon-map__radii {
    fill: none;
    stroke-width: 1.4;
    stroke-linejoin: round;
}
.recon-map__radii--34 { stroke: var(--map-radii-34); }
.recon-map__radii--50 { stroke: var(--map-radii-50); }
.recon-map__radii--64 { stroke: var(--map-radii-64); }

/* The category key: five swatches in a row */
.map-legend__cats rect:nth-child(1) { fill: var(--wind-cat-1); }
.map-legend__cats rect:nth-child(2) { fill: var(--wind-cat-2); }
.map-legend__cats rect:nth-child(3) { fill: var(--wind-cat-3); }
.map-legend__cats rect:nth-child(4) { fill: var(--wind-cat-4); }
.map-legend__cats rect:nth-child(5) { fill: var(--wind-cat-5); }

.recon-map__storm-track {
    fill: none;
    stroke: var(--map-mark-soft);
    stroke-width: 1.5;
    stroke-dasharray: 0.5 4;
    stroke-linecap: round;
}

.recon-map__fix {
    stroke: var(--map-mark-soft);
    stroke-width: 1;
}

.recon-map__fix--td {
    fill: var(--map-sea);
}

.recon-map__fix--ts {
    fill: var(--map-mark-soft);
}

.recon-map__fix--hu {
    fill: var(--map-mark);
    stroke: var(--map-mark);
}

.recon-map__track {
    fill: none;
    stroke: var(--map-recon-track);
    stroke-width: 1.25;
    stroke-linejoin: round;
}

.recon-map__aircraft {
    fill: var(--map-recon);
    stroke: var(--map-sea); /* a thin halo keeps it clear of land and tracks */
    stroke-width: 1.25;
    stroke-linejoin: round;
    paint-order: stroke;
}

/* Data tags (callouts) */
.recon-map__leader {
    stroke: var(--map-tag-border);
    stroke-width: 1;
}

.recon-map__tag-box {
    fill: var(--map-tag-bg);
    stroke: var(--map-tag-border);
    stroke-width: 1;
}

.recon-map__tag-text {
    fill: var(--map-mark-soft);
    font-family: var(--font-sans);
    font-size: 11px;
}

.recon-map__tag-text--head {
    fill: var(--map-mark);
    font-weight: 700;
}

/* Aircraft tags: callsign and edge in the recon color */
.recon-map__tag--recon .recon-map__tag-box,
.recon-map__tag--recon .recon-map__leader {
    stroke: var(--map-recon);
}

.recon-map__tag--recon .recon-map__tag-text--head {
    fill: var(--map-recon);
}

/* Positions older than STALE_MS in js/home.js */
.recon-map .is-stale {
    opacity: 0.45;
}

.recon-map__plane.is-highlighted .recon-map__aircraft,
.recon-map__tag.is-highlighted .recon-map__tag-box {
    stroke: var(--map-recon);
    stroke-width: 2;
}

.recon-map__track.is-highlighted {
    stroke: var(--map-recon);
    stroke-width: 2;
}

/* A committed flight plan, shown while its flight is hovered (js/home.js) */
.recon-map__plan { pointer-events: none; }
.recon-map__plan-leg {
    fill: none;
    stroke: var(--map-plan);
    stroke-width: 1.5;
    stroke-dasharray: 5 3;
    stroke-linejoin: round;
}
.recon-map__plan-mark { fill: var(--map-plan); }
.recon-map__plan-drop { fill: none; stroke: var(--map-plan); stroke-width: 1; }
/* The plan's tag: edge and name in the plan color */
.recon-map__tag--plan .recon-map__tag-box,
.recon-map__tag--plan .recon-map__leader { stroke: var(--map-plan); }
.recon-map__tag--plan .recon-map__tag-text--head { fill: var(--map-plan); }

/* ── Data products ─────────────────────────────────────────────────────── */
/* Separate cards in a grid: this is a directory of tools, so each one stands
   on its own (the one place the homepage uses spaced cards). */
.home-data {
    scroll-margin-top: 5rem;
}

.data-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
    gap: 1rem;
}

.data-card {
    display: block;
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--color-border);
    background-color: var(--color-surface);
    color: var(--color-text);
    text-decoration: none;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.data-card:hover,
.data-card:focus-visible {
    border-color: var(--color-accent);
    background-color: var(--color-surface-hover);
}

/* The newest data's plot or map (a thumbnail from Static Images), filling the frame */
.data-card__picture {
    display: block;
    height: 7.5rem;
    margin: -1.25rem -1.5rem 1rem;
    overflow: hidden;
    border-bottom: 1px solid var(--color-border);
    background-color: var(--color-surface-muted);
}

.data-card__picture img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.data-card__picture img:not([src]) {
    visibility: hidden;
}

.data-card__title {
    display: block;
    font-family: var(--font-display);
    letter-spacing: -0.01em;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-heading);
}

.data-card__desc {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

@media (max-width: 480px) {
    .home-band,
    .home-band__body {
        padding-inline: 1rem;
    }
}
