/* Il pannello a destra della chat nella veste smeraldo (CHAT_HOME_SMERALDO, 02/11/2026) — static/lato-chat.js.
   Andrea: «allegati, appunti e fascicolo non hanno lo sfondo verde, non sono nel tema: sembra un'applicazione
   diversa». Il pannello e' un foglio solo: in testa una fascia di velluto smeraldo (lo stesso della Home: fondo
   scuro, riflesso verde acqua, grana del pelo) col titolo nel serif della Home e le schede in fila; sotto UNA
   scheda alla volta, su vetro chiaro velato di smeraldo. Icone e azioni nello smeraldo; restano rossi e gialli
   solo dove dicono qualcosa (da non citare, da controllare, PDF).
   Vince su vetro.css e macos.css (sezioni 80-84) perche' viene dopo e con selettori piu' precisi. */

html body .lc-lato.lc-schede-on {
  --lc-smeraldo: #0b4a37; --lc-smeraldo-2: #0f6b4c; --lc-inchiostro: #0a2f23; --lc-tenue: #55716a; --lc-filo: rgba(10,74,55,.10);
  display: flex !important; flex-direction: column !important; gap: 0 !important; padding: 0 !important;
  border-radius: 24px !important; overflow: hidden !important; container: lato / inline-size;
  background: linear-gradient(180deg, rgba(251,251,250,.92) 0%, rgba(244,245,244,.90) 100%) !important;   /* neutro: si legge a lungo */
  -webkit-backdrop-filter: blur(26px) saturate(1.3); backdrop-filter: blur(26px) saturate(1.3);
  border: 1px solid rgba(10,74,55,.12) !important;
  box-shadow: 0 34px 80px -40px rgba(3,40,28,.55), 0 10px 24px -18px rgba(3,40,28,.30), inset 0 1px 0 rgba(255,255,255,.85) !important;
  animation: none; scrollbar-width: thin;
}
html body .lc-lato.lc-schede-on[hidden] { display: none !important; }

/* ── la testa di velluto ─────────────────────────────────────────────────────────────────────────────── */
.lc-schede-on .lc-testa {
  position: relative; flex-shrink: 0; isolation: isolate; padding: 16px 14px 14px 20px; color: #eef8f3;
  background:
    linear-gradient(112deg, transparent 22%, rgba(150,240,205,.16) 38%, transparent 52%, transparent 64%, rgba(150,240,205,.10) 74%, transparent 86%),
    radial-gradient(90% 120% at 100% 0%, rgba(92,214,168,.38) 0%, rgba(92,214,168,0) 55%),
    radial-gradient(140% 140% at 0% 0%, #1c7a5b 0%, #0e5a43 38%, #08392b 72%, #052419 100%);
  background-size: 260% 100%, 100% 100%, 100% 100%;
  animation: lcVelluto 14s ease-in-out infinite alternate;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,.08), 0 1px 0 rgba(3,40,28,.18);
}
/* la grana del pelo */
.lc-schede-on .lc-testa::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes lcVelluto { from { background-position: 0% 0, 0 0, 0 0; } to { background-position: 100% 0, 0 0, 0 0; } }

.lc-schede-on .lc-testa-r { display: flex; align-items: center; gap: 10px; min-height: 32px; }
.lc-schede-on .lc-testa-t {
  margin: 0; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: 'LexNova Serif', 'Cormorant Garamond', Garamond, Georgia, serif; font-weight: 600; font-size: 23px;
  line-height: 1.1; letter-spacing: -.01em; color: #f6fbf8; text-shadow: 0 1px 10px rgba(0,20,12,.35);
}
.lc-schede-on .lc-testa-n {
  flex-shrink: 0; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 650; line-height: 19px;
  background: rgba(255,255,255,.16); color: #f2faf6; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}
.lc-schede-on .lc-testa-n[hidden] { display: none; }
.lc-schede-on .lc-testa-n.lc-n-ko { background: #ff6a5e; color: #fff; box-shadow: none; }
.lc-schede-on .lc-testa-n.lc-n-par { background: #ffc94a; color: #3a2a00; box-shadow: none; }
.lc-schede-on .lc-chiudi {
  margin-left: auto; flex-shrink: 0; width: 30px; height: 30px; display: grid; place-items: center; padding: 0; cursor: pointer;
  border: 0; border-radius: 999px; color: #eaf6f0; background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
  transition: background .18s ease, transform .18s ease;
}
.lc-schede-on .lc-chiudi:hover { background: rgba(255,255,255,.22); }
.lc-schede-on .lc-chiudi:active { transform: scale(.94); }
.lc-schede-on .lc-chiudi:focus-visible { outline: 2px solid #b9f0dc; outline-offset: 2px; }
.lc-schede-on .lc-chiudi svg { width: 16px; height: 16px; }

/* le schede: pillole di vetro sul velluto; la scelta e' bianca, col suo nome */
.lc-schede-on .lc-schede {
  display: flex; gap: 6px; margin: 14px -14px 0 -6px; padding: 2px 14px 2px 6px; overflow-x: auto; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 22px), transparent);
}
.lc-schede-on .lc-schede::-webkit-scrollbar { display: none; }
.lc-schede-on .lc-scheda {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 11px; cursor: pointer;
  border: 0; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 600; letter-spacing: -.005em; white-space: nowrap;
  color: #e6f5ee; background: rgba(255,255,255,.10); box-shadow: inset 0 0 0 1px rgba(255,255,255,.15);
  transition: background .25s ease, color .25s ease, box-shadow .25s ease, padding .3s cubic-bezier(.2,.9,.25,1);
}
.lc-schede-on .lc-scheda[hidden] { display: none; }
.lc-schede-on .lc-scheda:hover { background: rgba(255,255,255,.18); }
.lc-schede-on .lc-scheda:focus-visible { outline: 2px solid #b9f0dc; outline-offset: 2px; }
.lc-schede-on .lc-scheda.on {
  color: var(--lc-smeraldo); background: #fff;
  box-shadow: 0 8px 20px -10px rgba(0,20,12,.65), inset 0 -1px 0 rgba(10,74,55,.10);
}
.lc-schede-on .lc-scheda-ic { display: grid; place-items: center; width: 18px; height: 18px; flex-shrink: 0; }
.lc-schede-on .lc-scheda-ic svg { width: 18px; height: 18px; display: block; }
/* le icone dei riquadri sono bianche (nate per le mattonelle colorate): sulla scheda scelta diventano smeraldo */
.lc-schede-on .lc-scheda.on .lc-scheda-ic [fill="#fff"] { fill: var(--lc-smeraldo); }
.lc-schede-on .lc-scheda.on .lc-scheda-ic [stroke="#fff"] { stroke: var(--lc-smeraldo); }
.lc-schede-on .lc-scheda.on .lc-scheda-ic [fill^="rgba(0"] { fill: rgba(255,255,255,.55); }
.lc-schede-on .lc-scheda.on .lc-scheda-ic [stroke^="rgba(0"] { stroke: rgba(255,255,255,.75); }
/* il nome della scheda scelta e' gia' il titolo, in grande: sulle pillole solo icona e numero (e il nome nel
   suggerimento); col pannello largo anche i nomi */
.lc-schede-on .lc-scheda-t { display: none; }
@container lato (min-width: 640px) { .lc-schede-on .lc-scheda-t { display: inline; } }
.lc-schede-on .lc-scheda-n {
  min-width: 18px; padding: 0 5px; border-radius: 999px; box-sizing: border-box; text-align: center;
  font-size: 11px; font-weight: 700; line-height: 18px; background: rgba(255,255,255,.18); color: #fff;
}
.lc-schede-on .lc-scheda-n[hidden] { display: none; }
.lc-schede-on .lc-scheda.on .lc-scheda-n { background: rgba(11,74,55,.10); color: var(--lc-smeraldo); }
.lc-schede-on .lc-scheda-n.lc-n-ko, .lc-schede-on .lc-scheda.on .lc-scheda-n.lc-n-ko { background: #ff5a4f; color: #fff; }
.lc-schede-on .lc-scheda-n.lc-n-par, .lc-schede-on .lc-scheda.on .lc-scheda-n.lc-n-par { background: #ffc94a; color: #3a2a00; }

/* ── il corpo: una scheda alla volta, a tutta altezza ─────────────────────────────────────────────────── */
html body .lc-lato.lc-schede-on .lc-box { display: none !important; }
html body .lc-lato.lc-schede-on .lc-box.lc-scelta:not([hidden]) {
  display: flex !important; flex-direction: column; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  position: relative !important; z-index: 0 !important; margin: 0 !important; padding: 10px 10px 14px !important; border: 0 !important; border-radius: 0 !important;
  background: transparent !important; box-shadow: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  animation: lcScheda .38s cubic-bezier(.2,.8,.2,1) both; scrollbar-width: thin; scrollbar-color: rgba(10,74,55,.22) transparent;
}
@keyframes lcScheda { from { opacity: 0; transform: translateY(6px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
html body .lc-lato.lc-schede-on .lc-box .ad-lato-testa { display: none !important; }
html body .lc-lato.lc-schede-on .lc-box .ad-lato-corpo {
  display: block; flex: 1 0 auto; padding: 4px 4px 2px !important; border-top: 0 !important; animation: none !important;
}
.lc-lato.lc-schede-on.lc-attesa .lc-schede { visibility: hidden; }
.lc-lato.lc-schede-on.lc-attesa .lc-sk { padding: 16px; }

/* le righe */
html body :is(.lc-schede-on, .lc-riquadri) .lc-righe { gap: 2px; }
html body :is(.lc-schede-on, .lc-riquadri) .lc-r {
  gap: 12px; padding: 10px 10px; border-radius: 14px; color: var(--lc-inchiostro);
  transition: background .16s ease;
}
html body :is(.lc-schede-on, .lc-riquadri) .lc-r:hover { background: rgba(10,74,55,.055); }
html body :is(.lc-schede-on, .lc-riquadri) .lc-r.statica:hover { background: rgba(10,74,55,.035); }
html body :is(.lc-schede-on, .lc-riquadri) .lc-r + .lc-r { position: relative; }
html body :is(.lc-schede-on, .lc-riquadri) .lc-r + .lc-r::before {
  content: ''; position: absolute; left: 52px; right: 10px; top: -1px; height: 1px; background: var(--lc-filo); pointer-events: none;
}
html body :is(.lc-schede-on, .lc-riquadri) .lc-r:hover::before, html body :is(.lc-schede-on, .lc-riquadri) .lc-r:hover + .lc-r::before { opacity: 0; }
html body :is(.lc-schede-on, .lc-riquadri) .lc-r .lc-ri {
  width: 32px; height: 32px; margin-top: 0; border-radius: 10px; color: var(--lc-smeraldo-2);
  background: linear-gradient(180deg, rgba(15,107,76,.11), rgba(15,107,76,.07)); box-shadow: inset 0 0 0 1px rgba(15,107,76,.10);
}
html body :is(.lc-schede-on, .lc-riquadri) .lc-r .lc-ri .material-symbols-outlined { font-size: 18px; }
html body :is(.lc-schede-on, .lc-riquadri) .lc-r .lc-ri.pdf { color: #c0262d; background: rgba(215,0,21,.07); box-shadow: inset 0 0 0 1px rgba(215,0,21,.10); }
html body :is(.lc-schede-on, .lc-riquadri) .lc-r .lc-ri.word { color: #1a5fb4; background: rgba(26,95,180,.07); box-shadow: inset 0 0 0 1px rgba(26,95,180,.10); }
html body :is(.lc-schede-on, .lc-riquadri) .lc-r .lc-ri.img { color: #7b3fa0; background: rgba(123,63,160,.07); box-shadow: inset 0 0 0 1px rgba(123,63,160,.10); }
html body :is(.lc-schede-on, .lc-riquadri) .lc-r .lc-rt b { font-size: 13.5px; font-weight: 600; color: var(--lc-inchiostro); }
html body :is(.lc-schede-on, .lc-riquadri) .lc-r .lc-rt small { font-size: 12px; color: var(--lc-tenue); margin-top: 2px; }
html body :is(.lc-schede-on, .lc-riquadri) .lc-az { gap: 4px 12px; margin-top: 6px; }
html body :is(.lc-schede-on, .lc-riquadri) .lc-az button, html body :is(.lc-schede-on, .lc-riquadri) .lc-az a { font-size: 12.5px; color: var(--lc-smeraldo-2); }
html body :is(.lc-schede-on, .lc-riquadri) .lc-az button:disabled { color: #9aaba5; }
html body :is(.lc-schede-on, .lc-riquadri) .lc-chev { color: rgba(10,74,55,.45); }
html body :is(.lc-schede-on, .lc-riquadri) .lc-vuoto { margin: 6px 8px 10px; font-size: 13px; line-height: 1.55; color: var(--lc-tenue); }
html body :is(.lc-schede-on, .lc-riquadri) .lc-nota { color: var(--lc-tenue); }
html body :is(.lc-schede-on, .lc-riquadri) .lc-cit { background: var(--lc-smeraldo-2); }

/* i gruppi (fonti, fascicolo) */
html body :is(.lc-schede-on, .lc-riquadri) .lc-gt {
  margin: 12px 8px 4px; padding: 0; font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #3d6457;
}
html body :is(.lc-schede-on, .lc-riquadri) .lc-gt:hover { background: none; }
html body :is(.lc-schede-on, .lc-riquadri) .lc-cerca { height: 36px; margin: 2px 2px 8px; border-radius: 12px; background: rgba(255,255,255,.75); box-shadow: inset 0 0 0 1px var(--lc-filo); }
html body :is(.lc-schede-on, .lc-riquadri) .lc-tutte, html body :is(.lc-schede-on, .lc-riquadri) .lc-altre { color: var(--lc-smeraldo-2); }
html body :is(.lc-schede-on, .lc-riquadri) .lc-tutte:hover, html body :is(.lc-schede-on, .lc-riquadri) .lc-altre:hover { background: rgba(10,74,55,.07); }

/* il piede: «Allega o trascina qui» diventa la zona dove lasciare il file */
html body :is(.lc-schede-on, .lc-riquadri) .lc-piede { margin-top: 10px; padding-top: 0; border-top: 0; }
html body :is(.lc-schede-on, .lc-riquadri) .lc-piede .lc-link {
  width: 100%; justify-content: center; gap: 8px; padding: 14px 12px; border-radius: 16px; font-size: 13px; font-weight: 600;
  color: var(--lc-smeraldo-2); background: rgba(255,255,255,.55); border: 1.5px dashed rgba(10,74,55,.24);
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
html body :is(.lc-schede-on, .lc-riquadri) .lc-piede .lc-link:hover { background: rgba(255,255,255,.9); border-color: rgba(10,74,55,.45); }
html body :is(.lc-schede-on, .lc-riquadri) .lc-piede .lc-link:active { transform: scale(.99); }
html body :is(.lc-schede-on, .lc-riquadri) .lc-piede a.lc-link { border-style: solid; border-width: 1px; border-color: rgba(10,74,55,.16); }

/* da controllare: la casella e il «Vai» nello smeraldo; il verdetto resta rosso o giallo */
html body :is(.lc-schede-on, .lc-riquadri) .lc-r.lc-ctrl .lc-box-ck { border-color: rgba(10,74,55,.35) !important; border-radius: 7px !important; background: #fff; }
html body :is(.lc-schede-on, .lc-riquadri) .lc-r.lc-ctrl.fatto .lc-box-ck { background: var(--lc-smeraldo-2) !important; border-color: var(--lc-smeraldo-2) !important; }
html body :is(.lc-schede-on, .lc-riquadri) .lc-r.lc-ctrl .lc-vai { color: var(--lc-smeraldo-2); border-radius: 999px; padding: 3px 9px; background: rgba(10,74,55,.06); }
html body :is(.lc-schede-on, .lc-riquadri) .lc-r.lc-ctrl .lc-vai:hover { background: rgba(10,74,55,.12); }
html body :is(.lc-schede-on, .lc-riquadri) .lc-progresso { height: 5px; margin: 12px 8px 4px; background: rgba(10,74,55,.10); }
html body :is(.lc-schede-on, .lc-riquadri) .lc-progresso i { background: linear-gradient(90deg, #1c7a5b, #34b386); }
html body :is(.lc-schede-on, .lc-riquadri) .lc-tutto { color: var(--lc-smeraldo-2); }

/* scadenze: il giorno in una tessera smeraldo (in giallo quelle contate dal modello) */
html body :is(.lc-schede-on, .lc-riquadri) .lc-r.lc-sca .lc-data { width: 46px; border-radius: 12px; padding: 4px 0 5px; color: #fff;
  background: radial-gradient(140% 140% at 0% 0%, #1c7a5b 0%, #0b4a37 70%); box-shadow: 0 6px 14px -8px rgba(3,40,28,.6); }
html body :is(.lc-schede-on, .lc-riquadri) .lc-r.lc-sca.stimata .lc-data { background: #fff3cf; color: #7a5200; box-shadow: inset 0 0 0 1px rgba(160,110,0,.25); }

/* appunti: un blocco a righe che usa tutta l'altezza */
html body :is(.lc-schede-on, .lc-riquadri) .lc-box[data-box="appunti"] .ad-lato-corpo { display: flex; flex-direction: column; }
html body :is(.lc-schede-on, .lc-riquadri) .lc-appunti {
  flex: 1 1 auto; min-height: 220px; max-height: none; resize: none; padding: 12px 14px; border-radius: 16px;
  font: inherit; font-size: 14.5px; line-height: 26px; color: var(--lc-inchiostro);
  border: 1px solid var(--lc-filo); background-color: rgba(255,255,255,.82);
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 25px, rgba(10,74,55,.075) 25px, rgba(10,74,55,.075) 26px);
  background-position: 0 11px; background-attachment: local;
  box-shadow: inset 0 1px 2px rgba(3,40,28,.04);
}
html body :is(.lc-schede-on, .lc-riquadri) .lc-appunti:focus { outline: none; border-color: rgba(15,107,76,.55); box-shadow: 0 0 0 4px rgba(15,107,76,.12); }
html body :is(.lc-schede-on, .lc-riquadri) .lc-appunti::placeholder { color: #8aa29a; }
html body :is(.lc-schede-on, .lc-riquadri) .lc-appunti-stato { margin: 8px 6px 0; color: var(--lc-tenue); }

/* gli stati vuoti: un medaglione di velluto con l'icona, il testo al centro */
html body :is(.lc-schede-on, .lc-riquadri) .lc-box[data-box="allegati"] .ad-lato-corpo > .lc-vuoto:first-child,
html body :is(.lc-schede-on, .lc-riquadri) .lc-box[data-box="fascicolo"] .ad-lato-corpo > .lc-vuoto:first-child {
  margin: 22px 14px 14px; text-align: center; text-wrap: balance;
}
html body :is(.lc-schede-on, .lc-riquadri) .lc-box[data-box="allegati"] .ad-lato-corpo > .lc-vuoto:first-child::before,
html body :is(.lc-schede-on, .lc-riquadri) .lc-box[data-box="fascicolo"] .ad-lato-corpo > .lc-vuoto:first-child::before {
  content: ''; display: block; width: 58px; height: 58px; margin: 0 auto 14px; border-radius: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15.6 7.4l-6.5 6.5a1.7 1.7 0 0 0 2.4 2.4l7-7a3.4 3.4 0 0 0-4.8-4.8l-7.1 7.1a5 5 0 0 0 7.1 7.1l6.3-6.3' fill='none' stroke='%23fff' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 26px no-repeat, radial-gradient(90% 90% at 80% 0%, rgba(92,214,168,.45), transparent 60%),
              radial-gradient(140% 140% at 0% 0%, #1c7a5b 0%, #0b4a37 60%, #062e22 100%);
  box-shadow: 0 14px 28px -14px rgba(3,40,28,.7), inset 0 1px 0 rgba(255,255,255,.2);
}
html body :is(.lc-schede-on, .lc-riquadri) .lc-box[data-box="fascicolo"] .ad-lato-corpo > .lc-vuoto:first-child::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3.5 7.5A1.5 1.5 0 0 1 5 6h4.2l1.8 2h8a1.5 1.5 0 0 1 1.5 1.5v8A1.5 1.5 0 0 1 19 19H5a1.5 1.5 0 0 1-1.5-1.5z' fill='none' stroke='%23fff' stroke-width='1.7' stroke-linejoin='round'/%3E%3Cpath d='M3.5 11h17' stroke='%23fff' stroke-width='1.4' opacity='.7'/%3E%3C/svg%3E"), radial-gradient(90% 90% at 80% 0%, rgba(92,214,168,.45), transparent 60%), radial-gradient(140% 140% at 0% 0%, #1c7a5b 0%, #0b4a37 60%, #062e22 100%); }

/* fascicolo: la testa del fascicolo in una tessera */
html body :is(.lc-schede-on, .lc-riquadri) .lc-fasc-testa { margin: 2px 2px 6px; padding: 12px; border-radius: 16px; background: rgba(255,255,255,.7); box-shadow: inset 0 0 0 1px var(--lc-filo); }
html body :is(.lc-schede-on, .lc-riquadri) .lc-fasc-testa .lc-ri { color: var(--lc-smeraldo-2); }
html body :is(.lc-schede-on, .lc-riquadri) .lc-pro-pill { color: #fff; background: radial-gradient(120% 140% at 20% 0%, #1d7a5c 0%, #0b4a37 60%); }

/* ── la maniglia sul bordo sinistro ───────────────────────────────────────────────────────────────────── */
:is(.lc-schede-on, .lc-riquadri) .lc-maniglia {
  position: absolute; left: 0; top: 0; bottom: 0; width: 14px; z-index: 30; cursor: col-resize; touch-action: none; outline: none;
}
:is(.lc-schede-on, .lc-riquadri) .lc-maniglia::before {
  content: ''; position: absolute; left: 4px; top: 50%; width: 4px; height: 46px; margin-top: -23px; border-radius: 4px;
  background: rgba(10,74,55,.0); transition: background .2s ease, height .25s cubic-bezier(.2,.9,.25,1), margin .25s cubic-bezier(.2,.9,.25,1);
}
:is(.lc-schede-on, .lc-riquadri):hover .lc-maniglia::before { background: rgba(10,74,55,.18); }
:is(.lc-schede-on, .lc-riquadri) .lc-maniglia:hover::before, :is(.lc-schede-on, .lc-riquadri) .lc-maniglia:focus-visible::before, html.lc-tiro :is(.lc-schede-on, .lc-riquadri) .lc-maniglia::before {
  background: rgba(10,74,55,.55); height: 72px; margin-top: -36px;
}
html.lc-tiro, html.lc-tiro * { cursor: col-resize !important; user-select: none !important; -webkit-user-select: none !important; }
.lc-lato:is(.lc-schede-on, .lc-riquadri).lc-molla { transition: left .42s cubic-bezier(.2,.9,.25,1.08), width .42s cubic-bezier(.2,.9,.25,1.08); }

/* ── entrare e uscire ─────────────────────────────────────────────────────────────────────────────────── */
html body .lc-lato.lc-schede-on.lc-entra:not([hidden]) {
  animation: lcSmEntra .62s cubic-bezier(.2,.9,.25,1.06) both;
  animation: lcSmEntra .62s linear(0, .009, .035 2.1%, .141 4.4%, .723 12.9%, .938 16.7%, 1.017 19.4%, 1.067, 1.099 24.3%, 1.108 26%, 1.1, 1.077 30.6%, 1.006 38.9%, .983 43.7%, .981 46.6%, .986 51%, 1.002 61.2%, 1.004 67.4%, 1) both;
}
.lc-schede-on.lc-entra .lc-testa > * { animation: lcSmTesta .5s .08s cubic-bezier(.2,.8,.2,1) both; }
@keyframes lcSmEntra { from { opacity: 0; transform: translateX(34px) scale(.97); filter: blur(8px); } 40% { opacity: 1; filter: blur(0); } to { opacity: 1; transform: none; filter: none; } }
@keyframes lcSmTesta { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
html body .lc-lato.lc-schede-on.lc-esce { animation: lcSmEsce .22s cubic-bezier(.4,0,1,1) both; pointer-events: none; }
@keyframes lcSmEsce { to { opacity: 0; transform: translateX(28px) scale(.98); filter: blur(6px); } }

/* il tasto in alto: acceso quando il pannello e' aperto */
html body .top .lc-interruttore[aria-pressed="true"] { color: #0b4a37; background: rgba(10,74,55,.09); }

@media (prefers-reduced-motion: reduce) {
  .lc-schede-on .lc-testa { animation: none; }
  html body .lc-lato.lc-schede-on.lc-entra:not([hidden]), html body .lc-lato.lc-schede-on.lc-esce,
  html body .lc-lato.lc-schede-on .lc-box.lc-scelta:not([hidden]), .lc-schede-on.lc-entra .lc-testa > * { animation: none !important; }
}

/* ── la pillola in alto a destra che apre il pannello (02/11/2026) ─────────────────────────────────────────
   Andrea: «il chiudi/apri pannello e' poco intuitivo» (scelto: chiuso di serie, tasto chiaro). Una pillola di vetro
   con le icone dei riquadri che la chat ha e il loro numero: si capisce che cosa c'e' prima di aprire. La scheda
   aperta e' in velluto smeraldo con l'icona bianca; un altro clic la richiude. lato-chat.js, `lc-lanciatore`. */
.top .lc-lanciatore {
  display: inline-flex; align-items: center; gap: 2px; height: 40px; padding: 0 4px; box-sizing: border-box; flex-shrink: 0;
  border-radius: 999px; background: rgba(255,255,255,.82);
  -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: inset 0 0 0 1px rgba(10,74,55,.10), 0 6px 16px -10px rgba(3,26,20,.35);
}
.top .lc-lanciatore[hidden] { display: none !important; }
.lc-lanciatore .lc-lan-b {
  position: relative; width: 34px; height: 32px; padding: 0; display: grid; place-items: center; cursor: pointer;
  border: 0; border-radius: 999px; background: none; color: #0f6b4c;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.lc-lanciatore .lc-lan-b[hidden] { display: none; }
.lc-lanciatore .lc-lan-b:hover { background: rgba(10,74,55,.08); }
.lc-lanciatore .lc-lan-b:active { transform: scale(.94); }
.lc-lanciatore .lc-lan-b:focus-visible { outline: 2px solid #0f6b4c; outline-offset: 1px; }
.lc-lanciatore .lc-lan-b svg { width: 18px; height: 18px; display: block; }
/* le icone dei riquadri nascono bianche: qui prendono il colore del tasto */
.lc-lanciatore .lc-lan-b [fill="#fff"] { fill: currentColor; }
.lc-lanciatore .lc-lan-b [stroke="#fff"] { stroke: currentColor; }
.lc-lanciatore .lc-lan-b [fill^="rgba(0"] { fill: rgba(255,255,255,.7); }
.lc-lanciatore .lc-lan-b [stroke^="rgba(0"] { stroke: rgba(255,255,255,.85); }
.lc-lanciatore .lc-lan-b[aria-pressed="true"] {
  color: #fff;
  background: radial-gradient(90% 90% at 85% 0%, rgba(92,214,168,.40) 0%, rgba(92,214,168,0) 60%),
              radial-gradient(140% 140% at 0% 0%, #1c7a5b 0%, #0e5a43 50%, #073326 100%);
  box-shadow: 0 6px 14px -8px rgba(3,40,28,.7), inset 0 1px 0 rgba(255,255,255,.2);
}
.lc-lanciatore .lc-lan-b[aria-pressed="true"] [fill^="rgba(0"] { fill: rgba(0,40,25,.35); }
.lc-lanciatore .lc-lan-n {
  position: absolute; top: -3px; right: -2px; min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box;
  border-radius: 999px; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
  color: #fff; background: #0f6b4c; box-shadow: 0 0 0 2px #fff; pointer-events: none;
}
.lc-lanciatore .lc-lan-n[hidden] { display: none; }
.lc-lanciatore .lc-lan-n.lc-n-ko { background: #e5352b; }
.lc-lanciatore .lc-lan-n.lc-n-par { background: #e0a300; color: #2e2100; }
.lc-lanciatore .lc-lan-b[aria-pressed="true"] .lc-lan-n:not(.lc-n-ko):not(.lc-n-par) { background: #fff; color: #0b4a37; box-shadow: 0 0 0 2px rgba(11,74,55,.25); }

/* la fila delle schede dentro il pannello ripeteva la pillola in alto: si cambia scheda dalla pillola, e nella testa di
   velluto restano il titolo, il numero e la × */
.lc-schede-on .lc-schede { display: none !important; }
.lc-schede-on .lc-testa { padding: 18px 14px 16px 22px; }

/* ── i riquadri come nella redazione (02/11/2026, sera) ──────────────────────────────────────────────────────
   Andrea: «come nella redazione praticamente, solamente un po' piu' grande». Riquadri bianchi separati, sempre a lato,
   chiusi entrando: la testa (icona smeraldo, nome, numero, freccetta) li apre verso il basso. Allegati e Fonti a schede
   due per riga, come gli allegati della redazione, un po' piu' grandi; il resto a righe. */
html body .lc-lato.lc-riquadri { gap: 12px !important; padding: 2px 4px 12px 6px !important; scrollbar-width: thin; scrollbar-color: rgba(10,74,55,.2) transparent; }
html body .lc-riquadri .ad-lato {
  position: relative !important; flex-shrink: 0; overflow: hidden;
  border-radius: 20px !important; border: 1px solid rgba(10,74,55,.10) !important;
  background: rgba(255,255,255,.94) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.2) !important; backdrop-filter: blur(18px) saturate(1.2) !important;
  box-shadow: 0 1px 2px rgba(3,26,20,.04), 0 16px 36px -26px rgba(3,26,20,.38) !important;
  transition: box-shadow .2s ease;
}
html body .lc-riquadri .ad-lato.aperto { box-shadow: 0 1px 2px rgba(3,26,20,.05), 0 22px 44px -28px rgba(3,26,20,.45) !important; }
html body .lc-riquadri .ad-lato-testa { gap: 12px !important; min-height: 58px; padding: 13px 16px 13px 14px !important; border-radius: 0 !important; cursor: pointer; }
html body .lc-riquadri .ad-lato-testa:hover { background: rgba(10,74,55,.035) !important; }
html body .lc-riquadri .ad-lato-testa:focus-visible { outline: 2px solid #0f6b4c; outline-offset: -2px; }
html body .lc-riquadri .lc-tile {
  width: 34px !important; height: 34px !important; border-radius: 11px !important;
  background: linear-gradient(180deg, rgba(15,107,76,.13), rgba(15,107,76,.07)) !important; box-shadow: inset 0 0 0 1px rgba(15,107,76,.12);
}
html body .lc-riquadri .lc-tile svg { width: 18px !important; height: 18px !important; }
html body .lc-riquadri .lc-tile [fill="#fff"] { fill: #0f6b4c; }
html body .lc-riquadri .lc-tile [stroke="#fff"] { stroke: #0f6b4c; }
html body .lc-riquadri .lc-tile [fill^="rgba(0"] { fill: rgba(255,255,255,.8); }
html body .lc-riquadri .lc-tile [stroke^="rgba(0"] { stroke: rgba(255,255,255,.9); }
html body .lc-riquadri .ad-lato.aperto .lc-tile {
  background: radial-gradient(90% 90% at 85% 0%, rgba(92,214,168,.40) 0%, rgba(92,214,168,0) 60%),
              radial-gradient(140% 140% at 0% 0%, #1c7a5b 0%, #0e5a43 50%, #073326 100%) !important; box-shadow: 0 6px 14px -8px rgba(3,40,28,.6);
}
html body .lc-riquadri .ad-lato.aperto .lc-tile [fill="#fff"] { fill: #fff; }
html body .lc-riquadri .ad-lato.aperto .lc-tile [stroke="#fff"] { stroke: #fff; }
html body .lc-riquadri .ad-lato.aperto .lc-tile [fill^="rgba(0"] { fill: rgba(0,40,25,.35); }
html body .lc-riquadri .ad-lato-t { font-size: 15.5px !important; font-weight: 650 !important; letter-spacing: -.01em; color: #0d1f19; }
html body .lc-riquadri .ad-lato-testa .ad-n {
  min-width: 22px; padding: 1px 8px !important; border-radius: 999px; box-sizing: border-box; text-align: center;
  font-size: 12.5px !important; font-weight: 650 !important; background: rgba(10,74,55,.08) !important; color: #0f6b4c !important;
}
html body .lc-riquadri .ad-lato-testa .ad-n.lc-n-ko { background: rgba(214,69,59,.13) !important; color: #b3261e !important; }
html body .lc-riquadri .ad-lato-testa .ad-n.lc-n-par { background: rgba(224,163,0,.17) !important; color: #7a5200 !important; }
html body .lc-riquadri .ad-lato-testa .ad-freccia { width: 17px !important; height: 17px !important; color: #6b7c75 !important; }
html body .lc-riquadri .ad-lato-corpo { padding: 12px 12px 14px !important; border-top: 1px solid rgba(10,74,55,.08) !important; animation: lcCorpo .32s cubic-bezier(.2,.8,.2,1) both !important; }
@keyframes lcCorpo { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* le schede due per riga (allegati e fonti), come la redazione ma un po' piu' grandi */
html body .lc-riquadri .lc-griglia { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px !important; margin: 0; }
html body .lc-riquadri .lc-griglia .ad-card {
  position: relative; display: flex !important; flex-direction: column; gap: 7px; min-width: 0; min-height: 118px !important; padding: 12px !important;
  box-sizing: border-box; border-radius: 15px !important; cursor: pointer; text-align: left;
  background: #f5f7f6 !important; border: 1px solid rgba(10,74,55,.07) !important; box-shadow: none !important;
  transition: background .16s ease, transform .16s ease, border-color .16s ease;
}
html body .lc-riquadri .lc-griglia .ad-card.si-legge:hover { background: #edf3f0 !important; border-color: rgba(10,74,55,.16) !important; transform: translateY(-1px); }
html body .lc-riquadri .lc-griglia .ad-card:focus-visible { outline: 2px solid #0f6b4c; outline-offset: 2px; }
html body .lc-riquadri .lc-griglia .ad-card.scaduto { cursor: default; opacity: .7; }
html body .lc-riquadri .lc-griglia .ad-ic { align-self: flex-start; padding: 2px 8px !important; border-radius: 7px !important; font-size: 10.5px !important; font-weight: 700; letter-spacing: .02em; }
html body .lc-riquadri .ad-ic.ad-pdf { background: rgba(215,0,21,.09) !important; color: #b3261e !important; }
html body .lc-riquadri .ad-ic.ad-word { background: rgba(26,95,180,.10) !important; color: #1a5fb4 !important; }
html body .lc-riquadri .ad-ic.ad-img { background: rgba(123,63,160,.10) !important; color: #6f3a96 !important; }
html body .lc-riquadri .ad-ic.ad-doc, html body .lc-riquadri .ad-ic.ad-fonte { background: rgba(10,74,55,.08) !important; color: #3d6457 !important; }
html body .lc-riquadri .ad-ic.ad-norma { background: rgba(15,107,76,.12) !important; color: #0f6b4c !important; }
html body .lc-riquadri .ad-ic.ad-sentenza { background: rgba(43,74,122,.10) !important; color: #2b4a7a !important; }
html body .lc-riquadri .lc-griglia .ad-nome {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; word-break: break-word;
  font-size: 13.5px !important; font-weight: 600 !important; line-height: 1.35; color: #0d1f19;
}
html body .lc-riquadri .lc-griglia .ad-piede { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; margin-top: auto; min-width: 0; }
html body .lc-riquadri .lc-griglia .ad-peso { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px !important; color: #6b7c75; }
html body .lc-riquadri .lc-griglia .ad-apri { flex-shrink: 0; font-size: 12.5px !important; font-weight: 650; color: #0f6b4c; padding: 0 !important; background: none !important; }
html body .lc-riquadri .lc-griglia .lc-cit { position: absolute; top: 14px; right: 13px; margin: 0; }
html body .lc-riquadri .lc-gt { margin: 6px 4px 8px; }
html body .lc-riquadri .lc-griglia + .lc-gt, html body .lc-riquadri .lc-altre + .lc-gt { margin-top: 16px; }
html body .lc-riquadri .lc-altre { margin: 8px 2px 0; }
html body .lc-riquadri .lc-appunti { min-height: 170px; }

/* 02/11/2026, sera (Andrea: «togli il riquadro e lo sfondo delle icone, tieni soltanto l'icona»): nella testa dei riquadri
   solo il segno, nello smeraldo; aperto un poco piu' scuro */
html body .lc-riquadri .lc-tile, html body .lc-riquadri .ad-lato.aperto .lc-tile {
  width: 24px !important; height: 24px !important; border-radius: 0 !important; background: none !important; box-shadow: none !important;
}
html body .lc-riquadri .lc-tile svg { width: 20px !important; height: 20px !important; }
html body .lc-riquadri .ad-lato.aperto .lc-tile [fill="#fff"] { fill: #0b4a37; }
html body .lc-riquadri .ad-lato.aperto .lc-tile [stroke="#fff"] { stroke: #0b4a37; }
html body .lc-riquadri .ad-lato.aperto .lc-tile [fill^="rgba(0"] { fill: rgba(255,255,255,.85); }
html body .lc-riquadri .ad-lato-testa { gap: 11px !important; }
/* 02/11/2026, sera: niente medaglione con l'icona nei riquadri vuoti (Allegati, Fascicolo): resta il testo */
html body :is(.lc-schede-on, .lc-riquadri) .lc-box .ad-lato-corpo > .lc-vuoto:first-child::before { display: none !important; }
html body :is(.lc-schede-on, .lc-riquadri) .lc-box .ad-lato-corpo > .lc-vuoto:first-child { margin-top: 8px; }

/* 03/11/2026 — Andrea: «il simbolo dentro le icone prende il colore, e il contorno sparisca». Nella colonna di
   serie (non la veste smeraldo .lc-riquadri) la mattonella colorata sparisce: resta il simbolo, nel colore che
   aveva la mattonella; i dettagli che erano scuri sul bianco diventano bianchi, come ritagli. */
html body .lc-lato:not(.lc-riquadri) .lc-tile {
  background: none !important; box-shadow: none !important; border: 0 !important; border-radius: 0;
  width: 26px; height: 26px;
}
html body .lc-lato:not(.lc-riquadri) .lc-tile svg { width: 22px !important; height: 22px !important; }
html body .lc-lato:not(.lc-riquadri) .lc-tile-rev, html body .lc-lato:not(.lc-riquadri) .lc-tile-rev svg { color: #f08a00 !important; }
html body .lc-lato:not(.lc-riquadri) .lc-tile-sca, html body .lc-lato:not(.lc-riquadri) .lc-tile-sca svg { color: #ff3b30 !important; }
html body .lc-lato:not(.lc-riquadri) .lc-tile-all, html body .lc-lato:not(.lc-riquadri) .lc-tile-all svg { color: #1a8cf0 !important; }
html body .lc-lato:not(.lc-riquadri) .lc-tile-fon, html body .lc-lato:not(.lc-riquadri) .lc-tile-fon svg { color: #26a33f !important; }
html body .lc-lato:not(.lc-riquadri) .lc-tile-doc, html body .lc-lato:not(.lc-riquadri) .lc-tile-doc svg { color: #af52de !important; }
html body .lc-lato:not(.lc-riquadri) .lc-tile-app, html body .lc-lato:not(.lc-riquadri) .lc-tile-app svg { color: #e3a700 !important; }
html body .lc-lato:not(.lc-riquadri) .lc-tile-fas, html body .lc-lato:not(.lc-riquadri) .lc-tile-fas svg { color: #636366 !important; }
html body .lc-lato:not(.lc-riquadri) .lc-tile [fill="#fff"] { fill: currentColor; }
html body .lc-lato:not(.lc-riquadri) .lc-tile [stroke="#fff"] { stroke: currentColor; }
html body .lc-lato:not(.lc-riquadri) .lc-tile [fill^="rgba("] { fill: rgba(255,255,255,.9); }
html body .lc-lato:not(.lc-riquadri) .lc-tile [stroke^="rgba("] { stroke: rgba(255,255,255,.95); }
html body .lc-lato:not(.lc-riquadri) .lc-tile text { fill: #fff; }

/* 03/11/2026 — Andrea: «gli appunti a stile blocco note, con le righe che sembra di scrivere sulla carta, e
   quando vado a capo vado sulla nuova riga». Carta avorio, una riga ogni 28px che coincide con l'interlinea
   (cosi' ogni a capo cade sulla riga dopo), il margine rosso a sinistra. `local`: le righe scorrono col testo. */
html body .lc-lato:not(.lc-riquadri) .lc-appunti {
  --riga: 28px;
  display: block; width: 100%; min-height: calc(var(--riga) * 6 + 6px); max-height: calc(var(--riga) * 14 + 6px);
  padding: 6px 12px 0 38px; box-sizing: border-box; resize: vertical;
  font-family: inherit; font-size: 16px !important; line-height: var(--riga) !important; color: #2b2a26;
  border: 1px solid #ece4cc; border-radius: 10px; outline: none;
  background-color: #fffcf2;
  background-image:
    linear-gradient(90deg, transparent 27px, rgba(222,92,82,.45) 27px, rgba(222,92,82,.45) 28px, transparent 28px),
    repeating-linear-gradient(180deg, transparent 0, transparent calc(var(--riga) - 1px), #e7dfc6 calc(var(--riga) - 1px), #e7dfc6 var(--riga));
  background-position: 0 0, 0 6px;
  background-attachment: local, local;
  box-shadow: 0 1px 2px rgba(80,60,10,.06);
}
html body .lc-lato:not(.lc-riquadri) .lc-appunti:focus { border-color: #e0d3a8; box-shadow: 0 0 0 3px rgba(227,167,0,.14); }
html body .lc-lato:not(.lc-riquadri) .lc-appunti::placeholder { color: #a9a08a; }

/* 22/11/2026 (Andrea, con la foto: «la parte evidenziata va accorciata e resa più comprensibile»; «metti un manager dei
   file»): nel riquadro Fascicolo il nome del fascicolo e che cosa ne usa LexNova in una riga, poi il tasto che apre il
   gestore dei file (static/gestore-file.js) */
html body .lc-lato a.lc-fasc-corta { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; cursor: pointer; }
html body .lc-lato a.lc-fasc-corta:hover { box-shadow: inset 0 0 0 1px rgba(15,107,76,.35); }
html body .lc-lato .lc-fasc-corta .lc-rt { flex: 1; display: grid; gap: 2px; min-width: 0; }
html body .lc-lato .lc-fasc-corta .lc-rt b { display: block; font-size: 14px; font-weight: 650; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html body .lc-lato .lc-fasc-corta .lc-rt small { display: block; font-size: 12.5px; line-height: 1.35; color: #5c6b65; }
html body .lc-lato .lc-fasc-gestisci { display: flex; align-items: center; gap: 10px; width: calc(100% - 4px); margin: 2px 2px 10px; padding: 10px 12px;
  border: 0; border-radius: 12px; background: rgba(15,107,76,.08); color: #0f6b4c; font: 600 13.5px/1.3 Inter, sans-serif; cursor: pointer; text-align: left; }
html body .lc-lato .lc-fasc-gestisci:hover { background: rgba(15,107,76,.14); }
html body .lc-lato .lc-fasc-gestisci:focus-visible { outline: 2px solid #0f6b4c; outline-offset: 2px; }
html body .lc-lato .lc-fasc-gestisci span { flex: 1; text-align: left; }
html body .lc-lato .lc-fasc-gestisci b { font-weight: 600; color: #5c6b65; font-variant-numeric: tabular-nums; }
html body .lc-lato .lc-fasc-gestisci .material-symbols-outlined { font-size: 18px; }
html body .lc-lato .lc-piede .lc-tenue { color: #6b7c75; font-weight: 500; }
