/* ==========================================================================
   Scheda "Il Comune in sintesi" – stili specifici (su Bootstrap Italia 2.x)
   Tutto ciò che Bootstrap Italia copre già (header, navbar, breadcrumb,
   card, bottoni, rating, footer) NON viene ridefinito qui.
   ========================================================================== */

:root {
    --scheda-muted: #5d7083;
    --scheda-line-strong: #d9dadb;
    --scheda-line: #e6ecf2;
    --scheda-soft-bg: #f0f6fc;
    --scheda-secondary: #a6c1dd;
    --scheda-primary: #0066cc;
    --scheda-primary-dark: #003366;
}

/* Stemma nel brand (sostituisce l'icona it-pa) */
.it-header-center-wrapper .it-brand-wrapper img.scheda-stemma {
    width: 82px;
    height: 82px;
    object-fit: contain;
    margin-right: 16px;
    fill: none;
}
.it-footer .it-brand-wrapper img.scheda-stemma {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin-right: 16px;
}
@media (max-width: 767.98px) {
    .it-header-center-wrapper .it-brand-wrapper img.scheda-stemma {
        width: 48px;
        height: 48px;
        margin-right: 12px;
    }
}

/* Titolo pagina */
.scheda-titolo {
    padding: 24px 0 32px;
    align-items: flex-start;
}
.scheda-titolo h1 {
    font-size: 2.75rem;
    line-height: 1.1;
    font-weight: 700;
    margin-bottom: 16px;
}
.scheda-lead {
    font-size: 1.25rem;
    line-height: 1.5;
    margin: 0;
    text-wrap: pretty;
}
.scheda-aggiornamento {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: .9375rem;
    color: var(--scheda-muted);
    padding-top: 16px;
}
.scheda-aggiornamento-label {
    font-weight: 600;
    color: #1a1a1a;
}
@media (max-width: 767.98px) {
    .scheda-titolo h1 { font-size: 2rem; }
    .scheda-lead { font-size: 1.125rem; }
}

/* Corpo: sezioni a tutta larghezza (l'indice laterale e' stato sostituito dalle aree sotto il titolo) */
.scheda-corpo {
    padding-top: 48px;
    padding-bottom: 80px;
}
.it-page-sections-container {
    display: flex;
    flex-direction: column;
    gap: 64px;
}
.scheda-sezione {
    scroll-margin-top: 24px;
}
.scheda-sezione > h2,
.scheda-sezione-head h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 24px;
}
.scheda-sezione-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    flex-wrap: wrap;
}
.scheda-sezione-head h2 { margin-bottom: 0; }
.scheda-sezione-head + * { margin-top: 24px; }
.scheda-sezione h3 {
    margin-top: 24px;
    margin-bottom: 8px;
}
.scheda-testo {
    font-size: 1.125rem;
    line-height: 1.6;
    text-wrap: pretty;
    margin-bottom: 24px;
}
.scheda-muted {
    color: var(--scheda-muted);
}
.scheda-fonte {
    font-size: .875rem;
    color: var(--scheda-muted);
    margin: 24px 0 0;
}

/* Avatar con iniziali (da sostituire con foto dal CMS) */
.scheda-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--scheda-line);
    color: var(--scheda-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-right: 16px;
}
.scheda-avatar-xl {
    width: 112px;
    height: 112px;
    background: var(--scheda-primary);
    color: #fff;
    font-size: 2.5rem;
    margin-right: 24px;
}
.scheda-card-sindaco,
.scheda-card-persona {
    align-items: center;
}
.scheda-card-sindaco .card-title {
    font-size: 1.75rem;
}
.scheda-card-sindaco .card-text,
.scheda-card-persona .card-text {
    margin-bottom: 8px;
}
.scheda-card-sindaco .chip {
    margin-top: 8px;
}
@media (max-width: 575.98px) {
    .scheda-avatar-xl {
        width: 80px;
        height: 80px;
        font-size: 1.75rem;
        margin-right: 16px;
    }
}

/* Composizione consiglio */
.scheda-composizione {
    display: flex;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    gap: 2px;
    margin-bottom: 24px;
}
.scheda-composizione-magg { background: var(--scheda-primary); }
.scheda-composizione-min { background: var(--scheda-secondary); }
.scheda-legenda {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 0 !important;
}
.scheda-legenda-dot {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    flex-shrink: 0;
}
.scheda-legenda-magg { background: var(--scheda-primary); }
.scheda-legenda-min { background: var(--scheda-secondary); }
.scheda-lista-persone {
    list-style: none;
    margin: 0;
    padding: 0;
}
.scheda-lista-persone li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--scheda-line);
}
.scheda-lista-nome {
    font-size: 1.0625rem;
    font-weight: 600;
}
.scheda-lista-persone .scheda-muted {
    font-size: .9375rem;
    white-space: nowrap;
}
.scheda-azioni {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

/* Riquadri statistici */
.scheda-statbox {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 24px;
    padding: 24px;
    background: var(--scheda-soft-bg);
    border-radius: 4px;
}
.scheda-statbox > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.scheda-stat-label {
    font-size: .9375rem;
    color: var(--scheda-muted);
}
.scheda-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.1;
}

/* Grafico a barre orizzontali */
.scheda-barre {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.scheda-barra-riga {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr) 96px;
    gap: 16px;
    align-items: center;
    padding: 6px 0;
}
.scheda-barra-label {
    font-size: 1rem;
}
.scheda-barra-track {
    height: 20px;
    background: var(--scheda-line);
    border-radius: 2px;
}
.scheda-barra-fill {
    height: 20px;
    background: var(--scheda-primary);
    border-radius: 2px;
}
.scheda-barra-valore {
    font-size: 1rem;
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
}
@media (max-width: 575.98px) {
    .scheda-barra-riga {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px;
    }
    .scheda-barra-label {
        grid-column: 1 / -1;
        font-size: .9375rem;
    }
}

/* Informazioni territoriali */
.scheda-dati {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    column-gap: 32px;
    margin: 0;
}
.scheda-dati > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--scheda-line);
}
.scheda-dati dt {
    font-size: 1rem;
    font-weight: 400;
    color: var(--scheda-muted);
}
.scheda-dati dd {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    text-align: right;
}

/* Contatti */
.scheda-card-contatti .card-title {
    font-size: 1.375rem;
}
.scheda-contatti-griglia {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 20px 0 0;
}
.scheda-contatti-griglia > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.scheda-contatti-griglia dt {
    font-size: .9375rem;
    font-weight: 400;
    color: var(--scheda-muted);
}
.scheda-contatti-griglia dd {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    word-break: break-word;
}

/* Fonti */
.scheda-fonti {
    padding-top: 24px;
    border-top: 1px solid var(--scheda-line-strong);
}
.scheda-fonti p {
    font-size: .9375rem;
    line-height: 1.6;
    color: var(--scheda-muted);
    margin: 8px 0 0;
    text-wrap: pretty;
}

/* Valutazione */
.scheda-valutazione {
    padding: 56px 0;
}
.scheda-valutazione .card-body h2 {
    margin-bottom: 16px;
}
.scheda-rating {
    display: inline-flex;
    margin: 0 auto;
}
.scheda-rating .icon {
    width: 32px;
    height: 32px;
}
.scheda-valutazione-grazie {
    margin: 16px 0 0;
    font-size: 1.0625rem;
}

/* Contatta il comune */
.scheda-contatta {
    padding: 56px 0;
}
.scheda-contatta .card-body h2 {
    margin-bottom: 8px;
}
.scheda-contatta .link-list-wrapper .link-list .list-item {
    padding-left: 0;
    font-weight: 600;
    font-size: 1.125rem;
}

/* Footer */
.scheda-demo-badge {
    opacity: .75;
    font-size: .875rem;
}

/* Card teaser a piena larghezza della colonna (una card per col-md-6) */
.scheda-sezione .card-wrapper {
    padding-bottom: 0;
}
.scheda-sezione .card.card-teaser {
    width: 100%;
    flex: 0 0 100%;
    flex-wrap: nowrap;
    align-items: flex-start;
    padding: 24px;
}
.scheda-sezione .card.card-teaser .card-body {
    width: 100%;
}
.scheda-card-sindaco.card-teaser,
.scheda-card-persona.card-teaser {
    align-items: center;
}
.scheda-card-sindaco.card-teaser {
    padding: 32px;
}
.scheda-sezione .card.card-teaser .card-title a {
    text-decoration: none;
}
.scheda-sezione .card.card-teaser .card-title a:hover {
    text-decoration: underline;
}

/* Mobile: le griglie non devono allargare la pagina (min-width:0 sui figli) */
.scheda-keyfact,
.scheda-statbox > div,
.scheda-dati > div,
.scheda-contatti-griglia > div {
    min-width: 0;
}
.scheda-keyfact dd,
.scheda-stat-value {
    overflow-wrap: anywhere;
}
@media (max-width: 575.98px) {
    .scheda-keyfact {
        padding: 16px 12px 16px 0;
    }
    .scheda-keyfact dd {
        font-size: 1.75rem;
    }
    .scheda-statbox {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
        padding: 16px;
    }
    .scheda-stat-value {
        font-size: 1.5rem;
    }
    .scheda-dati,
    .scheda-contatti-griglia {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Handoff: solo Titillium Web (+ Roboto Mono per i numeri). Niente Lora nelle card. */
.scheda-sezione .card .card-text,
.scheda-contatta .card .card-text {
    font-family: "Titillium Web", Geneva, Tahoma, sans-serif;
    font-size: 1rem;
}

/* Amministrazioni precedenti (accordion per mandato) */
.scheda-storico-anni {
    font-family: "Roboto Mono", monospace;
    font-weight: 700;
    margin-right: 16px;
    white-space: nowrap;
}
.scheda-storico-sindaco {
    font-weight: 700;
    margin-right: 12px;
}
.scheda-storico-lista {
    font-weight: 400;
    font-size: .9375rem;
}
.scheda-storico-comm {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin: 0;
    padding: 18px 0;
    font-size: 20px;
    color: var(--scheda-muted);
}
.scheda-storico-intro {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 16px;
}
.scheda-storico-titolo {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 4px !important;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-size: .8125rem;
    color: var(--scheda-muted);
}
.scheda-lista-compatta li {
    padding: 8px 0;
}
.scheda-lista-compatta .scheda-lista-nome {
    font-size: .9375rem;
}
.scheda-lista-partito {
    font-weight: 400;
    font-size: .8125rem;
}
#accordionStorico .accordion-button {
    flex-wrap: wrap;
    row-gap: 2px;
}

/* Redditi: grafico andamento + tabella */
.scheda-grafico {
    position: relative;
    height: 260px;
    margin: 8px 0 16px;
}
.scheda-tabella {
    font-size: .9375rem;
    margin-bottom: 0;
}
.scheda-tabella th,
.scheda-tabella td {
    padding: 8px 12px;
    border-color: var(--scheda-line);
    vertical-align: middle;
}
.scheda-tabella thead th {
    font-size: .8125rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--scheda-muted);
    font-weight: 600;
    border-bottom: 2px solid var(--scheda-line-strong);
}
.scheda-tabella tbody th {
    font-weight: 700;
}
.scheda-tabella .scheda-tabella-ultimo td,
.scheda-tabella .scheda-tabella-ultimo th {
    background: var(--scheda-soft-bg);
}
.scheda-tabella .font-monospace {
    font-size: .9375rem;
}
@media (max-width: 575.98px) {
    .scheda-grafico { height: 220px; }
    .scheda-tabella th, .scheda-tabella td { padding: 6px 8px; font-size: .875rem; }
}

/* Uomini / donne (stile Primo Cittadino) */
:root {
    --scheda-male: #4a90d9;
    --scheda-female: #e84393;
}
.scheda-genere {
    margin: 0 0 24px;
}
.scheda-sezione-head + .scheda-genere {
    margin-top: 16px;
}
.scheda-genere-bar {
    display: flex;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    gap: 2px;
}
.scheda-genere-bar .scheda-genere-m { background: var(--scheda-male); }
.scheda-genere-bar .scheda-genere-f { background: var(--scheda-female); }
.scheda-genere-legenda {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin-top: 8px;
    font-size: .9375rem;
    color: var(--scheda-muted);
}
.scheda-genere-legenda strong {
    color: #1a1a1a;
}
.scheda-genere-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    position: relative;
    top: -1px;
}
.scheda-genere-dot.scheda-genere-m { background: var(--scheda-male); }
.scheda-genere-dot.scheda-genere-f { background: var(--scheda-female); }
.card-title .scheda-genere-dot,
.scheda-lista-nome .scheda-genere-dot {
    width: 8px;
    height: 8px;
    margin-right: 6px;
}

/* Confronto con i comuni vicini: ranking */
.scheda-ranking {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
}
.scheda-ranking-item {
    display: grid;
    grid-template-columns: 36px minmax(140px, 1.2fr) minmax(80px, 2fr) 96px;
    gap: 12px;
    align-items: center;
    padding: 8px 8px;
    border-bottom: 1px solid var(--scheda-line);
    border-radius: 4px;
}
.scheda-ranking-item.is-self {
    background: var(--scheda-soft-bg);
    font-weight: 700;
}
.scheda-ranking-pos {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--scheda-line);
    color: #1a1a1a;
    font-weight: 700;
    font-size: .9375rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.scheda-ranking-pos.pos-1 { background: #f5c518; }
.scheda-ranking-pos.pos-2 { background: #c0c7cf; }
.scheda-ranking-pos.pos-3 { background: #d9a066; color: #fff; }
.scheda-ranking-nome {
    font-size: 1rem;
    line-height: 1.3;
    min-width: 0;
}
.scheda-ranking-nome a {
    text-decoration: none;
    font-weight: 600;
}
.scheda-ranking-nome a:hover {
    text-decoration: underline;
}
.scheda-ranking-nome small {
    font-size: .8125rem;
    font-weight: 400;
    white-space: nowrap;
}
.scheda-ranking-bar {
    display: block;
    height: 14px;
    background: var(--scheda-line);
    border-radius: 2px;
    overflow: hidden;
}
.scheda-ranking-bar > span {
    display: block;
    height: 100%;
    background: var(--scheda-secondary);
    border-radius: 2px;
}
.scheda-ranking-item.is-self .scheda-ranking-bar > span {
    background: var(--scheda-primary);
}
.scheda-ranking-val {
    text-align: right;
    font-size: .9375rem;
    font-weight: 600;
}
@media (max-width: 575.98px) {
    .scheda-ranking-item {
        grid-template-columns: 30px 1fr 84px;
        row-gap: 6px;
    }
    .scheda-ranking-bar {
        grid-column: 2 / -1;
    }
}

/* Contatti: sede + lista con icone (sostituisce la griglia a 3 colonne) */
.scheda-card-contatti .card-body {
    padding: 8px;
}
.scheda-contatti-sede {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--scheda-line);
}
.scheda-contatti-sede > .icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    margin-top: 2px;
}
.scheda-contatti-sede .category {
    margin-bottom: 4px;
}
.scheda-contatti-sede .card-title {
    margin: 0;
    font-size: 1.375rem;
}
.scheda-contatti-sede .card-title a {
    text-decoration: none;
}
.scheda-contatti-sede .card-title a:hover {
    text-decoration: underline;
}
.scheda-contatti-lista {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 32px;
}
.scheda-contatti-lista li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    min-width: 0;
}
.scheda-contatti-lista .icon {
    flex-shrink: 0;
    margin-top: 3px;
}
.scheda-contatti-lista li > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.scheda-contatti-label {
    font-size: .875rem;
    color: var(--scheda-muted);
}
.scheda-contatti-lista a,
.scheda-contatti-valore {
    font-size: 1.0625rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}
.scheda-contatti-lista a {
    text-decoration: none;
}
.scheda-contatti-lista a:hover {
    text-decoration: underline;
}
@media (max-width: 575.98px) {
    .scheda-contatti-lista {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }
}

.scheda-dati dt {
    white-space: nowrap;
}

/* Informazioni territoriali: tre gruppi, etichetta sopra / valore sotto */
.scheda-info-gruppo {
    height: 100%;
    padding: 20px 24px;
    background: var(--scheda-soft-bg);
    border-radius: 4px;
}
.scheda-info-titolo {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px !important;
    font-size: .8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--scheda-muted);
}
.scheda-info-lista {
    margin: 0;
}
.scheda-info-lista > div {
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
}
.scheda-info-lista > div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}
.scheda-info-lista dt {
    font-size: .8125rem;
    font-weight: 400;
    color: var(--scheda-muted);
    margin-bottom: 2px;
}
.scheda-info-lista dd {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.scheda-info-lista dd a {
    text-decoration: none;
}
.scheda-info-lista dd a:hover {
    text-decoration: underline;
}
.scheda-info-lista dd .icon-xs {
    vertical-align: -2px;
}
.scheda-info-codici dd {
    font-family: "Roboto Mono", monospace;
    font-size: 1rem;
    letter-spacing: .02em;
}

/* Distributori di carburante (dati Benzina24 / MIMIT) */
.scheda-stat-sub {
    font-size: .8125rem;
    color: var(--scheda-muted);
    margin-top: 2px;
}
.scheda-impianti {
    list-style: none;
    margin: 24px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.scheda-impianto {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 16px 20px;
    background: #fff;
    box-shadow: 0 2px 20px rgba(0, 0, 0, .08);
    border-radius: 4px;
}
.scheda-impianto-logo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px solid var(--scheda-line);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.scheda-impianto-logo img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}
.scheda-impianto-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.scheda-impianto-bandiera {
    font-size: .8125rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--scheda-muted);
    font-weight: 600;
}
.scheda-impianto-nome {
    font-size: 1.0625rem;
    font-weight: 700;
    text-decoration: none;
    line-height: 1.25;
}
.scheda-impianto-nome:hover {
    text-decoration: underline;
}
.scheda-impianto-indirizzo {
    font-size: .9375rem;
}
.scheda-impianto-prezzi {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin: 0;
    justify-content: flex-end;
}
.scheda-impianto-prezzi > div {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 88px;
}
.scheda-impianto-prezzi dt {
    font-size: .75rem;
    font-weight: 400;
    color: var(--scheda-muted);
    white-space: nowrap;
}
.scheda-impianto-prezzi dd {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}
.scheda-impianto-prezzi > div.is-min dd {
    color: #007a52;
}
.scheda-impianto-prezzi > div.is-min dt::after {
    content: " ▾ min";
    color: #007a52;
    font-weight: 600;
}
@media (max-width: 767.98px) {
    .scheda-impianto {
        grid-template-columns: 48px minmax(0, 1fr);
    }
    .scheda-impianto-prezzi {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
    .scheda-impianto-prezzi > div {
        align-items: flex-start;
    }
}
.scheda-impianto-denominazione {
    font-size: .9375rem;
}

/* Demografia: piramide delle eta' */
.scheda-piramide {
    margin: 8px 0 12px;
}
.scheda-piramide-legenda {
    display: flex;
    gap: 24px;
    justify-content: center;
    font-size: .9375rem;
    color: var(--scheda-muted);
    margin-bottom: 12px;
}
.scheda-piramide-riga {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    height: 20px;
}
.scheda-piramide-m,
.scheda-piramide-f {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.scheda-piramide-m {
    justify-content: flex-end;
}
.scheda-piramide-bar {
    display: block;
    height: 14px;
    border-radius: 2px;
    flex-shrink: 0;
}
.scheda-piramide-m .scheda-piramide-bar { background: var(--scheda-male); }
.scheda-piramide-f .scheda-piramide-bar { background: var(--scheda-female); }
.scheda-piramide-val {
    font-size: .75rem;
    color: var(--scheda-muted);
    white-space: nowrap;
}
.scheda-piramide-eta {
    text-align: center;
    font-size: .8125rem;
    font-weight: 600;
    white-space: nowrap;
}
.scheda-piramide-riga:nth-child(5n+2) .scheda-piramide-eta {
    color: #1a1a1a;
}
.scheda-dettagli {
    margin: 0 0 24px;
}
.scheda-dettagli summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--scheda-primary);
    padding: 8px 0;
}
.scheda-dettagli[open] summary {
    margin-bottom: 8px;
}
.scheda-grafico-basso {
    height: 220px;
}
.scheda-neg { color: #c6262e; }
.scheda-pos { color: #007a52; }
.scheda-nota {
    font-size: .9375rem;
    margin: 12px 0 0;
}
@media (max-width: 575.98px) {
    .scheda-piramide-val { display: none; }
    .scheda-piramide-riga { grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr); height: 16px; }
    .scheda-piramide-bar { height: 11px; }
}

/* Progetti PNRR */
.scheda-pnrr {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.scheda-pnrr-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid var(--scheda-line);
    border-left: 4px solid var(--scheda-secondary);
    border-radius: 4px;
}
.scheda-pnrr-item.is-comune {
    border-left-color: var(--scheda-primary);
    background: var(--scheda-soft-bg);
}
.scheda-pnrr-testo {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.scheda-pnrr-missione {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--scheda-muted);
    font-weight: 600;
}
.scheda-pnrr-titolo {
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.3;
}
.scheda-pnrr-sotto {
    font-size: .9375rem;
}
.scheda-pnrr-meta {
    font-size: .8125rem;
}
.scheda-pnrr-dati {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    white-space: nowrap;
}
.scheda-pnrr-importo {
    font-size: 1.125rem;
    font-weight: 700;
}
.scheda-pnrr-quota {
    font-size: .75rem;
}
.scheda-pnrr-stato {
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--scheda-line);
    color: #1a1a1a;
}
.scheda-pnrr-stato.stato-concluso { background: #d4f1e3; color: #007a52; }
.scheda-pnrr-stato.stato-in-corso { background: #fff1cc; color: #7a5a00; }
.scheda-pnrr-stato.stato-da-attivare { background: var(--scheda-line); color: var(--scheda-muted); }
@media (max-width: 575.98px) {
    .scheda-pnrr-item { grid-template-columns: minmax(0, 1fr); }
    .scheda-pnrr-dati { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
}

/* Gare e aggiudicatari dentro i progetti PNRR */
.scheda-pnrr-item {
    grid-template-areas: "testo dati" "gare gare";
}
.scheda-pnrr-testo { grid-area: testo; }
.scheda-pnrr-dati { grid-area: dati; }
.scheda-gare {
    grid-area: gare;
    margin-top: 4px;
    border-top: 1px dashed var(--scheda-line);
    padding-top: 6px;
}
.scheda-gare summary {
    cursor: pointer;
    font-size: .875rem;
    font-weight: 600;
    color: var(--scheda-primary);
}
.scheda-gare-lista {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.scheda-gare-lista > li {
    padding: 8px 10px;
    background: #fff;
    border: 1px solid var(--scheda-line);
    border-radius: 4px;
}
.scheda-gara-testa {
    display: flex;
    gap: 10px;
    align-items: baseline;
    flex-wrap: wrap;
}
.scheda-gara-tipo {
    font-size: .6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--scheda-muted);
    border: 1px solid var(--scheda-line-strong);
    border-radius: 3px;
    padding: 1px 6px;
}
.scheda-gara-oggetto {
    flex: 1 1 240px;
    font-size: .9375rem;
    line-height: 1.35;
}
.scheda-gara-importo {
    font-weight: 700;
    white-space: nowrap;
}
.scheda-gara-meta {
    font-size: .8125rem;
    margin-top: 2px;
}
.scheda-gara-imprese {
    list-style: none;
    margin: 6px 0 0;
    padding: 6px 0 0 10px;
    border-left: 3px solid var(--scheda-primary);
    font-size: .9375rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.scheda-cf {
    font-size: .75rem;
}
.scheda-testo-piccolo {
    font-size: 1rem;
    margin-bottom: 16px;
}
@media (max-width: 575.98px) {
    .scheda-pnrr-item { grid-template-areas: "testo" "dati" "gare"; }
}

/* Rifiuti: barra differenziata con obiettivo e media, frazioni */
.scheda-rd-gauge {
    margin: 4px 0 28px;
    padding-top: 22px;
}
.scheda-rd-track {
    position: relative;
    height: 18px;
    background: var(--scheda-line);
    border-radius: 9px;
}
.scheda-rd-fill {
    height: 100%;
    background: #007a52;
    border-radius: 9px;
}
.scheda-rd-target,
.scheda-rd-media {
    position: absolute;
    top: -6px;
    bottom: -6px;
    width: 2px;
    background: #1a1a1a;
}
.scheda-rd-media {
    background: var(--scheda-muted);
    border-left: 2px dashed var(--scheda-muted);
    width: 0;
}
.scheda-rd-target span,
.scheda-rd-media span {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: .75rem;
    font-weight: 600;
    color: #1a1a1a;
}
.scheda-rd-media span {
    top: auto;
    bottom: -22px;
    color: var(--scheda-muted);
    font-weight: 400;
}
.scheda-barra-verde { background: #007a52 !important; }
.scheda-barra-grigio { background: #8a97a3 !important; }

/* Ambiente: qualita dell'aria (ARPA) e consumo di suolo (ISPRA/SNPA) */
.scheda-statbox-aria > div {
    padding-left: 12px;
    border-left: 4px solid var(--scheda-line);
}
.scheda-statbox-aria > div.is-ok { border-left-color: #007a52; }
.scheda-statbox-aria > div.is-warn { border-left-color: #d98b00; }
.scheda-statbox-aria > div.is-bad { border-left-color: #cc334d; }
.scheda-statbox-aria > div.is-bad .scheda-stat-value { color: #a3263c; }
.scheda-barre-compatte .scheda-barra-riga {
    grid-template-columns: 150px minmax(0, 1fr) 96px;
    padding: 2px 0;
}
.scheda-barre-compatte .scheda-barra-valore {
    white-space: nowrap;
}
@media (max-width: 575.98px) {
    .scheda-barre-compatte .scheda-barra-riga {
        grid-template-columns: minmax(0, 1fr) auto;
    }
}
.scheda-barre-compatte .scheda-barra-track,
.scheda-barre-compatte .scheda-barra-fill {
    height: 14px;
}
.scheda-barra-terra { background: #9a5b2b !important; }


/* Cruscotto "a colpo d'occhio": indice sintetico + indicatori */
.scheda-cruscotto {
    margin-top: 32px;
    padding: 24px;
    background: var(--scheda-soft-bg);
    border-radius: 4px;
}
.scheda-cruscotto-indice {
    display: flex;
    gap: 24px;
    align-items: center;
    margin-bottom: 24px;
}
.scheda-anello {
    --p: 0;
    --c: var(--scheda-primary);
    flex: 0 0 128px;
    width: 128px;
    height: 128px;
    border-radius: 50%;
    background: conic-gradient(var(--c) calc(var(--p) * 1%), #dfe6ee 0);
    display: grid;
    place-items: center;
}
.scheda-anello-interno {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.scheda-anello-valore {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--c);
}
.scheda-anello-sub {
    font-size: .8125rem;
    color: var(--scheda-muted);
    margin-top: 4px;
}
.scheda-anello.is-alto,
.scheda-cruscotto-lista li.is-alto { --c: #007a52; }
.scheda-anello.is-medio,
.scheda-cruscotto-lista li.is-medio { --c: #b36b00; }
.scheda-anello.is-basso,
.scheda-cruscotto-lista li.is-basso { --c: #cc334d; }
.scheda-cruscotto-testo h2 {
    margin: 0 0 8px;
}
.scheda-cruscotto-testo p {
    margin: 0;
    color: var(--scheda-muted);
    font-family: "Titillium Web", Geneva, Tahoma, sans-serif;
}
.scheda-cruscotto-lista {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.scheda-cruscotto-lista li {
    --c: var(--scheda-primary);
    background: #fff;
    border-radius: 4px;
    border-left: 4px solid var(--c);
    min-width: 0;
}
.scheda-cruscotto-lista a {
    display: block;
    padding: 12px 14px 14px;
    color: inherit;
    text-decoration: none;
}
.scheda-cruscotto-lista a:hover .scheda-cruscotto-label,
.scheda-cruscotto-lista a:focus .scheda-cruscotto-label {
    text-decoration: underline;
}
.scheda-cruscotto-testata {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}
.scheda-cruscotto-label {
    font-weight: 600;
    font-size: 1rem;
    color: #1a1a1a;
}
.scheda-cruscotto-score {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: var(--c);
    white-space: nowrap;
}
.scheda-cruscotto-score small {
    font-size: .75rem;
    font-weight: 400;
    color: var(--scheda-muted);
}
.scheda-cruscotto-bar {
    display: block;
    height: 6px;
    margin: 8px 0;
    background: #e6ecf2;
    border-radius: 3px;
    overflow: hidden;
}
.scheda-cruscotto-bar i {
    display: block;
    height: 100%;
    background: var(--c);
    border-radius: 3px;
}
.scheda-cruscotto-valore {
    display: block;
    font-size: .9375rem;
    color: #1a1a1a;
}
.scheda-cruscotto-pos {
    display: block;
    font-size: .8125rem;
    color: var(--scheda-muted);
    margin-top: 2px;
}
.scheda-cruscotto-metodo {
    margin-top: 16px;
}
.scheda-cruscotto-metodo p {
    font-size: .9375rem;
    color: var(--scheda-muted);
    margin: 8px 0 0;
}
@media (max-width: 575.98px) {
    .scheda-cruscotto {
        padding: 16px;
    }
    .scheda-cruscotto-indice {
        gap: 16px;
    }
    .scheda-anello {
        flex-basis: 96px;
        width: 96px;
        height: 96px;
    }
    .scheda-anello-interno {
        width: 74px;
        height: 74px;
    }
    .scheda-anello-valore {
        font-size: 1.75rem;
    }
    .scheda-cruscotto-lista {
        grid-template-columns: 1fr;
    }
}


/* Spesa e servizi (OpenCivitas): barre doppie storica/standard */
.scheda-sottotitolo {
    margin: 24px 0 8px;
}
.scheda-legenda {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 0 0 8px;
    font-family: "Titillium Web", Geneva, Tahoma, sans-serif;
    font-size: .875rem;
    color: var(--scheda-muted);
}
.scheda-legenda-colore {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    margin-right: 6px;
    vertical-align: -1px;
}
.scheda-barre-doppie .scheda-barra-riga {
    grid-template-columns: 190px minmax(0, 1fr) 150px;
    align-items: center;
}
.scheda-barre-doppie .scheda-barra-label small {
    display: block;
    font-size: .75rem;
    color: var(--scheda-muted);
}
.scheda-barra-tracks {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.scheda-barre-doppie .scheda-barra-track {
    height: 10px;
}
.scheda-barra-grigia {
    background: #8a97a3;
}
.scheda-barre-doppie .scheda-barra-valore {
    white-space: nowrap;
}

/* Ricarica veicoli elettrici */
.scheda-lista-ricarica {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}
.scheda-lista-ricarica li {
    background: #fff;
    border: 1px solid #e6ecf2;
    border-radius: 4px;
    padding: 12px 14px;
    min-width: 0;
}
.scheda-ricarica-indirizzo {
    display: block;
    font-weight: 600;
}
.scheda-ricarica-cpo {
    display: block;
    font-size: .875rem;
    color: var(--scheda-muted);
}
.scheda-ricarica-dati {
    display: block;
    font-size: .9375rem;
    margin-top: 4px;
}
.scheda-pill-dc {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 8px;
    border-radius: 10px;
    background: #e8f1fb;
    color: #004d99;
    font-size: .75rem;
    font-weight: 600;
    vertical-align: 2px;
}
@media (max-width: 575.98px) {
    .scheda-barre-doppie .scheda-barra-riga {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

/* Cassa del Comune (SIOPE) */
.scheda-barra-arancio {
    background: #c2630a;
}

/* Header Primo Cittadino: link nella fascia slim, titolo con stemma, ricerca in modale */
.it-header-slim-wrapper .scheda-slim-link {
    color: #fff;
    font-size: .875rem;
    padding: 0 16px;
    align-items: center;
}
.it-header-slim-wrapper .scheda-slim-link:hover {
    text-decoration: underline;
}
.it-header-center-wrapper .it-search-wrapper button.search-link {
    border: 0;
    padding: 0;
    width: 48px;
    height: 48px;
    margin-left: 16px;
    border-radius: 50%;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.it-header-center-wrapper .it-search-wrapper button.search-link .icon {
    fill: var(--scheda-primary);
    width: 24px;
    height: 24px;
}
.it-header-center-wrapper .it-search-wrapper button.search-link:hover,
.it-header-center-wrapper .it-search-wrapper button.search-link:focus-visible {
    background: #e8f1fb;
}
@media (max-width: 991.98px) {
    .it-header-center-wrapper .it-search-wrapper button.search-link {
        margin-left: 0;
    }
}
.scheda-cerca-risultati .list-item {
    padding: 8px 0;
}
.scheda-cerca-risultati small {
    font-size: .8125rem;
}
@media (max-width: 575.98px) {
}

/* Classi di misura generate (al posto degli stili inline): larghezza, posizione e avanzamento anello */
.scheda-w-0{width:0%}.scheda-w-1{width:1%}.scheda-w-2{width:2%}.scheda-w-3{width:3%}.scheda-w-4{width:4%}.scheda-w-5{width:5%}.scheda-w-6{width:6%}.scheda-w-7{width:7%}.scheda-w-8{width:8%}.scheda-w-9{width:9%}.scheda-w-10{width:10%}.scheda-w-11{width:11%}.scheda-w-12{width:12%}.scheda-w-13{width:13%}.scheda-w-14{width:14%}.scheda-w-15{width:15%}.scheda-w-16{width:16%}.scheda-w-17{width:17%}.scheda-w-18{width:18%}.scheda-w-19{width:19%}.scheda-w-20{width:20%}.scheda-w-21{width:21%}.scheda-w-22{width:22%}.scheda-w-23{width:23%}.scheda-w-24{width:24%}.scheda-w-25{width:25%}.scheda-w-26{width:26%}.scheda-w-27{width:27%}.scheda-w-28{width:28%}.scheda-w-29{width:29%}.scheda-w-30{width:30%}.scheda-w-31{width:31%}.scheda-w-32{width:32%}.scheda-w-33{width:33%}.scheda-w-34{width:34%}.scheda-w-35{width:35%}.scheda-w-36{width:36%}.scheda-w-37{width:37%}.scheda-w-38{width:38%}.scheda-w-39{width:39%}.scheda-w-40{width:40%}.scheda-w-41{width:41%}.scheda-w-42{width:42%}.scheda-w-43{width:43%}.scheda-w-44{width:44%}.scheda-w-45{width:45%}.scheda-w-46{width:46%}.scheda-w-47{width:47%}.scheda-w-48{width:48%}.scheda-w-49{width:49%}.scheda-w-50{width:50%}.scheda-w-51{width:51%}.scheda-w-52{width:52%}.scheda-w-53{width:53%}.scheda-w-54{width:54%}.scheda-w-55{width:55%}.scheda-w-56{width:56%}.scheda-w-57{width:57%}.scheda-w-58{width:58%}.scheda-w-59{width:59%}.scheda-w-60{width:60%}.scheda-w-61{width:61%}.scheda-w-62{width:62%}.scheda-w-63{width:63%}.scheda-w-64{width:64%}.scheda-w-65{width:65%}.scheda-w-66{width:66%}.scheda-w-67{width:67%}.scheda-w-68{width:68%}.scheda-w-69{width:69%}.scheda-w-70{width:70%}.scheda-w-71{width:71%}.scheda-w-72{width:72%}.scheda-w-73{width:73%}.scheda-w-74{width:74%}.scheda-w-75{width:75%}.scheda-w-76{width:76%}.scheda-w-77{width:77%}.scheda-w-78{width:78%}.scheda-w-79{width:79%}.scheda-w-80{width:80%}.scheda-w-81{width:81%}.scheda-w-82{width:82%}.scheda-w-83{width:83%}.scheda-w-84{width:84%}.scheda-w-85{width:85%}.scheda-w-86{width:86%}.scheda-w-87{width:87%}.scheda-w-88{width:88%}.scheda-w-89{width:89%}.scheda-w-90{width:90%}.scheda-w-91{width:91%}.scheda-w-92{width:92%}.scheda-w-93{width:93%}.scheda-w-94{width:94%}.scheda-w-95{width:95%}.scheda-w-96{width:96%}.scheda-w-97{width:97%}.scheda-w-98{width:98%}.scheda-w-99{width:99%}.scheda-w-100{width:100%}
.scheda-left-0{left:0%}.scheda-left-1{left:1%}.scheda-left-2{left:2%}.scheda-left-3{left:3%}.scheda-left-4{left:4%}.scheda-left-5{left:5%}.scheda-left-6{left:6%}.scheda-left-7{left:7%}.scheda-left-8{left:8%}.scheda-left-9{left:9%}.scheda-left-10{left:10%}.scheda-left-11{left:11%}.scheda-left-12{left:12%}.scheda-left-13{left:13%}.scheda-left-14{left:14%}.scheda-left-15{left:15%}.scheda-left-16{left:16%}.scheda-left-17{left:17%}.scheda-left-18{left:18%}.scheda-left-19{left:19%}.scheda-left-20{left:20%}.scheda-left-21{left:21%}.scheda-left-22{left:22%}.scheda-left-23{left:23%}.scheda-left-24{left:24%}.scheda-left-25{left:25%}.scheda-left-26{left:26%}.scheda-left-27{left:27%}.scheda-left-28{left:28%}.scheda-left-29{left:29%}.scheda-left-30{left:30%}.scheda-left-31{left:31%}.scheda-left-32{left:32%}.scheda-left-33{left:33%}.scheda-left-34{left:34%}.scheda-left-35{left:35%}.scheda-left-36{left:36%}.scheda-left-37{left:37%}.scheda-left-38{left:38%}.scheda-left-39{left:39%}.scheda-left-40{left:40%}.scheda-left-41{left:41%}.scheda-left-42{left:42%}.scheda-left-43{left:43%}.scheda-left-44{left:44%}.scheda-left-45{left:45%}.scheda-left-46{left:46%}.scheda-left-47{left:47%}.scheda-left-48{left:48%}.scheda-left-49{left:49%}.scheda-left-50{left:50%}.scheda-left-51{left:51%}.scheda-left-52{left:52%}.scheda-left-53{left:53%}.scheda-left-54{left:54%}.scheda-left-55{left:55%}.scheda-left-56{left:56%}.scheda-left-57{left:57%}.scheda-left-58{left:58%}.scheda-left-59{left:59%}.scheda-left-60{left:60%}.scheda-left-61{left:61%}.scheda-left-62{left:62%}.scheda-left-63{left:63%}.scheda-left-64{left:64%}.scheda-left-65{left:65%}.scheda-left-66{left:66%}.scheda-left-67{left:67%}.scheda-left-68{left:68%}.scheda-left-69{left:69%}.scheda-left-70{left:70%}.scheda-left-71{left:71%}.scheda-left-72{left:72%}.scheda-left-73{left:73%}.scheda-left-74{left:74%}.scheda-left-75{left:75%}.scheda-left-76{left:76%}.scheda-left-77{left:77%}.scheda-left-78{left:78%}.scheda-left-79{left:79%}.scheda-left-80{left:80%}.scheda-left-81{left:81%}.scheda-left-82{left:82%}.scheda-left-83{left:83%}.scheda-left-84{left:84%}.scheda-left-85{left:85%}.scheda-left-86{left:86%}.scheda-left-87{left:87%}.scheda-left-88{left:88%}.scheda-left-89{left:89%}.scheda-left-90{left:90%}.scheda-left-91{left:91%}.scheda-left-92{left:92%}.scheda-left-93{left:93%}.scheda-left-94{left:94%}.scheda-left-95{left:95%}.scheda-left-96{left:96%}.scheda-left-97{left:97%}.scheda-left-98{left:98%}.scheda-left-99{left:99%}.scheda-left-100{left:100%}
.scheda-p-0{--p:0}.scheda-p-1{--p:1}.scheda-p-2{--p:2}.scheda-p-3{--p:3}.scheda-p-4{--p:4}.scheda-p-5{--p:5}.scheda-p-6{--p:6}.scheda-p-7{--p:7}.scheda-p-8{--p:8}.scheda-p-9{--p:9}.scheda-p-10{--p:10}.scheda-p-11{--p:11}.scheda-p-12{--p:12}.scheda-p-13{--p:13}.scheda-p-14{--p:14}.scheda-p-15{--p:15}.scheda-p-16{--p:16}.scheda-p-17{--p:17}.scheda-p-18{--p:18}.scheda-p-19{--p:19}.scheda-p-20{--p:20}.scheda-p-21{--p:21}.scheda-p-22{--p:22}.scheda-p-23{--p:23}.scheda-p-24{--p:24}.scheda-p-25{--p:25}.scheda-p-26{--p:26}.scheda-p-27{--p:27}.scheda-p-28{--p:28}.scheda-p-29{--p:29}.scheda-p-30{--p:30}.scheda-p-31{--p:31}.scheda-p-32{--p:32}.scheda-p-33{--p:33}.scheda-p-34{--p:34}.scheda-p-35{--p:35}.scheda-p-36{--p:36}.scheda-p-37{--p:37}.scheda-p-38{--p:38}.scheda-p-39{--p:39}.scheda-p-40{--p:40}.scheda-p-41{--p:41}.scheda-p-42{--p:42}.scheda-p-43{--p:43}.scheda-p-44{--p:44}.scheda-p-45{--p:45}.scheda-p-46{--p:46}.scheda-p-47{--p:47}.scheda-p-48{--p:48}.scheda-p-49{--p:49}.scheda-p-50{--p:50}.scheda-p-51{--p:51}.scheda-p-52{--p:52}.scheda-p-53{--p:53}.scheda-p-54{--p:54}.scheda-p-55{--p:55}.scheda-p-56{--p:56}.scheda-p-57{--p:57}.scheda-p-58{--p:58}.scheda-p-59{--p:59}.scheda-p-60{--p:60}.scheda-p-61{--p:61}.scheda-p-62{--p:62}.scheda-p-63{--p:63}.scheda-p-64{--p:64}.scheda-p-65{--p:65}.scheda-p-66{--p:66}.scheda-p-67{--p:67}.scheda-p-68{--p:68}.scheda-p-69{--p:69}.scheda-p-70{--p:70}.scheda-p-71{--p:71}.scheda-p-72{--p:72}.scheda-p-73{--p:73}.scheda-p-74{--p:74}.scheda-p-75{--p:75}.scheda-p-76{--p:76}.scheda-p-77{--p:77}.scheda-p-78{--p:78}.scheda-p-79{--p:79}.scheda-p-80{--p:80}.scheda-p-81{--p:81}.scheda-p-82{--p:82}.scheda-p-83{--p:83}.scheda-p-84{--p:84}.scheda-p-85{--p:85}.scheda-p-86{--p:86}.scheda-p-87{--p:87}.scheda-p-88{--p:88}.scheda-p-89{--p:89}.scheda-p-90{--p:90}.scheda-p-91{--p:91}.scheda-p-92{--p:92}.scheda-p-93{--p:93}.scheda-p-94{--p:94}.scheda-p-95{--p:95}.scheda-p-96{--p:96}.scheda-p-97{--p:97}.scheda-p-98{--p:98}.scheda-p-99{--p:99}.scheda-p-100{--p:100}

/* Barre a segmenti: la larghezza viene dalle classi .scheda-w-N */
.scheda-composizione-magg,
.scheda-composizione-min,
.scheda-genere-bar .scheda-genere-m,
.scheda-genere-bar .scheda-genere-f {
    flex: 0 1 auto;
    min-width: 2px;
}
.scheda-legenda-storica { background: var(--scheda-primary); }
.scheda-legenda-standard { background: #8a97a3; }
.scheda-img-nascosta { visibility: hidden; }

/* Allineamento unico: header, menu e contenuto sullo stesso bordo del container */
.it-header-slim-wrapper,
.it-header-center-wrapper,
.it-header-slim-wrapper .it-header-slim-wrapper-content,
.it-header-center-wrapper .it-header-center-content-wrapper {
    padding-left: 0;
    padding-right: 0;
}
.it-header-wrapper .it-nav-wrapper .it-header-navbar-wrapper nav.navbar {
    padding-left: 0;
    padding-right: 0;
}
@media (min-width: 992px) {
    .it-header-navbar-wrapper .navbar .navbar-collapsable .menu-wrapper .navbar-nav:first-child {
        margin-left: -24px;
    }
    .it-header-navbar-wrapper .navbar .navbar-collapsable .menu-wrapper .navbar-nav.navbar-secondary {
        margin-right: -24px;
    }
}

/* Indice sintetico accanto al titolo (al posto dell'ultimo aggiornamento) */
.scheda-sintesi {
    background: #fff;
    padding: 0;
}
.scheda-titolo-indice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    text-decoration: none;
    color: inherit;
}
.scheda-titolo-indice:hover .scheda-titolo-indice-link,
.scheda-titolo-indice:focus-visible .scheda-titolo-indice-link {
    text-decoration: underline;
}
.scheda-titolo-indice-testo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    font-family: "Titillium Web", Geneva, Tahoma, sans-serif;
    line-height: 1.3;
}
.scheda-titolo-indice-label {
    font-weight: 600;
    color: #1a1a1a;
}
.scheda-titolo-indice-livello {
    color: var(--scheda-muted);
    font-size: .9375rem;
}
.scheda-titolo-indice-link {
    margin-top: 4px;
    font-size: .875rem;
    font-weight: 600;
    color: var(--scheda-primary);
}
.scheda-titolo-indice .scheda-anello {
    flex: 0 0 76px;
    width: 76px;
    height: 76px;
}
.scheda-titolo-indice .scheda-anello-interno {
    width: 58px;
    height: 58px;
}
.scheda-titolo-indice .scheda-anello-valore {
    font-size: 1.5rem;
}
.scheda-titolo-indice .scheda-anello-sub {
    font-size: .75rem;
    margin-top: 2px;
}
.scheda-sintesi-dati {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
    margin: 12px 0 0;
    padding-top: 10px;
    border-top: 1px solid var(--scheda-line);
}
.scheda-sintesi-dati > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2px;
}
.scheda-sintesi-dati dd {
    order: 1;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--scheda-primary);
}
.scheda-sintesi-dati dt {
    order: 2;
    font-size: .75rem;
    font-weight: 400;
    color: var(--scheda-muted);
}

/* Aree della scheda: 5 rimandi con icona al posto dei dati chiave */
.scheda-aree ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    border-top: 1px solid var(--scheda-line-strong);
    border-bottom: 1px solid var(--scheda-line-strong);
}
.scheda-aree a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 12px 20px 0;
    text-decoration: none;
    color: inherit;
}
.scheda-aree a:hover .scheda-area-titolo,
.scheda-aree a:focus-visible .scheda-area-titolo {
    text-decoration: underline;
}
.scheda-area-icona {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--scheda-soft-bg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.scheda-area-icona .icon {
    width: 24px;
    height: 24px;
    fill: var(--scheda-primary);
}
.scheda-area-testo {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.scheda-area-titolo {
    font-weight: 600;
    color: var(--scheda-primary);
}
.scheda-area-sub {
    font-size: .8125rem;
    color: var(--scheda-muted);
    font-family: "Titillium Web", Geneva, Tahoma, sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (min-width: 992px) {
    .scheda-aree ul {
        grid-template-columns: repeat(5, 1fr);
    }
}
@media (min-width: 992px) and (max-width: 1299.98px) {
    .scheda-area-sub {
        font-size: .75rem;
    }
}
.scheda-cruscotto-indice {
    margin-bottom: 16px;
}
@media (max-width: 991.98px) {
    .scheda-sintesi {
        margin-top: 8px;
        padding: 16px;
    }
    .scheda-aree a {
        padding: 14px 12px 14px 0;
    }
}



/* ============================================================================
   SCHEDA COMUNE NEL LAYOUT NUOVO (comune.asp): niente Bootstrap Italia.
   Sopra: regole della scheda (copiate da scheda-agid.css, parte "scheda").
   Qui: colori del sito, componenti Bootstrap usati dentro le sezioni,
   blocchi apribili. Tutto dentro .pc-scheda per non toccare il resto.
   ============================================================================ */
:root{--scheda-primary:#004d99;--scheda-primary-dark:#003366}
.pc-scheda .visually-hidden{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.pc-scheda .text-end{text-align:right}
.pc-scheda .text-center{text-align:center}
.pc-scheda .font-monospace{font-family:var(--pc-mono)}
.pc-scheda .fw-bold{font-weight:700}
.pc-scheda .fw-normal{font-weight:400}
.pc-scheda .d-none{display:none}
.pc-scheda .h4{font-size:1.25rem;font-weight:700}
.pc-scheda .h5{font-size:1.125rem;font-weight:700}
.pc-scheda .h6{font-size:1rem;font-weight:700}
.pc-scheda .row{display:flex;flex-wrap:wrap;margin-left:-12px;margin-right:-12px;row-gap:24px}
.pc-scheda .row > *{padding-left:12px;padding-right:12px;width:100%;flex:0 0 auto}
@media (min-width:768px){ .pc-scheda .col-md-4{width:33.3333%} .pc-scheda .col-md-6{width:50%} }
@media (min-width:992px){ .pc-scheda .col-lg-4{width:33.3333%} .pc-scheda .col-lg-6{width:50%} .pc-scheda .col-lg-8{width:66.6667%} }
.pc-scheda .h-100{height:100%}
.pc-scheda .card{background:#fff;border-radius:var(--pc-radius);box-shadow:var(--pc-shadow);height:100%}
.pc-scheda .card-body{padding:var(--pc-s6);display:flex;flex-direction:column;gap:var(--pc-s2)}
.pc-scheda .card-title{font-size:1.125rem;font-weight:700;margin:0}
.pc-scheda .card-text{margin:0}
.pc-scheda .category{font-size:var(--pc-fs-xs);font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--pc-text-muted)}
.pc-scheda .table-responsive{overflow-x:auto}
.pc-scheda .table{width:100%;border-collapse:collapse;font-size:var(--pc-fs-small)}
.pc-scheda .table th,.pc-scheda .table td{padding:10px 12px;border-bottom:1px solid var(--pc-border-light);text-align:left;vertical-align:top}
.pc-scheda .table th{font-size:var(--pc-fs-xs);text-transform:uppercase;letter-spacing:.04em;color:var(--pc-text-muted);border-bottom:2px solid var(--pc-text)}
.pc-scheda .table .text-end,.pc-scheda .table th.text-end{text-align:right}
.pc-scheda .table-sm th,.pc-scheda .table-sm td{padding:8px 10px}
.pc-scheda .btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 22px;border-radius:var(--pc-radius);border:2px solid var(--pc-primary);font-weight:600;text-decoration:none}
.pc-scheda .btn-primary{background:var(--pc-primary);color:#fff}
.pc-scheda .btn-outline-primary{background:transparent;color:var(--pc-primary)}
.pc-scheda .icon{width:24px;height:24px;fill:currentColor;vertical-align:middle}
.pc-scheda .icon-sm{width:20px;height:20px}
.pc-scheda .icon-xs{width:16px;height:16px}
.pc-scheda .icon-primary{fill:var(--pc-primary)}
.pc-scheda .link-list{list-style:none;margin:0;padding:0}
.pc-scheda .link-list .list-item{display:block;padding:8px 0;border-bottom:1px solid var(--pc-border-light)}
.pc-scheda .badge{display:inline-block;padding:2px 10px;border-radius:999px;font-size:var(--pc-fs-xs);font-weight:600;border:1px solid currentColor}
.pc-scheda .shadow,.pc-scheda .shadow-sm{box-shadow:var(--pc-shadow)}
.pc-scheda .rounded{border-radius:var(--pc-radius)}
.pc-scheda .scheda-sezione{scroll-margin-top:24px}
.pc-scheda .pc-ind-sezione .scheda-testo{margin:0}
/* niente bordi colorati a sinistra (styleguide) */
.pc-scheda .scheda-cruscotto-lista li{border-left:0;box-shadow:var(--pc-shadow)}
.pc-scheda .scheda-statbox-aria > div{border-left:0;box-shadow:var(--pc-shadow)}
.pc-scheda .scheda-pnrr-item,.pc-scheda .scheda-pnrr-item.is-comune{border-left:1px solid var(--scheda-line)}
.pc-scheda .scheda-cruscotto{background:none;padding:0}
.pc-kpi__value small{font-size:.5em;color:var(--pc-text-muted);font-weight:600}
.scheda-temi{list-style:none;margin:var(--pc-s6) 0 0;padding:0;grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr))}
.scheda-temi .pc-card__big{font-size:28px;line-height:1.15}
/* archivio amministrazioni nell'accordion del sito */
.scheda-storico-btn{display:flex;flex-wrap:wrap;gap:4px 14px;align-items:baseline;text-align:left}
.scheda-storico-corpo{padding:0 0 var(--pc-s5)}
/* blocchi apribili */
.pc-blocchi{display:flex;flex-direction:column}
.pc-blocco{border-top:1px solid var(--pc-border-light)}
.pc-blocco:last-child{border-bottom:1px solid var(--pc-border-light)}
.pc-blocco__testa{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 16px;padding:var(--pc-s4) 0;cursor:pointer;list-style:none}
.pc-blocco__testa::-webkit-details-marker{display:none}
.pc-blocco__titolo{font-size:var(--pc-fs-h3);font-weight:700;color:var(--pc-primary)}
.pc-blocco__titolo::before{content:"+";display:inline-block;width:1.4em;font-weight:400}
.pc-blocco[open] .pc-blocco__titolo::before{content:"\2212"}
.pc-blocco__testa:hover .pc-blocco__titolo{text-decoration:underline}
.pc-blocco__meta{font-size:var(--pc-fs-small);color:var(--pc-text-muted)}
.pc-blocco__corpo{display:flex;flex-direction:column;gap:var(--pc-s5);padding:0 0 var(--pc-s7)}
.pc-blocco__corpo > *{margin-top:0;margin-bottom:0}
.pc-scheda .card-teaser{display:flex;flex-direction:row;gap:24px}
.pc-scheda .card-teaser .card-body{padding:0}
.pc-scheda .card-teaser .card-title{font-size:1.25rem}
.pc-scheda .scheda-card-sindaco .card-title{font-size:1.75rem}
.pc-scheda .chip{display:inline-flex;align-self:flex-start;align-items:center;padding:2px 12px;border:1px solid var(--pc-primary);border-radius:999px;color:var(--pc-primary);font-size:var(--pc-fs-xs);font-weight:600}
.scheda-temi li:first-child .pc-card__big{font-size:22px}
@media (max-width:575px){ .pc-scheda .card-teaser{flex-direction:column} }
.pc-scheda .table tbody th{border-bottom:1px solid var(--pc-border-light);font-size:inherit;text-transform:none;letter-spacing:0;color:var(--pc-text);font-weight:700}
.pc-scheda .scheda-storico-btn{justify-content:flex-start}
.pc-scheda .scheda-storico-btn .scheda-storico-anni{min-width:8em}
.pc-scheda .scheda-storico-btn > span:last-of-type{margin-right:auto}
.scheda-head-indice{min-width:0;align-self:center}
.pc-page-head .pc-page-head__main{flex:1 1 560px;max-width:880px}
.scheda-temi .pc-card__title{font-size:19px;overflow-wrap:anywhere}
.scheda-temi{align-items:stretch}
.scheda-temi > li{display:flex}
.scheda-temi > li > .pc-card{flex:1 1 auto;width:100%}

/* Mappa dei servizi (Leaflet, solo cerchi colorati: nessuna immagine esterna oltre alle tessere OSM) */
.scheda-mappa{height:480px;border-radius:var(--pc-radius);box-shadow:var(--pc-shadow);overflow:hidden;background:var(--pc-bg-soft);position:relative;z-index:0}
.scheda-mappa__attesa{margin:0;padding:var(--pc-s6);color:var(--pc-text-muted)}
/* barra sopra la mappa: menu a tendina "Cosa mostrare" + pulsante "Vista strada" */
.scheda-mappa__barra{display:flex;flex-wrap:wrap;align-items:flex-start;gap:8px 12px;margin:0 0 12px;position:relative;z-index:2}
.scheda-mappa__menu{position:relative;flex:0 1 auto;min-width:0;max-width:100%}
.scheda-mappa__apri,.scheda-mappa__strada{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:8px 14px;border:1px solid var(--pc-border);border-radius:6px;background:#fff;color:var(--pc-text);font:inherit;font-size:var(--pc-fs-small);cursor:pointer;max-width:100%}
.scheda-mappa__apri:hover,.scheda-mappa__strada:hover{border-color:var(--pc-primary)}
.scheda-mappa__apri:focus-visible,.scheda-mappa__strada:focus-visible,.scheda-mappa__azione:focus-visible,.scheda-mappa__filtro input:focus-visible{outline:3px solid var(--pc-focus);outline-offset:2px}
.scheda-mappa__apri-testo{font-weight:700}
.scheda-mappa__stato{color:var(--pc-text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.scheda-mappa__freccia{flex:none;transition:transform .15s}
.scheda-mappa__apri[aria-expanded="true"] .scheda-mappa__freccia{transform:rotate(180deg)}
.scheda-mappa__strada[aria-pressed="true"]{background:var(--pc-primary);border-color:var(--pc-primary);color:#fff;font-weight:700}
.scheda-mappa__pannello{position:absolute;left:0;top:calc(100% + 6px);width:min(560px,calc(100vw - 32px));max-height:min(420px,70vh);overflow:auto;padding:12px;background:#fff;border:1px solid var(--pc-border);border-radius:8px;box-shadow:0 8px 24px rgba(0,0,0,.18)}
.scheda-mappa__pannello[hidden]{display:none}
.scheda-mappa__tutti{display:flex;gap:8px;margin:0 0 8px;padding:0 0 8px;border-bottom:1px solid var(--pc-border-light)}
.scheda-mappa__azione{padding:6px 10px;border:1px solid var(--pc-border);border-radius:4px;background:var(--pc-bg-soft);color:var(--pc-primary);font:inherit;font-size:var(--pc-fs-small);cursor:pointer}
.scheda-mappa__azione:hover{border-color:var(--pc-primary)}
.scheda-mappa__filtri{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 12px}
.scheda-mappa__filtro{display:flex;align-items:center;gap:8px;min-height:40px;padding:4px 6px;border-radius:4px;font-size:var(--pc-fs-small);cursor:pointer}
.scheda-mappa__filtro:hover{background:var(--pc-bg-soft)}
.scheda-mappa__filtro input{flex:none;width:18px;height:18px;margin:0;accent-color:var(--pc-primary)}
.scheda-mappa__filtro .scheda-mappa__punto{flex:none}
.scheda-mappa__filtro b{font-weight:400;min-width:0}
.scheda-mappa__filtro span{margin-left:auto;color:var(--pc-text-muted)}
.scheda-mappa__aiuto{margin:0 0 8px;font-size:var(--pc-fs-small);color:var(--pc-text-muted)}
.scheda-mappa__aiuto:empty{display:none}
.scheda-mappa--strada,.scheda-mappa--strada .leaflet-interactive{cursor:crosshair}
.scheda-mappa--strada{outline:3px solid var(--pc-primary);outline-offset:-3px}
/* sfondo stradale: OpenStreetMap con colori piu' tenui, per far risaltare strade e punti */
.scheda-mappa__strade{filter:saturate(.55) brightness(1.04) contrast(1.02)}
.scheda-mappa__tipo{display:flex;align-items:center;gap:6px;margin:0 0 2px;font-size:12px;color:var(--pc-text-muted)}
.scheda-mappa__tipo .scheda-mappa__punto{width:10px;height:10px;border-width:1px}
.scheda-mappa__sv{display:inline-block;margin-top:6px;font-weight:700}
.scheda-mappa__punto--sic{background:#5e60ce}
.scheda-mappa__punto--sport{background:#ff7f11}
.scheda-mappa__punto--comm{background:#ff5d8f}
.scheda-mappa__punto--porto{background:#3a86ff}
.scheda-mappa__punto--infr{background:#6b6b6b}
@media (max-width:575px){ .scheda-mappa__filtri{grid-template-columns:1fr} .scheda-mappa__menu{flex:1 1 100%} .scheda-mappa__apri{width:100%} .scheda-mappa__stato{margin-left:auto} }
.scheda-mappa__punto{display:inline-block;width:14px;height:14px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1px rgba(0,0,0,.25)}
.scheda-mappa__punto--carb{background:#004d99}
.scheda-mappa__punto--ric{background:#0b7a4b}
.scheda-mappa__punto--farm{background:#c1272d}
.scheda-mappa__punto--osp{background:#6d3fa0}
.scheda-mappa__punto--scuola{background:#0a7c8c}
.scheda-mappa__punto--posta{background:#c27c00}
.scheda-mappa__punto--staz{background:#3d4a55}
.scheda-mappa__punto--bibl{background:#8a4b1f}
.scheda-mappa__punto--banca{background:#b5179e}
.scheda-mappa__punto--inpost{background:#f2b705}
.scheda-mappa .leaflet-popup-content{font-family:inherit;font-size:14px;line-height:1.45}
@media (max-width:575px){ .scheda-mappa{height:360px} }

/* colonna sinistra: indice + contatti del Comune */
.scheda-lato{gap:var(--pc-s7)}
.scheda-lato__indice{display:flex;flex-direction:column;gap:var(--pc-s3)}
.scheda-lato__contatti{display:flex;flex-direction:column;gap:var(--pc-s3)}
.scheda-lato__lista{list-style:none;margin:0;padding:0}
.scheda-lato__lista li{display:flex;flex-direction:column;gap:2px;padding:10px 0;border-bottom:1px solid var(--pc-border-light);font-size:var(--pc-fs-small);overflow-wrap:anywhere}
.scheda-lato__label{font-size:var(--pc-fs-xs);font-weight:700;color:var(--pc-text-muted);text-transform:uppercase;letter-spacing:.04em}
@media (max-height:860px){ .scheda-lato{position:static} }
.pc-scheda .scheda-stat-value--testo{font-size:1.25rem;line-height:1.3}
.pc-scheda .scheda-lista-filiali{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr));gap:var(--pc-s3) var(--pc-s6)}
.pc-scheda .scheda-lista-filiali li{display:flex;flex-direction:column;gap:2px;padding:var(--pc-s2) 0;border-bottom:1px solid var(--pc-border-light)}

/* Beni confiscati: filtri, ricerca e paginazione della tabella immobili (assets/pc/beni-confiscati.js) */
.bc-filtri { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between; margin: .5rem 0 .75rem; }
.bc-filtri__stati { display: flex; flex-wrap: wrap; gap: .4rem; }
.bc-cerca { flex: 1 1 14rem; max-width: 22rem; margin: 0; }
.bc-conteggio { margin: 0 0 .25rem; font-size: .875rem; }
.bc-vetrina { display: inline-block; margin-top: .2rem; padding: 0 .45rem; border-radius: .25rem; background: #fff4d6; color: #6b4e00; font-size: .8125rem; white-space: nowrap; }
.bc-pager { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: .75rem 0 .25rem; }
.bc-pager__info { font-size: .875rem; color: #5d7083; }
.bc-tabella.is-caricamento tbody { opacity: .45; transition: opacity .15s; }
@media (max-width: 575.98px) { .bc-cerca { max-width: none; } }
.bc-tab { width: 100%; min-width: 46rem; }
.bc-tab thead th, .bc-tab tbody th { text-align: left; }
.bc-tab th, .bc-tab td { vertical-align: top; }
.bc-tab .bc-nome { min-width: 11rem; font-weight: 600; }
.bc-tab .bc-num, .bc-tab thead th.bc-num { text-align: right; white-space: nowrap; }
.bc-tab .bc-stato { min-width: 9.5rem; }
.sc-elenco.is-caricamento [data-sc-righe] { opacity: .45; transition: opacity .15s; }

/* A colpo d'occhio: indici di vivibilita' e di gestione del Comune */
.scheda-indice.is-alto { --c: #007a52; }
.scheda-indice.is-medio { --c: #b36b00; }
.scheda-indice.is-basso { --c: #cc334d; }
.scheda-indici { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; margin: 1rem 0 1.5rem; }
.scheda-indice { display: flex; flex-direction: column; gap: .25rem; padding: 1rem 1.25rem; border: 1px solid #d9dadb; border-left: .375rem solid var(--c, #0066cc); border-radius: .25rem; background: #fff; color: inherit; text-decoration: none; }
.scheda-indice:hover, .scheda-indice:focus-visible { background: #f5f8fb; }
.scheda-indice__label { font-weight: 600; text-transform: uppercase; letter-spacing: .03em; font-size: .875rem; color: #5d7083; }
.scheda-indice__valore { font-size: 2.5rem; font-weight: 700; line-height: 1.1; color: var(--c, #0066cc); }
.scheda-indice__valore small { font-size: 1rem; font-weight: 400; color: #5d7083; margin-left: .15rem; }
.scheda-indice__pos { font-weight: 600; }
.scheda-indice__nota { font-size: .875rem; color: #5d7083; }
.scheda-indici__titolo { margin-top: 1.5rem; scroll-margin-top: 6rem; }
/* Mobile: testo minimo 12px, parole lunghe a capo, target touch almeno 32-44px */
.scheda-gara-tipo { font-size: .75rem; }
.scheda-gara-oggetto { overflow-wrap: anywhere; min-width: 0; }
@media (max-width: 767.98px) {
    .scheda-impianto-nome { display: inline-block; padding: .2rem 0; }
    .pc-scheda .form-control-sm { min-height: 2.5rem; font-size: 1rem; }
    .pc-scheda input[type="checkbox"], .pc-scheda input[type="radio"] { width: 1.25rem; height: 1.25rem; }
}
/* Mobile scheda comune (03/11/2026): meno scroll, contenuto prima dei contatti */
@media (max-width: 767.98px) {
    .scheda-temi { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .scheda-temi .pc-card { padding: 14px; }
    .scheda-temi .pc-card__title { font-size: 16px; }
    .scheda-temi .pc-card__big, .scheda-temi li:first-child .pc-card__big { font-size: 20px; }
    .scheda-temi .pc-card__text { font-size: 13px; line-height: 1.35; }
    .pc-scheda.pc-with-index { gap: var(--pc-s6); }
    .pc-scheda .scheda-lato { display: contents; }
    .pc-scheda .scheda-lato__indice { flex: 1 1 100%; }
    .pc-scheda .scheda-lato__indice .pc-index__progress { display: none; }
    .pc-scheda .scheda-lato__indice .pc-index__list { display: flex; flex-wrap: wrap; gap: 8px; }
    .pc-scheda .scheda-lato__indice .pc-index__link { padding: 8px 14px; border: 1px solid var(--pc-border); border-radius: 999px; font-size: 15px; }
    .pc-scheda .scheda-lato__contatti { flex: 1 1 100%; order: 2; }
    .pc-scheda .scheda-card-persona.card-teaser { flex-direction: row; align-items: flex-start; gap: 14px; padding: 14px; }
    .pc-scheda .scheda-card-persona .scheda-avatar { width: 44px; height: 44px; flex: 0 0 44px; font-size: 1rem; }
    .pc-scheda .scheda-card-persona .card-title { font-size: 1.0625rem; margin-bottom: 2px; }
    .pc-scheda .scheda-card-persona .card-text { font-size: .9375rem; margin-bottom: 0; }
    .pc-scheda .row.g-4 { --bs-gutter-y: 12px; row-gap: 12px; }
}
/* Contatti nella colonna laterale: testo piu' piccolo, link senza sottolineatura (sottolineati al passaggio) */
.scheda-lato__lista li{font-size:.875rem}
.scheda-lato__lista a{text-decoration:none}
.scheda-lato__lista a:hover,.scheda-lato__lista a:focus-visible{text-decoration:underline}

/* Mobile: nei titoli delle sezioni niente sottotitolo (si accavalla al titolo) */
@media (max-width: 767.98px) { .pc-blocco__meta { display: none; } }

/* Indice di vivibilita' in testata: anello centrato, testo sotto; piu' grande su desktop */
.pc-page-head__meta.scheda-head-indice { align-items: center; justify-content: center; }
.pc-page-head__meta.scheda-head-indice .scheda-titolo-indice { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 0; text-align: center; }
.scheda-head-indice .scheda-titolo-indice-testo { align-items: center; text-align: center; }
@media (min-width: 768px) {
    .scheda-head-indice .scheda-titolo-indice .scheda-anello { flex: 0 0 120px; width: 120px; height: 120px; }
    .scheda-head-indice .scheda-titolo-indice .scheda-anello-interno { width: 92px; height: 92px; }
    .scheda-head-indice .scheda-titolo-indice .scheda-anello-valore { font-size: 2.5rem; line-height: 1; }
    .scheda-head-indice .scheda-titolo-indice .scheda-anello-sub { font-size: .875rem; margin-top: 4px; }
    .scheda-head-indice .scheda-titolo-indice-label { font-size: 1.125rem; }
}@media (max-width: 767.98px) { .pc-page-head__meta.scheda-head-indice { width: 100%; flex: 1 1 100%; } }

/* Ultime notizie (Google News, assets/pc/notizie.js) */
.scheda-notizie__colonne { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 24px 40px; }
.scheda-notizie__gruppo { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.scheda-notizie__gruppo[hidden] { display: none; }
.scheda-notizie__titolo { font-size: 1.125rem; font-weight: 700; margin: 0; }
.scheda-notizie__lista { list-style: none; margin: 0; padding: 0; }
.scheda-notizie__lista li { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--scheda-line); }
.scheda-notizie__lista a { font-weight: 600; text-decoration: none; line-height: 1.35; overflow-wrap: anywhere; }
.scheda-notizie__lista a:hover, .scheda-notizie__lista a:focus-visible { text-decoration: underline; }
.scheda-notizie__meta { font-size: .875rem; color: var(--scheda-muted); }
.scheda-notizie__altre { font-size: .9375rem; font-weight: 600; }.scheda-notizie__colonne { gap: 24px; }
.scheda-notizie__lista li:last-child { border-bottom: 0; }
.scheda-notizie__altre { margin-top: auto; padding-top: 4px; }
/* Notizie dal sito del Comune: card a tutta larghezza sopra giornali e sindaco */
.scheda-notizie__gruppo--ufficiale { grid-column: 1 / -1; border-top: 4px solid var(--scheda-primary); }
.scheda-notizie__badge { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--pc-bg-soft, #eef3f8); color: var(--scheda-primary); font-size: .75rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; vertical-align: middle; }
/* Farmacie: servizi (Lombardia, Federfarma) e telefono nelle card */
.farm-servizi { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.farm-servizi li { padding: 2px 10px; border: 1px solid var(--scheda-line-strong, #c5cfda); border-radius: 999px; font-size: .8125rem; line-height: 1.5; color: var(--scheda-primary); background: #fff; }
.farm-tel { font-weight: 600; text-decoration: none; }
.farm-tel:hover, .farm-tel:focus-visible { text-decoration: underline; }.scheda-notizie__gruppo--intero { grid-column: 1 / -1; }

/* Consiglio senza lista del sindaco: liste in colonne, senza vuoti tra gruppi di lunghezza diversa */
.scheda-liste { columns: 2 22rem; column-gap: 24px; }
.scheda-liste__gruppo { break-inside: avoid; padding-bottom: 24px; }
.scheda-liste__gruppo .scheda-legenda { margin-top: 0; }

/* Salute: elenco delle strutture di ricovero oltre le prime 15 */
.scheda-altre { margin: 8px 0 24px; }
.scheda-altre > summary { cursor: pointer; font-weight: 600; color: var(--scheda-primary); padding: 8px 0; }
.scheda-altre > summary:hover, .scheda-altre > summary:focus-visible { text-decoration: underline; }

/* Voto da A a E nelle card delle aree e degli indicatori (IndVoto in agid-common.asp) */
.scheda-cruscotto-voto { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--c, #0066cc); color: #fff; font-size: 1rem; font-weight: 700; line-height: 1; }
.scheda-cruscotto-testata .scheda-cruscotto-label { margin-right: auto; }
.scheda-cruscotto-testata:has(.scheda-cruscotto-voto) { align-items: center; }
.scheda-pagella__nota { font-size: .8125rem; color: #5d7083; margin: -.25rem 0 .75rem; }
.scheda-lato__confronta { margin: 24px 0; }
.scheda-lato__confronta .pc-btn { display: flex; width: 100%; justify-content: center; text-align: center; white-space: normal; }.scheda-lato__badge { margin: -12px 0 24px; font-size: .875rem; text-align: center; }

/* "Tutti i dati del comune" divisi in capitoli: indice in alto e titolo di capitolo prima dei suoi blocchi */
.pc-capitoli{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 8px}
.pc-capitoli a{border:1px solid var(--pc-primary,#0066cc);border-radius:999px;padding:4px 14px;font-size:.9375rem;font-weight:600;text-decoration:none;color:var(--pc-primary,#0066cc);background:#fff}
.pc-capitoli a:hover{background:#eef4fb}
.pc-capitoli a:focus-visible{outline:2px solid #ff9900;outline-offset:2px}
.pc-capitolo{margin:32px 0 10px;padding-bottom:6px;border-bottom:2px solid #17324d;font-size:1.25rem;font-weight:700;color:#17324d;scroll-margin-top:90px}

/* ---------- Curiosita' (riconoscimenti, mare, altitudine, clima, alba e tramonto, "Lo sapevi?") ---------- */
.scheda-bollini{list-style:none;display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 0;padding:0}
.scheda-bollino{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:4px 14px 4px 10px;font-size:.875rem;font-weight:700;text-decoration:none;border:2px solid currentColor;background:#fff}
.scheda-bollino::before{content:"";width:10px;height:10px;border-radius:50%;background:currentColor}
.scheda-bollino:hover{text-decoration:underline}
.scheda-bollino:focus-visible{outline:2px solid #ff9900;outline-offset:2px}
.scheda-bollino--bandiera-blu{color:#00539b}
.scheda-bollino--bandiera-arancione{color:#b54a00}
.scheda-bollino--borghi-belli{color:#7a2e5c}
.scheda-cur-griglia{margin-bottom:16px}
.scheda-cur{border-top:4px solid #17324d}
.scheda-cur--bandiera-blu{border-top-color:#00539b}
.scheda-cur--bandiera-arancione{border-top-color:#d9661f}
.scheda-cur--borghi-belli{border-top-color:#7a2e5c}
.scheda-cur__etichetta{margin:0 0 4px;font-size:.8125rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:#5c6f82}
.scheda-cur__big{margin:0 0 8px;font-size:1.625rem;font-weight:700;line-height:1.15;color:#17324d}
.scheda-cur__titolo{margin:0 0 8px;font-size:1.25rem;font-weight:700;color:#17324d}
.scheda-cur__lista{margin:0;padding-left:20px}
.scheda-cur__lista li{margin:0 0 6px}
.scheda-reti{margin:0;padding-left:20px}
.scheda-reti li{margin:0 0 8px}
.scheda-reti__nota{color:#5c6f82}
.scheda-reti__desc{font-size:.875rem;color:#5c6f82}
.scheda-cur__fonte{margin:8px 0 0;font-size:.8125rem;color:#5c6f82}
.scheda-cur[hidden]{display:none}
.scheda-cur__nota{margin-top:8px;font-size:.875rem;color:#5c6f82}
@media (min-width:768px){ .scheda-lista-persone--colonne{columns:2;column-gap:32px} .scheda-lista-persone--colonne li{break-inside:avoid} }
.scheda-curiosita .scheda-cur__titolo{margin-top:24px}
.scheda-nati{list-style:none;margin:0 0 8px;padding:0;display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(min(100%,280px),1fr))}
.scheda-nati__item{display:flex;gap:12px;align-items:flex-start}
.scheda-nati__foto{flex:0 0 64px;width:64px;height:64px;border-radius:50%;overflow:hidden;background:#e6ecf2;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:1.5rem;color:#17324d;text-decoration:none}
.scheda-nati__foto img{width:64px;height:64px;object-fit:cover;object-position:top}
.scheda-nati__testo{display:flex;flex-direction:column;gap:2px;min-width:0}
.scheda-nati__nome{font-weight:700}
.scheda-nati__desc{font-size:.875rem;color:#5c6f82}
.scheda-film{margin:0 0 8px;padding-left:20px;columns:2;column-gap:32px}
.scheda-film li{break-inside:avoid;margin:0 0 4px}
@media (max-width:767px){ .scheda-film{columns:1} }
/* Badge per il sito del Comune nella colonna laterale: anteprima del bollino + invito */
.scheda-lato__badge-img{display:block;margin:0 auto 6px;max-width:300px}
.scheda-lato__badge-img img{display:block;width:100%;height:auto}
.scheda-lato__badge-link{font-weight:600}
/* Mobile: indice della pagina, "Confronta" e badge centrati */
@media (max-width: 767.98px) {
    .pc-scheda .scheda-lato__indice .pc-index__title { text-align: center; }
    .pc-scheda .scheda-lato__indice .pc-index__list { justify-content: center; }
    .pc-scheda .scheda-lato__confronta { flex: 1 1 100%; display: flex; justify-content: center; }
    .pc-scheda .scheda-lato__confronta .pc-btn { width: auto; }
    .pc-scheda .scheda-lato__badge { flex: 1 1 100%; display: flex; flex-direction: column; align-items: center; text-align: center; }
}

/* Scheda: "Vai a un altro comune" in cima alla colonna laterale (suggerimenti da pc-footer.asp) */
.scheda-lato__cerca{position:relative;display:flex;flex-direction:column;gap:6px}
.scheda-lato__cerca-label{font-size:var(--pc-fs-small);font-weight:700}
.scheda-lato__cerca-campo{display:flex;border:2px solid var(--pc-text-muted);border-radius:var(--pc-radius);background:#fff;overflow:hidden}
.scheda-lato__cerca-campo:focus-within{border-color:var(--pc-primary)}
.scheda-lato__cerca-campo input{flex:1;min-width:0;min-height:44px;border:0;padding:0 var(--pc-s3);font:inherit;font-size:var(--pc-fs-base);color:var(--pc-text);background:transparent;outline:none}
.scheda-lato__cerca-campo button{flex:0 0 44px;display:flex;align-items:center;justify-content:center;border:0;background:var(--pc-primary);color:#fff;cursor:pointer}
.scheda-lato__cerca-campo button:hover,.scheda-lato__cerca-campo button:focus-visible{background:var(--pc-primary-dark,#003366)}
.scheda-lato__cerca .pc-search__results{top:100%;margin-top:4px}
.scheda-lato__cerca .pc-search__results a{flex-direction:column;gap:2px}
.scheda-lato__cerca .pc-search__results span{text-align:left}
@media (max-width: 767.98px) {
    .pc-scheda .scheda-lato__cerca { flex: 1 1 100%; }
}
/* PNRR: filtro per stato, gruppi per missione, imprese */
.scheda-pnrr-filtro{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 16px}
.scheda-pnrr-filtro__btn{border:1px solid var(--scheda-primary);background:#fff;color:var(--scheda-primary);border-radius:999px;padding:6px 16px;font-weight:600;cursor:pointer}
.scheda-pnrr-filtro__btn[aria-pressed="true"]{background:var(--scheda-primary);color:#fff}
.scheda-pnrr-filtro__btn[aria-pressed="true"] .scheda-muted{color:#fff}
.scheda-pnrr-filtro__btn:focus-visible{outline:2px solid #ff9900;outline-offset:2px}
.scheda-pnrr-gruppo{border:1px solid #d9e1e8;border-radius:6px;margin:0 0 12px;background:#fff}
.scheda-pnrr-gruppo[hidden]{display:none}
.scheda-pnrr-gruppo__testa{display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 16px;padding:12px 16px;cursor:pointer;font-size:1.0625rem}
.scheda-pnrr-gruppo__testa .scheda-muted{font-size:.875rem}
.scheda-pnrr-gruppo[open] .scheda-pnrr-gruppo__testa{border-bottom:1px solid #d9e1e8}
.scheda-pnrr-gruppo .scheda-pnrr{padding:0 16px;margin:0}
.scheda-pnrr-gruppo .scheda-nota{padding:0 16px 12px;margin:0}
.scheda-pnrr-item[hidden]{display:none}
.scheda-pnrr-spiega{background:#f2f6fa;border-left:4px solid var(--scheda-primary);border-radius:4px;padding:16px 20px;margin:0 0 20px}
.scheda-pnrr-spiega p{margin:0 0 10px}
.scheda-pnrr-spiega p:last-child{margin:0}
/* Mappa della scheda: musei e cultura, ambasciate e consolati, fiere (comune-cfe-dati.asp) */
.scheda-mappa__punto--cult{background:#00a3cc}
.scheda-mappa__punto--rapp{background:#111111}
.scheda-mappa__punto--fiera{background:#7cb518}
/* Card Musei e cultura, Fiere, Ambasciate e consolati (Includes/comune-card-*.asp) */
.scheda-cfe-lista th .scheda-muted{font-weight:400}
/* Card Giustizia e punto sulla mappa (Includes/comune-card-giustizia.asp) */
.scheda-mappa__punto--giust{background:#16a6b6}
.scheda-giu{list-style:none;margin:0 0 20px;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:12px}
.scheda-giu__ufficio{display:flex;flex-direction:column;gap:4px;padding:12px 16px;border:1px solid #d9e1e8;border-radius:6px;background:#fff;min-width:0}
.scheda-giu__nome{font-weight:700;overflow-wrap:anywhere}
.scheda-giu__riga{font-size:.9375rem;overflow-wrap:anywhere}
.scheda-giu__riga.scheda-muted{font-size:.875rem}
/* Contatti: codice fiscale, codice univoco per la fattura elettronica (IPA), social ufficiali */
.scheda-contatti-griglia > .scheda-contatti-largo {
    grid-column: 1 / -1;
}
.scheda-codice {
    font-family: 'Roboto Mono', ui-monospace, monospace;
    font-weight: 600;
    letter-spacing: .04em;
}
.scheda-cuu__nota {
    display: block;
    font-size: .9375rem;
    font-weight: 400;
    color: var(--scheda-muted);
}
.scheda-cuu {
    margin-top: 8px;
}
.scheda-cuu summary {
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--pc-primary, #004d99);
}
.scheda-cuu__lista {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 6px 24px;
    font-size: 1rem;
    font-weight: 400;
}
.scheda-cuu__lista .scheda-codice {
    display: inline-block;
    min-width: 6.5em;
}
.scheda-social {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
}

/* =====================================================================
   TABELLE DELLA SCHEDA (21/11/2026)
   Computer: le intestazioni vanno a capo (mai piu' tabelle che escono a destra), i numeri restano su una riga.
   Telefono: le tabelle con 4+ colonne diventano schede (classe tab-pila ed etichette data-label da tabelle.js).
   ===================================================================== */
.pc-scheda .table thead th,.pc-scheda .pc-table thead th{white-space:normal;vertical-align:bottom;line-height:1.3}
.pt-tab thead th.pt-num{white-space:normal}
.pc-scheda thead th small{display:block;font-weight:400;color:var(--pc-text-muted);font-size:var(--pc-fs-xs)}
.pc-scheda .table td.text-end,.pc-scheda .table td.font-monospace{white-space:nowrap}
@media (max-width:600px){
    .tab-pila thead{display:none}
    .tab-pila.bc-tab,.tab-pila .bc-nome,.tab-pila .bc-stato{min-width:0}
    .pc-scheda .table:not(.tab-pila) th,.pc-scheda .table:not(.tab-pila) td{padding:8px 6px}
    .tab-pila,.tab-pila tbody,.tab-pila tfoot,.tab-pila tr{display:block;width:100%}
    .tab-pila caption{display:block}
    .tab-pila tr{padding:10px 0;border-bottom:1px solid var(--pc-border-light)}
    .tab-pila tr[hidden]{display:none}
    .pc-scheda .tab-pila th,.pc-scheda .tab-pila td,.tab-pila th,.tab-pila td{display:flex;justify-content:space-between;align-items:baseline;gap:12px;
        border:0;padding:2px 0;text-align:right;white-space:normal;background:none}
    .pc-scheda .tab-pila tbody th,.pc-scheda .tab-pila tbody td{border:0}
    .tab-pila tr>:first-child{display:block;text-align:left;font-weight:700;font-size:var(--pc-fs-base);padding-bottom:4px}
    .tab-pila tr>:first-child small{display:block;font-weight:400}
    .tab-pila td[colspan]{display:block;text-align:left}
    .tab-pila td[data-label]::before,.tab-pila th[data-label]:not(:first-child)::before{content:attr(data-label);
        font-family:var(--pc-font);font-weight:400;font-size:var(--pc-fs-small);color:var(--pc-text-muted);text-align:left;
        text-transform:none;letter-spacing:0}
    .tab-pila .scheda-tabella-ultimo,.tab-pila tr.is-totale{background:var(--pc-bg-soft);padding-left:8px;padding-right:8px}
}