.weather-section {
    margin-top: clamp(2rem, 6vw, 5rem);
}

.weather-card {
    --weather-ink: #263b40;
    --weather-muted: #57534a;
    --weather-trim: #ded5c6;
    --weather-accent: #74603d;
    padding: clamp(1rem, 5vw, 3rem);
    border: 1px solid var(--weather-trim);
    border-radius: 20px;
    background: #faf8f5;
    color: var(--weather-ink);
}

.weather-card [hidden] {
    display: none;
}

.weather-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    margin-bottom: clamp(1rem, 3vw, 2rem);
}

.weather-heading h2 {
    margin: 0;
    color: inherit;
    font-size: clamp(1.65rem, 4vw, 2.5rem);
}

.weather-clock {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0.5rem 0.75rem;
    border-radius: 2rem;
    background: #efe9df;
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
}

.weather-clock time {
    margin-inline-start: 0.25rem;
    font-weight: 600;
}

.weather-overview {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}

.weather-current {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem clamp(1rem, 4vw, 2rem);
    padding: clamp(1rem, 4vw, 2rem);
    border-radius: 14px;
    background: linear-gradient(140deg, #f1e6d4, #f7f2e9 70%);
}

.weather-current-icon {
    color: var(--weather-accent);
    font-size: clamp(2rem, 6vw, 4rem);
    line-height: 1;
}

.weather-temperature {
    margin: 0;
    font-size: clamp(2.25rem, 7vw, 4rem);
    font-weight: 600;
    line-height: 1.15;
}

.weather-condition {
    margin: 0.25rem 0 0;
    font-weight: 600;
}

.weather-caption,
.weather-credit {
    color: var(--weather-muted);
    font-size: 0.8125rem;
    line-height: 1.55;
}

.weather-caption {
    margin: 0.25rem 0 0;
}

.weather-metrics,
.weather-days {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.625rem;
    margin: 0;
}

.weather-metrics > div,
.weather-days > li {
    min-width: 0;
    padding: 0.75rem;
    border: 1px solid var(--weather-trim);
    border-radius: 12px;
    background: #fffdf9;
}

.weather-metrics dt {
    color: var(--weather-muted);
    font-size: 0.8125rem;
    font-weight: 500;
    overflow-wrap: anywhere;
}

.weather-metrics i,
.weather-days i {
    color: var(--weather-accent);
}

.weather-metrics dd {
    margin: 0.25rem 0 0;
    font-variant-numeric: tabular-nums;
}

.weather-metrics dd,
.weather-day-temperature {
    font-weight: 600;
}

.weather-forecast {
    margin-top: 1.5rem;
}

.weather-forecast h3 {
    margin-bottom: 0.75rem;
    color: inherit;
    font-size: 1.125rem;
}

.weather-days {
    grid-template-columns: minmax(0, 1fr);
    padding: 0;
    list-style: none;
}

.weather-days > li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.25rem 0.5rem;
}

.weather-day-condition {
    grid-column: 1 / -1;
    color: var(--weather-muted);
    font-size: 0.8125rem;
}

.weather-day-condition i {
    margin-inline-end: 0.375rem;
}

.weather-status {
    color: var(--weather-muted);
    font-size: 0.875rem;
}

.weather-status:empty {
    margin: 0;
}

.weather-retry {
    margin-top: 1rem;
}

.weather-credit {
    margin: 1.5rem 0 0;
    padding-top: 1rem;
    border-top: 1px solid var(--weather-trim);
}

.weather-credit a {
    color: var(--weather-ink);
    text-decoration: underline;
}

@media (min-width: 576px) {
    .weather-days {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .weather-days > li {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (min-width: 992px) {
    .weather-overview:has(.weather-current:not([hidden])) {
        grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    }
}
