.sr-weather {
    background: var(--sr-white, #fff);
    border: 1px solid var(--sr-border, #dde6ee);
    border-radius: var(--sr-radius-lg, 12px);
    box-shadow: var(--sr-shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.08));
    color: var(--sr-body, #2d3f50);
    font-family: var(--sr-font-body, system-ui, sans-serif);
    margin-bottom: 20px;
    overflow: hidden;
    padding: 22px;
    width: 100%;
}

.sr-weather * {
    box-sizing: border-box;
}

.sr-weather-inner {
    display: grid;
    gap: 14px;
}

.sr-weather-header {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.sr-weather-title {
    color: var(--sr-heading, #0d1b2a);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
}

.sr-weather-today-label {
    background: var(--sr-ocean-50, #f0f9ff);
    border: 1px solid var(--sr-ocean-100, #ddf1fc);
    border-radius: 999px;
    color: var(--sr-ocean-700, #0c5d8f);
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    padding: 6px 9px;
    white-space: nowrap;
}

.sr-weather-today {
    align-items: center;
    display: flex;
    gap: 14px;
}

.sr-weather-emoji {
    align-items: center;
    background: linear-gradient(135deg, var(--sr-ocean-50, #f0f9ff), var(--sr-amber-100, #fef3c7));
    border-radius: var(--sr-radius-md, 8px);
    display: flex;
    flex: 0 0 58px;
    font-size: 30px;
    height: 58px;
    justify-content: center;
}

.sr-weather-summary {
    min-width: 0;
}

.sr-weather-temp {
    color: var(--sr-heading, #0d1b2a);
    font-size: 34px;
    font-weight: 800;
    line-height: 1;
}

.sr-weather-condition,
.sr-weather-range {
    font-size: 13px;
    line-height: 1.35;
}

.sr-weather-condition {
    color: var(--sr-heading, #0d1b2a);
    font-weight: 700;
    margin-top: 4px;
}

.sr-weather-range {
    color: var(--sr-muted, #7a93a8);
    margin-top: 2px;
}

.sr-weather-metrics {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sr-weather-metric {
    background: var(--sr-surface, #f3f7fa);
    border-radius: var(--sr-radius-md, 8px);
    min-width: 0;
    padding: 9px 8px;
    text-align: center;
}

.sr-weather-metric-label {
    color: var(--sr-muted, #7a93a8);
    display: block;
    font-size: 11px;
    line-height: 1.2;
    margin-bottom: 4px;
}

.sr-weather-metric strong {
    color: var(--sr-heading, #0d1b2a);
    display: block;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.sr-weather-next-title {
    color: var(--sr-heading, #0d1b2a);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    margin: 2px 0 0;
}

.sr-weather-days {
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.sr-weather-day {
    align-items: center;
    background: var(--sr-white, #fff);
    border: 1px solid var(--sr-border, #dde6ee);
    border-radius: var(--sr-radius-md, 8px);
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 8px 4px;
    text-align: center;
}

.sr-weather-day-name,
.sr-weather-day-temp {
    font-size: 11px;
    line-height: 1.1;
}

.sr-weather-day-name {
    color: var(--sr-muted, #7a93a8);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sr-weather-day-emoji {
    font-size: 17px;
    line-height: 1;
}

.sr-weather-day-temp {
    color: var(--sr-heading, #0d1b2a);
    font-weight: 800;
}

.sr-weather-skeleton {
    display: grid;
    gap: 12px;
}

.sr-weather-skeleton-line,
.sr-weather-skeleton-days {
    animation: sr-weather-pulse 1.2s ease-in-out infinite;
    background: linear-gradient(90deg, var(--sr-surface, #f3f7fa), var(--sr-border, #dde6ee), var(--sr-surface, #f3f7fa));
    background-size: 200% 100%;
    border-radius: var(--sr-radius-md, 8px);
    display: block;
    height: 14px;
}

.sr-weather-skeleton-title {
    height: 18px;
    width: 62%;
}

.sr-weather-skeleton-days {
    height: 52px;
}

.sr-weather--region {
    align-items: center;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin: 16px auto 20px;
    max-width: 1200px;
    padding: 14px 18px;
}

.sr-weather--region .sr-weather-title {
    flex: 0 0 auto;
    font-size: 18px;
}

.sr-weather__today-compact {
    align-items: center;
    display: flex;
    flex: 1 1 auto;
    gap: 14px;
    justify-content: flex-end;
    min-width: 0;
}

.sr-weather-emoji--compact {
    flex-basis: 46px;
    font-size: 24px;
    height: 46px;
}

.sr-weather-region-summary {
    align-items: center;
    display: flex;
    gap: 10px;
    min-width: 0;
}

.sr-weather-region-temp {
    color: var(--sr-heading, #0d1b2a);
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.sr-weather-region-metrics {
    display: flex;
    gap: 8px;
}

.sr-weather-region-metrics .sr-weather-metric {
    min-width: 82px;
    padding: 7px 8px;
}

.sr-weather-zones {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sr-weather--zone {
    display: grid;
    gap: 14px;
    margin-bottom: 0;
}

.sr-weather--zone .sr-weather__today-compact {
    align-items: stretch;
    flex-direction: column;
    justify-content: flex-start;
}

.sr-weather--zone .sr-weather-region-summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
}

.sr-weather--zone .sr-weather-region-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sr-weather--zone .sr-weather-region-metrics .sr-weather-metric {
    min-width: 0;
}

.sr-weather-days--compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@keyframes sr-weather-pulse {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@media (max-width: 1023px) {
    .sr-weather {
        padding: 18px;
    }

    .sr-weather-days {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

@media (max-width: 767px) {
    .sr-weather--region {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
        margin-left: 16px;
        margin-right: 16px;
        padding: 14px;
    }

    .sr-weather__today-compact,
    .sr-weather-region-summary,
    .sr-weather-region-metrics {
        align-items: stretch;
        flex-direction: column;
        justify-content: flex-start;
    }

    .sr-weather-region-metrics {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sr-weather-zones {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   Tempo no Algarve — dedicated page (scoped under .sr-tempo)
   ============================================================ */
.sr-tempo {
    --tempo-gutter: clamp(20px, 5vw, 64px);
}

/* --- Hero: forecast is the hero --- */
.sr-tempo-hero {
    background:
        radial-gradient(120% 140% at 100% 0%, var(--sr-ocean-50) 0%, transparent 55%),
        var(--sr-surface-alt);
    border-bottom: 1px solid var(--sr-border);
    padding-block: clamp(40px, 7vw, 88px);
}

.sr-tempo-hero-inner {
    align-items: center;
    display: grid;
    gap: clamp(28px, 5vw, 56px);
    grid-template-columns: 1.05fr 1fr;
}

.sr-tempo-hero-copy {
    animation: sr-tempo-rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.sr-tempo-eyebrow {
    color: var(--sr-amber-600);
    display: inline-block;
    font-family: var(--sr-font-body);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.sr-tempo-h1 {
    color: var(--sr-ocean-950);
    font-family: var(--sr-font-heading);
    font-size: clamp(2.25rem, 1.4rem + 4.2vw, 3.75rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.04;
    margin: 0;
}

.sr-tempo-lede {
    color: var(--sr-secondary);
    font-size: clamp(1.02rem, 0.97rem + 0.3vw, 1.18rem);
    line-height: 1.62;
    margin: 1.1rem 0 0;
    max-width: 46ch;
}

.sr-tempo-hero-card {
    animation: sr-tempo-rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.08s both;
}

/* --- Hero forecast card: deep ocean, premium --- */
.sr-weather--hero {
    background:
        radial-gradient(130% 120% at 85% -10%, var(--sr-ocean-700) 0%, transparent 50%),
        linear-gradient(155deg, var(--sr-ocean-900), var(--sr-ocean-950));
    border: 1px solid var(--sr-ocean-800);
    border-radius: var(--sr-radius-xl);
    box-shadow: var(--sr-shadow-lg);
    color: var(--sr-ocean-100);
    margin: 0;
    padding: clamp(22px, 3vw, 30px);
}

.sr-weather--hero .sr-weather-inner { gap: 18px; }
.sr-weather--hero .sr-weather-title { color: #fff; font-family: var(--sr-font-heading); font-size: 1.35rem; font-weight: 700; }
.sr-weather--hero .sr-weather-today-label {
    background: var(--sr-amber-400);
    border: none;
    color: var(--sr-ocean-950);
}
.sr-weather--hero .sr-weather-emoji {
    background: rgba(255, 255, 255, 0.1);
    flex-basis: 72px;
    font-size: 40px;
    height: 72px;
}
.sr-weather--hero .sr-weather-temp { color: #fff; font-size: clamp(3rem, 2rem + 4vw, 4rem); letter-spacing: -0.02em; }
.sr-weather--hero .sr-weather-condition { color: var(--sr-amber-300); font-size: 1rem; }
.sr-weather--hero .sr-weather-range { color: var(--sr-ocean-300); font-size: 0.95rem; }
.sr-weather--hero .sr-weather-metric {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 11px 8px;
}
.sr-weather--hero .sr-weather-metric-label { color: var(--sr-ocean-300); }
.sr-weather--hero .sr-weather-metric strong { color: #fff; font-size: 0.95rem; }
.sr-weather--hero .sr-weather-next-title { color: var(--sr-ocean-300); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.sr-weather--hero .sr-weather-day {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.sr-weather--hero .sr-weather-day-name { color: var(--sr-ocean-300); }
.sr-weather--hero .sr-weather-day-temp { color: #fff; }
.sr-weather--hero .sr-weather-skeleton-line,
.sr-weather--hero .sr-weather-skeleton-days {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
    background-size: 200% 100%;
}

/* --- Section rhythm + headings --- */
.sr-tempo .sr-section { padding-block: clamp(36px, 6vw, 72px); }
.sr-tempo-h2 {
    color: var(--sr-ocean-950);
    font-family: var(--sr-font-heading);
    font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.15;
    margin: 0 0 1.4rem;
}
.sr-tempo-narrow { max-width: 720px; }
.sr-tempo-prose {
    color: var(--sr-secondary);
    font-size: 1.06rem;
    line-height: 1.72;
    margin: 0 0 1.5rem;
    max-width: 65ch;
}

/* --- Zone cards (live) --- */
.sr-tempo-zones-section .sr-weather-zones {
    grid-template-columns: repeat(auto-fit, minmax(296px, 1fr));
}
.sr-tempo-zones-section .sr-weather--zone {
    transition: transform var(--sr-transition-fast), box-shadow var(--sr-transition-fast), border-color var(--sr-transition-fast);
}
.sr-tempo-zones-section .sr-weather--zone:hover {
    border-color: var(--sr-ocean-300);
    box-shadow: var(--sr-shadow-md);
    transform: translateY(-3px);
}
.sr-tempo-zones-section .sr-weather--zone .sr-weather-title {
    font-family: var(--sr-font-heading);
    font-size: 1.18rem;
    font-weight: 700;
}
.sr-tempo-zones-section .sr-weather--zone .sr-weather-region-temp { color: var(--sr-ocean-800); }

/* --- Zone notes (server-rendered guide; no card-grid sameness) --- */
.sr-zone-notes {
    display: grid;
    gap: 1.5rem 2.5rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    margin: clamp(28px, 4vw, 44px) 0 0;
}
.sr-zone-note { margin: 0; }
.sr-zone-note dt {
    color: var(--sr-ocean-950);
    font-family: var(--sr-font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}
.sr-zone-note dd {
    color: var(--sr-secondary);
    font-size: 0.96rem;
    line-height: 1.55;
    margin: 0;
}

/* --- Climate averages table (editorial) --- */
.sr-tempo-climate { background: var(--sr-surface-alt); border-top: 1px solid var(--sr-border); }
.sr-table-wrap { overflow-x: auto; }
.sr-climate-table {
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
    width: 100%;
}
.sr-climate-table thead th {
    border-bottom: 2px solid var(--sr-ocean-200, var(--sr-ocean-300));
    color: var(--sr-secondary);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0 0.6rem 0.7rem;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
}
.sr-climate-table thead th:first-child { text-align: left; }
.sr-climate-table tbody th {
    color: var(--sr-ocean-950);
    font-weight: 700;
    padding: 0.62rem 0.6rem;
    text-align: left;
    white-space: nowrap;
}
.sr-climate-table tbody td {
    color: var(--sr-body);
    padding: 0.62rem 0.6rem;
    text-align: center;
}
.sr-climate-table tbody tr + tr th,
.sr-climate-table tbody tr + tr td { border-top: 1px solid var(--sr-border); }
.sr-climate-table tbody tr:hover th,
.sr-climate-table tbody tr:hover td { background: var(--sr-white); }
.sr-climate-table tbody tr.sr-climate-peak th,
.sr-climate-table tbody tr.sr-climate-peak td {
    background: var(--sr-amber-100);
    color: var(--sr-amber-900);
}
.sr-climate-table tbody tr.sr-climate-peak th { color: var(--sr-amber-900); }
.sr-table-footnote {
    color: var(--sr-muted);
    font-size: 0.82rem;
    margin: 1rem 0 0;
}
.sr-tempo-monthly { margin-top: 1.75rem; }

/* --- Plan-your-trip internal links --- */
.sr-tempo-plan { background: var(--sr-surface-alt); border-top: 1px solid var(--sr-border); }
.sr-tempo-plan-links {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.sr-tempo-plan-link {
    align-items: center;
    background: var(--sr-white);
    border: 1px solid var(--sr-border);
    border-radius: var(--sr-radius-lg);
    color: var(--sr-ocean-950);
    display: flex;
    font-size: 1.02rem;
    font-weight: 600;
    gap: 1rem;
    justify-content: space-between;
    padding: 1.1rem 1.25rem;
    text-decoration: none;
    transition: transform var(--sr-transition-fast), box-shadow var(--sr-transition-fast), border-color var(--sr-transition-fast);
}
.sr-tempo-plan-link svg { color: var(--sr-amber-500); flex-shrink: 0; transition: transform var(--sr-transition-fast); }
.sr-tempo-plan-link:hover { border-color: var(--sr-ocean-300); box-shadow: var(--sr-shadow-md); transform: translateY(-2px); }
.sr-tempo-plan-link:hover svg { transform: translateX(3px); }

@keyframes sr-tempo-rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

@media (max-width: 899px) {
    .sr-tempo-hero-inner { grid-template-columns: 1fr; }
    .sr-tempo-hero-card { max-width: 520px; }
}

@media (prefers-reduced-motion: reduce) {
    .sr-tempo-hero-copy,
    .sr-tempo-hero-card { animation: none; }
}
