/* ==========================================================================
   Fidia 5 stelle – stile sopra Bootstrap Italia (kit Designers Italia)
   Scala tipografica contenuta, Titillium Web, contrasti WCAG 2.0 AAA (testo almeno 7:1).
   ========================================================================== */
:root {
  --f5-blu: #004d99;          /* blu PA scurito: 8,3:1 con il bianco (AAA) */
  --f5-blu-scuro: #003a73;
  --f5-blu-notte: #00264d;
  --f5-blu-tenue: #f0f6fc;
  --f5-azzurro: #1ec8e8;      /* dal marchio Fidia: solo su fondi scuri */
  --f5-testo: #1a1a1a;
  --f5-titoli: #17324d;
  --f5-grigio: #3e5063;       /* 8,3:1 su bianco, 7,6:1 sul fondo azzurro */
  --f5-bordo: #d9dadb;
  --f5-oro: #6b4400;          /* stelle: 9:1 su bianco */
  --f5-verde: #005c31;
  --f5-rosso: #a3001b;
  --f5-ambra: #7a4400;
  --f5-raggio: 6px;
  --bs-body-font-size: 1rem;
  --bs-body-line-height: 1.6;
}

/* --- Tipografia ------------------------------------------------------- */
html { font-size: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { font-family: "Titillium Web", Geneva, Tahoma, sans-serif; font-size: 1rem; line-height: 1.6; color: var(--f5-testo);
       -webkit-font-smoothing: antialiased; }
/* Titillium avvicina troppo «//» (coppia di crenatura): negli indirizzi web e nel codice la disattiviamo */
a, code, kbd, samp, .text-break { font-kerning: none; font-variant-ligatures: none; }
p, li, td, th, dd, dt, label, .form-text, .btn { font-size: 1rem; }
h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6 { font-family: "Titillium Web", Geneva, Tahoma, sans-serif; color: var(--f5-titoli);
       font-weight: 700; letter-spacing: 0; }
h1, .h1 { font-size: 1.75rem; line-height: 1.25; margin-bottom: .75rem; }
h2, .h2 { font-size: 1.375rem; line-height: 1.3; margin-bottom: .75rem; }
h3, .h3 { font-size: 1.1875rem; line-height: 1.35; margin-bottom: .5rem; }
h4, .h4 { font-size: 1.0625rem; line-height: 1.4; font-weight: 600; margin-bottom: .5rem; }
h5, .h5 { font-size: 1rem; line-height: 1.45; font-weight: 600; }
h6, .h6 { font-size: .8125rem; line-height: 1.45; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--f5-grigio); }
@media (min-width: 992px) {
  h1, .h1 { font-size: 2.125rem; }
  h2, .h2 { font-size: 1.5rem; }
  h3, .h3 { font-size: 1.25rem; }
}
.lead { font-size: 1.125rem; line-height: 1.6; font-weight: 400; color: #33485c; }
small, .small { font-size: .875rem; }
.text-secondary { color: var(--f5-grigio) !important; }
code, .f5-mono, .fidia-codice, .fidia-url { font-family: "Roboto Mono", ui-monospace, monospace; }
code { color: #8a1538; font-size: .875em; }
a { color: var(--f5-blu); text-underline-offset: .15em; }
a:hover { color: var(--f5-blu-scuro); }
:focus-visible { outline: 3px solid #ffbf47 !important; outline-offset: 2px; box-shadow: 0 0 0 5px #00264d !important; }

/* --- Skip link -------------------------------------------------------- */
.skiplinks a { position: absolute; z-index: 2000; top: .5rem; left: .5rem; padding: .5rem 1rem; background: #fff; color: var(--f5-blu-scuro);
               font-weight: 600; border-radius: 4px; }

/* --- Header ----------------------------------------------------------- */
.f5-header .it-header-slim-wrapper { background: var(--f5-blu-notte); padding: 0; }
.f5-header .it-header-slim-wrapper-content { min-height: 44px; padding: 0; }
.f5-header .it-header-slim-wrapper a.navbar-brand.f5-slim-brand { font-size: .875rem; font-weight: 600; color: #fff; }
.f5-utente { color: #fff; font-size: .875rem; margin-right: 1rem; }
.f5-utente-ente { color: #c9dcf0; }
.f5-slim-link { color: #fff !important; font-size: .875rem; font-weight: 600; margin-right: 1rem; text-decoration: none; }
.f5-slim-link:hover { text-decoration: underline; }
.f5-slim-btn, .f5-slim-btn-chiaro { font-size: .875rem !important; padding: .3rem .9rem !important; line-height: 1.5 !important; }
.f5-slim-btn { background: transparent !important; border: 1px solid rgba(255,255,255,.6) !important; color: #fff !important; }
.f5-slim-btn:hover { background: rgba(255,255,255,.12) !important; }
.f5-slim-btn-chiaro { background: #fff !important; color: var(--f5-blu-notte) !important; border: 0 !important; }
.f5-slim-btn-chiaro:hover { background: #e6f0fa !important; }

.f5-header .it-header-center-wrapper { background: var(--f5-blu); height: auto; padding: 1.25rem 0; }
.f5-header .it-header-center-content-wrapper { padding: 0; }
.f5-brand { display: flex; align-items: center; gap: .875rem; text-decoration: none; }
.f5-brand-marchio { width: 40px; height: 40px; flex: none; }
.f5-header .it-brand-wrapper .it-brand-title { font-size: 1.375rem; font-weight: 700; line-height: 1.15; color: #fff; }
.f5-header .it-brand-wrapper .it-brand-tagline { font-size: .875rem; font-weight: 400; color: #e6f0fa; margin-top: .125rem; }
@media (min-width: 992px) {
  .f5-header .it-header-center-wrapper { padding: 1.5rem 0 1rem; }
  .f5-brand-marchio { width: 48px; height: 48px; }
  .f5-header .it-brand-wrapper .it-brand-title { font-size: 1.625rem; }
}
.f5-btn-header { border: 2px solid #fff !important; color: #fff !important; font-size: .9375rem !important; padding: .45rem 1rem !important;
                 box-shadow: none !important; }
.f5-btn-header:hover { background: #fff !important; color: var(--f5-blu) !important; }

.f5-header .it-header-navbar-wrapper { background: var(--f5-blu); }
.f5-header .navbar .navbar-collapsable .navbar-nav li a.nav-link { font-size: 1rem; font-weight: 600; padding: .75rem 1.25rem; }
@media (min-width: 992px) { .f5-header .navbar .navbar-collapsable .navbar-nav { margin-left: -1.25rem !important; padding-left: 0 !important; } .f5-header .navbar { padding-left: 0 !important; } }
@media (min-width: 992px) { .f5-header .it-brand-wrapper { padding-left: 0; } }
@media (max-width: 991.98px) { .f5-header .it-header-navbar-wrapper { background: transparent; } .f5-header .it-brand-wrapper { padding-left: 3.5rem !important; } }
.logo-hamburger { display: flex; align-items: center; gap: .5rem; padding: 1.5rem 1.5rem .75rem; text-decoration: none; }
.f5-hamburger-titolo { font-weight: 700; color: var(--f5-titoli); font-size: 1.125rem; }
@media (min-width: 992px) { .logo-hamburger, .f5-menu-azioni { display: none !important; } }

/* --- Pagine interne --------------------------------------------------- */
main { display: block; }
main:focus { outline: none; }
.f5-pagina { padding-top: 2rem; padding-bottom: 3.5rem; }
@media (min-width: 992px) { .f5-pagina { padding-top: 2.5rem; padding-bottom: 4.5rem; } }
.f5-pagina > h1:first-child, .f5-pagina > .f5-intestazione:first-child { margin-top: 0; }
.f5-intestazione { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; }
.f5-intestazione h1 { margin-bottom: .25rem; }

.btn { font-size: 1rem; font-weight: 600; padding: .625rem 1.25rem; line-height: 1.5; border-radius: 4px; }
.btn-sm { font-size: .875rem; padding: .4rem .875rem; }
.btn-lg { font-size: 1.0625rem; padding: .8rem 1.6rem; }
.btn-outline-primary { box-shadow: inset 0 0 0 2px var(--f5-blu); }
.btn-outline-secondary { box-shadow: inset 0 0 0 2px var(--f5-grigio); color: #44576b; }

.fidia-card { border: 1px solid var(--f5-bordo); border-radius: var(--f5-raggio); padding: 1.5rem; background: #fff; height: 100%; }
.fidia-card-auto { height: auto; }
.fidia-numero { font-size: 1.75rem; font-weight: 700; line-height: 1.15; margin: .25rem 0 .375rem; }
.callout { max-width: none; }
.callout .callout-title { font-size: 1rem; }

.table { font-size: .9375rem; }
.table > :not(caption) > * > * { padding: .7rem .75rem; vertical-align: middle; }
.table thead th { font-size: .8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--f5-grigio);
                  border-bottom: 2px solid var(--f5-bordo); }
.table td, .table th { font-size: inherit; }
.badge { font-size: .8125rem; font-weight: 600; padding: .3em .6em; border-radius: 4px; }
.badge.bg-warning { background: var(--f5-ambra) !important; color: #fff; }
.badge.bg-success { background: var(--f5-verde) !important; color: #fff; }
.badge.bg-danger { background: var(--f5-rosso) !important; color: #fff; }
.badge.bg-primary { background: var(--f5-blu) !important; color: #fff; }
.badge.bg-secondary { background: var(--f5-grigio) !important; color: #fff; }

/* moduli */
.form-group { margin-bottom: 2rem; }
.form-group label { font-size: 1rem; color: #44576b; }
.form-group label.active { font-size: .875rem; }
.form-control, .form-select, select { font-size: 1rem; }
.form-text { color: var(--f5-grigio); font-size: .875rem !important; }
.invalid-feedback { font-size: .875rem; color: var(--f5-rosso); }
.form-check label { font-size: 1rem; }
.select-wrapper label { font-size: .875rem; font-weight: 600; color: #44576b; }
fieldset legend.h6 { margin-bottom: .75rem; }
form h2, form .h5 { margin-bottom: 1.75rem; }
main h2 + .form-group, main h2 + p + .form-group { margin-top: 2rem; }

/* breadcrumb */
.breadcrumb { font-size: .9375rem; padding: 0; margin-bottom: 1rem; }
.breadcrumb .breadcrumb-item::before, .breadcrumb .breadcrumb-item::after,
.breadcrumb .breadcrumb-item a::before, .breadcrumb .breadcrumb-item a::after { content: none !important; }
.breadcrumb .separator { margin: 0 .5rem; color: var(--f5-grigio); }

/* componenti dell'applicazione */
.fidia-stelle { color: var(--f5-oro); display: inline-flex; align-items: center; gap: .125rem; white-space: nowrap; vertical-align: middle; }
.fidia-stelle svg { width: 1em; height: 1em; flex: none; }
.fidia-stelle svg.piena { fill: currentColor; }
.fidia-stelle svg.vuota { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.fidia-mappatura td, .fidia-mappatura th { vertical-align: middle; }
.fidia-mappatura select { min-width: 14rem; }
.fidia-esempi { font-size: .8125rem; color: var(--f5-grigio); }
.fidia-conf { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; margin-right: .35rem; }
.fidia-conf.alta { background: var(--f5-verde); }
.fidia-conf.media { background: var(--f5-ambra); }
.fidia-conf.bassa { background: var(--f5-rosso); }
.fidia-codice { font-size: 1rem; letter-spacing: .5px; }
.fidia-url { font-size: .8125rem; word-break: break-all; }
.fidia-azioni { margin-bottom: 1.5rem; }

/* --- Footer ----------------------------------------------------------- */
.f5-footer .it-footer-main { background: var(--f5-blu-notte); color: #fff; }
.f5-footer-logo { width: 220px; height: auto; }
.f5-footer-testo { color: #d6e4f2; font-size: .9375rem; max-width: 26rem; }
.f5-footer-titolo { font-size: .8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #fff;
                    border-bottom: 1px solid rgba(255,255,255,.25); padding-bottom: .5rem; margin-bottom: .75rem; }
.f5-footer-lista li { margin-bottom: .4rem; font-size: .9375rem; }
.f5-footer-lista a, .f5-footer .it-footer-small-prints a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255,255,255,.45); }
.f5-footer-lista a:hover, .f5-footer .it-footer-small-prints a:hover { text-decoration-color: #fff; }
.f5-footer .it-footer-small-prints { background: #001a33; }
.f5-footer .it-footer-small-prints-list li, .f5-footer .it-footer-small-prints-list { color: #d6e4f2; font-size: .875rem; }
.f5-footer .it-footer-small-prints-list { padding: 1rem 0; }

/* ==========================================================================
   Sito di presentazione
   ========================================================================== */
.f5-sezione { padding: 3.5rem 0; }
@media (min-width: 992px) { .f5-sezione { padding: 5rem 0; } }
.f5-sezione-tenue { background: var(--f5-blu-tenue); }
.f5-occhiello { display: inline-block; font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
                color: var(--f5-blu); margin-bottom: .5rem; }
.f5-titolo-sezione { font-size: 1.625rem; line-height: 1.25; margin-bottom: .75rem; }
@media (min-width: 992px) { .f5-titolo-sezione { font-size: 2rem; } }
.f5-intro-sezione { font-size: 1.0625rem; color: #33485c; margin-bottom: 2.5rem; }
@media (min-width: 992px) { .f5-intro-sezione { max-width: calc(66.6667% - .75rem); } } /* allineata alla colonna principale (col-lg-8) */

/* hero */
.f5-hero { background: linear-gradient(180deg, var(--f5-blu-tenue) 0%, #fff 100%); padding: 3rem 0 3.5rem; }
@media (min-width: 992px) { .f5-hero { padding: 4.5rem 0 5rem; } }
.f5-hero h1 { font-size: 2rem; line-height: 1.15; margin-bottom: 1rem; color: var(--f5-titoli); }
@media (min-width: 992px) { .f5-hero h1 { font-size: 2.75rem; } }
.f5-hero h1 em { font-style: normal; color: var(--f5-blu); }
.f5-hero .lead { font-size: 1.125rem; margin-bottom: 2rem; }
@media (min-width: 992px) { .f5-hero .lead { font-size: 1.25rem; } }
.f5-hero-azioni { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.75rem; }
.f5-garanzie { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; padding: 0; margin: 0; list-style: none; }
.f5-garanzie li { display: flex; align-items: center; gap: .4rem; font-size: .9375rem; color: #33485c; }
.f5-garanzie .icon { fill: var(--f5-verde); width: 20px; height: 20px; }

/* scala delle 5 stelle */
.f5-scala { background: #fff; border: 1px solid var(--f5-bordo); border-radius: 10px; padding: 1.5rem; box-shadow: 0 12px 32px rgba(0, 38, 77, .08); }
.f5-scala-titolo { font-size: .8125rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--f5-grigio); margin-bottom: 1rem; }
.f5-scala ol { list-style: none; margin: 0; padding: 0; }
.f5-scala li { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; align-items: center; padding: .6rem .75rem; border-radius: 6px;
               font-size: .9375rem; line-height: 1.35; }
.f5-scala li + li { margin-top: .25rem; }
.f5-scala .fidia-stelle { font-size: 1.125rem; }
.f5-scala .f5-esempio { display: block; font-size: .8125rem; color: var(--f5-grigio); }
.f5-scala li.f5-qui { background: #fff6e5; }
.f5-scala li.f5-arrivo { background: var(--f5-blu); color: #fff; }
.f5-scala li.f5-arrivo .fidia-stelle, .f5-scala li.f5-arrivo .f5-esempio { color: #fff; }
.f5-scala li.f5-arrivo strong { color: #fff; }
.f5-scala li, .f5-scala p { max-width: none; }
.f5-scala-nota { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: .8125rem; color: var(--f5-grigio); margin-top: .875rem; }

/* vantaggi */
.f5-vantaggio { height: 100%; }
.f5-vantaggio .f5-icona { width: 48px; height: 48px; border-radius: 50%; background: var(--f5-blu-tenue); display: flex; align-items: center;
                          justify-content: center; margin-bottom: 1rem; }
.f5-vantaggio .f5-icona .icon { fill: var(--f5-blu); width: 26px; height: 26px; }
.f5-vantaggio h3 { font-size: 1.125rem; margin-bottom: .4rem; }
.f5-vantaggio p { color: #33485c; margin-bottom: 0; }

/* passi */
.f5-passi { list-style: none; padding: 0; margin: 0; counter-reset: passo; }
.f5-passo { position: relative; padding-left: 3.75rem; height: 100%; }
.f5-passo::before { counter-increment: passo; content: counter(passo); position: absolute; left: 0; top: 0; width: 2.75rem; height: 2.75rem;
                    border-radius: 50%; background: var(--f5-blu); color: #fff; font-weight: 700; font-size: 1.125rem; display: flex;
                    align-items: center; justify-content: center; }
.f5-passo h3 { font-size: 1.125rem; margin-bottom: .35rem; padding-top: .45rem; }
.f5-passo p { color: #33485c; margin-bottom: 0; }

/* cosa ottieni */
.f5-elenco-spunte { list-style: none; padding: 0; margin: 0; }
.f5-elenco-spunte li { position: relative; padding-left: 2rem; margin-bottom: .875rem; }
.f5-elenco-spunte li .icon { position: absolute; left: 0; top: .15rem; width: 22px; height: 22px; fill: var(--f5-verde); }
.f5-file { background: var(--f5-blu-notte); color: #e6f0fa; border-radius: 10px; padding: 1.5rem; font-family: "Roboto Mono", monospace;
           font-size: .8125rem; line-height: 1.7; overflow-x: auto; }
.f5-file .k { color: #8fd3ff; } .f5-file .s { color: #ffd88a; } .f5-file .c { color: #9fb3c8; }
.f5-file-titolo { font-family: "Titillium Web", sans-serif; font-size: .8125rem; font-weight: 700; letter-spacing: .06em;
                  text-transform: uppercase; color: #9fd8ff; margin-bottom: .75rem; }

/* prezzi */
.f5-prezzi { border-collapse: separate; border-spacing: 0; width: 100%; background: #fff; border: 1px solid var(--f5-bordo);
             border-radius: 10px; overflow: hidden; }
.f5-prezzi caption { caption-side: top; color: var(--f5-titoli); font-size: 1rem; font-weight: 700; padding: 0 0 .75rem; }
.f5-prezzi th, .f5-prezzi td { padding: 1rem 1.25rem; border-bottom: 1px solid var(--f5-bordo); vertical-align: middle; text-align: left; }
.f5-prezzi thead th { background: var(--f5-titoli); color: #fff; font-size: .8125rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.f5-prezzi tbody tr:last-child th, .f5-prezzi tbody tr:last-child td { border-bottom: 0; }
.f5-prezzi .f5-fascia { display: inline-flex; align-items: center; justify-content: center; min-width: 2.75rem; height: 2rem; padding: 0 .5rem;
                        border-radius: 4px; background: var(--f5-blu-tenue); color: var(--f5-blu-scuro); font-weight: 700; }
.f5-prezzi .f5-importo { font-size: 1.25rem; font-weight: 700; color: var(--f5-titoli); white-space: nowrap; }
.f5-prezzi .f5-importo small { font-size: .8125rem; font-weight: 400; color: var(--f5-grigio); }
@media (max-width: 767.98px) {
  .f5-prezzi thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .f5-prezzi tr { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: .25rem 1rem; padding: 1rem;
                 border-bottom: 1px solid var(--f5-bordo); }
  .f5-prezzi th, .f5-prezzi td { padding: 0; border: 0; }
  .f5-prezzi th[scope=row] { grid-column: 1 / -1; }
  .f5-prezzi td:last-child { text-align: right; }
  .f5-prezzi tbody tr:last-child { border-bottom: 0; }
}
.f5-riquadro-info { border-left: 4px solid var(--f5-blu); background: #fff; padding: 1.25rem 1.5rem; border-radius: 0 var(--f5-raggio) var(--f5-raggio) 0; height: 100%; }
.f5-riquadro-info h3 { font-size: 1.0625rem; margin-bottom: .35rem; }
.f5-riquadro-info p { margin-bottom: 0; color: #33485c; }

/* FAQ */
.f5-faq .accordion-item { border-color: var(--f5-bordo); }
.f5-faq .accordion-button { font-size: 1.0625rem; font-weight: 600; color: var(--f5-titoli); padding: 1.1rem 1.25rem; }
.f5-faq .accordion-body { color: #33485c; padding: 0 1.25rem 1.25rem; }
.f5-faq .accordion-body p:last-child { margin-bottom: 0; }

/* invito finale */
.f5-cta { background: var(--f5-blu); color: #fff; border-radius: 12px; padding: 2.5rem 1.5rem; }
@media (min-width: 992px) { .f5-cta { padding: 3rem; } }
.f5-cta h2 { color: #fff; font-size: 1.625rem; }
.f5-cta p { color: #e6f0fa; font-size: 1.0625rem; margin-bottom: 0; }
.f5-cta .btn-light { color: var(--f5-blu-scuro); }
.f5-cta .btn-outline-light { box-shadow: inset 0 0 0 2px #fff; color: #fff; }
.f5-cta .btn-outline-light:hover { background: #fff; color: var(--f5-blu); }

/* scelta del percorso di registrazione */
.f5-percorsi { display: grid; gap: 1rem; margin-bottom: 2rem; }
@media (min-width: 768px) { .f5-percorsi { grid-template-columns: 1fr 1fr; } }
.f5-percorso { border: 1px solid var(--f5-bordo); border-radius: var(--f5-raggio); padding: 1.25rem; background: #fff; }
.f5-percorso.attivo { border: 2px solid var(--f5-blu); background: var(--f5-blu-tenue); }
.f5-percorso h2 { font-size: 1.0625rem; margin-bottom: .35rem; }
.f5-percorso p { font-size: .9375rem; margin-bottom: 0; color: #33485c; }

/* pagine testuali */
.f5-testo { max-width: 46rem; }
.f5-testo h2 { margin-top: 2rem; }
.f5-footer .it-footer-small-prints-list li { padding-left: 0 !important; padding-right: 2rem !important; margin: .25rem 0 !important; }
.f5-footer .it-footer-small-prints-list li::after, .f5-footer .it-footer-small-prints-list li::before { content: none; }
.table-responsive + .select-wrapper, .table + .select-wrapper { margin-top: 2rem; }
.f5-footer .it-footer-small-prints-list { padding-left: 0 !important; margin-left: 0 !important; }
.form-text ul { padding-left: 1.1rem; margin: .35rem 0 0; }
.form-text ul li { font-size: .8125rem; line-height: 1.5; margin-bottom: .15rem; }
.f5-informativa { max-width: 56rem; }
.f5-informativa .table th[scope=row] { font-weight: 600; color: var(--f5-titoli); }
.f5-informativa .table td, .f5-informativa .table th { vertical-align: top; }
/* pagine pubbliche dei dati */
.f5-dl dt { font-size: .8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--f5-grigio); margin-top: .75rem; }
.f5-dl dt:first-child { margin-top: 0; }
.f5-dl dd { margin-bottom: 0; word-break: break-word; }
.f5-elementi { columns: 1; padding-left: 1.1rem; }
.f5-elementi li { margin-bottom: .25rem; }
.f5-pagina .f5-riquadro-info { background: var(--f5-blu-tenue); height: auto; }
/* campi compilati dal browser (salvataggio password): l'etichetta sale sopra il valore */
.form-group:has(input:-webkit-autofill) label,
.form-group:has(input:autofill) label,
.form-group:has(input:not(:placeholder-shown)[placeholder]) label {
  transform: translateY(-85%); font-weight: 600; font-size: .875rem; color: hsl(0, 0%, 10%);
}

/* ==========================================================================
   WCAG 2.0 AAA: contrasti rinforzati sui componenti di Bootstrap Italia
   ========================================================================== */
.btn-primary, .btn-primary:visited { background-color: var(--f5-blu) !important; border-color: var(--f5-blu) !important; color: #fff !important; }
.btn-primary:hover, .btn-primary:focus { background-color: var(--f5-blu-scuro) !important; border-color: var(--f5-blu-scuro) !important; }
.btn-outline-primary { color: var(--f5-blu) !important; box-shadow: inset 0 0 0 2px var(--f5-blu) !important; }
.btn-outline-primary:hover { background: var(--f5-blu) !important; color: #fff !important; }
.btn-outline-danger { color: var(--f5-rosso) !important; box-shadow: inset 0 0 0 2px var(--f5-rosso) !important; border-color: var(--f5-rosso) !important; }
.btn-outline-danger:hover { background: var(--f5-rosso) !important; color: #fff !important; }
.btn-outline-secondary { color: var(--f5-grigio) !important; box-shadow: inset 0 0 0 2px var(--f5-grigio) !important; }
.btn-danger { background: var(--f5-rosso) !important; border-color: var(--f5-rosso) !important; color: #fff !important; }
.btn-success { background: var(--f5-verde) !important; border-color: var(--f5-verde) !important; color: #fff !important; }
.text-primary { color: var(--f5-blu) !important; }
.text-success { color: var(--f5-verde) !important; }
.text-danger { color: var(--f5-rosso) !important; }
.text-warning { color: var(--f5-ambra) !important; }
.text-muted { color: var(--f5-grigio) !important; }
.bg-primary { background-color: var(--f5-blu) !important; }
.f5-header .it-header-center-wrapper, .f5-header .it-header-navbar-wrapper { background: var(--f5-blu); }
.f5-header .it-brand-wrapper .it-brand-tagline { color: #fff; }
.breadcrumb .breadcrumb-item.active, .breadcrumb-item.active { color: var(--f5-grigio); }
.form-group label, .select-wrapper label, .form-check label { color: #2e3e4e; }
.form-control::placeholder { color: var(--f5-grigio); opacity: 1; }
.callout, .callout .callout-title { color: var(--f5-testo); }
.callout .callout-title { color: var(--f5-blu) !important; }
.accordion-button:not(.collapsed) { color: var(--f5-blu); }
.alert a { color: var(--f5-blu-scuro); }
.navbar .navbar-collapsable .navbar-nav li a.nav-link { color: var(--f5-blu); }
@media (min-width: 992px) { .f5-header .navbar .navbar-collapsable .navbar-nav li a.nav-link { color: #fff; } }
.f5-occhiello { color: var(--f5-blu); }
.f5-file .c { color: #b4c4d4; }
.table, .table td, .table th { color: var(--f5-testo); }
.table thead th { color: var(--f5-grigio); }
.fidia-esempi, .form-text, small.text-secondary { color: var(--f5-grigio) !important; }

/* Testi: occupano tutta la larghezza della loro colonna, così si allineano a tabelle e riquadri. La lunghezza
   delle righe la governa la griglia (colonne e contenitori delle pagine testuali), non un limite sui paragrafi. */
main p { margin-bottom: 1.5em; }
main li + li { margin-top: .35em; }
p, li { text-align: left; }

/* sintesi semplici, indice e glossario (WCAG 3.1.3, 3.1.4, 3.1.5) */
.f5-in-breve { background: var(--f5-blu-tenue); border-left: 4px solid var(--f5-blu); padding: 1.25rem 1.5rem; margin: 0 0 2rem; border-radius: 0 6px 6px 0; }
.f5-in-breve h2 { margin-bottom: .5rem; }
.f5-in-breve p:last-child { margin-bottom: 0; }
.f5-indice { margin-bottom: 2rem; }
.f5-indice ul { padding-left: 1.1rem; }
.f5-guida-passi li { margin-bottom: .75rem; }
.f5-glossario dt { font-weight: 700; color: var(--f5-titoli); margin-top: 1.25rem; scroll-margin-top: 1rem; }
.f5-glossario dd { margin-left: 0; }
.f5-glossario dt:target, .f5-glossario dt:target + dd { background: #fff6e5; }
.f5-in-breve h2, .f5-in-breve .h5 { margin-top: 0 !important; }
.f5-in-breve > *:first-child { margin-top: 0; }
.f5-garanzie li + li, .navbar-nav li + li, .f5-footer-lista li + li { margin-top: 0; }
/* Passi di «Come funziona»: tutti alla stessa altezza (la spaziatura verticale è quella della griglia) */
main .f5-passi > li { margin-top: var(--bs-gutter-y); }

/* Tabelle adattive (WCAG 1.4.10): quando una tabella non entra nella larghezza disponibile (telefono, zoom),
   la classe f5-impila, aggiunta dallo script, trasforma ogni riga in una scheda «colonna: valore» */
  .table-responsive:has(> table.f5-impila) { overflow-x: visible; }
  table.f5-impila, table.f5-impila > tbody, table.f5-impila > tbody > tr,
  table.f5-impila > tbody > tr > td, table.f5-impila > tbody > tr > th { display: block; width: 100%; }
  table.f5-impila > thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  table.f5-impila > tbody > tr { border: 1px solid var(--f5-bordo); border-radius: 6px; margin-bottom: 1rem; padding: .25rem .875rem; background: #fff; }
  table.f5-impila > tbody > tr > td, table.f5-impila > tbody > tr > th {
    display: grid; grid-template-columns: minmax(0, 38%) minmax(0, 1fr); column-gap: .75rem; align-items: start;
    padding: .55rem 0 !important; border: 0; border-bottom: 1px solid #ebeced; box-shadow: none; text-align: left !important; }
  table.f5-impila .f5-valore { grid-column: 2; overflow-wrap: anywhere; min-width: 0; }
  table.f5-impila > tbody > tr > *:last-child { border-bottom: 0; }
  table.f5-impila > tbody > tr > [data-etichetta]::before {
    content: attr(data-etichetta); grid-column: 1; grid-row: 1;
    font-size: .875rem; font-weight: 600; color: var(--f5-grigio); line-height: 1.5; overflow-wrap: break-word; hyphens: auto; }
  table.f5-impila > tbody > tr > :not([data-etichetta]) { display: block; }
  table.f5-impila > tbody > tr > td > small, table.f5-impila > tbody > tr > td > .small { display: block; }
  table.f5-impila .form-control, table.f5-impila select { max-width: 100% !important; min-width: 0 !important; width: 100%; }
  table.f5-impila form { min-width: 0; }
  table.f5-prezzi.f5-impila tr { display: block; }
@media (max-width: 767.98px) {
  .f5-file pre { white-space: pre-wrap; overflow-wrap: anywhere; }
}

/* campo trappola per i programmi automatici: invisibile e fuori dalla navigazione */
.f5-trappola { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
/* riquadri di avviso (callout) con lo stesso carattere del resto della pagina */
.callout { border: 1px solid var(--f5-bordo); border-left: 4px solid var(--f5-blu); border-radius: 0 6px 6px 0; padding: 1rem 1.25rem; background: #fff; }
.callout.warning { border-left-color: var(--f5-ambra); }
.callout p, .callout li { font-family: "Titillium Web", Geneva, Tahoma, sans-serif !important; font-size: 1rem !important; color: var(--f5-testo) !important; }
.callout .callout-title { font-size: .9375rem; margin-bottom: .5rem; }
.callout.warning .callout-title { color: var(--f5-ambra) !important; }

/* Menu sui telefoni: pulsante di chiusura grande (almeno 48×48 px) e ben riconoscibile */
@media (max-width: 991.98px) {
  .navbar .navbar-collapsable .close-div { padding-right: .25rem; }
  .navbar .navbar-collapsable .close-div .btn.close-menu {
    width: 3rem; height: 3rem; padding: 0; display: inline-flex; align-items: center; justify-content: center;
    background: #fff; border-radius: 50%; box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
  }
  .navbar .navbar-collapsable .close-div .btn.close-menu .icon { fill: var(--f5-blu); width: 1.75rem; height: 1.75rem; }
  .navbar .navbar-collapsable .close-div .btn.close-menu:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
}
/* Le sezioni raggiunte dal menu non finiscono attaccate al bordo dello schermo */
main [id] { scroll-margin-top: 1rem; }

/* --- Testata agganciata in alto ----------------------------------------
   Scorrendo, la barra scura in alto esce dallo schermo; restano visibili il marchio con il pulsante del menu
   (telefoni e tablet) oppure la barra del menu (computer). Lo script calcola gli spostamenti esatti. */
.f5-header { position: sticky; top: var(--f5-testata-top, -44px); z-index: 1020; }
html { scroll-padding-top: calc(var(--f5-testata-visibile, 80px) + 1rem); }
main [id] { scroll-margin-top: 0; }
@media (min-width: 992px) { .f5-header { top: var(--f5-testata-top, -143px); } html { scroll-padding-top: calc(var(--f5-testata-visibile, 55px) + 1rem); } }
.f5-header.f5-agganciata { box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
/* Telefoni e tablet: la fascia del pulsante del menu è trasparente e non copre il marchio */
@media (max-width: 991.98px) {
  .f5-header .it-header-navbar-wrapper { background: transparent !important; }
  .f5-header .it-brand-wrapper { padding-left: 4rem !important; }
  .f5-header .it-header-center-wrapper { padding: .875rem 0; }
}

/* Scala a 5 stelle sui telefoni: le stelle sopra il testo, così le righe non diventano strette e lunghe */
@media (max-width: 575.98px) {
  .f5-scala { padding: 1.25rem 1rem; }
  .f5-scala li { grid-template-columns: 1fr; gap: .375rem; padding: .75rem; }
  .f5-scala-nota { flex-direction: column; gap: .25rem; }
}

/* Prezzi: i riquadri laterali hanno l'altezza del loro contenuto */
#prezzi .f5-riquadro-info { height: auto; }

/* --- Tour guidato -------------------------------------------------------- */
.f5-tour-aperto, .f5-tour-aperto body { overflow-x: hidden; }
.f5-tour-velo { position: fixed; inset: 0; z-index: 1060; pointer-events: auto; }
.f5-tour-velo-pieno { background: rgba(0, 25, 51, .62); }
.f5-tour-testata { z-index: 1 !important; }
.f5-tour-evidenziato { position: relative; z-index: 1065; border-radius: 6px;
  box-shadow: 0 0 0 4px #ffbf47, 0 0 0 9999px rgba(0, 25, 51, .62) !important; }
.f5-tour-finestra { position: fixed; z-index: 1070; width: min(26rem, calc(100vw - 2rem)); background: #fff; color: var(--f5-testo);
  border-radius: 10px; box-shadow: 0 16px 40px rgba(0, 0, 0, .35); padding: 1.5rem; }
.f5-tour-finestra.f5-tour-centro { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.f5-tour-finestra.f5-tour-basso { left: 1rem; right: 1rem; bottom: 1rem; width: auto; }
.f5-tour-conta { font-size: .8125rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--f5-grigio); margin: 0 0 .35rem; }
.f5-tour-titolo { font-size: 1.25rem; margin: 0 0 .5rem; color: var(--f5-titoli); }
.f5-tour-titolo:focus { outline: none; }
.f5-tour-titolo:focus-visible { outline: 3px solid #ffbf47 !important; }
.f5-tour-testo { margin: 0 0 1.25rem; max-width: none; }
.f5-tour-azioni { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.f5-tour-navi { display: flex; gap: .5rem; margin-left: auto; }
.f5-tour-salta { padding-left: 0 !important; color: var(--f5-blu) !important; text-decoration: underline; }
.f5-tour-finestra .btn { min-height: 44px; min-width: 44px; }

/* --- Assistenza ---------------------------------------------------------- */
.f5-assistenza-scelte { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .75rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); }
.f5-assistenza-scelte li + li { margin-top: 0; }
.f5-assistenza-scelte a { display: flex; flex-direction: column; gap: .25rem; height: 100%; padding: 1rem 1.25rem;
  background: #fff; border: 1px solid var(--f5-bordo); border-radius: var(--f5-raggio); text-decoration: none; }
.f5-assistenza-scelte a:hover { border-color: var(--f5-blu); box-shadow: 0 4px 14px rgba(0, 38, 77, .1); }
.f5-assistenza-titolo { font-weight: 700; color: var(--f5-blu); text-decoration: underline; }
.f5-assistenza-desc { color: var(--f5-grigio); font-size: .9375rem; }
.f5-autoaiuto { background: #fff; border-left: 4px solid var(--f5-blu); padding: 1.25rem 1.5rem; border-radius: 0 var(--f5-raggio) var(--f5-raggio) 0; }
.f5-autoaiuto ul { margin-bottom: 0; }

/* giorni di licenza in scadenza */
.f5-giorni-avviso{color:#6e3c00;font-weight:600}

/* ente dimostrativo */
.f5-demo{background:#fff4d6;border-bottom:2px solid #c98a00;color:#3d2600;padding:.6rem 0;font-size:.95rem}

/* ordine su MePA: scelta della formula */
.f5-formule{display:grid;grid-template-columns:repeat(auto-fit,minmax(15rem,1fr));gap:1rem}
.f5-formula{border:1px solid #c5d3e1;border-radius:.5rem;padding:1rem 1rem 1rem 2.75rem;margin:0}
.f5-formula:has(input:checked){border-color:#004d99;box-shadow:0 0 0 2px #004d99 inset}
.f5-voci code{white-space:nowrap}

/* percorso di avvio accompagnato */
.f5-avvio-passi{list-style:none;counter-reset:passo;padding:0;margin:0}
.f5-avvio-passi>li{counter-increment:passo;position:relative;padding:0 0 1.25rem 3rem;border-left:2px solid #c5d3e1;margin-left:1rem}
.f5-avvio-passi>li:last-child{border-left-color:transparent;padding-bottom:0}
.f5-avvio-passi>li::before{content:counter(passo);position:absolute;left:-1rem;top:-.1rem;width:2rem;height:2rem;border-radius:50%;
  background:#fff;border:2px solid #5d7083;color:#3e5063;font-weight:700;display:flex;align-items:center;justify-content:center}
.f5-avvio-passi>li.attivo::before{border-color:#004d99;color:#004d99}
.f5-avvio-passi>li.fatto::before{content:"✓";background:#008055;border-color:#008055;color:#fff}
.f5-avvio-passi .badge{margin-left:.5rem}

/* listino: codice MePA sotto il prezzo */
.f5-prezzi .f5-codice{display:block;font-size:.75rem;color:#3e5063;font-family:"Roboto Mono",monospace;letter-spacing:.02em}

/* link nei riquadri (contrasto AAA) */
.callout a, .callout.note a, .callout.note p a{color:#004d99}

/* listino da telefono: ogni valore con la sua etichetta (Licenze, Annuale, Triennale) */
@media (max-width: 767.98px) {
  .f5-prezzi.f5-prezzi-voci tr { grid-template-columns: repeat(3, 1fr); align-items: start; }
  .f5-prezzi.f5-prezzi-voci td { text-align: left !important; }
  .f5-prezzi.f5-prezzi-voci td[data-etichetta]::before { content: attr(data-etichetta); display: block; font-size: .75rem;
    font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #3e5063; margin-bottom: .15rem; }
}
.f5-badge-attesa{background:#fff4d6;color:#3d2600;border:1px solid #c98a00}

/* paragrafi introduttivi: allineati alla colonna principale (due terzi) per righe leggibili */
@media (min-width: 992px) { .f5-intro { max-width: calc(66.6667% - .75rem); } }

/* testo pronto da copiare (richiesta a dati.gov.it) */
.f5-testo-pronto{font-family:"Roboto Mono",ui-monospace,monospace;font-size:.8125rem;line-height:1.5;background:#f2f6fa;color:#17324d;border:1px solid #5d7083;border-radius:.25rem;padding:.75rem;height:auto;resize:vertical}

/* controllo della proposta: riepilogo, gruppi ripiegabili, colonne con dati di persone */
.f5-pillola{display:inline-block;padding:.25rem .75rem;border-radius:1rem;font-size:.875rem;border:1px solid}
.f5-pillola-ok{background:#e5f4e4;border-color:#00603f;color:#00402a}
.f5-pillola-verifica{background:#fff4d6;border-color:#7a4d00;color:#4d3000}
.f5-pillola-personali{background:#fdecec;border-color:#a00000;color:#700000}
.f5-dettagli{border:1px solid #c5d3e1;border-radius:.25rem;padding:.75rem 1rem}
.f5-dettagli>summary{cursor:pointer}
.f5-dettagli>summary .h5{display:inline;margin:0}
.f5-riga-personale>th,.f5-riga-personale>td{background:#fff8f8}
.f5-avviso-personale{color:#700000}
.f5-avviso-personale .icon{fill:#a00000}
.f5-conferma-personale.form-check [type=checkbox]+label{color:#17324d;font-size:.875rem;font-weight:400;line-height:1.45}

/* «Prossimo passo» nella mia area */
.f5-prossimo{border-left:6px solid #004d99;background:#f2f6fa;padding:1rem 1.25rem;border-radius:.25rem}
.f5-prossimo-attesa{border-left-color:#7a4d00;background:#fff8e6}
.f5-prossimo-ok{border-left-color:#00603f;background:#eef8ee}
.f5-prossimo-etichetta{font-size:.8125rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#3e5063}

/* Passi (1. 2. 3.) sui telefoni: Bootstrap Italia mostra i punti dell'elenco e sovrappone l'indicatore;
   qui restano tre caselle affiancate leggibili, con il passo attivo sottolineato */
@media (max-width: 991.98px) {
  .steppers .steppers-header { display: flex; flex-wrap: nowrap; list-style: none; padding: 0; margin: 0; gap: .25rem; }
  .steppers .steppers-header li { list-style: none; flex: 1 1 0; min-width: 0; display: block; padding: .5rem .25rem;
    font-size: .8125rem; line-height: 1.3; text-align: center; border-bottom: 2px solid #c5d3e1; color: #3e5063; }
  .steppers .steppers-header li::before, .steppers .steppers-header li::after { display: none !important; content: none !important; }
  .steppers .steppers-header li.active { border-bottom: 3px solid #004d99; color: #17324d; font-weight: 600; }
  .steppers .steppers-header li.confirmed { color: #17324d; }
  .steppers .steppers-header li .icon, .steppers .steppers-header .steppers-index { display: none; }
}
.f5-sessioni .badge{margin-left:.5rem}
