/* Sondaggi Consulta — palette coerente con consulta-civica e cassetta */

.cs {
    max-width: 720px;
    margin: 1.5rem auto;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-family: 'Titillium Web', system-ui, sans-serif;
    color: #1a1a1a;
}
.cs--priorita {
    border-left: 4px solid #f59e0b;
}
.cs--sondaggio {
    border-left: 4px solid #0b4f9c;
}
.cs__eyebrow {
    font-size: .75rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: #0b4f9c;
    margin: 0 0 .25rem 0;
}
.cs--priorita .cs__eyebrow { color: #b45309; }

.cs__title {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.5rem;
    color: #0b1a33;
    margin: 0 0 .75rem 0;
}
.cs__domanda {
    color: #475569;
    font-size: 1rem;
    line-height: 1.5;
    margin: 0 0 1rem 0;
}
.cs__form { display: flex; flex-direction: column; gap: .65rem; }
.cs__opzione {
    display: grid;
    grid-template-columns: 24px 1fr auto;
    grid-template-rows: auto auto;
    gap: .3rem .6rem;
    align-items: center;
    padding: .75rem .9rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s;
}
.cs__opzione:hover { background: #f8fafc; }
.cs__opzione input[type="radio"] { margin: 0; grid-row: 1; grid-column: 1; }
.cs__opzione-label { grid-row: 1; grid-column: 2; font-weight: 600; color: #0b1a33; }
.cs__bar {
    grid-row: 2; grid-column: 1 / span 2;
    height: 8px;
    background: #f1f5f9;
    border-radius: 999px;
    overflow: hidden;
}
.cs__bar-fill {
    display: block;
    height: 100%;
    background: linear-gradient(to right, #0b4f9c, #2570c0);
    border-radius: 999px;
    transition: width .4s ease-out;
}
.cs--priorita .cs__bar-fill { background: linear-gradient(to right, #f59e0b, #fb923c); }
.cs__bar-perc {
    grid-row: 2; grid-column: 3;
    font-size: .85rem;
    color: #64748b;
    font-variant-numeric: tabular-nums;
}

.cs__submit {
    align-self: flex-start;
    margin-top: .5rem;
    background: #0b1a33;
    color: #fff;
    border: none;
    padding: .75rem 1.5rem;
    border-radius: 8px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.cs__submit:hover { background: #0b4f9c; }
.cs__submit:disabled { background: #94a3b8; cursor: not-allowed; }

.cs__totali, .cs__chiusura {
    font-size: .85rem;
    color: #64748b;
    margin: .5rem 0 0 0;
}

.cs__feedback { margin: .3rem 0 0 0; padding: 0; font-size: .9rem; }
.cs__feedback--ok { color: #166534; }
.cs__feedback--err { color: #991b1b; }

.cs--archivio { background: transparent; border: none; padding: 0; }
.cs__archivio-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
}
.cs__archivio-item h3 {
    font-family: 'Lora', Georgia, serif;
    margin: 0 0 .3rem 0;
    color: #0b1a33;
}
.cs__archivio-meta { color: #64748b; font-size: .85rem; margin: 0 0 .8rem 0; }
.cs__bars { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.cs__bars li {
    display: grid;
    grid-template-columns: 1fr 2fr 3.5rem;
    gap: .5rem;
    align-items: center;
    font-size: .9rem;
}
.cs__bars .cs__bar-label { color: #0b1a33; font-weight: 600; }
.cs__bars .cs__bar { grid-row: auto; grid-column: auto; }

.cs__empty {
    padding: 2rem;
    text-align: center;
    color: #94a3b8;
    background: #f8fafc;
    border-radius: 8px;
}

@media (max-width: 600px) {
    .cs { padding: 1.2rem; margin: 1rem; }
    .cs__title { font-size: 1.25rem; }
}
