.weather-sources__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    max-width: 62rem;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

.weather-sources__item {
    min-width: 0;
}

.weather-source-card {
    --weather-source-accent: #2187ff;
    --weather-source-accent-rgb: 33, 135, 255;
    position: relative;
    display: flex;
    min-height: 13.5rem;
    height: 100%;
    flex-direction: column;
    padding: clamp(1.15rem, 3vw, 1.5rem);
    overflow: hidden;
    border: 1px solid rgba(var(--weather-source-accent-rgb), 0.2);
    border-radius: 1.25rem;
    background:
        radial-gradient(circle at 96% 4%, rgba(var(--weather-source-accent-rgb), 0.13), transparent 38%),
        #fff;
    box-shadow: 0 12px 34px rgba(25, 66, 104, 0.09);
    color: #17324d;
    text-decoration: none;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.weather-source-card::after {
    position: absolute;
    right: -2.5rem;
    bottom: -3.8rem;
    width: 8rem;
    height: 8rem;
    border: 1.35rem solid rgba(var(--weather-source-accent-rgb), 0.055);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.weather-source-card--windy {
    --weather-source-accent: #dc3f4a;
    --weather-source-accent-rgb: 220, 63, 74;
}

.weather-source-card--windguru {
    --weather-source-accent: #0f8c91;
    --weather-source-accent-rgb: 15, 140, 145;
}

.weather-source-card--yr {
    --weather-source-accent: #176fbd;
    --weather-source-accent-rgb: 23, 111, 189;
}

.weather-source-card--snowforecast {
    --weather-source-accent: #397bb8;
    --weather-source-accent-rgb: 57, 123, 184;
}

.weather-source-card--meteoblue {
    --weather-source-accent: #315eaa;
    --weather-source-accent-rgb: 49, 94, 170;
}

.weather-source-card--sunrise {
    --weather-source-accent: #e68a16;
    --weather-source-accent-rgb: 230, 138, 22;
}

.weather-source-card--davis {
    --weather-source-accent: #587f45;
    --weather-source-accent-rgb: 88, 127, 69;
}

.weather-source-card__top {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.weather-source-card__icon {
    display: grid;
    width: 3.75rem;
    height: 3.75rem;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 1rem;
    background: var(--weather-source-accent);
    box-shadow: 0 8px 20px rgba(var(--weather-source-accent-rgb), 0.24);
    color: #fff;
}

.weather-source-card__icon svg {
    width: 2rem;
    height: 2rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.5;
}

.weather-source-card__name {
    color: #17324d;
    font-size: clamp(1.35rem, 2.7vw, 1.75rem);
    font-weight: 800;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.weather-source-card__description {
    margin: 1.2rem 0 1.35rem;
    color: #64788a;
    font-size: 1rem;
    line-height: 1.5;
}

.weather-source-card__action {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: auto;
    color: var(--weather-source-accent);
    font-size: 0.88rem;
    font-weight: 750;
}

.weather-source-card__action svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    transition: transform 180ms ease;
}

.weather-source-card:focus-visible {
    outline: 3px solid rgba(var(--weather-source-accent-rgb), 0.3);
    outline-offset: 4px;
}

body.dark .weather-source-card,
body.dark .weather-source-card__name {
    color: #f2f7fb;
}

body.dark .weather-source-card__description {
    color: #bdcbd7;
}

body.dark .weather-source-card {
    border-color: rgba(var(--weather-source-accent-rgb), 0.3);
    background:
        radial-gradient(circle at 96% 4%, rgba(var(--weather-source-accent-rgb), 0.18), transparent 40%),
        #20272d;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
}

body.dark .weather-source-card__action {
    color: #80c2ff;
    color: color-mix(in srgb, var(--weather-source-accent) 72%, white);
}

@media (hover: hover) and (pointer: fine) {
    .weather-source-card:hover {
        transform: translateY(-4px);
        border-color: rgba(var(--weather-source-accent-rgb), 0.48);
        box-shadow: 0 20px 42px rgba(25, 66, 104, 0.16);
    }

    .weather-source-card:hover .weather-source-card__action svg {
        transform: translateX(0.25rem);
    }

    body.dark .weather-source-card:hover {
        box-shadow: 0 20px 44px rgba(0, 0, 0, 0.35);
    }
}

@media (max-width: 42rem) {
    .weather-sources__grid {
        grid-template-columns: 1fr;
    }

    .weather-source-card {
        min-height: 11.5rem;
        border-radius: 1rem;
    }

    .weather-source-card__icon {
        width: 3.25rem;
        height: 3.25rem;
        border-radius: 0.85rem;
    }

    .weather-source-card__icon svg {
        width: 1.75rem;
        height: 1.75rem;
    }

    .weather-source-card__description {
        margin: 0.9rem 0 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .weather-source-card,
    .weather-source-card__action svg {
        transition: none;
    }
}
