/* Questionario «Conviene a casa tua?» (/conviene): lo stesso file su casais.it e su santinomuto.it.
   Si regge da solo: bianco caldo #FAFAF5, nero, azzurro #13BBE8. Telefono prima di tutto. */

.cv-apre, .cv-fascia {
  --cv-a: #13BBE8; --cv-b: #FAFAF5; --cv-n: #000; --cv-riga: rgba(0, 0, 0, .22);
  --cv-molla: var(--facile, cubic-bezier(.2, .7, .2, 1));
  --cv-bordo: clamp(20px, 5vw, 44px);
  font-family: var(--sf, -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, "Segoe UI", "Helvetica Neue", Arial, sans-serif);
  color: var(--cv-n); background: var(--cv-b); letter-spacing: -.015em; line-height: 1.4;
}
.cv-apre *, .cv-fascia * { box-sizing: border-box; }
.cv-apre :is(h1, h2, h3, p, ul, ol, figure), .cv-fascia :is(h1, h2, h3, p, ul, ol, figure) { margin: 0; padding: 0; }
.cv-apre :is(ul, ol), .cv-fascia :is(ul, ol) { list-style: none; }
.cv-apre a, .cv-fascia a { color: inherit; }
.cv-largo { width: 100%; max-width: calc(1120px + var(--cv-bordo) * 2); margin-inline: auto; padding-inline: var(--cv-bordo); }

/* ---------- Apertura: la promessa e subito la prima domanda ---------- */
.cv-apre {
  position: relative; overflow: hidden; padding-block: clamp(22px, 5vw, 72px) clamp(48px, 8vw, 104px);
  background: radial-gradient(120% 70% at 50% 0%, rgba(19, 187, 232, .26), rgba(19, 187, 232, 0) 70%), var(--cv-b);
}
.cv-apre__griglia { display: grid; gap: clamp(18px, 3vw, 28px); }
.cv-apre__testo { text-align: center; }
.cv-occhiello { font-size: .98rem; font-weight: 700; letter-spacing: -.01em; }
.cv-h1 { margin-top: 8px !important; font-size: clamp(2.7rem, 12.4vw, 4.4rem); font-weight: 700; line-height: .98; letter-spacing: -.05em; text-wrap: balance; }
.cv-h1 span { color: var(--cv-a); }
.cv-promessa { margin: 14px auto 0 !important; max-width: 22em; font-size: clamp(1.1rem, 4.4vw, 1.4rem); font-weight: 500; line-height: 1.3; letter-spacing: -.02em; text-wrap: balance; }
.cv-firma { display: flex; align-items: center; gap: 14px; text-align: left; font-size: 1rem; font-weight: 500; line-height: 1.3; }
.cv-firma img { width: 56px; height: 56px; flex: none; border-radius: 50%; object-fit: cover; background: var(--cv-a); box-shadow: 0 0 0 3px var(--cv-b), 0 8px 20px -8px rgba(0, 0, 0, .4); }
.cv-firma b { display: block; font-size: 1.08rem; font-weight: 700; letter-spacing: -.02em; }
.cv-firma--pc { display: none; }
.cv-firma--tel { justify-content: center; margin-top: 6px !important; }

@media (min-width: 900px) {
  .cv-apre__griglia { grid-template-columns: minmax(0, 1fr) minmax(0, 540px); align-items: start; gap: clamp(36px, 5vw, 72px); }
  .cv-apre__testo { text-align: left; padding-top: clamp(20px, 4vw, 56px); }
  .cv-h1 { font-size: clamp(4.4rem, 8vw, 7rem); }
  .cv-promessa { margin-inline: 0 !important; margin-top: 22px !important; font-size: clamp(1.4rem, 2vw, 1.75rem); }
  .cv-occhiello { font-size: 1.1rem; }
  .cv-firma--pc { display: flex; margin-top: 34px !important; font-size: 1.08rem; }
  .cv-firma--pc img { width: 72px; height: 72px; }
  .cv-firma--tel { display: none; }
}

/* ---------- La scheda ---------- */
.cv-scheda {
  width: 100%; max-width: 540px; margin-inline: auto; padding: clamp(18px, 4.6vw, 34px); border-radius: 28px;
  background: var(--cv-b); box-shadow: 0 0 0 1px rgba(0, 0, 0, .08), 0 30px 60px -34px rgba(0, 0, 0, .4);
  scroll-margin-top: calc(var(--nav-l, 56px) + 12px);
}
.cv-testa { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 12px; margin-bottom: clamp(16px, 4vw, 24px); }
.cv-testa[hidden] { display: none; }
.cv-passo { grid-column: 2; grid-row: 1; font-size: .92rem; font-weight: 700; letter-spacing: -.01em; }
.cv-indietro {
  grid-column: 1; grid-row: 1; justify-self: start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin: -10px 0 -10px -6px; padding: 0 10px 0 6px;
  border: 0; border-radius: 12px; background: transparent; color: var(--cv-n); font: inherit; font-size: .95rem; font-weight: 600; cursor: pointer;
}
.cv-indietro::before { content: ""; width: 9px; height: 9px; border: solid currentColor; border-width: 0 0 2.2px 2.2px; transform: rotate(45deg); margin-left: 4px; }
.cv-indietro[hidden] { display: inline-flex; visibility: hidden; }
.cv-barra { grid-column: 1 / -1; height: 6px; border-radius: 6px; background: rgba(0, 0, 0, .1); overflow: hidden; }
.cv-barra i { display: block; height: 100%; width: 25%; border-radius: 6px; background: var(--cv-a); transition: width .5s var(--cv-molla); }

#cvForm { min-height: 21.5rem; display: flex; flex-direction: column; }
.cv-step { flex: 1; }
.cv-step[hidden] { display: none; }
.cv-step.on { animation: cv-entra .4s var(--cv-molla) both; }
@keyframes cv-entra { from { opacity: 0; transform: translateX(18px); } }
.cv-step--centro { text-align: center; padding-block: clamp(6px, 2vw, 16px); }
.cv-titolo { font-size: clamp(1.8rem, 7.4vw, 2.4rem); font-weight: 700; line-height: 1.05; letter-spacing: -.04em; text-wrap: balance; }
.cv-titolo:focus { outline: none; }
.cv-sotto { margin-top: 10px !important; font-size: 1.08rem; font-weight: 500; line-height: 1.35; text-wrap: pretty; }
.cv-step--centro .cv-sotto { margin-inline: auto !important; max-width: 24em; }
.cv-nota { margin-top: 14px !important; font-size: .95rem; font-weight: 600; }

/* Risposte a tocco: grandi, una sotto l'altra */
.cv-opzioni { display: grid; gap: 10px; margin-top: clamp(16px, 4vw, 22px); }
.cv-opz {
  position: relative; display: flex; align-items: center; width: 100%; min-height: 60px; padding: 10px 48px 10px 20px; border: 0; border-radius: 18px;
  background: var(--cv-b); box-shadow: inset 0 0 0 1.5px var(--cv-riga); color: var(--cv-n); text-align: left;
  font: inherit; font-size: 1.12rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; cursor: pointer;
  transition: background-color .18s, box-shadow .18s, transform .18s var(--cv-molla);
  -webkit-tap-highlight-color: transparent;
}
.cv-opz::after {
  content: ""; position: absolute; right: 22px; top: 50%; width: 9px; height: 9px; margin-top: -5px;
  border: solid currentColor; border-width: 2.2px 2.2px 0 0; transform: rotate(45deg); transition: transform .18s var(--cv-molla);
}
.cv-opz:active { transform: scale(.97); }
.cv-opz[aria-pressed="true"] { background: var(--cv-a); box-shadow: inset 0 0 0 1.5px var(--cv-a); }
.cv-opz:focus-visible, .cv-btn:focus-visible, .cv-indietro:focus-visible, .cv-finisco:focus-visible, .cv-chip button:focus-visible { outline: 2.5px solid var(--cv-n); outline-offset: 2px; }
@media (hover: hover) {
  .cv-opz:hover { box-shadow: inset 0 0 0 2px var(--cv-n); }
  .cv-opz[aria-pressed="true"]:hover { box-shadow: inset 0 0 0 2px var(--cv-n); }
  .cv-opz:hover::after { transform: translateX(3px) rotate(45deg); }
}
/* Sette risposte: due colonne, così stanno tutte in uno schermo */
.cv-opzioni--2 { grid-template-columns: 1fr 1fr; }
.cv-opzioni--2 .cv-opz { padding: 10px 14px; min-height: 66px; font-size: 1.04rem; }
.cv-opzioni--2 .cv-opz::after { display: none; }
.cv-opzioni--2 .cv-opz:last-child:nth-child(odd) { grid-column: 1 / -1; min-height: 56px; justify-content: center; }
@media (min-width: 420px) { .cv-opzioni--2 .cv-opz { padding-inline: 18px; font-size: 1.1rem; } }

/* Bottoni */
.cv-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 0 26px; border: 0; border-radius: 999px;
  background: var(--cv-a); color: var(--cv-n) !important; font: inherit; font-size: 1.12rem; font-weight: 700; letter-spacing: -.02em; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform .15s var(--cv-molla), filter .15s, background-color .2s, box-shadow .2s; -webkit-tap-highlight-color: transparent;
}
.cv-btn:active { transform: scale(.97); }
.cv-btn[disabled] { opacity: .6; cursor: progress; }
.cv-btn--pieno { width: 100%; }
.cv-btn--bordo { background: transparent; box-shadow: inset 0 0 0 1.5px var(--cv-n); }
@media (hover: hover) { .cv-btn:hover { filter: brightness(.95); } .cv-btn--bordo:hover { background: var(--cv-a); box-shadow: inset 0 0 0 1.5px var(--cv-a); filter: none; } }
.cv-bottoni { display: grid; gap: 10px; margin-top: clamp(18px, 4vw, 24px); }
.cv-finisco { min-height: 44px; border: 0; background: transparent; color: var(--cv-n); font: inherit; font-size: 1rem; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }

/* Contatti */
.cv-campi { display: grid; gap: 14px; margin-top: clamp(16px, 4vw, 22px); }
.cv-campo { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cv-campo label { font-size: 1rem; font-weight: 700; letter-spacing: -.02em; }
.cv-campo input {
  width: 100%; min-height: 56px; padding: 13px 16px; border: 1.5px solid var(--cv-riga); border-radius: 16px;
  background: var(--cv-b); color: var(--cv-n); font: inherit; font-size: 1.125rem; font-weight: 500; letter-spacing: -.01em;
}
.cv-campo input:focus { outline: 2px solid var(--cv-a); outline-offset: 1px; border-color: var(--cv-a); }
.cv-campo input::placeholder { color: rgba(0, 0, 0, .45); }
.cv-campo.manca input { border-color: var(--cv-a); border-width: 2.5px; }
.cv-trappola { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cv-consenso { display: flex; gap: 12px; align-items: flex-start; margin: 18px 0; font-size: .9rem; line-height: 1.4; cursor: pointer; }
.cv-consenso input { width: 26px; height: 26px; flex: none; margin: 0; accent-color: var(--cv-a); }
.cv-consenso a { text-decoration: underline; text-underline-offset: 3px; }
.cv-consenso.manca span { text-decoration: underline; text-decoration-color: var(--cv-a); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.cv-avviso { margin-top: 14px !important; font-weight: 700; }
.cv-avviso:empty { display: none; }
.cv-avviso a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Bollette e foto (facoltative) ---------- */
.cv-carichi { display: grid; gap: 12px; margin-top: clamp(16px, 4vw, 22px); }
.cv-carica { padding: 16px; border-radius: 20px; box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, .14); }
.cv-carica.fatto { box-shadow: inset 0 0 0 2.5px var(--cv-a); }
.cv-carica__testa { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.cv-carica h3 { font-size: 1.12rem; font-weight: 700; letter-spacing: -.025em; line-height: 1.2; }
.cv-carica__stato { font-size: .92rem; font-weight: 700; }
.cv-carica.fatto .cv-carica__stato::before { content: ""; display: inline-block; width: 11px; height: 6px; margin: 0 7px 3px 0; border: solid var(--cv-a); border-width: 0 0 3px 3px; transform: rotate(-45deg); }
.cv-scegli { position: relative; margin-top: 12px; min-height: 52px; overflow: hidden; }
.cv-scegli[hidden] { display: none; }
.cv-scegli input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 0; }
.cv-scegli:focus-within { outline: 2.5px solid var(--cv-n); outline-offset: 2px; }
.cv-mini { display: flex; flex-wrap: wrap; gap: 10px; }
.cv-mini:not(:empty) { margin-top: 12px; }
.cv-pezzo { position: relative; width: 72px; height: 72px; border-radius: 14px; overflow: hidden; background: rgba(19, 187, 232, .16); display: grid; place-items: center; font-size: .82rem; font-weight: 700; }
.cv-pezzo img { width: 100%; height: 100%; object-fit: cover; }
.cv-pezzo button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: var(--cv-n); color: var(--cv-b); font-size: 16px; line-height: 1; cursor: pointer; }
.cv-pezzo button::after { content: ""; position: absolute; inset: -9px; }

.cv-carica--foto { margin-top: clamp(14px, 3.4vw, 20px); padding: 0 0 16px; overflow: hidden; }
.cv-carica--foto > :not(.cv-guida) { margin-inline: 16px; }
.cv-carica--foto .cv-scegli { width: calc(100% - 32px); }
.cv-dici { margin-top: 14px !important; font-size: 1.05rem; line-height: 1.35; }
.cv-carica--foto .cv-carica__stato:not(:empty) { margin-top: 10px; }

/* Guida illustrata: il riquadro azzurro mostra cosa inquadrare */
.cv-guida { position: relative; overflow: hidden; aspect-ratio: 320 / 200; margin: 0; background: rgba(19, 187, 232, .14); }
.cv-guida svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; }
.d-linea { fill: none; stroke: #000; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.d-riga { fill: none; stroke: #000; stroke-width: 2; stroke-linecap: round; opacity: .55; }
.d-carta { fill: #FAFAF5; stroke: #000; stroke-width: 3; stroke-linejoin: round; }
.d-azz { fill: #13BBE8; }
.d-bordo { stroke: #000; stroke-width: 3; stroke-linejoin: round; }
.d-tubo-n { fill: none; stroke: #000; stroke-width: 15; stroke-linejoin: round; }
.d-tubo-a { fill: none; stroke: #13BBE8; stroke-width: 9; stroke-linejoin: round; }
.d-testo { font: 700 12px var(--sf, Inter, sans-serif); letter-spacing: -.01em; fill: #000; }
.cv-mirino {
  position: absolute; left: var(--x1); top: var(--y1); width: var(--w1); height: var(--h1);
  border-radius: 12px; box-shadow: 0 0 0 3px #13BBE8, 0 0 0 999px rgba(250, 250, 245, .66);
}
.cv-mirino::before, .cv-mirino::after { content: ""; position: absolute; width: 18px; height: 18px; border: solid #000; }
.cv-mirino::before { left: 6px; top: 6px; border-width: 2.5px 0 0 2.5px; border-radius: 6px 0 0 0; }
.cv-mirino::after { right: 6px; bottom: 6px; border-width: 0 2.5px 2.5px 0; border-radius: 0 0 6px 0; }
.cv-esito {
  position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 0 12px;
  border-radius: 999px; font-size: .84rem; font-weight: 700; letter-spacing: -.01em; white-space: nowrap;
}
.cv-esito--no { background: #FAFAF5; box-shadow: inset 0 0 0 1.5px #000; opacity: 0; }
.cv-esito--si { background: #13BBE8; }
.cv-esito--si::before { content: ""; width: 11px; height: 6px; margin-top: -3px; border: solid #000; border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg); }
@media (prefers-reduced-motion: no-preference) {
  .cv-step.on .cv-mirino { animation: cv-mira 5.2s var(--cv-molla) infinite; }
  .cv-step.on .cv-esito--no { animation: cv-no 5.2s linear infinite; }
  .cv-step.on .cv-esito--si { animation: cv-si 5.2s linear infinite; }
}
@keyframes cv-mira {
  0%, 26% { left: var(--x0); top: var(--y0); width: var(--w0); height: var(--h0); box-shadow: 0 0 0 3px #000, 0 0 0 999px rgba(250, 250, 245, .66); }
  46%, 100% { left: var(--x1); top: var(--y1); width: var(--w1); height: var(--h1); box-shadow: 0 0 0 3px #13BBE8, 0 0 0 999px rgba(250, 250, 245, .66); }
}
@keyframes cv-no { 0%, 26% { opacity: 1; } 34%, 100% { opacity: 0; } }
@keyframes cv-si { 0%, 40% { opacity: 0; transform: translateY(6px); } 50%, 100% { opacity: 1; transform: none; } }

/* ---------- Ricevuto e fine ---------- */
.cv-spunta { width: 76px; height: 76px; margin: 4px auto 20px; border-radius: 50%; background: var(--cv-a); display: grid; place-items: center; animation: cv-pop .6s var(--cv-molla) both; }
.cv-spunta::before { content: ""; width: 31px; height: 16px; margin-top: -7px; border: solid #000; border-width: 0 0 5px 5px; border-radius: 2px; transform: rotate(-45deg); }
@keyframes cv-pop { from { transform: scale(.4); opacity: 0; } }
.cv-step--centro .cv-barra { max-width: 300px; margin: 22px auto 0; }
.cv-elenco { display: inline-grid; gap: 8px; margin: 18px auto 0 !important; text-align: left; font-weight: 600; }
.cv-elenco li { display: flex; gap: 10px; align-items: baseline; }
.cv-elenco li::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--cv-a); }
.cv-quando { margin-top: 24px; padding-top: 20px; border-top: 1.5px solid rgba(0, 0, 0, .1); }
.cv-quando p { font-size: 1.08rem; font-weight: 700; letter-spacing: -.02em; }
.cv-chip { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
.cv-chip button {
  min-height: 48px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; box-shadow: inset 0 0 0 1.5px var(--cv-riga);
  color: var(--cv-n); font: inherit; font-size: 1rem; font-weight: 600; cursor: pointer; transition: background-color .18s, box-shadow .18s;
}
.cv-chip button[aria-pressed="true"] { background: var(--cv-a); box-shadow: inset 0 0 0 1.5px var(--cv-a); }
.cv-wa { margin-top: 20px; }

/* ---------- Sotto: come funziona, chi ti chiama, domande ---------- */
.cv-fascia { padding-block: clamp(56px, 9vw, 112px); }
.cv-fascia + .cv-fascia:not(.cv-fascia--azzurra) { border-top: 1.5px solid rgba(0, 0, 0, .08); }
.cv-h2 { font-size: clamp(2.1rem, 6.4vw, 3.8rem); font-weight: 700; line-height: 1.02; letter-spacing: -.045em; text-wrap: balance; }
.cv-passi { display: grid; gap: 26px; margin-top: clamp(30px, 5vw, 56px) !important; counter-reset: cv; }
.cv-passi li { counter-increment: cv; padding-top: 18px; border-top: 2.5px solid var(--cv-n); }
.cv-passi li::before { content: counter(cv); display: block; font-size: clamp(3.2rem, 7vw, 4.6rem); font-weight: 700; line-height: 1; letter-spacing: -.05em; color: var(--cv-a); }
.cv-passi h3 { margin-top: 10px !important; font-size: 1.45rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.cv-passi p { margin-top: 6px !important; font-size: 1.1rem; font-weight: 500; line-height: 1.4; max-width: 24em; }
@media (min-width: 760px) { .cv-passi { grid-template-columns: repeat(3, 1fr); gap: 36px; } }

.cv-fascia--azzurra { background: var(--cv-a); }
.cv-chi { display: grid; gap: 24px; justify-items: start; }
.cv-chi img { width: 128px; height: 128px; border-radius: 50%; object-fit: cover; background: var(--cv-b); box-shadow: 0 0 0 5px var(--cv-b), 0 22px 40px -18px rgba(0, 0, 0, .5); }
.cv-chi p { margin-top: 16px !important; max-width: 34em; font-size: clamp(1.1rem, 1.8vw, 1.3rem); font-weight: 500; line-height: 1.4; text-wrap: pretty; }
.cv-chi__azioni { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin-top: 26px !important; }
.cv-fascia--azzurra .cv-btn { background: var(--cv-n); color: var(--cv-b) !important; }
.cv-freccia { font-size: 1.08rem; font-weight: 700; text-decoration: none; }
.cv-freccia::after { content: ""; display: inline-block; width: .48em; height: .48em; margin-left: .4em; border: solid currentColor; border-width: 2px 2px 0 0; transform: rotate(45deg) translateY(-1px); }
.cv-freccia:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (min-width: 760px) { .cv-chi { grid-template-columns: auto 1fr; align-items: center; gap: clamp(32px, 5vw, 64px); } .cv-chi img { width: 200px; height: 200px; } }

.cv-faq { max-width: 860px; margin-top: clamp(20px, 3vw, 36px); }
.cv-faq details { border-bottom: 1.5px solid rgba(0, 0, 0, .12); }
.cv-faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; font-size: clamp(1.12rem, 1.7vw, 1.3rem); font-weight: 700; letter-spacing: -.02em; cursor: pointer; }
.cv-faq summary::-webkit-details-marker { display: none; }
.cv-faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--cv-a); color: var(--cv-n); font-size: 1.4rem; font-weight: 500; line-height: 1; transition: transform .3s var(--cv-molla); }
.cv-faq details[open] summary::after { transform: rotate(45deg); }
.cv-faq summary:focus-visible { outline: 2.5px solid var(--cv-n); outline-offset: 4px; border-radius: 8px; }
.cv-faq details p { padding: 0 0 22px; max-width: 44em; font-size: 1.1rem; font-weight: 500; line-height: 1.45; }

@media (prefers-reduced-motion: reduce) {
  .cv-step.on, .cv-spunta { animation: none; }
  .cv-barra i, .cv-opz, .cv-btn { transition: none; }
}

/* La chat fissa lascia libero il questionario */
.chatsito { transition: opacity .3s, transform .3s; }
.cv-dentro .chatsito { opacity: 0; transform: translateY(12px); pointer-events: none; }
