/* Look & feel allineato al tema Divi/child "cielo": Open Sans, contenuto
   centrato ~1080px, sezioni full-bleed, palette CIELO per i grafici. */
.cielo-stats {
  --cs-blue: #1565c0;
  --cs-navy: #0c3269;
  --cs-ink: #44443f;
  --cs-muted: #6b6b66;
  --cs-line: #e5e5e0;
  --cs-soft: #f5faff;
  --cs-max: 1080px;
  --cs-pad-x: max(24px, calc((100% - var(--cs-max)) / 2));
  width: 100%;
  color: var(--cs-ink);
  font-family: inherit;
  line-height: 1.6;
}
.cielo-stats * { box-sizing: border-box; }
.cielo-stats h1, .cielo-stats h2 { font-family: inherit; }
/* Annulla il cap globale "canvas { max-width:520px }" del plugin limesurvey-connector. */
.cielo-stats canvas { max-width: 100% !important; }

.cielo-stats__error {
  background: #fdecea; color: #a32d2d;
  padding: 14px var(--cs-pad-x); font-size: 14px;
}

/* Hero full-bleed, contenuto centrato */
.cs-hero {
  padding: 56px var(--cs-pad-x) 44px;
  background: linear-gradient(160deg, #e3f2fd 0%, #f5faff 60%, #fff 100%);
}
.cs-eyebrow { font-size: 12px; color: var(--cs-blue); letter-spacing: 2px; font-weight: 600; margin-bottom: 12px; }
.cs-hero h1 { font-size: 30px; font-weight: 600; margin: 0 0 14px; color: var(--cs-navy); line-height: 1.25; }
.cs-hero p { font-size: 15px; max-width: 620px; margin: 0 0 16px; }
.cs-meta { font-size: 12px; color: var(--cs-muted); display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.cs-badge { padding: 2px 8px; border-radius: 3px; font-weight: 600; letter-spacing: 1px; font-size: 10px; }
.cs-badge.is-mock { background: #fff3cd; color: #854f0b; }
.cs-badge.is-live { background: #d7f0dd; color: #27500a; }

/* KPI */
.cs-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 40px var(--cs-pad-x) 8px; }
.cs-kpi { background: var(--cs-soft); border-left: 3px solid var(--cs-blue); padding: 14px 16px; }
.cs-kpi--green { border-left-color: #3B6D11; }
.cs-kpi__label { font-size: 12px; color: var(--cs-ink); }
.cs-kpi__value { font-size: 26px; font-weight: 600; color: var(--cs-navy); margin-top: 2px; }
.cs-kpi--green .cs-kpi__value { color: #3B6D11; }
.cs-kpi__band { font-size: 11px; font-weight: 600; margin-top: 2px; letter-spacing: 0.3px; }

/* Sezioni full-bleed */
.cs-section { padding: 44px var(--cs-pad-x); }
.cs-section--alt { background: var(--cs-soft); }
.cs-section h2 { font-size: 24px; font-weight: 600; margin: 0 0 6px; color: var(--cs-navy); }
.cs-sub { font-size: 14px; color: var(--cs-muted); margin: 0 0 16px; }

.cs-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 12px; font-size: 12px; }
.cs-legend__item { display: flex; align-items: center; gap: 6px; }
.cs-legend__swatch { width: 11px; height: 11px; display: inline-block; }

.cs-canvas { position: relative; width: 100%; }
.cs-canvas--short { height: 64px; }
.cs-canvas--pillar { height: 200px; }
.cs-canvas--topics { height: 340px; }
.cs-canvas--cert { height: 360px; }
.cs-canvas--trend { height: 240px; }
.cs-canvas--radar { height: 190px; }

/* Controlli */
.cs-controls { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.cs-pillar-select { display: flex; flex-wrap: wrap; gap: 8px; }
.cs-pillar-btn {
  --cs-pillar: #1565c0;
  border: 1px solid var(--cs-line); background: #fff; color: var(--cs-ink);
  padding: 8px 16px; font-size: 13px; border-radius: 4px; cursor: pointer;
  font-family: inherit; transition: 200ms ease;
}
.cs-pillar-btn:hover { border-color: var(--cs-pillar); }
.cs-pillar-btn.is-active { color: #fff; background: var(--cs-pillar); border-color: var(--cs-pillar); font-weight: 600; }
.cs-pillar-btn:focus-visible { outline: 2px solid var(--cs-navy); outline-offset: 2px; }

.cs-view-toggle { display: inline-flex; border: 1px solid var(--cs-line); border-radius: 4px; overflow: hidden; }
.cs-toggle { border: 0; background: #fff; color: var(--cs-muted); padding: 8px 16px; font-size: 13px; cursor: pointer; font-family: inherit; }
.cs-toggle.is-active { background: var(--cs-navy); color: #fff; font-weight: 600; }
.cs-toggle:focus-visible { outline: 2px solid var(--cs-navy); outline-offset: -2px; }

.cs-empty { padding: 28px; text-align: center; color: var(--cs-muted); font-size: 14px; background: #fff; border: 1px dashed var(--cs-line); border-radius: 4px; }

.cs-radars { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.cs-radar__title { font-size: 12px; font-weight: 600; color: var(--cs-navy); text-align: center; margin-bottom: 4px; }
.cs-sdg-legend { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.cs-sdg-legend li { display: flex; align-items: flex-start; gap: 7px; font-size: 11px; line-height: 1.3; color: var(--cs-ink); }
.cs-sdg-num {
  flex: 0 0 auto; width: 18px; height: 18px; border-radius: 3px;
  color: #fff; font-weight: 700; font-size: 10px;
  display: inline-flex; align-items: center; justify-content: center;
}
.cs-sdg-txt { padding-top: 1px; }

.cs-priority-table { background: #fff; border: 1px solid var(--cs-line); border-radius: 4px; overflow: hidden; font-size: 12px; }
.cs-pt__row { display: grid; grid-template-columns: 1.8fr 1fr 1fr 1fr 1fr; border-bottom: 1px solid #f0f0eb; }
.cs-pt__row:last-child { border-bottom: 0; }
.cs-pt__head { background: var(--cs-soft); font-weight: 600; color: var(--cs-navy); }
.cs-pt__row > div { padding: 9px 12px; }
.cs-pt__c { text-align: center; }
.cs-pt__head .cs-u { color: #A32D2D; } .cs-pt__head .cs-i { color: #854F0B; }
.cs-pt__head .cs-m { color: #0C447C; } .cs-pt__head .cs-a { color: #27500A; }

@media (max-width: 782px) {
  .cs-kpis { grid-template-columns: repeat(2, 1fr); }
  .cs-hero h1 { font-size: 23px; }
  .cs-section h2 { font-size: 20px; }
}
