/* Card Fee Defender: one column for the phone, light and dark like the phone, the same build as Panel Defender, Car
   Repo Defender and Busta Giusta (cards, line icons, soft shadows) with a deep teal green. Every text keeps a contrast
   of 4.5:1. */
:root {
  --bg: #f3f6f5;
  --superficie: #ffffff;
  --superficie-2: #f7faf9;
  --testo: #142321;
  --testo-2: #384a47;
  --tenue: #566b67;
  --bordo: #dfe8e6;
  --bordo-forte: #c6d5d2;
  --marca: #0f6b5b;
  --marca-2: #138a75;
  --marca-tenue: #dff2ed;
  --su-marca: #ffffff;
  --verde: #15803d;
  --giallo: #b45309;
  --rosso: #b91c1c;
  --grigio: #5b6672;
  --errore-testo: #8c1d13;
  --errore-sfondo: #fdecea;
  --ombra-1: 0 1px 2px rgba(16, 35, 42, 0.06), 0 1px 1px rgba(16, 35, 42, 0.04);
  --ombra-2: 0 10px 28px rgba(16, 35, 42, 0.12);
  --raggio: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1513;
    --superficie: #15201d;
    --superficie-2: #111a18;
    --testo: #e9f3f1;
    --testo-2: #c3d4d0;
    --tenue: #9db3ae;
    --bordo: #24332f;
    --bordo-forte: #31453f;
    --marca: #5fd3b8;
    --marca-2: #9be6d3;
    --marca-tenue: #133029;
    --su-marca: #062019;
    --verde: #4ade80;
    --giallo: #fbbf24;
    --rosso: #f87171;
    --grigio: #a3acbd;
    --errore-testo: #f4b8b0;
    --errore-sfondo: #3a1b17;
    --ombra-1: none;
    --ombra-2: 0 10px 28px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--testo);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.sprite { display: none; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icona { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

.testata {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: max(12px, env(safe-area-inset-top)) 16px 12px; background: var(--marca); color: var(--su-marca);
}
.marchio { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; }
.lingua { display: flex; align-items: center; gap: 6px; }
.lingua select {
  background: transparent; color: inherit; border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 10px;
  padding: 6px 8px; font: inherit; font-size: 15px;
}
@media (prefers-color-scheme: dark) { .lingua select { border-color: rgba(42, 26, 5, 0.4); } }
/* The open list follows the theme: dark text on light in light mode, light text on dark in dark mode. */
.lingua option { background: var(--superficie); color: var(--testo); }

main { max-width: 560px; margin: 0 auto; padding: 20px 16px max(32px, env(safe-area-inset-bottom)); }
.schermata { display: flex; flex-direction: column; gap: 16px; }
h1 { font-size: 28px; line-height: 1.2; margin: 4px 0 0; }
h2 { font-size: 19px; line-height: 1.3; margin: 0; display: flex; align-items: center; gap: 8px; }
h3 { font-size: 16px; line-height: 1.3; margin: 0; display: flex; align-items: center; gap: 8px; }
p { margin: 0; }
.lead { font-size: 17px; color: var(--testo-2); }
.aiuto { font-size: 14px; color: var(--tenue); display: flex; gap: 8px; align-items: flex-start; }
.aiuto .icona { width: 18px; height: 18px; margin-top: 1px; }

.card { background: var(--superficie); border: 1px solid var(--bordo); border-radius: var(--raggio); box-shadow: var(--ombra-1); padding: 16px; }
.consigli ul { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 4px; color: var(--testo-2); }

.bottone {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 18px;
  border-radius: 14px; border: 1px solid transparent; font: inherit; font-weight: 650; font-size: 17px; cursor: pointer;
  text-align: center; text-decoration: none;
}
.bottone.primario { background: var(--marca); color: var(--su-marca); box-shadow: var(--ombra-2); }
.bottone.primario:disabled { opacity: 0.45; box-shadow: none; cursor: default; }
.bottone.secondario { background: var(--marca-tenue); color: var(--marca); border-color: var(--bordo-forte); }
.bottone.testo { background: none; color: var(--marca); min-height: 44px; }
.bottone.piccolo { min-height: 44px; font-size: 15.5px; padding: 8px 14px; }
.indietro { align-self: flex-start; padding-left: 0; }
.aggiungi input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.bottone:focus-visible, .lingua select:focus-visible, textarea:focus-visible, input:focus-visible {
  outline: 3px solid var(--marca-2); outline-offset: 2px;
}

/* The home screen: the country of the policy, the files, the story. */
.paese { display: grid; gap: 8px; }
.paese > span { font-weight: 600; }
.file { display: grid; gap: 10px; }
.pagine { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.pagine:empty { display: none; }
.pagine li { position: relative; background: var(--superficie-2); border: 1px solid var(--bordo); border-radius: 12px; overflow: hidden; }
.pagine img, .pagine .pdf { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.pagine .pdf { display: flex; align-items: center; justify-content: center; color: var(--marca); background: var(--marca-tenue); }
.pagine .pdf .icona { width: 40px; height: 40px; }
.pagine .etichetta { display: block; padding: 4px 8px; font-size: 13px; color: var(--tenue); }
.pagine button {
  position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border-radius: 50%; border: none;
  background: rgba(16, 35, 42, 0.72); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.pagine button .icona { width: 18px; height: 18px; }

.nota { display: grid; gap: 6px; font-weight: 600; }
textarea, .campo input {
  width: 100%; border: 1px solid var(--bordo-forte); border-radius: 12px; padding: 10px 12px; font: inherit; font-weight: 400;
  background: var(--superficie); color: var(--testo);
}
textarea { resize: vertical; }
.errore { background: var(--errore-sfondo); color: var(--errore-testo); border-radius: 12px; padding: 10px 12px; }
.privacy { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--tenue); }

.rotella {
  width: 48px; height: 48px; margin: 24px auto 4px; border-radius: 50%;
  border: 4px solid var(--marca-tenue); border-top-color: var(--marca); animation: gira 1s linear infinite;
}
@keyframes gira { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .rotella { animation-duration: 3s; } }
#attesa h2 { justify-content: center; text-align: center; }
.passi-attesa { margin: 0 auto; padding-left: 22px; color: var(--tenue); display: grid; gap: 6px; }
.passi-attesa li.fatto { color: var(--testo); }
.passi-attesa li.fatto::marker { color: var(--verde); }

/* Questions: on their own screen when the result needs them, inside the result when they only add a reason. */
.elenco-domande { display: grid; gap: 18px; }
.domanda { display: grid; gap: 10px; }
.domanda .testo { font-weight: 650; font-size: 17px; }
.domanda .aiuto { display: block; }
.scelte { display: flex; flex-wrap: wrap; gap: 8px; }
.scelte button {
  flex: 1 1 30%; min-height: 48px; border-radius: 12px; border: 1px solid var(--bordo-forte); background: var(--superficie);
  color: var(--testo); font: inherit; font-weight: 600; cursor: pointer; padding: 8px 10px;
}
.scelte button[aria-pressed="true"] { background: var(--marca); color: var(--su-marca); border-color: var(--marca); }

/* The result. */
.risultato-card { display: grid; gap: 14px; }
.verdetto { display: flex; gap: 10px; align-items: center; padding: 14px 14px; border-radius: 12px; color: #fff; font-size: 19px; font-weight: 700; line-height: 1.3; }
.verdetto .icona { width: 28px; height: 28px; }
.verdetto.in_linea { background: #15803d; }
.verdetto.un_po_sotto { background: #b45309; }
.verdetto.molto_sotto { background: #b91c1c; }
.verdetto.dati_da_completare { background: #5b6672; }
.verdetto.fuori_ambito { background: #9f1239; }
.verdetto.non_e_un_caso { background: #5b6672; }
.importi { display: grid; gap: 4px; margin: 6px 0 2px; }
.importi p { margin: 0; display: flex; justify-content: space-between; gap: 12px; }
.importi .chiesto { color: var(--testo-2); }
.importi .offerto { color: var(--testo-2); }
.importi .da_chiarire { color: var(--giallo); font-weight: 700; }
.importi .interessi { color: var(--verde); font-weight: 700; }
.importo-grande { font-size: 22px; font-weight: 750; }
.consiglio { font-size: 16.5px; font-weight: 600; }
.voci { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.voci li { display: flex; gap: 10px; align-items: flex-start; }
.voci li > .icona { margin-top: 2px; }
.voci li.forte > .icona { color: var(--verde); }
.voci li.ostacolo > .icona { color: var(--rosso); }
.voci li.info > .icona { color: var(--grigio); }
.voci .titolo { font-weight: 650; }
.voci .dettaglio { font-size: 14.5px; color: var(--testo-2); }
.passi { margin: 0; padding-left: 22px; display: grid; gap: 8px; color: var(--testo-2); }
.passi li:first-child { color: var(--testo); font-weight: 600; }
.sezione { display: grid; gap: 8px; }
.sezione > h3 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--tenue); }
.opzionali { display: grid; gap: 14px; border-top: 1px solid var(--bordo); padding-top: 14px; }
.documenti { display: grid; gap: 8px; }
.documenti .quando { font-size: 13.5px; color: var(--tenue); margin-top: -4px; }
.avviso { font-size: 13.5px; color: var(--tenue); }

/* The letter: the form for the person's data, then the text and the PDF. */
.modulo { display: grid; gap: 14px; }
.campi { display: grid; gap: 12px; }
.campo { display: grid; gap: 4px; font-weight: 600; font-size: 15px; }
.campo .aiuto { font-weight: 400; display: block; }
/* The text's language: the same colours as the other fields, so it reads in light and in dark. */
.campo select {
  width: 100%; font: inherit; font-weight: 400; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--bordo-forte);
  background: var(--superficie); color: var(--testo);
}
.campo select:disabled { opacity: 1; background: var(--superficie-2); color: var(--tenue); }
.campo select option { background: var(--superficie); color: var(--testo); }
.letto { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 8px 0 0; font-size: 15px; }
.letto dt { color: var(--tenue, #546870); }
.letto dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.istruzioni { margin: 10px 0 0; padding-left: 22px; display: grid; gap: 8px; color: var(--testo-2); }
.testo-documento {
  margin: 0; white-space: pre-wrap; word-break: break-word; font: 15px/1.5 "Times New Roman", Times, "Noto Serif", serif; background: var(--superficie);
  border: 1px solid var(--bordo); border-radius: 12px; padding: 14px; max-height: 60vh; overflow: auto;
}
.pronto { display: grid; gap: 14px; }

/* The country of the policy: a list, with a guess from the phone's language. */
.paese > span { display: flex; align-items: center; gap: 6px; }
.campo select:focus-visible { outline: 3px solid var(--marca-2); outline-offset: 2px; }

/* Card Fee Defender: the plant step, the free result, the report with its chart. */
.etichetta-campo { display: flex; align-items: center; gap: 6px; }
.campo input[type="month"], .campo input[type="number"] { min-height: 48px; }
.luogo { display: grid; gap: 12px; }
.cerca { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.cerca .bottone { min-height: 48px; }
.trovato { display: flex; gap: 8px; align-items: center; color: var(--verde); font-weight: 650; }
.domanda .testo { display: flex; align-items: center; gap: 8px; }
.scelte button { flex: 1 1 28%; }
.domanda.card { gap: 12px; }
.controllare { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; background: var(--superficie-2); border: 1px solid var(--bordo); }
.controllare .titolo { font-weight: 700; }
.controllare .dettaglio { font-size: 14.5px; color: var(--testo-2); }
.controllare.si > .icona { color: var(--giallo); }
.controllare.no > .icona { color: var(--verde); }
.controllare.dipende > .icona { color: var(--marca); }
.rimborso { display: grid; gap: 8px; border-top: 1px solid var(--bordo); padding-top: 14px; }
.rimborso h3 { margin: 0; font-size: 16px; }
.rimborso p { margin: 0; color: var(--testo-2); }
.rimborso .bottone.testo { justify-self: start; padding-left: 0; }
.rimborso.fatto { grid-template-columns: auto 1fr; align-items: start; gap: 10px; }
.rimborso.fatto > .icona { color: var(--verde); }
.offerta { display: grid; gap: 10px; border-top: 1px solid var(--bordo); padding-top: 14px; }
.offerta ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; color: var(--testo-2); }
.piede { max-width: 560px; margin: 0 auto; padding: 0 16px max(24px, env(safe-area-inset-bottom)); font-size: 12.5px; color: var(--tenue); }
.piede .legale a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

.rapporto { display: grid; gap: 14px; }
.titolo-rapporto { font-size: 24px; }
.sezione-rapporto { display: grid; gap: 10px; }
.sezione-rapporto p { color: var(--testo-2); }
.grafico { width: 100%; height: auto; display: block; }
.grafico .griglia { stroke: var(--bordo); stroke-width: 1; }
.grafico .asse { fill: var(--tenue); font-size: 9px; }
.grafico .fascia { fill: var(--marca-tenue); stroke: var(--bordo-forte); stroke-width: 0.5; }
.grafico .vero { fill: var(--marca); }
.grafico .vero.sotto { fill: var(--rosso); }
.legenda { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13.5px; color: var(--tenue); }
.legenda .chiave { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.legenda .chiave.vero { background: var(--marca); }
.legenda .chiave.sotto { background: var(--rosso); }
.legenda .chiave.fascia { background: var(--marca-tenue); border: 1px solid var(--bordo-forte); }
.tabella { overflow-x: auto; }
.tabella table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.tabella th, .tabella td { padding: 6px 6px; border-bottom: 1px solid var(--bordo); text-align: right; white-space: nowrap; }
.tabella th:first-child, .tabella td:first-child { text-align: left; }
.tabella th { color: var(--tenue); font-weight: 600; font-size: 12.5px; white-space: normal; }
.causa { display: grid; gap: 6px; padding: 12px; border-radius: 12px; background: var(--superficie-2); border: 1px solid var(--bordo); }
.causa h3 { color: var(--testo); }
.causa .titolo-controlli { font-weight: 650; color: var(--testo); }
.causa ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; color: var(--testo-2); }
.avvertenze { display: grid; gap: 10px; }
.avvertenze p { display: flex; gap: 8px; align-items: flex-start; font-size: 14.5px; }
.avvertenze .icona { color: var(--giallo); margin-top: 1px; }

@media print {
  .testata, .piede, .bottone, #impianto, #schermate, #attesa, #domande, #risultato { display: none !important; }
  body { background: #fff; color: #000; }
  main { max-width: none; padding: 0; }
  .card { box-shadow: none; break-inside: avoid; }
}
/* The name stays on one line next to the language menu, also on a narrow phone. */
.marchio span { white-space: nowrap; }
.lingua select { max-width: 132px; }

/* Block 3: the list of checks on this phone, the code, the report to open (a code or the payment), the private link. */
.avviso-info { background: var(--marca-tenue); color: var(--testo); border-radius: 12px; padding: 10px 12px; font-size: 15px; }
.storico { display: grid; gap: 8px; }
.storico ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.storico button {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--bordo); background: var(--superficie); color: var(--testo); font: inherit; cursor: pointer;
}
.storico .testo { flex: 1; display: grid; gap: 2px; }
.storico .testo span { font-size: 14px; color: var(--tenue); }
.storico .v-in_linea > button > .icona:first-child { color: var(--verde); }
.storico .v-un_po_sotto > button > .icona:first-child { color: var(--giallo); }
.storico .v-molto_sotto > button > .icona:first-child { color: var(--rosso); }
.sblocco { display: grid; gap: 12px; }
.testa-sblocco { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.prezzo { font-size: 20px; font-weight: 750; color: var(--marca); white-space: nowrap; }
.lead-sblocco { color: var(--testo-2); }
.elenco-rapporto { margin: 0; padding-left: 20px; display: grid; gap: 4px; color: var(--testo-2); }
.sblocco .errore:empty, .sblocco .stato:empty { display: none; }
.stato { color: var(--marca); font-weight: 600; }
.nota-pagamento { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--tenue); }
.nota-pagamento a { color: var(--marca); }
.sotto { font-size: 14.5px; color: var(--tenue); }
.modulo-codice { display: grid; gap: 6px; }
.modulo-codice label { font-weight: 600; font-size: 15px; }
.riga-codice { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.riga-codice input {
  width: 100%; border: 1px solid var(--bordo-forte); border-radius: 12px; padding: 10px 12px; font: inherit;
  background: var(--superficie); color: var(--testo); text-transform: uppercase; letter-spacing: 0.04em;
}
.link-privato { display: grid; gap: 10px; }
.link-privato p { color: var(--testo-2); font-size: 15px; }
.link-cancella {
  justify-self: start; display: flex; align-items: center; gap: 6px; background: none; border: none; padding: 6px 0;
  color: var(--rosso); font: inherit; font-size: 15px; cursor: pointer;
}

/* Card Fee Defender: the big true rate, the band, the questions with an amount, the text for the provider. */
.tasso-grande { display: grid; gap: 2px; margin: 6px 0 10px; }
.tasso-grande .etichetta { font-weight: 650; color: var(--testo-2); }
.tasso-grande .numero { font-size: 42px; font-weight: 800; line-height: 1.1; color: var(--testo); letter-spacing: -0.5px; }
.tasso-grande .aiuto { font-size: 14px; color: var(--tenue); }
.campo-importo { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.campo-importo .bottone { min-height: 48px; }
.lettera { white-space: pre-wrap; font-size: 15px; line-height: 1.55; background: var(--superficie-2);
  border: 1px solid var(--bordo); border-radius: 12px; padding: 12px 14px; margin: 8px 0; color: var(--testo); }
/* The «PRO» subscription: the offer under the report's price, and its status with the code to save. */
.pro-offerta { border-top: 1px solid var(--bordo); margin-top: 14px; padding-top: 12px; display: grid; gap: 8px; }
.pro-offerta h3 { margin: 0; font-size: 17px; color: var(--marca); }
.pro-offerta p { margin: 0; color: var(--testo-2); }
.pro-stato { display: grid; gap: 8px; border: 1px solid var(--marca); background: var(--marca-tenue); }
.pro-stato h2 { display: flex; gap: 8px; align-items: center; margin: 0; font-size: 18px; color: var(--marca); }
.pro-stato p { margin: 0; }
/* Mexico: the express consent for financial data, under the button that gives it. */
.consenso { font-size: 14px; color: var(--testo-2); margin: 8px 0 0; }
.consenso a { color: var(--marca); }
