/* truffavocale.it — foglio di stile unico.
   File generato dal template in tools/genera-truffavocale.sh? No: questo file
   si modifica a mano, è la fonte di verità dello stile. Le PAGINE invece sono
   generate: vedi CLAUDE.md.

   Principi non negoziabili:
   - corpo del testo mai sotto 18px, ridimensionabile a 21 e 24 dal pulsante
   - contrasto sempre sopra 4.5:1 (misurato, non a occhio)
   - nessuna richiesta esterna: nessun font remoto, nessuno script di terzi
   - tutto in rem, così "Aumenta testo" scala l'intera pagina */

:root {
  --base: 18px;

  --carta: #faf9f7;
  --carta-alta: #ffffff;
  --inchiostro: #1c1b19;
  --inchiostro-tenue: #55524c;   /* 7.8:1 su bianco */
  --inchiostro-lieve: #6b6862;   /* 5.3:1 su carta  */
  --allerta: #b91c1c;            /* 6.5:1 con bianco sopra */
  --allerta-scuro: #7f1212;
  --allerta-tenue: #fdf4f4;
  --bordo: #e6e4df;
  --bordo-forte: #d5d2cb;

  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

html { font-size: var(--base); -webkit-text-size-adjust: 100%; }
* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--carta);
  color: var(--inchiostro);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.contenitore { max-width: 44rem; margin: 0 auto; padding: 0 1.2rem; }

a { color: var(--allerta-scuro); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--allerta);
  outline-offset: 3px;
}

.salta {
  position: absolute; left: -9999px;
  background: var(--inchiostro); color: #fff;
  padding: .7rem 1rem; border-radius: 8px; text-decoration: none;
}
.salta:focus { left: 1rem; top: 1rem; z-index: 10; }

/* ---------- barra ---------- */
.barra { border-bottom: 1px solid var(--bordo); background: var(--carta-alta); }
.barra-int {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-top: .9rem; padding-bottom: .9rem;
}
.marchio {
  font-family: var(--serif); font-size: 1.1rem; font-weight: 700;
  letter-spacing: -.01em; color: var(--inchiostro); text-decoration: none;
}
.marchio span { color: var(--allerta); }
.btn-testo {
  font-family: inherit; font-size: 1rem; font-weight: 600;
  color: var(--inchiostro); background: var(--carta);
  border: 1px solid var(--bordo-forte); border-radius: 999px;
  padding: .55rem .95rem; cursor: pointer; white-space: nowrap;
}
.btn-testo:hover { border-color: var(--inchiostro-lieve); }

/* navigazione a parole intere, mai icone */
.menu { border-bottom: 1px solid var(--bordo); background: var(--carta); }
.menu ul {
  list-style: none; margin: 0; padding: .6rem 0;
  display: flex; flex-wrap: wrap; gap: .3rem 1.1rem;
  font-size: 1rem;
}
.menu a { color: var(--inchiostro-tenue); text-decoration: none; font-weight: 600; }
.menu a:hover { color: var(--allerta-scuro); text-decoration: underline; }
.menu a[aria-current="page"] { color: var(--allerta-scuro); text-decoration: underline; }

/* ---------- testo ---------- */
main { padding-bottom: 1rem; }
h1 {
  font-family: var(--serif);
  font-size: 2.15rem; line-height: 1.18; letter-spacing: -.015em;
  font-weight: 700; margin: 2.6rem 0 0;
}
h2 {
  font-family: var(--serif);
  font-size: 1.5rem; line-height: 1.25; font-weight: 700;
  margin: 2.4rem 0 .6rem;
}
h3 { font-size: 1.15rem; line-height: 1.35; font-weight: 650; margin: 1.6rem 0 .4rem; }
p { margin: 0 0 1rem; }
main li { margin: 0 0 .5rem; }
.madre-2 { color: var(--allerta); }   /* la seconda riga del titolo in home */
.occhiello {
  margin: 1.1rem 0 0; font-size: 1.15rem; line-height: 1.55;
  color: var(--inchiostro-tenue); max-width: 34ch;
}
.testo { max-width: 36em; }
.testo p, .testo li { font-size: 1rem; }

/* fonte accanto a ogni fatto */
.fonte { font-size: 1rem; color: var(--inchiostro-lieve); display: block; margin: -.5rem 0 1rem; }
.fonte a { color: var(--inchiostro-lieve); }

.avviso {
  border-left: 4px solid var(--allerta); background: var(--allerta-tenue);
  padding: 1rem 1.1rem; margin: 1.4rem 0; border-radius: 0 10px 10px 0;
}
.avviso p:last-child { margin: 0; }

.scheda {
  border: 1px solid var(--bordo); border-radius: 14px;
  background: var(--carta-alta); padding: 1.4rem 1.3rem; margin: 1.2rem 0;
}
.scheda h3 { margin-top: 0; }
.scheda p:last-child { margin-bottom: 0; }

/* ---------- passi numerati ---------- */
.passi { list-style: none; margin: 1.6rem 0; padding: 0; counter-reset: passo; }
.passi > li {
  counter-increment: passo; position: relative;
  background: var(--carta-alta); border: 1px solid var(--bordo);
  border-radius: 14px; padding: 1.4rem 1.3rem 1.3rem 1.3rem; margin: 0 0 1rem;
}
.passi > li::before {
  content: counter(passo);
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: var(--allerta); color: #fff;
  font-size: 1.3rem; font-weight: 700; font-family: var(--serif);
  margin-bottom: .7rem;
}
.passi h2 { margin: 0 0 .5rem; font-size: 1.4rem; }
.passi p:last-child { margin-bottom: 0; }

/* ---------- percorsi in home ---------- */
.percorsi { margin: 2.6rem 0 0; display: grid; gap: .9rem; }
.via {
  display: block; text-decoration: none; color: inherit;
  border: 1px solid var(--bordo); border-radius: 14px;
  background: var(--carta-alta); padding: 1.4rem 1.3rem;
}
.via:hover { border-color: var(--inchiostro-lieve); }
.via h2 { margin: 0; font-size: 1.4rem; }
.via p { margin: .45rem 0 0; color: var(--inchiostro-tenue); }
.via .freccia { font-weight: 700; color: var(--allerta-scuro); }
.via-urgente { background: var(--allerta); border-color: var(--allerta-scuro); padding: 1.7rem 1.4rem; }
.via-urgente h2 { color: #fff; font-size: 1.75rem; }
.via-urgente p { color: #fff; opacity: .95; font-size: 1.05rem; }
.via-urgente .freccia { color: #fff; }
.via-urgente:hover { background: var(--allerta-scuro); }

.strumenti { margin: 2.2rem 0 0; }
.strumenti > h2 { font-size: 1.15rem; margin: 0 0 .8rem; color: var(--inchiostro-tenue); }
.strumenti ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.strumenti a {
  display: block; background: var(--carta-alta); border: 1px solid var(--bordo);
  border-radius: 11px; padding: .9rem 1.1rem; text-decoration: none; color: inherit;
}
.strumenti a:hover { border-color: var(--inchiostro-lieve); }
.strumenti b { font-weight: 650; }
.strumenti span { color: var(--inchiostro-tenue); }

/* ---------- segnalazioni ---------- */
.segnala {
  margin: 2.6rem 0 0; padding: 1.6rem 1.3rem;
  border: 1px solid var(--bordo); border-radius: 14px; background: var(--carta-alta);
}
.segnala h2 { margin: 0 0 .4rem; font-size: 1.3rem; }
.segnala p { color: var(--inchiostro-tenue); }
.bottone-mail {
  display: inline-block; background: var(--allerta-scuro); color: #fff;
  text-decoration: none; font-weight: 600; padding: .8rem 1.2rem; border-radius: 10px;
}
.nota-mail { margin: 1rem 0 0; font-size: 1rem; color: var(--inchiostro-lieve); }
.btn-copia {
  font-family: inherit; font-size: 1rem; font-weight: 600; cursor: pointer;
  color: var(--inchiostro); background: var(--carta);
  border: 1px solid var(--bordo-forte); border-radius: 8px;
  padding: .5rem .9rem; margin-right: .6rem;
}
.btn-copia:hover { border-color: var(--inchiostro-lieve); }
.btn-copia[data-stato="copiato"] { background: #f0f7f1; border-color: #2f7d3a; }
.copiabile { display: inline-block; user-select: all; -webkit-user-select: all; font-weight: 650; color: var(--inchiostro); }

/* ---------- storie ---------- */
.storia { border: 1px solid var(--bordo); border-radius: 14px; background: var(--carta-alta); padding: 1.3rem; margin: 0 0 1rem; }
.storia h2 { margin: 0 0 .6rem; font-size: 1.3rem; }
.storia dl { margin: 0; }
.storia dt { font-size: 1rem; text-transform: uppercase; letter-spacing: .04em; color: var(--inchiostro-lieve); font-weight: 700; margin: .8rem 0 .15rem; }
.storia dd { margin: 0; }
.frase-usata { font-family: var(--serif); font-size: 1.1rem; font-style: italic; color: var(--allerta-scuro); }

/* ---------- quiz ---------- */
.domanda { border: 1px solid var(--bordo); border-radius: 14px; background: var(--carta-alta); padding: 1.3rem; margin: 0 0 1.1rem; }
.domanda h2 { margin: 0 0 .3rem; font-size: 1.25rem; }
.domanda .scena { color: var(--inchiostro-tenue); margin-bottom: 1rem; }
.scelte { display: grid; gap: .55rem; }
.scelta {
  font-family: inherit; font-size: 1rem; text-align: left; cursor: pointer;
  background: var(--carta); border: 1px solid var(--bordo-forte);
  border-radius: 10px; padding: .85rem 1rem; color: var(--inchiostro);
}
.scelta:hover { border-color: var(--inchiostro-lieve); }
.scelta[data-stato="giusta"] { background: #f0f7f1; border-color: #2f7d3a; font-weight: 650; }
.scelta[data-stato="sbagliata"] { background: var(--allerta-tenue); border-color: var(--allerta); }
.scelta[data-stato="giusta"]::after { content: " — risposta giusta"; font-weight: 700; }
.scelta[data-stato="sbagliata"]::after { content: " — non questa"; font-weight: 700; }
.spiega { margin: .9rem 0 0; padding: .9rem 1rem; border-radius: 10px; background: var(--carta); border: 1px solid var(--bordo); }
.spiega p:last-child { margin: 0; }
.punteggio { font-family: var(--serif); font-size: 1.3rem; font-weight: 700; }

/* ---------- scheda per il frigo ---------- */
.frigo { border: 3px solid var(--inchiostro); border-radius: 16px; padding: 1.6rem 1.4rem; background: #fff; margin: 1.6rem 0; }
.frigo h2 { margin: 0 0 1.2rem; font-size: 1.9rem; text-align: center; }
.frigo ol { margin: 0; padding-left: 1.6rem; }
.frigo li { font-size: 1.35rem; line-height: 1.45; font-weight: 600; margin-bottom: 1rem; }
.frigo .chiusa { margin: 1.4rem 0 0; font-size: 1.05rem; text-align: center; color: var(--inchiostro-tenue); }
.btn-stampa {
  font-family: inherit; font-size: 1rem; font-weight: 600; cursor: pointer;
  background: var(--allerta-scuro); color: #fff; border: 0;
  border-radius: 10px; padding: .85rem 1.3rem;
}

/* ---------- modulo di segnalazione ---------- */
.modulo { margin: 1.6rem 0; }
.campo { margin: 0 0 1.4rem; }
.campo label { display: block; margin-bottom: .45rem; }
.aiuto { color: var(--inchiostro-tenue); font-weight: 400; }
.modulo textarea, .modulo input[type="text"], .modulo input[type="email"] {
  display: block; width: 100%;
  font-family: inherit; font-size: 1rem; line-height: 1.5;
  color: var(--inchiostro); background: var(--carta-alta);
  border: 1px solid var(--bordo-forte); border-radius: 10px;
  padding: .7rem .8rem;
}
.modulo textarea:focus-visible,
.modulo input:focus-visible { outline: 3px solid var(--allerta); outline-offset: 2px; }
.btn-invia {
  font-family: inherit; font-size: 1.05rem; font-weight: 600; cursor: pointer;
  background: var(--allerta-scuro); color: #fff; border: 0;
  border-radius: 10px; padding: .9rem 1.4rem;
}
.btn-invia:hover { background: var(--allerta); }

/* La trappola per i robot: fuori dallo schermo, invisibile a chi legge e
   agli screen reader (aria-hidden nel markup), ma presente nel DOM. */
.trappola { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Messaggi d'errore: compaiono solo quando il form rimanda qui con
   un'ancora. È CSS :target, quindi funziona senza JavaScript. */
.errore { display: none; }
.errore:target {
  display: block;
  border-left: 4px solid var(--allerta); background: var(--allerta-tenue);
  padding: 1rem 1.1rem; margin: 1.4rem 0; border-radius: 0 10px 10px 0;
}
.errore p { margin: 0; }

footer {
  margin: 3.2rem 0 0; padding: 1.6rem 0 2.6rem;
  border-top: 1px solid var(--bordo);
  font-size: 1rem; line-height: 1.7; color: var(--inchiostro-lieve);
}
footer p { margin: 0 0 .3rem; }
footer a { color: var(--inchiostro-lieve); }

@media (min-width: 34rem) {
  h1 { font-size: 2.7rem; }
  .strumenti ul { grid-template-columns: 1fr 1fr; }
  .frigo li { font-size: 1.6rem; }
}

/* ---------- stampa: la scheda del frigo su un A4 ---------- */
@media print {
  @page { size: A4 portrait; margin: 14mm; }
  .barra, .menu, footer, .btn-stampa, .salta, .non-stampare { display: none !important; }
  html { font-size: 15pt; }
  body { background: #fff; }
  .contenitore { max-width: none; padding: 0; }
  h1 { font-size: 24pt; margin: 0 0 6mm; }
  .frigo { border: 3pt solid #000; page-break-inside: avoid; margin: 0; }
  .frigo h2 { font-size: 20pt; }
  .frigo li { font-size: 17pt; margin-bottom: 5mm; }
  .frigo .chiusa { color: #000; }
  a { text-decoration: none; color: #000; }
}
