/* Fulgen · stili delle sezioni scritte con i testi del sito (ottobre 2026), sopra quelli della pagina */

/* Titoli: quelli del copy sono più lunghi delle vecchie parole singole */
.titolone { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.4rem); line-height: 1.02; text-wrap: balance; }
.sez-testa .sottotitolo, .sottotitolo { margin: 12px 0 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.02rem, .95rem + .3vw, 1.2rem); line-height: 1.4; color: var(--ink-2); max-width: 46ch; }
.sez-testa > div .sottotitolo + p { margin-top: 0; }
.sez-testa-riga { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 18px; max-width: none; }

.apertura h1 { font-size: clamp(2.2rem, 1.2rem + 3.6vw, 4.1rem); line-height: 1.04; }
.sottotitolo-apertura { margin: -6px 0 22px; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.05rem, .98rem + .4vw, 1.3rem); line-height: 1.4; color: var(--ink-2); max-width: 46ch; }
.apertura .lead { margin-bottom: 14px; }
.apertura .lead-forte { font-weight: 500; color: var(--ink); margin-bottom: 30px; }

/* Come lavoro: cinque passi */
.processo { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.processo a { color: var(--head); font-weight: 500; text-underline-offset: 3px; }

/* A chi mi rivolgo */
.pubblico { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.riquadro { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 26px 24px; display: grid; gap: 10px; align-content: start; box-shadow: var(--shadow); }
.riquadro svg { width: 34px; height: 34px; color: var(--hl); }
.riquadro h3 { margin: 4px 0 0; font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; line-height: 1.3; color: var(--head); }
.riquadro p { margin: 0; color: var(--ink-2); font-size: .95rem; font-weight: 300; }

/* Materiali */
.tab-mat { min-width: 760px; }
.tab-mat td.critico { color: var(--ink-2); font-weight: 400; }
.mat-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; margin-top: 24px; padding: 22px 24px; border-radius: var(--r); background: var(--bg-alt); border: 1px solid var(--line); }
.mat-cta p { margin: 0; max-width: 60ch; color: var(--ink); font-weight: 400; }

/* Portfolio */
.slider-frecce { display: flex; gap: 10px; }
.freccia { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--head); cursor: pointer; }
.freccia:hover { border-color: var(--head); }
.freccia:disabled { opacity: .35; cursor: default; }
.freccia svg { width: 20px; height: 20px; }
.slider { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 32px) / 3); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding-bottom: 10px; scrollbar-width: thin; }
.slide { margin: 0; scroll-snap-align: start; display: grid; gap: 10px; }
.slide-foto { aspect-ratio: 4 / 3; border-radius: var(--r); overflow: hidden; }
.slide-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slide figcaption { font-family: var(--font-display); font-weight: 600; color: var(--head); font-size: .95rem; }
.segnaposto { display: grid; place-items: center; border: 1px dashed var(--line-strong); color: var(--ink-3); font-size: .9rem;
  background: repeating-linear-gradient(180deg, var(--surface-2) 0 18px, var(--surface) 18px 24px); }
.segnaposto span { background: var(--surface); padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); }

/* Chi sono */
.chi { grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); margin-top: 0; }
.chi p.valore { border-left: 3px solid var(--hl); padding-left: 16px; color: var(--ink); }
.ritratto { margin: 0; aspect-ratio: 4 / 5; border-radius: var(--r); }

/* Contatti: modulo */
.contatti h2 { margin-bottom: 24px; }
.modulo-contatti { background: var(--surface); color: var(--ink); border-radius: var(--r); padding: clamp(20px, 3vw, 30px); display: grid; gap: 14px; box-shadow: var(--shadow-forte); }
.modulo-contatti .grid-2 { gap: 14px; }
.etichetta-campo { font-size: .84rem; font-weight: 500; color: var(--ink-2); }
.etichetta-campo .opt { font-weight: 400; color: var(--ink-3); }
.allega { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-sm); cursor: pointer; color: var(--ink-2); font-size: .93rem; }
.allega:hover, .allega.sopra { border-color: var(--hl); background: var(--tint); }
.allega:focus-within { outline: 2px solid var(--hl); outline-offset: 2px; }
.allega input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.allega svg { width: 22px; height: 22px; color: var(--hl); flex: none; }
.allega b { color: var(--head); }
.file-scelti { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
.file-scelti li { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: .88rem; }
.file-scelti .nome { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-scelti .peso { color: var(--ink-3); font-size: .8rem; }
.file-scelti button { border: 0; background: none; cursor: pointer; color: var(--ink-3); font-size: 1.2rem; width: 30px; height: 30px; border-radius: 6px; }
.file-scelti button:hover { background: var(--surface-2); color: #B3261E; }
.trappola { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.modulo-contatti .btn { justify-self: start; }
.modulo-contatti .btn:disabled { opacity: .6; cursor: wait; }
.modulo-esito { margin: 0; min-height: 1.3em; font-size: .9rem; color: var(--head); }
.modulo-esito.errore { color: #B3261E; }
.modulo-contatti .field input.non-valido, .modulo-contatti .field textarea.non-valido { border-color: #B3261E; }

/* Piè di pagina: social */
.social { display: flex; gap: 10px; }
.social a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); color: #FFFFFF; }
.social a:hover { border-color: #FFFFFF; background: rgba(255, 255, 255, .08); }
.social a.da-collegare { opacity: .45; }
.social svg { width: 20px; height: 20px; }

@media (max-width: 1060px) {
  .processo li:nth-child(2)::after { display: block; }
  .processo li:nth-child(2n)::after { display: none; }
  .pubblico { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slider { grid-auto-columns: calc((100% - 16px) / 2); }
}
@media (max-width: 980px) {
  .chi { grid-template-columns: minmax(0, 1fr); }
  .ritratto { max-width: 360px; }
}
@media (max-width: 680px) {
  .pubblico { grid-template-columns: minmax(0, 1fr); }
  .slider { grid-auto-columns: 82%; }
  .modulo-contatti .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .modulo-contatti .btn { justify-self: stretch; }
  .mat-cta .btn { flex: 1 1 100%; }
}

/* Menu: sette voci su una riga */
.nav a { white-space: nowrap; }

/* Materiali sul telefono: una scheda per materiale invece della tabella da scorrere di lato */
@media (max-width: 680px) {
  .tab-scroll { overflow: visible; border: 0; background: none; box-shadow: none; }
  .tab-mat { min-width: 0; display: block; }
  .tab-mat thead { display: none; }
  .tab-mat tbody { display: grid; gap: 10px; }
  .tab-mat tr { display: grid; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
  .tab-mat td { display: block; padding: 0; border: 0; white-space: normal; }
  .tab-mat td:first-child { font-size: 1.05rem; }
  .tab-mat td[data-label]::before { content: attr(data-label) ": "; font-family: var(--font-display); font-weight: 700; font-size: .78rem; color: var(--ink-3); }
}

/* ---------- Tema chiaro con pochi colori (21/10): bianco, carta calda e Dark Turquoise; niente ciano ---------- */
:root {
  --bg: #FFFFFF; --bg-alt: #F7F4F1; --surface: #FFFFFF; --surface-2: #F7F4F1;
  --hl: #13505B; --tint: #EEF2F2; --tint-line: #13505B; --supporti: #8E989A;
}
/* Fasce alterne bianco / carta calda */
#servizi, #a-chi, #portfolio, #domande { background: #FFFFFF; }
.apertura, #come-lavoro, #materiali, #chi-sono, .contatti { background: #F7F4F1; }
.mat-cta { background: #FFFFFF; }

/* Apertura chiara */
.apertura { color: var(--ink); }
.apertura h1 { color: #13505B; }
.apertura .lead { color: var(--ink-2); }
.apertura-fatti { border-top-color: var(--line-strong); }
.apertura-fatti li { color: var(--ink-2); }
.apertura-fatti svg { color: #13505B; }
.segno svg.pittogramma { color: #13505B; }
.apertura .btn-bianco { background: #13505B; color: #FFFFFF; }
.apertura .btn-bianco:hover { background: #0D3C44; }
.apertura .btn-filo { color: #13505B; border-color: var(--line-strong); }
.apertura .btn-filo:hover { border-color: #13505B; background: transparent; }

/* Servizio in evidenza: come gli altri, senza fondo colorato */
.servizio.in-evidenza { background: var(--surface); border-color: var(--line); color: inherit; box-shadow: var(--shadow); }
.servizio.in-evidenza h3 { color: var(--head); }
.servizio.in-evidenza p { color: var(--ink-2); }
.servizio.in-evidenza svg { color: #13505B; }

/* Contatti chiari */
.contatti { color: var(--ink); }
.contatti h2 { color: #13505B; }
.contatti .nastro { color: #13505B; opacity: .06; }
.recapiti { background: #FFFFFF; border-color: var(--line); }
.recapiti li { border-bottom-color: var(--line); }
.recapiti svg { color: #13505B; }
.recapiti small { color: var(--ink-3); }
.recapiti a { color: var(--ink); }
.recapiti .mini { background: var(--surface-2); border-color: var(--line); color: var(--ink-2); }

/* Piè di pagina nel colore del logo */
.piede { background: #13505B; }

/* Schermi larghi: il contenuto si allarga invece di restare una colonna stretta al centro */
.wrap { max-width: 1640px; padding-inline: clamp(16px, 5vw, 88px); }

/* ---------- Preventivo (26/10): anteprima 2D, più file, quantità grande, esempio della qualità ---------- */
.stage canvas#anteprima2d { cursor: default; touch-action: auto; }

.elenco-file { border-top: 1px solid var(--line); padding: 14px 18px 16px; display: grid; gap: 10px; }
.elenco-testa { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.aggiungi { font-family: var(--font-display); font-weight: 700; font-size: .9rem; color: var(--head); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.lista-file { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.voce-file { position: relative; }
.voce-sel { width: 100%; display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 14px; align-items: center; text-align: left;
  padding: 8px 46px 8px 8px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--surface); cursor: pointer; font: inherit; color: var(--ink); }
.voce-sel:hover { border-color: var(--line-strong); }
.voce-file.attiva .voce-sel { border-color: #13505B; box-shadow: 0 0 0 3px rgba(19, 80, 91, .12); background: var(--tint); }
.voce-img { width: 72px; height: 54px; border-radius: 6px; background: var(--viewer-bg); display: grid; place-items: center; overflow: hidden; }
.voce-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.voce-formato { font-family: var(--font-display); font-weight: 800; font-size: .78rem; color: var(--ink-3); }
.voce-testo { display: grid; gap: 2px; min-width: 0; }
.voce-nome { font-family: var(--font-display); font-weight: 700; color: var(--head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voce-det { font-size: .82rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voce-qta { display: grid; justify-items: end; gap: 2px; white-space: nowrap; }
.voce-qta b { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--head); }
.voce-qta span { font-size: .82rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.voce-togli { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border: 0; border-radius: 6px;
  background: none; color: var(--ink-3); font-size: 1.25rem; cursor: pointer; }
.voce-togli:hover { background: var(--surface-2); color: #B3261E; }
.elenco-nota { margin: 0; font-size: .82rem; color: var(--ink-3); }

.scelte-file { display: grid; gap: 22px; padding: 18px; margin: 0 -4px; border: 1.5px solid #13505B; border-radius: var(--r); background: var(--surface); }
.scelte-file-testa { display: grid; gap: 2px; }
.scelte-file-testa strong { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; color: var(--head); overflow-wrap: anywhere; }
.scelte-file-testa .hint { font-size: .84rem; color: var(--ink-3); }

/* Quantità: ben visibile */
.stepper-grande { height: 64px; border-width: 2px; border-color: #13505B; border-radius: 12px; }
.stepper-grande button { width: 64px; font-size: 1.8rem; font-weight: 600; background: var(--surface-2); color: #13505B; }
.stepper-grande input { width: 110px; font-size: 2rem; color: #13505B; }
.quantita-grande .sconti-hint { margin-top: 8px; }

/* "Qualità" con il punto interrogativo e l'esempio a sfere */
legend .info-q { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid #13505B; background: var(--surface); color: #13505B;
  font-family: var(--font-display); font-weight: 800; font-size: .82rem; line-height: 1; cursor: pointer; padding: 0; align-self: center; }
legend .info-q:hover, legend .info-q[aria-expanded="true"] { background: #13505B; color: #FFFFFF; }
.pop-qualita { margin: 0 0 12px; padding: 16px 18px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface);
  box-shadow: var(--shadow-forte); display: grid; gap: 10px; }
.pop-testa { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pop-testa b { font-family: var(--font-display); color: var(--head); }
.pop-chiudi { border: 0; background: none; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--ink-3); width: 32px; height: 32px; border-radius: 6px; }
.pop-chiudi:hover { background: var(--surface-2); color: var(--ink); }
.pop-qualita p { margin: 0; font-size: .9rem; color: var(--ink-2); }
.pop-qualita .pop-nota { font-size: .78rem; color: var(--ink-3); }
.pop-sfere { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sfera { margin: 0; display: grid; justify-items: center; gap: 6px; text-align: center; padding: 10px 6px; border-radius: var(--r-sm); background: var(--bg-alt); }
.sfera svg { width: 100%; max-width: 110px; height: auto; }
.sfera figcaption { display: grid; gap: 1px; font-size: .8rem; color: var(--ink-2); }
.sfera figcaption b { font-family: var(--font-display); color: var(--head); font-size: .95rem; }
.sfera .nota { color: var(--ink-3); font-size: .74rem; }

@media (max-width: 680px) {
  .voce-sel { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 10px; }
  .voce-img { width: 56px; height: 42px; }
  .stepper-grande { width: 100%; }
  .stepper-grande input { flex: 1; width: auto; }
  .pop-sfere { gap: 6px; }
}

/* Chi sono: foto */
.ritratto { aspect-ratio: 3 / 4; overflow: hidden; background: var(--surface-2); }
.ritratto img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Piè di pagina: la nota finale al centro */
.piede .privacy { text-align: center; }

/* Preventivo: trascinando un file sulla pagina compare un velo su tutta la finestra */
.drop-pagina { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px;
  background: rgba(19, 80, 91, .78); pointer-events: none; }
.drop-pagina[hidden] { display: none; }
.drop-pagina-box { padding: 26px 34px; border: 2px dashed #FFFFFF; border-radius: 16px; color: #FFFFFF;
  font-family: var(--font-display); font-weight: 800; font-size: clamp(1.1rem, 1rem + 1vw, 1.6rem); text-align: center; }

/* Robustezza: tre scelte su una riga */
#grp-robustezza.seg-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- Preventivo, terzo giro (26/10) ---------- */

/* "Chi sei" e "Consegna" dentro il riquadro del prezzo */
.cg-sezione { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.cg-sezione fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.cg-sezione legend { margin-bottom: 8px; }
.cg-sezione legend .hint { display: none; }
.cg-sezione .seg label { padding: 8px 10px; }
.cg-sezione .switch { margin-top: 10px; }
/* Il riquadro del prezzo resta in vista mentre si scorre; se è più alto dello schermo scorre da solo */
/* La colonna del prezzo scorre con la pagina: niente barra di scorrimento sua */
#side-file { position: static; max-height: none; overflow: visible; }

/* Quantità: lo sconto a destra del contatore */
.q-riga { display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap; }
.q-riga .sconti-hint { margin: 0; font-family: var(--font-display); font-weight: 700; color: #13505B; }
.quantita-grande .sconti-hint { margin-top: 0; }

/* Animazioni dei selettori */
.seg label, .mat, .colore, .chip, .voce-sel, .stepper button, .info-q, .btn {
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease, transform .12s ease;
}
.seg label:active, .mat:active, .colore:active, .chip:active, .stepper button:active, .voce-sel:active { transform: scale(.97); }
.seg label.is-on, .mat.is-on, .colore.is-on, .chip.is-on { animation: scelta .28s ease; }
.colore .sw { transition: transform .18s ease; }
.colore.is-on .sw { transform: scale(1.12); }
.switch .track, .switch .track::after { transition: background-color .2s ease, transform .22s cubic-bezier(.3, 1.4, .5, 1); }
.switch input:checked + .track { background: #13505B; }
.stepper input.rimbalzo { animation: rimbalzo .28s ease; }
@keyframes scelta { 0% { transform: scale(.96); } 60% { transform: scale(1.02); } 100% { transform: scale(1); } }
@keyframes rimbalzo { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }

/* Spiegazioni con il "?": finestrella in primo piano sopra il punto interrogativo */
body > .pop-qualita { position: fixed; z-index: 70; margin: 0; max-height: calc(100vh - 24px); overflow: auto;
  opacity: 0; transform: translateY(6px) scale(.98); transform-origin: var(--freccia, 50%) 100%;
  transition: opacity .16s ease, transform .16s ease; overflow: visible; }
body > .pop-qualita.sotto { transform-origin: var(--freccia, 50%) 0; transform: translateY(-6px) scale(.98); }
body > .pop-qualita.aperta { opacity: 1; transform: none; }
body > .pop-qualita::after { content: ""; position: absolute; left: var(--freccia, 50%); bottom: -7px; width: 12px; height: 12px;
  margin-left: -6px; background: var(--surface); border-right: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); transform: rotate(45deg); }
body > .pop-qualita.sotto::after { bottom: auto; top: -7px; transform: rotate(225deg); }

/* Finestra "Invia la richiesta" */
.modale { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; }
.modale-sfondo { position: absolute; inset: 0; background: rgba(13, 34, 38, .55); opacity: 0; transition: opacity .22s ease; }
.modale-box { position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface);
  border-radius: 18px; padding: clamp(20px, 3vw, 28px); display: grid; gap: 14px; box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .45);
  opacity: 0; transform: translateY(18px) scale(.97); transition: opacity .22s ease, transform .26s cubic-bezier(.2, .9, .3, 1.15); }
.modale.aperta .modale-sfondo { opacity: 1; }
.modale.aperta .modale-box { opacity: 1; transform: none; }
.modale-testa { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.modale-testa h3 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; color: var(--head); }
.modale-riepilogo { margin: 0; padding: 10px 14px; border-radius: 10px; background: var(--bg-alt); color: var(--ink-2); font-size: .9rem; }
.modale-campi { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.modale-campi .full { grid-column: 1 / -1; }
.modale-campi .non-valido { border-color: #B3261E; }
.modale-invia { width: 100%; min-height: 50px; font-size: 1.02rem; }
.modale-esito { margin: 0; min-height: 1.2em; font-size: .9rem; color: var(--head); }
.modale-esito.errore { color: #B3261E; }
.modale-box.inviata > :not(.modale-fatto):not(.modale-testa) { display: none; }
.modale-fatto { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 18px 0 6px; }
.modale-fatto b { font-family: var(--font-display); font-size: 1.25rem; color: var(--head); }
.modale-fatto span { color: var(--ink-2); }
.modale-fatto .btn { margin-top: 8px; }
.spunta { width: 64px; height: 64px; border-radius: 50%; background: #13505B; position: relative; animation: scelta .35s ease; }
.spunta::after { content: ""; position: absolute; left: 23px; top: 16px; width: 14px; height: 26px; border: solid #FFFFFF; border-width: 0 4px 4px 0; transform: rotate(45deg); }
body.modale-aperta { overflow: hidden; }
body.modale-aperta .barra-mobile { display: none; }

@media (max-width: 680px) {
  .modale { place-items: end center; padding: 0; }
  .modale-box { width: 100%; border-radius: 18px 18px 0 0; max-height: 92vh; transform: translateY(40px); }
  .modale-campi { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .modale-box, .modale-sfondo, body > .pop-qualita { transition: none; }
  .seg label.is-on, .mat.is-on, .colore.is-on, .chip.is-on, .stepper input.rimbalzo, .spunta { animation: none; }
}

/* ---------- Quarto giro (26/10) ---------- */
/* "Totale*": l'asterisco porta alla nota sotto il riquadro del prezzo */
.cg-total .asterisco { color: inherit; text-decoration: none; margin-left: 1px; font-size: 1.1em; }
.cg-total .asterisco:hover { color: #13505B; }
.cg-nota:target { animation: evidenzia 1.6s ease; }
@keyframes evidenzia { 0%, 30% { background: #FFF4D6; } 100% { background: transparent; } }

/* Note sul pezzo, dentro le impostazioni del file */
.note-file textarea { min-height: 84px; }
.note-file textarea.non-valido { border-color: #B3261E; box-shadow: 0 0 0 3px rgba(179, 38, 30, .12); }

/* FAQ: il "+" che gira resta in sintonia con l'apertura animata */
.faq summary::after { transition: transform .24s cubic-bezier(.2, .8, .2, 1); }
.faq details.in-apertura summary::after { transform: rotate(45deg); }
.faq details { transition: border-color .2s ease, box-shadow .2s ease; }
.faq details[open] { border-color: var(--line-strong); box-shadow: var(--shadow); }

/* ---------- Prezzo esatto con lo slicer (28/10) ---------- */
.voce-qta .stato-prezzo { font-size: .7rem; font-family: var(--font-display); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.voce-qta .stato-prezzo.esatto { color: #13505B; }
.voce-qta .stato-prezzo.esatto::before { content: "✓ "; }
.voce-qta .stato-prezzo.calcolo { color: var(--ink-3); animation: pulsa 1.2s ease-in-out infinite; }
@keyframes pulsa { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .voce-qta .stato-prezzo.calcolo { animation: none; } }

/* ---------- Preventivo compatto (29/10): meno scorrimento, titoli delle impostazioni in evidenza ---------- */
.sez-preventivo { padding-block: clamp(28px, 4vw, 48px) clamp(40px, 5vw, 64px); }
.sez-preventivo .sez-testa { gap: 8px; margin-bottom: 18px; }
.sez-preventivo .titolone { font-size: clamp(1.9rem, 1.2rem + 2.2vw, 2.8rem); }
.sez-preventivo .modo { margin-bottom: 16px; }
/* Titoli delle impostazioni del file: grandi e nel colore del logo, non più piccoli e grigi */
.scelte-file { gap: 18px; }
.scelte-file legend { margin-bottom: 4px; align-items: center; }
.scelte-file legend .etichetta, .scelte-file .note-file > label {
  font-family: var(--font-display); font-weight: 800; font-size: 1.02rem; letter-spacing: 0; text-transform: none; color: #13505B;
}
.scelte-file .note-file > label .opt { font-family: var(--font-body); font-weight: 400; font-size: .84rem; color: var(--ink-3); }
.scelte-file .note-file textarea { min-height: 64px; }
.scelte-file .mat { padding: 9px 11px 10px; }
.scelte-file .mat-uso { font-size: .78rem; line-height: 1.35; }
.viewer-bottom { padding: 10px 18px; }
.drop-line { font-size: .84rem; }

@media (min-width: 1100px) {
  /* Titolo a sinistra, "Ho il file 3D / Ho il pezzo rotto" a destra sulla stessa riga */
  .sez-preventivo .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 32px; align-items: end; }
  .sez-preventivo .wrap > * { grid-column: 1 / -1; }
  .sez-preventivo .wrap > .sez-testa { grid-column: 1; margin-bottom: 20px; }
  .sez-preventivo .wrap > .modo { grid-column: 2; width: 460px; margin-bottom: 20px; }
}

/* ---------- Senza visore grande (29/10): anteprima 3D solo su richiesta, dal pulsantino "3D" ---------- */
.viewer-top[hidden] { display: none; }
.viewer .viewer-bottom { border-top: 0; justify-items: center; text-align: center; gap: 12px; margin: 14px 14px 0; padding: 22px 18px;
  border: 1.5px dashed var(--line-strong); border-radius: var(--r-sm); background: var(--bg-alt); }
.viewer .drop-line { max-width: 46ch; }
.voce-3d { position: absolute; left: 50px; bottom: 7px; min-width: 30px; height: 22px; padding: 0 6px; border: 1.5px solid #13505B; border-radius: 6px;
  background: #FFFFFF; color: #13505B; font-family: var(--font-display); font-weight: 800; font-size: .7rem; letter-spacing: .04em; cursor: pointer; }
.voce-3d:hover, .voce-3d:focus-visible { background: #13505B; color: #FFFFFF; }
@media (max-width: 680px) { .voce-3d { left: 36px; bottom: 5px; } }
.modale-3d .modale-box { width: min(880px, 100%); padding: 18px; display: grid; gap: 12px; }
.modale-3d .stage { aspect-ratio: 4 / 3; max-height: calc(100vh - 140px); border-radius: var(--r-sm); overflow: hidden; }
#modale-3d .modale-testa h3 { font-size: 1.1rem; overflow-wrap: anywhere; }
/* Riquadro del prezzo: resta solo "Pronto in", su una riga */
.cg-grid { grid-template-columns: 1fr; }
.cg-grid > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-right: 0 !important; }
/* Campi obbligatori con l'asterisco */
.obbl { color: #13505B; font-weight: 700; }
.nota-obbl { margin: 0; font-size: .8rem; color: var(--ink-3); }

/* ---------- Preventivo a righe (29/10, sul modello dei preventivi online): ogni file con le sue tendine ---------- */
#pannello-file { grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); grid-template-areas: "viewer side" "invio side"; grid-template-rows: auto 1fr; }
@media (max-width: 980px) { #pannello-file { grid-template-columns: minmax(0, 1fr); grid-template-areas: "viewer" "side" "invio"; } }
.elenco-file[hidden] { display: none; }
.lista-file { display: grid; gap: 10px; }
.voce-file { display: grid; gap: 12px; padding: 12px 14px 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.voce-testa { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto 30px; gap: 14px; align-items: center; }
.voce-file .voce-img { position: relative; width: 88px; height: 66px; overflow: visible; }
.voce-file .voce-img img { border-radius: 6px; }
.voce-file .voce-3d { left: auto; right: -6px; bottom: -6px; }
.voce-testo { display: grid; gap: 2px; min-width: 0; }
.voce-file .voce-nome { font-family: var(--font-display); font-weight: 800; font-size: 1rem; color: #13505B; overflow-wrap: anywhere; }
.voce-file .voce-det { font-size: .82rem; color: var(--ink-3); }
.voce-file .voce-togli { position: static; transform: none; }
.voce-prezzo { display: grid; justify-items: end; gap: 1px; text-align: right; white-space: nowrap; min-width: 96px; }
.voce-prezzo b { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: #13505B; font-variant-numeric: tabular-nums; }
.voce-prezzo b.su-richiesta { font-size: .95rem; }
.voce-prezzo small { font-size: .74rem; color: var(--ink-3); }
.voce-prezzo.in-calcolo { grid-auto-flow: column; align-items: center; gap: 8px; }
.spinner-piccolo { width: 18px; height: 18px; border-width: 2.5px; }
.voce-scelte { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 10px; align-items: end; }
.campo-riga { display: grid; gap: 4px; min-width: 0; }
.campo-tit { display: flex; align-items: center; gap: 6px; min-height: 20px; }
.campo-tit label, .campo-note > label { font-family: var(--font-display); font-weight: 700; font-size: .8rem; color: #13505B; }
.campo-tit .info-q { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #13505B; background: var(--surface); color: #13505B;
  font-family: var(--font-display); font-weight: 800; font-size: .68rem; line-height: 1; padding: 0; cursor: pointer; display: grid; place-items: center; }
.campo-tit .info-q:hover, .campo-tit .info-q[aria-expanded="true"] { background: #13505B; color: #FFFFFF; }
.campo-riga select { width: 100%; height: 38px; padding: 0 30px 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; background-color: var(--surface);
  font: inherit; font-size: .88rem; color: var(--ink); cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2313505B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; background-size: 14px; text-overflow: ellipsis; }
.campo-riga select:hover { border-color: #13505B; }
.campo-riga select:focus-visible, .note-pezzo:focus-visible { outline: 2px solid var(--hl); outline-offset: 1px; }
.stepper-piccolo { display: inline-grid; grid-template-columns: 32px 46px 32px; height: 38px; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; background: var(--surface); }
.stepper-piccolo button { border: 0; background: var(--surface-2); color: #13505B; font-size: 1.05rem; font-weight: 700; cursor: pointer; padding: 0; }
.stepper-piccolo button:hover { background: var(--tint); }
.stepper-piccolo input { width: 100%; border: 0; text-align: center; font-family: var(--font-display); font-weight: 800; font-size: .95rem; color: #13505B; background: transparent; -moz-appearance: textfield; }
.stepper-piccolo input::-webkit-outer-spin-button, .stepper-piccolo input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.campo-note { display: grid; gap: 4px; }
.note-pezzo { width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 8px; font: inherit; font-size: .88rem; background: var(--surface); color: var(--ink); }
.note-pezzo.non-valido { border-color: #B3261E; box-shadow: 0 0 0 3px rgba(179, 38, 30, .12); }
.cg-price .spinner { display: inline-block; vertical-align: middle; margin-right: 10px; }
.cg-price .calcolo-txt { font-size: 1rem; font-weight: 600; vertical-align: middle; }
#cg-vai:disabled { opacity: .5; cursor: not-allowed; }
/* Riquadro del prezzo: niente doppia riga sotto "Pronto in" */
.righe tr:first-child td { border-top: 0; }
@media (max-width: 680px) {
  .voce-testa { grid-template-columns: 64px minmax(0, 1fr) 30px; }
  .voce-file .voce-img { width: 64px; height: 48px; }
  .voce-prezzo { grid-column: 2 / 3; justify-items: start; text-align: left; min-width: 0; }
  .voce-prezzo.in-calcolo { justify-content: start; }
  .voce-testa .voce-togli { grid-column: 3; grid-row: 1; }
  .voce-scelte { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Con i file già caricati la zona di caricamento si fa piccola: pulsante e frase su una riga */
.viewer.ha-file .viewer-bottom { grid-auto-flow: column; justify-content: start; align-items: center; text-align: left; padding: 10px 14px; gap: 14px; }
.viewer.ha-file .drop-line { max-width: none; }
@media (max-width: 680px) { .viewer.ha-file .viewer-bottom { grid-auto-flow: row; justify-items: start; } }

/* ---------- Ritocchi (29/10): elenco senza riquadri, contatore pulito ---------- */
.lista-file { gap: 0; }
.voce-file { padding: 16px 0; border: 0; border-radius: 0; background: none; }
.voce-file + .voce-file { border-top: 1px solid var(--line); }
.lista-file .voce-file:last-child { padding-bottom: 4px; }
.viewer.ha-file .viewer-bottom { margin: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; padding: 14px 18px; }
.viewer.ha-file .elenco-file { border-top: 0; }
.stepper-piccolo button { width: auto; display: grid; place-items: center; font-size: 0; }
.stepper button svg { display: block; }
.stepper-grande button svg { width: 20px; height: 20px; }
/* Finestrelle del "?" più piccole e compatte */
body > .pop-qualita { padding: 12px 14px; gap: 8px; }
body > .pop-qualita p { font-size: .8rem; line-height: 1.45; }
body > .pop-qualita .pop-testa b { font-size: .9rem; }
body > .pop-qualita .pop-sfere { gap: 6px; }
body > .pop-qualita .sfera { padding: 6px 4px; gap: 3px; }
body > .pop-qualita .sfera svg { max-width: 64px; }
body > .pop-qualita .sfera figcaption { font-size: .72rem; }
body > .pop-qualita .sfera figcaption b { font-size: .82rem; }
body > .pop-qualita .sfera .nota { font-size: .68rem; }
.voce-prezzo small.insieme { color: #13505B; }
.cg-grid[hidden], .cg-price[hidden] { display: none; }
/* Senza file: un solo riquadro tratteggiato (prima il tratteggio interno toccava il bordo del riquadro) */
.viewer:not(.ha-file) { border: 1.5px dashed var(--line-strong); background: var(--bg-alt); }
.viewer:not(.ha-file) .viewer-bottom { margin: 0; border: 0; border-radius: 0; background: none; padding: 40px 18px; }

/* ---------- Niente spazio bianco sotto il piè di pagina sugli schermi alti (29/10) ---------- */
/* La pagina occupa sempre tutta l'altezza: il piè di pagina resta in fondo e lo spazio in più va al contenuto */
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; }
.pagina-preventivo { display: flex; flex-direction: column; background: var(--bg-alt); }
.pagina-preventivo > .sez-preventivo { flex: 1 0 auto; }
