/* Estils locals. Cap regla modifica body, :root o altres mòduls de la web. */
.qa-modules { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px; }
.qa-panel { min-width:0; display:flex; flex-direction:column; color:var(--ink,#102638); }
.qa-panel *, .qa-panel *::before, .qa-panel *::after { box-sizing:border-box; }
.qa-panel .panel-heading__icon svg { width:26px; height:26px; }
.qa-panel .panel-heading p { display:block; }
.qa-panel .qa-meta, .qa-panel .qa-explanation, .qa-panel .qa-footer { color:#496273; font-size:.76rem; line-height:1.6; }
.qa-panel .qa-meta { margin:0 0 14px; }
.qa-panel .qa-caption { font-weight:800; font-size:.8rem; color:var(--blue,#0b67a3); margin:0 0 10px; }
.qa-scroll { max-width:100%; min-width:0; overflow-x:auto; border:1px solid rgba(20,67,92,.12); border-radius:14px; }
.qa-table { width:100%; min-width:510px; border-collapse:collapse; font-size:.78rem; text-align:center; }
.qa-table th,.qa-table td { padding:12px 8px; border-bottom:1px solid #e5edf1; }
.qa-table thead { background:#eef7fa; color:#08466e; }
.qa-table th:first-child { text-align:left; }
.qa-table tbody th { background:#f8fbfc; }
.qa-table tr:last-child td,.qa-table tr:last-child th { border-bottom:0; }
.qa-table small { display:block; color:#496273; font-size:.64rem; font-weight:500; margin-top:3px; }
.qa-value { font-weight:800; font-variant-numeric:tabular-nums; }
.qa-panel .qa-notice,.qa-notice { padding:12px 14px; border:1px solid #d3e5eb; background:#eff7fa; color:#234e63; border-radius:12px; font-size:.82rem; }
.qa-panel .qa-footer { margin-top:auto; border-top:1px solid #e1eaf0; padding-top:13px; }
.qa-panel .qa-footer a { color:#08466e; text-decoration:underline; text-underline-offset:2px; }
.qa-current { padding:17px; margin-bottom:18px; background:linear-gradient(145deg,#eef8fc,#f1faf5); border:1px solid #d9eaf0; border-radius:18px; }
.qa-current-values { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:10px 0; }
.qa-current-values strong { display:block; font-size:clamp(1.2rem,2.4vw,1.85rem); letter-spacing:-.025em; }
.qa-current-values span { display:block; font-size:.73rem; color:#496273; }
.qa-current .qa-meta { margin:0; }
.qa-sr { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.qa-scroll:focus-visible,.qa-panel a:focus-visible { outline:3px solid #0b67a3; outline-offset:3px; }
@media(max-width:767.98px) { .qa-modules { grid-template-columns:1fr; } .qa-panel .panel-heading { align-items:flex-start; } }

/* v1.1.0: llenguatge planer i detall opcional; tot confinat a les targetes QA. */
.qa-panel .qa-summary { margin:0 0 12px; font-size:1rem; line-height:1.7; font-weight:700; color:#102638; }
.qa-panel .qa-plain-note { margin:0 0 18px; color:#496273; font-size:.78rem; line-height:1.6; }
.qa-panel .qa-days { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-bottom:18px; }
.qa-panel .qa-day { min-width:0; padding:14px; border:1px solid #d9eaf0; border-radius:15px; background:#f5fafb; overflow-wrap:anywhere; }
.qa-panel .qa-day h3 { display:flex; flex-wrap:wrap; justify-content:space-between; gap:4px; font-size:.85rem; color:#08466e; margin:0 0 9px; }
.qa-panel .qa-day h3 span { color:#496273; font-weight:500; font-size:.75rem; }
.qa-panel .qa-day p { font-size:.8rem; margin:0 0 8px; line-height:1.65; }
.qa-panel .qa-day p:last-child { margin-bottom:0; }
.qa-panel .qa-day .qa-evolution { color:#08466e; }
.qa-panel .qa-day .qa-coverage { font-size:.72rem; color:#496273; }
.qa-panel .qa-details { margin:0 0 20px; border:1px solid #d9eaf0; border-radius:13px; }
.qa-panel .qa-details summary { padding:13px 14px; font-size:.82rem; font-weight:700; color:#08466e; cursor:pointer; }
.qa-panel .qa-details summary:focus-visible { outline:3px solid #0b67a3; outline-offset:3px; border-radius:10px; }
.qa-panel .qa-details-body { padding:0 14px 14px; min-width:0; }
@media(max-width:450px) { .qa-panel .qa-days { grid-template-columns:1fr; } }

/* v1.2.0: semàfors amb etiqueta textual, sense dependència exclusiva del color. */
.qa-panel .qa-semaphore-table { width:100%; min-width:0; border-collapse:collapse; table-layout:fixed; font-size:.76rem; text-align:center; }
.qa-panel .qa-semaphore-table thead { background:#eef7fa; color:#08466e; }
.qa-panel .qa-semaphore-table th,.qa-panel .qa-semaphore-table td { padding:12px 5px; border-bottom:1px solid #e5edf1; vertical-align:middle; overflow-wrap:anywhere; }
.qa-panel .qa-semaphore-table th:first-child { text-align:left; width:23%; padding-left:10px; }
.qa-panel .qa-semaphore-table tbody th { background:#f8fbfc; }
.qa-panel .qa-semaphore-table tbody tr:last-child th,.qa-panel .qa-semaphore-table tbody tr:last-child td { border-bottom:0; }
.qa-panel .qa-light { display:inline-flex; max-width:100%; flex-direction:column; align-items:center; gap:6px; color:#102638; font-size:.72rem; line-height:1.35; font-weight:700; }
.qa-panel .qa-light-dot { display:block; width:18px; height:18px; border-radius:50%; background:#8b959e; border:2px solid #66737e; box-shadow:0 0 0 3px #edf1f4; }
.qa-panel .qa-light--green .qa-light-dot { background:#169451; border-color:#0b6836; box-shadow:0 0 0 3px #e8f6ed; }
.qa-panel .qa-light--yellow .qa-light-dot { background:#f2bd2e; border-color:#976a03; box-shadow:0 0 0 3px #fff8df; }
.qa-panel .qa-light--red .qa-light-dot { background:#dc4040; border-color:#9c2525; box-shadow:0 0 0 3px #fcecec; }
.qa-panel .qa-dust-lights { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.qa-panel .qa-dust-light { min-width:0; text-align:center; border:1px solid #d9eaf0; border-radius:15px; background:#f5fafb; padding:20px 8px; }
.qa-panel .qa-dust-light h3 { font-size:.83rem; color:#08466e; margin:0 0 16px; }
.qa-panel .qa-dust-light .qa-light-dot { width:40px; height:40px; }
.qa-panel .qa-dust-light .qa-light { font-size:.84rem; gap:12px; }
.qa-panel .qa-simple-note { margin:12px 0 18px; color:#496273; font-size:.74rem; }
@media(max-width:1000px) { .qa-panel .qa-dust-lights { grid-template-columns:repeat(2,minmax(0,1fr)); } }

/* v1.3.0: únic bloc compacte, selectors i una sola vista activa. */
.qa-preview { width:min(100% - 28px,620px); margin:32px auto; }
.qa-compact { padding:18px; font-family:'Manrope',system-ui,sans-serif; }
.qa-compact [hidden] { display:none !important; }
.qa-compact .panel-heading { margin-bottom:12px; gap:10px; }
.qa-compact .panel-heading__icon { flex-basis:34px; width:34px; height:34px; border-radius:11px; }
.qa-compact .panel-heading h2 { font-size:1.1rem; }
.qa-compact .qa-version { font-size:.64rem; color:#627888; }
.qa-compact .qa-types,.qa-compact .qa-day-select { display:flex; gap:5px; margin-bottom:10px; }
.qa-compact .qa-types button,.qa-compact .qa-day-select button { border:1px solid #d6e5ed; border-radius:9px; background:#f4f8fb; color:#375266; cursor:pointer; font:inherit; font-size:.78rem; padding:8px 10px; }
.qa-compact .qa-types button { flex:1; font-weight:800; }
.qa-compact .qa-day-select button { flex:1; font-size:.72rem; padding:7px 4px; }
.qa-compact .qa-types button[aria-selected=true],.qa-compact .qa-day-select button[aria-pressed=true] { color:#08466e; background:#e2f3fa; border-color:#7dafc8; }
.qa-compact button:focus-visible,.qa-compact [role=tabpanel]:focus-visible { outline:3px solid #0b67a3; outline-offset:2px; }
.qa-compact .qa-compact-list { list-style:none; padding:0; margin:0; }
.qa-compact .qa-compact-list li { display:flex; justify-content:space-between; align-items:center; gap:8px; border-bottom:1px solid #edf1f4; padding:9px 0; min-height:37px; font-size:.81rem; }
.qa-compact .qa-compact-list li:last-child { border:0; }
.qa-compact .qa-element { font-weight:700; }
.qa-compact .qa-result { display:inline-flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:5px; font-size:.75rem; color:#102638; }
.qa-compact .qa-result-dot { display:inline-block; flex:none; width:13px; height:13px; border-radius:50%; background:#8b959e; border:1px solid #66737e; }
.qa-compact .qa-result--green .qa-result-dot { background:#169451; border-color:#0b6836; }
.qa-compact .qa-result--yellow .qa-result-dot { background:#f2bd2e; border-color:#976a03; }
.qa-compact .qa-result--red .qa-result-dot { background:#dc4040; border-color:#9c2525; }
.qa-compact .qa-result-index { font-size:.7rem; color:#496273; font-variant-numeric:tabular-nums; }
.qa-compact .qa-compact-dust { display:flex; flex-direction:column; gap:12px; align-items:center; padding:24px 0; }
.qa-compact .qa-compact-dust .qa-result { font-size:1rem; gap:9px; }
.qa-compact .qa-compact-dust .qa-result-dot { width:28px; height:28px; }
.qa-compact .qa-compact-dust small,.qa-compact .qa-compact-foot { color:#496273; font-size:.65rem; }
.qa-compact .qa-compact-foot { margin:10px 0 0; padding-top:8px; border-top:1px solid #edf1f4; }
.qa-compact .qa-compact-foot a { color:#496273; }
.qa-compact .qa-compact-status { font-size:.72rem; color:#496273; margin:6px 0; }
@media(max-width:450px) { .qa-preview { margin:18px auto; } .qa-compact { padding:14px; } .qa-compact .qa-result { font-size:.7rem; } }

/* v1.4.0: tercera pestanya; estils AQI independents dels semàfors de pol·len/pols. */
.qa-compact .qa-types button { min-width:0; line-height:1.25; }
.qa-compact .qa-aqi-heading { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin:8px 0 5px; font-size:.86rem; }
.qa-compact .qa-aqi-dot { width:25px; height:25px; flex:none; border-radius:50%; background:#8b959e; border:1px solid rgba(0,0,0,.25); }
.qa-compact .qa-aqi--good { background:#50f0e6; }
.qa-compact .qa-aqi--fair { background:#50ccaa; }
.qa-compact .qa-aqi--moderate { background:#f0e641; }
.qa-compact .qa-aqi--poor { background:#ff5050; }
.qa-compact .qa-aqi--very-poor { background:#960032; }
.qa-compact .qa-aqi--extreme { background:#7d2181; }
.qa-compact .qa-aqi-period { color:#496273; font-size:.65rem; line-height:1.4; margin:4px 0 7px; }
.qa-compact .qa-aqi-list { list-style:none; padding:0; margin:0; }
.qa-compact .qa-aqi-list li { display:flex; justify-content:space-between; gap:8px; padding:8px 0; border-bottom:1px solid #edf1f4; font-size:.73rem; }
.qa-compact .qa-aqi-list li > span { min-width:0; }
.qa-compact .qa-aqi-value { font-variant-numeric:tabular-nums; text-align:right; flex-shrink:0; font-size:.73rem; }
.qa-compact .qa-aqi-details { margin:7px 0 0; color:#496273; font-size:.66rem; }
.qa-compact .qa-aqi-details summary { cursor:pointer; }
.qa-compact .qa-aqi-details summary:focus-visible { outline:3px solid #0b67a3; outline-offset:3px; }
@media(max-width:450px) { .qa-compact .qa-types button { padding:8px 4px; font-size:.7rem; } .qa-compact .qa-aqi-list li { font-size:.69rem; } .qa-compact .qa-aqi-value { font-size:.69rem; } }

/* v1.4.1: categories dels quatre contaminants, sense alterar altres apartats. */
.qa-compact .qa-aqi-pollutant .qa-aqi-name { display:inline-flex; align-items:center; gap:5px; flex-shrink:0; font-weight:700; }
.qa-compact .qa-aqi-pollutant .qa-aqi-dot { width:11px; height:11px; }
.qa-compact .qa-aqi-pollutant .qa-aqi-reading { display:flex; flex-wrap:wrap; justify-content:flex-end; align-items:center; gap:3px 5px; min-width:0; text-align:right; }
.qa-compact .qa-aqi-pollutant .qa-aqi-reading small { font-size:.6rem; color:#496273; }
