/*
 * quiz-streamed.css · stile della pagina del quiz finale di Streamed (tv.streamededu.com)
 * Specifica: costruzione/00-contratto.md §4, §7, §8 (24/11/2026).
 * Ogni selettore comincia da .sq o #sq-radice: fuori dal quiz queste regole non toccano nulla.
 * Colori, raggi, ombre e pulsanti vengono dai blocchi già in linea su tv. (riferimenti nel rapporto di P1):
 * pagina ECM (RESTYLING ECM v2b), popup comuni (RESTYLING-POPUP), riviste (RESTYLING-A), caratteri (RESTYLING-FONT).
 */

/* ---------------------------------------------------------------- base e gettoni */
.sq {
  --sq-ink: #232838;
  --sq-ink-soft: #3C4256;
  --sq-muted: #5D6470;
  --sq-blu: #3A53E8;
  --sq-blu-700: #2E40C2;
  --sq-blu-050: #EEF1FF;
  --sq-blu-100: #D3DAFF;
  --sq-blu-fuoco: #5B73F0;
  --sq-linea: #E2E7F0;
  --sq-linea-forte: #C9D1E2;
  --sq-bordo-campo: #8C95A8;
  --sq-tenue: #F6F8FC;
  --sq-tenue-blu: #F2F5FB;
  --sq-errore: #B42318;
  --sq-attestato: #4b6eff;
  --sq-titoli: "Streamed Titoli", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --sq-testo: "Streamed Testo", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --sq-pad: clamp(20px, 2.4vw + 11px, 44px);
  display: block;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  /* margine laterale solo se chi contiene il quiz non ne lascia già almeno 16 px per parte */
  padding: clamp(20px, 2.6vw + 10px, 52px) max(0px, calc((32px - (100vw - 100%)) / 2)) clamp(40px, 3vw + 28px, 88px);
  font-family: var(--sq-testo);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: normal;
  color: var(--sq-ink-soft);
  text-align: left;
  font-variant-numeric: lining-nums;
  -webkit-text-size-adjust: 100%;
}
.sq *,
.sq *::before,
.sq *::after { box-sizing: border-box; }
.sq p,
.sq h1,
.sq h2,
.sq ul,
.sq li,
.sq figure,
.sq figcaption,
.sq fieldset,
.sq legend { margin: 0; padding: 0; }
.sq p { font-size: inherit; font-weight: inherit; line-height: inherit; color: inherit; }
.sq h1,
.sq h2 { font-family: var(--sq-titoli); font-weight: 700; color: var(--sq-ink); text-transform: none; }
.sq strong { font-weight: 700; }
.sq a { color: inherit; text-decoration: none; }
.sq button,
.sq input { font-family: inherit; letter-spacing: inherit; }
.sq [hidden] { display: none !important; }
.sq [tabindex="-1"]:focus { outline: none; }
.sq .sq-solo-lettori {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.sq .sq-icona { display: inline-flex; flex: none; width: 1.25em; height: 1.25em; }
.sq .sq-icona svg { display: block; width: 100%; height: 100%; }

/* ---------------------------------------------------------------- scheda (quiz) e avviso (ospite, senza piano) */
.sq .sq-scheda,
.sq .sq-avviso {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  background:
    radial-gradient(60% 200px at 8% 0%, rgba(75, 110, 255, .13), transparent 70%),
    radial-gradient(50% 180px at 92% 0%, rgba(75, 110, 255, .09), transparent 70%),
    linear-gradient(180deg, #EAF0FE 0, #fff 240px);
  background-color: #fff;
  border: 1px solid var(--sq-linea);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(35, 40, 56, .06), 0 28px 56px -34px rgba(35, 40, 56, .32);
}

/* testa: occhiello, titolo, sottotitolo */
.sq .sq-testa { padding: var(--sq-pad) var(--sq-pad) 0; text-align: center; }
.sq .sq-occhiello,
.sq .sq-avviso-occhiello {
  display: inline-block;
  margin: 0 0 .95rem;
  padding: .34rem .85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .8);
  box-shadow: inset 0 0 0 1px var(--sq-blu-100);
  font-family: var(--sq-testo);
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--sq-blu);
}
.sq .sq-titolo,
.sq .sq-avviso-titolo {
  margin: 0 auto;
  max-width: 36rem;
  font-family: var(--sq-titoli);
  font-size: clamp(1.55rem, 1.2rem + 1.5vw, 2.2rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--sq-ink);
  text-wrap: balance;
  overflow-wrap: break-word;
  overflow-wrap: anywhere;
}
.sq .sq-sottotitolo,
.sq .sq-avviso-testo {
  max-width: 34rem;
  margin: .8rem auto 0;
  font-size: clamp(1rem, .96rem + .25vw, 1.12rem);
  font-weight: 500;
  line-height: 1.55;
  color: var(--sq-ink-soft);
  text-wrap: pretty;
}
.sq .sq-corso {
  margin: 0 auto .7rem;
  max-width: 36rem;
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--sq-muted);
  overflow-wrap: break-word;
}

/* corpo */
.sq .sq-corpo { padding: clamp(22px, 1.6vw + 14px, 34px) var(--sq-pad) var(--sq-pad); }
.sq .sq-nota,
.sq .sq-testo-centro {
  max-width: 34rem;
  margin: 1.1rem auto 0;
  font-size: .92rem;
  line-height: 1.5;
  color: var(--sq-muted);
  text-align: center;
}
.sq .sq-testo-centro { margin-top: 0; font-size: 1rem; color: var(--sq-ink-soft); }

/* ---------------------------------------------------------------- pulsanti */
.sq .sq-azioni { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.6rem; }
.sq .sq-azioni-centro { justify-content: center; }
.sq .sq-pulsante {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 52px;
  margin: 0;
  padding: .8rem 1.6rem;
  border: 0;
  border-radius: 12px;
  background: var(--sq-blu);
  box-shadow: 0 1px 2px rgba(35, 40, 56, .12);
  font-family: var(--sq-testo);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  text-transform: none;
  white-space: normal;
  color: #fff;
  cursor: pointer;
  outline: none;
  outline-offset: 2px;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .16s, box-shadow .16s, color .16s, opacity .16s;
}
.sq .sq-pulsante:hover,
.sq a.sq-pulsante:hover,
.sq a.sq-pulsante:visited,
.sq a.sq-pulsante:focus { color: #fff; text-decoration: none; }
/* contorno trasparente solo col fuoco: invisibile qui, nel contrasto forzato il browser lo colora e segna il fuoco */
.sq .sq-pulsante:focus-visible { outline: 2px solid transparent; outline-offset: 2px; box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--sq-blu-fuoco); }
.sq .sq-pulsante .sq-icona { width: 20px; height: 20px; }
.sq .sq-pulsante-largo { min-width: min(100%, 15rem); }
.sq .sq-pulsante-secondario,
.sq .sq-pulsante-secondario:hover { color: var(--sq-ink); }
.sq .sq-pulsante-secondario { background: #fff; box-shadow: inset 0 0 0 1.5px var(--sq-linea-forte); }
.sq .sq-pulsante-secondario:focus-visible { box-shadow: inset 0 0 0 1.5px var(--sq-blu), 0 0 0 2px #fff, 0 0 0 5px var(--sq-blu-fuoco); }
.sq .sq-pulsante[aria-disabled="true"] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.sq .sq-pulsante-secondario[aria-disabled="true"] { background: #fff; box-shadow: inset 0 0 0 1.5px var(--sq-linea-forte); }
/* passaggio del mouse solo dove c'è un puntatore: sui telefoni il colore resterebbe «appiccicato» dopo il tocco */
@media (hover: hover) {
  .sq .sq-pulsante:hover { background: var(--sq-blu-700); }
  .sq .sq-pulsante-secondario:hover { background: var(--sq-tenue-blu); }
  .sq .sq-pulsante[aria-disabled="true"]:hover { background: var(--sq-blu); }
  .sq .sq-pulsante-secondario[aria-disabled="true"]:hover { background: #fff; }
  .sq .sq-opzione:hover { border-color: var(--sq-linea-forte); background: var(--sq-tenue); }
  .sq .sq-opzione.sq-scelta:hover { border-color: var(--sq-blu); background: var(--sq-blu-050); }
}
.sq .sq-pulsante[aria-disabled="true"]:focus-visible { opacity: .6; box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--sq-blu-fuoco); }
@media (max-width: 559px) {
  .sq .sq-azioni-centro .sq-pulsante,
  .sq .sq-avviso .sq-pulsante { width: 100%; }
}

/* ---------------------------------------------------------------- 1. apertura: i tre fatti */
.sq .sq-fatti { display: grid; gap: .7rem; margin: 0; padding: 0; list-style: none; }
.sq .sq-fatto {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin: 0;
  padding: .95rem 1.05rem;
  background: #fff;
  border: 1px solid var(--sq-linea);
  border-radius: 14px;
  list-style: none;
}
.sq .sq-fatto-icona {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--sq-blu-050);
  color: var(--sq-blu);
}
.sq .sq-fatto-icona .sq-icona { width: 22px; height: 22px; }
.sq .sq-fatto-testo { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.sq .sq-fatto-testo strong { font-family: var(--sq-titoli); font-size: 1.02rem; font-weight: 600; line-height: 1.3; color: var(--sq-ink); }
.sq .sq-fatto-testo span { font-size: .92rem; line-height: 1.45; color: var(--sq-muted); }
@media (min-width: 640px) {
  .sq .sq-fatti { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
  .sq .sq-fatto { flex-direction: column; align-items: flex-start; gap: .75rem; padding: 1.15rem 1.15rem 1.25rem; }
}

/* ---------------------------------------------------------------- 2. domande */
.sq .sq-testa-compatta { text-align: left; }
.sq .sq-testa-compatta .sq-corso { margin: 0 0 .9rem; max-width: none; }
.sq .sq-avanzamento-testo { margin: 0 0 .55rem; font-size: .95rem; font-weight: 600; line-height: 1.3; color: var(--sq-ink-soft); }
.sq .sq-avanzamento-testo strong { font-weight: 800; color: var(--sq-blu); }
.sq .sq-barra { height: 8px; overflow: hidden; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--sq-linea); }
.sq .sq-barra-piena { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--sq-attestato), var(--sq-blu)); }

.sq .sq-modulo { display: block; margin: 0; }
.sq .sq-gruppo { min-width: 0; margin: 0; padding: 0; border: 0; }
.sq .sq-legenda {
  display: block;
  float: none;
  width: 100%;
  max-width: 100%;
  margin: 0 0 1.15rem;
  padding: 0;
  border: 0;
  font-size: inherit;
  line-height: inherit;
  white-space: normal;
  color: inherit;
}
.sq .sq-domanda {
  margin: 0;
  font-family: var(--sq-titoli);
  font-size: clamp(1.2rem, 1.06rem + .6vw, 1.45rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -.01em;
  color: var(--sq-ink);
  overflow-wrap: break-word;
  overflow-wrap: anywhere;
}
.sq .sq-opzioni { display: grid; grid-template-columns: minmax(0, 1fr); gap: .65rem; }
.sq .sq-opzione {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  min-height: 56px;
  margin: 0;
  padding: .85rem 1rem;
  background: #fff;
  border: 1.5px solid var(--sq-linea);
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--sq-ink-soft);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.sq .sq-opzione .sq-radio {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}
.sq .sq-lettera {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--sq-tenue);
  box-shadow: inset 0 0 0 1px var(--sq-linea-forte);
  font-family: var(--sq-titoli);
  font-size: .88rem;
  font-weight: 600;
  line-height: 1;
  color: var(--sq-muted);
  transition: background-color .15s, color .15s, box-shadow .15s;
}
.sq .sq-opzione-testo { flex: 1 1 auto; min-width: 0; padding-top: .2rem; overflow-wrap: break-word; overflow-wrap: anywhere; }
.sq .sq-opzione.sq-scelta { border-color: var(--sq-blu); background: var(--sq-blu-050); color: var(--sq-ink); }
.sq .sq-opzione.sq-scelta .sq-lettera { background: var(--sq-blu); box-shadow: none; color: #fff; }
/* fuoco da tastiera: anello sulla lettera (ovunque) e sulla riga intera (dove c'è :has) */
.sq .sq-opzione .sq-radio:focus-visible + .sq-lettera { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--sq-blu); }
.sq .sq-opzione:has(.sq-radio:focus-visible) { box-shadow: 0 0 0 3px var(--sq-blu-fuoco); }

.sq .sq-suggerimento {
  margin: 1rem 0 0;
  padding: .65rem .95rem;
  border-radius: 10px;
  background: var(--sq-blu-050);
  font-size: .94rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--sq-blu-700);
}
.sq .sq-azioni-domanda { flex-wrap: nowrap; justify-content: space-between; align-items: center; }
.sq .sq-azioni-domanda .sq-pulsante { flex: 1 1 auto; padding-left: 1.1rem; padding-right: 1.1rem; }
.sq .sq-azioni-domanda .sq-pulsante-secondario { flex: 0 0 auto; }
.sq .sq-segnaposto { display: none; }
@media (min-width: 560px) {
  .sq .sq-azioni-domanda .sq-pulsante { flex: 0 0 auto; min-width: 11rem; padding-left: 1.6rem; padding-right: 1.6rem; }
  .sq .sq-segnaposto { display: block; }
}
@media (max-width: 379px) {
  .sq .sq-azioni-domanda .sq-pulsante-consegna .sq-icona { display: none; }
  /* il secondo pulsante va sotto «Indietro» solo se i due non stanno su una riga */
  .sq .sq-azioni-domanda { flex-wrap: wrap; }
}

/* ---------------------------------------------------------------- 3-4. esiti */
.sq .sq-esito {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 1.1rem;
  border-radius: 50%;
}
.sq .sq-esito .sq-icona { width: 32px; height: 32px; }
.sq .sq-esito-ok { background: var(--sq-blu); color: #fff; box-shadow: 0 0 0 8px var(--sq-blu-050), 0 14px 26px -12px rgba(58, 83, 232, .6); }
.sq .sq-esito-no { background: #fff; color: var(--sq-ink-soft); box-shadow: inset 0 0 0 1.5px var(--sq-linea-forte), 0 0 0 8px rgba(255, 255, 255, .7); }
.sq .sq-esito + .sq-occhiello { max-width: 34rem; letter-spacing: .04em; text-transform: none; font-size: .86rem; overflow-wrap: break-word; }
.sq .sq-punteggio {
  display: inline-block;
  margin: 1rem 0 0;
  padding: .5rem 1.1rem;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--sq-linea);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--sq-ink-soft);
}
.sq .sq-punteggio strong { font-family: var(--sq-titoli); font-size: 1.15rem; font-weight: 700; color: var(--sq-ink); }

/* attestato */
.sq .sq-sezione {
  margin: 0 0 1.1rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--sq-linea);
  font-family: var(--sq-titoli);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--sq-ink);
}
.sq .sq-attestato { display: grid; gap: 1.6rem; }
@media (min-width: 700px) {
  .sq .sq-attestato { grid-template-columns: minmax(0, 1fr) minmax(0, 17.5rem); align-items: start; gap: 2rem; }
}
.sq .sq-campo { margin: 0; }
.sq .sq-campo-etichetta {
  display: block;
  margin: 0 0 .5rem;
  font-size: .98rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--sq-ink);
  cursor: pointer;
}
.sq .sq-campo-input {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: .8rem 1rem;
  background: #fff;
  border: 1.5px solid var(--sq-bordo-campo);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(35, 40, 56, .06);
  font-family: var(--sq-testo);
  font-size: 1.06rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--sq-ink);
  outline: none;
  transition: border-color .16s, box-shadow .16s;
}
.sq .sq-campo-input:focus { outline: 2px solid transparent; outline-offset: 2px; border-color: var(--sq-blu); box-shadow: 0 0 0 4px var(--sq-blu-050); }
.sq .sq-campo-input[aria-invalid="true"] { border-color: var(--sq-errore); }
.sq .sq-campo-input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px #FDECEA; }
.sq .sq-campo-aiuto { margin: .5rem 0 0; font-size: .88rem; line-height: 1.45; color: var(--sq-muted); }
.sq .sq-campo-errore { margin: .45rem 0 0; font-size: .92rem; font-weight: 700; line-height: 1.4; color: var(--sq-errore); }
/* caratteri che l'attestato cambia o toglie (avvisi del modulo PDF) */
.sq .sq-campo-nota {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  margin: .6rem 0 0;
  padding: .6rem .85rem;
  border-radius: 10px;
  background: var(--sq-blu-050);
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--sq-blu-700);
  overflow-wrap: anywhere;
}
.sq .sq-campo-nota .sq-icona { width: 18px; height: 18px; margin-top: .1rem; }

.sq .sq-stato {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-height: 1.5rem;
  margin: 1.1rem 0 0;
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--sq-muted);
}
.sq .sq-stato:empty { min-height: 0; margin-top: 0; }
.sq .sq-stato .sq-icona { width: 20px; height: 20px; }
.sq .sq-stato[data-sq-fase="pronto"] { color: var(--sq-blu-700); }
.sq .sq-stato[data-sq-fase="errore"],
.sq .sq-stato[data-sq-fase="guasto"] { color: var(--sq-errore); }
.sq .sq-giro {
  display: inline-block;
  flex: none;
  width: 16px;
  height: 16px;
  border: 2px solid var(--sq-blu-100);
  border-top-color: var(--sq-blu);
  border-radius: 50%;
  animation: sq-giro .8s linear infinite;
}
@keyframes sq-giro { to { transform: rotate(360deg); } }

.sq .sq-azioni-attestato { margin-top: .9rem; gap: .65rem; }
.sq .sq-azioni-attestato .sq-pulsante { flex: 1 1 10rem; }
.sq .sq-azioni-attestato [data-sq-azione="scarica"] { flex-basis: 100%; }
/* nota sotto i pulsanti: l'attestato non resta salvato (piccola, come l'aiuto del campo) */
.sq .sq-nota-conserva { margin: .8rem 0 0; font-size: .88rem; line-height: 1.45; color: var(--sq-muted); text-wrap: pretty; }

/* esito superato ritrovato sul dispositivo: la riga con la data di allora e «Rifai il quiz», discreto */
.sq .sq-ritrovato {
  max-width: 34rem;
  margin: .9rem auto 0;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--sq-ink-soft);
  text-wrap: pretty;
}
.sq .sq-rifai { margin: 1.6rem 0 0; padding-top: 1rem; border-top: 1px solid var(--sq-linea); text-align: center; }
.sq .sq-pulsante-discreto {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 44px;
  margin: 0;
  padding: .55rem .9rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font-family: var(--sq-testo);
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
  color: var(--sq-muted);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .16s, color .16s;
}
.sq .sq-pulsante-discreto .sq-icona { width: 18px; height: 18px; }
.sq .sq-pulsante-discreto:focus-visible { outline: 2px solid transparent; outline-offset: 2px; box-shadow: 0 0 0 3px var(--sq-blu-fuoco); }
@media (hover: hover) {
  .sq .sq-pulsante-discreto:hover { background: var(--sq-tenue); color: var(--sq-ink); }
}

/* avvisi: browser interno di un'app (apertura ed esito), risultato che il browser non riesce a salvare */
.sq .sq-nota-app,
.sq .sq-nota-salvataggio {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  margin: 1rem 0 0;
  padding: .8rem 1rem;
  border-radius: 12px;
  background: var(--sq-tenue);
  font-size: .92rem;
  line-height: 1.5;
  color: var(--sq-ink-soft);
}
.sq .sq-nota-app .sq-icona,
.sq .sq-nota-salvataggio .sq-icona { width: 20px; height: 20px; margin-top: .1rem; color: var(--sq-blu); }
.sq .sq-nota-app-apertura { margin: 1.1rem 0 0; }

/* anteprima dei dati dell'attestato: un riassunto con la cornice blu, non il disegno esatto */
.sq .sq-anteprima { margin: 0; }
.sq .sq-ant-foglio {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 297 / 210;
  padding: 7% 9%;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 0 0 1px var(--sq-linea), 0 18px 36px -22px rgba(35, 40, 56, .45);
  text-align: center;
  container-type: inline-size;
}
.sq .sq-ant-foglio::before,
.sq .sq-ant-foglio::after { content: ""; position: absolute; pointer-events: none; }
.sq .sq-ant-foglio::before { top: 4.5%; right: 3.2%; bottom: 4.5%; left: 3.2%; border: 2px solid var(--sq-attestato); border-radius: 3px; }
.sq .sq-ant-foglio::after { top: calc(4.5% + 5px); right: calc(3.2% + 5px); bottom: calc(4.5% + 5px); left: calc(3.2% + 5px); border: 1px solid rgba(75, 110, 255, .35); border-radius: 2px; }
.sq .sq-ant-intestazione {
  margin: 0 0 .5em;
  font-family: var(--sq-titoli);
  font-size: 10px;
  font-size: 3.4cqi;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sq-muted);
}
.sq .sq-ant-intestazione span { display: block; font-size: 2.1em; font-weight: 700; letter-spacing: .07em; color: var(--sq-attestato); }
.sq .sq-ant-nome {
  max-width: 100%;
  margin: .2em 0 .25em;
  font-family: var(--sq-titoli);
  font-size: 18px;
  font-size: 7.6cqi;
  font-weight: 600;
  line-height: 1.15;
  color: var(--sq-attestato);
  overflow-wrap: anywhere;
}
.sq .sq-ant-nome.sq-ant-vuoto { color: var(--sq-linea-forte); }
.sq .sq-ant-riga,
.sq .sq-ant-data { margin: 0; font-size: 10px; font-size: 3.5cqi; line-height: 1.3; color: var(--sq-muted); }
.sq .sq-ant-corso {
  max-width: 100%;
  margin: .25em 0 0;
  font-size: 12px;
  font-size: 4.4cqi;
  font-weight: 700;
  line-height: 1.25;
  color: var(--sq-ink);
  overflow-wrap: break-word;
}
.sq .sq-ant-data { margin-top: .7em; }
.sq .sq-ant-didascalia { margin: .65rem 0 0; font-size: .82rem; line-height: 1.4; color: var(--sq-muted); text-align: center; }

/* ---------------------------------------------------------------- ospite e senza piano (markup fisso, senza JavaScript) */
.sq .sq-avviso { padding: clamp(28px, 2.6vw + 18px, 56px) var(--sq-pad); text-align: center; }
.sq .sq-avviso::before {
  content: "";
  display: block;
  width: 64px;
  height: 64px;
  margin: 0 auto 1.1rem;
  border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233A53E8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M12 11v5.5'/%3E%3Cpath d='M12 7.6h.01' stroke-width='2.6'/%3E%3C/svg%3E") center / 30px 30px no-repeat;
  box-shadow: inset 0 0 0 1.5px var(--sq-blu-100), 0 0 0 8px rgba(255, 255, 255, .7);
}
#sq-radice[data-sq-stato="ospite"] .sq-avviso::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233A53E8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='10.5' width='14' height='10' rx='2.2'/%3E%3Cpath d='M8.5 10.5V7.8a3.5 3.5 0 0 1 7 0v2.7'/%3E%3Cpath d='M12 14.6v2' stroke-width='2.2'/%3E%3C/svg%3E");
}
#sq-radice[data-sq-stato="senza-piano"] .sq-avviso::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233A53E8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='9' r='6'/%3E%3Cpath d='M8.6 13.9 7.2 21.5 12 18.8l4.8 2.7-1.4-7.6'/%3E%3C/svg%3E");
}
.sq .sq-avviso .sq-pulsante { min-width: min(100%, 14rem); margin-top: 1.7rem; }

/* ---------------------------------------------------------------- movimento */
@media (prefers-reduced-motion: no-preference) {
  .sq .sq-scheda.sq-entra > * { animation: sq-entra .32s cubic-bezier(.22, 1, .36, 1) both; }
  .sq .sq-scheda.sq-entra > .sq-corpo { animation-delay: .04s; }
}
@keyframes sq-entra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .sq *,
  .sq *::before,
  .sq *::after { transition: none !important; animation: none !important; }
}

/* ---------------------------------------------------------------- contrasto forzato (Windows) */
@media (forced-colors: active) {
  .sq .sq-opzione.sq-scelta { border-color: Highlight; }
  .sq .sq-opzione.sq-scelta .sq-lettera { forced-color-adjust: none; background: Highlight; color: HighlightText; }
  .sq .sq-pulsante { border: 1px solid ButtonText; }
  /* la riga della risposta a fuoco: qui le ombre spariscono, resta il contorno */
  .sq .sq-opzione:has(.sq-radio:focus-visible) { outline: 2px solid Highlight; outline-offset: 2px; }
}
