.presura-forecast {
    --forecast-ink: #123e35;
    --forecast-muted: #60756f;
    --forecast-accent: #0d8f7a;
    min-height: 100%;
    background: radial-gradient(circle at 84% 2%, rgba(60, 168, 221, .12), transparent 31rem), linear-gradient(145deg, rgba(13, 143, 122, .06), transparent 32rem);
}

.presura-forecast .container-xl { max-width: 1320px; }

.presura-forecast__hero {
    overflow: hidden;
    border: 1px solid rgba(13, 143, 122, .16);
    background: radial-gradient(circle at 82% 20%, rgba(94, 196, 223, .3), transparent 18rem), linear-gradient(120deg, rgba(255, 255, 255, .98), rgba(225, 245, 240, .9));
    box-shadow: 0 22px 58px rgba(20, 69, 59, .1);
}

.presura-forecast__hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) auto minmax(270px, .8fr);
    gap: clamp(1.5rem, 4vw, 4.5rem);
    align-items: center;
    min-height: 210px;
    padding: clamp(.5rem, 2vw, 1.5rem);
}

.presura-forecast__hero h1,
.presura-forecast__section-head h2 {
    color: var(--forecast-ink);
    font-family: Georgia, 'Times New Roman', serif;
    letter-spacing: -.04em;
}

.presura-forecast__hero h1 { margin: 0 0 .5rem; font-size: clamp(2rem, 4vw, 4.2rem); }
.presura-forecast__location-tools {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    margin-top: 1.25rem;
}

.presura-forecast__location-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    flex: 1 1 310px;
    gap: .5rem;
}

.presura-forecast__location-search .form-control { width: 100%; min-width: 0; }
.presura-forecast__location-search .btn { white-space: nowrap; }

.presura-forecast__location-results {
    z-index: 5;
    display: grid;
    flex: 1 0 100%;
    gap: .35rem;
    max-height: 240px;
    padding: .45rem;
    overflow-y: auto;
    border: 1px solid rgba(18, 62, 53, .14);
    border-radius: 14px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 14px 34px rgba(20, 69, 59, .12);
}

.presura-forecast__location-results[hidden] { display: none; }

.presura-forecast__location-result {
    width: 100%;
    padding: .7rem .8rem;
    border: 0;
    border-radius: 10px;
    color: var(--forecast-ink);
    text-align: left;
    background: transparent;
}

.presura-forecast__location-result:hover,
.presura-forecast__location-result:focus-visible { background: rgba(13, 143, 122, .1); outline: none; }
.presura-forecast__location-status { margin: 0; padding: .55rem .65rem; color: var(--forecast-muted); }
.presura-forecast [data-forecast-use-location][aria-busy='true'] { cursor: progress; opacity: .72; }
.presura-forecast__now { display: flex; align-items: center; gap: 1rem; }
.presura-forecast__now div { display: grid; }

.presura-forecast__now span,
.presura-forecast__hero-facts small {
    color: var(--forecast-muted);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.presura-forecast__now strong { color: var(--forecast-ink); font-size: clamp(2.6rem, 5vw, 4.6rem); line-height: .95; }

.presura-forecast__weather-icon {
    width: 58px;
    height: 58px;
    fill: none;
    stroke: #e4a11b;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.presura-forecast__hero-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }

.presura-forecast__hero-facts span {
    display: grid;
    gap: .35rem;
    min-width: 0;
    padding: 1rem;
    border: 1px solid rgba(18, 62, 53, .1);
    border-radius: 16px;
    background: rgba(255, 255, 255, .58);
}

.presura-forecast__hero-facts strong { color: var(--forecast-ink); white-space: nowrap; }

.presura-forecast__section-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: end;
    margin: 0 0 1.1rem;
}

.presura-forecast__section-head h2 { margin: .15rem 0 0; font-size: clamp(1.45rem, 2.2vw, 2.2rem); }

.presura-forecast__metric,
.presura-forecast__chart-card,
.presura-forecast__day {
    border-color: rgba(18, 62, 53, .12);
    box-shadow: 0 10px 30px rgba(20, 69, 59, .06);
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.presura-forecast__metric:hover,
.presura-forecast__day:hover {
    border-color: rgba(13, 143, 122, .32);
    box-shadow: 0 16px 38px rgba(20, 69, 59, .1);
    transform: translateY(-2px);
}

.presura-forecast__metric-head { display: flex; gap: .65rem; align-items: center; margin-bottom: 1rem; }

.presura-forecast__metric-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 11px;
    color: var(--forecast-accent);
    background: rgba(13, 143, 122, .1);
}

.presura-forecast__metric-icon svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.presura-forecast__metric-value,
.presura-forecast__astro-value { display: block; color: var(--forecast-ink); font-size: clamp(1.35rem, 2vw, 1.85rem); }
.presura-forecast__chart-card .card-header { min-height: 78px; align-items: start; justify-content: space-between; }
.presura-forecast__chart-card .card-body { padding: .75rem 1rem 1rem; }
.presura-forecast__chart {
    position: relative;
    width: 100%;
    height: clamp(320px, 31vw, 390px);
    cursor: crosshair;
    touch-action: pan-y;
}
.presura-forecast__chart-status {
    display: flex;
    height: 100%;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    color: var(--forecast-muted);
    text-align: center;
}

.presura-forecast__chart-spinner {
    width: 1.15rem;
    height: 1.15rem;
    border: 2px solid rgba(13, 143, 122, .2);
    border-top-color: var(--forecast-accent);
    border-radius: 50%;
    animation: presura-forecast-spin .75s linear infinite;
}

.presura-forecast__chart[data-chart-state='error'] .presura-forecast__chart-status,
.presura-forecast__chart[data-chart-state='empty'] .presura-forecast__chart-status { padding: 1.25rem; }

.presura-forecast__chart-retry { min-height: 36px; }

.presura-forecast__chart-preview { display: block; max-width: 100%; }

.presura-forecast__chart-server-fallback {
    display: block;
    width: 100%;
    height: 100%;
}

.presura-forecast__chart-gridline {
    stroke: rgba(18, 62, 53, .11);
    stroke-width: .45;
    vector-effect: non-scaling-stroke;
}

.presura-forecast__chart-axis-label {
    fill: var(--forecast-muted);
    font-family: inherit;
    font-size: 3px;
    font-weight: 700;
}

[data-bs-theme='dark'] .presura-forecast__chart-gridline { stroke: rgba(216, 242, 235, .22); }
[data-bs-theme='dark'] .presura-forecast__chart-axis-label { fill: #d5e9e4; }

.presura-chart-tooltip { min-width: 210px; }
.presura-chart-tooltip__time { display: block; margin-bottom: .45rem; text-transform: capitalize; }
.presura-chart-tooltip__row { display: flex; justify-content: space-between; gap: 1rem; padding: .14rem 0; }
.presura-chart-tooltip__row span { display: inline-flex; align-items: center; }
.presura-chart-tooltip__row strong { white-space: nowrap; }

.presura-forecast__chart-readout {
    min-height: 2.65rem;
    margin: .45rem .35rem .15rem;
    padding: .7rem .85rem;
    border: 1px solid rgba(18, 62, 53, .12);
    border-radius: .65rem;
    color: var(--forecast-muted);
    font-size: .82rem;
    line-height: 1.35;
    background: rgba(13, 143, 122, .055);
}

.presura-forecast__chart-readout strong {
    color: var(--forecast-ink);
    font-weight: 700;
}

[data-bs-theme='dark'] .presura-forecast__chart-readout {
    border-color: rgba(208, 243, 233, .12);
    background: rgba(80, 183, 157, .08);
}

.presura-forecast__chart-preview-status,
.presura-forecast__chart-fallback-status {
    position: absolute;
    right: .75rem;
    bottom: .65rem;
    z-index: 2;
    margin: 0;
    padding: .35rem .55rem;
    border: 1px solid rgba(18, 62, 53, .12);
    border-radius: 999px;
    color: var(--forecast-muted);
    font-size: .72rem;
    background: rgba(255, 255, 255, .9);
}

.presura-forecast__chart-fallback-status { display: flex; align-items: center; gap: .5rem; }

.presura-forecast__chart-preview-status.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

[data-bs-theme='dark'] .presura-forecast__chart-preview-status,
[data-bs-theme='dark'] .presura-forecast__chart-fallback-status {
    border-color: rgba(208, 243, 233, .12);
    background: rgba(5, 24, 19, .9);
}

@keyframes presura-forecast-spin { to { transform: rotate(1turn); } }

.presura-forecast__days {
    display: grid;
    grid-template-columns: repeat(7, minmax(145px, 1fr));
    gap: .8rem;
    overflow-x: auto;
    padding: .15rem .1rem .8rem;
    scrollbar-width: thin;
}

.presura-forecast__day-head,
.presura-forecast__day-temperature,
.presura-forecast__day-meta { display: flex; justify-content: space-between; gap: .5rem; }
.presura-forecast__day-head div { display: grid; }
.presura-forecast__day .presura-forecast__weather-icon { width: 38px; height: 38px; }
.presura-forecast__day-temperature { align-items: baseline; margin: 1.4rem 0 .75rem; }
.presura-forecast__day-temperature strong { color: var(--forecast-ink); font-size: 1.8rem; }
.presura-forecast__day-temperature span,
.presura-forecast__day-meta { color: var(--forecast-muted); }
.presura-forecast__day p { min-height: 2.6em; color: var(--forecast-muted); font-size: .82rem; }
.presura-forecast__day-meta { flex-direction: column; font-size: .78rem; }

[data-bs-theme='dark'] .presura-forecast {
    --forecast-ink: #eefbf7;
    --forecast-muted: #9db5ae;
    background: radial-gradient(circle at 84% 2%, rgba(60, 168, 221, .09), transparent 31rem), #071511;
}

[data-bs-theme='dark'] .presura-forecast__hero {
    border-color: rgba(105, 211, 181, .16);
    background: radial-gradient(circle at 82% 20%, rgba(51, 141, 167, .2), transparent 18rem), linear-gradient(120deg, #0b201a, #102b23);
}

[data-bs-theme='dark'] .presura-forecast__hero-facts span { border-color: rgba(208, 243, 233, .1); background: rgba(3, 17, 14, .32); }
[data-bs-theme='dark'] .presura-forecast__location-results { border-color: rgba(208, 243, 233, .12); background: rgba(5, 24, 19, .98); }

/* Keep the forecast entry consistent with the card rhythm used by the city desk. */
.presura-forecast__hero {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.presura-forecast__hero > .card-body {
    padding: 0;
}

.presura-forecast__hero-grid {
    grid-template-areas:
        "location current"
        "location facts";
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, .7fr);
    gap: 1rem;
    min-height: 0;
    padding: 0;
}

.presura-forecast__hero-copy,
.presura-forecast__now,
.presura-forecast__hero-facts {
    border: 1px solid rgba(18, 62, 53, .12);
    border-radius: 18px;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 10px 30px rgba(20, 69, 59, .06);
}

.presura-forecast__hero-copy {
    grid-area: location;
    padding: clamp(1.35rem, 2.5vw, 2rem);
}

.presura-forecast__hero-copy h1 {
    font-size: clamp(2rem, 3.2vw, 3.35rem);
    line-height: 1;
}

.presura-forecast__now {
    grid-area: current;
    min-height: 132px;
    padding: 1.35rem 1.5rem;
}

.presura-forecast__now div {
    align-content: center;
}

.presura-forecast__now div span {
    order: 2;
    margin-top: .3rem;
    letter-spacing: 0;
    text-transform: none;
}

.presura-forecast__now strong {
    font-size: clamp(2.7rem, 4.2vw, 4rem);
}

.presura-forecast__hero-facts {
    grid-area: facts;
    padding: .75rem;
}

.presura-forecast__hero-facts span {
    border-radius: 12px;
    box-shadow: none;
}

[data-bs-theme='dark'] .presura-forecast__hero-copy,
[data-bs-theme='dark'] .presura-forecast__now,
[data-bs-theme='dark'] .presura-forecast__hero-facts {
    border-color: rgba(208, 243, 233, .1);
    background: rgba(10, 31, 25, .86);
}

@media (max-width: 1199px) {
    .presura-forecast__hero-grid {
        grid-template-areas:
            "location current"
            "facts facts";
        grid-template-columns: minmax(0, 1fr) minmax(260px, .55fr);
    }
}

@media (max-width: 767px) {
    .presura-forecast .container-xl { padding-right: 1rem; padding-left: 1rem; }
    .presura-forecast__hero-grid {
        grid-template-areas:
            "location"
            "current"
            "facts";
        grid-template-columns: minmax(0, 1fr);
        gap: .85rem;
    }
    .presura-forecast__now { justify-content: flex-start; }
    .presura-forecast__hero-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .presura-forecast__hero-facts span { padding: .75rem; }
    .presura-forecast__hero-facts strong { font-size: .84rem; }
    .presura-forecast__location-search { flex-basis: 100%; }
    .presura-forecast__location-tools > .btn { flex: 1 1 100%; }
    .presura-forecast__section-head { align-items: start; flex-direction: column; }
    .presura-forecast__chart {
        height: 330px;
        cursor: default;
        touch-action: pan-y;
    }
    .presura-forecast__chart-card .card-body { padding: .5rem .35rem .75rem; }
    .presura-forecast__chart-readout {
        margin-inline: .65rem;
        font-size: .8rem;
    }
}

@media (max-width: 419px) { .presura-forecast__hero-facts { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
    .presura-forecast__metric,
    .presura-forecast__day { transition: none; }
    .presura-forecast__chart-spinner { animation: none; }
}
