.weather-page-map-test {
    overflow-x: hidden;
}

.weather-page-map-test .main-shell {
    padding-top: 22px;
}

.map-test-page,
.map-test-page * {
    box-sizing: border-box;
}

.map-test-page {
    --map-navy: #082f49;
    --map-navy-soft: #0f5062;
    --map-teal: #0f8c83;
    --map-cyan: #2cc9bd;
    --map-ink: #10283c;
    --map-muted: #587083;
    width: min(1480px, calc(100vw - 28px));
    max-width: 100%;
    display: grid;
    gap: 24px;
    min-width: 0;
}

.map-test-hero,
.map-test-layout,
.map-test-info-grid {
    width: 100%;
    min-width: 0;
    display: grid;
}

.map-test-hero {
    position: relative;
    grid-template-columns: minmax(0, 1.5fr) minmax(340px, .72fr);
    gap: 28px;
    overflow: hidden;
    padding: clamp(28px, 4vw, 54px);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 36px;
    background:
        radial-gradient(circle at 76% 16%, rgba(44, 201, 189, .2), transparent 30%),
        linear-gradient(135deg, #062c45 0%, #0a4157 48%, #0f6873 100%);
    box-shadow: 0 28px 78px rgba(8, 47, 73, .22);
    color: #fff;
}

.map-test-hero::before,
.map-test-hero::after {
    content: "";
    position: absolute;
    pointer-events: none;
    border-radius: 999px;
}

.map-test-hero::before {
    width: 420px;
    height: 420px;
    right: -150px;
    top: -220px;
    border: 1px solid rgba(255, 255, 255, .13);
    box-shadow: 0 0 0 44px rgba(255, 255, 255, .025), 0 0 0 96px rgba(255, 255, 255, .018);
}

.map-test-hero::after {
    width: 12px;
    height: 12px;
    left: 42%;
    bottom: 38px;
    background: var(--map-cyan);
    box-shadow: 0 0 0 13px rgba(44, 201, 189, .13);
}

.map-test-hero__copy,
.map-test-status {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.map-test-kicker,
.map-test-section-kicker {
    margin: 0;
    color: var(--map-teal);
    font-size: .75rem;
    font-weight: 900;
    letter-spacing: .13em;
    line-height: 1.35;
    text-transform: uppercase;
}

.map-test-kicker {
    color: #6fe6df;
}

.map-test-hero h1 {
    max-width: 760px;
    margin: 12px 0 0;
    color: #fff;
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 5.6vw, 5.1rem);
    font-weight: 850;
    letter-spacing: -.055em;
    line-height: .96;
}

.map-test-hero__lead {
    max-width: 810px;
    margin: 22px 0 0;
    color: #d5e8ed;
    font-size: clamp(.98rem, 1.25vw, 1.12rem);
    line-height: 1.72;
}

.map-test-hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 24px;
}

.map-test-hero__badges span,
.map-test-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 13px;
    border-radius: 999px;
    font-size: .77rem;
    font-weight: 850;
}

.map-test-hero__badges span {
    border: 1px solid rgba(173, 240, 236, .22);
    background: rgba(255, 255, 255, .08);
    color: #e9fbfb;
    backdrop-filter: blur(10px);
}

.map-test-status {
    align-self: stretch;
    display: grid;
    align-content: start;
    gap: 17px;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 28px;
    background: rgba(4, 30, 48, .48);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
    backdrop-filter: blur(18px);
}

.map-test-status__row,
.map-test-panel-card__head,
.map-test-map-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
}

.map-test-status__row > span {
    color: #c8e0e6;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.map-test-pill[data-state="ok"] { background: #d8fbf2; color: #087261; }
.map-test-pill[data-state="warning"] { background: #fef3c7; color: #92400e; }
.map-test-pill[data-state="error"] { background: #fee2e2; color: #991b1b; }
.map-test-pill[data-state="loading"] { background: rgba(255, 255, 255, .12); color: #fff; }

.map-test-format {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    padding: 4px 0 15px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.map-test-format strong {
    color: #fff;
    font-size: clamp(2.8rem, 4vw, 4.3rem);
    letter-spacing: -.06em;
    line-height: .9;
}

.map-test-format span {
    color: #8ee9e2;
    font-size: .75rem;
    font-weight: 850;
    text-align: right;
}

.map-test-status__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.map-test-status__grid > div {
    min-width: 0;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .07);
}

.map-test-status__grid span,
.map-test-extreme span,
.map-test-panel-card__head > span {
    display: block;
    margin-bottom: 5px;
    color: inherit;
    font-size: .67rem;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
    opacity: .72;
}

.map-test-status__grid strong {
    display: block;
    overflow-wrap: anywhere;
    color: #fff;
    font-size: .82rem;
}

.map-test-status > p {
    margin: 0;
    color: #c7dde3;
    font-size: .83rem;
    line-height: 1.58;
}

.map-test-layout {
    grid-template-columns: minmax(0, 2.34fr) minmax(320px, .72fr);
    align-items: start;
    gap: 22px;
}

.map-test-main-card,
.map-test-panel-card,
.map-test-info-grid article {
    min-width: 0;
    border: 1px solid rgba(92, 119, 139, .13);
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 18px 48px rgba(16, 40, 60, .09);
}

.map-test-main-card {
    display: grid;
    gap: 18px;
    padding: 22px;
    border-radius: 30px;
}

.map-test-map-head {
    padding: 4px 3px 2px;
}

.map-test-map-head h2,
.map-test-panel-card h2,
.map-test-info-grid h2 {
    margin: 5px 0 0;
    color: var(--map-ink);
    font-family: var(--font-display);
    line-height: 1.12;
}

.map-test-map-head h2 {
    font-size: clamp(1.45rem, 2.4vw, 2.1rem);
}

.map-test-download {
    flex: 0 0 auto;
    min-width: 218px;
    display: grid;
    justify-items: start;
    gap: 2px;
    padding: 13px 20px 12px;
    border-radius: 18px;
    background: linear-gradient(135deg, #0f8c83, #087184);
    box-shadow: 0 14px 28px rgba(15, 140, 131, .23);
    color: #fff;
    transition: transform .18s ease, box-shadow .18s ease;
}

.map-test-download:hover,
.map-test-download:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(15, 140, 131, .3);
}

.map-test-download span {
    font-size: .93rem;
    font-weight: 900;
}

.map-test-download small {
    color: #c8f5f0;
    font-size: .68rem;
    font-weight: 750;
}

.map-test-image-frame {
    position: relative;
    width: 100%;
    min-height: 480px;
    margin: 0;
    overflow: hidden;
    border: 1px solid #d7e4ea;
    border-radius: 25px;
    background:
        linear-gradient(rgba(15, 118, 110, .025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 118, 110, .025) 1px, transparent 1px),
        #edf4f7;
    background-size: 32px 32px;
    box-shadow: inset 0 0 0 7px rgba(255, 255, 255, .58);
}

.map-test-image-frame img {
    display: block;
    width: 100%;
    height: auto;
    min-width: 0;
    object-fit: contain;
}

.map-test-loader {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-content: center;
    gap: 8px;
    padding: 24px;
    text-align: center;
    background: rgba(240, 247, 250, .94);
    color: var(--map-ink);
}

.map-test-loader::before {
    content: "";
    width: 34px;
    height: 34px;
    margin: 0 auto 6px;
    border: 4px solid rgba(15, 140, 131, .18);
    border-top-color: var(--map-teal);
    border-radius: 50%;
    animation: map-test-spin .8s linear infinite;
}

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

.map-test-loader.is-hidden { display: none; }
.map-test-loader span { max-width: 480px; color: var(--map-muted); }

.map-test-extremes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.map-test-extreme {
    position: relative;
    overflow: hidden;
    padding: 17px 18px 16px 23px;
    border: 1px solid rgba(37, 99, 235, .15);
    border-radius: 20px;
    background: linear-gradient(135deg, #f1f6ff, #fff);
    color: #1d4ed8;
}

.map-test-extreme::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: currentColor;
}

.map-test-extreme-hot {
    border-color: rgba(220, 38, 38, .15);
    background: linear-gradient(135deg, #fff3f3, #fff);
    color: #dc2626;
}

.map-test-extreme strong {
    display: block;
    color: var(--map-ink);
    font-size: 1.34rem;
    line-height: 1.05;
}

.map-test-extreme p {
    margin: 6px 0 0;
    color: var(--map-muted);
    font-size: .84rem;
}

.map-test-panel {
    position: sticky;
    top: 102px;
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 14px;
}

.map-test-panel-card {
    padding: 19px;
    border-radius: 24px;
}

.map-test-panel-card__head {
    margin-bottom: 14px;
}

.map-test-panel-card__head h2 {
    font-size: 1.13rem;
}

.map-test-panel-card__head > span {
    flex: 0 0 auto;
    margin: 0;
    padding: 7px 10px;
    border-radius: 999px;
    background: #e8f4f3;
    color: #0b756e;
    opacity: 1;
}

.map-test-options {
    display: grid;
    gap: 8px;
}

.map-test-option {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 11px;
    align-items: center;
    padding: 11px 12px;
    border: 1px solid #dbe6eb;
    border-radius: 16px;
    background: #f8fbfc;
    color: var(--map-ink);
    text-align: left;
    transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.map-test-option:hover {
    transform: translateY(-1px);
    border-color: rgba(15, 140, 131, .3);
}

.map-test-option[aria-checked="true"] {
    border-color: rgba(15, 140, 131, .44);
    background: #eaf7f5;
    box-shadow: inset 4px 0 0 var(--map-teal), 0 8px 18px rgba(15, 140, 131, .08);
}

.map-test-option__dot {
    width: 31px;
    height: 31px;
    border: 4px solid #fff;
    border-radius: 11px;
    box-shadow: 0 0 0 1px rgba(15, 40, 60, .13);
}

.map-test-option strong,
.map-test-option span:last-child {
    display: block;
}

.map-test-option strong {
    overflow-wrap: anywhere;
    font-size: .84rem;
    line-height: 1.25;
}

.map-test-option span:last-child {
    margin-top: 2px;
    color: var(--map-muted);
    font-size: .68rem;
}

.map-test-panel-card--legend {
    background: linear-gradient(180deg, rgba(255, 255, 255, .97), rgba(247, 251, 252, .97));
}

.map-test-legend {
    min-height: 230px;
}

.map-test-legend__scale {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 15px;
    align-items: stretch;
}

.map-test-legend__bar {
    min-height: 246px;
    border: 4px solid #fff;
    border-radius: 18px;
    box-shadow: 0 0 0 1px rgba(15, 40, 60, .12), 0 8px 18px rgba(15, 40, 60, .08);
}

.map-test-legend__ticks {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.map-test-legend__tick {
    position: relative;
    color: #345064;
    font-size: .72rem;
    font-weight: 780;
    line-height: 1.1;
}

.map-test-legend__tick::before {
    content: "";
    position: absolute;
    width: 9px;
    height: 1px;
    left: -14px;
    top: .45em;
    background: #9cafbb;
}

.map-test-legend__keys {
    display: grid;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #dfe9ed;
}

.map-test-legend__key {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    color: #435d70;
    font-size: .74rem;
    line-height: 1.35;
}

.map-test-legend__ring {
    width: 24px;
    height: 24px;
    border: 4px solid;
    border-radius: 50%;
    background: #fff;
}

.map-test-legend__ring--hot { border-color: #dc2626; }
.map-test-legend__ring--cold { border-color: #2563eb; }

.map-test-panel-card--description {
    border-color: rgba(15, 140, 131, .18);
    background: linear-gradient(145deg, #eaf8f6, #fff);
}

.map-test-copy,
.map-test-source,
.map-test-info-grid p {
    color: var(--map-muted);
    font-size: .86rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.map-test-copy { margin: 0; }

.map-test-source {
    margin-top: 13px;
    padding: 11px 12px;
    border: 1px solid rgba(15, 140, 131, .12);
    border-radius: 14px;
    background: rgba(255, 255, 255, .66);
    font-size: .72rem;
}

.map-test-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.map-test-info-grid article {
    position: relative;
    overflow: hidden;
    padding: 25px 27px;
    border-radius: 26px;
}

.map-test-info-grid article::after {
    content: "";
    position: absolute;
    width: 120px;
    height: 120px;
    right: -38px;
    bottom: -58px;
    border-radius: 50%;
    background: rgba(15, 140, 131, .07);
}

.map-test-info-grid h2 {
    max-width: 650px;
    font-size: 1.25rem;
}

.map-test-info-grid p:last-child {
    margin: 11px 0 0;
}

@media (max-width: 1180px) {
    .map-test-hero,
    .map-test-layout,
    .map-test-info-grid {
        grid-template-columns: 1fr;
    }

    .map-test-panel {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .map-test-panel-card--description {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .map-test-page {
        width: min(100%, calc(100vw - 18px));
        gap: 16px;
    }

    .map-test-hero {
        gap: 22px;
        padding: 25px 20px;
        border-radius: 26px;
    }

    .map-test-hero h1 {
        font-size: clamp(2.35rem, 14vw, 3.8rem);
    }

    .map-test-status,
    .map-test-main-card,
    .map-test-panel-card,
    .map-test-info-grid article {
        width: 100%;
        max-width: 100%;
    }

    .map-test-main-card {
        padding: 13px;
        border-radius: 23px;
    }

    .map-test-map-head,
    .map-test-status__row,
    .map-test-panel-card__head {
        align-items: flex-start;
        flex-direction: column;
    }

    .map-test-download {
        width: 100%;
        min-width: 0;
    }

    .map-test-image-frame {
        min-height: 220px;
        border-radius: 17px;
    }

    .map-test-status__grid,
    .map-test-extremes,
    .map-test-panel {
        grid-template-columns: 1fr;
    }

    .map-test-panel-card--description {
        grid-column: auto;
    }

    .map-test-format {
        align-items: flex-start;
        flex-direction: column;
    }

    .map-test-format span {
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    .map-test-download,
    .map-test-option {
        transition: none;
    }

    .map-test-loader::before {
        animation: none;
    }
}

body[data-weather-period="night"] .map-test-main-card,
body[data-weather-period="night"] .map-test-panel-card,
body[data-weather-period="night"] .map-test-info-grid article {
    border-color: rgba(153, 201, 218, .18);
    background: rgba(250, 253, 255, .96);
}

body[data-weather-period="night"] .map-test-panel-card--description {
    background: linear-gradient(145deg, #e4f6f3, #fff);
}
