/* La fotografia del tuo italiano · solo ciò che manca a hirundo.css
   Stesse regole del sito: un carattere, quattro dimensioni, un accento. */

.punti { list-style: none; padding: 0; margin-top: 1.5rem; display: grid; gap: 10px; max-width: 34rem; }
.punti li { position: relative; padding-left: 28px; }
.punti li::before { content: ''; position: absolute; left: 2px; top: 0.5em; width: 14px; height: 8px;
  border-left: 2px solid var(--red); border-bottom: 2px solid var(--red); transform: rotate(-45deg); }
.parti-elenco { margin-top: 2.25rem; padding: 18px 0 0 1.4em; border-top: 1px solid var(--line);
  font-size: var(--s); color: var(--muted); display: grid; gap: 4px; max-width: 34rem; }
.parti-elenco b { color: var(--ink); font-weight: 700; }

/* ── test ─────────────────────────────────────────────── */
.test { padding-top: 28px; padding-bottom: 56px; }
.test-testa { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: var(--s); color: var(--muted); }
.test-testa b { color: var(--red); }
.test .progress { height: 6px; margin: 10px 0 28px; }
.test .progress > div { transition: width .3s; }
.test h2 { font-size: var(--l); margin-bottom: 1rem; }
.test .consegna { color: var(--muted); font-size: var(--s); margin-bottom: 1rem; }
.scheda-testo { white-space: pre-line; background: var(--soft); border-left: 3px solid var(--ink);
  border-radius: 0 8px 8px 0; padding: 16px 18px; margin-bottom: 1.25rem; color: var(--ink); }
.scheda-testo::first-line { font-weight: 700; }
.test .opzioni { margin-top: 0.5rem; }
.test .opz { min-height: 54px; font-size: var(--m); }
.test .opz[aria-pressed="true"] { border-color: var(--ink); background: var(--soft); box-shadow: inset 4px 0 0 var(--red); }
.test-azioni { display: flex; gap: 12px; margin-top: 1.75rem; flex-wrap: wrap; }
.test-azioni .btn { flex: 1 1 200px; }
.btn[disabled] { opacity: .45; cursor: default; }
.btn[disabled]:hover { background: var(--red); border-color: var(--red); }
.test-piede { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: var(--s); color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; align-items: center; }
.btn-testo { font: inherit; background: none; border: 0; padding: 12px 0; min-height: 48px; color: var(--red); font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.etichetta-sp { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--red); border: 1px dashed var(--red); border-radius: 4px; padding: 1px 6px; margin-bottom: 10px; }

/* ascolto */
.ascolta-box { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--soft); border-radius: 10px; padding: 16px; margin-bottom: 1.25rem; }
.ascolta-box .btn { min-width: 0; flex: 0 0 auto; padding: 12px 22px; }
.ascolta-box .resta { font-size: var(--s); color: var(--muted); }
.ascolta-box .resta b { color: var(--ink); }

/* autovalutazione */
.posso { list-style: none; padding: 0; display: grid; gap: 0; }
.posso li { padding: 16px 0; border-top: 1px solid var(--line); }
.posso li:last-child { border-bottom: 1px solid var(--line); }
.posso .ab { font-size: var(--s); color: var(--muted); display: block; margin-bottom: 2px; }
.posso .fr { color: var(--ink); font-weight: 700; }
.tre { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.tre button { font: inherit; font-size: var(--s); min-height: 48px; padding: 6px 4px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); cursor: pointer; }
.tre button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 700; }

/* ── risultato ────────────────────────────────────────── */
.risultato { padding-top: 32px; padding-bottom: 64px; }
.risultato h1 { margin-bottom: 0.4rem; }
.risultato .data { font-size: var(--s); color: var(--muted); }
.ris-griglia { display: grid; gap: 40px; margin-top: 2rem; }
.ris-griglia > * { min-width: 0; }
.blocco-ris h2 { font-size: var(--l); margin-bottom: 1rem; }

.barre { display: grid; gap: 18px; }
.barra .riga { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 6px; }
.barra .nome { font-weight: 700; color: var(--ink); }
.barra .val { font-weight: 700; color: var(--red); white-space: nowrap; }
.barra .nota-auto { font-size: var(--s); color: var(--muted); font-weight: 400; }
.scala { position: relative; height: 18px; border-radius: 4px; background:
  linear-gradient(90deg, transparent calc(25% - 1px), #fff calc(25% - 1px), #fff 25%, transparent 25%,
                         transparent calc(50% - 1px), #fff calc(50% - 1px), #fff 50%, transparent 50%,
                         transparent calc(75% - 1px), #fff calc(75% - 1px), #fff 75%, transparent 75%), var(--line); overflow: hidden; }
.scala > i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--red); border-radius: 4px 0 0 4px; }
.barra.auto .scala > i { background: repeating-linear-gradient(135deg, var(--red) 0 6px, #c98a8a 6px 10px); }
.tacche { display: grid; grid-template-columns: repeat(4, 1fr); font-size: 13px; color: var(--muted); margin-top: 4px; }
.tacche span { padding-left: 4px; }
.legenda { font-size: var(--s); color: var(--muted); margin-top: 1rem; display: flex; gap: 8px; align-items: center; }
.legenda i { display: inline-block; width: 28px; height: 10px; border-radius: 2px; background: repeating-linear-gradient(135deg, var(--red) 0 6px, #c98a8a 6px 10px); }

.cert-frase { font-size: var(--l); line-height: 1.4; color: var(--ink); font-weight: 700; }
.cert-frase + p { margin-top: 0.75rem; }

.schede { display: grid; gap: 12px; }
.scheda { display: block; border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: 8px; padding: 16px 18px; text-decoration: none; color: var(--text); background: #fff; }
.scheda:hover { border-color: var(--ink); border-left-color: var(--red); color: var(--text); }
.scheda .chi { font-size: var(--s); color: var(--muted); }
.scheda .tit { display: block; font-size: var(--l); font-weight: 700; color: var(--ink); margin-top: 2px; }
.scheda .stato { display: inline-block; font-size: 13px; font-weight: 700; color: var(--red); border: 1px solid var(--red); border-radius: 99px; padding: 0 8px; margin-left: 6px; vertical-align: 3px; }
.scheda .desc { display: block; margin-top: 4px; }
.scheda .vai { display: block; margin-top: 10px; font-weight: 700; color: var(--red); }

.avviso-stima { margin-top: 2.5rem; padding: 16px 18px; border: 1px solid var(--ink); border-radius: 8px; font-weight: 700; color: var(--ink); }
.ris-trasp { margin-top: 1.25rem; font-size: var(--s); color: var(--muted); }
.da-fare { background: #fff4d6; border: 1px dashed #b38300; color: #5b4300; border-radius: 6px; padding: 8px 12px; font-size: var(--s); }

/* tabella certificati */
.tab-scorre { overflow-x: auto; }
.tab-cert { width: 100%; border-collapse: collapse; font-size: var(--s); min-width: 520px; }
.tab-cert th { text-align: left; color: var(--muted); font-weight: 700; padding: 0 12px 8px 0; border-bottom: 1px solid var(--ink); }
.tab-cert td { vertical-align: top; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); }
.tab-cert td:first-child { color: var(--ink); font-weight: 700; width: 34%; }
.tab-cert td:last-child { color: var(--muted); width: 26%; }

/* durante il test resta solo la domanda */
body.in-corso #apertura, body.in-corso #sotto { display: none; }
body.al-risultato #apertura { display: none; }

@media (min-width: 1000px) {
  .ris-griglia { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 64px; }
  .ris-griglia .largo { grid-column: 1 / -1; }
  .test { max-width: 40rem; }
}
@media (min-width: 1000px) { .schede { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); } }

/* ── lingue e direzione ───────────────────────────────── */
[lang="ar"] { font-family: 'Noto Sans Arabic', 'Geeza Pro', 'Segoe UI', Tahoma, sans-serif; }
#test[lang="ar"], #risultato[lang="ar"] { font-size: 1.06em; line-height: 1.7; }
.contenuto-it, [lang="it"] { font-family: 'Atkinson', 'Atkinson Hyperlegible Next', system-ui, sans-serif; }
.test h2.multi { font-size: var(--m); line-height: 1.5; }
.opz { text-align: start; }
[dir="rtl"] .test .opz[aria-pressed="true"], .test [dir="rtl"].opz[aria-pressed="true"] { box-shadow: inset -4px 0 0 var(--red); }
.scheda { border-left-width: 1px; border-inline-start: 4px solid var(--red); }
.scheda:hover { border-inline-start-color: var(--red); }
[dir="rtl"] .freccia { display: inline-block; transform: scaleX(-1); }
.posso .sp { color: var(--red); }
.posso .fr-tr { display: block; margin-top: 2px; font-size: var(--s); color: var(--muted); font-style: italic; }
.nota-voce { margin: -0.5rem 0 1.25rem; }
.scala, .tacche { direction: ltr; }
.posso .fr[dir="ltr"] { display: block; text-align: left; }

/* scheda di orientamento */
.scheda-salva { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); display: grid; gap: 8px; max-width: 34rem; }
.scheda-salva label { font-weight: 700; color: var(--ink); }
.scheda-salva input { font: inherit; min-height: 52px; padding: 10px 14px; border: 1px solid #bdb6ad; border-radius: 8px; color: var(--ink); background: #fff; width: 100%; }
.scheda-salva input:focus { outline: 2px solid var(--red); outline-offset: 1px; }
.scheda-salva + .actions { margin-top: 1.5rem; }
.scheda-salva h2 { font-size: var(--l); margin-bottom: 0.25rem; }
.scheda-salva > p { margin-bottom: 0.5rem; }
.scheda-salva label { margin-top: 0.5rem; }
.pdf-azioni { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1rem; }
.pdf-azioni .btn { flex: 1 1 180px; }
.scheda-salva .btn-testo { padding: 0; min-height: 0; }
.pdf-esito:empty { display: none; }
.pdf-esito { color: var(--ink); font-weight: 700; }

/* tabella dei certificati sul telefono: ogni riga diventa una scheda, niente scorrimento laterale */
@media (max-width: 759px) {
  .tab-scorre { overflow: visible; }
  .tab-cert { min-width: 0; font-size: var(--m); }
  .tab-cert thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .tab-cert, .tab-cert tbody, .tab-cert tr, .tab-cert td { display: block; width: auto; }
  .tab-cert tr { padding: 16px 0; border-bottom: 1px solid var(--line); }
  .tab-cert tr:first-child { border-top: 1px solid var(--ink); }
  .tab-cert td { padding: 0; border: 0; }
  .tab-cert td:first-child { width: auto; font-size: var(--m); }
  .tab-cert td:nth-child(2) { margin-top: 4px; }
  .tab-cert td:last-child { width: auto; margin-top: 6px; font-size: var(--s); }
  .tab-cert td:last-child::before { content: 'Dove è scritto: '; }
  .tab-cert tr:nth-child(n+5) td:last-child { display: none; }
}
