.aero-root {
    --a-brand: var(--e-global-color-primary, #043ca4);
    --a-ink: var(--e-global-color-text, #272b32);
    --a-font: var(--e-global-typography-primary-font-family, Rubik), system-ui, sans-serif;
    --a-muted: #4d5a6e;
    --a-paper: #f0f4f9;
    --a-line: #d3deeb;
    --a-tint: #e3ecf9;
    --a-sim: #5879a5;
    --a-meter: #043ca4;
    --a-grid: #4d6179;
    --a-own: #328056;
    --a-gutter: clamp(14px, 3.5vw, 46px);
    color: var(--a-ink);
    background: #fff;
    font: 400 16px/1.5 var(--a-font);
}

.aero-root *, .aero-root *::before, .aero-root *::after { box-sizing: border-box; }
.aero-root [hidden] { display: none !important; }
.aero-root p, .aero-root h1, .aero-root h2, .aero-root dl, .aero-root dd { margin: 0; }
.aero-root h1, .aero-root h2 { color: var(--a-brand); font-family: inherit; font-weight: 400; }
.aero-root button, .aero-root input {
    font: inherit;
    line-height: 1.25;
    margin: 0;
    text-transform: none;
    letter-spacing: normal;
}
.aero-root button { cursor: pointer; }
.aero-root button:disabled { cursor: default; opacity: .48; }
.aero-root :focus-visible { outline: 3px solid var(--a-brand); outline-offset: 3px; }
.aero-root a { color: var(--a-brand); text-decoration: underline; text-underline-offset: 2px; }
.aero-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    clip-path: inset(50%);
    white-space: nowrap;
    overflow: hidden;
}

.aero-hero {
    position: relative;
    isolation: isolate;
    display: grid;
    justify-items: start;
    gap: clamp(18px, 2.6vw, 34px);
    padding: clamp(20px, 3vw, 38px) var(--a-gutter) clamp(26px, 4.5vw, 54px);
    background: var(--a-paper);
}
.aero-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: url("/wp-content/uploads/2025/05/top-actualitat.jpg") right center / cover no-repeat;
    opacity: .2;
}
.aero-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 8px;
    padding: 4px 10px;
    background: #ffffffe0;
    font-size: .85rem;
}
.aero-root .aero-breadcrumb a { color: var(--a-ink); text-decoration: none; }
.aero-root .aero-breadcrumb a:hover { text-decoration: underline; }
.aero-root .aero-hero h1 {
    width: fit-content;
    max-width: min(100%, 17em);
    padding: 10px clamp(12px, 1.5vw, 20px);
    background: var(--a-brand);
    color: #fff;
    font-size: clamp(1.85rem, 4.5vw, 4.125rem);
    line-height: 1.12;
    letter-spacing: normal;
    overflow-wrap: break-word;
}

.aero-body { padding: clamp(20px, 3vw, 36px) var(--a-gutter) 40px; }
.aero-intro { margin-bottom: clamp(22px, 3.5vw, 36px); }
.aero-intro p { max-width: 78ch; }
.aero-intro .aero-equipment {
    margin-bottom: 7px;
    color: var(--a-brand);
    font-size: 1.05rem;
    font-weight: 500;
}

.aero-date-controls, .aero-switch { display: flex; align-items: stretch; gap: 4px; }
.aero-date-controls { flex-wrap: wrap; gap: 6px; }
.aero-switch { max-width: 100%; padding: 3px; background: var(--a-paper); }
.aero-root .aero-switch button, .aero-root .aero-latest-button, .aero-root .aero-icon-button {
    min-height: 40px;
    padding: 7px 12px;
    border: 1px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--a-brand);
    font-size: .85rem;
    font-weight: 500;
    box-shadow: none;
}
.aero-root .aero-switch button:hover:not(:disabled),
.aero-root .aero-latest-button:hover:not(:disabled),
.aero-root .aero-icon-button:hover:not(:disabled) { background: var(--a-tint); }
.aero-root .aero-switch button[aria-pressed="true"] { background: var(--a-brand); color: #fff; }
.aero-date {
    display: grid;
    gap: 1px;
    min-width: 0;
    padding: 4px 9px;
    border: 1px solid var(--a-line);
    background: #fff;
}
.aero-date > span { color: var(--a-muted); font-size: .71rem; font-weight: 500; }
.aero-root .aero-date input {
    width: auto;
    min-width: 0;
    max-width: 100%;
    min-height: 25px;
    padding: 0;
    border: 0;
    background: #fff;
    color: var(--a-ink);
    font-size: 1rem;
}
.aero-root .aero-icon-button {
    min-width: 44px;
    min-height: 44px;
    padding: 3px 6px;
    border-color: var(--a-line);
    background: #fff;
    font-size: 1.4rem;
}
.aero-root .aero-latest-button {
    min-height: 44px;
    border-color: var(--a-line);
    background: var(--a-paper);
}
.aero-status { min-height: 20px; margin: 9px 0 13px; color: var(--a-muted); font-size: .83rem; }

.aero-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}
.aero-card { min-width: 0; border: 1px solid var(--a-line); background: #fff; }
.aero-kpi {
    padding: clamp(11px, 1.9vw, 22px);
    border: 0;
    border-top: 3px solid var(--a-brand);
    background: var(--a-paper);
}
.aero-power { background: var(--a-tint); }
.aero-kpi-label { min-height: 2.7em; font-size: .9rem; font-weight: 500; }
.aero-kpi-number {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    column-gap: 6px;
    margin: 4px 0 6px;
    color: var(--a-brand);
    font-variant-numeric: tabular-nums;
}
.aero-kpi-number strong {
    font-size: clamp(1.5rem, 3.4vw, 2.6rem);
    line-height: 1.1;
    font-weight: 500;
    letter-spacing: -.035em;
}
.aero-kpi-number span { font-size: .83rem; font-weight: 500; }
.aero-kpi p { color: var(--a-muted); font-size: .8rem; }

.aero-content {
    display: grid;
    grid-template-columns: minmax(0, 2.55fr) minmax(230px, 1fr);
    gap: 20px;
    align-items: start;
}
.aero-side { display: grid; gap: 20px; }
.aero-trend, .aero-side-card { padding: clamp(13px, 2.1vw, 23px); }
.aero-side-card { background: var(--a-paper); }
.aero-card-head { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: flex-start; gap: 12px; }
.aero-root .aero-section-label {
    margin-bottom: 5px;
    color: var(--a-muted);
    font-size: .7rem;
    font-weight: 500;
    letter-spacing: .08em;
}
.aero-root .aero-card h2 { font-size: clamp(1.3rem, 2.7vw, 1.9rem); line-height: 1.2; }
.aero-card-head > div:first-child > p:last-child, .aero-root .aero-side-intro {
    margin-top: 6px;
    color: var(--a-muted);
    font-size: .86rem;
}
.aero-chart-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px 8px;
    margin: 19px 0 4px;
    color: var(--a-muted);
    font-size: .75rem;
}
.aero-legend { display: flex; flex-wrap: wrap; gap: 7px 12px; }
.aero-legend span { display: flex; align-items: center; gap: 6px; }
.aero-legend i, .aero-mix-list i { display: inline-block; width: 9px; height: 9px; background: var(--a-sim); }
.aero-legend .aero-meter-key { background: var(--a-meter); }
.aero-legend .aero-grid-key { background: var(--a-grid); }
.aero-plot { min-height: 210px; width: 100%; }
.aero-plot svg { display: block; width: 100%; height: auto; overflow: visible; }
.aero-empty {
    min-height: 205px;
    display: grid;
    place-items: center;
    padding: 12px;
    background: var(--a-paper);
    color: var(--a-muted);
    text-align: center;
}
.aero-grid-line { stroke: var(--a-line); stroke-width: 1; }
.aero-axis-text { font: 11px var(--a-font); fill: var(--a-muted); }
.aero-point { cursor: pointer; outline: none !important; }
.aero-point .aero-point-hit { fill: transparent; }
.aero-point[aria-pressed="true"] .aero-point-hit { fill: #043ca41f; }
.aero-point:focus-visible .aero-point-hit { stroke: var(--a-brand); stroke-width: 1.5; }
.aero-bar-sim { fill: var(--a-sim); }
.aero-bar-meter { fill: var(--a-meter); }
.aero-bar-grid { fill: var(--a-grid); }
.aero-bar-none { fill: var(--a-line); }
.aero-readout, .aero-comparison {
    margin-top: 6px;
    padding: 10px 12px;
    background: var(--a-paper);
    color: var(--a-ink);
    font-size: .84rem;
}
.aero-readout { border-left: 3px solid var(--a-brand); }
.aero-root .aero-comparison { margin-top: 9px; border: 1px solid var(--a-line); background: #fff; }
.aero-table-wrap { margin-top: 14px; color: var(--a-muted); font-size: .84rem; }
.aero-root summary { cursor: pointer; color: var(--a-brand); font-weight: 500; }
.aero-root table { border-collapse: collapse; width: 100%; margin: 10px 0 0; font-size: .84rem; text-align: left; }
.aero-root th, .aero-root td { border: 0; border-bottom: 1px solid var(--a-line); padding: 8px 9px; background: transparent; }
.aero-root th { background: var(--a-paper); color: var(--a-brand); font-weight: 500; }
.aero-weather-list { margin-top: 14px !important; }
.aero-weather-list div {
    display: flex;
    justify-content: space-between;
    gap: 7px;
    align-items: baseline;
    border-top: 1px solid var(--a-line);
    padding: 9px 0;
    font-size: .85rem;
}
.aero-weather-list dt { color: var(--a-muted); }
.aero-weather-list dd { font-weight: 500; white-space: nowrap; }
.aero-side-card .aero-source-link { margin-top: 6px; color: var(--a-muted); font-size: .74rem; }
.aero-mix-bar { display: flex; height: 11px; overflow: hidden; background: var(--a-line); margin-top: 15px; }
.aero-mix-bar span:first-child, .aero-mix-list div:first-child i { background: var(--a-grid); }
.aero-mix-bar span:last-child, .aero-mix-list div:last-child i { background: var(--a-own); }
.aero-mix-list i { margin-right: 6px; }

@media (max-width: 880px) {
    .aero-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .aero-content { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 510px) {
    .aero-hero::before { background-position: center; }
    .aero-date { flex: 1; }
    .aero-root .aero-latest-button { font-size: .75rem; padding: 5px 8px; }
    .aero-kpis { gap: 8px; }
    .aero-content, .aero-side { gap: 12px; }
    .aero-card-head .aero-scale { width: 100%; }
    .aero-scale > button { flex: 1; }
}
@media (max-width: 360px) {
    .aero-root .aero-latest-button { flex-basis: 100%; }
}
