/* Verdex — Snellimento dell'interfaccia (caricato per ultimo)
 * 1. Intestazione su una sola riga: logo e nome, lingua, leggibilità (Aa), accesso / account, PRO.
 * 2. Nessun badge od overlay esterno flottante: niente copre pulsanti, testi o schede.
 * 3. Parte bassa della schermata principale più snella: consigli e installazione compatti e richiudibili.
 * 4. «Il mio Account» in 3 schede (Profilo e Piano · Storico e Archivio · Impostazioni e Privacy).
 * 5. Esito a due assi: «Segnali di contenuto AI» e «Rischio truffa/inganno» (shield-dual.js).
 */

/* ===========================================================================
   2 · NESSUN BADGE / OVERLAY ESTERNO
   =========================================================================== */
#nl-badge-frame, #nl-hud-frame, iframe[title="Powered by Netlify"], iframe#nl-badge-frame, iframe#nl-hud-frame,
[data-netlify-badge], .netlify-badge, a[href*="utm_source=netlify_badge"] {
  display: none !important; visibility: hidden !important; pointer-events: none !important;
  width: 0 !important; height: 0 !important; opacity: 0 !important;
}
.app-footer { padding-bottom: max(1.5rem, calc(env(safe-area-inset-bottom, 0px) + 1rem)) !important; }

/* ===========================================================================
   1 · INTESTAZIONE SU UNA RIGA
   =========================================================================== */
#app-header { position: relative; z-index: 40; border-bottom-width: 1px; box-shadow: 0 1px 0 rgba(15, 23, 42, .04); }
#app-header .hdr.hdr-one {
  display: flex !important; flex-wrap: nowrap; align-items: center; gap: .45rem;
  grid-template-areas: none; grid-template-columns: none;
  min-height: 3.6rem; padding: .45rem max(.75rem, env(safe-area-inset-right)) .45rem max(.75rem, env(safe-area-inset-left));
  position: relative;
}
#app-header .hdr-brand { flex: 1 1 auto; min-width: 0; gap: .55rem; display: flex; align-items: center; }
/* Marchio Verdex: lo scudo con l'occhio del logo, affiancato da «Verdex» con sotto «Sicurezza Digitale»,
   come nel logo completo. Sempre visibile, su smartphone e computer. */
#app-header .hdr-logo { width: 2.5rem; height: 2.5rem; border-radius: .7rem; background: #FFFFFF; box-shadow: 0 1px 3px rgba(15, 23, 42, .22); }
#app-header .hdr-text { display: flex; flex-direction: column; justify-content: center; flex: 1 1 auto; min-width: max-content; }
#app-header .hdr-title { font-size: 1.08rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; overflow-wrap: normal; }
/* Il motto occupa solo lo spazio libero accanto al nome (contain: inline-size): non allarga mai il marchio e non
   spinge i pulsanti a destra; solo se lo spazio manca del tutto viene accorciato con «…». */
#app-header .hdr-tagline { display: block; margin: .08rem 0 0; font-size: .7rem; font-weight: 600; line-height: 1.1; letter-spacing: .01em; color: #475569; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; contain: inline-size; }
#app-header .hdr-subtitle { display: none; }
#app-header .hdr-name { display: inline; }
#app-header .hdr-full { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
html.high-contrast #app-header .hdr-tagline { color: #000000; }
@media (min-width: 1024px) {
  #app-header .hdr-title { font-size: 1.25rem; }
  #app-header .hdr-tagline { font-size: .78rem; }
}

/* Gruppo dei controlli: sempre sulla stessa riga del marchio */
#app-header .hdr-lang, #app-header .hdr-row2, #app-header .hdr-actions { flex: 0 0 auto; }
#app-header .hdr-row2 { display: flex !important; align-items: center; gap: .4rem; min-width: 0; }
#app-header .hdr-actions { display: flex; flex-wrap: nowrap; align-items: center; gap: .4rem; margin: 0; }
#app-header .hdr-actions .auth-group > *, #app-header .hdr-actions > .hdr-btn { flex: 0 0 auto; }

/* Pulsanti uniformi, bassi e compatti */
#app-header .hdr-btn, #app-header .lang-pick, #app-header .acct-pill {
  min-height: 2.5rem !important; height: 2.5rem; padding: 0 .7rem; border-radius: .75rem; border-width: 1.5px;
  font-size: .86rem; font-weight: 800; line-height: 1; white-space: nowrap; flex-direction: row !important;
  gap: .35rem; min-width: 0; max-width: none; box-shadow: none; display: inline-flex; align-items: center; justify-content: center;
}
#app-header .lang-pick { min-width: 3.3rem; padding: 0 .45rem 0 .6rem; }

/* Stato del piano: un'informazione sola, già presente sotto «Verifica ora» e nella pastiglia dell'account */
#app-header #btn-plan-badge { display: none !important; }
@media (min-width: 1024px) and (max-width: 1179.98px) {
  /* Computer piccoli: pastiglia più stretta, il marchio resta intero e i pulsanti non si comprimono */
  #app-header .hdr.hdr-one { gap: .4rem; }
  #app-header #btn-plan-badge { max-width: 9.5rem; padding: 0 .6rem; }
  #app-header .hdr-actions #btn-account .plan-chip { display: none !important; }
}
/* Computer (da 1024 px): stato / prove sempre in vista tra «IT» e «Aa», come nella barra di riferimento */
@media (min-width: 1024px) {
  #app-header #btn-plan-badge { display: inline-flex !important; flex: 0 1 auto; width: auto; border-radius: 999px; font-size: .8rem; padding: 0 .75rem; max-width: 13rem; overflow: hidden; text-overflow: ellipsis; }
  #app-header #btn-plan-badge .badge-ico { display: none; }
  #app-header #plan-status-text { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; -webkit-line-clamp: unset; }
}

/* Leggibilità: un solo pulsante «Aa» che apre i due interruttori (su ogni schermo) */
#app-header .hdr-a11y { position: static; display: flex; }
#app-header .a11y-trigger { display: inline-flex !important; width: 2.5rem; padding: 0; background: #F1F5F9; border-color: #94A3B8; color: #0F172A; position: relative; }
#app-header .a11y-ico { font-size: 1.05rem; font-weight: 900; line-height: 1; font-family: Georgia, 'Times New Roman', serif; }
#app-header .hdr-a11y.is-open .a11y-trigger { background: #E2E8F0; border-color: #1E3A8A; }
html.large-text #app-header .a11y-dot, html.high-contrast #app-header .a11y-dot { display: block; position: absolute; top: .2rem; right: .2rem; width: .45rem; height: .45rem; border-radius: 999px; background: #F59E0B; box-shadow: 0 0 0 2px #FFFFFF; }
#app-header .a11y-pop {
  display: none !important; position: absolute; z-index: 60; top: calc(100% + .25rem);
  right: max(.75rem, env(safe-area-inset-right)); left: auto; width: min(20rem, calc(100vw - 1.5rem));
  flex-direction: column; gap: .45rem; padding: .55rem; background: #FFFFFF;
  border: 1.5px solid #CBD5E1; border-radius: 1rem; box-shadow: 0 16px 40px rgba(15, 23, 42, .2);
}
#app-header .hdr-a11y.is-open .a11y-pop { display: flex !important; }
#app-header .a11y-pop .hdr-btn {
  position: relative; width: 100%; height: auto; min-height: 3rem !important; justify-content: flex-start; gap: .6rem;
  padding: .45rem .7rem; border-radius: .8rem; border: 1.5px solid #E2E8F0; background: #F8FAFC; color: #0F172A;
  font-size: .98rem; white-space: normal; text-align: left;
}
#app-header .a11y-pop .hdr-lbl-sm, #app-header .a11y-pop .hdr-lbl-md { display: inline; flex: 1 1 auto; min-width: 0; padding-right: 3rem; }
#app-header .a11y-opt-ico { flex-shrink: 0; width: 1.9rem; height: 1.9rem; border-radius: .6rem; display: inline-flex; align-items: center; justify-content: center; background: #FFFFFF; border: 1px solid #CBD5E1; font-size: 1rem; }
#app-header .a11y-pop .hdr-btn::after { content: ''; position: absolute; right: .7rem; top: 50%; transform: translateY(-50%); width: 2.6rem; height: 1.5rem; border-radius: 999px; background: #CBD5E1; }
#app-header .a11y-pop .hdr-btn::before { content: ''; position: absolute; z-index: 1; right: 1.95rem; top: 50%; transform: translateY(-50%); width: 1.2rem; height: 1.2rem; border-radius: 999px; background: #FFFFFF; box-shadow: 0 1px 3px rgba(15, 23, 42, .3); }
#app-header .a11y-pop .hdr-btn[aria-pressed="true"] { background: #EFF6FF; border-color: #1E3A8A; box-shadow: none; }
#app-header .a11y-pop .hdr-btn[aria-pressed="true"]::after { background: #1E3A8A; }
#app-header .a11y-pop .hdr-btn[aria-pressed="true"]::before { right: .85rem; }
html.high-contrast #app-header .a11y-pop { border-color: #000000; }
html.high-contrast #app-header .a11y-pop .hdr-btn { background: #FFFFFF; color: #000000; border-color: #000000; }
html.high-contrast #app-header .a11y-pop .hdr-btn::after { background: #FFFFFF; border: 2px solid #000000; }
html.high-contrast #app-header .a11y-pop .hdr-btn[aria-pressed="true"]::after { background: #000000; }
html.high-contrast #app-header .a11y-pop .hdr-btn::before { background: #000000; }
html.high-contrast #app-header .a11y-pop .hdr-btn[aria-pressed="true"]::before { background: #FFFFFF; }

/* Accesso / account */
#app-header #btn-login { background: #FFFFFF; border-color: #1E3A8A; color: #1E3A8A; }
#app-header #btn-login .login-ico { display: none; }
/* Non connessi: nell'intestazione resta un solo pulsante, «Accedi» (la finestra offre anche «Registrati»
   e «Accedi con Face ID / Passkey»). Nessuna coppia «Face ID» + «Altro» e nessun pulsante aggiuntivo. */
#app-header #btn-signup, #app-header #btn-quick-login, #app-header #btn-quick-more { display: none !important; }
#app-header #btn-my-account, #app-header .hdr-logout { display: none !important; }
#app-header #btn-account { background: #EFF6FF; border-color: #1E3A8A; color: #1E3A8A; padding: 0 .55rem 0 .3rem; }
#app-header #btn-account .acct-avatar { width: 1.75rem; height: 1.75rem; font-size: .85rem; flex-shrink: 0; }
#app-header #btn-account .acct-text, #app-header #btn-account .acct-gear { display: none !important; }
#app-header #btn-account .acct-short { display: inline !important; font-size: .84rem; }
#app-header #btn-account .plan-chip { display: none !important; }
@media (min-width: 768px) {
  #app-header #btn-account .plan-chip { display: inline-flex !important; font-size: .72rem; padding: .15rem .5rem; margin: 0; }
}

/* «Passa a PRO» solo per chi ha effettuato l'accesso senza il livello Pro / Forense: per gli ospiti resta solo «Accedi»
   (la classe «hidden» va imposta qui, perché #app-header .hdr-btn forza display: inline-flex). */
#app-header #btn-go-pro.hidden { display: none !important; }
/* PRO: «↑ PRO» su smartphone (un invito, non un badge di stato), «Passa a PRO» da tablet in su */
#app-header #btn-go-pro { background: #FBBF24; border-color: #F59E0B; color: #451A03; box-shadow: none; padding: 0 .75rem; }
#app-header #lbl-go-pro { display: none; }
#app-header .pro-short { display: inline !important; font-size: .82rem; font-weight: 900; letter-spacing: .04em; }
@media (min-width: 768px) {
  #app-header #lbl-go-pro { display: inline; }
  #app-header .pro-short { display: none !important; }
}

/* Smartphone e tablet: «Verdex» sempre per intero, mai troncato in «AI Sh…».
   Il marchio non si restringe mai sotto la larghezza del nome; i pulsanti a destra sono un po' più compatti e,
   solo se lo spazio non basta, è l'etichetta dell'account a cedere (mai il nome). */
@media (max-width: 1023.98px) {
  #app-header .hdr.hdr-one { gap: .35rem; padding-left: max(.6rem, env(safe-area-inset-left)); padding-right: max(.6rem, env(safe-area-inset-right)); }
  #app-header .hdr-brand { flex: 1 0 auto; gap: .45rem; }
  #app-header .hdr-brand > div { flex: 1 0 auto; min-width: max-content; }
  #app-header .hdr-logo { width: 2.35rem; height: 2.35rem; border-radius: .65rem; }
  #app-header .hdr-title { font-size: 1.05rem; overflow: visible; text-overflow: clip; }
  #app-header .hdr-row2 { flex: 0 1 auto; gap: .3rem; }
  #app-header .hdr-actions { flex: 0 1 auto; min-width: 0; gap: .3rem; }
  #app-header .hdr-btn, #app-header .lang-pick, #app-header .acct-pill { padding: 0 .55rem; }
  #app-header .lang-pick { min-width: 0; gap: .25rem; padding: 0 .3rem 0 .45rem; }
  #app-header .lang-pick .lang-current { font-size: .95rem; }
  #app-header .lang-pick .lang-chevron { width: 14px; height: 14px; }
  #app-header .a11y-trigger { width: 2.3rem; padding: 0; }
  #app-header #btn-go-pro { padding: 0 .5rem; }
  #app-header #btn-login { flex: 0 1 auto; min-width: min-content; white-space: normal; text-align: center; line-height: 1.05; padding: 0 .55rem; }
  #app-header #btn-account { flex: 0 1 auto; min-width: 0; gap: .3rem; padding: 0 .45rem 0 .25rem; }
  #app-header #btn-account .acct-avatar { width: 1.55rem; height: 1.55rem; }
  #app-header #btn-account .acct-short { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; }
}
/* Smartphone stretti (sotto i 375 px): l'account mostra solo l'iniziale nel cerchio, così il nome resta intero. */
@media (max-width: 374.98px) {
  #app-header #btn-account .acct-short { display: none !important; }
  #app-header #btn-account { padding: 0 .25rem; }
  #app-header #btn-login { font-size: .8rem; padding: 0 .45rem; }
}

/* Schermi molto stretti e Testo Grande: resta una riga, il nome lascia spazio ai pulsanti */
@media (max-width: 359.98px) {
  #app-header .hdr-name, #app-header .hdr-tagline { display: none; }
  #app-header .hdr.hdr-one { gap: .3rem; }
  #app-header .hdr-btn, #app-header .lang-pick { padding: 0 .5rem; }
}
@media (max-width: 479.98px) {
  html.large-text #app-header .hdr-name, html.large-text #app-header .hdr-tagline { display: none; }
  html.large-text #app-header .hdr-btn, html.large-text #app-header .lang-pick, html.large-text #app-header .acct-pill { font-size: .9rem; height: 2.75rem; min-height: 2.75rem !important; }
}
html.large-text #app-header .hdr-btn { white-space: nowrap; }

/* ===========================================================================
   3 · PARTE BASSA DELLA SCHERMATA PRINCIPALE
   =========================================================================== */
/* Consigli: riga compatta come «Prova subito con un esempio», chiusa di default */
#mode-guide.mode-guide-slim { background: #F8FAFC; border: 1.5px solid #E2E8F0; border-radius: 1rem; padding: 0; overflow: hidden; }
#mode-guide.mode-guide-slim > summary { list-style: none; cursor: pointer; min-height: 3.1rem; padding: .5rem .75rem .5rem .9rem; font-size: .98rem; gap: .5rem; color: #0F172A; }
#mode-guide.mode-guide-slim > summary::-webkit-details-marker { display: none; }
#mode-guide.mode-guide-slim > summary > span[aria-hidden="true"]:first-child { display: none; }
#mode-guide.mode-guide-slim .mg-body { padding: 0 .75rem .8rem; }
#mode-guide.mode-guide-slim .mg-body > .grid { margin-top: .6rem; gap: .5rem; }
#mode-guide.mode-guide-slim .mg-body > .grid > div { padding: .6rem .7rem; border-color: #E2E8F0; }
#mode-guide.mode-guide-slim .mg-body h3 > span[aria-hidden="true"] { display: none; }
#mode-guide .guide-card { margin: 0; }
html.high-contrast #mode-guide.mode-guide-slim { background: #FFFFFF; border: 2px solid #000000; }

/* Installazione sul telefono: una riga con «Apri» e «Non ora»; i passaggi solo su richiesta */
#install-card.install-slim { display: block; padding: .45rem .55rem .45rem .7rem; border-radius: 1rem; border: 1.5px solid #BFDBFE; background: #F8FBFF; box-shadow: none; margin-top: 0; }
#install-card.install-slim.hidden { display: none; }
#install-card .inst-row { display: flex; align-items: center; gap: .55rem; min-width: 0; }
#install-card .install-logo { width: 1.9rem; height: 1.9rem; border-radius: .55rem; flex-shrink: 0; }
#install-card .inst-h { flex: 1 1 auto; min-width: 0; margin: 0; font-size: inherit; }
#install-card .inst-toggle { display: flex; align-items: center; gap: .5rem; width: 100%; min-height: 2.6rem; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; color: #0F172A; }
#install-card .inst-title { flex: 1 1 auto; min-width: 0; font-weight: 800; font-size: .93rem; line-height: 1.25; }
#install-card .inst-later { flex-shrink: 0; min-height: 2.4rem; padding: 0 .65rem; border-radius: .7rem; border: 1px solid #CBD5E1; background: #FFFFFF; color: #334155; font-weight: 700; font-size: .82rem; cursor: pointer; }
#install-card .inst-body { padding: .45rem 0 .25rem; display: grid; gap: .5rem; }
#install-card .inst-body[hidden] { display: none; }
#install-card .inst-desc { font-size: .9rem; line-height: 1.45; color: #334155; margin: 0; }
#install-card .install-steps { font-size: .88rem; padding: .5rem .7rem; margin: 0; }
#install-card #btn-install { justify-self: start; }
#install-card.is-open .arc-toggle-chev { transform: rotate(-90deg); }
html.high-contrast #install-card.install-slim { background: #FFFFFF; border: 2px solid #000000; }

/* Spaziature più strette tra i blocchi in fondo */
#helpers-wrap.space-y-5 > * + * { margin-top: .6rem !important; }
main > #install-card { margin-top: .75rem !important; }

/* ===========================================================================
   4 · «IL MIO ACCOUNT» IN 3 SCHEDE
   =========================================================================== */
#account-modal .acct-tabs.acct-tabs-3 { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .3rem; overflow: visible; padding: .25rem; background: #F1F5F9; border-radius: .9rem; }
#account-modal .acct-tabs-3 .acct-tab { min-width: 0; min-height: 2.75rem; padding: .35rem .4rem; border-radius: .7rem; justify-content: center; text-align: center; flex-direction: row; }
#account-modal .acct-tabs-3 .acct-tab-ico { display: none; }
#account-modal .acct-tabs-3 .acct-tab-lbl { white-space: normal; line-height: 1.15; font-size: .84rem; font-weight: 800; overflow-wrap: anywhere; }
@media (min-width: 640px) { #account-modal .acct-tabs-3 .acct-tab-lbl { font-size: .92rem; } }
#account-modal .acct-legacy, #account-modal .acct-legacy * { display: none !important; }

/* Card utente con piano, stato e contatore mensile */
#account-modal .acct-me { display: grid; gap: .7rem; }
#account-modal .acct-me .acct-id { display: flex; align-items: center; gap: .7rem; min-width: 0; }
#account-modal .acct-me-hero { display: grid; gap: .55rem; padding: .75rem .85rem; border-radius: .9rem; background: #F8FAFC; border: 1px solid #E2E8F0; }
#account-modal .acct-me-row { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; }
#account-modal .acct-me-row .acct-plan-title { font-size: 1.05rem; font-weight: 900; line-height: 1.2; color: #0F172A; margin: 0; }
#account-modal .acct-me-row .acct-plan-price { font-size: .85rem; color: #475569; font-weight: 600; margin: .1rem 0 0; }
#account-modal .acct-me .acct-usage { margin: 0; }
#account-modal .acct-me .acct-plan-line { margin: 0; }
#account-modal .acct-me-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; margin: 0; }
#account-modal .acct-me-dates .acct-stat { padding: .4rem .55rem; }
#account-modal .acct-me-manage { display: grid; gap: .45rem; }
#account-modal .acct-me-manage > .acct-btn { justify-self: start; min-height: 2.6rem; font-size: .88rem; }
#account-modal .acct-plans-note { margin-top: .6rem; font-size: .78rem; }
#account-modal .acct-fold-inner { margin-top: .7rem; border: 1px solid #E2E8F0; border-radius: .8rem; }
#account-modal #acct-sec-checks .acct-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 640px) { #account-modal #acct-sec-checks .acct-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
html.large-text #account-modal #acct-sec-checks .acct-actions { grid-template-columns: minmax(0, 1fr); }
#account-modal .acct-local-desc { display: block; }
#account-modal .acct-local-state { display: block; font-weight: 700; margin-top: .1rem; }
#account-modal #acct-sec-intensity .vp-cards { margin-top: .1rem; }
html.large-text #account-modal .acct-me-dates { grid-template-columns: minmax(0, 1fr); }
html.high-contrast #account-modal .acct-me-hero { background: #FFFFFF; border: 2px solid #000000; }
html.high-contrast #account-modal .acct-tabs.acct-tabs-3 { background: #FFFFFF; border: 2px solid #000000; }

/* ===========================================================================
   5 · ESITO A DUE ASSI: SEGNALI AI · RISCHIO TRUFFA/INGANNO (shield-dual.js)
   =========================================================================== */
.dx-axes { display: grid; gap: .5rem; grid-template-columns: minmax(0, 1fr); margin-top: .1rem; }
@media (min-width: 480px) { .dx-axes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rx-desk .dx-axes, html.large-text .dx-axes { grid-template-columns: minmax(0, 1fr); }
.dx-axis { background: rgba(255, 255, 255, .92); border: 1px solid rgba(15, 23, 42, .12); border-radius: .85rem; padding: .55rem .7rem .6rem; min-width: 0; color: #0F172A; }
.dx-axis-top { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.dx-axis-name { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: #334155; min-width: 0; }
.dx-axis-val { font-size: .95rem; font-weight: 900; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dx-axis-lvl { display: inline-block; font-size: .74rem; font-weight: 800; border-radius: 999px; padding: .05rem .5rem; margin-inline-start: .35rem; vertical-align: middle; }
.dx-axis[data-level="low"] .dx-axis-lvl { background: #DCFCE7; color: #14532D; }
.dx-axis[data-level="medium"] .dx-axis-lvl { background: #FEF3C7; color: #78350F; }
.dx-axis[data-level="high"] .dx-axis-lvl { background: #FEE2E2; color: #7F1D1D; }
.dx-axis[data-level="na"] .dx-axis-lvl { background: #F1F5F9; color: #334155; }
.dx-bar { height: .4rem; border-radius: 999px; background: #E2E8F0; margin: .35rem 0 .3rem; overflow: hidden; }
.dx-bar > span { display: block; height: 100%; border-radius: inherit; background: #16A34A; }
.dx-axis[data-level="medium"] .dx-bar > span { background: #D97706; }
.dx-axis[data-level="high"] .dx-bar > span { background: #DC2626; }
.dx-axis[data-level="na"] .dx-bar > span { background: #94A3B8; }
.dx-axis-why { font-size: .82rem; line-height: 1.35; color: #334155; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dx-flags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .45rem; }
.dx-flag { font-size: .74rem; font-weight: 700; border-radius: 999px; padding: .1rem .5rem; border: 1px solid #FCD34D; background: #FFFBEB; color: #78350F; }
.dx-flag[data-status="bad"] { border-color: #FCA5A5; background: #FEF2F2; color: #7F1D1D; }

/* Scheda «Incrocio dei segnali» (sezione comprimibile) */
.dx-detail { display: grid; gap: .75rem; }
.dx-mode { font-size: .82rem; color: #334155; margin: 0; }
.dx-mode strong { color: #0F172A; }
.dx-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.dx-check { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .1rem .55rem; align-items: start; padding: .5rem .6rem; border-radius: .7rem; border: 1px solid #E2E8F0; background: #FFFFFF; }
.dx-check-dot { width: 1.4rem; height: 1.4rem; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 900; grid-row: span 2; color: #FFFFFF; background: #16A34A; }
.dx-check[data-status="warn"] .dx-check-dot { background: #D97706; }
.dx-check[data-status="bad"] .dx-check-dot { background: #DC2626; }
.dx-check[data-status="na"] .dx-check-dot { background: #94A3B8; }
.dx-check-name { font-weight: 800; font-size: .88rem; color: #0F172A; }
.dx-check-state { font-weight: 700; font-size: .78rem; margin-inline-start: .35rem; color: #475569; }
.dx-check-why { font-size: .84rem; line-height: 1.4; color: #334155; margin: 0; }
.dx-h { font-size: .8rem; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; color: #1E3A8A; margin: 0 0 .3rem; }
.dx-why-list { margin: 0; padding-inline-start: 1.1rem; display: grid; gap: .25rem; font-size: .85rem; line-height: 1.4; color: #1E293B; }
.dx-report { border: 1.5px solid #9A3412; border-radius: .8rem; background: #FFF7ED; padding: .65rem .75rem; display: grid; gap: .5rem; }
.dx-report .dx-h { color: #9A3412; }
.dx-report dl { display: grid; grid-template-columns: minmax(7rem, auto) minmax(0, 1fr); gap: .25rem .7rem; margin: 0; font-size: .82rem; }
.dx-report dt { font-weight: 800; color: #431407; }
.dx-report dd { margin: 0; color: #1C1917; min-width: 0; overflow-wrap: anywhere; }
.dx-report code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .76rem; word-break: break-all; }
.dx-report-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.dx-btn { min-height: 2.5rem; padding: 0 .8rem; border-radius: .7rem; border: 1.5px solid #9A3412; background: #FFFFFF; color: #7C2D12; font-weight: 800; font-size: .84rem; cursor: pointer; }
.dx-note { font-size: .78rem; color: #475569; margin: 0; }
html.high-contrast :is(.dx-axis, .dx-check, .dx-report) { background: #FFFFFF !important; color: #000000 !important; border: 2px solid #000000 !important; }
html.high-contrast :is(.dx-axis-name, .dx-axis-why, .dx-check-why, .dx-check-state, .dx-mode, .dx-report dt, .dx-report dd, .dx-note) { color: #000000 !important; }
@media print { .dx-report-actions { display: none; } }

/* ===== «Disdici abbonamento» in Profilo e Piano ===== */
#account-modal .acct-sub-actions { display: flex; flex-wrap: wrap; gap: .5rem; min-width: 0; }
#account-modal .acct-sub-actions > .acct-btn { flex: 1 1 11rem; min-width: 0; min-height: 2.75rem; font-size: .9rem; white-space: normal; }
#account-modal .acct-btn-unsub { background: #FFFFFF; border-color: #DC2626; color: #991B1B; font-weight: 800; }
#account-modal .acct-btn-unsub:hover { background: #FEF2F2; border-color: #B91C1C; }
#account-modal .acct-btn-unsub[data-state="done"] { border-color: #6EE7B7; color: #065F46; }
#account-modal .acct-btn-unsub[data-state="done"]:hover { background: #ECFDF5; }
#account-modal #acct-cancel-info, #account-modal #acct-unsub-state { margin-top: 0; font-size: .86rem; line-height: 1.45; }
#account-modal #acct-cancel-info.hidden, #account-modal #acct-unsub-state.hidden { display: none; }
html.large-text #account-modal .acct-sub-actions > .acct-btn { flex-basis: 100%; font-size: 1rem; }
html.high-contrast #account-modal .acct-btn-unsub { background: #FFFFFF !important; border: 3px solid #000000 !important; color: #000000 !important; }

/* Finestra di conferma della disdetta: chiara, ordinata, apertura e chiusura lente */
.unsub-dialog { width: min(30rem, calc(100vw - 1.5rem)); max-height: calc(100dvh - 1.5rem); overflow-y: auto; overscroll-behavior: contain;
  border: 0; border-radius: 1.3rem; padding: 0; color: #0F172A; background: #FFFFFF; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .5); }
.unsub-dialog::backdrop { background: rgba(15, 23, 42, .72); }
.unsub-dialog[open] { animation: unsub-in .8s cubic-bezier(.22, .61, .36, 1) both; }
.unsub-dialog[open]::backdrop { animation: unsub-fade .8s ease both; }
.unsub-dialog.is-leaving { animation: unsub-out .6s ease both; }
@keyframes unsub-in { from { opacity: 0; transform: translateY(.75rem) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes unsub-out { from { opacity: 1; } to { opacity: 0; transform: translateY(.5rem); } }
@keyframes unsub-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .unsub-dialog[open], .unsub-dialog[open]::backdrop, .unsub-dialog.is-leaving { animation: none; } }
.unsub-card { display: grid; gap: .75rem; padding: 1.2rem 1.15rem 1.15rem; border-top: 6px solid #DC2626; border-radius: 1.3rem; }
.unsub-dialog[data-tone="ok"] .unsub-card { border-top-color: #047857; }
.unsub-dialog[data-tone="info"] .unsub-card { border-top-color: #1E3A8A; }
.unsub-dialog[data-tone="warn"] .unsub-card { border-top-color: #D97706; }
.unsub-title { margin: 0; font-size: 1.22rem; font-weight: 900; line-height: 1.25; color: #0F172A; }
.unsub-body { margin: 0; font-size: 1rem; line-height: 1.5; color: #1E293B; overflow-wrap: anywhere; }
.unsub-extra { margin: 0; font-size: .88rem; line-height: 1.45; color: #475569; }
.unsub-extra.hidden { display: none; }
.unsub-actions { display: grid; gap: .5rem; margin-top: .2rem; }
.unsub-actions > .acct-btn { width: 100%; min-height: 3rem; font-size: 1rem; text-decoration: none; }
.unsub-actions > .hidden { display: none; }
.unsub-confirm { background: #B91C1C; border-color: #B91C1C; color: #FFFFFF; font-weight: 800; }
.unsub-confirm:hover:not(:disabled) { background: #991B1B; border-color: #991B1B; }
.unsub-dialog[data-tone="info"] .unsub-confirm { background: #1E3A8A; border-color: #1E3A8A; }
.unsub-keep { background: #FFFFFF; border-color: #CBD5E1; color: #0F172A; font-weight: 800; }
.unsub-keep:hover:not(:disabled) { background: #F1F5F9; }
.unsub-confirm:focus-visible, .unsub-keep:focus-visible { outline: 3px solid #F59E0B; outline-offset: 2px; }
html.large-text .unsub-body { font-size: 1.12rem; }
html.high-contrast .unsub-card { border: 3px solid #000000; }
html.high-contrast :is(.unsub-title, .unsub-body, .unsub-extra) { color: #000000 !important; }
