.weather-page-space {
    --space-bg: radial-gradient(circle at top, rgba(18, 36, 58, 0.82), rgba(6, 12, 22, 0.96));
    --space-card: linear-gradient(180deg, rgba(12, 23, 38, 0.98), rgba(6, 14, 24, 0.98));
    --space-card-soft: linear-gradient(180deg, rgba(16, 28, 44, 0.98), rgba(8, 15, 25, 0.98));
    --space-border: rgba(130, 167, 211, 0.16);
    --space-ink: #ecf4ff;
    --space-ink-soft: rgba(223, 234, 248, 0.88);
    --space-ink-muted: rgba(176, 196, 220, 0.8);
    --space-accent: #79c7ff;
    --space-accent-soft: rgba(121, 199, 255, 0.14);
    --space-warn: #f4c86f;
    --space-good: #86e3c2;
    --space-bad: #ff8f85;
    --space-shadow: 0 24px 56px rgba(2, 8, 17, 0.34);
}

.weather-page-space .weather-space-hero,
.weather-page-space .weather-space-board {
    color: var(--space-ink);
}

.weather-page-space .weather-space-shell,
.weather-page-space .weather-space-aside,
.weather-page-space .weather-space-loading,
.weather-page-space .weather-space-card,
.weather-page-space .weather-space-hero-metric,
.weather-page-space .weather-space-image-card,
.weather-page-space .weather-space-chart-card,
.weather-page-space .weather-space-status-card,
.weather-page-space .weather-space-education-card {
    border-radius: 28px;
    border: 1px solid var(--space-border);
    background: var(--space-card);
    box-shadow: var(--space-shadow);
    min-width: 0;
}

.weather-page-space .weather-space-shell,
.weather-page-space .weather-space-aside {
    padding: 28px;
}

.weather-page-space .weather-space-shell {
    display: grid;
    gap: 16px;
    background: linear-gradient(180deg, rgba(9, 18, 31, 0.98), rgba(6, 12, 22, 0.98));
}

.weather-page-space .weather-space-aside {
    display: grid;
    gap: 14px;
    align-content: start;
    background: var(--space-card-soft);
}

.weather-page-space .weather-space-shell h1 {
    margin: 0;
    max-width: 14ch;
    color: var(--space-ink);
    font-size: clamp(1.8rem, 2.2vw, 2.75rem);
    font-weight: 750;
    line-height: 1.08;
    letter-spacing: -0.03em;
    overflow-wrap: anywhere;
}

.weather-page-space .weather-space-aside h2,
.weather-page-space .weather-space-results h2,
.weather-page-space .weather-space-section-title h2,
.weather-page-space .weather-space-loading h2 {
    margin: 0;
    color: var(--space-ink);
    font-size: clamp(1.1rem, 1.45vw, 1.45rem);
    font-weight: 720;
    line-height: 1.22;
    letter-spacing: -0.015em;
    overflow-wrap: anywhere;
}

.weather-page-space .weather-space-shell .hero-text,
.weather-page-space .weather-space-aside p,
.weather-page-space .weather-space-results p,
.weather-page-space .weather-space-results li,
.weather-page-space .weather-space-loading p {
    color: var(--space-ink-soft);
    font-size: 1rem;
    line-height: 1.68;
    overflow-wrap: anywhere;
}

.weather-page-space .weather-space-shell .weather-breadcrumbs,
.weather-page-space .weather-space-shell .weather-breadcrumbs a,
.weather-page-space .weather-space-shell .eyebrow,
.weather-page-space .weather-space-loading .eyebrow,
.weather-page-space .weather-space-label,
.weather-page-space .weather-space-card-kicker,
.weather-page-space .weather-space-section-title .eyebrow,
.weather-page-space .weather-space-aside .section-pill {
    color: var(--space-ink-muted);
}

.weather-space-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.weather-space-highlights span,
.weather-space-mini-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.5rem 0.82rem;
    border-radius: 999px;
    border: 1px solid rgba(121, 199, 255, 0.18);
    background: rgba(121, 199, 255, 0.08);
    color: var(--space-ink);
    font-size: 0.88rem;
    font-weight: 650;
    line-height: 1.25;
    min-width: 0;
    overflow-wrap: anywhere;
}

.weather-space-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.weather-space-side-meta {
    display: grid;
    gap: 6px;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid rgba(121, 199, 255, 0.18);
    background: rgba(121, 199, 255, 0.08);
    min-width: 0;
}

.weather-space-side-label,
.weather-space-card-kicker,
.weather-space-label,
.weather-space-status-label {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--space-ink-muted);
    font-weight: 700;
}

.weather-space-board {
    margin-top: 28px;
}

.weather-space-loading,
.weather-space-image-card,
.weather-space-chart-card,
.weather-space-card,
.weather-space-status-card,
.weather-space-education-card {
    padding: 22px;
}

.weather-space-results {
    display: grid;
    gap: 20px;
}

.weather-space-observatory {
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.95fr);
    align-items: start;
}

.weather-space-section-title {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 14px;
    min-width: 0;
}

.weather-space-section-title > div,
.weather-space-section-title h2,
.weather-space-section-title p,
.weather-space-status-card,
.weather-space-card,
.weather-space-education-card,
.weather-space-hero-metric,
.weather-space-card-list article,
.weather-space-cme-list article {
    min-width: 0;
}

.weather-space-section-subtitle {
    margin-top: 6px;
    max-width: 64ch;
    color: var(--space-ink-muted);
    font-size: 0.95rem;
    line-height: 1.55;
}

.weather-space-image-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: radial-gradient(circle at top, rgba(255, 188, 95, 0.18), rgba(17, 34, 56, 0.92));
    border: 1px solid rgba(255, 255, 255, 0.08);
    aspect-ratio: 1 / 1;
}

.weather-space-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.weather-space-image-caption {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(5, 12, 22, 0.82);
    backdrop-filter: blur(8px);
}

.weather-space-image-caption strong,
.weather-space-image-caption span,
.weather-space-player-meta span,
.weather-space-card strong,
.weather-space-status-card strong,
.weather-space-education-card strong,
.weather-space-card-list strong,
.weather-space-cme-list strong {
    overflow-wrap: anywhere;
}

.weather-space-player {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.weather-space-mode-switch,
.weather-space-player-controls,
.weather-space-pager {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.weather-space-mode-button,
.weather-space-control,
.weather-space-pager button {
    appearance: none;
    border: 1px solid rgba(121, 199, 255, 0.18);
    background: rgba(121, 199, 255, 0.08);
    color: var(--space-ink);
    border-radius: 14px;
    padding: 0.66rem 0.9rem;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 650;
    cursor: pointer;
}

.weather-space-mode-button.is-active,
.weather-space-control:hover,
.weather-space-pager button.is-active {
    background: rgba(121, 199, 255, 0.18);
    border-color: rgba(121, 199, 255, 0.36);
}

.weather-space-player-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    color: var(--space-ink-soft);
    font-size: 0.92rem;
    line-height: 1.5;
}

.weather-space-summary-grid,
.weather-space-data-grid,
.weather-space-status-grid,
.weather-space-education-grid {
    display: grid;
    gap: 18px;
}

.weather-space-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.weather-space-data-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.weather-space-status-grid,
.weather-space-education-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.weather-space-hero-metric {
    display: grid;
    gap: 9px;
    padding: 18px 20px;
}

.weather-space-metric-value {
    font-size: clamp(1.2rem, 1.8vw, 1.75rem);
    line-height: 1.08;
    color: var(--space-ink);
    font-weight: 720;
}

.weather-space-metric-copy,
.weather-space-card p,
.weather-space-card li,
.weather-space-status-card p,
.weather-space-education-card p {
    color: var(--space-ink-soft);
    line-height: 1.6;
}

.weather-space-card-list,
.weather-space-education-list,
.weather-space-meta-list {
    display: grid;
    gap: 12px;
}

.weather-space-card-list article,
.weather-space-cme-list article {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.weather-space-card-list article p,
.weather-space-cme-list article p,
.weather-space-status-card p,
.weather-space-education-card p,
.weather-space-side-meta p,
.weather-space-footer-note,
.weather-space-inline-note {
    margin: 0;
}

.weather-space-meta-list {
    margin-top: 10px;
}

.weather-space-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: baseline;
    color: var(--space-ink-soft);
    font-size: 0.95rem;
    line-height: 1.55;
}

.weather-space-meta-row strong {
    color: var(--space-ink);
    font-size: 0.93rem;
    font-weight: 680;
}

.weather-space-chart-shell {
    overflow-x: auto;
    padding-bottom: 6px;
}

.weather-space-chart-svg {
    width: 100%;
    min-width: 520px;
    height: 220px;
    display: block;
}

.weather-space-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-top: 12px;
}

.weather-space-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--space-ink-soft);
    font-size: 0.92rem;
}

.weather-space-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--space-accent);
    box-shadow: 0 0 0 4px rgba(121, 199, 255, 0.14);
}

.weather-space-dot.warn { background: var(--space-warn); box-shadow: 0 0 0 4px rgba(244, 200, 111, 0.14); }
.weather-space-dot.good { background: var(--space-good); box-shadow: 0 0 0 4px rgba(134, 227, 194, 0.14); }
.weather-space-dot.bad { background: var(--space-bad); box-shadow: 0 0 0 4px rgba(255, 143, 133, 0.14); }

.weather-space-status-card[data-state="ok"] { border-color: rgba(134, 227, 194, 0.28); }
.weather-space-status-card[data-state="partial"] { border-color: rgba(244, 200, 111, 0.28); }
.weather-space-status-card[data-state="fallback"] { border-color: rgba(121, 199, 255, 0.28); }
.weather-space-status-card[data-state="error"] { border-color: rgba(255, 143, 133, 0.28); }

.weather-space-empty,
.weather-space-empty-card p {
    color: var(--space-ink-muted);
}

.weather-space-empty-card {
    display: grid;
    gap: 8px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px dashed rgba(176, 196, 220, 0.24);
    background: rgba(255, 255, 255, 0.025);
}

.weather-space-empty-card strong {
    color: var(--space-ink);
    font-size: 1rem;
    font-weight: 680;
}

.weather-space-footer-note {
    margin-top: 4px;
    color: var(--space-ink-muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

.weather-space-source-details {
    margin-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 10px;
}

.weather-space-source-details summary {
    cursor: pointer;
    color: var(--space-ink-soft);
    font-size: 0.94rem;
    font-weight: 650;
}

.weather-space-source-details p {
    margin-top: 10px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.weather-space-status-stack {
    display: grid;
    gap: 8px;
}

.weather-space-inline-note {
    color: var(--space-ink-muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

@media (max-width: 1180px) {
    .weather-space-observatory,
    .weather-space-status-grid,
    .weather-space-education-grid {
        grid-template-columns: 1fr;
    }

    .weather-space-summary-grid,
    .weather-space-data-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .weather-page-space .weather-space-shell,
    .weather-page-space .weather-space-aside,
    .weather-space-image-card,
    .weather-space-chart-card,
    .weather-space-card,
    .weather-space-status-card,
    .weather-space-education-card,
    .weather-space-loading {
        padding: 18px;
        border-radius: 22px;
    }

    .weather-page-space .weather-space-shell h1 {
        max-width: none;
        font-size: clamp(1.6rem, 8vw, 2.2rem);
    }

    .weather-space-observatory,
    .weather-space-summary-grid,
    .weather-space-data-grid,
    .weather-space-status-grid,
    .weather-space-education-grid {
        grid-template-columns: 1fr;
    }

    .weather-space-image-wrap {
        aspect-ratio: 1 / 1.03;
    }
}

@media (max-width: 640px) {
    .weather-space-chart-svg {
        min-width: 430px;
        height: 200px;
    }

    .weather-space-highlights span,
    .weather-space-mini-chip,
    .weather-space-mode-button,
    .weather-space-control,
    .weather-space-pager button {
        width: 100%;
        justify-content: center;
    }

    .weather-space-actions,
    .weather-space-mode-switch,
    .weather-space-player-controls,
    .weather-space-pager {
        display: grid;
        grid-template-columns: 1fr;
    }
}
