/* =====================================================================
   ContractLens — cornice comune di TUTTE le pagine
   (home, analisi, Login, Il mio profilo, Gestione utenti, Feedback,
    Suggerimento in revisione)

   1. Scala dei testi (cresce con lo schermo: telefono, tablet, desktop, desktop grande)
   2. Intestazione e logo: una riga su schermi larghi, menu a tendina su telefono,
      voce della pagina corrente sottolineata in verde
   3. Badge del piano e menu utente
   4. Fascia a gradiente (loghi + titolo della pagina), fondo con i pentagoni,
      piè di pagina sul gradiente: la stessa resa di analisi.html
   5. Componenti delle pagine interne: foglio bianco, pulsanti, etichette,
      tabelle di gestione, finestre di dialogo
   6. Parti del prototipo uguali in tutte le pagine: loghi animati, tasti laterali
      (Accessibilità, Informativa cookie), "Come funziona" con il video

   Va caricato DOPO style.css, lexplain-theme.css (e lexplain-home.css),
   insieme a lx-layout.js. Le regole dell'intestazione hanno !important
   perché lexplain-home.css impila il menu sotto gli 800px con !important.
   ===================================================================== */

:root {
  --lx-zoom: 1.15;
  --lx-gutter: clamp(8px, 2vw, 32px);
  --cl-grad: linear-gradient(90deg, #FFC400 0%, #E6CF14 30%, #A9D93A 60%, #7DDD52 85%, #6CC97A 100%);
  --cl-pent-w: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='70'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.3' stroke-width='1.1' stroke-linejoin='round'%3E%3Cpolygon points='18,9 28.46,16.6 24.47,28.9 11.53,28.9 7.54,16.6'/%3E%3Cpolygon points='54,66 43.54,58.4 47.53,46.1 60.47,46.1 64.46,58.4'/%3E%3C/g%3E%3C/svg%3E");
  --cl-pent-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='70'%3E%3Cg fill='none' stroke='%2346549A' stroke-opacity='.11' stroke-width='1.1' stroke-linejoin='round'%3E%3Cpolygon points='18,9 28.46,16.6 24.47,28.9 11.53,28.9 7.54,16.6'/%3E%3Cpolygon points='54,66 43.54,58.4 47.53,46.1 60.47,46.1 64.46,58.4'/%3E%3C/g%3E%3C/svg%3E");
  --lx-ink: #1F2A55; --lx-ink-2: #3B4478; --lx-muted: #5F6889; --lx-faint: #98A0B8;
  --lx-indigo: #46549A; --lx-indigo-d: #2E3A78; --lx-indigo-soft: #EEF0F8; --lx-indigo-line: #D8DCEE;
  --lx-line: #DDE1E6; --lx-line-2: #ECEEF3; --lx-wash: #F7F8FB;
  --lx-green: #7DDD52; --lx-green-d: #2F7D16; --lx-green-soft: #EAF7E3; --lx-green-line: #CFEBC0;
  --lx-vess: #ffd48a; --lx-vess-bg: #FFF4DE; --lx-vess-ink: #7A4D00;
  --lx-red: #B42318; --lx-red-bg: #FDECEC; --lx-red-line: #F4C7C7;
  --lx-serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --lx-display: "DM Serif Display", Georgia, serif;
}

/* ---------- 1. Scala dei testi ---------- */
/* Testi, spazi e icone ingranditi insieme con la proprietà CSS zoom (i browser che non la
   supportano mostrano le dimensioni originali). Il valore cresce con lo schermo: sul telefono
   il testo è più grande senza togliere troppo spazio; sui monitor grandi la pagina non resta
   una striscia piccola in mezzo. È l'unico punto da regolare per tutte le pagine. */
@media (min-width: 600px)  { :root { --lx-zoom: 1.2; } }
@media (min-width: 1280px) { :root { --lx-zoom: 1.25; } }
@media (min-width: 1600px) { :root { --lx-zoom: 1.32; } }
@media (min-width: 1920px) { :root { --lx-zoom: 1.45; } }
@media (min-width: 2400px) { :root { --lx-zoom: 1.7; } }
@media (min-width: 3200px) { :root { --lx-zoom: 2.1; } }
body > header, body > section, body > footer, body > main, body > .cl-gradient-stage,
body > .container, body > .container-xl, body > .profile-hero, body > .login-card,
.modal-dialog, .lx-toast-area .toast, #backToTop { zoom: var(--lx-zoom); }

/* ---------- 2. Intestazione ---------- */
body > header.lx-header {
  position: sticky; top: 0; z-index: 1030; align-self: stretch; width: 100%;
  border-bottom: 3px solid #7DDD52;
  background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px);
  transition: box-shadow .2s ease, background-color .2s ease;
}
body > header.lx-header.is-scrolled { background: rgba(255, 255, 255, .8); box-shadow: 0 10px 28px -18px rgba(31, 42, 85, .4); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  body > header.lx-header, body > header.lx-header.is-scrolled { background: rgba(255, 255, 255, .96); }
}

/* Una riga: logo | link | utente. Quando non entra, lx-layout.js aggiunge .lx-menu
   e i link passano in un menu a tendina aperto dal pulsante con le tre righe. */
#siteHeader > .landing-nav {
  width: 100% !important; max-width: none !important; box-sizing: border-box !important; margin: 0 !important;
  min-height: 75px !important; padding: 12px var(--lx-gutter) !important;
  display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important;
  justify-content: space-between !important; align-items: center !important;
  column-gap: 20px !important; row-gap: 0 !important; text-align: left !important;
}
#siteHeader > .landing-nav > a:first-child {
  flex: 0 0 auto; max-width: 100% !important; min-width: 0; display: flex !important; flex-wrap: nowrap !important;
  justify-content: flex-start !important; align-items: center !important; gap: 10px !important; text-decoration: none;
}
.lx-brand__nome { font-family: var(--lx-display); font-size: 19px; color: #46549A; white-space: nowrap; }
.lx-brand__lens { color: #3F9E2A; }   /* come nel prototipo: "Lens" in verde */

/* Logo ContractLens: il pentagono con il contratto e la lente che lo misura.
   La luce gialla gira sul bordo e la lente scorre sulle righe; con "riduci movimento" il logo resta fermo. */
.cl-logo { display: block; flex: 0 0 auto; overflow: visible; }
#siteHeader .lx-brand .cl-logo { width: 46px; height: 46px; }
#siteHeader.lx-menu .lx-brand .cl-logo { width: 40px; height: 40px; }
.cl-logo__run { animation: clLogoRun 3s linear infinite; }
.cl-logo__lens { animation: clLogoLens 6s cubic-bezier(.45, 0, .55, 1) infinite; }
@keyframes clLogoRun { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
@keyframes clLogoLens {
  0%, 100% { transform: translate(0, 0); }
  35% { transform: translate(20px, 4px); }
  70% { transform: translate(8px, 16px); }
}
@media (prefers-reduced-motion: reduce) {
  .cl-logo__luce { display: none; }
  .cl-logo__lens { animation: none; }
}

#siteHeader .landing-navlinks {
  display: flex !important; align-items: center; margin-left: auto !important; width: auto !important;
  flex-wrap: nowrap !important; justify-content: flex-end !important; column-gap: 8px; row-gap: 6px;
  font: 600 13px Inter, system-ui, sans-serif;
}
#siteHeader .landing-navlinks a {
  color: #46549A; text-decoration: none; white-space: nowrap;
  padding: 8px 10px; border-radius: 10px; font-size: clamp(12px, 1vw, 14px);
  transition: background-color .15s, color .15s;
}
#siteHeader .landing-navlinks a:hover { background: #EDF7E8; color: #2E3A78; }
/* voce della pagina in cui ci si trova (o della sezione visibile, nella home):
   testo pieno e sottolineatura verde che segue gli angoli arrotondati */
#siteHeader .landing-navlinks a[aria-current] {
  color: #2E3A78 !important; font-weight: 700; background: transparent;
  box-shadow: inset 0 -2px 0 #7DDD52;
}
#siteHeader .landing-navlinks a[aria-current]:hover { background: #EDF7E8; }
#siteHeader .landing-navlinks a.login-link { background: #46549A; color: #fff !important; padding: 10px 18px; border-radius: 999px; box-shadow: none; }
#siteHeader .landing-navlinks a.login-link:hover { background: #2E3A78; }
#siteHeader .landing-navlinks [hidden] { display: none !important; }
#siteHeader .lx-user { flex: 0 0 auto; }

/* nella pagina del profilo la "voce corrente" è il menu utente */
#siteHeader .lx-user:has(.lx-user__voce[aria-current="page"]) .lx-user__btn { border-color: #7DDD52; box-shadow: inset 0 -2px 0 #7DDD52; }

/* pulsante del menu (lo crea lx-layout.js): visibile solo in modalità menu */
.lx-burger { display: none; }
.lx-burger__bars { position: relative; display: block; width: 18px; height: 12px; }
.lx-burger__bars span {
  position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: currentColor;
  transition: transform .22s ease, opacity .15s ease, top .22s ease;
}
.lx-burger__bars span:nth-child(1) { top: 0; }
.lx-burger__bars span:nth-child(2) { top: 5px; }
.lx-burger__bars span:nth-child(3) { top: 10px; }
.lx-burger[aria-expanded="true"] .lx-burger__bars span:nth-child(1) { top: 5px; transform: rotate(45deg); }
.lx-burger[aria-expanded="true"] .lx-burger__bars span:nth-child(2) { opacity: 0; }
.lx-burger[aria-expanded="true"] .lx-burger__bars span:nth-child(3) { top: 5px; transform: rotate(-45deg); }

/* --- modalità menu (telefono, o schermi dove la riga non entra) --- */
#siteHeader.lx-menu > .landing-nav {
  position: static !important; min-height: 60px !important; padding-top: 8px !important; padding-bottom: 8px !important;
  column-gap: 10px !important;
}
#siteHeader.lx-menu > .landing-nav > a:first-child { flex: 1 1 auto; order: 1; }
#siteHeader.lx-menu .lx-user { order: 2; }
#siteHeader.lx-menu .lx-user__nome, #siteHeader.lx-menu .lx-user__chev { display: none; }
#siteHeader.lx-menu .lx-user__btn { width: 40px; height: 40px; padding: 0; justify-content: center; }
#siteHeader.lx-menu .lx-burger {
  order: 3; flex: 0 0 auto; display: inline-grid; place-items: center;
  width: 40px; height: 40px; padding: 0; margin: 0;
  border: 1px solid #D8DCEE; border-radius: 12px; background: rgba(255, 255, 255, .9);
  color: #2E3A78; cursor: pointer; transition: background-color .15s, border-color .15s, box-shadow .15s;
}
#siteHeader.lx-menu .lx-burger:hover, #siteHeader.lx-menu .lx-burger[aria-expanded="true"] {
  background: #fff; border-color: #46549A; box-shadow: 0 4px 14px -8px rgba(46, 58, 120, .5);
}
#siteHeader.lx-menu .lx-burger:focus-visible { outline: 2px solid #46549A; outline-offset: 2px; }

/* la tendina: scende da sotto la riga verde dell'intestazione */
#siteHeader.lx-menu .landing-navlinks {
  order: 4; position: absolute !important; top: calc(100% + 3px); left: 0; right: 0;
  width: auto !important; margin: 0 !important;
  display: flex !important; flex-direction: column !important; align-items: stretch !important;
  justify-content: flex-start !important; flex-wrap: nowrap !important; gap: 2px;
  padding: 10px var(--lx-gutter) 16px; box-sizing: border-box;
  max-height: calc((100dvh - 90px) / var(--lx-zoom, 1)); overflow-y: auto; overscroll-behavior: contain;
  background: #fff; border-bottom: 1px solid #DDE1E6;
  box-shadow: 0 26px 40px -26px rgba(31, 42, 85, .45);
  visibility: hidden; opacity: 0; transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}
#siteHeader.lx-menu.is-open { background: #fff; }
#siteHeader.lx-menu.is-open .landing-navlinks {
  visibility: visible; opacity: 1; transform: none;
  transition: opacity .18s ease, transform .18s ease, visibility 0s;
}
#siteHeader.lx-menu .landing-navlinks a {
  display: flex; align-items: center; gap: 12px; min-height: 48px; box-sizing: border-box;
  padding: 12px 14px; border-radius: 12px; font-size: 16px; font-weight: 600; color: #1F2A55;
}
#siteHeader.lx-menu .landing-navlinks a::after {
  content: ""; margin-left: auto; width: 7px; height: 7px; flex: 0 0 auto;
  border-top: 2px solid #98A0B8; border-right: 2px solid #98A0B8; transform: rotate(45deg);
}
#siteHeader.lx-menu .landing-navlinks a[aria-current] { background: #F3FAEE; }
#siteHeader.lx-menu .landing-navlinks a[aria-current]::after { border-color: #2F7D16; }
#siteHeader.lx-menu .landing-navlinks a.login-link {
  justify-content: center; margin-top: 8px; border-radius: 999px; color: #fff !important;
}
#siteHeader.lx-menu .landing-navlinks a.login-link::after { display: none; }
/* telefono: il badge del piano lascia spazio a logo, utente e menu (con il testo più grande serve sotto i 440px) */
@media (max-width: 439.98px) { #siteHeader.lx-menu .lx-plan { display: none !important; } }
/* durante la misura (lx-layout.js) niente transizioni: la riga si prova e si rimette in un attimo */
#siteHeader.lx-misura, #siteHeader.lx-misura * { transition: none !important; }

@media (prefers-reduced-motion: reduce) {
  #siteHeader .landing-navlinks, .lx-burger__bars span { transition: none !important; }
}

/* ---------- 3. Badge del piano (Business / Admin) ---------- */
.lx-plan {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px; margin-left: 2px;
  border: 1.5px solid transparent; border-radius: 999px; white-space: nowrap;
  background: linear-gradient(#fff, #fff) padding-box, linear-gradient(90deg, #FFCB05, #C3D62C, #7DDD52) border-box;
  font: 700 11.5px/1 "Inter", system-ui, sans-serif; letter-spacing: .02em; color: #2E3A78;
}
.lx-plan[hidden] { display: none; }
.lx-plan--lg { height: 28px; padding: 0 14px; margin: 0; font-size: 13px; }

/* ---------- Menu utente ---------- */
.lx-user { flex: 0 0 auto; }
.lx-user__btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 4px;
  border: 1px solid #D8DCEE; border-radius: 999px; background: rgba(255, 255, 255, .85);
  font: 600 14px/1 "Inter", system-ui, sans-serif; color: #2E3A78; cursor: pointer;
  transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.lx-user__btn:hover, .lx-user__btn[aria-expanded="true"] { background: #fff; border-color: #46549A; box-shadow: 0 4px 14px -8px rgba(46, 58, 120, .5); }
.lx-user__btn:focus-visible { outline: 2px solid #46549A; outline-offset: 2px; }
.lx-user__avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center;
  background: #46549A; color: #fff; font-size: 16px;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #7DDD52;
}
.lx-user__avatar--lg { width: 40px; height: 40px; font-size: 19px; }
.lx-user__avatar--xl { width: 112px; height: 112px; font-size: 54px; box-shadow: 0 0 0 5px #fff, 0 0 0 8px #7DDD52, 0 16px 34px -14px rgba(46, 58, 120, .55); }
.lx-user__nome { max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lx-user__chev { font-size: 12px; color: #5F6889; transition: transform .2s; }
.lx-user__btn[aria-expanded="true"] .lx-user__chev { transform: rotate(180deg); }
.lx-user__menu {
  min-width: 240px; padding: 8px; margin-top: 8px !important; border: 1px solid #DDE1E6; border-radius: 14px;
  background: #fff; box-shadow: 0 18px 40px -18px rgba(31, 42, 85, .4); font-family: "Inter", system-ui, sans-serif;
}
.lx-user__head { display: flex; align-items: center; gap: 10px; padding: 8px 8px 10px; }
.lx-user__id { display: grid; min-width: 0; }
.lx-user__id strong { font-size: 14.5px; color: #1F2A55; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lx-user__id span { font-size: 12.5px; color: #5F6889; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lx-user__menu .lx-user__voce {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px;
  font-size: 14.5px; font-weight: 500; color: #1F2A55; text-decoration: none; background: none; border: 0;
}
.lx-user__menu .lx-user__voce:hover, .lx-user__menu .lx-user__voce:focus,
.lx-user__menu .lx-user__voce[aria-current="page"] { background: #EEF0F8; color: #2E3A78; }
.lx-user__menu .lx-user__voce .bi { font-size: 16px; color: #46549A; }
.lx-user__menu .lx-user__esci, .lx-user__menu .lx-user__esci .bi { color: #5F6889; }
.lx-user__menu .lx-user__esci:hover { background: #FDECEC; color: #9B1C1F; }
.lx-user__menu .lx-user__esci:hover .bi { color: #9B1C1F; }
.lx-user__menu .dropdown-divider { margin: 6px 4px; border-color: #ECEEF3; }
@media (max-width: 640px) {
  .lx-user__nome, .lx-user__chev { display: none; }
  .lx-user__btn { padding: 0 2px; height: 36px; }
}

/* ---------- Striscia dei loghi (pagine senza fascia a gradiente, es. Login) ---------- */
.logos { background: #fff; }
body > section.logos, body > footer.site-footer { align-self: stretch; }   /* anche dove il body centra il contenuto (Login) */
.logos > .container { max-width: none; padding-left: var(--lx-gutter); padding-right: var(--lx-gutter); }
.logos .logo-img { max-height: clamp(45px, 6vw, 80px); width: auto; max-width: 100%; object-fit: contain; }
.logos .logo-img-sm { max-height: clamp(35px, 4.5vw, 60px); width: auto; max-width: 100%; object-fit: contain; }

/* ---------- Piè di pagina scuro (pagine senza fascia a gradiente) ---------- */
footer.site-footer {
  margin-top: auto; padding: 36px 24px 28px; position: relative; overflow: hidden; flex-shrink: 0;
  background: #2D386A; color: #fff;
}
footer.site-footer .footer-bottom {
  margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .08);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
  font-size: .85rem; opacity: .78; background: none;
}
footer.site-footer .footer-bottom a { color: #C9EBB6; text-decoration: none; }
footer.site-footer .footer-bottom a:hover { color: #fff; text-decoration: underline; }
@media (max-width: 600px) { footer.site-footer .footer-bottom { flex-direction: column; align-items: flex-start; } }

/* ---------- Avvisi a comparsa: sotto l'intestazione, non sopra ---------- */
/* --lx-header-h è l'altezza senza zoom: qui (contenitore non scalato) va moltiplicata */
.lx-toast-area { top: calc(var(--lx-header-h, 64px) * var(--lx-zoom) + 8px) !important; }
.lx-toast-area .toast { border-radius: 14px; box-shadow: 0 18px 40px -18px rgba(31, 42, 85, .45); }

/* =====================================================================
   4. Fascia a gradiente, fondo con i pentagoni, piè di pagina sul gradiente
   (stessa resa di analisi.html; lì e nella home c'è ancora una copia interna)
   ===================================================================== */
html body.cl-page { background: #F6FAEF !important; background-image: none !important; }

/* gradiente giallo-verde che scorre */
.cl-flow {
  background-color: #A9D93A !important;
  background-image: var(--cl-grad) !important;
  background-size: 220% 100% !important;
  animation: clFlow 8s ease-in-out infinite;
}
@keyframes clFlow { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* trama di pentagoni bianchi sopra il gradiente, sfumata dove serve (--cl-lat-mask) */
.cl-latticed { position: relative; isolation: isolate; }
.cl-latticed::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--cl-pent-w); background-size: 72px 70px;
  -webkit-mask-image: var(--cl-lat-mask, none); mask-image: var(--cl-lat-mask, none);
}
.cl-recepl { display: block; overflow: visible; pointer-events: none; }

body > .cl-gradient-stage { position: relative; isolation: isolate; overflow: hidden; }
.cl-gradient-stage > section.logos {
  background: transparent !important; background-image: none !important; border: 0; margin: 0;
}
.cl-gradient-stage .logos > .container { max-width: none; padding-left: var(--lx-gutter); padding-right: var(--lx-gutter); }
.cl-stage--top { --cl-lat-mask: radial-gradient(ellipse 52% 120% at 82% 70%, #000 0%, rgba(0, 0, 0, .45) 50%, transparent 85%); }
.cl-stage--end { --cl-lat-mask: radial-gradient(ellipse 70% 85% at 50% 42%, #000 0%, rgba(0, 0, 0, .5) 55%, rgba(0, 0, 0, .18) 100%); }

/* fascia con il titolo della pagina */
.cl-band { position: relative; padding: clamp(14px, 2.2vw, 28px) var(--lx-gutter) clamp(26px, 3.4vw, 42px); color: #1F2A55; }
.cl-band__inner {
  max-width: 1250px; margin: 0 auto; display: grid; align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(20px, 4vw, 56px);
}
.cl-band__inner--solo { grid-template-columns: minmax(0, 1fr); }
.cl-band__eyebrow { margin: 0; display: inline-flex; align-items: center; gap: 8px; color: #2E3A78; font-size: 11px; font-weight: 800; letter-spacing: .25em; line-height: 1.5; }
.cl-band__eyebrow svg { width: 14px; height: 14px; flex: 0 0 auto; }
html body .cl-band__title {
  margin: 10px 0 0; font-family: var(--lx-display) !important; font-weight: 400;
  font-size: clamp(32px, 3.5vw, 46px); line-height: 1.08; letter-spacing: -.02em; color: #2E3A78;
}
.cl-band__lead { margin: 12px 0 0; max-width: 36rem; font-size: clamp(14.5px, 1.3vw, 16.5px); line-height: 1.65; font-weight: 500; color: #1F2A55; }

/* riquadri di vetro sulla fascia: passaggi numerati o numeri riassuntivi */
.cl-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.cl-steps li, .cl-glass {
  position: relative; display: grid; align-content: start; gap: 10px; padding: 14px 16px 16px; border-radius: 16px;
  background: rgba(255, 255, 255, .66); border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 12px 26px -20px rgba(31, 42, 85, .55);
}
@supports ((backdrop-filter: blur(4px)) or (-webkit-backdrop-filter: blur(4px))) {
  .cl-steps li, .cl-glass { background: rgba(255, 255, 255, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
}
.cl-steps li:not(:last-child)::after {
  content: ""; position: absolute; top: 36px; left: calc(100% - 8px); width: 30px; height: 0; z-index: 1;
  border-top: 2px dashed rgba(46, 58, 120, .45);
}
.cl-steps__pent { width: 44px; height: 44px; display: block; overflow: visible; }
.cl-steps__pent .o { fill: #46549A; }
.cl-steps__pent .i { fill: none; stroke: #FFCB05; stroke-width: 1.6; stroke-linejoin: round; }
.cl-steps__pent text { fill: #fff; font: 400 17px "DM Serif Display", Georgia, serif; }
.cl-steps b { display: block; font-size: 15px; line-height: 1.3; color: #1F2A55; }
.cl-steps p { margin: 3px 0 0; font-size: 13.5px; line-height: 1.5; color: #3B4478; }
.cl-steps li:nth-child(1) .cl-steps__pent { animation: clPentIn .6s cubic-bezier(.2, .8, .2, 1) .1s both; }
.cl-steps li:nth-child(2) .cl-steps__pent { animation: clPentIn .6s cubic-bezier(.2, .8, .2, 1) .25s both; }
.cl-steps li:nth-child(3) .cl-steps__pent { animation: clPentIn .6s cubic-bezier(.2, .8, .2, 1) .4s both; }
@keyframes clPentIn { from { opacity: 0; transform: translateY(6px) rotate(-36deg) scale(.7); } to { opacity: 1; transform: none; } }

/* numeri riassuntivi (es. utenti per ruolo) */
.cl-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; }
.cl-stats > div { gap: 4px; padding: 14px 16px; }
.cl-stats dt { order: 2; margin: 0; font-size: 12.5px; font-weight: 600; color: #3B4478; }
.cl-stats dd { order: 1; margin: 0; font-family: var(--lx-display); font-size: 34px; line-height: 1; color: #2E3A78; font-variant-numeric: tabular-nums; }

@media (max-width: 980px) {
  .cl-band__inner { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .cl-steps { gap: 8px; }
  .cl-steps li { justify-items: center; text-align: center; gap: 6px; padding: 10px 6px 12px; }
  .cl-steps__pent { width: 36px; height: 36px; }
  .cl-steps b { font-size: 13px; }
  .cl-steps p { display: none; }
  .cl-steps li:not(:last-child)::after { top: 28px; left: calc(100% - 4px); width: 16px; }
  .cl-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .cl-stats > div { padding: 10px 12px; }
  .cl-stats dd { font-size: 28px; }
}

/* fondo chiaro con pentagoni sotto la fascia */
.cl-desk {
  position: relative; isolation: isolate; flex: 1 0 auto;
  padding: clamp(22px, 3vw, 40px) 0 clamp(48px, 7vw, 96px);
  background: linear-gradient(180deg, #FFFBEA 0%, #F7FBEE 34%, #F1F8EB 100%);
}
.cl-desk::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--cl-pent-i); background-size: 72px 70px;
  -webkit-mask-image: linear-gradient(180deg, #000 0, rgba(0, 0, 0, .55) 520px, rgba(0, 0, 0, .3) 100%);
  mask-image: linear-gradient(180deg, #000 0, rgba(0, 0, 0, .55) 520px, rgba(0, 0, 0, .3) 100%);
}
.cl-desk__deco { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.cl-desk__frame { position: absolute; width: clamp(150px, 15vw, 250px); height: auto; }
.cl-desk__frame--a { top: 26px; right: 1.2vw; transform: rotate(10deg);
  --fa: #FFCB05; --fa-o: .9; --fa-fill: rgba(255, 203, 5, .07); --fb: #7DDD52; --fb-o: .8; --fc: #46549A; --fc-o: .3; --fw: 1.8; }
.cl-desk__frame--b { bottom: 30px; left: 1.2vw; transform: rotate(-12deg);
  --fa: #7DDD52; --fa-o: .75; --fa-fill: rgba(125, 221, 82, .06); --fb: #FFCB05; --fb-o: .85; --fc: #46549A; --fc-o: .3; --fw: 1.8; }
@media (max-width: 760px) { .cl-desk__frame { display: none; } }

/* piè di pagina sul gradiente */
.cl-stage--foot { margin-top: auto; }
.cl-gradient-stage > footer.site-footer {
  background: transparent !important; color: #1F2A55 !important; margin: 0 !important;
  padding: 6px var(--lx-gutter) 22px !important; box-shadow: none !important; border: 0 !important;
}
.cl-gradient-stage > footer.site-footer::before, .cl-gradient-stage > footer.site-footer::after { content: none !important; }
.cl-gradient-stage > footer.site-footer .footer-bottom {
  max-width: none; margin: 0 !important; padding: 16px 0 0 !important; opacity: 1 !important; background: none !important;
  border-top: 1px solid rgba(31, 42, 85, .16) !important; color: #1F2A55 !important; font-weight: 500;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px;
}
.cl-gradient-stage > footer.site-footer .footer-bottom a { color: #2E3A78 !important; font-weight: 600; text-decoration: none; }
.cl-gradient-stage > footer.site-footer .footer-bottom a:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .cl-flow { animation: none !important; }
  .cl-steps__pent { animation: none !important; }
}

/* =====================================================================
   5. Componenti delle pagine interne
   ===================================================================== */
.lx-desk-inner { max-width: 1250px; margin: 0 auto; padding: 0 var(--lx-gutter); box-sizing: border-box; }
.lx-desk-inner--stretto { max-width: 1040px; }

/* foglio bianco sul fondo con i pentagoni (come il riquadro dell'analisi) */
.lx-panel {
  position: relative; background: #fff; border: 1px solid var(--lx-line); border-radius: 20px;
  padding: clamp(16px, 2.4vw, 28px);
  box-shadow: 0 1px 2px rgba(31, 42, 85, .06), 0 26px 52px -32px rgba(46, 58, 120, .42);
  font-family: Inter, system-ui, sans-serif; color: var(--lx-ink);
}
@media (max-width: 600px) { .lx-panel { padding: 14px 12px; border-radius: 16px; } }

/* testata del foglio: titolo, conteggio, azioni */
.lx-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding-bottom: 16px; margin-bottom: 4px; border-bottom: 1px solid var(--lx-line-2); }
.lx-bar__title { margin: 0; display: inline-flex; align-items: center; gap: 10px; font: 700 18px/1.2 Inter, system-ui, sans-serif !important; color: var(--lx-ink) !important; letter-spacing: -.01em; }
.lx-count { display: inline-grid; place-items: center; min-width: 28px; height: 24px; padding: 0 8px; border-radius: 999px; background: var(--lx-indigo-soft); color: var(--lx-indigo-d); font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lx-bar__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
@media (max-width: 600px) {
  .lx-bar__actions { width: 100%; margin-left: 0; }
  .lx-bar__actions .lx-btn { flex: 1 1 auto; }
}

/* pulsanti */
.lx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 9px 16px; line-height: 1.25; text-align: center; text-decoration: none;
  border: 1px solid transparent; border-radius: 12px; font: 600 14.5px/1.25 Inter, system-ui, sans-serif; cursor: pointer;
  transition: background-color .15s, border-color .15s, box-shadow .15s, color .15s;
}
.lx-btn:focus-visible { outline: 2px solid #46549A; outline-offset: 2px; }
.lx-btn:disabled, .lx-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.lx-btn--pri { background: var(--lx-indigo); color: #fff; box-shadow: 0 6px 16px -8px rgba(46, 58, 120, .55); }
.lx-btn--pri:hover:not(:disabled) { background: var(--lx-indigo-d); color: #fff; }
.lx-btn--sec { background: #fff; border-color: var(--lx-line); color: var(--lx-ink); }
.lx-btn--sec .bi { color: var(--lx-green-d); }
.lx-btn--sec:hover:not(:disabled) { background: var(--lx-wash); border-color: #C9D0E2; color: var(--lx-ink); }
.lx-btn--ok { background: var(--lx-green-soft); border-color: var(--lx-green-line); color: var(--lx-green-d); }
.lx-btn--ok:hover:not(:disabled) { background: #DDF1D2; border-color: #B5E09D; color: #22600F; }
.lx-btn--ok-pieno { background: #3E8E1F; color: #fff; }
.lx-btn--ok-pieno:hover:not(:disabled) { background: #2F7D16; color: #fff; }
.lx-btn--danger { background: #fff; border-color: var(--lx-red-line); color: var(--lx-red); }
.lx-btn--danger:hover:not(:disabled) { background: var(--lx-red-bg); border-color: #EBA9A9; color: #8A1F1F; }
.lx-btn--danger-pieno { background: #C0392B; color: #fff; }
.lx-btn--danger-pieno:hover:not(:disabled) { background: #A1271B; color: #fff; }
.lx-btn--sm { min-height: 34px; padding: 6px 12px; font-size: 13.5px; border-radius: 10px; }

/* pulsanti solo icona (azioni sulle righe) */
.lx-ibtn {
  width: 36px; height: 36px; display: inline-grid; place-items: center; padding: 0;
  border: 1px solid var(--lx-line); border-radius: 10px; background: #fff; color: var(--lx-ink-2); font-size: 16px; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.lx-ibtn:hover { background: var(--lx-wash); border-color: #C9D0E2; color: var(--lx-ink); }
.lx-ibtn--ok { color: var(--lx-green-d); }
.lx-ibtn--ok:hover { background: var(--lx-green-soft); border-color: var(--lx-green-line); color: #22600F; }
.lx-ibtn--danger { color: var(--lx-red); }
.lx-ibtn--danger:hover { background: var(--lx-red-bg); border-color: var(--lx-red-line); color: #8A1F1F; }
.lx-ibtn:focus-visible { outline: 2px solid #46549A; outline-offset: 2px; }

/* "Indietro" */
.lx-back {
  display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 12px 0 8px;
  border: 1px solid var(--lx-line); border-radius: 10px; background: #fff;
  font-size: 13.5px; font-weight: 600; color: var(--lx-indigo); text-decoration: none;
}
.lx-back:hover { background: var(--lx-indigo-soft); border-color: var(--lx-indigo-line); color: var(--lx-indigo-d); }

/* etichette */
.lx-pill { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px 0 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; background: #F1F3F8; color: var(--lx-ink-2); }
.lx-pill::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .22); }
.lx-pill--vess { background: var(--lx-vess-bg); color: var(--lx-vess-ink); }
.lx-pill--vess::before { background: var(--lx-vess); box-shadow: none; }
.lx-pill--admin { background: var(--lx-indigo-soft); color: var(--lx-indigo-d); }
.lx-pill--admin::before { background: var(--lx-indigo); box-shadow: none; }
.lx-pill--business { background: linear-gradient(#fff, #fff) padding-box, linear-gradient(90deg, #FFCB05, #C3D62C, #7DDD52) border-box; border: 1.5px solid transparent; color: var(--lx-indigo-d); }
.lx-pill--business::before { background: #C3D62C; box-shadow: none; }
.lx-pill--giurista { background: var(--lx-green-soft); color: var(--lx-green-d); }
.lx-pill--giurista::before { background: var(--lx-green); box-shadow: none; }
.lx-pill--tu { height: 20px; padding: 0 8px; font-size: 11px; font-weight: 700; background: var(--lx-wash); color: var(--lx-muted); }
.lx-pill--tu::before { display: none; }

/* casella di selezione */
.lx-check {
  -webkit-appearance: none; appearance: none; width: 18px; height: 18px; margin: 0; flex: 0 0 auto; cursor: pointer;
  border: 1.5px solid #B9C1D6; border-radius: 5px; background: #fff; display: inline-grid; place-content: center;
  transition: background-color .12s, border-color .12s;
}
.lx-check::after { content: ""; width: 9px; height: 5px; margin-top: -2px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) scale(0); transition: transform .12s; }
.lx-check:checked, .lx-check:indeterminate { background: var(--lx-indigo); border-color: var(--lx-indigo); }
.lx-check:checked::after { transform: rotate(-45deg) scale(1); }
.lx-check:indeterminate::after { width: 8px; height: 0; margin: 0; border-left: 0; transform: none; }
.lx-check:disabled { opacity: .35; cursor: not-allowed; }
.lx-check:focus-visible { outline: 2px solid #46549A; outline-offset: 2px; }

/* tabella di gestione */
.lx-tab-wrap { margin-top: 4px; }
.lx-tab { width: 100%; border-collapse: separate; border-spacing: 0; font: 400 14.5px/1.45 Inter, system-ui, sans-serif; color: var(--lx-ink); }
.lx-tab th {
  padding: 12px 12px; text-align: left; vertical-align: middle; white-space: nowrap;
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--lx-muted);
  background: transparent; border-bottom: 1px solid var(--lx-line);
}
.lx-tab td { padding: 12px 12px; vertical-align: middle; border-bottom: 1px solid var(--lx-line-2); background: #fff; }
.lx-tab tbody tr { transition: background-color .12s; }
.lx-tab tbody tr:hover td { background: #FAFBFD; }
.lx-tab tbody tr.is-sel td { background: #F4F6FC; }
.lx-tab tbody tr:last-child td { border-bottom: 0; }
.lx-tab .lx-col-check { width: 44px; }
.lx-tab .lx-col-azioni { text-align: right; white-space: nowrap; }
.lx-tab .lx-col-azioni .lx-azioni { display: inline-flex; gap: 6px; justify-content: flex-end; }
.lx-tab .lx-num { font-variant-numeric: tabular-nums; color: var(--lx-muted); font-weight: 600; }
.lx-tab .lx-vuoto td { padding: 40px 12px; text-align: center; color: var(--lx-muted); font-style: italic; }

/* persona nella tabella: iniziali, nome, email */
.lx-persona { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lx-persona__ini {
  width: 36px; height: 36px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center;
  background: var(--lx-indigo-soft); color: var(--lx-indigo-d); font-size: 13px; font-weight: 700; letter-spacing: .02em;
}
.lx-persona__testo { display: grid; min-width: 0; }
.lx-persona__nome { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--lx-ink); overflow-wrap: anywhere; }
.lx-persona__mail { font-size: 13px; color: var(--lx-muted); overflow-wrap: break-word; word-break: break-word; }

/* righe di attesa */
.lx-sk { display: block; height: 10px; border-radius: 5px; background: linear-gradient(90deg, #ECEFF5 0%, #E0E4EE 40%, #ECEFF5 80%); background-size: 300% 100%; animation: lxShimmer 1.4s ease-in-out infinite; }
@keyframes lxShimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* sotto la tabella: conteggio e pagine */
.lx-tab-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding-top: 16px; margin-top: 4px; border-top: 1px solid var(--lx-line-2); font-size: 13.5px; color: var(--lx-muted); }
.lx-tab-foot b { color: var(--lx-ink); font-variant-numeric: tabular-nums; }
.lx-pager { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; }
.lx-pager button {
  min-width: 36px; height: 36px; padding: 0 10px; border: 1px solid var(--lx-line); border-radius: 10px; background: #fff;
  font: 600 13.5px Inter, system-ui, sans-serif; color: var(--lx-ink-2); cursor: pointer; font-variant-numeric: tabular-nums;
}
.lx-pager button:hover:not(:disabled) { background: var(--lx-wash); border-color: #C9D0E2; }
.lx-pager button[aria-current="page"] { background: var(--lx-indigo); border-color: var(--lx-indigo); color: #fff; }
.lx-pager button:disabled { opacity: .4; cursor: default; }

/* avvisi dentro il foglio */
.lx-alert { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0 4px; padding: 12px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5; }
.lx-alert .bi { font-size: 16px; margin-top: 1px; }
.lx-alert--ok { background: var(--lx-green-soft); border: 1px solid var(--lx-green-line); color: #22600F; }
.lx-alert--err { background: var(--lx-red-bg); border: 1px solid var(--lx-red-line); color: #8A1F1F; }
.lx-alert__x { margin-left: auto; border: 0; background: none; padding: 0 2px; color: inherit; opacity: .6; font-size: 18px; line-height: 1; cursor: pointer; }
.lx-alert__x:hover { opacity: 1; }

/* telefono: ogni riga diventa una scheda.
   Riga 1: selezione | contenuto principale (a tutta larghezza)
   Riga 2: dati con etichetta sopra | azioni a destra */
@media (max-width: 720px) {
  .lx-tab, .lx-tab tbody { display: block; }
  .lx-tab thead { display: none; }
  .lx-tab tbody tr {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px 12px;
    padding: 14px 12px; border: 1px solid var(--lx-line); border-radius: 14px; margin-bottom: 10px; background: #fff;
  }
  .lx-tab tbody tr.is-sel { background: #F4F6FC; border-color: #C9D0E2; }
  .lx-tab td { display: block; padding: 0; border: 0; background: transparent !important; min-width: 0; }
  .lx-tab .lx-col-check { grid-column: 1; grid-row: 1; width: auto; }
  .lx-tab .lx-col-main { grid-column: 2 / -1; grid-row: 1; }
  .lx-tab td[data-label]:not(.lx-col-main):not(.lx-col-check):not(.lx-col-azioni) {
    grid-column: 2; display: grid; justify-items: start; gap: 4px; font-size: 14px; overflow-wrap: anywhere;
  }
  .lx-tab td[data-label]:not(.lx-col-main):not(.lx-col-check):not(.lx-col-azioni)::before {
    content: attr(data-label); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--lx-faint);
  }
  .lx-tab .lx-col-azioni { grid-column: 3; grid-row: 2; align-self: end; }
  .lx-tab .lx-vuoto { display: block; border: 0; padding: 0; }
  .lx-tab .lx-vuoto td { display: block; padding: 28px 8px; }
  .lx-tab-foot { justify-content: center; text-align: center; }
}

/* finestre di dialogo */
.modal.lx-modal .modal-dialog { max-width: 480px; }
.modal.lx-modal .modal-content {
  border: 0; border-radius: 18px !important; overflow: hidden; font-family: Inter, system-ui, sans-serif; color: var(--lx-ink);
  box-shadow: 0 30px 60px -30px rgba(31, 42, 85, .55);
}
.modal.lx-modal .modal-header {
  align-items: flex-start; padding: 20px 24px 12px; background: #fff !important; border-bottom: 0;
  border-top: 4px solid transparent;
  background-image: linear-gradient(#fff, #fff), linear-gradient(90deg, #FFCB05, #C3D62C, #7DDD52) !important;
  background-origin: border-box; background-clip: padding-box, border-box;
}
.modal.lx-modal .modal-title { margin: 0; font-family: var(--lx-display) !important; font-weight: 400; font-size: 25px; line-height: 1.15; color: var(--lx-indigo) !important; }
.modal.lx-modal .modal-body { padding: 4px 24px 18px; font-size: 14.5px; line-height: 1.6; color: var(--lx-ink-2); }
.modal.lx-modal .modal-body p { margin: 0 0 10px; }
.modal.lx-modal .modal-footer { padding: 14px 24px 20px; gap: 8px; background: #fff !important; border-top: 1px solid var(--lx-line-2); }
.modal.lx-modal .modal-footer > * { margin: 0; }
.modal.lx-modal .lx-nota { display: flex; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--lx-wash); border: 1px solid var(--lx-line-2); font-size: 13px; line-height: 1.5; color: var(--lx-ink-2); }
.modal.lx-modal .lx-nota--warn { background: #FFF8E8; border-color: #F6E2B3; color: #6B4A00; }
.modal.lx-modal .lx-nota .bi { flex: 0 0 auto; margin-top: 1px; }
.modal.lx-modal .lx-campi { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.modal.lx-modal .lx-campo { display: grid; gap: 6px; }
.modal.lx-modal .lx-campo--pieno { grid-column: 1 / -1; }
.modal.lx-modal .lx-campo label { margin: 0; font-size: 13px; font-weight: 600; color: var(--lx-ink); }
.modal.lx-modal .form-control, .modal.lx-modal .form-select {
  height: 42px; border: 1px solid var(--lx-line); border-radius: 10px !important; background-color: var(--lx-wash);
  font-size: 14.5px; color: var(--lx-ink); box-shadow: none;
}
.modal.lx-modal .form-control:focus, .modal.lx-modal .form-select:focus { background-color: #fff; border-color: #46549A !important; box-shadow: 0 0 0 4px rgba(70, 84, 154, .14) !important; }
@media (max-width: 480px) { .modal.lx-modal .lx-campi { grid-template-columns: minmax(0, 1fr); } }


/* =====================================================================
   6. Parti del prototipo uguali in tutte le pagine
      Le regole NON stanno qui, perché non devono dipendere da questo file:
      - loghi del progetto: <style id="cl-loghi"> dentro ogni pagina (nella home, le regole .pt del prototipo);
      - tasti laterali, pannello Accessibilità, "Come funziona" e video: li crea lx-layout.js
        insieme alle loro regole (<style id="lx-parti">).
   ===================================================================== */
