/* GENERATO da scripts/palette_smeraldo.py da static/vetro.css: non modificare, rilanciare lo script. */
/* ═══════════════════════════════════════════════════════════════════════════
   LexNova Chat — veste «Vetro» (stile Apple / Liquid Glass), 30/10/2026.

   È uno STRATO sopra app.css, caricato dopo di lui in base.html: non tocca
   una riga del foglio principale. Per tornare alla veste di prima basta
   togliere il <link> a questo file.

   Le idee, nell'ordine in cui reggono tutto:
   1. Sotto ogni cosa c'è uno sfondo vivo (aloni verdi, acqua e cielo, fermi):
      il vetro senza niente dietro è solo grigio.
   2. Una sola materia, il vetro (`--vetro-*`): fondo bianco trasparente,
      sfocatura forte con più saturazione, un filo di luce sul bordo alto e
      un'ombra morbida. Barre, campo, menu, finestre e schede la usano tutti.
   3. Forme Apple: pillole per i comandi, angoli ampi per i pannelli, la barra
      laterale che galleggia staccata dai bordi.
   4. Carattere di sistema (SF Pro sui Mac e iPhone, Inter altrove) anche nei
      titoli, al posto di Fraunces e Kulim Park.
   5. Il verde resta quello del marchio, con la stessa regola: pieno per le
      superfici, cupo per quel che si legge.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --sf: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Inter', 'Segoe UI', system-ui, sans-serif;
  --sf-titolo: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', 'Segoe UI', system-ui, sans-serif;

  /* tela: non più bianca piena, ma il grigio-perla dei fondi Apple */
  --bg:     #fbfbfc;   /* il fondo originale di app.css */
  --sunk:   rgba(118,118,128,.12);   /* il «fill» di sistema di Apple */
  --line:   rgba(60,60,67,.12);
  --line-soft: rgba(60,60,67,.07);
  --muted:  #6e6e73;
  --faint:  #8e8e93;
  --radius: 22px;

  /* la materia */
  --vetro:        rgba(255,255,255,.58);
  --vetro-forte:  rgba(255,255,255,.74);
  --vetro-tenue:  rgba(255,255,255,.38);
  --vetro-sfoca:  blur(28px) saturate(185%);
  --vetro-sfoca-forte: blur(40px) saturate(200%);
  --vetro-orlo:   rgba(255,255,255,.65);
  --vetro-luce:   inset 0 1px 0 rgba(255,255,255,.85), inset 0 -1px 0 rgba(255,255,255,.25), inset 0 0 0 .5px rgba(255,255,255,.35);
  --vetro-ombra:  0 1px 2px rgba(0,0,0,.04), 0 8px 30px rgba(22,38,32,.08);
  --vetro-ombra-alta: 0 2px 6px rgba(0,0,0,.05), 0 24px 70px rgba(22,38,32,.18);

  --molla: cubic-bezier(.32,.72,0,1);   /* la curva delle animazioni di iOS */
}

/* ── 1. lo sfondo vivo ───────────────────────────────────────────────────── */
html { background: var(--bg); }
body {
  font-family: var(--sf);
  letter-spacing: -.008em;
  /* 30/10/2026: via gli aloni verdi/azzurri su tutta la pagina (richiesta
     dell'utente): torna il fondo chiaro originale, e nella schermata iniziale
     la «nuvola» verde di app.css (.main.vuota::before), che e' rimasta intatta. */
  background: var(--bg);
}
.main, .main.vuota { background: transparent; }

/* titoli: niente serif, il carattere di sistema in peso pieno */
.serif, .page h1, .saluto, .saluto-atto, h1, h2 {
  font-family: var(--sf-titolo);
  font-optical-sizing: auto;
}
.saluto {
  font-weight: 650;
  letter-spacing: -.035em;
  background: linear-gradient(180deg, #1d1d1f 30%, #3d4a42);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.page h1 { font-weight: 700; letter-spacing: -.03em; }
.eyebrow, .page-card h2, .pop .pop-t { letter-spacing: .02em; text-transform: none; font-size: 12px; font-weight: 600; color: var(--muted); }

/* ── 2. la materia, applicata alle superfici ─────────────────────────────── */
.rail, .menu, .pop, .drawer, .foglio, .foglio-modelli, .muro, .set, .accesso,
.consenso, .popup-domande, .page-card, .composer, .main.vuota .composer,
.novita, .cassa, .spiega, .rd-foglio, .rd-tipo-menu, .table-wrap {
  background: var(--vetro) !important;
  -webkit-backdrop-filter: var(--vetro-sfoca);
  backdrop-filter: var(--vetro-sfoca);
  border: 1px solid var(--vetro-orlo) !important;
  box-shadow: var(--vetro-luce), var(--vetro-ombra);
}

/* le superfici che galleggiano sopra tutto: più piene e più ombra */
.menu, .pop, .muro, .set, .accesso, .foglio, .foglio-modelli, .novita, .cassa,
.spiega, .rd-tipo-menu, .consenso, .drawer {
  background: var(--vetro-forte) !important;
  -webkit-backdrop-filter: var(--vetro-sfoca-forte);
  backdrop-filter: var(--vetro-sfoca-forte);
  box-shadow: var(--vetro-luce), var(--vetro-ombra-alta);
}

/* schede dentro la pagina: vetro leggero, senza ombra pesante */
.atto, .src, .sent-breve, .lv, .uso, .conto-blocco, .pro-stato, .pro-esito,
.doc-atto, .doc-correggi, .tv-carta, .rd-carta, .spunto, .chip, .doc-chip,
.soglia-cosa, .muro .muro-cosa, .dr-nome, .fn-testo, .rd-corso {
  background: var(--vetro-tenue) !important;
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  backdrop-filter: blur(18px) saturate(170%);
  border-color: rgba(255,255,255,.6) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75), 0 1px 3px rgba(0,0,0,.04);
}

/* i veli dietro le finestre: più chiari, più sfocati, neutri */
.velo, .drawer-bg, .muro-bg, .cassa-bg, .rail-velo, .accesso-bg, .novita-velo, .spiega-velo {
  background: rgba(31,39,36,.16) !important;
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  backdrop-filter: blur(10px) saturate(140%);
}

/* ── 3. la barra laterale che galleggia (solo da scrivania) ──────────────── */
@media (min-width: 901px) {
  .shell { padding: 10px 0 10px 10px; gap: 0; }
  .rail {
    height: calc(100dvh - 20px);
    border-radius: 26px;
    overflow: hidden;
  }
  .rail.chiusa { border-color: var(--vetro-orlo) !important; }
}
@media (max-width: 900px) {
  .rail { border-radius: 0 26px 26px 0; }
}
.rail { background: rgba(255,255,255,.46) !important; }
.rail-foot { border-top: 1px solid var(--line-soft); }

.rail-voce, .thread-item, .rail-set {
  border-radius: 12px;
  padding-top: 7px; padding-bottom: 7px;
  transition: background .25s var(--molla), color .2s ease, transform .25s var(--molla);
}
.rail-voce:hover, .thread-item:hover, .rail-set:hover { background: rgba(255,255,255,.55); }
.rail-voce:active, .thread-item:active { transform: scale(.98); }
.rail-voce.on, .thread-item.on {
  background: rgba(255,255,255,.85);
  color: var(--ink);
  box-shadow: inset 0 1px 0 #fff, 0 1px 4px rgba(0,0,0,.06);
}
.rail-voce.on .material-symbols-outlined { color: var(--accent-ink); }
.rail-logo { border-radius: 8px; }

/* ── 4. il campo di scrittura: una capsula di vetro ──────────────────────── */
.dock { background: none; }
.composer, .main.vuota .composer {
  border-radius: 28px;
  padding: 6px 7px;
  transition: box-shadow .3s var(--molla), background .3s ease, transform .3s var(--molla);
}
.main.vuota .composer { border-radius: 999px; padding: 10px 9px; }
.composer:focus-within, .main.vuota .composer:focus-within {
  background: rgba(255,255,255,.82) !important;
  box-shadow: var(--vetro-luce), 0 0 0 4px rgba(52,129,98,.16), 0 12px 40px rgba(24,56,43,.14);
}
.main.vuota .composer:hover { background: rgba(255,255,255,.7) !important; }
/* mentre il modello lavora: un alone che respira, al posto del filo che scorre */
.dock.lavora .composer {
  animation: none;
  box-shadow: var(--vetro-luce), 0 0 0 3px rgba(52,129,98,.22), 0 10px 36px rgba(24,56,43,.12);
}
@media (prefers-reduced-motion: no-preference) {
  .dock.lavora .composer { animation: vetroRespira 2.4s ease-in-out infinite; }
}
@keyframes vetroRespira {
  0%, 100% { box-shadow: var(--vetro-luce), 0 0 0 3px rgba(52,129,98,.14), 0 10px 36px rgba(24,56,43,.10); }
  50%      { box-shadow: var(--vetro-luce), 0 0 0 6px rgba(52,129,98,.26), 0 10px 40px rgba(24,56,43,.16); }
}

/* Il campo vero è `.composer.sq`: la sua forma la disegna un SVG (`.sq-fondo`,
   uno «squircle» bianco) e il form resta trasparente. Un SVG non sfoca quel
   che ha dietro, quindi qui il disegno si spegne e il vetro va sul form, con
   gli angoli tondi al posto dello squircle. Selettori alla pari di app.css. */
.composer.sq .sq-fondo { display: none; }
.composer.sq, .main .composer.sq, .main.vuota .composer.sq,
.main.vuota .composer.sq:hover {
  background: var(--vetro) !important;
  -webkit-backdrop-filter: var(--vetro-sfoca);
  backdrop-filter: var(--vetro-sfoca);
  border: 1px solid var(--vetro-orlo) !important;
  box-shadow: var(--vetro-luce), var(--vetro-ombra) !important;
  border-radius: 30px !important;
}
.composer.sq.multiriga { border-radius: 26px !important; }
.composer.sq:focus-within, .main.vuota .composer.sq:focus-within {
  background: rgba(255,255,255,.82) !important;
  box-shadow: var(--vetro-luce), 0 0 0 4px rgba(52,129,98,.16), 0 12px 40px rgba(24,56,43,.14) !important;
}
@media (prefers-reduced-motion: no-preference) {
  .dock.lavora .composer.sq { animation: vetroRespira 2.4s ease-in-out infinite !important; }
}
.dock.lavora .composer.sq { box-shadow: var(--vetro-luce), 0 0 0 3px rgba(52,129,98,.22), 0 10px 36px rgba(24,56,43,.12) !important; }

/* invio: il cerchio pieno di iMessage */
.btn-send {
  background: var(--accent); color: #fff; border: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 2px 8px rgba(49,131,98,.35);
}
.btn-send .material-symbols-outlined { font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24; }
.btn-send:hover:not(:disabled) { background: #2c7055; color: #fff; transform: scale(1.04); }
.btn-send:disabled { background: rgba(118,118,128,.18); color: #fff; box-shadow: none; border: none; }
.btn-send.ferma { background: #1d1d1f; border: none; box-shadow: none; }   /* 09/11/2026: come ChatGPT e Claude */
.btn-icon:hover:not(:disabled) { background: rgba(118,118,128,.12); }
.btn-send, .btn-icon { transition: background .2s ease, transform .25s var(--molla), color .2s ease; }

/* ── 5. i messaggi ───────────────────────────────────────────────────────── */
.bubble-user {
  background: linear-gradient(180deg, rgba(52,129,98,.20), rgba(52,129,98,.14));
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  backdrop-filter: blur(16px) saturate(170%);
  border: 1px solid rgba(255,255,255,.55);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 1px 3px rgba(0,0,0,.04);
  border-radius: 20px 20px 6px 20px;
  padding: 10px 14px;
  font-size: 14px;
}
.body { font-size: 14px; line-height: 1.62; }
.bolla-f {
  background: rgba(255,255,255,.55);
  border-color: rgba(255,255,255,.7);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}

/* ── 6. i pulsanti ───────────────────────────────────────────────────────── */
.btn-primo, .btn-pieno, .btn-piano {
  background: linear-gradient(180deg, #348162, var(--accent));
  color: #fff !important;
  border: none !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 4px 14px rgba(49,131,98,.28);
  font-weight: 600;
  transition: transform .25s var(--molla), box-shadow .25s ease, filter .2s ease;
}
.btn-primo:hover, .btn-pieno:hover:not(:disabled), .btn-piano:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn-primo:active, .btn-pieno:active, .btn-piano:active { transform: scale(.97); }
.btn-primo:disabled, .btn-pieno:disabled { filter: grayscale(.6) opacity(.55); transform: none; }

.btn-secondo, .btn-indietro, .opt, .btn-pro, .rd-pill, .rd-az, .rd-ferma {
  background: rgba(255,255,255,.6) !important;
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  backdrop-filter: blur(16px) saturate(170%);
  border: 1px solid rgba(255,255,255,.75) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 1px 4px rgba(0,0,0,.06);
  color: var(--ink-2);
  transition: transform .25s var(--molla), background .2s ease;
}
.btn-secondo:hover, .btn-indietro:hover, .opt:hover, .btn-pro:hover { background: rgba(255,255,255,.85) !important; }
.btn-secondo:active, .btn-indietro:active, .opt:active { transform: scale(.97); }
.btn-pro { color: var(--accent-dark); }
.opt { color: var(--accent-dark); }
.btn-secondo.danger, .btn-secondo.pericolo { color: #d70015; }

.btn-tondo {
  background: rgba(255,255,255,.55);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 1px 4px rgba(0,0,0,.06);
}
.btn-tondo:hover { background: rgba(255,255,255,.85); }

/* ── 7. menu e popover: righe arrotondate come nei menu di macOS ─────────── */
.menu { border-radius: 16px; padding: 6px; }
.menu-voce { border-radius: 10px; }
.menu-voce:hover { background: rgba(52,129,98,.14); color: var(--ink); }
.menu-voce.danger:hover { background: rgba(255,59,48,.12); }
.pop { border-radius: var(--radius); }
.menu, .pop { animation: vetroApri .32s var(--molla) both; }
@keyframes vetroApri { from { opacity: 0; transform: translateY(-6px) scale(.97); } to { opacity: 1; transform: none; } }

/* ── 8. finestre ─────────────────────────────────────────────────────────── */
.foglio, .foglio-modelli, .set, .accesso, .muro { border-radius: 28px; }
.drawer { border-radius: 28px 0 0 28px; }
.consenso { border-radius: 22px; }
.popup-domande { border-radius: 24px; }
.page-card { border-radius: 24px; }

/* ── 9. campi ───────────────────────────────────────────────────────────── */
.campo input, .conto-campo input, .fd-campo, .doc-correggi textarea, .tv-campo textarea,
.rd-chiedi-f, .rd-strumenti select, .rinomina {
  background: rgba(255,255,255,.65) !important;
  border: 1px solid rgba(60,60,67,.14) !important;
  border-radius: 14px;
  transition: box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.campo input:focus, .conto-campo input:focus, .doc-correggi textarea:focus, .tv-campo textarea:focus {
  background: rgba(255,255,255,.9) !important;
  border-color: rgba(52,129,98,.6) !important;
  box-shadow: 0 0 0 4px rgba(52,129,98,.16);
}

/* ── 10. barre di scorrimento sottili, come su macOS ─────────────────────── */
* { scrollbar-width: thin; scrollbar-color: rgba(0,0,0,.18) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,.18); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ── 11. chi non vuole trasparenze (impostazione di accessibilità) ───────── */
@media (prefers-reduced-transparency: reduce) {
  .rail, .menu, .pop, .drawer, .foglio, .foglio-modelli, .muro, .set, .accesso,
  .consenso, .popup-domande, .page-card, .composer, .main.vuota .composer {
    background: rgba(255,255,255,.97) !important;
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
}
/* browser senza sfocatura: vetro quasi pieno, sempre leggibile */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .rail, .menu, .pop, .drawer, .foglio, .foglio-modelli, .muro, .set, .accesso,
  .consenso, .popup-domande, .page-card, .composer, .main.vuota .composer {
    background: rgba(255,255,255,.95) !important;
  }
}

/* ── 12. un solo carattere per tutta la piattaforma (30/10/2026) ─────────
   San Francisco sui dispositivi Apple, Inter altrove (il piu' vicino a SF).
   Elenco generato da tutti i selettori di app.css che sceglievano Fraunces,
   Kulim Park o Inter: cosi' nessun titolo resta indietro con il carattere vecchio. */
.body h3,
.fm-testa h2,
.sentenza .sent-titolo,
.set-testa h2,
.tv-campo textarea,
body {
  font-family: var(--sf) !important;
}
.cassa h2,
.cassa h2 b,
.cerca-campo input,
.doc-barra h1,
.doc-vuota h2,
.drawer-top h3,
.foglio-limitato h2,
.muro h2,
.page h1,
.pro-card .pro-prezzo b,
.rd-saluto,
.saluto,
.serif,
.soglia-h {
  font-family: var(--sf-titolo) !important;
  font-optical-sizing: auto;
  letter-spacing: -.022em;
}
.tv-campo textarea { font-family: var(--sf) !important; }
code, kbd, pre, samp, .body code, .conto-codici {
  font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, 'JetBrains Mono', Consolas, monospace !important;
}
/* i campi e i pulsanti ereditano: niente carattere del browser */
input, textarea, select, button { font-family: inherit; }
.atto-body, .cerca-campo input { letter-spacing: normal; }

/* Gli ATTI restano come prima (richiesta del 30/10/2026): Fraunces, il carattere
   «da carta», nel corpo dell'atto e nel foglio di redazione. Anche i titoli
   interni dell'atto lo ereditano, nonostante la regola generale su h1/h2. */
.atto-body { font-family: 'Fraunces', Georgia, 'Times New Roman', serif !important; font-optical-sizing: auto; }
.atto-body h1, .atto-body h2, .atto-body h3, .atto-body h4 { font-family: inherit !important; }

/* ── 13. la campanella delle notifiche (30/10/2026) ──────────────────────── */
.campanella {
  position: relative;
  background: rgba(255,255,255,.55);
  -webkit-backdrop-filter: blur(16px) saturate(170%); backdrop-filter: blur(16px) saturate(170%);
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 1px 4px rgba(0,0,0,.06);
  color: var(--ink-2);
  width: 38px; height: 38px;
}
.campanella:hover:not(:disabled) { background: rgba(255,255,255,.85); color: var(--ink); }
.campanella[aria-expanded="true"] { background: rgba(255,255,255,.92); color: var(--ink); }
.campanella-ic { width: 20px; height: 20px; }
.campanella-n {
  position: absolute; top: -3px; right: -3px;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: #ff3b30; color: #fff; font-size: 10.5px; font-weight: 700; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px rgba(255,255,255,.9), 0 2px 6px rgba(255,59,48,.35);
  animation: ntEntra .4s var(--molla) both;
}
@keyframes ntEntra { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

.notifiche-pop {
  position: absolute; top: 58px; right: 16px; z-index: 40;
  width: min(380px, calc(100vw - 24px));
  max-height: min(70vh, 560px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--vetro-forte);
  -webkit-backdrop-filter: var(--vetro-sfoca-forte); backdrop-filter: var(--vetro-sfoca-forte);
  border: 1px solid var(--vetro-orlo);
  border-radius: 24px;
  box-shadow: var(--vetro-luce), var(--vetro-ombra-alta);
  padding: 8px;
  animation: vetroApri .32s var(--molla) both;
  transform-origin: top right;
}
.nt-testa { padding: 10px 12px 6px; }
.nt-testa h2 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); }
.nt-sez { padding: 12px 12px 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.nt-voce {
  position: relative; display: flex; gap: 12px; align-items: flex-start;
  padding: 10px 12px; border-radius: 16px; text-decoration: none; color: inherit;
  transition: background .2s ease;
}
a.nt-voce:hover { background: rgba(255,255,255,.75); }
.nt-voce.nuova { background: rgba(52,129,98,.08); }
a.nt-voce.nuova:hover { background: rgba(52,129,98,.14); }
.nt-ic {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}
.nt-ic svg { width: 19px; height: 19px; }
.nt-avviso { background: rgba(255,149,0,.16); color: #b25f00; }
.nt-info   { background: rgba(0,122,255,.12); color: #0060c7; }
.nt-novita { background: rgba(52,129,98,.18); color: var(--accent-ink); }
.nt-corpo { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.nt-riga { display: flex; align-items: baseline; gap: 8px; }
.nt-riga b { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.nt-riga time { flex-shrink: 0; font-size: 11.5px; color: var(--faint); }
.nt-testo { font-size: 12.5px; line-height: 1.45; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nt-link { font-size: 12.5px; font-weight: 600; color: var(--accent-dark); margin-top: 2px; }
.nt-punto { position: absolute; top: 15px; right: 12px; width: 8px; height: 8px; border-radius: 50%; background: #007aff; }
.nt-voce.nuova .nt-riga { padding-right: 14px; }
.nt-vuoto { text-align: center; padding: 26px 18px 30px; color: var(--muted); }
.nt-vuoto svg { width: 34px; height: 34px; color: var(--faint); }
.nt-vuoto p { margin: 8px 0 4px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.nt-vuoto span { font-size: 12.5px; line-height: 1.45; }
@media (max-width: 560px) {
  .notifiche-pop { position: fixed; top: 64px; right: 12px; left: 12px; width: auto; }
}

/* ── 14. la targhetta Pro accanto al nome, in basso a sinistra ───────────── */
.rail-io-t .rail-io-riga { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: visible; }
.rail-io-t .rail-io-riga b { min-width: 0; }
/* `.rail-io-t span` di app.css fa diventare a blocco ogni span della zona: qui serve la pillola */
.rail-io-t .pill-pro {
  display: inline-flex; width: auto; overflow: visible; line-height: 1.4; font-weight: 700; text-transform: uppercase;
  flex-shrink: 0; padding: 1px 7px; font-size: 9.5px; letter-spacing: .06em; border-radius: 999px;
  background: linear-gradient(180deg, #348162, var(--accent)); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 1px 3px rgba(49,131,98,.25);
}

.rail-io-t .pill-pro[hidden] { display: none; }

/* ── 15. chat temporanea (30/10/2026) ─────────────────────────────────────── */
.btn-temporanea {
  /* 21/11/2026: solo l'icona, tonda come la campanella (prima «Temporanea» scritto accanto) */
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; padding: 0; border-radius: 999px; cursor: pointer;
  font: inherit; color: var(--ink-2);
  background: rgba(255,255,255,.55);
  -webkit-backdrop-filter: blur(16px) saturate(170%); backdrop-filter: blur(16px) saturate(170%);
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 1px 4px rgba(0,0,0,.06);
  transition: background .2s ease, color .2s ease, transform .25s var(--molla);
}
.btn-temporanea svg { width: 21px; height: 21px; }
.btn-temporanea:hover { background: rgba(255,255,255,.85); color: var(--ink); }
.btn-temporanea:active { transform: scale(.96); }
.btn-temporanea[aria-pressed="true"] {
  background: #1d1d1f; color: #fff; border-color: rgba(0,0,0,.6);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 4px 14px rgba(0,0,0,.18);
}
/* fuori dalla schermata vuota il pulsante si vede solo se la chat È temporanea */
.main:not(.vuota) .btn-temporanea[aria-pressed="false"] { display: none; }

.avviso-temporanea {
  margin: 0 auto 10px; max-width: 600px; text-align: center;
  font-size: 12.5px; line-height: 1.45; color: var(--ink-2);
  padding: 8px 14px; border-radius: 14px;
  background: rgba(29,29,31,.06);
  border: 1px dashed rgba(29,29,31,.22);
}
.avviso-temporanea b { color: var(--ink); }
/* la chat temporanea si riconosce anche dallo sfondo: aloni spenti, grigio perla */
body.chat-temporanea {
  background:
    radial-gradient(60vw 55vh at 10% 0%, rgba(120,120,135,.16), transparent 70%),
    radial-gradient(60vw 60vh at 100% 100%, rgba(120,130,150,.16), transparent 70%),
    #eff0f2;
  background-attachment: fixed;
}
body.chat-temporanea .main.vuota::before { opacity: .25; filter: grayscale(1); }

/* ── 16. «Passa al Pro» in basso a sinistra, sopra l'account (30/10/2026) ── */
.rail-passa-pro {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  margin: 4px 4px 8px; padding: 9px 12px; border-radius: 14px; text-decoration: none;
  font-size: 13px; font-weight: 600; color: #fff;
  background: linear-gradient(180deg, #348162, var(--accent));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 4px 14px rgba(49,131,98,.25);
  transition: filter .2s ease, transform .25s var(--molla);
}
.rail-passa-pro:hover { filter: brightness(1.05); }
.rail-passa-pro:active { transform: scale(.97); }
.rail-passa-pro .material-symbols-outlined { font-size: 18px; color: #fff; }
.rail-passa-pro[hidden] { display: none; }
.rail.chiusa .rail-passa-pro { margin: 4px 10px 8px; padding: 9px 0; }
.rail.chiusa .rail-passa-pro .rail-set-t { display: none; }

/* ── 17. pulsanti verdi PIATTI (30/10/2026) ─────────────────────────────────
   Provato il «vetro verde» con riflessi e bagliore: bocciato («non è per nulla
   figo»). I pulsanti verdi sono pieni e piatti: niente sfumature, niente
   riflessi, niente alone verde intorno, niente sfocatura. Quelli a contorno:
   fondo bianco e bordo verde. Le superfici di vetro (barra, campo, finestre)
   restano: la regola vale solo per i pulsanti e le targhette verdi. */
.btn-primo, .btn-pieno, .btn-piano, .rail-passa-pro, .novita-primario, .consenso-si, .spiega-si,
.doc-correggi-az .btn-pri, .pop.pop-set .uso-cta, .uso-cta, .popup-domande .pd-invia, .rd-invia,
.body a.vai.vai-apri,
.btn-send:not(.ferma):not(:disabled), .composer.invio-se-pieno .btn-send:not(.ferma),
.composer.sq .btn-send:not(.ferma):not(:disabled) {
  background: var(--accent) !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  border: none !important;
  color: #fff !important;
  text-shadow: none !important;
  box-shadow: none !important;
  filter: none !important;
  transition: background .15s ease, transform .2s var(--molla) !important;
}
.btn-primo .material-symbols-outlined, .btn-pieno .material-symbols-outlined, .rail-passa-pro .material-symbols-outlined,
.btn-send:not(.ferma) .material-symbols-outlined, .rd-invia .material-symbols-outlined { color: #fff !important; }
.btn-primo:hover, .btn-pieno:hover:not(:disabled), .btn-piano:hover, .rail-passa-pro:hover, .novita-primario:hover,
.consenso-si:hover, .spiega-si:hover, .doc-correggi-az .btn-pri:hover, .uso-cta:hover,
.popup-domande .pd-invia:hover:not(:disabled), .rd-invia:hover, .body a.vai.vai-apri:hover,
.btn-send:not(.ferma):not(:disabled):hover, .composer.invio-se-pieno .btn-send:not(.ferma):hover {
  background: #2c7055 !important;
  transform: none !important;
  filter: none !important;
}
.btn-primo:active, .btn-pieno:active, .rail-passa-pro:active, .btn-send:not(.ferma):active,
.novita-primario:active, .rd-invia:active { transform: scale(.97) !important; }
.btn-primo:disabled, .btn-pieno:disabled, .popup-domande .pd-invia:disabled { opacity: .5; transform: none !important; }
.btn-send.ferma {
  background: #1d1d1f !important; border: none !important; box-shadow: none !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
}
.btn-send.ferma:hover { background: #000 !important; }

/* targhette e avatar: pieni, senza riflessi */
.pill-pro, .rail-io .pill-pro, .rail-io-t .pill-pro, .uso-targa, .uso.pro .uso-targa, .col-tag, .doc-chip.on {
  background: var(--accent) !important; color: #fff !important;
  border: none !important; box-shadow: none !important; text-shadow: none !important;
}
/* avatar: le INIZIALI, su un grigio chiarissimo (richiesta del 30/10/2026: niente
   verde, niente sagoma predefinita). Sul grigio chiaro il bianco non si legge:
   le lettere sono grigio scuro. Chi non ha ancora un nome (.vuoto) ha l'icona,
   dello stesso grigio. */
.iniziali, .iniziali.vuoto, .iniziali:not(.vuoto) {
  background: #ececf0 !important;
  color: #5c5c63 !important;
  text-shadow: none !important; box-shadow: none !important;
  font-weight: 600 !important;
}
.iniziali.vuoto .material-symbols-outlined { color: #8e8e93 !important; }

/* pulsanti a contorno verde: bianco, bordo verde, piatti */
.top-accedi, .opt, .atto-dl, .link-out, .btn-pro {
  background: #fff !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  border: 1px solid var(--accent-ink) !important;
  color: var(--accent-dark) !important;
  box-shadow: none !important;
  transition: background .15s ease, transform .2s var(--molla) !important;
}
.top-accedi:hover, .opt:hover, .atto-dl:hover, .link-out:hover, .btn-pro:hover {
  background: var(--accent-soft) !important; transform: none !important; box-shadow: none !important;
}
.top-accedi:active, .opt:active, .atto-dl:active, .link-out:active { transform: scale(.97) !important; }

/* il pannello laterale chiuso sta fuori schermo: la sua ombra non deve sporgere sul bordo destro */
.drawer:not(.on) { box-shadow: none !important; }

/* ── 18. lineetta tra «LexNova Chat» e il pulsante della barra (30/10/2026) ── */
.rail:not(.chiusa) .rail-burger { position: relative; overflow: visible; }
.rail:not(.chiusa) .rail-burger::before {
  content: ''; position: absolute; left: -6px; top: 50%;
  width: 1px; height: 18px; transform: translateY(-50%);
  background: rgba(60,60,67,.22);
  pointer-events: none;
}

/* ── 19. barra chiusa: il pulsante per riaprirla sta FUORI, accanto al logo ──
   (30/10/2026) Prima compariva solo passando sul logo e lo copriva; ora il
   logo resta sempre e il pulsante gli sta a fianco, fuori dalla striscia. */
@media (min-width: 901px) {
  /* sopra l'intestazione della pagina (.top, z-index 20), che altrimenti prende il clic */
  .rail.chiusa { overflow: visible !important; position: relative; z-index: 25; }
  .rail.chiusa .rail-top { position: relative; }
  .rail.chiusa .rail-burger {
    position: absolute !important; inset: auto !important;
    left: calc(100% + 16px) !important; top: 50% !important; transform: translateY(-50%);
    width: 34px !important; height: 34px !important; margin: 0 !important;
    opacity: 1 !important; z-index: 30;
    background: rgba(255,255,255,.62);
    -webkit-backdrop-filter: blur(16px) saturate(170%); backdrop-filter: blur(16px) saturate(170%);
    border: 1px solid rgba(255,255,255,.75);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 1px 4px rgba(0,0,0,.08);
    color: var(--ink-2);
  }
  .rail.chiusa .rail-burger:hover { background: rgba(255,255,255,.9); color: var(--ink); }
  .rail.chiusa .rail-burger::before { display: none; }
  .rail.chiusa .rail-top:hover .rail-logo,
  .rail.chiusa .rail-top:focus-within .rail-logo { opacity: 1 !important; transform: none !important; }
}
/* il pulsante fuori dalla barra chiusa: in un QUADRATO dagli angoli morbidi, non in un cerchio */
@media (min-width: 901px) { .rail.chiusa .rail-burger { border-radius: 9px !important; } }
/* un po' piu' grosso (30/10/2026): 34 -> 42 px, icona 20 -> 23 px */
@media (min-width: 901px) {
  .rail.chiusa .rail-burger { width: 42px !important; height: 42px !important; border-radius: 11px !important; }
  .rail.chiusa .rail-burger .material-symbols-outlined { font-size: 23px !important; }
}

/* ── 20. barra laterale allargabile (30/10/2026, static/rail-larga.js) ───── */
@media (min-width: 901px) {
  .rail:not(.chiusa) { width: var(--rail-w-utente, var(--rail-w)) !important; position: relative; }
  .rail.trascina { transition: none !important; }
  .rail-maniglia {
    position: absolute; top: 0; right: 0; bottom: 0; width: 7px; z-index: 6;
    cursor: col-resize; touch-action: none;
  }
  .rail-maniglia::after {
    content: ''; position: absolute; top: 14px; bottom: 14px; right: 2px; width: 2px; border-radius: 2px;
    background: transparent; transition: background .15s ease;
  }
  .rail-maniglia:hover::after, .rail.trascina .rail-maniglia::after, .rail-maniglia:focus-visible::after {
    background: rgba(52,129,98,.55);
  }
  .rail-maniglia:focus-visible { outline: none; }
  .rail.chiusa .rail-maniglia { display: none; }
  body.rail-trascina, body.rail-trascina * { cursor: col-resize !important; user-select: none !important; }
}
@media (max-width: 900px) { .rail-maniglia { display: none; } }

/* ── 21. «Passa al Pro» col disegno della pillola con la freccia (30/10/2026) ──
   Dal riferimento dell'utente: pillola a sfumatura orizzontale (qui nei verdi
   del marchio, dal cupo al chiaro), testo in grassetto NERO, a destra un tondo
   chiaro con la freccia che, col mouse sopra, gira di 45° verso l'alto.
   La lineetta che separava sta ora SOTTO il pulsante, non sopra. */
.rail-foot:has(.rail-passa-pro:not([hidden])) { border-top-color: transparent !important; }
.rail-foot .rail-passa-pro {
  position: relative;
  display: flex !important; align-items: center; justify-content: center;
  min-height: 44px; margin: 6px 6px 17px !important; padding: 6px 48px 6px 18px !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, #39906d 0%, #56ae8b 45%, #96d1b9 100%) !important;
  border: 1px solid rgba(255,255,255,.55) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35) !important;
  color: #0c1914 !important; text-shadow: none !important;
  font-size: 13.5px !important; font-weight: 700 !important; letter-spacing: -.01em;
  filter: none !important; transform: none !important;
  transition: background .2s ease !important;
}
.rail-foot .rail-passa-pro > .material-symbols-outlined { display: none !important; }
.rail-foot .rail-passa-pro .rail-set-t { display: inline !important; color: #0c1914 !important; }
.rail-foot .rail-passa-pro .rpp-freccia {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.42); color: #0c1914;
}
.rail-foot .rail-passa-pro .rpp-freccia svg {
  width: 17px; height: 17px;
  transition: transform .35s cubic-bezier(.32,.72,0,1);
}
.rail-foot .rail-passa-pro:hover { background: linear-gradient(90deg, #2c7055 0%, #439172 45%, #91c3af 100%) !important; }
.rail-foot .rail-passa-pro:hover .rpp-freccia svg,
.rail-foot .rail-passa-pro:focus-visible .rpp-freccia svg { transform: rotate(-45deg); }
.rail-foot .rail-passa-pro:active { transform: scale(.98) !important; }
/* la lineetta, sotto il pulsante */
.rail-foot .rail-passa-pro::after {
  content: ''; position: absolute; left: -2px; right: -2px; bottom: -10px; height: 1px;
  background: var(--line-soft); pointer-events: none;
}
/* barra chiusa: resta il solo fulmine, in un tondo */
.rail.chiusa .rail-foot .rail-passa-pro { padding: 0 !important; min-height: 40px; width: 40px; margin: 6px auto 17px !important; }
.rail.chiusa .rail-foot .rail-passa-pro > .material-symbols-outlined { display: inline !important; color: #0c1914 !important; }
.rail.chiusa .rail-foot .rail-passa-pro .rail-set-t,
.rail.chiusa .rail-foot .rail-passa-pro .rpp-freccia { display: none !important; }
.rail.chiusa .rail-foot .rail-passa-pro::after { left: 4px; right: 4px; }
/* prova (30/10/2026): il tondo della freccia in ORO */
.rail-foot .rail-passa-pro .rpp-freccia {
  background: linear-gradient(145deg, #f7e08a 0%, #e2b443 50%, #c08a1e 100%) !important;
  color: #3a2a05 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 1px 3px rgba(120,80,0,.3);
}
/* prova (30/10/2026): il tondo della freccia ROSSO con la freccia bianca (al posto dell'oro) */
.rail-foot .rail-passa-pro .rpp-freccia {
  background: linear-gradient(145deg, #ff6259 0%, #e5352b 55%, #c0241b 100%) !important;
  color: #ffffff !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 1px 3px rgba(140,20,10,.3);
}
/* scelta finale (30/10/2026): «tutto verde come prima, ma con la freccetta».
   Verde pieno piatto e scritta bianca come il pulsante di prima; resta il tondo
   con la freccia (che gira col mouse), in bianco velato sul verde. */
.rail-foot .rail-passa-pro {
  background: var(--accent) !important;
  border: none !important; box-shadow: none !important;
  color: #fff !important;
}
.rail-foot .rail-passa-pro:hover { background: #2c7055 !important; }
.rail-foot .rail-passa-pro .rail-set-t { color: #fff !important; }
.rail-foot .rail-passa-pro .rpp-freccia {
  background: rgba(255,255,255,.24) !important;
  color: #fff !important;
  box-shadow: none !important;
}
.rail.chiusa .rail-foot .rail-passa-pro > .material-symbols-outlined { color: #fff !important; }
/* una leggera ombreggiatura (30/10/2026): ombra neutra e corta, non un alone verde */
.rail-foot .rail-passa-pro { box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 4px 10px rgba(0,0,0,.08) !important; }
.rail-foot .rail-passa-pro:hover { box-shadow: 0 1px 2px rgba(0,0,0,.14), 0 5px 14px rgba(0,0,0,.11) !important; }

/* ── 22. icone un po' più in grassetto (30/10/2026) ──────────────────────────
   Il font delle icone va da 200 a 400 di spessore (scripts/aggiorna_icone.sh):
   app.css lo teneva a 250 (e 300 nella barra). Ora 330, e 370 dove era 300.
   Le icone disegnate in SVG prendono un tratto più spesso nella stessa misura. */
:root { --icone-tratto: 'FILL' 0, 'wght' 330, 'GRAD' 0, 'opsz' 24; }
.rail-voce .material-symbols-outlined, .rail-set .material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 370, 'GRAD' 0, 'opsz' 24 !important;
}
.campanella-ic, .btn-temporanea svg, .nt-ic svg, .nt-vuoto svg { stroke-width: 1.95; }
.btn-mic svg, .btn-mic svg * { stroke-width: 2.05; }

/* ── 23. campo dei prompt BIANCO e più squadrato; azioni a schede (31/10/2026) ──
   Richiesta: «la barra dei prompt tutta bianca e più squadrata (ma in stile
   Apple); quando ci clicco non voglio i bordi che si illuminano di verde».
   Bianco pieno, angoli da 18 px, filo grigio sottile e ombra morbida neutra;
   col fuoco cambia solo un poco il filo. Le azioni sotto: un selettore a
   schede come quelli di iOS, con la stessa squadratura del campo. */
.composer, .main.vuota .composer, .composer.sq, .main .composer.sq, .main.vuota .composer.sq,
.main.vuota .composer.sq:hover, .main.vuota .composer:hover, .composer.sq.multiriga {
  background: #ffffff !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  border: 1px solid rgba(0,0,0,.09) !important;
  border-radius: 18px !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 22px rgba(0,0,0,.06) !important;
}
.composer:focus-within, .main.vuota .composer:focus-within,
.composer.sq:focus-within, .main.vuota .composer.sq:focus-within {
  background: #ffffff !important;
  border-color: rgba(0,0,0,.16) !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 26px rgba(0,0,0,.08) !important;
}

/* le azioni: selettore a schede */
.dock .spunti.spunti-lista { min-height: 0 !important; margin-top: 14px !important; }
.spunti-lista .sl-gruppo[data-gruppo="radice"] {
  position: relative; display: flex !important; flex-direction: row !important; gap: 0 !important;
  padding: 3px; border-radius: 15px;
  background: rgba(118,118,128,.12);
}
.spunti-lista .sl-gruppo[data-gruppo="radice"]::before {
  content: ''; position: absolute; top: 3px; bottom: 3px; left: 3px;
  width: calc((100% - 6px) / 3); border-radius: 12px;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 0 0 .5px rgba(0,0,0,.04);
  transform: translateX(calc(var(--sl-i, 0) * 100%));
  opacity: 0; transition: transform .35s cubic-bezier(.32,.72,0,1), opacity .2s ease;
}
.spunti-lista.sl-aperto .sl-gruppo[data-gruppo="radice"]::before { opacity: 1; }
.dock .spunti.spunti-lista .sl-gruppo[data-gruppo="radice"] > .sl-voce {
  position: relative; z-index: 1; flex: 1 1 0; min-width: 0;
  justify-content: center; gap: 7px !important;
  padding: 9px 10px !important; min-height: 0 !important;
  border-radius: 12px !important; background: transparent !important;
  font-size: 13.5px !important; font-weight: 500; color: var(--ink-2) !important;
  white-space: nowrap; text-decoration: none;
}
.dock .spunti.spunti-lista .sl-gruppo[data-gruppo="radice"] > .sl-voce:hover { background: rgba(255,255,255,.5) !important; }
.dock .spunti.spunti-lista .sl-gruppo[data-gruppo="radice"] > .sl-voce.on { color: var(--ink) !important; background: transparent !important; }
.dock .spunti.spunti-lista .sl-gruppo[data-gruppo="radice"] > .sl-voce .material-symbols-outlined { width: auto !important; font-size: 18px; }
/* l'elenco della scheda aperta: un riquadro bianco con la stessa squadratura */
.spunti-lista .sl-gruppo:not([data-gruppo="radice"]) {
  margin-top: 8px; padding: 6px;
  background: #fff; border: 1px solid rgba(0,0,0,.08); border-radius: 18px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 22px rgba(0,0,0,.05);
  animation: slEntra .3s cubic-bezier(.32,.72,0,1) both;
}
@keyframes slEntra { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.spunti-lista .sl-gruppo:not([data-gruppo="radice"]) .sl-testa { display: none !important; }
.dock .spunti.spunti-lista .sl-gruppo:not([data-gruppo="radice"]) .sl-voce {
  background: transparent !important; border: none !important; box-shadow: none !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  border-radius: 12px !important; padding-left: 14px !important; min-height: 40px !important;
}
.dock .spunti.spunti-lista .sl-gruppo:not([data-gruppo="radice"]) .sl-voce:hover { background: rgba(0,0,0,.045) !important; }
@media (max-width: 560px) {
  .dock .spunti.spunti-lista .sl-gruppo[data-gruppo="radice"] > .sl-voce { font-size: 12px !important; padding: 9px 4px !important; gap: 4px !important; }
  .dock .spunti.spunti-lista .sl-gruppo[data-gruppo="radice"] > .sl-voce .material-symbols-outlined { display: none; }
}

/* ── 24. notifiche: rotella | titolo, «Tutte | Non lette», lette e non lette (31/10/2026) ── */
.nt-testa { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 6px !important; }
.nt-testa h2 { flex: 1; min-width: 0; margin: 0; }
.nt-tasto {
  width: 32px; height: 32px; flex-shrink: 0; display: grid; place-items: center;
  border: none; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer;
}
.nt-tasto:hover { background: rgba(0,0,0,.06); color: var(--ink); }
.nt-tasto svg { width: 19px; height: 19px; }
.nt-sep { width: 1px; height: 18px; background: rgba(60,60,67,.22); flex-shrink: 0; }
.nt-tutte-lette {
  border: none; background: transparent; cursor: pointer; padding: 6px 8px; border-radius: 8px;
  font: inherit; font-size: 12.5px; font-weight: 600; color: #007aff; white-space: nowrap;
}
.nt-tutte-lette:hover { background: rgba(0,122,255,.08); }
/* «Tutte | Non lette»: il selettore a schede di iOS */
.nt-seg {
  display: flex; gap: 0; margin: 2px 8px 6px; padding: 2px; border-radius: 10px;
  background: rgba(118,118,128,.12);
}
.nt-seg button {
  flex: 1; border: none; background: transparent; cursor: pointer;
  padding: 6px 8px; border-radius: 8px; font: inherit; font-size: 12.5px; font-weight: 500; color: var(--ink-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: background .2s ease, box-shadow .2s ease;
}
.nt-seg button[aria-selected="true"] { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 0 0 .5px rgba(0,0,0,.04); }
.nt-seg-n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #007aff; color: #fff; font-size: 10.5px; font-weight: 700; line-height: 18px; }
/* le voci: un pallino blu a sinistra per quelle da leggere, come in Mail */
button.nt-voce { width: 100%; border: none; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.nt-voce { padding-left: 4px !important; }
.nt-voce.nuova { background: transparent !important; }
.nt-punto-col { flex-shrink: 0; width: 12px; display: flex; justify-content: center; padding-top: 13px; }
.nt-punto { position: static !important; width: 9px !important; height: 9px !important; border-radius: 50%; background: #007aff !important; }
.nt-voce.nuova .nt-riga { padding-right: 0 !important; }
.nt-voce.nuova .nt-riga b { font-weight: 700; }
.nt-voce.letta .nt-riga b { font-weight: 500; color: var(--ink-2); }
.nt-voce.letta .nt-ic { opacity: .7; }
/* preferenze: gli interruttori dell'iPhone */
.nt-prefs { margin: 4px 8px; border-radius: 12px; background: rgba(118,118,128,.08); overflow: hidden; }
.nt-pref { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; }
.nt-pref + .nt-pref { border-top: 1px solid rgba(60,60,67,.12); }
.nt-pref-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nt-pref-t b { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.nt-pref-t span { font-size: 12px; color: var(--muted); line-height: 1.35; }
.nt-switch {
  -webkit-appearance: none; appearance: none; flex-shrink: 0; margin: 0; cursor: pointer;
  width: 44px; height: 26px; border-radius: 999px; position: relative;
  background: rgba(120,120,128,.24); transition: background .25s ease;
}
.nt-switch::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2), 0 0 0 .5px rgba(0,0,0,.04);
  transition: transform .3s cubic-bezier(.32,.72,0,1);
}
.nt-switch:checked { background: #41ba8a; }
.nt-switch:checked::after { transform: translateX(18px); }
.nt-switch:focus-visible { outline: 2px solid #007aff; outline-offset: 2px; }
.nt-pref-nota { margin: 8px 14px 6px; font-size: 11.5px; color: var(--faint); }

/* ── 25. il pulsante della barra SEMPRE fuori, con la squadratura del campo dei
   prompt; alla sua destra una lineetta e il nome della sezione (31/10/2026) ── */
@media (min-width: 901px) {
  .rail { position: relative; z-index: 25; overflow: visible !important; }
  .rail .rail-top { position: relative; }
  .rail .rail-burger, .rail.chiusa .rail-burger {
    position: absolute !important; inset: auto !important;
    left: calc(100% + 16px) !important; top: 50% !important; transform: translateY(-50%) !important;
    width: 42px !important; height: 42px !important; margin: 0 !important; opacity: 1 !important; z-index: 30;
    display: grid !important; place-items: center;
    background: #ffffff !important;
    -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
    border: 1px solid rgba(0,0,0,.09) !important;
    border-radius: 13px !important;
    box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 22px rgba(0,0,0,.06) !important;
    color: var(--ink-2) !important;
  }
  .rail .rail-burger:hover { background: #f7f7f8 !important; color: var(--ink) !important; }
  .rail .rail-burger .material-symbols-outlined { font-size: 22px !important; }
  .rail .rail-burger::before, .rail:not(.chiusa) .rail-burger::before { display: none !important; }
  /* il logo resta sempre al suo posto, anche col mouse sopra */
  .rail .rail-top:hover .rail-logo, .rail .rail-top:focus-within .rail-logo { opacity: 1 !important; transform: none !important; }
  .rail-sezione {
    position: absolute; left: calc(100% + 16px + 42px + 14px); top: 50%; transform: translateY(-50%);
    display: flex; align-items: center; gap: 14px; white-space: nowrap; pointer-events: none;
    font-size: 15px; font-weight: 600; letter-spacing: -.01em; color: var(--ink);
  }
  .rail-sezione::before { content: ''; width: 1px; height: 20px; background: rgba(60,60,67,.22); }
  .rail-sezione:empty { display: none; }
  /* chiusa: la striscia non ha piu' la scritta; brand e logo come prima */
  .rail.chiusa .rail-sezione { display: flex !important; }
}
@media (max-width: 900px) { .rail-sezione { display: none; } }

/* ── 26. Redazione e Triplo Vaglio: il loro campo come il campo dei prompt ── */
.foglio-nuovo.rd-campo, .rd-campo, .tv-campo textarea {
  background: #ffffff !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  border: 1px solid rgba(0,0,0,.09) !important;
  border-radius: 18px !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 22px rgba(0,0,0,.06) !important;
  outline: none !important;
}
.foglio-nuovo.rd-campo:focus-within, .rd-campo:focus-within, .tv-campo textarea:focus {
  border-color: rgba(0,0,0,.16) !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 26px rgba(0,0,0,.08) !important;
}
.tv-campo textarea { padding: 16px 18px !important; resize: vertical; }

/* CORREZIONE (31/10/2026): il display:flex !important del disegno a pillola
   batteva l'attributo `hidden`, e chi e' gia' Pro vedeva «Passa al Pro». */
.rail-foot .rail-passa-pro[hidden], .rail.chiusa .rail-foot .rail-passa-pro[hidden] { display: none !important; }
.rail-foot:has(.rail-passa-pro[hidden]) { border-top-color: var(--line-soft) !important; }

/* ── 27. niente riquadro intorno ai tre pulsanti in alto (31/10/2026):
   apri/chiudi la barra, chat temporanea, notifiche. Solo l'icona (e la scritta
   «Temporanea»); col mouse sopra un velo grigio leggero, come in macOS. ── */
@media (min-width: 901px) {
  .rail .rail-burger, .rail.chiusa .rail-burger {
    background: transparent !important; border: none !important; box-shadow: none !important;
    -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
    border-radius: 9px !important; width: 36px !important; height: 36px !important;
  }
  .rail .rail-burger:hover { background: rgba(0,0,0,.06) !important; }
  .rail-sezione { left: calc(100% + 16px + 36px + 10px) !important; }
}
.campanella, .btn-temporanea {
  background: transparent !important; border: none !important; box-shadow: none !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  border-radius: 9px !important;
}
.campanella:hover, .btn-temporanea:hover, .campanella[aria-expanded="true"] { background: rgba(0,0,0,.06) !important; }
.btn-temporanea[aria-pressed="true"] { background: #1d1d1f !important; color: #fff !important; }

/* ── 28. (31/10/2026) notifiche senza icona per voce; barra chiusa: la saetta
   di «Passa al Pro» gialla (il giallo di Apple, piena) ── */
.nt-voce .nt-ic { display: none !important; }
.nt-voce { gap: 8px !important; }
.rail.chiusa .rail-foot .rail-passa-pro > .material-symbols-outlined {
  color: #ffd60a !important;
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24 !important;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.25));
}

/* ── 29. Redazione: la barra come quella della Home (31/10/2026) ──
   I tre strumenti (Allega, Tipo, I tuoi scheletri) liberi come «Rapida» nella
   Home: niente fondo, bordo o ombra, testo e icona grigi, velo grigio al
   passaggio. «Redigi il documento»: verde pieno, senza ombra, angoli squadrati. */
.rd-campo .rd-pill {
  background: transparent !important; border: none !important; box-shadow: none !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  border-radius: 9px !important; color: var(--muted) !important; font-weight: 500 !important;
  padding: 7px 10px !important;
}
.rd-campo .rd-pill:hover { background: rgba(0,0,0,.05) !important; color: var(--ink) !important; transform: none !important; }
.rd-campo .rd-pill .material-symbols-outlined { color: inherit !important; }
.rd-campo .rd-invia {
  background: var(--accent) !important; color: #fff !important;
  border: none !important; box-shadow: none !important; border-radius: 12px !important;
  padding: 9px 16px !important; font-weight: 600 !important;
}
.rd-campo .rd-invia:hover { background: #2c7055 !important; }
.foglio-nuovo.rd-campo, .rd-campo { padding: 12px 12px 10px 14px !important; }

/* ── 30. Redazione: lo storico sotto una linea, a caselle (4 per riga) (31/10/2026) ── */
.rd-archivio { margin-top: 34px !important; padding-top: 26px !important; border-top: 1px solid rgba(60,60,67,.14) !important; }
.rd-archivio-testa { display: block !important; margin-bottom: 16px !important; }
.rd-archivio-testa h2 {
  margin: 0 !important; font-size: 17px !important; font-weight: 700 !important; letter-spacing: -.015em !important;
  text-transform: none !important; color: var(--ink) !important;
}
.rd-archivio-sotto { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.rd-archivio #elenco { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.rd-archivio #elenco .doc-riga {
  position: relative; display: flex !important; flex-direction: column !important; align-items: flex-start !important;
  gap: 10px !important; min-height: 148px; padding: 14px 14px 12px !important; margin: 0 !important;
  background: #ffffff !important; border: 1px solid rgba(0,0,0,.08) !important; border-radius: 16px !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.03) !important; text-decoration: none; color: inherit;
  transition: box-shadow .2s ease, transform .25s cubic-bezier(.32,.72,0,1), border-color .2s ease;
}
.rd-archivio #elenco .doc-riga:hover { border-color: rgba(0,0,0,.14) !important; box-shadow: 0 6px 20px rgba(0,0,0,.08) !important; transform: translateY(-2px); }
.rd-archivio #elenco .dr-tipo { max-width: calc(100% - 52px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-archivio #elenco .dr-t { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; width: 100%; }
.rd-archivio #elenco .dr-t > b {
  font-size: 13.5px; font-weight: 600; line-height: 1.35; color: var(--ink); white-space: normal !important;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.rd-archivio #elenco .dr-t > span { margin-top: auto; font-size: 11.5px; color: var(--faint); white-space: normal !important; }
.rd-archivio #elenco .dr-rin, .rd-archivio #elenco .dr-x { position: absolute; top: 8px; }
.rd-archivio #elenco .dr-x { right: 8px; }
.rd-archivio #elenco .dr-rin { right: 38px; }
@media (max-width: 1250px) { .rd-archivio #elenco { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px)  { .rd-archivio #elenco { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px)  { .rd-archivio #elenco { grid-template-columns: 1fr; } .rd-archivio #elenco .doc-riga { min-height: 0; } }
.rd-archivio #elenco .dr-tipo { max-width: 100% !important; }
.rd-archivio #elenco .dr-rin, .rd-archivio #elenco .dr-x { background: #fff !important; border-radius: 8px !important; box-shadow: 0 0 0 4px #fff; }

/* ── 31. i tre puntini sulle caselle dei documenti (31/10/2026, static/documenti-menu.js) ── */
.rd-archivio #elenco .dr-rin, .rd-archivio #elenco .dr-x { display: none !important; }
.rd-archivio #elenco .dr-tipo { max-width: calc(100% - 34px) !important; }
.rd-archivio #elenco .dr-piu {
  position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; padding: 0;
  display: grid; place-items: center; border: none; border-radius: 8px; cursor: pointer;
  background: transparent; color: var(--muted);
}
.rd-archivio #elenco .dr-piu svg { width: 18px; height: 18px; }
.rd-archivio #elenco .dr-piu:hover, .rd-archivio #elenco .dr-piu[aria-expanded="true"] { background: rgba(0,0,0,.06); color: var(--ink); }
.doc-menu { position: fixed; min-width: 200px; z-index: 200; }
.doc-menu .menu-voce { font-size: 13px; }
.doc-menu .menu-voce:disabled { opacity: .7; cursor: default; }
.doc-menu-sep { height: 1px; margin: 4px 8px; background: rgba(60,60,67,.14); }
.doc-menu { background: rgba(255,255,255,.98) !important; }

/* ── 32. il documento aperto in Redazione, più pulito, in stile Apple (31/10/2026) ──
   Come Pages e Mail: intestazione con «‹ Documenti» come link e il titolo,
   colonna della conversazione ordinata, note in un riquadro grigio pieno senza
   tratteggio, foglio bianco pieno con unombra morbida sul tavolo grigio, barra
   degli strumenti con pulsanti liberi. */
.rd-lavoro { padding-top: 36px !important; }
.rd-conv { background: #fbfbfc !important; }
.rd-conv-testa { padding: 6px 18px 8px !important; align-items: center !important; gap: 10px !important; }
.rd-conv-testa .btn-indietro {
  background: transparent !important; border: none !important; box-shadow: none !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  padding: 4px 6px 4px 2px !important; border-radius: 8px !important;
  color: var(--accent-dark) !important; font-weight: 600 !important; font-size: 13.5px !important;
}
.rd-conv-testa .btn-indietro:hover { background: rgba(0,0,0,.05) !important; }
/* le schede del documento nella conversazione */
.rd-carta {
  background: #ffffff !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  border: 1px solid rgba(0,0,0,.08) !important; border-radius: 12px !important; box-shadow: none !important;
}
.rd-carta:hover { border-color: rgba(0,0,0,.16) !important; }
.rd-carta.on { border-color: rgba(52,129,98,.55) !important; box-shadow: 0 0 0 1px rgba(52,129,98,.25) !important; }
/* «Note per te»: grigio pieno di sistema, niente tratteggio */
.doc-promemoria {
  background: #f2f2f7 !important; border: none !important; border-radius: 14px !important;
  box-shadow: none !important; padding: 16px 18px !important;
}
.rd-bolla { background: #ececf0 !important; }
/* il campo in basso come quello della Home; «Allega» libero */
.rd-chiedi { background: transparent !important; }
.rd-chiedi-campo {
  background: #ffffff !important; border: 1px solid rgba(0,0,0,.09) !important; border-radius: 18px !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 22px rgba(0,0,0,.06) !important;
}
.rd-chiedi-campo:focus-within { border-color: rgba(0,0,0,.16) !important; box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 26px rgba(0,0,0,.08) !important; }
.rd-chiedi .rd-pill, .rd-chiedi .rd-pill-piccola {
  background: transparent !important; border: none !important; box-shadow: none !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  color: var(--muted) !important; border-radius: 9px !important;
}
.rd-chiedi .rd-pill:hover { background: rgba(0,0,0,.05) !important; color: var(--ink) !important; }
/* il pannello del documento */
.rd-doc { background: #ffffff !important; border-left: 1px solid rgba(60,60,67,.14) !important; }
.rd-doc-testa { border-bottom: none !important; }
.rd-strumenti { border-bottom: 1px solid rgba(60,60,67,.10) !important; }
.rd-strumenti .rd-versione {
  background-color: #f2f2f7 !important; border: none !important; border-radius: 8px !important;
  box-shadow: none !important; font-weight: 500 !important;
}
.rd-strumenti .rd-az, .rd-doc-testa .rd-az {
  background: transparent !important; border: none !important; box-shadow: none !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  border-radius: 8px !important; color: var(--ink-2) !important; font-weight: 500 !important;
}
.rd-strumenti .rd-az:hover, .rd-doc-testa .rd-az:hover { background: rgba(0,0,0,.05) !important; transform: none !important; }
/* il tavolo e il foglio */
.rd-tavolo { background: #f2f2f5 !important; }
.rd-foglio {
  background: #ffffff !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  border: none !important; border-radius: 4px !important;
  box-shadow: 0 0 0 .5px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.05), 0 12px 36px rgba(0,0,0,.08) !important;
}
.rd-foglio .atto, .rd-foglio .doc-atto {
  background: transparent !important; border: none !important; box-shadow: none !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
}

/* ── 33. (31/10/2026) linea sotto «‹ Documenti» e letichetta «Chat sul documento» ── */
.rd-conv-testa { display: flex !important; border-bottom: 1px solid rgba(60,60,67,.12) !important; padding-bottom: 10px !important; margin-bottom: 4px !important; }
.rd-conv-testa .doc-tit { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-conv-etichetta {
  flex-shrink: 0; margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px 5px 9px; border-radius: 999px; background: #f2f2f7;
  font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap;
}
.rd-conv-etichetta svg { width: 15px; height: 15px; color: var(--accent-dark); }
.rd-conv-etichetta { background: #e7f3ee !important; color: var(--accent-dark) !important; }

/* ── 34. le richieste nella chat del documento: due righe, poi «Mostra altro ⌄» (31/10/2026) ── */
.rd-bolla.rd-bolla-corta {
  display: -webkit-box !important; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden !important;
}
.rd-msg .rd-tutto {
  display: inline-flex !important; align-items: center; gap: 4px; align-self: flex-end;
  margin-top: 4px; padding: 3px 6px; border: none; border-radius: 7px; background: transparent; cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--accent-dark) !important;
}
.rd-msg .rd-tutto[hidden] { display: none !important; }
.rd-msg .rd-tutto:hover { background: rgba(0,0,0,.05); }
.rd-msg .rd-tutto svg { width: 14px; height: 14px; transition: transform .25s cubic-bezier(.32,.72,0,1); }
.rd-msg .rd-tutto.aperta svg { transform: rotate(180deg); }
/* la terza riga non deve spuntare nello spazio in fondo alla bolla: quello spazio diventa un bordo trasparente, fuori dal ritaglio */
.rd-bolla.rd-bolla-corta { padding-bottom: 0 !important; border-bottom: 11px solid transparent !important; background-clip: border-box !important; }
/* (31/10/2026) tutta la riga «‹ Documenti … Chat sul documento» su verde chiaro, senza il nome del documento */
.rd-conv-testa { background: #eaf4f0 !important; border-bottom: 1px solid rgba(52,129,98,.22) !important; padding-top: 10px !important; margin-bottom: 0 !important; }
.rd-conv-testa .doc-tit { display: none !important; }
.rd-conv-etichetta { background: transparent !important; padding-right: 2px !important; }
.rd-conv-testa .btn-indietro:hover { background: rgba(6,60,38,.06) !important; }

/* ── 35. «Note per te»: chiaramente scritte dallAI (31/10/2026) ──
   Erano un riquadro grigio come le richieste dellavvocato e sembravano sue.
   Ora: scheda bianca col bordo verde tenue e, in cima, il logo e «LexNova · Note
   dellAI», come un messaggio della Chat. */
.doc-promemoria {
  background: #ffffff !important; border: 1px solid rgba(52,129,98,.28) !important;
  border-radius: 14px !important; box-shadow: 0 1px 2px rgba(0,0,0,.03) !important;
  padding: 14px 18px 16px !important;
}
.doc-promemoria::before {
  content: "LexNova · Note dell’AI";
  display: block; margin: 0 0 10px; padding: 0 0 10px 26px; min-height: 20px; line-height: 20px;
  border-bottom: 1px solid rgba(60,60,67,.10);
  background: url("/static/logo.png") left 0 / 19px 19px no-repeat;
  font-size: 12.5px; font-weight: 700; color: var(--accent-dark); letter-spacing: -.005em;
}
.doc-promemoria .pm-tit { font-weight: 700 !important; color: var(--ink) !important; }

/* ── 36. note dellAI come le schede delle versioni, chiuse; si aprono in chat (31/10/2026) ── */
.rd-note .rd-carta-note { width: 100%; text-align: left; cursor: pointer; }
.rd-note .rd-carta-logo { width: 22px; height: 22px; flex-shrink: 0; }
.rd-note .rd-carta-note .rd-carta-t small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-note .rd-carta-note .rd-carta-apri { transition: transform .3s cubic-bezier(.32,.72,0,1); }
.rd-note.aperta .rd-carta-note .rd-carta-apri { transform: rotate(90deg); }
.rd-note .doc-promemoria { display: none !important; }
.rd-note.aperta .doc-promemoria { display: block !important; margin-top: 8px !important; animation: slEntra .3s cubic-bezier(.32,.72,0,1) both; }
/* dentro la chat del documento lintestazione col logo ce gia nella scheda */
.rd-note .doc-promemoria::before { display: none !important; }
.rd-note .doc-promemoria .pm-tit { display: none !important; }

/* ── 37. (31/10/2026) anteprima chiusa: il nome del documento al centro della riga verde;
   «Allegati ⌄» apre la tendina dei file del documento, a schede, due per riga ── */
.rd-conv { position: relative; }
.rd-conv-testa { position: relative; }
.rd-split:not(.rd-mostra-doc) .rd-conv-testa .doc-tit {
  display: block !important; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  max-width: 42%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 14px; font-weight: 600; color: var(--ink); pointer-events: none;
}
.ad-btn {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  padding: 5px 9px; border: none; border-radius: 9px; background: transparent; cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--accent-dark);
}
.ad-btn[hidden] { display: none !important; }
.ad-btn:hover, .ad-btn.aperto { background: rgba(6,60,38,.07); }
.ad-btn svg { width: 15px; height: 15px; }
.ad-btn .ad-freccia { width: 13px; height: 13px; transition: transform .3s cubic-bezier(.32,.72,0,1); }
.ad-btn.aperto .ad-freccia { transform: rotate(180deg); }
.ad-n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: rgba(6,60,38,.12); font-size: 11px; line-height: 18px; text-align: center; }
.ad-btn + .rd-conv-etichetta { margin-left: 4px !important; }
.ad-pannello {
  position: absolute; left: 12px; right: 12px; top: 58px; z-index: 30;
  max-height: min(60vh, 460px); overflow-y: auto; padding: 12px;
  background: #ffffff; border: 1px solid rgba(0,0,0,.08); border-radius: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,.05), 0 18px 48px rgba(0,0,0,.14);
  animation: slEntra .3s cubic-bezier(.32,.72,0,1) both;
}
.ad-pannello[hidden] { display: none !important; }
.ad-griglia { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ad-card {
  display: flex; flex-direction: column; gap: 8px; min-height: 112px; padding: 12px;
  border: 1px solid rgba(0,0,0,.08); border-radius: 12px; background: #fff;
}
.ad-card.scaduto { background: #fafafa; }
.ad-card.scaduto .ad-nome { color: var(--muted); }
.ad-ic { align-self: flex-start; padding: 2px 8px; border-radius: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; }
.ad-pdf { background: #fdeceb; color: #b3261e; }
.ad-word { background: #eaeffb; color: #2b579a; }
.ad-img { background: var(--accent-soft); color: var(--accent-ink); }
.ad-doc { background: rgba(0,0,0,.05); color: var(--muted); }
.ad-nome { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.ad-piede { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ad-peso { font-size: 11.5px; color: var(--faint); }
.ad-apri { font-size: 12.5px; font-weight: 600; color: var(--accent-dark); text-decoration: none; padding: 3px 8px; border-radius: 7px; }
.ad-apri:hover { background: rgba(6,60,38,.07); }
.ad-scaduto { font-size: 11.5px; color: var(--faint); }
.ad-vuoto { margin: 4px 4px; font-size: 13px; line-height: 1.5; color: var(--muted); }
/* il nome al centro occupa lo spazio libero fra «Documenti» e i tasti a destra: non si sovrappone mai */
.rd-split:not(.rd-mostra-doc) .rd-conv-testa .doc-tit {
  position: static !important; transform: none !important; flex: 1 1 auto !important;
  max-width: none !important; min-width: 0; text-align: center; padding: 0 12px;
}
.rd-split:not(.rd-mostra-doc) .rd-conv-testa .ad-btn { margin-left: 0 !important; }

/* ── 38. gli allegati DI LATO, con lanteprima chiusa (31/10/2026) ── */
.ad-lato {
  position: fixed; z-index: 20; overflow: hidden auto;
  background: #ffffff; border: 1px solid rgba(0,0,0,.09); border-radius: 18px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 22px rgba(0,0,0,.06);
}
.ad-lato[hidden] { display: none !important; }
.ad-lato-testa {
  width: 100%; display: flex; align-items: center; gap: 8px; padding: 14px 16px;
  border: none; background: transparent; cursor: pointer; font: inherit; text-align: left; color: var(--ink);
}
.ad-lato-testa svg { width: 17px; height: 17px; color: var(--accent-dark); flex-shrink: 0; }
.ad-lato-t { flex: 1; font-size: 14px; font-weight: 600; }
.ad-lato-testa .ad-n { color: var(--accent-dark); }
.ad-lato-testa .ad-freccia { width: 15px; height: 15px; color: var(--muted); transition: transform .3s cubic-bezier(.32,.72,0,1); }
.ad-lato.aperto .ad-lato-testa .ad-freccia { transform: rotate(180deg); }
.ad-lato-corpo { padding: 0 12px 12px; border-top: 1px solid rgba(60,60,67,.10); padding-top: 12px; animation: slEntra .3s cubic-bezier(.32,.72,0,1) both; }
.ad-lato-corpo[hidden] { display: none !important; }
.ad-lato .ad-griglia { gap: 8px; }
.ad-lato .ad-card { min-height: 104px; padding: 10px; }
.ad-lato .ad-nome { font-size: 12.5px; }
/* quando ce il riquadro di lato, il tasto nella riga verde non serve */
body.ad-di-lato .rd-conv-testa .ad-btn { display: none !important; }
body.ad-di-lato .ad-pannello { display: none !important; }
.ad-peso, .ad-scaduto { white-space: nowrap; } .ad-lato .ad-piede { flex-wrap: wrap; row-gap: 2px; }
.ad-lato .ad-scaduto { white-space: normal; }

/* ── 39. la finestra di lettura degli allegati (31/10/2026) ── */
.ad-card.si-legge { cursor: pointer; transition: border-color .2s ease, box-shadow .2s ease, transform .25s cubic-bezier(.32,.72,0,1); }
.ad-card.si-legge:hover { border-color: rgba(0,0,0,.16); box-shadow: 0 4px 14px rgba(0,0,0,.07); transform: translateY(-1px); }
.ad-card.si-legge:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ad-velo {
  position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 28px;
  background: rgba(20,24,22,.32); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  animation: veloEntra .2s ease both;
}
.ad-finestra {
  width: min(980px, 100%); height: min(88vh, 1100px); display: flex; flex-direction: column;
  background: #fff; border-radius: 18px; overflow: hidden;
  box-shadow: 0 0 0 .5px rgba(0,0,0,.1), 0 30px 80px rgba(0,0,0,.28);
  animation: vetroApri .3s cubic-bezier(.32,.72,0,1) both;
}
.ad-f-testa { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 18px; border-bottom: 1px solid rgba(60,60,67,.12); }
.ad-f-nome { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; color: var(--ink); }
.ad-f-scarica { font-size: 13px; font-weight: 600; color: var(--accent-dark); text-decoration: none; padding: 6px 10px; border-radius: 8px; }
.ad-f-scarica:hover { background: rgba(6,60,38,.07); }
.ad-f-chiudi { width: 32px; height: 32px; display: grid; place-items: center; border: none; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; }
.ad-f-chiudi:hover { background: rgba(0,0,0,.06); color: var(--ink); }
.ad-f-chiudi svg { width: 18px; height: 18px; }
.ad-f-corpo { flex: 1; min-height: 0; background: #f2f2f5; overflow: auto; }
.ad-f-pdf { width: 100%; height: 100%; border: 0; display: block; background: #f2f2f5; }
.ad-f-img { min-height: 100%; display: grid; place-items: center; padding: 20px; }
.ad-f-img img { max-width: 100%; max-height: calc(88vh - 120px); border-radius: 6px; box-shadow: 0 4px 20px rgba(0,0,0,.12); background: #fff; }
.ad-f-testo {
  max-width: 760px; margin: 24px auto; padding: 48px 56px; background: #fff; border-radius: 4px;
  box-shadow: 0 0 0 .5px rgba(0,0,0,.08), 0 8px 30px rgba(0,0,0,.08);
  white-space: pre-wrap; font-family: "Fraunces", Georgia, serif; font-size: 14.5px; line-height: 1.75; color: var(--ink);
}
.ad-f-attesa { margin: 40px auto; text-align: center; color: var(--muted); font-size: 14px; }
@media (max-width: 700px) { .ad-velo { padding: 0; } .ad-finestra { height: 100dvh; border-radius: 0; } .ad-f-testo { padding: 28px 22px; margin: 0; } }
.ad-f-testo { white-space: normal !important; }
.ad-f-testo h3 { margin: 0 0 14px; font-size: 17px; font-weight: 600; text-align: center; }
.ad-f-testo p { margin: 0 0 10px; }

/* ── 40. (31/10/2026) anteprima aperta: niente allegati; anteprima chiusa: la riga in alto torna bianca ── */
.rd-split.rd-mostra-doc .rd-conv-testa .ad-btn, .rd-split.rd-mostra-doc ~ .ad-pannello, .rd-mostra-doc .ad-pannello { display: none !important; }
.rd-split:not(.rd-mostra-doc) .rd-conv-testa {
  background: #ffffff !important; border-bottom: 1px solid rgba(60,60,67,.12) !important;
}
/* (31/10/2026) letichetta del tipo nella finestra: allineata; il messaggio del Pro */
.ad-f-testa .ad-ic { align-self: center !important; line-height: 1.5; }
.ad-f-pro { max-width: 440px; margin: 64px auto; padding: 28px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px;
  background: #fff; border-radius: 16px; box-shadow: 0 0 0 .5px rgba(0,0,0,.08), 0 8px 30px rgba(0,0,0,.08); }
.ad-f-pro b { font-size: 16px; color: var(--ink); }
.ad-f-pro span { font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.ad-f-pro-btn { margin-top: 6px; padding: 10px 18px; border-radius: 12px; background: var(--accent); color: #fff; font-weight: 600; font-size: 14px; text-decoration: none; }
.ad-f-pro-btn:hover { background: #2c7055; }
.ad-f-scarica[hidden] { display: none !important; }
/* (31/10/2026) senza Pro: il lucchetto «Pro» sulle schede degli allegati */
.ad-lucchetto { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px;
  background: rgba(6,60,38,.08); color: var(--accent-dark); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.ad-lucchetto svg { width: 12px; height: 12px; }

/* ── 41. (31/10/2026) «Mostra altro» dentro la bolla; anteprima chiusa: la barra da bordo a bordo ── */
.rd-bolla .rd-bolla-testo { white-space: pre-wrap; }
.rd-bolla .rd-bolla-testo.rd-bolla-corta { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.rd-bolla.rd-bolla-corta { display: block !important; -webkit-line-clamp: unset !important; overflow: visible !important; border-bottom: 0 !important; padding-bottom: 10px !important; }
.rd-bolla { display: flex !important; flex-direction: column; }
.rd-bolla .rd-tutto { align-self: flex-end; margin: 6px -4px -4px 0 !important; }
.rd-bolla .rd-tutto[hidden] { display: none !important; }
/* anteprima chiusa: la colonna occupa tutto, la barra va da bordo a bordo; messaggi e campo restano centrati a 760 px */
.rd-split.rd-senza-doc .rd-conv { max-width: none !important; margin: 0 !important; }
.rd-split.rd-senza-doc .rd-conv-testa { padding-left: 24px !important; padding-right: 24px !important; }
.rd-split.rd-senza-doc .rd-conv-scorre, .rd-split.rd-senza-doc .rd-chiedi {
  padding-left: max(18px, calc((100% - 760px) / 2)) !important; padding-right: max(18px, calc((100% - 760px) / 2)) !important;
}

/* ── 42. (31/10/2026) sotto ogni messaggio la data e il tasto copia ── */
.rd-msg.rd-tu .rd-piede { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 4px; }
.rd-msg.rd-tu .rd-piede .rd-quando { order: 0; margin: 0 !important; font-size: 11.5px; color: var(--faint); }
.rd-copia { width: 26px; height: 26px; display: grid; place-items: center; padding: 0; border: none; border-radius: 7px; background: transparent; color: var(--faint); cursor: pointer; }
.rd-copia:hover { background: rgba(0,0,0,.05); color: var(--ink); }
.rd-copia.fatto { color: var(--accent-dark); }
.rd-copia svg { width: 15px; height: 15px; }

/* ── 43. (31/10/2026) anteprima chiusa: il nome del documento in linea col bordo sinistro
   della colonna dei messaggi, «Chat sul documento» col bordo destro; «‹ Documenti» resta
   allestrema sinistra della barra. Su schermi stretti torna tutto in fila. ── */
@media (min-width: 1280px) {
  .rd-split.rd-senza-doc .rd-conv-testa {
    padding-left: max(18px, calc((100% - 760px) / 2)) !important;
    padding-right: max(18px, calc((100% - 760px) / 2)) !important;
  }
  .rd-split.rd-senza-doc .rd-conv-testa .btn-indietro {
    position: absolute !important; left: 20px; top: 50%; transform: translateY(-50%);
  }
  .rd-split.rd-senza-doc .rd-conv-testa .doc-tit { text-align: left !important; padding: 0 !important; }
  .rd-split.rd-senza-doc .rd-conv-testa .rd-conv-etichetta { margin-right: -2px; padding-right: 0 !important; }
}
@media (min-width: 1280px) { .rd-split.rd-senza-doc .rd-conv-testa .rd-conv-etichetta { margin-right: 0 !important; } }
/* (31/10/2026) il nome del documento al massimo fino a metà della colonna, poi i puntini */
.rd-split.rd-senza-doc .rd-conv-testa .doc-tit { flex: 0 1 auto !important; max-width: 50% !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-split.rd-senza-doc .rd-conv-testa .rd-conv-etichetta { margin-left: auto !important; }
/* «Chat sul documento» leggermente più a sinistra (31/10/2026) */
.rd-split.rd-senza-doc .rd-conv-testa .rd-conv-etichetta { margin-right: 16px !important; }

/* ── 44. (31/10/2026) il nome del documento si cambia cliccandolo ── */
.rd-conv-testa .doc-tit.si-rinomina { pointer-events: auto !important; cursor: text; border-radius: 7px; padding: 3px 6px !important; margin-left: -6px; transition: background .15s ease; }
.rd-conv-testa .doc-tit.si-rinomina:hover { background: rgba(0,0,0,.05); }
.rd-conv-testa .doc-tit.si-rinomina:hover::after { content: " ✎"; color: var(--muted); font-weight: 400; }
.rd-conv-testa .doc-tit.in-modifica { display: none !important; }
.rd-conv-testa .doc-tit.salvo { opacity: .55; }
.rd-nome-campo {
  flex: 0 1 50%; min-width: 0; max-width: 50%; margin-left: -6px; padding: 4px 8px;
  border: 1px solid rgba(52,129,98,.55); border-radius: 8px; background: #fff; outline: none;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--ink);
  box-shadow: 0 0 0 3px rgba(52,129,98,.14);
}

/* ── 45. (31/10/2026) anteprima aperta: «‹ Documenti» in alto a sinistra al posto di
   «Redigere documenti» e del tasto della barra; «Chat sul documento» al centro ── */
@media (min-width: 901px) {
  body.doc-aperto .rail .rail-burger, body.doc-aperto .rail-sezione { display: none !important; }
  body.doc-aperto .rd-conv-testa .btn-indietro {
    position: fixed !important; z-index: 40; transform: translateY(-50%);
    font-size: 15px !important;
  }
  body.doc-aperto .rd-conv-testa { justify-content: center !important; }
  body.doc-aperto .rd-conv-testa .rd-conv-etichetta { margin: 0 auto !important; padding-right: 9px !important; }
  /* 05/11/2026: col documento allargato la colonna della chat e' nascosta (visibility), ma «‹ Documenti»
     resta in alto a sinistra e cliccabile: prima spariva con la colonna e non si poteva tornare all'elenco */
  body.doc-aperto .rd-split.rd-largo .rd-conv-testa .btn-indietro { visibility: visible !important; }
}
@media (min-width: 901px) { body.doc-aperto .rail.chiusa .rail-sezione, body.doc-aperto .rail.chiusa .rail-burger { display: none !important; } }

/* ── 46. (31/10/2026) la barra della chat sul documento uguale a quella della Home,
   con e senza anteprima: una riga sola — «+» per allegare, il testo, linvio tondo;
   il conto delle correzioni scende sotto il campo, in piccolo ── */
.rd-chiedi { position: relative; padding-bottom: 22px !important; }
.rd-chiedi-campo {
  position: relative; display: flex !important; flex-direction: row !important; align-items: center !important;
  gap: 4px !important; min-height: 56px; padding: 7px 9px 7px 8px !important;
}
.rd-chiedi-campo .rd-chiedi-barra { display: contents !important; }
.rd-chiedi-campo textarea {
  order: 1; flex: 1 1 auto; min-width: 0; min-height: 24px; padding: 8px 6px !important;
  font-size: 16.5px !important; line-height: 1.5 !important; border: none !important; background: transparent !important;
}
.rd-chiedi-campo .rd-pill[data-c="allega"] {
  order: 0; flex-shrink: 0; width: 38px; height: 38px; padding: 0 !important; justify-content: center;
  border-radius: 50% !important; color: var(--muted) !important;
}
.rd-chiedi-campo .rd-pill[data-c="allega"] > span { display: none !important; }
.rd-chiedi-campo .rd-pill[data-c="allega"]::after {
  content: "add"; font-family: var(--icone); font-variation-settings: var(--icone-tratto); font-size: 22px; line-height: 1;
}
.rd-chiedi-campo .rd-spazio { display: none !important; }
.rd-chiedi-campo .rd-invia.rd-tondo {
  order: 2; flex-shrink: 0; width: 40px !important; height: 40px !important; padding: 0 !important;
  border-radius: 50% !important; display: grid !important; place-items: center;
  background: var(--accent) !important; color: #fff !important; box-shadow: none !important;
}
.rd-chiedi-campo .rd-invia.rd-tondo .material-symbols-outlined { font-size: 22px !important; color: #fff !important; }
.rd-chiedi-campo .rd-resta {
  position: absolute; top: 100%; left: 14px; margin-top: 5px; white-space: nowrap;
  font-size: 11.5px !important; color: var(--faint) !important;
}
.rd-chiedi-campo textarea { min-height: 42px !important; max-height: 200px; overflow-y: auto; }

/* ── 47. (31/10/2026) anteprima aperta: il nome nel pannello si cambia cliccandolo;
   Anteprima/Modifica squadrati; una lineetta fra le freccette e la X ── */
.rd-doc-testa .rd-doc-tit.si-rinomina { cursor: text; border-radius: 7px; padding: 3px 6px; margin-left: -6px; transition: background .15s ease; }
.rd-doc-testa .rd-doc-tit.si-rinomina:hover { background: rgba(0,0,0,.05); }
.rd-doc-testa .rd-doc-tit.si-rinomina:hover::after { content: " ✎"; color: var(--muted); font-weight: 400; }
.rd-doc-testa .rd-doc-tit.in-modifica { display: none !important; }
.rd-doc-testa .rd-doc-tit.salvo { opacity: .55; }
.rd-nome-campo.nel-pannello { flex: 1 1 auto; max-width: 50%; margin-right: auto; font-size: 15px; }
.rd-doc-testa .rd-seg { border-radius: 10px !important; padding: 2px !important; }
.rd-doc-testa .rd-seg button { border-radius: 8px !important; }
.rd-doc-testa .rd-icona[data-az="chiudi"] { position: relative; margin-left: 13px !important; }
.rd-doc-testa .rd-icona[data-az="chiudi"]::before {
  content: ""; position: absolute; left: -8px; top: 50%; transform: translateY(-50%);
  width: 1px; height: 18px; background: rgba(60,60,67,.22); pointer-events: none;
}

/* ── 48. (31/10/2026) i tre puntini nel pannello del documento, fra «Modifica» e le
   freccette, con le lineette fra un gruppo e laltro ── */
.rd-doc-testa .rd-piu-doc svg { width: 18px; height: 18px; }
.rd-doc-testa .rd-piu-doc, .rd-doc-testa .rd-icona[data-az="largo"] { position: relative; margin-left: 13px !important; }
.rd-doc-testa .rd-piu-doc::before, .rd-doc-testa .rd-icona[data-az="largo"]::before {
  content: ""; position: absolute; left: -8px; top: 50%; transform: translateY(-50%);
  width: 1px; height: 18px; background: rgba(60,60,67,.22); pointer-events: none;
}

/* ── 49. (31/10/2026) anteprima aperta: «Anteprima | Modifica» al centro del pannello;
   il nome al massimo un quarto del pannello, poi i puntini ── */
.rd-doc-testa { position: relative; }
.rd-doc-testa .rd-seg { position: absolute !important; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0 !important; }
.rd-doc-testa .rd-doc-tit { max-width: 25% !important; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto !important; }
.rd-doc-testa .rd-piu-doc { margin-left: auto !important; }
.rd-nome-campo.nel-pannello { max-width: 25% !important; flex: 0 1 25% !important; }

/* ── 50. (31/10/2026) barra degli strumenti del documento: via Word/PDF/Copia (stanno nei
   tre puntini, che premono ancora questi tasti nascosti); lo zoom al centro, sotto
   «Anteprima | Modifica»; «Mostra modifiche» tutto a destra ── */
#rd-doc .rd-strumenti { position: relative; }
#rd-doc .rd-strumenti .rd-az[data-f="docx"], #rd-doc .rd-strumenti .rd-az[data-f="pdf"], #rd-doc .rd-strumenti .rd-az[data-f="copia"] { display: none !important; }
#rd-doc .rd-strumenti .rd-zoom { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0 !important; }
#rd-doc .rd-strumenti .rd-spazio { flex: 1 1 auto; }
#rd-doc .rd-strumenti .rd-interr { order: 9; margin-left: auto !important; }

/* ── 51. (31/10/2026) leditor del documento più completo, in ordine ── */
#rd-doc .rd-barra-editor { gap: 2px; flex-wrap: nowrap; }
#rd-doc .rd-barra-editor .rd-zoom { position: static !important; transform: none !important; margin: 0 6px !important; }
#rd-doc .rd-barra-editor .rd-cmd { border-radius: 8px; }
#rd-doc .rd-barra-editor .rd-cmd-testo { width: auto; display: inline-flex; align-items: center; gap: 4px; padding: 0 9px 0 6px; font: inherit; font-size: 13px; font-weight: 500; color: var(--ink-2); }
#rd-doc .rd-barra-editor .rd-cmd-testo .material-symbols-outlined { font-size: 19px; }
#rd-doc .rd-barra-editor .rd-blocco {
  height: 30px; padding: 0 26px 0 10px; border: none; border-radius: 8px; background-color: #f2f2f7;
  font: inherit; font-size: 13px; font-weight: 500; color: var(--ink-2); cursor: pointer;
}
#rd-doc .rd-barra-editor .rd-sep { height: 18px; margin: 0 6px; background: rgba(60,60,67,.18); }
.rd-ins { position: relative; display: inline-flex; }
.rd-ins-menu { position: absolute !important; top: calc(100% + 6px); left: 0; min-width: 240px; z-index: 60; background: rgba(255,255,255,.98) !important; }
.rd-ins-menu[hidden] { display: none !important; }
.rd-ins-menu .menu-voce { justify-content: space-between; font-size: 13px; }
.rd-ins-menu .menu-voce small { color: var(--faint); font-size: 11.5px; }
.rd-parole { font-size: 12px; color: var(--faint); white-space: nowrap; margin-right: 4px; }
.rd-trova {
  display: flex; align-items: center; gap: 8px; padding: 8px 14px; flex-wrap: wrap;
  border-bottom: 1px solid rgba(60,60,67,.10); background: #fafafa;
}
.rd-trova input {
  height: 30px; min-width: 150px; flex: 0 1 200px; padding: 0 10px; border: 1px solid rgba(0,0,0,.14); border-radius: 8px;
  font: inherit; font-size: 13px; background: #fff; outline: none;
}
.rd-trova input:focus { border-color: rgba(0,0,0,.28); }
.rd-trova-n { font-size: 12px; color: var(--muted); min-width: 80px; }
.rd-trova-b { height: 30px; padding: 0 11px; border: none; border-radius: 8px; background: #f2f2f7; font: inherit; font-size: 12.5px; font-weight: 500; color: var(--ink-2); cursor: pointer; }
.rd-trova-b:hover { background: #e8e8ed; }
.rd-trova-x { margin-left: auto; width: 30px; height: 30px; display: grid; place-items: center; border: none; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.rd-trova-x:hover { background: rgba(0,0,0,.06); }
.rd-trova-x .material-symbols-outlined { font-size: 18px; }

/* ── 52. (31/10/2026) leditor su due righe: sopra la scrittura, sotto lo stato ── */
#rd-doc .rd-barra-editor { flex-direction: column !important; align-items: stretch !important; gap: 6px !important; flex-wrap: nowrap !important; padding-top: 8px !important; padding-bottom: 8px !important; }
#rd-doc .rd-barra-editor .rd-riga { display: flex; align-items: center; gap: 2px; min-width: 0; }
#rd-doc .rd-barra-editor .rd-riga-stato { position: relative; min-height: 34px; }
#rd-doc .rd-barra-editor .rd-riga-stato .rd-zoom { position: absolute !important; left: 50%; top: 50%; transform: translate(-50%, -50%) !important; margin: 0 !important; }
#rd-doc .rd-barra-editor .rd-riga-stato .rd-spazio { flex: 1 1 auto; }
#rd-doc .rd-barra-editor .rd-riga-stato .rd-btn { margin-left: 6px; }
#rd-doc .rd-barra-editor .rd-parole { margin: 0 0 0 4px; }

/* (31/10/2026) prova: righe invertite (sopra lo stato, sotto la scrittura) e la scrittura centrata */
#rd-doc .rd-barra-editor .rd-riga-stato { order: 1; }
#rd-doc .rd-barra-editor .rd-riga-scrittura { order: 2; justify-content: center; }

/* ── 53. (31/10/2026) anteprima aperta: il tasto della barra laterale torna DENTRO la
   barra, accanto a «LexNova Chat» con la lineetta in mezzo, come allinizio ── */
@media (min-width: 901px) {
  body.doc-aperto .rail .rail-burger, body.doc-aperto .rail.chiusa .rail-burger {
    display: grid !important; place-items: center;
    position: relative !important; inset: auto !important; left: auto !important; top: auto !important;
    transform: none !important; margin: 0 0 0 auto !important;
    width: 34px !important; height: 34px !important; opacity: 1 !important;
    background: transparent !important; border: none !important; box-shadow: none !important;
    -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
    border-radius: 9px !important; color: var(--muted) !important;
  }
  body.doc-aperto .rail .rail-burger:hover { background: rgba(0,0,0,.05) !important; color: var(--ink) !important; }
  body.doc-aperto .rail .rail-burger .material-symbols-outlined { font-size: 20px !important; }
  body.doc-aperto .rail:not(.chiusa) .rail-burger::before {
    display: block !important; content: ""; position: absolute; left: -6px; top: 50%;
    width: 1px; height: 18px; transform: translateY(-50%); background: rgba(60,60,67,.22);
  }
  /* barra chiusa: come allorigine, il tasto sta sul logo e compare passandoci sopra */
  body.doc-aperto .rail.chiusa .rail-burger {
    position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; margin: 0 !important; opacity: 0 !important;
  }
  body.doc-aperto .rail.chiusa .rail-top:hover .rail-burger { opacity: 1 !important; }
  body.doc-aperto .rail.chiusa .rail-top:hover .rail-logo { opacity: 0 !important; }
}

/* ── 54. (31/10/2026) Redazione: il campo come quello della Home ──
   Una riga: «+» per allegare, il testo, il microfono, l'invio tondo (compare
   quando c'e' del testo). Tipo e Scheletri scendono sotto il campo, nel
   selettore grigio delle azioni della Home. Col modulo «Dati che mancano»
   aperto la riga va in fondo: «Modifica la richiesta» e «Scrivi il documento». */
.foglio-nuovo.rd-campo { display: flex !important; flex-direction: column; padding: 7px 9px 7px 8px !important; }
.rd-riga-campo { display: flex; align-items: flex-end; gap: 4px; min-height: 42px; }
.rd-riga-campo .rd-testo {
  flex: 1 1 auto; min-width: 0; min-height: 26px !important; max-height: 360px; overflow-y: auto;
  padding: 9px 6px !important; font-size: 16.5px !important; line-height: 1.5 !important;
}
.rd-campo .rd-pill.rd-piu {
  flex-shrink: 0; width: 42px; height: 42px; padding: 0 !important; justify-content: center;
  border-radius: 50% !important; color: var(--muted) !important;
}
.rd-campo .rd-pill.rd-piu .material-symbols-outlined { font-size: 24px; }
.rd-riga-campo .rd-mic {
  flex-shrink: 0; width: 42px; height: 42px; display: grid; place-items: center;
  border: none; background: transparent; border-radius: 50%; color: var(--ink-2); cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.rd-riga-campo .rd-mic[hidden], .rd-riga-campo #btn-dati-indietro[hidden] { display: none !important; }
.rd-riga-campo .rd-mic:hover { background: rgba(0,0,0,.05); }
.foglio-nuovo.detta .rd-riga-campo .rd-mic { background: #ff3b30; color: #fff; animation: rdDetta 1.4s ease-in-out infinite; }
@keyframes rdDetta { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,59,48,.35); } 50% { box-shadow: 0 0 0 6px rgba(255,59,48,0); } }
.rd-campo .rd-riga-campo .rd-invia {
  flex-shrink: 0; width: 42px; height: 42px; padding: 0 !important; border-radius: 50% !important;
  display: grid !important; place-items: center; animation: rdInviaEntra .22s cubic-bezier(.32,.72,0,1);
}
@keyframes rdInviaEntra { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.rd-riga-campo .rd-invia .material-symbols-outlined { font-size: 22px !important; }
.rd-riga-campo .rd-invia > span:last-child {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.foglio-nuovo:not(.ha-testo):not(.con-dati) .rd-riga-campo .rd-invia { display: none !important; }
/* il modulo dei dati: la riga scende in fondo, coi due tasti con la scritta */
.foglio-nuovo.con-dati .rd-dati { order: 1; }
.foglio-nuovo.con-dati .rd-riga-campo { order: 2; justify-content: space-between; align-items: center; padding: 6px 4px 2px; }
.foglio-nuovo.con-dati .rd-nota { order: 3; }
.foglio-nuovo.con-dati .rd-piu, .foglio-nuovo.con-dati .rd-mic { display: none !important; }
.foglio-nuovo.con-dati .rd-riga-campo .rd-invia {
  width: auto; height: auto; display: inline-flex !important; gap: 6px; border-radius: 12px !important; padding: 9px 16px !important;
}
.foglio-nuovo.con-dati .rd-riga-campo .rd-invia > span:last-child { position: static; width: auto; height: auto; overflow: visible; clip: auto; }

/* Tipo e Scheletri: il selettore grigio della Home, due metà */
.rd-scelte {
  display: flex; gap: 0; margin-top: 14px; padding: 3px; border-radius: 15px;
  background: rgba(118,118,128,.12);
}
.rd-scelte > .rd-tipo, .rd-scelte > #btn-modelli { flex: 1 1 0; min-width: 0; }
.rd-scelte .rd-pill {
  width: 100%; justify-content: center; gap: 7px !important; padding: 9px 10px !important;
  border: none !important; border-radius: 12px !important; background: transparent !important;
  box-shadow: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  font-size: 13.5px !important; font-weight: 500 !important; color: var(--ink-2) !important; white-space: nowrap;
}
.rd-scelte .rd-pill:hover { background: rgba(255,255,255,.5) !important; transform: none !important; }
.rd-scelte .rd-pill[aria-expanded="true"] {
  background: #fff !important; box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 0 0 .5px rgba(0,0,0,.04) !important;
}
.rd-scelte .rd-pill .material-symbols-outlined { font-size: 18px; color: inherit !important; }
.rd-scelte .rd-pill .rd-giu { font-size: 18px; margin-left: -3px; }
.rd-scelte .rd-tipo-menu {
  top: calc(100% + 8px); left: 0; border-radius: 18px !important; border: 1px solid rgba(0,0,0,.08) !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 10px 30px rgba(0,0,0,.08) !important;
}
@media (max-width: 560px) {
  .rd-scelte .rd-pill { font-size: 12.5px !important; padding: 9px 4px !important; gap: 4px !important; }
}
/* larga come il campo; il menu del tipo su fondo bianco pieno (sotto ci sono le caselle) */
.rd-compositore .rd-scelte { max-width: var(--rd-campo-w, 720px); margin-left: auto; margin-right: auto; }
.rd-scelte .rd-tipo-menu { background: #fff !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.rd-scelte > .rd-tipo, .rd-scelte > #btn-modelli { flex: 1 1 0 !important; margin: 0 !important; }
.rd-scelte > .rd-tipo > .rd-pill { display: flex !important; width: 100% !important; margin: 0 !important; }
.rd-scelte .rd-pill { box-sizing: border-box !important; }
.rd-scelte { display: grid !important; grid-template-columns: minmax(0,1fr) minmax(0,1fr); }

/* ── 55. (31/10/2026) il menu del tipo di documento in stile macOS ──
   «Automatico» in cima, poi due colonne («In giudizio», «Fuori dal giudizio»):
   voci in fila, velo grigio al passaggio, la spunta verde su quella scelta. */
.rd-tipo-menu.rd-tipo-mac {
  width: min(470px, calc(100vw - 32px)) !important; padding: 6px !important;
  background: rgba(255,255,255,.97) !important; border: 1px solid rgba(0,0,0,.08) !important; border-radius: 14px !important;
  box-shadow: 0 0 0 .5px rgba(0,0,0,.04), 0 12px 32px rgba(0,0,0,.12), 0 2px 6px rgba(0,0,0,.05) !important;
  transform-origin: top left; animation: rdTipoApri .18s cubic-bezier(.32,.72,0,1);
}
@keyframes rdTipoApri { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.rd-tipo-mac .rd-tipo-nota { display: none !important; }
.rd-tipo-mac #doc-chips { display: block !important; margin: 0 !important; gap: 0 !important; }
.rd-tipo-mac .rd-tipo-auto, .rd-tipo-mac .doc-chip {
  display: flex !important; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; margin: 0 !important; text-align: left; cursor: pointer; box-sizing: border-box;
  background: transparent !important; border: none !important; box-shadow: none !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  border-radius: 8px !important; color: var(--ink) !important; font: inherit; transform: none !important;
}
.rd-tipo-mac .doc-chip { padding: 7px 10px !important; font-size: 13.5px !important; font-weight: 400 !important; min-height: 0 !important; line-height: 1.3; }
.rd-tipo-mac .rd-tipo-auto { padding: 8px 10px !important; }
.rd-tipo-mac .rd-tipo-auto:hover, .rd-tipo-mac .doc-chip:hover { background: rgba(0,0,0,.05) !important; }
.rd-tipo-mac .rd-tipo-t { min-width: 0; }
.rd-tipo-mac .rd-tipo-auto b { display: block; font-size: 13.5px; font-weight: 500; }
.rd-tipo-mac .rd-tipo-auto small { display: block; margin-top: 1px; font-size: 12px; color: var(--muted); }
.rd-tipo-mac .rd-spunta { font-size: 18px !important; color: var(--accent) !important; opacity: 0; flex-shrink: 0; }
.rd-tipo-mac .doc-chip.on .rd-spunta, .rd-tipo-mac #doc-chips:not(:has(.doc-chip.on)) .rd-tipo-auto .rd-spunta { opacity: 1; }
.rd-tipo-mac .doc-chip.on { font-weight: 500 !important; }
.rd-tipo-colonne {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 4px;
  margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(60,60,67,.12);
}
.rd-tipo-gruppo { margin: 4px 10px 3px; font-size: 11.5px; font-weight: 600; color: var(--faint); letter-spacing: .01em; }
@media (max-width: 520px) { .rd-tipo-colonne { grid-template-columns: minmax(0,1fr); } }
/* fondo pieno (sotto ci sono le caselle), un po' piu' largo; sul telefono due colonne e scorre */
.rd-tipo-menu.rd-tipo-mac { background: #fff !important; width: min(520px, calc(100vw - 32px)) !important; max-height: min(70vh, 520px); overflow-y: auto; }
@media (max-width: 520px) { .rd-tipo-colonne { grid-template-columns: minmax(0,1fr) minmax(0,1fr); } .rd-tipo-mac .doc-chip { font-size: 13px !important; padding: 7px 8px !important; } }

/* ── 56. (31/10/2026) Redazione: la rotella delle impostazioni e il pannello ──
   In alto a destra la rotella; il pannello come le Impostazioni di macOS: fondo
   grigio chiaro, gruppi bianchi arrotondati, selettori a schede. «Scrittura»
   (lunghezza, giurisprudenza, linguaggio, istruzioni) e «Scheletri» (carica e
   di' che documento è). Nella barra, «I tuoi scheletri» apre un menu come il tipo. */
.rd-rotella {
  position: fixed; top: 22px; right: 24px; z-index: 40;
  width: 36px; height: 36px; display: grid; place-items: center; padding: 0;
  border: none; border-radius: 9px; background: transparent; color: var(--ink-2); cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.rd-rotella:hover { background: rgba(0,0,0,.06); color: var(--ink); }
.rd-rotella svg { width: 21px; height: 21px; transition: transform .5s cubic-bezier(.32,.72,0,1); }
.rd-rotella:hover svg { transform: rotate(45deg); }
@media (max-width: 900px) { .rd-rotella { top: 8px; right: 10px; } }

body.rd-imp-aperto { overflow: hidden; }
.rd-imp-velo {
  position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 16px;
  background: rgba(0,0,0,.2); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  animation: rdImpVelo .2s ease both;
}
.rd-imp-velo[hidden] { display: none !important; }
@keyframes rdImpVelo { from { opacity: 0; } to { opacity: 1; } }
.rd-imp {
  width: min(640px, 100%); max-height: min(740px, calc(100vh - 32px)); display: flex; flex-direction: column;
  background: #f5f5f7; border-radius: 18px; overflow: hidden;
  box-shadow: 0 0 0 .5px rgba(0,0,0,.12), 0 24px 60px rgba(0,0,0,.22), 0 4px 14px rgba(0,0,0,.08);
  animation: rdImpEntra .26s cubic-bezier(.32,.72,0,1) both;
}
@keyframes rdImpEntra { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
.rd-imp-testa { display: flex; align-items: center; gap: 12px; padding: 18px 16px 4px 24px; }
.rd-imp-testa h2 { flex: 1; margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -.01em; color: var(--ink); }
.rd-imp-x {
  width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: none; border-radius: 50%;
  background: rgba(0,0,0,.06); color: var(--ink-2); cursor: pointer;
}
.rd-imp-x:hover { background: rgba(0,0,0,.1); }
.rd-imp-x .material-symbols-outlined { font-size: 18px; }
.rd-imp-seg {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; margin: 12px 24px 4px; padding: 2px;
  border-radius: 9px; background: rgba(118,118,128,.12);
}
.rd-imp-seg::before {
  content: ''; position: absolute; top: 2px; bottom: 2px; left: 2px; width: calc((100% - 4px) / 2); border-radius: 7px;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 0 0 .5px rgba(0,0,0,.04);
  transform: translateX(calc(var(--i, 0) * 100%)); transition: transform .3s cubic-bezier(.32,.72,0,1);
}
.rd-imp-seg button {
  position: relative; z-index: 1; padding: 6px 10px; border: none; background: transparent; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 500; color: var(--ink-2);
}
.rd-imp-seg button.on { color: var(--ink); }
.rd-imp-corpo { overflow-y: auto; padding: 8px 24px 24px; }
.rd-imp-aiuto { margin: 8px 4px 14px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.rd-imp-gruppo {
  position: relative; background: #fff; border-radius: 12px;
  box-shadow: 0 0 0 .5px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.03);
}
.rd-imp-riga { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px 12px 16px; }
.rd-imp-riga + .rd-imp-riga { border-top: 1px solid rgba(60,60,67,.1); }
.rd-imp-riga-t b { display: block; font-size: 14px; font-weight: 500; color: var(--ink); }
.rd-imp-riga-t small { display: block; margin-top: 1px; font-size: 12px; color: var(--muted); }
.rd-imp-scelta {
  position: relative; flex-shrink: 0; display: grid; grid-template-columns: repeat(3, minmax(0,1fr));
  padding: 2px; border-radius: 9px; background: rgba(118,118,128,.12);
}
.rd-imp-scelta::before {
  content: ''; position: absolute; top: 2px; bottom: 2px; left: 2px; width: calc((100% - 4px) / 3); border-radius: 7px;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 0 0 .5px rgba(0,0,0,.04);
  transform: translateX(calc(var(--i, 1) * 100%)); transition: transform .28s cubic-bezier(.32,.72,0,1);
}
.rd-imp-scelta button {
  position: relative; z-index: 1; min-width: 84px; padding: 6px 10px; border: none; background: transparent; cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 500; color: var(--ink-2); white-space: nowrap;
}
.rd-imp-scelta button.on { color: var(--ink); }
.rd-imp-eti { display: block; margin: 20px 4px 8px; font-size: 13px; font-weight: 600; color: var(--ink); }
.rd-imp-note textarea {
  display: block; width: 100%; min-height: 104px; box-sizing: border-box; resize: vertical;
  padding: 12px 14px 24px; border: none; outline: none; background: transparent; border-radius: 12px;
  font: inherit; font-size: 14px; line-height: 1.5; color: var(--ink);
}
.rd-imp-note textarea::placeholder { color: var(--faint); }
.rd-imp-note:focus-within { box-shadow: 0 0 0 .5px rgba(0,0,0,.07), 0 0 0 3px rgba(52,129,98,.18); }
.rd-imp-conta { position: absolute; right: 12px; bottom: 7px; font-size: 11.5px; color: var(--faint); pointer-events: none; }
.rd-imp-stato { min-height: 18px; margin: 10px 4px 0; font-size: 12.5px; color: var(--muted); transition: opacity .2s ease; }
.rd-imp-stato.fatto { color: var(--accent-ink, #337359); }
.rd-imp-stato.fatto::before { content: "✓ "; }
.rd-imp-stato.rotto, .rd-imp-errore { color: #d70015; }
.rd-imp-errore { min-height: 0; margin: 8px 4px 0; font-size: 12.5px; }
.rd-imp-errore:empty { display: none; }

.rd-imp-vuoto { margin: 0; padding: 16px; font-size: 13.5px; color: var(--muted); }
.rd-imp-sk { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 14px; }
.rd-imp-sk + .rd-imp-sk { border-top: 1px solid rgba(60,60,67,.1); }
.rd-imp-sk-ic {
  flex-shrink: 0; width: 30px; height: 36px; display: grid; place-items: center; border-radius: 6px;
  background: #e8f0fe; color: #1a5fd0; font-size: 10.5px; font-weight: 700; letter-spacing: .02em;
}
.rd-imp-sk-ic.pdf { background: #fdecea; color: #d70015; }
.rd-imp-sk-t { flex: 1; min-width: 0; }
.rd-imp-sk-t b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 500; color: var(--ink); }
.rd-imp-sk-t small { display: block; margin-top: 1px; font-size: 12px; color: var(--muted); }
.rd-imp-sk-tipo { position: relative; flex-shrink: 0; }
.rd-imp-sk-tipo select {
  -webkit-appearance: none; appearance: none; max-width: 210px; padding: 6px 28px 6px 10px; border: none; border-radius: 8px;
  background: rgba(118,118,128,.12); font: inherit; font-size: 13px; color: var(--ink); cursor: pointer; outline: none;
}
.rd-imp-sk-tipo select:focus-visible { box-shadow: 0 0 0 3px rgba(52,129,98,.25); }
.rd-imp-sk-tipo .material-symbols-outlined { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 18px; color: var(--muted); pointer-events: none; }
.rd-imp-sk.nuovo .rd-imp-sk-tipo select { box-shadow: 0 0 0 2px var(--accent); animation: rdImpNuovo 1.4s ease-in-out 3; }
@keyframes rdImpNuovo { 50% { box-shadow: 0 0 0 5px rgba(52,129,98,.25); } }
.rd-imp-sk-x {
  flex-shrink: 0; width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: none; border-radius: 8px;
  background: transparent; color: var(--muted); cursor: pointer;
}
.rd-imp-sk-x:hover { background: #fdecea; color: #d70015; }
.rd-imp-sk-x .material-symbols-outlined { font-size: 19px; }
.rd-imp-piede { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.rd-imp-carica {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border: none; border-radius: 10px; cursor: pointer;
  background: #fff; box-shadow: 0 0 0 .5px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.05);
  font: inherit; font-size: 13.5px; font-weight: 500; color: var(--ink);
}
.rd-imp-carica:hover { background: #fafafa; }
.rd-imp-carica:disabled { opacity: .5; cursor: default; }
.rd-imp-carica.occupato { opacity: .6; pointer-events: none; }
.rd-imp-carica .material-symbols-outlined { font-size: 19px; color: var(--ink-2); }
.rd-imp-conto { font-size: 12.5px; color: var(--muted); text-align: right; }
@media (max-width: 560px) {
  .rd-imp-riga { flex-direction: column; align-items: stretch; gap: 8px; }
  .rd-imp-scelta button { min-width: 0; }
  .rd-imp-sk { flex-wrap: wrap; }
  .rd-imp-sk-tipo { order: 3; flex-basis: 100%; padding-left: 42px; }
  .rd-imp-sk-tipo select { max-width: none; width: 100%; }
  .rd-imp-sk-tipo .material-symbols-outlined { right: 8px; }
}

/* lo scheletro nella barra: un menu come quello del tipo, allineato a destra */
.rd-schel { position: relative; min-width: 0; }
.rd-scelte .rd-pill > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-scelte .rd-pill.scelto { color: var(--ink) !important; }
.rd-tipo-menu.rd-sk-menu { left: auto !important; right: 0; width: min(380px, calc(100vw - 32px)) !important; }
.rd-sk-menu .rd-tipo-auto.on .rd-spunta, .rd-sk-menu .rd-sk-voce.on .rd-spunta { opacity: 1; }
.rd-sk-menu .rd-sk-gruppo, .rd-sk-menu .rd-sk-fondo { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(60,60,67,.12); }
.rd-sk-menu .rd-sk-voce, .rd-sk-menu .rd-sk-gestisci {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; box-sizing: border-box;
  padding: 7px 10px; border: none; border-radius: 8px; background: transparent; cursor: pointer; text-align: left;
  font: inherit; font-size: 13.5px; color: var(--ink);
}
.rd-sk-menu .rd-sk-voce:hover, .rd-sk-menu .rd-sk-gestisci:hover { background: rgba(0,0,0,.05); }
.rd-sk-menu .rd-sk-voce .rd-tipo-t { min-width: 0; }
.rd-sk-menu .rd-sk-n { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-sk-menu .rd-sk-voce small { display: block; margin-top: 1px; font-size: 12px; color: var(--muted); }
.rd-sk-menu .rd-sk-voce.on .rd-sk-n { font-weight: 500; }
.rd-sk-menu .rd-sk-gestisci { justify-content: flex-start; color: var(--ink-2); }
.rd-sk-menu .rd-sk-gestisci svg { width: 16px; height: 16px; flex-shrink: 0; }
.rd-sk-menu .rd-sk-vuoto { margin: 6px 0 0; padding: 8px 10px 4px; border-top: 1px solid rgba(60,60,67,.12); font-size: 13px; color: var(--muted); }
@media (max-width: 900px) { .rd-rotella { top: 13px !important; } }

/* ── 57. (31/10/2026) la dettatura con Whisper, e la Home sul telefono ──
   Mentre Whisper trascrive, al posto dell'onda «Trascrivo…» che pulsa; i tasti
   della riga si spengono. Nella Redazione il microfono gira finché ha finito.
   Sul telefono il campo sta in fondo (sopra la nota) e il saluto col logo al
   centro dello spazio sopra: home.js lascia stare lo spazio calcolato. */
.detta-stato { display: none; }
.composer.sq.trascrive .detta-onda { display: none; }
.composer.sq.trascrive .detta-stato {
  display: block; flex: 1 1 auto; min-width: 0; padding-left: 6px;
  font-size: 15.5px; color: var(--muted); animation: dettaPulsa 1.3s ease-in-out infinite;
}
.composer.sq.trascrive .detta-x, .composer.sq.trascrive .detta-ferma, .composer.sq.trascrive .btn-send { opacity: .35; pointer-events: none; }
@keyframes dettaPulsa { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
.foglio-nuovo.trascrive .rd-riga-campo .rd-mic { position: relative; pointer-events: none; color: var(--faint); }
.foglio-nuovo.trascrive .rd-riga-campo .rd-mic::after {
  content: ''; position: absolute; inset: 7px; border-radius: 50%;
  border: 2px solid rgba(52,129,98,.2); border-top-color: var(--accent); animation: dettaGira .8s linear infinite;
}
@keyframes dettaGira { to { transform: rotate(360deg); } }
.foglio-nuovo.trascrive .rd-testo::placeholder { animation: dettaPulsa 1.3s ease-in-out infinite; }

@media (max-width: 700px) {
  .main.vuota:has(.hero[data-home="nuova"]) .scroll {
    flex: 1 1 auto !important; display: flex !important; flex-direction: column; justify-content: center;
    margin: 0 !important;
  }
  .main.vuota:has(.hero[data-home="nuova"]) .dock { margin-bottom: 0 !important; }
  .main.vuota:has(.hero[data-home="nuova"]) .hero { padding-top: 0 !important; }
}

/* ── 58. (31/10/2026) il menu della risposta nella barra, come quello dei modelli di Claude ──
   La pillola dice il modo (Rapida / Approfondita) e, se scelto, il tipo in grigio;
   il menu: i modi con la spunta e il numero, una lineetta, «Tipo di risposta ›». */
.composer.con-menu-risposta #btn-modo { display: none !important; }
.risp-pill {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 7px 0 10px;
  border: none; border-radius: 10px; background: transparent; cursor: pointer;
  font: inherit; font-size: 13.5px; font-weight: 500; color: var(--ink-2); white-space: nowrap;
  transition: background .15s ease;
}
.risp-pill:hover, .risp-pill[aria-expanded="true"] { background: rgba(0,0,0,.055); }
.risp-pill .material-symbols-outlined { font-size: 18px; }
.risp-pill .risp-tipo { color: var(--faint); font-weight: 400; }
.risp-pill .risp-giu { font-size: 17px; color: var(--faint); margin-left: -2px; }
@media (max-width: 560px) { .risp-pill .risp-t, .risp-pill .risp-tipo { display: none; } .risp-pill { padding: 0 4px 0 8px; } }

.risp-menu {
  position: fixed; z-index: 400; width: 300px; max-width: calc(100vw - 20px); box-sizing: border-box; padding: 6px;
  background: #fff; border-radius: 14px; border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 0 0 .5px rgba(0,0,0,.03), 0 12px 32px rgba(0,0,0,.14), 0 2px 6px rgba(0,0,0,.06);
  transform-origin: bottom right; animation: rispApri .16s cubic-bezier(.32,.72,0,1);
}
.risp-menu.sotto { transform-origin: top right; }
.risp-menu[hidden] { display: none !important; }
@keyframes rispApri { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.risp-voce {
  display: flex; align-items: center; gap: 10px; width: 100%; box-sizing: border-box; padding: 8px 10px;
  border: none; border-radius: 8px; background: transparent; cursor: pointer; text-align: left; outline: none;
  font: inherit; font-size: 14px; color: var(--ink);
}
.risp-voce:hover, .risp-voce:focus-visible, .risp-voce:focus { background: rgba(0,0,0,.05); }
.risp-voce-t { flex: 1; min-width: 0; }
.risp-voce-t b { display: block; font-weight: 500; }
.risp-voce-t small { display: block; margin-top: 1px; font-size: 12px; line-height: 1.35; color: var(--muted); }
.risp-spunta { font-size: 19px !important; color: var(--accent); flex-shrink: 0; }
.risp-n { min-width: 14px; text-align: right; font-size: 12.5px; color: var(--faint); flex-shrink: 0; }
.risp-sep { height: 1px; margin: 5px 6px; background: rgba(60,60,67,.12); }
.risp-val { font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.risp-freccia { font-size: 19px !important; color: var(--faint); margin-left: -4px; }
.risp-indietro { gap: 4px; padding-left: 6px; }
.risp-indietro b { font-weight: 600; font-size: 13.5px; }
.risp-indietro .material-symbols-outlined { font-size: 19px; color: var(--muted); }
.risp-indietro .risp-su { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }
.risp-pill:focus-visible { outline: 2px solid rgba(52,129,98,.45); outline-offset: 1px; }

/* ── 59. (31/10/2026) la nuvola dietro la barra che si muove — solo con html.alone-vivo ──
   (static/alone-vivo.js: computer, buona connessione, niente «riduci movimento»).
   La macchia verde respira e scivola piano; una seconda, più chiara e più piccola, le
   gira intorno. Solo `transform` e `opacity`: lavoro della scheda grafica, non del processore. */
html.alone-vivo .main.vuota:has(.hero[data-home="nuova"])::before {
  will-change: transform, opacity;
  animation: aloneRespira 11s ease-in-out infinite alternate;
}
html.alone-vivo .shell.apertura .main.vuota:has(.hero[data-home="nuova"])::before {
  animation: aperturaAlone .6s cubic-bezier(.2, .7, .2, 1) backwards, aloneRespira 11s ease-in-out .6s infinite alternate;
}
html.alone-vivo .main.vuota:has(.hero[data-home="nuova"])::after {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  left: var(--alone-x, 50%); top: var(--alone-y, 50%); width: 760px; height: 500px;
  background: radial-gradient(closest-side, rgba(134,206,177,.38), rgba(134,206,177,.13) 60%, transparent 100%) center / 100% 100% no-repeat;
  will-change: transform, opacity;
  animation: aloneGira 18s linear infinite, aloneAppare 1.6s ease-out both;
}
@keyframes aloneRespira {
  0%   { transform: translate(-50%, -50%) translate(0, 0) scale(1, 1) rotate(0deg); opacity: 1; }
  25%  { transform: translate(-50%, -50%) translate(120px, -46px) scale(1.16, .88) rotate(6deg); opacity: .85; }
  50%  { transform: translate(-50%, -50%) translate(-24px, 40px) scale(.9, 1.12) rotate(-4deg); opacity: 1; }
  75%  { transform: translate(-50%, -50%) translate(-118px, -30px) scale(1.12, .94) rotate(5deg); opacity: .88; }
  100% { transform: translate(-50%, -50%) translate(36px, 52px) scale(1.06, 1.04) rotate(-3deg); opacity: .95; }
}
@keyframes aloneGira {
  from { transform: translate(-50%, -50%) rotate(0deg) translateX(300px) rotate(0deg) scale(1); }
  25%  { transform: translate(-50%, -50%) rotate(90deg) translateX(200px) rotate(-90deg) scale(1.25); }
  50%  { transform: translate(-50%, -50%) rotate(180deg) translateX(320px) rotate(-180deg) scale(.9); }
  75%  { transform: translate(-50%, -50%) rotate(270deg) translateX(220px) rotate(-270deg) scale(1.2); }
  to   { transform: translate(-50%, -50%) rotate(360deg) translateX(300px) rotate(-360deg) scale(1); }
}
@keyframes aloneAppare { from { opacity: 0; } to { opacity: 1; } }
/* mentre si scrive la nuvola rallenta: non deve distrarre */
html.alone-vivo .main.vuota:has(.hero[data-home="nuova"]):has(.composer:focus-within)::before { animation-duration: 22s; }
html.alone-vivo .main.vuota:has(.hero[data-home="nuova"]):has(.composer:focus-within)::after { animation-duration: 36s, 1.6s; }
/* (31/10/2026) la finestra delle impostazioni ha la stessa altezza su «Scrittura» e su «Scheletri»:
   cambiando scheda non si muove più; quello che non ci sta scorre dentro. */
.rd-imp { height: min(580px, calc(100vh - 32px)); }
.rd-imp-corpo { flex: 1 1 auto; min-height: 0; }
@media (max-width: 560px) { .rd-imp { height: min(720px, calc(100vh - 32px)); height: min(720px, calc(100dvh - 32px)); } }

/* ── 60. (31/10/2026) gli scheletri col nome: la schedina «Nuovo scheletro», il nome che si
   cambia cliccandolo, e sotto la barra «Prendo spunto dal tuo scheletro …» ── */
.rd-imp { position: relative; }
.rd-imp-nuovo {
  position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 20px;
  background: rgba(245,245,247,.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  animation: rdImpVelo .18s ease both;
}
.rd-imp-nuovo[hidden] { display: none !important; }
.rd-imp-nuovo-card {
  width: min(420px, 100%); box-sizing: border-box; padding: 22px 22px 18px; border-radius: 16px; background: #fff;
  box-shadow: 0 0 0 .5px rgba(0,0,0,.08), 0 16px 40px rgba(0,0,0,.16);
  animation: rdImpEntra .24s cubic-bezier(.32,.72,0,1) both;
}
.rd-imp-nuovo-card h3 { margin: 0; font-size: 16px; font-weight: 650; color: var(--ink); }
.rd-imp-nuovo-file { margin: 3px 0 16px; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-imp-campo { display: block; margin-bottom: 12px; }
.rd-imp-campo > span:first-child { display: block; margin: 0 2px 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.rd-imp-campo input {
  width: 100%; box-sizing: border-box; padding: 9px 12px; border: none; border-radius: 9px; outline: none;
  background: rgba(118,118,128,.12); font: inherit; font-size: 14px; color: var(--ink);
}
.rd-imp-campo input:focus, .rd-imp-nuovo-tipo select:focus { box-shadow: 0 0 0 3px rgba(52,129,98,.25); }
.rd-imp-nuovo-tipo { display: block; }
.rd-imp-nuovo-tipo select { width: 100%; max-width: none; padding: 9px 30px 9px 12px; font-size: 14px; border-radius: 9px; }
.rd-imp-nuovo-sugg { margin: -4px 2px 8px; font-size: 12px; color: var(--accent-ink, #337359); }
.rd-imp-nuovo-sugg:empty { display: none; }
.rd-imp-nuovo-aiuto { margin: 4px 2px 16px; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.rd-imp-nuovo-az { display: flex; justify-content: flex-end; gap: 8px; }
.rd-imp-btn {
  padding: 8px 14px; border: none; border-radius: 9px; cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 500;
  background: rgba(118,118,128,.12); color: var(--ink);
}
.rd-imp-btn:hover { background: rgba(118,118,128,.2); }
.rd-imp-btn.primo { background: var(--accent); color: #fff; }
.rd-imp-btn.primo:hover { background: #2c7055; }
.rd-imp-btn:disabled { opacity: .45; cursor: default; }
.rd-imp-sk-nome { cursor: text; border-radius: 6px; margin-left: -4px; padding: 1px 4px; }
.rd-imp-sk-nome:hover { background: rgba(0,0,0,.05); }
.rd-imp-sk-nome:hover::after { content: " ✎"; color: var(--muted); font-weight: 400; }
.rd-imp-sk-campo {
  width: 100%; box-sizing: border-box; margin: -2px 0 1px -4px; padding: 2px 6px; border: none; border-radius: 6px; outline: none;
  background: rgba(118,118,128,.12); box-shadow: 0 0 0 3px rgba(52,129,98,.22); font: inherit; font-size: 14px; font-weight: 500; color: var(--ink);
}

.rd-sk-hint {
  display: flex; align-items: center; justify-content: center; gap: 10px; margin: 10px 0 0;
  font-size: 13px; color: var(--muted); animation: rdSkHint .25s ease both;
}
.rd-sk-hint[hidden] { display: none !important; }
.rd-sk-hint::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.rd-sk-hint b { font-weight: 500; color: var(--ink); }
.rd-sk-hint-b { padding: 3px 9px; border: none; border-radius: 7px; background: rgba(118,118,128,.12); cursor: pointer; font: inherit; font-size: 12.5px; color: var(--ink-2); }
.rd-sk-hint-b:hover { background: rgba(118,118,128,.2); }
@keyframes rdSkHint { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

/* ── 61. (31/10/2026) lo storico delle chat: le conversazioni non stanno più nella barra
   laterale ma tutte nello «Storico delle chat» (static/storico.js), per data, a gruppi bianchi
   come le Impostazioni di macOS ── */
html.con-storico .rail-list { display: none !important; }
html.con-storico .rail-foot { margin-top: auto; }
.storico-testa { margin: 4px 2px 16px; }
.storico-testa h1 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); }
.storico-sotto { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); }
.storico-sotto:empty { display: none; }
.storico-carica { padding: 18px 4px; font-size: 14px; color: var(--muted); }
.storico-gruppo { margin-top: 22px; }
.storico-gruppo h2 { margin: 0 6px 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.storico-lista {
  background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 0 0 .5px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.03);
}
.storico-riga {
  position: relative; display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 8px 0 16px;
  cursor: pointer; outline: none; transition: background .12s ease;
}
.storico-riga + .storico-riga::before {
  content: ''; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: rgba(60,60,67,.1);
}
.storico-riga:hover, .storico-riga:focus-visible { background: rgba(0,0,0,.035); }
.storico-riga.on .storico-t { font-weight: 600; }
.storico-pin { font-size: 16px !important; color: var(--muted); margin-left: -2px; }
.storico-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; color: var(--ink); }
.storico-quando { flex-shrink: 0; font-size: 12.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.storico-piu {
  flex-shrink: 0; width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: none; border-radius: 8px;
  background: transparent; color: var(--muted); cursor: pointer; opacity: 0; transition: opacity .12s ease, background .12s ease;
}
.storico-riga:hover .storico-piu, .storico-riga:focus-within .storico-piu, .storico-piu[aria-expanded="true"] { opacity: 1; }
.storico-piu:hover { background: rgba(0,0,0,.06); }
.storico-piu .material-symbols-outlined { font-size: 19px; }
@media (hover: none) { .storico-piu { opacity: 1; } }
.storico-campo {
  flex: 1; min-width: 0; padding: 4px 8px; margin-left: -8px; border: none; border-radius: 7px; outline: none;
  background: rgba(118,118,128,.12); box-shadow: 0 0 0 3px rgba(52,129,98,.22); font: inherit; font-size: 14.5px; color: var(--ink);
}

/* ── 62. (31/10/2026) lo storico più largo e con «quel tocco»: il campo di ricerca bianco come la
   barra dei prompt (resta in alto mentre si scorre, ⌘K, la × che cancella), «Nuova chat» in alto,
   righe a due livelli con l'icona, i gruppi che entrano uno dopo l'altro, i risultati come schede ── */
html.con-storico .column:has(> #vista-cerca:not([hidden])) { max-width: 820px; }
html.con-storico #vista-cerca { max-width: none; padding: 34px 0 56px; }
.storico-testa { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 2px 20px; }
.storico-testa h1 { font-size: 30px; letter-spacing: -.025em; }
.storico-nuova {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px 8px 11px; margin-bottom: 4px;
  border: none; border-radius: 10px; background: #fff; cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 500; color: var(--ink);
  box-shadow: 0 0 0 .5px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.05); transition: background .15s ease, transform .15s ease;
}
.storico-nuova:hover { background: #fafafa; }
.storico-nuova:active { transform: scale(.97); }
.storico-nuova svg { width: 16px; height: 16px; color: var(--ink-2); }

.cerca-campo.storico-campo-box {
  position: sticky; top: 10px; z-index: 5; display: flex; align-items: center; gap: 10px; height: 52px;
  padding: 0 12px 0 16px; margin: 0 0 4px; border: none !important; border-radius: 14px; background: #fff;
  box-shadow: 0 0 0 .5px rgba(0,0,0,.09), 0 6px 22px rgba(0,0,0,.06); transition: box-shadow .2s ease;
}
.cerca-campo.storico-campo-box:focus-within { box-shadow: 0 0 0 .5px rgba(0,0,0,.16), 0 10px 30px rgba(0,0,0,.09); }
.storico-lente { width: 19px; height: 19px; flex-shrink: 0; color: var(--muted); }
.cerca-campo.storico-campo-box input {
  flex: 1; min-width: 0; height: 100%; padding: 0; border: none !important; outline: none; background: transparent;
  font-size: 16px !important; color: var(--ink);
}
.cerca-campo.storico-campo-box input::placeholder { color: var(--faint); }
.storico-kbd {
  flex-shrink: 0; padding: 4px 7px; border-radius: 6px; background: rgba(118,118,128,.12);
  font-family: inherit; font-size: 11.5px; font-weight: 500; line-height: 1; color: var(--muted);
}
.storico-pulisci {
  display: none; flex-shrink: 0; width: 22px; height: 22px; place-items: center; padding: 0; border: none; border-radius: 50%;
  background: rgba(118,118,128,.3); color: #fff; cursor: pointer;
}
.storico-pulisci:hover { background: rgba(118,118,128,.45); }
.storico-pulisci svg { width: 12px; height: 12px; }
.storico-campo-box.pieno .storico-pulisci { display: grid; }
.storico-campo-box.pieno .storico-kbd { display: none; }
.storico-campo-box #cerca-chiudi { display: none !important; }
html.con-storico .cerca-nota { margin: 14px 6px 4px; font-size: 12.5px; }

.storico-riga { min-height: 62px; padding: 0 10px 0 14px; gap: 12px; }
.storico-riga + .storico-riga::before { left: 62px; }
.storico-ic {
  width: 36px; height: 36px; flex-shrink: 0; display: grid; place-items: center; border-radius: 10px;
  background: linear-gradient(145deg, #f1f7f5, #e3efea); color: var(--accent-ink, #337359);
  box-shadow: inset 0 0 0 .5px rgba(6,60,38,.07); transition: transform .2s cubic-bezier(.32,.72,0,1);
}
.storico-ic svg { width: 18px; height: 18px; }
.storico-ic.fissata { background: linear-gradient(145deg, #fff7de, #fcedc2); color: #9a6700; box-shadow: inset 0 0 0 .5px rgba(120,80,0,.08); }
.storico-riga:hover .storico-ic { transform: scale(1.06); }
.storico-testo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.storico-testo .storico-t { flex: none; font-size: 14.5px; font-weight: 500; }
.storico-m { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--muted); }
.storico-riga.on .storico-t { font-weight: 650; }
.storico-gruppo h2 { margin-left: 4px; }

@media (prefers-reduced-motion: no-preference) {
  .storico-entra .storico-gruppo { animation: storicoEntra .5s cubic-bezier(.32,.72,0,1) both; animation-delay: calc(var(--i, 0) * 70ms); }
}
@keyframes storicoEntra { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

html.con-storico #cerca-esiti .esito {
  display: block; width: 100%; box-sizing: border-box; margin: 0 0 8px; padding: 14px 16px; text-align: left; cursor: pointer;
  border: none; border-radius: 12px; background: #fff; box-shadow: 0 0 0 .5px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.03);
  transition: box-shadow .15s ease, transform .15s ease;
}
html.con-storico #cerca-esiti .esito:hover, html.con-storico #cerca-esiti .esito:focus-visible {
  background: #fff; box-shadow: 0 0 0 .5px rgba(0,0,0,.12), 0 6px 18px rgba(0,0,0,.07); outline: none;
}
html.con-storico .esito-t { font-size: 14.5px; }
html.con-storico .esito-s { font-size: 13.5px; }
html.con-storico .esito-m { font-size: 12px; margin-top: 6px; }
html.con-storico .esito-s mark { background: rgba(52,129,98,.22); color: inherit; }

@media (max-width: 700px) {
  html.con-storico #vista-cerca { padding-top: 18px; }
  .storico-testa h1 { font-size: 24px; }
  .storico-kbd { display: none; }
  .storico-nuova span { display: none; }
  .storico-nuova { padding: 8px; }
}
/* il campo fermo in alto: una fascia del colore della pagina sopra e ai lati copre le righe che ci scorrono sotto */
.cerca-campo.storico-campo-box { box-shadow: 0 0 0 .5px rgba(0,0,0,.09), 0 6px 22px rgba(0,0,0,.06), 0 -16px 0 12px rgb(251,251,252); }
.cerca-campo.storico-campo-box:focus-within { box-shadow: 0 0 0 .5px rgba(0,0,0,.16), 0 10px 30px rgba(0,0,0,.09), 0 -16px 0 12px rgb(251,251,252); }
.storico-kbd { font-family: inherit !important; letter-spacing: .02em; }
.cerca-campo.storico-campo-box { box-shadow: 0 0 0 .5px rgba(0,0,0,.09), 0 6px 22px rgba(0,0,0,.06), 0 -16px 0 12px rgb(251,251,252), 0 16px 0 10px rgb(251,251,252); }
.cerca-campo.storico-campo-box:focus-within { box-shadow: 0 0 0 .5px rgba(0,0,0,.16), 0 10px 30px rgba(0,0,0,.09), 0 -16px 0 12px rgb(251,251,252), 0 16px 0 10px rgb(251,251,252); }

/* ── 63. (31/10/2026) la bolla dell'avvocato nella chat come nella chat sul documento:
   grigia, due righe e «Mostra altro ⌄» dentro, sotto l'ora e «Copia» (static/bolle-chat.js) ── */
.msg-user { flex-direction: column; align-items: flex-end; }
.bubble-user {
  display: flex; flex-direction: column;
  background: #ececf0 !important; color: var(--ink) !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  border: none !important; box-shadow: none !important;
  border-radius: 20px 20px 6px 20px; padding: 10px 14px;
}
.bubble-user .bu-testo { white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble-user .bu-testo.bu-corta { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.bubble-user .bu-tutto {
  display: inline-flex; align-items: center; gap: 4px; align-self: flex-end; margin: 6px -4px -4px 0;
  padding: 3px 6px; border: none; border-radius: 7px; background: transparent; cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--accent-dark, #337359);
}
.bubble-user .bu-tutto::before { content: attr(data-t); }
.bubble-user .bu-tutto[hidden] { display: none !important; }
.bubble-user .bu-tutto:hover { background: rgba(0,0,0,.05); }
.bubble-user .bu-tutto svg { width: 14px; height: 14px; transition: transform .25s cubic-bezier(.32,.72,0,1); }
.bubble-user .bu-tutto.aperta svg { transform: rotate(180deg); }
.bu-piede { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 4px; opacity: .9; }
.bu-quando::before { content: attr(data-t); font-size: 11.5px; color: var(--faint); }
.bu-copia { width: 26px; height: 26px; display: grid; place-items: center; padding: 0; border: none; border-radius: 7px; background: transparent; color: var(--faint); cursor: pointer; }
.bu-copia:hover { background: rgba(0,0,0,.05); color: var(--ink); }
.bu-copia.fatto { color: var(--accent-dark, #337359); }
.bu-copia svg { width: 15px; height: 15px; }
/* la fascia color pagina solo col campo fermo in alto (.incollato, static/storico.js) */
.cerca-campo.storico-campo-box { box-shadow: 0 0 0 .5px rgba(0,0,0,.09), 0 6px 22px rgba(0,0,0,.06); }
.cerca-campo.storico-campo-box:focus-within { box-shadow: 0 0 0 .5px rgba(0,0,0,.16), 0 10px 30px rgba(0,0,0,.09); }
.cerca-campo.storico-campo-box.incollato { box-shadow: 0 0 0 .5px rgba(0,0,0,.09), 0 6px 22px rgba(0,0,0,.06), 0 -16px 0 12px rgb(251,251,252), 0 16px 0 10px rgb(251,251,252); }
.cerca-campo.storico-campo-box.incollato:focus-within { box-shadow: 0 0 0 .5px rgba(0,0,0,.16), 0 10px 30px rgba(0,0,0,.09), 0 -16px 0 12px rgb(251,251,252), 0 16px 0 10px rgb(251,251,252); }
/* (31/10/2026) l'icona delle righe dello storico senza riquadro: solo il simbolo, un po' più in grassetto */
.storico-ic, .storico-ic.fissata { background: none !important; box-shadow: none !important; }
.storico-ic svg { width: 21px; height: 21px; }
.storico-ic svg path { stroke-width: 2.3; }

/* ── 64. (01/11/2026) i tooltip disegnati da noi, in stile Apple (static/tooltip.js) ──
   Etichetta scura arrotondata, testo bianco piccolo, le scorciatoie in grigio chiaro;
   entra con un piccolo scatto (sale di 2 px), niente freccia. */
.lex-tip {
  position: fixed; z-index: 10000; pointer-events: none; max-width: 260px; box-sizing: border-box;
  padding: 5px 9px; border-radius: 7px;
  background: rgba(30,30,32,.92); color: #fff;
  -webkit-backdrop-filter: blur(10px) saturate(160%); backdrop-filter: blur(10px) saturate(160%);
  box-shadow: 0 0 0 .5px rgba(255,255,255,.06), 0 6px 18px rgba(0,0,0,.18);
  font: 500 12px/1.35 -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
  letter-spacing: .005em; text-align: center; white-space: normal; overflow-wrap: anywhere;
  opacity: 0; transform: translateY(2px) scale(.98); transition: opacity .12s ease, transform .14s cubic-bezier(.32,.72,0,1);
}
.lex-tip.giu { transform: translateY(-2px) scale(.98); }
.lex-tip.vivo { opacity: 1; transform: none; }
.lex-tip[hidden] { display: none !important; }
.lex-tip-k { margin-left: 6px; color: rgba(255,255,255,.55); font-weight: 500; }
@media (prefers-reduced-motion: reduce) { .lex-tip { transition: none; transform: none; } }
.lex-tip.destra { transform: translateX(-3px) scale(.98); }
.lex-tip.destra.vivo { transform: none; }

/* ── 65. (01/11/2026) sotto la risposta dell'AI: solo icone, le stesse della bolla; le fonti in un
   riquadro col bordo verde che apre il pannello a lato; il pannello accanto alla risposta ── */
.msg-ai .azioni { display: flex; gap: 2px; margin-top: 8px; }
.msg-ai .azioni .az-copia,
.msg-ai .azioni .az-scarica, .msg-ai .azioni .az-segnala, .msg-ai .azioni .az-verifica {
  width: 26px; height: 26px; display: grid; place-items: center; gap: 0; padding: 0;
  border: none; border-radius: 7px; background: transparent !important; color: var(--faint); cursor: pointer;
  box-shadow: none !important; transition: background .15s ease, color .15s ease;
}
.msg-ai .azioni .az-copia:hover,
.msg-ai .azioni .az-scarica:hover, .msg-ai .azioni .az-segnala:hover, .msg-ai .azioni .az-verifica:hover {
  background: rgba(0,0,0,.05) !important; color: var(--ink);
}
.msg-ai .azioni svg { width: 15px; height: 15px; }
.msg-ai .azioni .az-copia.fatto, .msg-ai .azioni .az-segnala[data-fatto] { color: var(--accent-dark, #337359); }
.msg-ai .azioni .az-verifica.fatto { color: var(--accent-dark, #337359); }
.msg-ai .azioni .az-verifica.fatto:hover { background: rgba(52,129,98,.1) !important; }
.msg-ai .azioni .az-copia:disabled ,
.msg-ai .azioni .az-scarica:disabled { opacity: .45; cursor: default; background: transparent !important; }

/* le fonti: un riquadro col bordo verde, come le versioni nella redazione; il contenuto va nel pannello */
.msg-ai .fonti {
  margin-top: 18px; border: 1.5px solid rgba(52,129,98,.5); border-radius: 14px; background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.msg-ai .fonti:hover { border-color: var(--accent); box-shadow: 0 4px 16px rgba(52,129,98,.13); }
.msg-ai .fonti.attiva { border-color: var(--accent); background: #f4f9f7; }
.msg-ai .fonti .fonti-bar {
  width: 100%; box-sizing: border-box; padding: 12px 12px 12px 14px !important; border: none; background: transparent !important;
  border-radius: 13px; cursor: pointer;
}
.msg-ai .fonti .fonti-ch { transform: rotate(-90deg) !important; color: var(--accent-dark, #337359) !important; }
.msg-ai .fonti > .fonti-corpo { display: none !important; }

/* il pannello: «‹ Tutte le fonti» e l'elenco dentro */
.pf-indietro {
  display: inline-flex; align-items: center; gap: 2px; margin: -4px 0 6px -6px; padding: 4px 8px 4px 4px;
  border: none; border-radius: 8px; background: transparent; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--accent-dark, #337359);
}
.pf-indietro[hidden] { display: none !important; }
.pf-indietro:hover { background: rgba(52,129,98,.1); }
.pf-indietro svg { width: 17px; height: 17px; }
.drawer-body > .fonti-corpo { padding: 0; }
.drawer-body > .fonti-corpo > .fonti-g:first-child { margin-top: 0; }

/* sugli schermi larghi il pannello sta ACCANTO: niente velo, la conversazione si stringe */
:root { --pannello-w: min(560px, 42vw); }
@media (min-width: 1000px) {
  .drawer { width: var(--pannello-w) !important; }
  body.pannello-laterale .drawer-bg { opacity: 0 !important; pointer-events: none !important; }
  body.pannello-laterale .main { margin-right: var(--pannello-w); }
  .main { transition: margin-right .26s cubic-bezier(.22,1,.36,1); }
  body.pannello-laterale .drawer { box-shadow: -10px 0 30px rgba(0,0,0,.06) !important; }
}

/* ── 66. (01/11/2026) l'avviso «È uscita una versione nuova · Aggiorna» (static/versione.js) ── */
.lex-nuova {
  position: fixed; left: 50%; bottom: 22px; z-index: 9000; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border-radius: 14px;
  background: rgba(30,30,32,.92); color: #fff; font-size: 13.5px; font-weight: 500;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0,0,0,.2); animation: lexNuova .3s cubic-bezier(.32,.72,0,1) both;
}
.lex-nuova button {
  padding: 6px 12px; border: none; border-radius: 9px; background: var(--accent, #348162); color: #fff;
  font: inherit; font-weight: 600; cursor: pointer;
}
.lex-nuova button:hover { filter: brightness(1.06); }
@keyframes lexNuova { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translateX(-50%); } }

/* ── 67. (01/11/2026) il pannello delle fonti più chiaro: in cima cosa fare, i filtri e «Scarica ⌄»
   (resta fermo mentre si scorre); le fonti come schede con la freccia per aprirle ── */
.pf-testa {
  position: sticky; top: -20px; z-index: 2; margin: -20px -22px 14px; padding: 14px 22px 12px;
  background: #fff; border-bottom: 1px solid rgba(60,60,67,.1);
}
.pf-aiuto { margin: 0 0 10px; font-size: 12.5px; color: var(--muted); }
.pf-barra { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pf-spazio { flex: 1; }
.pf-filtri { display: inline-flex; padding: 2px; border-radius: 9px; background: rgba(118,118,128,.12); }
.pf-filtri button {
  padding: 5px 11px; border: none; border-radius: 7px; background: transparent; cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 500; color: var(--ink-2);
}
.pf-filtri button span { color: var(--faint); font-weight: 400; margin-left: 2px; }
.pf-filtri button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 0 0 .5px rgba(0,0,0,.04); }
.pf-scarica { position: relative; flex-shrink: 0; }
.pf-scarica-b {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px 7px 11px; border: none; border-radius: 9px; cursor: pointer;
  background: #fff; box-shadow: 0 0 0 .5px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.06);
  font: inherit; font-size: 13px; font-weight: 600; color: var(--ink);
}
.pf-scarica-b:hover { background: #fafafa; }
.pf-scarica-b:disabled { opacity: .5; cursor: default; }
.pf-scarica-b svg { width: 16px; height: 16px; flex-shrink: 0; }
.pf-scarica-b svg:last-child { width: 14px; height: 14px; color: var(--muted); margin-left: -1px; }
.pf-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; width: 270px; padding: 6px; box-sizing: border-box;
  background: #fff; border-radius: 12px; border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 12px 32px rgba(0,0,0,.14), 0 2px 6px rgba(0,0,0,.06); animation: rispApri .16s cubic-bezier(.32,.72,0,1);
}
.pf-menu[hidden] { display: none !important; }
.pf-menu button {
  display: block; width: 100%; padding: 8px 10px; border: none; border-radius: 8px; background: transparent; cursor: pointer;
  text-align: left; font: inherit; color: var(--ink);
}
.pf-menu button:hover { background: rgba(0,0,0,.05); }
.pf-menu b { display: block; font-size: 13.5px; font-weight: 600; }
.pf-menu small { display: block; margin-top: 1px; font-size: 12px; color: var(--muted); }
.pf-menu-nota { margin: 4px 0 0; padding: 7px 10px 3px; border-top: 1px solid rgba(60,60,67,.1); font-size: 11.5px; color: var(--faint); }

.drawer-body > .fonti-corpo .fonti-scarica { display: none !important; }
.drawer-body > .fonti-corpo .pf-via { display: none !important; }
.drawer-body > .fonti-corpo .fonti-g { margin: 16px 2px 8px; font-size: 12px; letter-spacing: .03em; }
.drawer-body > .fonti-corpo .src {
  position: relative; display: block; width: 100%; box-sizing: border-box; margin: 0 0 8px; padding: 12px 40px 12px 14px;
  text-align: left; cursor: pointer; border: 1px solid rgba(0,0,0,.08) !important; border-radius: 12px !important;
  background: #fff !important; box-shadow: none !important; transition: border-color .15s ease, box-shadow .15s ease;
}
.drawer-body > .fonti-corpo .src::after {
  content: ''; position: absolute; right: 16px; top: 50%; width: 7px; height: 7px;
  border-right: 2px solid currentColor; border-top: 2px solid currentColor; color: var(--faint);
  transform: translateY(-50%) rotate(45deg); transition: color .15s ease, right .15s ease;
}
.drawer-body > .fonti-corpo .src:hover { border-color: rgba(52,129,98,.55) !important; box-shadow: 0 4px 14px rgba(52,129,98,.1) !important; }
.drawer-body > .fonti-corpo .src:hover::after { color: var(--accent-dark, #337359); right: 13px; }
.drawer-body > .fonti-corpo .src-snip { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }

/* ── 68. (01/11/2026) l'intestazione del pannello e i tasti in fondo, in stile Apple ──
   In alto «‹ Tutte le fonti» e la × tonda; sotto il nome della raccolta su una riga (verde,
   senza riquadro), poi il titolo. In fondo «Apri la fonte» e «Scarica ⌄» come tasti grigi. */
#drawer .drawer-top { position: relative; display: block; padding: 18px 64px 16px 24px; border-bottom: 1px solid rgba(60,60,67,.1); }
#drawer .drawer-top .meta { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; }
#drawer .pf-indietro { margin: -6px 0 4px -8px; }
#drawer #drawer-tag {
  display: block; max-width: 100%; padding: 0; margin: 0; border: none; border-radius: 0; background: none !important;
  font-size: 12px; font-weight: 600; letter-spacing: .01em; text-transform: none; color: var(--accent-dark, #337359);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#drawer #drawer-title { margin: 0; font-size: 19px; line-height: 1.3; font-weight: 650; letter-spacing: -.012em; color: var(--ink); }
#drawer #drawer-close {
  position: absolute; top: 14px; right: 16px; width: 30px; height: 30px; display: grid; place-items: center; padding: 0;
  border: none; border-radius: 50%; background: rgba(0,0,0,.06); color: var(--ink-2); cursor: pointer;
}
#drawer #drawer-close:hover { background: rgba(0,0,0,.1); }
#drawer #drawer-close .material-symbols-outlined { font-size: 18px; }

#drawer .drawer-foot {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 20px 14px 24px;
  border-top: 1px solid rgba(60,60,67,.1); background: #fff;
}
#drawer .link-out {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px 7px 10px; border: none !important; border-radius: 9px;
  background: rgba(118,118,128,.12) !important; box-shadow: none !important; color: var(--ink) !important;
  font-size: 13px; font-weight: 600; text-decoration: none;
}
#drawer .link-out:hover { background: rgba(118,118,128,.2) !important; }
#drawer .link-out .material-symbols-outlined { font-size: 17px; color: var(--ink-2); }
#drawer .drawer-scarica { display: none !important; }
#drawer .pf-dl[hidden] { display: none !important; }
#drawer .pf-dl .pf-scarica-b { background: rgba(118,118,128,.12); box-shadow: none; padding: 7px 9px 7px 10px; }
#drawer .pf-dl .pf-scarica-b:hover { background: rgba(118,118,128,.2); }
#drawer .pf-menu.pf-menu-su { top: auto; bottom: calc(100% + 6px); left: 0; right: auto; width: 250px; }
#drawer .drawer-foot .note { margin-left: auto; font-size: 11.5px; color: var(--faint); }
/* (01/11/2026) le conversazioni non stanno nella barra laterale su NESSUNA pagina (redazione, Triplo Vaglio,
   banca dati…): sono tutte nello «Storico delle chat». Prima si nascondevano solo nella chat. */
.rail-list { display: none !important; }
.rail .rail-foot { margin-top: auto; }

/* ── 69. (01/11/2026) la colonna a lato della chat: allegati e fonti consultate (static/lato-chat.js),
   come gli allegati nella redazione: gruppi bianchi, righe con l'icona, la domanda che apre e chiude ── */
.lc-lato {
  position: fixed; top: 76px; bottom: 150px; z-index: 30; overflow-y: auto; padding: 2px 2px 12px; box-sizing: border-box;
  scrollbar-width: thin; animation: lcEntra .3s cubic-bezier(.32,.72,0,1) both;
}
.lc-lato[hidden] { display: none !important; }
@keyframes lcEntra { from { opacity: 0; transform: translateX(6px); } to { opacity: 1; transform: none; } }
.lc-sez + .lc-sez { margin-top: 22px; }
.lc-sez h3 { display: flex; align-items: baseline; gap: 6px; margin: 0 6px 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.lc-sez h3 span { font-weight: 500; color: var(--faint); }
.lc-lista { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 .5px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.03); }
.lc-riga {
  position: relative; display: flex; align-items: flex-start; gap: 10px; width: 100%; box-sizing: border-box; padding: 9px 12px;
  border: none; background: transparent; text-align: left; cursor: pointer; font: inherit;
}
.lc-riga + .lc-riga::before { content: ''; position: absolute; top: 0; left: 44px; right: 0; height: 1px; background: rgba(60,60,67,.1); }
.lc-riga:hover { background: rgba(0,0,0,.035); }
.lc-ic { width: 22px; height: 22px; flex-shrink: 0; display: grid; place-items: center; margin-top: 1px; color: var(--accent-dark, #337359); }
.lc-ic svg { width: 17px; height: 17px; }
.lc-ic.pdf { color: #d70015; }
.lc-t { min-width: 0; flex: 1; }
.lc-t b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 13px; font-weight: 500; line-height: 1.35; color: var(--ink); }
.lc-t small { display: block; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; color: var(--faint); }
.lc-gruppo { margin-bottom: 8px; }
.lc-gruppo-t {
  display: flex; align-items: center; gap: 6px; width: 100%; box-sizing: border-box; padding: 6px; border: none; border-radius: 8px;
  background: transparent; cursor: pointer; text-align: left; font: inherit; font-size: 12.5px; font-weight: 500; color: var(--ink-2);
}
.lc-gruppo-t:hover { background: rgba(0,0,0,.04); }
.lc-domanda { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-n { flex-shrink: 0; padding: 1px 7px; border-radius: 9px; background: rgba(118,118,128,.12); font-size: 11.5px; color: var(--muted); }
.lc-gruppo-t svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--faint); transform: rotate(-90deg); transition: transform .2s ease; }
.lc-gruppo.aperto .lc-gruppo-t svg { transform: none; }
.lc-gruppo:not(.aperto) .lc-lista { display: none; }
.lc-gruppo .lc-lista { margin-top: 4px; }
.lc-tutte {
  display: block; width: 100%; padding: 8px 12px; border: none; border-top: 1px solid rgba(60,60,67,.1); background: transparent;
  text-align: left; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--accent-dark, #337359);
}
.lc-tutte:hover { background: rgba(52,129,98,.07); }
/* (01/11/2026) la colonna a lato della chat con il disegno degli allegati della redazione (sez. 37-39):
   due riquadri bianchi «Allegati» e «Fonti consultate», le schede due per riga */
.lc-lato { bottom: auto !important; display: flex; flex-direction: column; gap: 12px; padding: 2px 2px 8px; overflow-y: auto; }
.lc-lato .ad-lato { position: static !important; flex-shrink: 0; overflow: visible; }
.lc-lato .ad-lato[hidden] { display: none !important; }
.lc-lato .ad-card .ad-nome { -webkit-line-clamp: 3; }
.lc-lato .ad-card .ad-peso { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.lc-gruppo + .lc-gruppo { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(60,60,67,.08); }
.lc-gruppo .lc-gruppo-t { padding: 4px 4px 6px; }
.lc-gruppo .lc-gruppo-t .ad-n { background: rgba(6,60,38,.1); color: var(--accent-dark, #337359); }
.lc-gruppo .lc-gruppo-t .ad-freccia { width: 14px; height: 14px; color: var(--muted); transform: rotate(-90deg); transition: transform .25s ease; }
.lc-gruppo.aperto .lc-gruppo-t .ad-freccia { transform: none; }
.lc-gruppo:not(.aperto) .ad-griglia, .lc-gruppo:not(.aperto) .lc-tutte { display: none !important; }
.lc-lato .lc-tutte {
  display: inline-block; width: auto; margin-top: 8px; padding: 4px 8px; border: none !important; border-radius: 7px;
  background: transparent; font-size: 12.5px; font-weight: 600; color: var(--accent-dark, #337359);
}
.lc-lato .lc-tutte:hover { background: rgba(6,60,38,.07); }
/* (01/11/2026) «Mostra altro +n ›» sotto le due schede di ogni domanda: apre il pannello delle fonti */
.lc-lato .lc-tutte { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 5px 8px 5px 10px; }
.lc-lato .lc-tutte .lc-altre { padding: 0 6px; border-radius: 999px; background: rgba(6,60,38,.1); font-size: 11px; line-height: 17px; }
.lc-lato .lc-tutte .ad-freccia { width: 13px; height: 13px; transform: rotate(-90deg); }
.pf-filtri button:disabled { opacity: .45; cursor: default; }

/* ── 70. (01/11/2026) con le notifiche aperte l'intestazione va sopra la colonna a lato
   (allegati e fonti): il riquadro delle notifiche sta dentro .top, che era a un livello più basso ── */
.top:has(.notifiche-pop:not([hidden])) { z-index: 60 !important; }
.ad-card .ad-apri { cursor: pointer; }
.notifiche-pop { background: rgba(255,255,255,.985) !important; }

/* ── 71. (01/11/2026) i riquadri a lato della chat più in stile Apple e un po' più grandi ──
   Vetro bianco con sfocatura, filo sottilissimo, ombra morbida; in testa l'icona in un quadratino
   colorato (come le Impostazioni di macOS), il titolo e il numero in grigio; dentro, le schede grigio
   chiaro senza bordo (come i gruppi di iOS) che al passaggio si scuriscono appena. */
.lc-lato { gap: 14px; }
.lc-lato .ad-lato {
  border-radius: 18px !important; border: .5px solid rgba(0,0,0,.08) !important;
  background: rgba(255,255,255,.88) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 1px 1px rgba(0,0,0,.02), 0 10px 32px rgba(0,0,0,.07) !important;
}
.lc-lato .ad-lato-testa { gap: 11px; padding: 14px 16px 14px 14px; border-radius: 18px; }
.lc-lato .ad-lato-testa:hover { background: rgba(0,0,0,.025); }
.lc-tile { width: 28px; height: 28px; flex-shrink: 0; display: grid; place-items: center; border-radius: 8px; color: #fff; }
.lc-tile svg { width: 16px !important; height: 16px !important; color: #fff !important; }
.lc-tile-all { background: linear-gradient(180deg, #5ac8fa, #2f9bea); }
.lc-tile-fon { background: linear-gradient(180deg, #69c6a1, #3e9d77); }
.lc-lato .ad-lato-t { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.lc-lato .ad-lato-testa .ad-n { background: none; color: var(--faint); font-size: 13px; font-weight: 500; min-width: 0; padding: 0; }
.lc-lato .ad-lato-testa .ad-freccia { width: 16px; height: 16px; color: var(--faint); }
.lc-lato .ad-lato-corpo { padding: 4px 12px 14px; border-top: .5px solid rgba(60,60,67,.12); padding-top: 12px; }
.lc-lato .ad-griglia { gap: 10px; }
.lc-lato .ad-card {
  min-height: 118px; padding: 12px; gap: 8px; border: none !important; border-radius: 13px;
  background: #f4f4f6 !important; box-shadow: none !important;
  transition: background .18s ease, transform .25s cubic-bezier(.32,.72,0,1);
}
.lc-lato .ad-card.si-legge:hover { background: #ebebef !important; transform: translateY(-1px); box-shadow: none !important; }
.lc-lato .ad-card.scaduto { background: #f8f8f9 !important; }
.lc-lato .ad-ic { padding: 2px 8px; border-radius: 6px; font-size: 10.5px; }
.lc-lato .ad-nome { font-size: 13.5px; font-weight: 600; letter-spacing: -.005em; }
.lc-lato .ad-peso { font-size: 12px; }
.lc-lato .ad-apri { font-size: 13px; padding: 3px 9px; border-radius: 8px; }
.lc-lato .ad-apri:hover { background: rgba(6,60,38,.08); }
.lc-lato .lc-gruppo-t { padding: 6px 6px 8px; font-size: 13px; color: var(--muted); }
.lc-lato .lc-gruppo-t .ad-n { background: none; color: var(--faint); padding: 0 2px; }
.lc-lato .lc-tutte { font-size: 13px; margin-top: 10px; }
.lc-lato .ad-lato { background: #fff !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.lc-lato { overflow-y: visible; }
/* (01/11/2026) le icone delle testate come le Impostazioni di macOS (simbolo bianco pieno, quadratino con
   la sfumatura, il riflesso in alto e un'ombra), e più aria fra la domanda e le sue fonti */
.lc-tile {
  width: 30px; height: 30px; border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), inset 0 -1px 0 rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.14);
}
.lc-tile svg { width: 18px !important; height: 18px !important; }
.lc-tile-all { background: linear-gradient(180deg, #6ccdfb 0%, #1a8cf0 100%); }
.lc-tile-fon { background: linear-gradient(180deg, #6cc9a4 0%, #31986f 100%); }
.lc-lato .lc-gruppo-t { margin-bottom: 10px; }
.lc-lato .lc-gruppo .ad-griglia { margin-top: 0; }
.lc-lato .lc-gruppo + .lc-gruppo { margin-top: 16px; padding-top: 14px; }

/* 72 · 01/11/2026 (Andrea): le fonti consultate PRIMA delle domande dell'AI, e sotto le fonti una linea di
   separazione. La linea e' delle fonti (c'e' anche senza domande); la domanda subito sotto non ne aggiunge un'altra. */
.msg-ai .extra > .fonti { position: relative; margin-bottom: 20px; }
.msg-ai .extra > .fonti::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -21px; height: 0;
  border-top: 1px solid var(--line); pointer-events: none;
}
.msg-ai .extra > .fonti + .ask { margin-top: 20px; padding-top: 18px; border-top: 0; }

/* 73 · 01/11/2026 (Andrea): la versione nella Redazione non e' piu' il menu a tendina del sistema ma una
   pillola leggera con il menu in stile Apple (static/versione-doc.js). */
.rd-strumenti select.rd-versione.vd-nascosto { display: none !important; }
.vd-pill {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 8px 0 11px;
  border: none; border-radius: 9px; background: transparent; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap;
  transition: background .15s ease;
}
.vd-pill:hover, .vd-pill[aria-expanded="true"] { background: rgba(0,0,0,.055); }
.vd-pill:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.vd-pill .vd-att {
  padding: 2px 7px; border-radius: 6px; background: rgba(52,129,98,.12); color: var(--accent-dark, #337359);
  font-size: 11.5px; font-weight: 600; letter-spacing: .01em;
}
.vd-pill .vd-giu { font-size: 18px !important; color: var(--faint); margin-left: -2px; }
.vd-menu { width: 240px; }
.vd-menu .vd-titolo { margin: 4px 10px 6px; font-size: 12px; font-weight: 600; color: var(--muted); }


/* ── 74. «Liquid Glass» sulle barre e sui pulsanti (01/11/2026) ──────────────────────────────────────
   Richiesta: «applica questo effetto expo-glass-effect alle barre e i bottoni». expo-glass-effect e' il
   vetro di iOS 26 (UIGlassEffect): piu' trasparente del vetro smerigliato di prima, il bordo che prende la
   luce (un filo bianco in alto, un riflesso in diagonale, un alone chiaro dentro il bordo) e il contenuto
   che passa SOTTO. Qui:
   - le barre: il campo dei prompt (la conversazione gli scorre sotto), l'intestazione (l'effetto «bordo
     che sfuma» di iOS 26: niente lastra, il testo si sfoca passando sotto), la barra laterale, le due
     barre sopra il foglio della Redazione (il foglio gli scorre sotto), i campi della Redazione e del Vaglio;
   - i pulsanti: verdi pieni → vetro tinto di verde, SENZA il bagliore intorno bocciato il 30/10; a
     contorno verde (le risposte da toccare, Accedi, Scarica) e grigi → vetro chiaro; i tasti in cima
     (menu, Temporanea, campanella) → capsule di vetro.
   I tasti DENTRO una barra di vetro (+, microfono, invio, «Rapida», «Versione», Word/PDF) restano come
   erano: un vetro sopra un vetro non si legge. Le misure (--lg-top, --lg-dock, --lg-rd) le scrive
   static/vetro-barre.js. Vale solo per la configurazione 1: la 2 («macOS nativo») e' senza vetro. */
:root {
  --lg-sfoca: blur(26px) saturate(180%);
  --lg-riflesso: linear-gradient(135deg, rgba(255,255,255,.58) 0%, rgba(255,255,255,.12) 36%, rgba(255,255,255,.03) 62%, rgba(255,255,255,.34) 100%);
  --lg-luce: inset 0 1px 0 rgba(255,255,255,.95), inset 0 -1px 0 rgba(255,255,255,.35),
             inset 1px 0 0 rgba(255,255,255,.45), inset -1px 0 0 rgba(255,255,255,.45), inset 0 0 18px rgba(255,255,255,.38);
  --lg-ombra: 0 0 0 .5px rgba(60,60,67,.10), 0 1px 2px rgba(0,0,0,.04), 0 12px 34px -8px rgba(22,38,32,.16);
  --lg-orlo: rgba(255,255,255,.75);
}

/* il campo dei prompt: una capsula di vetro, e la conversazione le passa sotto */
.composer, .main.vuota .composer, .composer.sq, .main .composer.sq, .main.vuota .composer.sq,
.main.vuota .composer.sq:hover, .main.vuota .composer:hover, .composer.sq.multiriga {
  background: var(--lg-riflesso) rgba(255,255,255,.42) !important;
  -webkit-backdrop-filter: var(--lg-sfoca) !important; backdrop-filter: var(--lg-sfoca) !important;
  border: 1px solid var(--lg-orlo) !important;
  box-shadow: var(--lg-luce), var(--lg-ombra) !important;
}
.composer:focus-within, .main.vuota .composer:focus-within, .composer.sq:focus-within, .main .composer.sq:focus-within,
.main.vuota .composer.sq:focus-within, .composer.sq.multiriga:focus-within {
  background: var(--lg-riflesso) rgba(255,255,255,.60) !important;
  border-color: rgba(255,255,255,.92) !important;
  box-shadow: var(--lg-luce), 0 0 0 .5px rgba(60,60,67,.14), 0 1px 2px rgba(0,0,0,.05), 0 16px 40px -8px rgba(22,38,32,.20) !important;
}
.main:not(.vuota) > .scroll {
  margin-top: calc(-1 * var(--lg-top, 0px)); padding-top: var(--lg-top, 0px);
  padding-bottom: var(--lg-dock, 0px);
}
.main:not(.vuota) > .dock {
  position: relative; z-index: 6;
  margin-top: calc(-1 * var(--lg-dock, 0px));
  /* trasparente fin sotto la capsula (il testo ci passa dietro), pieno sotto, dove sta la nota */
  /* e dal basso il testo sfuma prima di arrivare al bordo della capsula: la sfocatura di Chrome lascia nitido quel che taglia il bordo */
  background: linear-gradient(to bottom, rgba(251,251,252,0) calc(var(--lg-dock, 0px) - 46px), rgba(251,251,252,.86) calc(var(--lg-dock, 0px) - 8px), var(--bg) var(--lg-dock, 0px)) !important;
}

/* l'intestazione: niente lastra; il «bordo che sfuma» di iOS 26 — quel che passa sotto si sfoca e si schiarisce */
.main:not(.vuota) > .top { background: transparent !important; border-bottom: none !important; }
.main:not(.vuota) > .top::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; bottom: -28px; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(251,251,252,.94) 0%, rgba(251,251,252,.6) 45%, rgba(251,251,252,0) 100%);
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 44px), transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 44px), transparent 100%);
}
/* i tasti in cima: capsule di vetro */
.top .btn-icon, .top .btn-temporanea {
  background: var(--lg-riflesso) rgba(255,255,255,.50) !important;
  -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%);
  border: 1px solid rgba(255,255,255,.8) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), inset 0 -1px 0 rgba(255,255,255,.3), 0 0 0 .5px rgba(60,60,67,.09), 0 2px 8px rgba(22,38,32,.06) !important;
  color: var(--ink-2) !important; border-radius: 999px !important;
  transition: background .2s ease, transform .25s var(--molla), box-shadow .2s ease !important;
}
.top .btn-icon:hover:not(:disabled), .top .btn-temporanea:hover { background: var(--lg-riflesso) rgba(255,255,255,.78) !important; }
.top .btn-icon:active, .top .btn-temporanea:active { transform: scale(.94) !important; }

/* la barra laterale */
.rail {
  background: var(--lg-riflesso) rgba(255,255,255,.44) !important;
  -webkit-backdrop-filter: var(--lg-sfoca) !important; backdrop-filter: var(--lg-sfoca) !important;
  border: 1px solid var(--lg-orlo) !important;
  box-shadow: var(--lg-luce), 0 0 0 .5px rgba(60,60,67,.08), 0 14px 40px -10px rgba(22,38,32,.14) !important;
}

/* la Redazione: le due barre sopra il foglio sono una lastra di vetro, e il foglio ci scorre sotto */
.rd-doc > .rd-doc-testa, .rd-doc > .rd-strumenti {
  position: relative; z-index: 3;
  background: rgba(255,255,255,.64) !important;
  -webkit-backdrop-filter: var(--lg-sfoca); backdrop-filter: var(--lg-sfoca);
  border-bottom: none !important;
}
.rd-doc > .rd-doc-testa { box-shadow: inset 0 1px 0 rgba(255,255,255,.9); }
.rd-doc > .rd-strumenti { box-shadow: inset 0 -1px 0 rgba(255,255,255,.75), 0 .5px 0 rgba(60,60,67,.10), 0 10px 28px -14px rgba(22,38,32,.14) !important; }
.rd-doc > .rd-tavolo { margin-top: calc(-1 * var(--lg-rd, 0px)); padding-top: calc(24px + var(--lg-rd, 0px)) !important; }
/* in fondo alla barra un velo del colore del tavolo: il foglio sfuma prima del bordo, invece di tagliarlo netto */
.rd-doc > .rd-strumenti::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 26px; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(242,242,245,0), rgba(242,242,245,.8));
}
/* i campi della Redazione e del Vaglio, come il campo dei prompt */
.foglio-nuovo.rd-campo, .rd-campo, .tv-campo textarea, .rd-chiedi-campo {
  background: var(--lg-riflesso) rgba(255,255,255,.46) !important;
  -webkit-backdrop-filter: var(--lg-sfoca) !important; backdrop-filter: var(--lg-sfoca) !important;
  border: 1px solid var(--lg-orlo) !important;
  box-shadow: var(--lg-luce), var(--lg-ombra) !important;
}
.foglio-nuovo.rd-campo:focus-within, .rd-campo:focus-within, .tv-campo textarea:focus, .rd-chiedi-campo:focus-within {
  background: var(--lg-riflesso) rgba(255,255,255,.64) !important;
  border-color: rgba(255,255,255,.92) !important;
  box-shadow: var(--lg-luce), 0 0 0 .5px rgba(60,60,67,.14), 0 1px 2px rgba(0,0,0,.05), 0 16px 40px -8px rgba(22,38,32,.20) !important;
}

/* ── i pulsanti ── */
/* grigi: vetro chiaro */
.btn-secondo, .btn-indietro, .btn-tondo, .rd-ferma {
  background: var(--lg-riflesso) rgba(255,255,255,.48) !important;
  -webkit-backdrop-filter: blur(18px) saturate(170%) !important; backdrop-filter: blur(18px) saturate(170%) !important;
  border: 1px solid rgba(255,255,255,.8) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), inset 0 -1px 0 rgba(255,255,255,.3), 0 0 0 .5px rgba(60,60,67,.10), 0 2px 8px rgba(22,38,32,.06) !important;
  color: var(--ink-2);
  transition: background .2s ease, transform .25s var(--molla), box-shadow .2s ease !important;
}
.btn-secondo:hover, .btn-indietro:hover, .btn-tondo:hover, .rd-ferma:hover { background: var(--lg-riflesso) rgba(255,255,255,.78) !important; }
.btn-secondo:active, .btn-indietro:active, .btn-tondo:active, .rd-ferma:active { transform: scale(.96) !important; }
/* a contorno verde (le risposte da toccare, Accedi, Scarica, Pro): vetro chiaro col filo verde */
.top-accedi, .opt, .atto-dl, .link-out, .btn-pro {
  background: var(--lg-riflesso) rgba(255,255,255,.48) !important;
  -webkit-backdrop-filter: blur(18px) saturate(170%) !important; backdrop-filter: blur(18px) saturate(170%) !important;
  border: 1px solid rgba(52,129,98,.6) !important;
  color: var(--accent-dark) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), inset 0 -1px 0 rgba(255,255,255,.3), inset 0 0 12px rgba(255,255,255,.35),
              0 1px 2px rgba(0,0,0,.03), 0 6px 16px -8px rgba(49,131,98,.22) !important;
  transition: background .2s ease, transform .25s var(--molla), box-shadow .2s ease !important;
}
.top-accedi:hover, .opt:hover, .atto-dl:hover, .link-out:hover, .btn-pro:hover {
  background: var(--lg-riflesso) rgba(238,247,243,.86) !important; border-color: var(--accent-ink) !important; transform: none !important;
}
.top-accedi:active, .opt:active, .atto-dl:active, .link-out:active, .btn-pro:active { transform: scale(.96) !important; }
.opt.scelta { background: var(--lg-riflesso) rgba(52,129,98,.16) !important; border-color: var(--accent-ink) !important; }
/* verdi pieni: vetro tinto di verde — un filo di luce in alto e un'ombra corta, niente bagliore intorno */
.btn-primo, .btn-pieno, .btn-piano, .novita-primario, .consenso-si, .spiega-si,
.doc-correggi-az .btn-pri, .uso-cta, .pop.pop-set .uso-cta, .popup-domande .pd-invia {
  background: linear-gradient(180deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.03) 48%, rgba(255,255,255,0) 100%) rgba(52,129,98,.88) !important;
  -webkit-backdrop-filter: blur(16px) saturate(160%) !important; backdrop-filter: blur(16px) saturate(160%) !important;
  border: 1px solid rgba(255,255,255,.38) !important;
  color: #fff !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -1px 0 rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.06), 0 8px 18px -8px rgba(49,131,98,.45) !important;
  transition: background .2s ease, transform .25s var(--molla), box-shadow .2s ease !important;
}
.btn-primo:hover, .btn-pieno:hover:not(:disabled), .btn-piano:hover, .novita-primario:hover, .consenso-si:hover, .spiega-si:hover,
.doc-correggi-az .btn-pri:hover, .uso-cta:hover, .popup-domande .pd-invia:hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(255,255,255,.18) 0%, rgba(255,255,255,.04) 48%, rgba(255,255,255,0) 100%) rgba(70,156,122,.95) !important;
  transform: none !important;
}
.btn-primo:active, .btn-pieno:active, .btn-piano:active, .novita-primario:active, .consenso-si:active, .popup-domande .pd-invia:active { transform: scale(.96) !important; }
.btn-primo:disabled, .btn-pieno:disabled, .popup-domande .pd-invia:disabled { opacity: .5; transform: none !important; }

/* senza sfocatura (browser vecchi) o con «riduci trasparenza»: superfici piene, stesso disegno */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .composer, .main.vuota .composer, .composer.sq, .main .composer.sq, .main.vuota .composer.sq, .composer.sq.multiriga,
  .rail, .rd-doc > .rd-doc-testa, .rd-doc > .rd-strumenti, .foglio-nuovo.rd-campo, .rd-campo, .tv-campo textarea, .rd-chiedi-campo,
  .btn-secondo, .btn-indietro, .btn-tondo, .rd-ferma, .top-accedi, .opt, .atto-dl, .link-out, .btn-pro, .top .btn-icon, .top .btn-temporanea {
    background: rgba(255,255,255,.96) !important;
  }
  .main:not(.vuota) > .top::before { background: rgba(251,251,252,.96); }
  .btn-primo, .btn-pieno, .btn-piano, .novita-primario, .consenso-si, .spiega-si, .doc-correggi-az .btn-pri, .uso-cta, .popup-domande .pd-invia {
    background: var(--accent) !important;
  }
}
@media (prefers-reduced-transparency: reduce) {
  .composer, .main.vuota .composer, .composer.sq, .main .composer.sq, .main.vuota .composer.sq, .composer.sq.multiriga,
  .rail, .rd-doc > .rd-doc-testa, .rd-doc > .rd-strumenti, .foglio-nuovo.rd-campo, .rd-campo, .tv-campo textarea, .rd-chiedi-campo,
  .btn-secondo, .btn-indietro, .btn-tondo, .rd-ferma, .top-accedi, .opt, .atto-dl, .link-out, .btn-pro, .top .btn-icon, .top .btn-temporanea {
    background: rgba(255,255,255,.96) !important;
    -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  }
  .main:not(.vuota) > .top::before { background: rgba(251,251,252,.96); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .btn-primo, .btn-pieno, .btn-piano, .novita-primario, .consenso-si, .spiega-si, .doc-correggi-az .btn-pri, .uso-cta, .popup-domande .pd-invia {
    background: var(--accent) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  }
}


/* 75 · 01/11/2026 (Andrea): il «+» della barra apre una tendina — Carica dal computer, Da un fascicolo,
   Da un'altra chat (static/piu-menu.js). Lo stesso menu della risposta (.risp-menu), un po' piu' largo,
   con le liste che scorrono dentro. */
.pm-menu { width: 330px; transform-origin: bottom left; }
.pm-menu.sotto { transform-origin: top left; }
.pm-voce { gap: 11px; }
.pm-voce .pm-ic {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: rgba(118,118,128,.10); color: var(--ink-2); font-size: 18px !important;
}
.pm-voce .risp-voce-t b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-voce .risp-voce-t small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-pro {
  flex-shrink: 0; padding: 2px 7px; border-radius: 6px; background: rgba(52,129,98,.12);
  color: var(--accent-dark, #337359); font-size: 11.5px; font-weight: 600;
}
.pm-lista { max-height: min(330px, 52vh); overflow-y: auto; overscroll-behavior: contain; margin: 0 -2px; padding: 0 2px; }
.pm-gruppo { margin: 8px 10px 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.pm-nota { margin: 10px 12px; font-size: 13px; line-height: 1.4; color: var(--muted); }
/* i documenti del fascicolo: si spuntano */
.pm-doc .pm-casella {
  flex-shrink: 0; width: 20px; height: 20px; border-radius: 999px; box-sizing: border-box;
  border: 1.5px solid rgba(60,60,67,.32); background: #fff; position: relative;
  transition: background .15s ease, border-color .15s ease;
}
.pm-doc.on .pm-casella, .pm-doc.dentro .pm-casella { background: var(--accent); border-color: var(--accent); }
.pm-doc.on .pm-casella::after, .pm-doc.dentro .pm-casella::after {
  content: ""; position: absolute; left: 6px; top: 2.5px; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.pm-doc.dentro { opacity: .55; cursor: default; }
.pm-doc.dentro:hover { background: transparent; }
.pm-piede { padding: 8px 4px 2px; border-top: 1px solid rgba(60,60,67,.10); margin-top: 6px; }
.pm-allega {
  width: 100%; height: 36px; border: none; border-radius: 10px; cursor: pointer;
  background: var(--accent); color: #fff; font: inherit; font-size: 14px; font-weight: 600;
  transition: background .15s ease, transform .2s var(--molla);
}
.pm-allega:hover:not(:disabled) { background: #2c7055; }
.pm-allega:active:not(:disabled) { transform: scale(.98); }
.pm-allega:disabled { background: rgba(118,118,128,.16); color: var(--muted); cursor: default; }
.pm-allega:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* la ricerca delle chat */
.pm-cerca {
  display: flex; align-items: center; gap: 6px; margin: 2px 4px 6px; padding: 0 10px; height: 34px;
  border-radius: 9px; background: rgba(118,118,128,.10);
}
.pm-cerca .material-symbols-outlined { font-size: 18px; color: var(--faint); }
.pm-cerca input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font: inherit; font-size: 14px; color: var(--ink); }
.pm-cerca input::-webkit-search-cancel-button { cursor: pointer; }
/* il «+» col menu aperto */
#btn-attach.pm-aperto { background: rgba(118,118,128,.14) !important; }
#btn-attach.pm-aperto .material-symbols-outlined { transform: rotate(45deg); }
#btn-attach .material-symbols-outlined { transition: transform .2s var(--molla); }
/* la scheda di una chat portata qui: il fumetto in verde */
.chip.g-chat .chip-ic { background: rgba(52,129,98,.12) !important; color: var(--accent-dark, #337359) !important; }


/* ── 76. La revisione delle fonti, chiara (01/11/2026, static/revisione-chiara.js) ─────────────────────
   Andrea: «le etichette (verdi, gialle e rosse) non sono molto comprensibili … il problema principale e' la
   chiarezza». Ogni etichetta comincia con una parola fissa per colore (Verificato / Da controllare / Non
   citare / Niente da verificare) e il perché; cliccata, apre una scheda in tre parti (che cosa ho
   controllato, che cosa ho trovato, che cosa fare). In fondo alla risposta il riepilogo e «Come leggerla». */
.msg-ai .rev-bolla { align-items: center; margin-top: -2px; }
.msg-ai .bolla-esito.rev-pill {
  gap: 6px; padding: 4px 8px 4px 8px; font-size: 12.5px; line-height: 1.45; border-radius: 14px;
  max-width: 100%; transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.msg-ai .bolla-esito.rev-pill .material-symbols-outlined { font-size: 16px; }
.msg-ai .bolla-esito.rev-pill > .material-symbols-outlined:last-child { font-size: 17px; opacity: .6; margin-left: -2px; transition: transform .2s var(--molla); }
.msg-ai .bolla-esito.rev-pill.aperta > .material-symbols-outlined:last-child { transform: rotate(180deg); }
.msg-ai .bolla-esito.rev-pill .rev-pill-t { min-width: 0; }
.msg-ai .bolla-esito.rev-pill b { font-weight: 650; }
.msg-ai .bolla-esito.rev-pill .rev-perche { font-weight: 450; opacity: .9; }
.bolla-esito.ok  { color: #26644b !important; background: #eaf5f1 !important; border-color: rgba(38,100,75,.22) !important; }
.bolla-esito.par { color: #8a5a00 !important; background: #fff5dc !important; border-color: rgba(176,122,0,.26) !important; }
.bolla-esito.ko  { color: #b3261e !important; background: #fdecea !important; border-color: rgba(179,38,30,.26) !important; }
.bolla-esito.neu { color: var(--muted) !important; background: rgba(118,118,128,.10) !important; border-color: rgba(60,60,67,.14) !important; }
.msg-ai .bolla-esito.rev-pill:hover { filter: none; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.msg-ai .bolla-esito.rev-pill.aperta.ok  { background: #e1efe9 !important; }
.msg-ai .bolla-esito.rev-pill.aperta.par { background: #ffefc6 !important; }
.msg-ai .bolla-esito.rev-pill.aperta.ko  { background: #fbe0dd !important; }
.msg-ai .bolla-esito.rev-pill:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@keyframes revLampo { 0%, 100% { box-shadow: 0 0 0 0 rgba(52,129,98,0); } 30% { box-shadow: 0 0 0 5px rgba(52,129,98,.35); } }
.msg-ai .bolla-esito.rev-lampo { animation: revLampo 1.1s ease 1; }
/* su uno schermo stretto resta la parola, il perché sta nella scheda */
@media (max-width: 560px) { .msg-ai .bolla-esito.rev-pill .rev-perche { display: none; } }

/* la scheda: tre parti, col filo del colore a sinistra */
.msg-ai .rev-scheda {
  flex-basis: 100%; margin: 6px 0 4px; padding: 12px 14px 12px 16px;
  background: #fff; border: 1px solid rgba(60,60,67,.12); border-left-width: 3px; border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04), 0 6px 18px -8px rgba(22,38,32,.12);
  font-size: 13px; line-height: 1.55; color: var(--ink-2);
}
.msg-ai .rev-scheda.ok  { border-left-color: #399470; }
.msg-ai .rev-scheda.par { border-left-color: #e0a300; }
.msg-ai .rev-scheda.ko  { border-left-color: #d6453b; }
.msg-ai .rev-scheda.neu { border-left-color: rgba(60,60,67,.3); }
.msg-ai .rev-scheda .rev-sez + .rev-sez { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(60,60,67,.08); }
.msg-ai .rev-scheda p { margin: 0; }
.msg-ai .rev-scheda .rev-k { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); margin-bottom: 3px; }
.msg-ai .rev-scheda .rev-da { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.msg-ai .rev-scheda .rev-passo {
  margin: 0; padding: 8px 12px; border-left: 2px solid rgba(60,60,67,.18); background: rgba(118,118,128,.07);
  border-radius: 0 8px 8px 0; font-style: italic; color: var(--ink-2); line-height: 1.6;
}
.msg-ai .rev-scheda.ipotesi .rev-passo { white-space: pre-line; }
.msg-ai .rev-scheda .rev-vuoto { color: var(--muted); font-style: italic; }
.msg-ai .rev-scheda .rev-fare p b { color: var(--ink); font-weight: 650; }
.msg-ai .rev-scheda.ok .rev-fare p b { color: #26644b; }
.msg-ai .rev-scheda.par .rev-fare p b { color: #8a5a00; }
.msg-ai .rev-scheda.ko .rev-fare p b { color: #b3261e; }
.msg-ai .rev-azioni { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.msg-ai .rev-az {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px 0 9px;
  border: 1px solid rgba(60,60,67,.16); border-radius: 9px; background: #fff; cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 550; color: var(--ink); transition: background .15s ease, transform .2s var(--molla);
}
.msg-ai .rev-az .material-symbols-outlined { font-size: 16px; color: var(--accent-dark, #337359); }
.msg-ai .rev-az:hover { background: rgba(0,0,0,.04); }
.msg-ai .rev-az:active { transform: scale(.97); }

/* il riepilogo in fondo alla risposta */
.msg-ai .rev-riepilogo {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 16px 0 4px; padding: 9px 12px;
  border: 1px solid rgba(60,60,67,.10); border-radius: 12px; background: rgba(118,118,128,.06); font-size: 12.5px; color: var(--ink-2);
}
.msg-ai .rev-riepilogo .rev-rt { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: var(--ink); margin-right: 2px; }
.msg-ai .rev-riepilogo .rev-rt .material-symbols-outlined { font-size: 17px; color: var(--accent-dark, #337359); }
.msg-ai .rev-conta {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; background: #fff; font: inherit; font-size: 12.5px; font-weight: 550; color: var(--ink);
  transition: box-shadow .15s ease;
}
.msg-ai .rev-conta i { width: 9px; height: 9px; border-radius: 999px; background: currentColor; }
.msg-ai .rev-conta.ok  { color: #26644b; border-color: rgba(38,100,75,.22); }
.msg-ai .rev-conta.par { color: #8a5a00; border-color: rgba(176,122,0,.26); }
.msg-ai .rev-conta.ko  { color: #b3261e; border-color: rgba(179,38,30,.26); }
.msg-ai .rev-conta.neu { color: var(--muted); border-color: rgba(60,60,67,.16); }
.msg-ai .rev-conta:hover { box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.msg-ai .rev-legenda {
  margin-left: auto; border: none; background: none; padding: 3px 4px; cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--accent-dark, #337359); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(51,115,89,.4);
}
.msg-ai .rev-legenda:hover { text-decoration-color: currentColor; }
.msg-ai .rev-conti { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px 8px; }

/* la legenda */
.rev-spiega { max-width: 520px; }
.rev-legs { list-style: none; margin: 4px 0 12px; padding: 0; display: grid; gap: 8px; }
.rev-leg { display: grid; grid-template-columns: 170px 1fr; gap: 12px; align-items: start; padding: 8px 10px; border-radius: 10px; background: rgba(118,118,128,.06); }
.rev-leg p { margin: 0; font-size: 13px; line-height: 1.5; }
.rev-leg .bolla-esito.statica { cursor: default; justify-self: start; padding: 4px 10px 4px 8px; font-size: 12.5px; gap: 6px; }
.rev-leg .bolla-esito.statica .material-symbols-outlined { font-size: 16px; }
.rev-leg .bolla-esito.statica b { font-weight: 650; }
@media (max-width: 560px) { .rev-leg { grid-template-columns: 1fr; gap: 6px; } }


/* ── 77. I pezzi da controllare si vedono (01/11/2026, Andrea: «riportarlo al passaggio in questione … fargli capire che
   deve controllare quei pezzi di testo»). Nel paragrafo: la frase, il numero o la data sottolineati nel colore
   dell'etichetta. Nella fonte aperta: il passaggio evidenziato, scorso in vista, e una fascia in cima che dice che
   cosa confrontare (static/revisione-chiara.js). */
.msg-ai .rev-pezzo, .rev-leg .rev-pezzo {
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-skip-ink: none;
  border-radius: 3px; padding: 0 1px; margin: 0 -1px; cursor: help;
}
.msg-ai .rev-pezzo.ok,  .rev-leg .rev-pezzo.ok  { text-decoration-color: #399470; background: rgba(57,148,112,.10); }
.msg-ai .rev-pezzo.par, .rev-leg .rev-pezzo.par { text-decoration-color: #e0a300; background: rgba(224,163,0,.14); }
.msg-ai .rev-pezzo.ko,  .rev-leg .rev-pezzo.ko  { text-decoration-color: #d6453b; background: rgba(214,69,59,.12); }
/* nel passaggio della scheda e nella fonte aperta */
mark.rev-evid { color: inherit; padding: 1px 0; border-radius: 3px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
mark.rev-evid.ok  { background: rgba(57,148,112,.22); box-shadow: 0 0 0 2px rgba(57,148,112,.22); }
mark.rev-evid.par { background: rgba(224,163,0,.28); box-shadow: 0 0 0 2px rgba(224,163,0,.28); }
mark.rev-evid.ko  { background: rgba(214,69,59,.20); box-shadow: 0 0 0 2px rgba(214,69,59,.20); }
.drawer-body .rev-dr-passo { position: relative; }
.drawer-body .rev-dr-passo::before {
  content: ""; position: absolute; left: -12px; top: 0; bottom: 0; width: 3px; border-radius: 3px; background: #e0a300;
}
.drawer-body .rev-dr-passo.ok::before { background: #399470; }
.drawer-body .rev-dr-passo.ko::before { background: #d6453b; }
/* la fascia in cima alla fonte: resta in vista mentre si scorre */
.drawer-body .rev-dr-fascia {
  position: sticky; top: -20px; z-index: 4; margin: -20px -22px 16px; padding: 10px 14px 10px 16px;
  display: flex; align-items: flex-start; gap: 9px; font-size: 13px; line-height: 1.45; color: var(--ink);
  background: rgba(255,255,255,.9); -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid rgba(60,60,67,.10); box-shadow: 0 6px 18px -12px rgba(0,0,0,.18);
}
.drawer-body .rev-dr-fascia > .material-symbols-outlined { font-size: 19px; flex-shrink: 0; margin-top: 1px; }
.drawer-body .rev-dr-fascia.ok  > .material-symbols-outlined, .drawer-body .rev-dr-fascia.ok  b { color: #26644b; }
.drawer-body .rev-dr-fascia.par > .material-symbols-outlined, .drawer-body .rev-dr-fascia.par b { color: #8a5a00; }
.drawer-body .rev-dr-fascia.ko  > .material-symbols-outlined, .drawer-body .rev-dr-fascia.ko  b { color: #b3261e; }
.drawer-body .rev-dr-fascia.ok  { background: linear-gradient(rgba(57,148,112,.10), rgba(57,148,112,.10)), rgba(255,255,255,.92); }
.drawer-body .rev-dr-fascia.par { background: linear-gradient(rgba(224,163,0,.12), rgba(224,163,0,.12)), rgba(255,255,255,.92); }
.drawer-body .rev-dr-fascia.ko  { background: linear-gradient(rgba(214,69,59,.10), rgba(214,69,59,.10)), rgba(255,255,255,.92); }
.drawer-body .rev-dr-fascia .rev-dr-t { flex: 1; min-width: 0; }
.drawer-body .rev-dr-fascia .rev-dr-t b { font-weight: 650; }
.drawer-body .rev-dr-vai {
  flex-shrink: 0; height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid rgba(60,60,67,.16); background: #fff;
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink); cursor: pointer;
}
.drawer-body .rev-dr-vai:hover { background: rgba(0,0,0,.04); }
.drawer-body .rev-dr-x {
  flex-shrink: 0; width: 28px; height: 28px; border: none; border-radius: 8px; background: transparent; color: var(--faint); cursor: pointer;
  display: grid; place-items: center;
}
.drawer-body .rev-dr-x:hover { background: rgba(0,0,0,.05); color: var(--ink); }
.drawer-body .rev-dr-x .material-symbols-outlined { font-size: 18px; }


/* ── 78. La colonna a lato, rifatta (01/11/2026, Andrea: «quando li apro non mi piacciono, mi sembrano poco chiari»).
   Riquadri a righe compatte invece delle mattonelle: Fonti per tipo (Norme / Sentenze / Altre) col pallino sulle
   citate, Allegati con Apri · Scarica · Usa di nuovo, e i riquadri nuovi: Da controllare (la lista delle etichette
   gialle e rosse con la casella «fatto»), Scadenze, Appunti, Fascicolo, Documenti redatti (static/lato-chat.js). */
.lc-lato .lc-tile-rev { background: linear-gradient(180deg, #ffb340, #ff9500); }
.lc-lato .lc-tile-sca { background: linear-gradient(180deg, #ff6961, #ff3b30); }
.lc-lato .lc-tile-app { background: linear-gradient(180deg, #ffd60a, #f5c400); }
.lc-lato .lc-tile-fas { background: linear-gradient(180deg, #8e8e93, #636366); }
.lc-lato .lc-tile-doc { background: linear-gradient(180deg, #bf5af2, #af52de); }
.lc-lato .lc-tile svg { width: 17px; height: 17px; }
.lc-lato .ad-lato-testa .ad-n.lc-n-ko { background: rgba(214,69,59,.14); color: #b3261e; }
.lc-lato .ad-lato-testa .ad-n.lc-n-par { background: rgba(224,163,0,.18); color: #8a5a00; }
.lc-lato .ad-lato-testa .ad-n.lc-n-ok { background: rgba(57,148,112,.14); color: #26644b; }
/* le righe */
.lc-righe { display: flex; flex-direction: column; }
.lc-r {
  display: flex; align-items: flex-start; gap: 9px; width: 100%; padding: 7px 6px; border: none; border-radius: 9px;
  background: transparent; text-align: left; font: inherit; color: var(--ink); cursor: pointer; position: relative;
  transition: background .15s ease;
}
.lc-r:hover { background: rgba(0,0,0,.04); }
.lc-r:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.lc-r.statica { cursor: default; }
.lc-r.statica:hover { background: transparent; }
.lc-r .lc-ri { flex-shrink: 0; width: 22px; height: 22px; display: grid; place-items: center; color: var(--accent-dark, #337359); margin-top: 1px; }
.lc-r .lc-ri .material-symbols-outlined { font-size: 18px; }
.lc-r .lc-ri.pdf { color: #d70015; } .lc-r .lc-ri.word { color: #1a5fb4; } .lc-r .lc-ri.img { color: #8e44ad; }
.lc-r .lc-rt { flex: 1; min-width: 0; }
.lc-r .lc-rt b { display: block; font-size: 13px; font-weight: 550; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-r .lc-rt small { display: block; margin-top: 1px; font-size: 11.5px; line-height: 1.35; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-r .lc-rt b.lc-due { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.lc-lato .lc-cit { flex-shrink: 0; width: 8px; height: 8px; border-radius: 999px; background: var(--accent); margin-top: 7px; display: inline-block; }
.lc-r .lc-chev { flex-shrink: 0; color: var(--faint); font-size: 18px !important; margin-top: 2px; opacity: 0; transition: opacity .15s ease; }
.lc-r:hover .lc-chev { opacity: 1; }
/* i titoli dei gruppi (Norme · 14) */
.lc-gt {
  display: flex; align-items: center; gap: 6px; width: 100%; margin: 6px 0 2px; padding: 4px 6px; border: none; background: none;
  font: inherit; font-size: 11px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); cursor: pointer; border-radius: 7px;
}
.lc-gt:hover { background: rgba(0,0,0,.04); }
.lc-gt .lc-gn { font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--faint); }
.lc-gt .material-symbols-outlined { margin-left: auto; font-size: 17px; color: var(--faint); transition: transform .2s var(--molla); text-transform: none; letter-spacing: 0; }
.lc-gt[aria-expanded="false"] .material-symbols-outlined { transform: rotate(-90deg); }
.lc-altre {
  display: inline-flex; align-items: center; gap: 4px; margin: 2px 0 4px 6px; padding: 4px 8px; border: none; border-radius: 7px; background: none;
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--accent-dark, #337359); cursor: pointer;
}
.lc-altre:hover { background: rgba(52,129,98,.08); }
.lc-altre .material-symbols-outlined { font-size: 17px; }
/* la ricerca nel riquadro */
.lc-cerca { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; padding: 0 9px; height: 32px; border-radius: 9px; background: rgba(118,118,128,.10); }
.lc-cerca .material-symbols-outlined { font-size: 17px; color: var(--faint); }
.lc-cerca input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font: inherit; font-size: 13px; color: var(--ink); }
/* legenda e piede */
.lc-nota { display: flex; align-items: center; gap: 6px; margin: 6px 6px 0; font-size: 11.5px; color: var(--faint); }
.lc-nota .lc-cit { margin-top: 0; }
.lc-piede { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(60,60,67,.10); }
.lc-piede .lc-link {
  border: none; background: none; padding: 4px 6px; border-radius: 7px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--accent-dark, #337359); cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px; text-decoration: none;
}
.lc-piede .lc-link:hover { background: rgba(52,129,98,.08); }
.lc-piede .lc-link .material-symbols-outlined { font-size: 17px; }
.lc-vuoto { margin: 2px 6px 4px; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
/* le azioni di una riga (Apri · Scarica · Usa di nuovo) */
.lc-az { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 3px; }
.lc-az button, .lc-az a { border: none; background: none; padding: 0; font: inherit; font-size: 12px; font-weight: 600; color: var(--accent-dark, #337359); cursor: pointer; text-decoration: none; }
.lc-az button:hover, .lc-az a:hover { text-decoration: underline; text-underline-offset: 2px; }
.lc-az button:disabled { color: var(--faint); cursor: default; text-decoration: none; }
/* «Da controllare»: le caselle */
.lc-r.lc-ctrl { align-items: flex-start; }
.lc-r.lc-ctrl .lc-box-ck {
  flex-shrink: 0; width: 20px; height: 20px; margin-top: 2px; border-radius: 6px; border: 1.5px solid rgba(60,60,67,.32); background: #fff; display: grid; place-items: center; cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.lc-r.lc-ctrl .lc-box-ck svg { width: 13px; height: 13px; display: block; opacity: 0; transition: opacity .12s ease; }
.lc-r.lc-ctrl.fatto .lc-box-ck { background: var(--accent); border-color: var(--accent); }
.lc-r.lc-ctrl.fatto .lc-box-ck svg { opacity: 1; }
.lc-r.lc-ctrl.fatto .lc-rt b { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(60,60,67,.4); }
.lc-r.lc-ctrl .lc-verdetto { font-weight: 650; }
.lc-r.lc-ctrl.ko .lc-verdetto { color: #b3261e; } .lc-r.lc-ctrl.par .lc-verdetto { color: #8a5a00; }
.lc-r.lc-ctrl .lc-vai { flex-shrink: 0; border: none; background: none; padding: 2px 4px; font: inherit; font-size: 12px; font-weight: 600; color: var(--accent-dark, #337359); cursor: pointer; border-radius: 6px; }
.lc-r.lc-ctrl .lc-vai:hover { background: rgba(52,129,98,.08); }
.lc-progresso { height: 4px; border-radius: 999px; background: rgba(118,118,128,.14); overflow: hidden; margin: 8px 6px 2px; }
.lc-progresso i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .3s var(--molla); }
.lc-tutto { display: flex; align-items: center; gap: 6px; margin: 4px 6px 0; font-size: 12.5px; font-weight: 600; color: #26644b; }
.lc-tutto .material-symbols-outlined { font-size: 17px; }
/* «Scadenze» */
.lc-r.lc-sca .lc-data { flex-shrink: 0; width: 44px; text-align: center; border-radius: 8px; background: rgba(255,59,48,.10); color: #b3261e; padding: 3px 0 4px; line-height: 1.1; }
.lc-r.lc-sca .lc-data b { display: block; font-size: 16px; font-weight: 700; }
.lc-r.lc-sca .lc-data small { display: block; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.lc-r.lc-sca.stimata .lc-data { background: rgba(224,163,0,.16); color: #8a5a00; }
.lc-r.lc-sca .lc-rt b { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
/* «Appunti» */
.lc-appunti { width: 100%; min-height: 96px; max-height: 320px; resize: vertical; box-sizing: border-box; padding: 9px 10px; border-radius: 10px;
  border: 1px solid rgba(60,60,67,.14); background: #fffdf3; font: inherit; font-size: 13px; line-height: 1.5; color: var(--ink); outline: none; }
.lc-appunti:focus { border-color: rgba(52,129,98,.6); box-shadow: 0 0 0 3px rgba(52,129,98,.14); }
.lc-appunti-stato { margin: 5px 6px 0; font-size: 11.5px; color: var(--faint); min-height: 15px; }
/* «Fascicolo» */
.lc-fasc-testa { display: flex; align-items: center; gap: 10px; padding: 4px 6px 8px; }
.lc-fasc-testa .lc-ri { color: #636366; }
.lc-fasc-testa .lc-rt b { white-space: normal; }
.lc-pro-pill { flex-shrink: 0; padding: 2px 7px; border-radius: 6px; background: rgba(52,129,98,.12); color: var(--accent-dark, #337359); font-size: 11.5px; font-weight: 600; }
/* i riquadri aperti di serie si aprono senza l'animazione a scatto */
.lc-lato .ad-lato.lc-subito .ad-lato-corpo { animation: none; }
.lc-r.lc-sca .lc-dettagli { margin: 6px 0 2px; padding-left: 16px; font-size: 12px; line-height: 1.45; color: var(--ink-2); }
.lc-r.lc-sca .lc-dettagli li { margin-bottom: 2px; }
a.lc-r { text-decoration: none; color: inherit; }
.lc-lato .ad-lato-testa .ad-n[hidden] { display: none; }

/* 79 · la spunta di «Da controllare» centrata: un'altra regola dei pulsanti le dava padding 1px 6px (01/11/2026) */
.lc-lato .lc-r.lc-ctrl .lc-box-ck { padding: 0 !important; margin: 2px 0 0 !important; border: 1.5px solid rgba(60,60,67,.32) !important; min-width: 0 !important; min-height: 0 !important; width: 20px !important; height: 20px !important; line-height: 0 !important; box-sizing: border-box !important; }
.lc-lato .lc-r.lc-ctrl.fatto .lc-box-ck { border-color: var(--accent) !important; }


/* ── 80. Gli scheletri quando si apre una chat (01/11/2026, static/attesa-chat.js) ─────────────────────────
   Andrea: «quando aggiorno la pagina su una chat si bugga tutto … metti tipo degli scheletri». Con `apre-chat` su
   <main>: niente Home, il filo nascosto, al suo posto una domanda e una risposta finte che luccicano; la colonna a
   lato mostra tre riquadri finti. Alla fine tutto compare insieme, gia' in fondo, con una dissolvenza breve. */
.sk-conv { display: none; }
.main.apre-chat .sk-conv { display: block; padding: 8px 0 40px; }
.main.apre-chat .hero, .main.apre-chat #spunti, .main.apre-chat .spunti { display: none !important; }
.main.apre-chat #thread { visibility: hidden; height: 0; overflow: hidden; }
.main.appena-aperta #thread { animation: skCompare .35s ease both; }
@keyframes skCompare { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.sk-conv i, .sk-conv b { display: block; border-radius: 6px; background: rgba(118,118,128,.12); }
.sk-conv .sk-utente {
  width: 58%; margin: 0 0 30px auto; padding: 14px 16px; border-radius: 18px; background: rgba(118,118,128,.08);
  display: flex; flex-direction: column; gap: 8px; align-items: flex-end;
}
.sk-conv .sk-utente i { height: 11px; width: var(--w, 60%); background: rgba(118,118,128,.16); }
.sk-conv .sk-ai { display: flex; flex-direction: column; gap: 11px; }
.sk-conv .sk-ai i { height: 12px; width: var(--w, 90%); }
.sk-conv .sk-ai b { height: 10px; background: transparent; }
@media (prefers-reduced-motion: no-preference) {
  .sk-conv i, .lc-sk i, .lc-sk .lc-sk-tile {
    background: linear-gradient(90deg, rgba(118,118,128,.12) 0%, rgba(118,118,128,.05) 38%, rgba(118,118,128,.12) 76%);
    background-size: 260% 100%;
    animation: scheletroScorre 1.5s ease-in-out infinite;
  }
  .sk-conv .sk-utente i { background: linear-gradient(90deg, rgba(118,118,128,.18) 0%, rgba(118,118,128,.08) 38%, rgba(118,118,128,.18) 76%); background-size: 260% 100%; }
}
/* la colonna a lato, finta */
.lc-sk { display: none; }
.lc-lato.lc-attesa .lc-sk { display: flex; flex-direction: column; gap: 12px; }
.lc-lato.lc-attesa .lc-box { display: none !important; }
.lc-sk > div {
  display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 16px; box-sizing: border-box; border-radius: 18px;
  background: #fff; box-shadow: 0 0 0 .5px rgba(0,0,0,.06), 0 6px 20px -10px rgba(0,0,0,.12);
}
.lc-sk .lc-sk-tile { flex-shrink: 0; width: 30px; height: 30px; border-radius: 8px; background: rgba(118,118,128,.12); }
.lc-sk i { display: block; height: 11px; border-radius: 6px; width: var(--w, 50%); background: rgba(118,118,128,.12); }

/* 81 · la barra laterale senza scatti (01/11/2026, «anche sulla nav bar»): il pulsante dell'account, finché non si
   sa chi è collegato, è uno scheletro — un cerchio e due righe che luccicano — non «Impostazioni» e un cerchio vuoto. */
.rail-io.rail-io-attesa .iniziali { color: transparent !important; }
.rail-io.rail-io-attesa .rail-io-t { position: relative; }
.rail-io.rail-io-attesa .rail-io-t > * { visibility: hidden; }
.rail-io.rail-io-attesa .rail-io-t::before, .rail-io.rail-io-attesa .rail-io-t::after {
  content: ""; position: absolute; left: 0; height: 10px; border-radius: 5px; background: rgba(118,118,128,.14);
}
.rail-io.rail-io-attesa .rail-io-t::before { top: 4px; width: 92px; }
.rail-io.rail-io-attesa .rail-io-t::after { top: 21px; width: 126px; height: 8px; }
.rail.chiusa .rail-io.rail-io-attesa .rail-io-t::before, .rail.chiusa .rail-io.rail-io-attesa .rail-io-t::after { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .rail-io.rail-io-attesa .iniziali, .rail-io.rail-io-attesa .rail-io-t::before, .rail-io.rail-io-attesa .rail-io-t::after {
    background: linear-gradient(90deg, rgba(118,118,128,.16) 0%, rgba(118,118,128,.06) 38%, rgba(118,118,128,.16) 76%) !important;
    background-size: 260% 100% !important; animation: scheletroScorre 1.5s ease-in-out infinite;
  }
  .rail-io.rail-io-pronto .iniziali, .rail-io.rail-io-pronto .rail-io-t > * { animation: skCompare .3s ease both; }
}

/* 82 · con la colonna a lato, la conversazione e il campo si allargano verso sinistra fino a riempire lo spazio
   (01/11/2026, Andrea: «allunga la chat fino a li, c'e' troppo spazio bianco»). Le misure le scrive lato-chat.js. */
.main.con-lato .column, .main.con-lato .dock-inner {
  max-width: var(--col-w, 680px) !important; width: auto !important;
  margin-left: var(--col-sx, auto) !important; margin-right: 0 !important;
}
/* il campo dei prompt allineato al testo: il .dock ha 24 px di margine interno a sinistra */
.main.con-lato .dock-inner { margin-left: calc(var(--col-sx, 0px) - var(--lg-dock-pad, 24px)) !important; }

/* 83 · il tasto per aprire e chiudere la colonna a lato (01/11/2026), in alto a destra accanto alla campanella */
.top .lc-interruttore { position: relative; }
.top .lc-interruttore[hidden] { display: none !important; }
.top .lc-interruttore svg { display: block; }
.top .lc-interruttore:not(.chiuso) svg path { stroke: var(--accent-dark, #337359); }
.top .lc-interruttore:not(.chiuso) svg rect { stroke: currentColor; }
.top .lc-interruttore .lc-int-punto {
  position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 999px; background: #ff9500;
  box-shadow: 0 0 0 2px #fff;
}
.top .lc-interruttore .lc-int-punto[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .lc-lato.lc-entra:not([hidden]) { animation: lcEntra .25s cubic-bezier(.32,.72,0,1) both; }
  .main.con-lato .column, .main .column { transition: margin .25s cubic-bezier(.32,.72,0,1), max-width .25s cubic-bezier(.32,.72,0,1); }
}
@keyframes lcEntra { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
/* 84 · la larghezza della chat e del campo e quella calcolata, non quella che resta: col pannello chiuso il campo si accorciava a destra (01/11/2026) */
.main.con-lato .column, .main.con-lato .dock-inner { width: var(--col-w, auto) !important; max-width: none !important; box-sizing: border-box; }


/* ── 85. Al limite del gratuito: aspettare o parlare con un consulente (01/11/2026, static/consulente.js) ── */
.muro-consulente { margin: 14px 0 4px; text-align: left; }
.muro-consulente .mc-domanda { margin: 0 0 10px; font-size: 14.5px; font-weight: 650; color: var(--ink); text-align: center; }
.muro-consulente .mc-scelte { display: grid; gap: 8px; }
.muro-consulente .mc-scelta {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 14px; cursor: pointer; text-align: left;
  border: 1px solid rgba(60,60,67,.14); background: #fff; font: inherit; color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease, transform .2s var(--molla);
}
.muro-consulente .mc-scelta:hover { border-color: rgba(52,129,98,.6); box-shadow: 0 4px 14px -6px rgba(49,131,98,.25); }
.muro-consulente .mc-scelta:active { transform: scale(.99); }
.muro-consulente .mc-scelta[hidden] { display: none; }
.muro-consulente .mc-scelta > .material-symbols-outlined {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 21px;
  background: rgba(52,129,98,.12); color: var(--accent-dark, #337359);
}
.muro-consulente .mc-scelta[data-az="aspetto"] > .material-symbols-outlined { background: rgba(118,118,128,.12); color: var(--ink-2); }
.muro-consulente .mc-scelta b { display: block; font-size: 14px; font-weight: 650; }
.muro-consulente .mc-scelta small { display: block; margin-top: 1px; font-size: 12.5px; color: var(--muted); }
.muro-consulente .mc-tel { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid rgba(60,60,67,.18); background: #fff; }
.muro-consulente .mc-tel:focus-within { border-color: rgba(52,129,98,.7); box-shadow: 0 0 0 3px rgba(52,129,98,.15); }
.muro-consulente .mc-tel svg { flex-shrink: 0; color: var(--muted); }
.muro-consulente .mc-tel input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font: inherit; font-size: 15px; color: var(--ink); }
.muro-consulente .mc-nota { margin: 8px 2px 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); text-align: center; }
.muro-consulente .mc-errore { margin: 8px 2px 0; font-size: 12.5px; color: #b3261e; text-align: center; }
.muro-consulente .mc-az { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }
.muro-consulente .mc-az button { min-width: 120px; }
.muro-consulente .mc-ok { display: block; margin: 0 auto 6px; font-size: 40px; color: var(--accent); text-align: center; }
.mc-pro { margin-top: 12px; }
.mc-pro[hidden] { display: none !important; }
.mc-pro .mc-pro-tasto {
  border: none; background: none; padding: 4px 8px; border-radius: 8px; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--accent-dark, #337359);
}
.mc-pro .mc-pro-tasto:hover { background: rgba(52,129,98,.08); }
/* la scelta prende il posto del lungo invito al Pro: il Pro resta nel tasto piccolo sotto (01/11/2026) */
#muro-limite-vendita > p:first-child { display: none !important; }

/* 86 · i pulsanti verdi tornano PIENI e PIATTI, senza vetro (01/11/2026, Andrea: «sui bottoni verdi togli l'effetto
   vetro»): niente riflesso, niente sfocatura, niente filo bianco e niente ombra verde. Annulla la parte verde della
   sezione 74; il vetro resta sui pulsanti grigi e su quelli a contorno. */
.btn-primo, .btn-pieno, .btn-piano, .novita-primario, .consenso-si, .spiega-si,
.doc-correggi-az .btn-pri, .uso-cta, .pop.pop-set .uso-cta, .popup-domande .pd-invia, .rd-invia {
  background: var(--accent) !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  border: none !important;
  color: #fff !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
  transition: background .15s ease, transform .2s var(--molla) !important;
}
.btn-primo:hover, .btn-pieno:hover:not(:disabled), .btn-piano:hover, .novita-primario:hover, .consenso-si:hover, .spiega-si:hover,
.doc-correggi-az .btn-pri:hover, .uso-cta:hover, .popup-domande .pd-invia:hover:not(:disabled), .rd-invia:hover {
  background: #2c7055 !important;
  transform: none !important;
}
.btn-primo:active, .btn-pieno:active, .btn-piano:active, .novita-primario:active, .consenso-si:active,
.popup-domande .pd-invia:active, .rd-invia:active { transform: scale(.97) !important; }



/* 88 · il fascicolo della chat, in alto, in stile Apple (01/11/2026): una capsula di vetro come i tasti accanto,
   con la cartella azzurra di macOS, il nome in nero e una freccina; niente fondo verde. */
.top .fz-bollino {
  height: 40px; box-sizing: border-box; margin-left: 0 !important; padding: 0 12px 0 10px !important; gap: 8px !important;
  border-radius: 999px !important; text-decoration: none;
  background: linear-gradient(135deg, rgba(255,255,255,.58) 0%, rgba(255,255,255,.12) 36%, rgba(255,255,255,.03) 62%, rgba(255,255,255,.34) 100%) rgba(255,255,255,.55) !important;
  -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%);
  border: 1px solid rgba(255,255,255,.8) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), inset 0 -1px 0 rgba(255,255,255,.3), 0 0 0 .5px rgba(60,60,67,.09), 0 2px 8px rgba(22,38,32,.06) !important;
  color: var(--ink) !important; font-size: 13.5px !important; font-weight: 600 !important; letter-spacing: -.01em;
  transition: background .2s ease, transform .25s var(--molla) !important; filter: none !important;
}
.top .fz-bollino:hover { background: rgba(255,255,255,.85) !important; }
.top .fz-bollino:active { transform: scale(.97); }
.top .fz-bollino .material-symbols-outlined { display: none !important; }
.top .fz-bollino::before {
  content: ""; flex-shrink: 0; width: 22px; height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 18'%3E%3Cdefs%3E%3ClinearGradient id='a' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%236cb8f7'/%3E%3Cstop offset='1' stop-color='%233d95ea'/%3E%3C/linearGradient%3E%3ClinearGradient id='b' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%238fcafb'/%3E%3Cstop offset='1' stop-color='%2353a6f0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M2 1.5h6.2l2 2H20a1.5 1.5 0 0 1 1.5 1.5v10.5A1.5 1.5 0 0 1 20 17H2A1.5 1.5 0 0 1 .5 15.5V3A1.5 1.5 0 0 1 2 1.5z' fill='url(%23a)'/%3E%3Cpath d='M.5 6.2A1.5 1.5 0 0 1 2 4.7h18a1.5 1.5 0 0 1 1.5 1.5v9.3A1.5 1.5 0 0 1 20 17H2A1.5 1.5 0 0 1 .5 15.5z' fill='url(%23b)'/%3E%3Cpath d='M.5 6.4h21' stroke='%23ffffff' stroke-opacity='.45' stroke-width='.8'/%3E%3C/svg%3E") center / contain no-repeat;
}
.top .fz-bollino::after {
  content: ""; flex-shrink: 0; width: 7px; height: 11px; margin-left: 2px; opacity: .45;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 11'%3E%3Cpath d='M1.2 1l4.3 4.5-4.3 4.5' fill='none' stroke='%231d1d1f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.top .fz-bollino span:last-of-type { max-width: 220px; }

/* 89 · quando la risposta si blocca (01/11/2026, Andrea: «non deve uscire nessun errore, semplicemente deve sembrare che
   il sistema è sovraccarico e la risposta si è bloccata»): niente riquadro rosso, una nota grigia con l'orologio. */
.msg-ai .alert.sovraccarico {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px 10px;
  border: 1px solid rgba(60,60,67,.12) !important; background: rgba(118,118,128,.07) !important; color: var(--ink-2) !important;
  border-radius: 14px; padding: 12px 14px; font-size: 14px; line-height: 1.5;
}
.msg-ai .alert.sovraccarico > .material-symbols-outlined { font-size: 19px; color: var(--muted); margin-top: 1px; }
.msg-ai .alert.sovraccarico > div { flex: 1; min-width: 0; }
.msg-ai .alert.sovraccarico > .opt { flex-basis: auto; margin: 6px 0 0 29px !important; }
.msg-ai .body em:last-child, .msg-ai .body p:last-child > em:only-child { color: var(--muted); }
/* la nota del blocco: il tasto Riprova va a capo, sotto il testo */
.msg-ai .alert.sovraccarico > div { flex: 1 1 calc(100% - 40px); }


/* ── 90. «Aggiungi al fascicolo» per un documento redatto (02/11/2026, static/doc-fascicolo.js) ── */
.dfz-menu { position: fixed; z-index: 400; min-width: 260px; max-width: 340px; max-height: 60vh; overflow-y: auto; }
.dfz-menu .dfz-t { margin: 6px 10px 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.dfz-menu .dfz-vuoto { margin: 6px 10px 8px; font-size: 13px; color: var(--muted); }
.dfz-menu .dfz-voce { display: flex !important; align-items: center; gap: 10px; text-align: left; }
.dfz-menu .dfz-cart {
  flex-shrink: 0; width: 20px; height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 18'%3E%3Cpath d='M2 1.5h6.2l2 2H20a1.5 1.5 0 0 1 1.5 1.5v10.5A1.5 1.5 0 0 1 20 17H2A1.5 1.5 0 0 1 .5 15.5V3A1.5 1.5 0 0 1 2 1.5z' fill='%233d95ea'/%3E%3Cpath d='M.5 6.2A1.5 1.5 0 0 1 2 4.7h18a1.5 1.5 0 0 1 1.5 1.5v9.3A1.5 1.5 0 0 1 20 17H2A1.5 1.5 0 0 1 .5 15.5z' fill='%2364b0f4'/%3E%3C/svg%3E") center / contain no-repeat;
}
.dfz-menu .dfz-n { min-width: 0; display: flex; flex-direction: column; }
.dfz-menu .dfz-n b { font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dfz-menu .dfz-n small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dfz-avviso {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 500; max-width: min(560px, calc(100vw - 32px));
  padding: 11px 16px; border-radius: 14px; background: rgba(29,29,31,.92); color: #fff; font-size: 13.5px; line-height: 1.4;
  box-shadow: 0 12px 32px -10px rgba(0,0,0,.4); transition: opacity .35s ease, transform .35s ease;
}
.dfz-avviso b { font-weight: 650; }
.dfz-avviso a { color: #a4d3c0; font-weight: 600; text-decoration: none; }
.dfz-avviso a:hover { text-decoration: underline; }
.dfz-avviso.no { background: rgba(120,30,25,.92); }
.dfz-avviso.via { opacity: 0; transform: translate(-50%, 8px); }


/* ── 91. Il menu dell'account fuori dalla chat (02/11/2026, static/rail-account.js) ── */
.ra-menu { width: 270px; transform-origin: bottom left; }
.ra-menu .ra-chi { display: flex; align-items: center; gap: 10px; padding: 8px 10px 6px; }
.ra-menu .ra-av {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 999px; display: grid; place-items: center;
  background: #ececf0; color: #5c5c63; font-size: 13px; font-weight: 600;
}
.ra-menu .ra-chi-t { min-width: 0; display: flex; flex-direction: column; }
.ra-menu .ra-chi-t b { font-size: 14px; font-weight: 650; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ra-menu .ra-chi-t small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ra-menu .ra-pro { font-style: normal; margin-left: 4px; padding: 1px 6px; border-radius: 6px; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 700; vertical-align: 1px; }
.ra-menu .ra-voce { gap: 10px; }
.ra-menu .ra-voce > .material-symbols-outlined { font-size: 19px; color: var(--muted); }
.ra-menu .ra-esci b { color: #c0392b; font-weight: 500; }
.ra-menu .ra-esci > .material-symbols-outlined { color: #c0392b; }



/* ── 92. La finestra dell'account sopra le altre sezioni (02/11/2026, static/rail-account.js, static/incornicia.js) ── */
/* fuori: il riquadro con il velo; dentro c'e' la chat in modalita' «incornicia» che mostra solo il pannello */
.ra-finestra {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(31,39,36,.16);
  -webkit-backdrop-filter: blur(10px) saturate(140%); backdrop-filter: blur(10px) saturate(140%);
  opacity: 0; transition: opacity .16s ease;
}
.ra-finestra[hidden] { display: none; }
.ra-finestra.on { opacity: 1; }
.ra-finestra iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent;
  color-scheme: normal; opacity: 0; transition: opacity .14s ease;
}
.ra-finestra.pronta iframe { opacity: 1; }
.ra-finestra .ra-gira {
  position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px;
  border-radius: 999px; border: 2.5px solid rgba(0,0,0,.12); border-top-color: rgba(0,0,0,.45);
  animation: raGira .8s linear infinite;
}
.ra-finestra.pronta .ra-gira { display: none; }
@keyframes raGira { to { transform: rotate(360deg); } }

/* dentro: solo il pannello e le finestre che ne nascono; il velo lo mette la pagina di fuori */
html.incornicia, html.incornicia body { background: transparent !important; }
html.incornicia body { visibility: hidden; overflow: hidden; }
html.incornicia body #velo-set, html.incornicia body .muro, html.incornicia body .muro-bg,
html.incornicia body .cassa, html.incornicia body .cassa-bg, html.incornicia body .accesso,
html.incornicia body .accesso-bg, html.incornicia body #velo-segnala { visibility: visible; }
html.incornicia body .velo, html.incornicia body .muro-bg, html.incornicia body .cassa-bg, html.incornicia body .accesso-bg {
  background: transparent !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
}
html.incornicia body .velo-set { animation: none; }
html.incornicia body .consenso { display: none !important; }
html.incornicia body #velo-set .set:focus { outline: none; }


/* ── 93. Scheletro trascinato nelle Impostazioni della redazione (02/11/2026, static/impostazioni-doc.js) ── */
.rd-imp { position: relative; }
.rd-imp.rd-imp-trascina::after {
  content: "Rilascia qui il file: diventa uno scheletro";
  position: absolute; inset: 10px; z-index: 5; display: grid; place-items: center; pointer-events: none;
  border: 2px dashed var(--accent); border-radius: 16px; background: rgba(255,255,255,.88);
  color: var(--accent); font-size: 15px; font-weight: 600;
}



/* ── 94. Le cartelle stile Apple nei Fascicoli (02/11/2026, Andrea: la cartella verde di macOS) ── */
/* L'elenco dei fascicoli come la vista a icone del Finder: la cartella grande, il nome sotto. Stessa cartella, piccola,
   nella scelta del fascicolo («Sposta in un fascicolo», «Aggiungi al fascicolo») e nel nome del fascicolo in cima alla chat. */
.fz-griglia#fz-elenco { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px 8px; }
.fz-griglia .fz-card {
  align-items: center; text-align: center; gap: 2px; padding: 14px 10px 12px !important;
  border: 0 !important; background: transparent !important; box-shadow: none !important; border-radius: 14px;
  transition: background .18s ease !important; transform: none !important;
}
.fz-griglia .fz-card:hover { background: rgba(60,60,67,.06) !important; transform: none !important; box-shadow: none !important; }
.fz-griglia .fz-card:active { background: rgba(60,60,67,.1) !important; }
.fz-griglia .fz-card .fz-card-ic {
  display: block; width: 104px; height: 84px; margin: 0 0 8px; font-size: 0 !important; color: transparent !important;
  background: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%2080'%3E%3Cdefs%3E%3ClinearGradient%20id='d'%20x1='0'%20y1='0'%20x2='0'%20y2='1'%3E%3Cstop%20offset='0'%20stop-color='%234fb65a'/%3E%3Cstop%20offset='1'%20stop-color='%233f9f4b'/%3E%3C/linearGradient%3E%3ClinearGradient%20id='f'%20x1='0'%20y1='0'%20x2='0'%20y2='1'%3E%3Cstop%20offset='0'%20stop-color='%2372cf7a'/%3E%3Cstop%20offset='1'%20stop-color='%235bbd64'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath%20d='M7%203h25.5c1.7%200%203.3.7%204.5%201.9L42.6%2011H93a7%207%200%200%201%207%207v55a7%207%200%200%201-7%207H7a7%207%200%200%201-7-7V10a7%207%200%200%201%207-7z'%20fill='url%28%23d%29'/%3E%3Crect%20y='19'%20width='100'%20height='61'%20rx='7'%20fill='url%28%23f%29'/%3E%3Crect%20x='1'%20y='19.6'%20width='98'%20height='1.4'%20rx='.7'%20fill='%23fff'%20fill-opacity='.45'/%3E%3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(0 3px 6px rgba(24,56,43,.14)); transition: transform .25s var(--molla, ease);
}
.fz-griglia .fz-card:hover .fz-card-ic { transform: translateY(-2px) scale(1.03); }
.fz-griglia .fz-card .fz-card-nome {
  font-size: 14px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; max-width: 100%;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.fz-griglia .fz-card .fz-card-cliente { font-size: 12.5px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fz-griglia .fz-card .fz-card-meta { margin-top: 1px; font-size: 11.5px; }
.fz-scelta .material-symbols-outlined {
  flex-shrink: 0; width: 24px; height: 19px; font-size: 0 !important; color: transparent !important;
  background: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%2080'%3E%3Cdefs%3E%3ClinearGradient%20id='d'%20x1='0'%20y1='0'%20x2='0'%20y2='1'%3E%3Cstop%20offset='0'%20stop-color='%234fb65a'/%3E%3Cstop%20offset='1'%20stop-color='%233f9f4b'/%3E%3C/linearGradient%3E%3ClinearGradient%20id='f'%20x1='0'%20y1='0'%20x2='0'%20y2='1'%3E%3Cstop%20offset='0'%20stop-color='%2372cf7a'/%3E%3Cstop%20offset='1'%20stop-color='%235bbd64'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath%20d='M7%203h25.5c1.7%200%203.3.7%204.5%201.9L42.6%2011H93a7%207%200%200%201%207%207v55a7%207%200%200%201-7%207H7a7%207%200%200%201-7-7V10a7%207%200%200%201%207-7z'%20fill='url%28%23d%29'/%3E%3Crect%20y='19'%20width='100'%20height='61'%20rx='7'%20fill='url%28%23f%29'/%3E%3Crect%20x='1'%20y='19.6'%20width='98'%20height='1.4'%20rx='.7'%20fill='%23fff'%20fill-opacity='.45'/%3E%3C/svg%3E") center / contain no-repeat;
}
.dfz-menu .dfz-cart, .top .fz-bollino::before { background: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%2080'%3E%3Cdefs%3E%3ClinearGradient%20id='d'%20x1='0'%20y1='0'%20x2='0'%20y2='1'%3E%3Cstop%20offset='0'%20stop-color='%234fb65a'/%3E%3Cstop%20offset='1'%20stop-color='%233f9f4b'/%3E%3C/linearGradient%3E%3ClinearGradient%20id='f'%20x1='0'%20y1='0'%20x2='0'%20y2='1'%3E%3Cstop%20offset='0'%20stop-color='%2372cf7a'/%3E%3Cstop%20offset='1'%20stop-color='%235bbd64'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath%20d='M7%203h25.5c1.7%200%203.3.7%204.5%201.9L42.6%2011H93a7%207%200%200%201%207%207v55a7%207%200%200%201-7%207H7a7%207%200%200%201-7-7V10a7%207%200%200%201%207-7z'%20fill='url%28%23d%29'/%3E%3Crect%20y='19'%20width='100'%20height='61'%20rx='7'%20fill='url%28%23f%29'/%3E%3Crect%20x='1'%20y='19.6'%20width='98'%20height='1.4'%20rx='.7'%20fill='%23fff'%20fill-opacity='.45'/%3E%3C/svg%3E") center / contain no-repeat !important; }


/* ── 95. La nota sull'AI più vicina al campo, col Triplo Vaglio (03/11/2026, Andrea) ── */
.disclaimer .nota-vaglio { color: inherit; font-weight: 600; text-decoration: underline; text-decoration-color: rgba(0,0,0,.25); text-underline-offset: 2px; }
.disclaimer .nota-vaglio:hover { color: var(--accent-ink, var(--ink)); text-decoration-color: currentColor; }
html body .main:not(.vuota) .dock-inner > .disclaimer.nota-sopra.nota-sopra { margin-bottom: 3px !important; }
html body .main:not(.vuota) .dock-inner > .disclaimer.nota-sopra ~ .attachments:not(:has(*)) { margin-bottom: 0 !important; }


/* ── 96. Triplo Vaglio: l'esito di ogni articolo, comma e pertinenza (03/11/2026, static/vaglio.js) ── */
.tv-arts .tv-art-esito { display: block; margin: 5px 0 2px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.tv-arts .tv-art-esito .tv-esito { margin-right: 6px; }


/* ── 97. Gli allegati nella barra della chat come in Redigere documenti (03/11/2026, Andrea) ── */
/* niente vetro: schede piatte grigio chiaro, icona grigia, il peso a destra; tutte su una riga che scorre di lato
   invece di andare a capo e spingere il campo su e giu' */
html body #attachments.attachments {
  flex-wrap: nowrap !important; overflow-x: auto; overflow-y: hidden; gap: 8px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; padding: 1px 0;
}
html body #attachments.attachments::-webkit-scrollbar { display: none; }
html body #attachments.attachments > .chip {
  flex: 0 0 auto; max-width: 280px; scroll-snap-align: start;
  display: flex; align-items: center; gap: 10px; padding: 9px 10px 9px 12px !important; min-height: 42px; box-sizing: border-box;
  background: #eeeef0 !important; border: 0 !important; border-radius: 10px !important;
  box-shadow: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  color: #1d1d1f !important;
}
html body #attachments.attachments > .chip .chip-ic {
  width: auto !important; height: auto !important; background: transparent !important; box-shadow: none !important;
  border: 0 !important; padding: 0 !important; color: #6e6e73 !important;
}
html body #attachments.attachments > .chip .chip-ic .material-symbols-outlined { font-size: 18px !important; color: #6e6e73 !important; }
html body #attachments.attachments > .chip .chip-ant { width: 26px; height: 26px; border-radius: 6px; object-fit: cover; }
html body #attachments.attachments > .chip .chip-t { min-width: 0; display: flex; align-items: baseline; gap: 8px; }
html body #attachments.attachments > .chip .chip-t .n {
  font-size: 14px; font-weight: 400; color: #1d1d1f !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px;
}
html body #attachments.attachments > .chip .chip-t .sz { font-size: 12px; color: #8e8e93 !important; white-space: nowrap; }
html body #attachments.attachments > .chip > button {
  flex-shrink: 0; width: 24px; height: 24px; display: grid; place-items: center; border: 0; border-radius: 999px;
  background: transparent !important; color: #6e6e73 !important; box-shadow: none !important; padding: 0; cursor: pointer;
}
html body #attachments.attachments > .chip > button:hover { background: rgba(0,0,0,.06) !important; color: #1d1d1f !important; }
html body #attachments.attachments > .chip > button .material-symbols-outlined { font-size: 18px; }
html body #attachments.attachments > .chip.rotto { background: #fdecea !important; }
html body #attachments.attachments > .chip.rotto .sz { color: #c0392b !important; }
html body #attachments.attachments > .chip .chip-t { flex-direction: row !important; align-items: baseline !important; }
html body #attachments.attachments > .chip .chip-t .sz { margin: 0 !important; }
html body #attachments.attachments.scorre-dx { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); }
html body #attachments.attachments.scorre-sx { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 36px), transparent); }
html body #attachments.attachments.scorre-sx.scorre-dx { -webkit-mask-image: linear-gradient(to right, transparent, #000 36px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, transparent, #000 36px, #000 calc(100% - 36px), transparent); }


/* ── 98. La campanella: risposte e documenti pronti, il documento in redazione (03/11/2026, static/notifiche.js) ── */
.nt-risposta  { background: rgba(52,129,98,.14); color: var(--accent-ink); }
.nt-documento { background: rgba(0,122,255,.12); color: #0060c7; }
.nt-corso     { background: rgba(60,60,67,.08); color: #6e6e73; }
.nt-corso svg { animation: ntGira 1s linear infinite; }
@keyframes ntGira { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .nt-corso svg { animation: none; } }


/* ── 99. Impostazioni → Utilizzo come quella di Claude (03/11/2026, templates/_impostazioni.html) ── */
.uso2 { display: flex; flex-direction: column; padding: 2px 18px; border-radius: 14px; background: rgba(255,255,255,.72); border: 1px solid rgba(0,0,0,.06); }
.uso2[hidden] { display: none; }
.uso2-riga { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 22px; align-items: center; padding: 15px 0; }
.uso2-riga + .uso2-riga { border-top: 1px solid rgba(0,0,0,.06); }
.uso2-sx { min-width: 0; }
.uso2-sx b { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.uso2-sx small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.uso2-piano { font-size: 10.5px; font-weight: 700; letter-spacing: .02em; padding: 1px 7px; border-radius: 6px; background: rgba(0,0,0,.06); color: var(--muted); }
.uso2.pro .uso2-piano { background: var(--accent); color: #fff; }
.uso2-dx { display: flex; align-items: center; gap: 12px; min-width: 0; }
html body .uso2 .uso2-barra { flex: 1; height: 8px; margin: 0 !important; border-radius: 999px; background: rgba(0,0,0,.08) !important; overflow: hidden; box-shadow: none !important; }
html body .uso2 .uso2-barra i { display: block; height: 100%; border-radius: 999px; background: var(--accent) !important; transition: width .4s ease; }
.uso2-n { flex-shrink: 0; min-width: 64px; text-align: right; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
html body .uso2.pieno .uso2-riga:first-child .uso2-barra i, html body .uso2 .uso2-riga.pieno .uso2-barra i,
html body .uso2 .uso2-dx.pieno .uso2-barra i { background: #d93025 !important; }
@media (max-width: 560px) { .uso2-riga { grid-template-columns: 1fr; gap: 8px; } }


/* ── 100. La ricerca nell'elenco dei fascicoli (03/11/2026, static/fascicoli-cerca.js) ── */
.fzc { margin: 0 0 18px; max-width: 460px; }
.fzc[hidden] { display: none; }
.fzc-campo {
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 8px 0 12px; border-radius: 11px;
  background: rgba(118,118,128,.12); color: #6e6e73; transition: background .15s ease, box-shadow .15s ease;
}
.fzc-campo:focus-within { background: #fff; box-shadow: 0 0 0 3px rgba(52,129,98,.18), 0 0 0 1px rgba(52,129,98,.45); }
.fzc-campo .material-symbols-outlined { font-size: 19px; }
.fzc-campo input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: inherit; font-size: 14.5px; color: var(--ink);
}
.fzc-campo input::-webkit-search-cancel-button { display: none; }
.fzc-campo input::placeholder { color: #8e8e93; }
.fzc-x { display: none; width: 22px; height: 22px; place-items: center; border: 0; border-radius: 999px; padding: 0;
  background: rgba(118,118,128,.28); color: #fff; cursor: pointer; }
.fzc-x .material-symbols-outlined { font-size: 15px; }
.fzc.pieno .fzc-x { display: grid; }
.fzc-vuoto { margin: 6px 2px 0; font-size: 14px; color: var(--muted); }
.fz-griglia .fz-card[hidden] { display: none !important; }


/* ── 101. Il suggerimento delle barre su una riga sola (03/11/2026) ── */
/* Andrea, con la foto della redazione stretta: «la barra del prompt è buggata». Il suggerimento («Chiedi una modifica,
   o trascina qui i file…») andava a capo e la seconda riga restava tagliata a metà dentro il campo da una riga. Finché il
   campo è vuoto il suggerimento sta su UNA riga e, se non ci sta, finisce coi puntini; quando si scrive, il testo va a
   capo come sempre. */
html body :is(#rd-chiedi-testo, #richiesta, #input, #fz-chiedi textarea):placeholder-shown {
  white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis;
}
html body :is(#rd-chiedi-testo, #richiesta, #input, #fz-chiedi textarea)::placeholder {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}


/* ── 102. Il riquadro dei lavori resta solo per i dati (03/11/2026, CHAT_NOTIFICHE_LAVORI: lo dice la campanella) ── */
html body .lavoro-vivo.solo-dati { display: none !important; }

.rd-archivio .dcc { margin: 2px 0 16px; }
.rd-archivio .doc-riga[hidden] { display: none !important; }


/* ── 103. L elenco dei fascicoli: senza la riga sotto il titolo, il titolo più in basso (03/11/2026, Andrea) ── */
html body .fz-testa:has(#fz-nuovo) { align-items: center; margin: 34px 0 24px; }


/* ── 104. Lo storico davanti al velluto della Home; in chat la pagina bianca anche in cima (03/11/2026, Andrea) ── */
/* «la barra verde non va bene»; «la lista deve andare fino alla fine del viewport, e scendere un po' in testa»;
   «davanti lo storico, dietro come sfondo lo stesso verde della Home». Il velluto nel modo «storico» e' quello della
   Home (home-smeraldo.js); qui il pannello bianco che lo copre, da poco sotto la barra fino in fondo. */
html.smeraldo-on.smeraldo-chat:not(:has(#vista-cerca:not([hidden]))) { background: #fff !important; }
html.con-storico #vista-cerca:not([hidden])::after { display: none !important; }
html.con-storico .column:has(> #vista-cerca:not([hidden])) { padding-bottom: 0 !important; }
html.con-storico #vista-cerca:not([hidden]) {
  margin-top: 46px; padding: 30px 30px 40px !important; min-height: calc(100vh - 46px - 70px); box-sizing: border-box;
  border-radius: 28px 28px 0 0; background: rgba(255,255,255,.94);
  -webkit-backdrop-filter: blur(20px) saturate(150%); backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 0 -1px 0 rgba(255,255,255,.7) inset, 0 30px 80px -30px rgba(6,37,25,.45);
}
@media (max-width: 760px) { html.con-storico #vista-cerca:not([hidden]) { margin-top: 18px; padding: 20px 14px 30px !important; border-radius: 22px 22px 0 0; } }


/* ── 105. Lo storico globale: la pill e le voci delle altre sezioni (03/11/2026, Andrea) ── */
/* «sotto la barra di ricerca una pill dove decido quale storico guardare […] lo stesso stile di Scrittura/Scheletri»:
   lo switch e' .rd-imp-seg (sezione delle impostazioni della redazione), qui con sei voci. */
html.con-storico .storico-seg {
  grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 14px 0 6px; padding: 2px;
}
html.con-storico .storico-seg::before { width: calc((100% - 4px) / 5); }
html.con-storico .storico-seg button { padding: 7px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) {
  html.con-storico .storico-seg { overflow-x: auto; scrollbar-width: none; grid-template-columns: repeat(5, max-content); }
  html.con-storico .storico-seg::-webkit-scrollbar { display: none; }
  html.con-storico .storico-seg::before { display: none; }
  html.con-storico .storico-seg button { padding: 7px 12px; font-size: 12.5px; border-radius: 7px; }
  html.con-storico .storico-seg button.on { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 0 0 .5px rgba(0,0,0,.04); }
}
html.con-storico a.storico-riga { color: inherit; text-decoration: none; }
html.con-storico .storico-ic.t-documento { background: linear-gradient(145deg, #eef4fc, #dfe9f8); color: #2f5f9e; box-shadow: inset 0 0 0 .5px rgba(20,60,120,.08); }
html.con-storico .storico-ic.t-fascicolo { background: linear-gradient(145deg, #e9f4fd, #d4e8fa); color: #1f6fb8; box-shadow: inset 0 0 0 .5px rgba(20,80,140,.08); }
html.con-storico .storico-ic.t-vaglio { background: linear-gradient(145deg, #e7f3ee, #d4e9e1); color: #144f37; box-shadow: inset 0 0 0 .5px rgba(16,68,47,.1); }
html.con-storico .storico-ic.t-banca { background: linear-gradient(145deg, #f3effb, #e6dff6); color: #5b3fa0; box-shadow: inset 0 0 0 .5px rgba(70,40,130,.08); }
html.con-storico .storico-tag { font-weight: 600; color: var(--ink-2); }
html.con-storico .storico-m-r .ko { color: #b3261e; font-weight: 500; }
html.con-storico .storico-vai { flex-shrink: 0; display: grid; place-items: center; width: 28px; height: 28px; color: var(--faint); opacity: 0;
  transition: opacity .15s ease, transform .2s cubic-bezier(.32,.72,0,1); }
html.con-storico .storico-vai svg { width: 16px; height: 16px; }
html.con-storico .storico-altra:hover .storico-vai, html.con-storico .storico-altra:focus-visible .storico-vai { opacity: 1; transform: translateX(2px); }
html.con-storico .storico-trovate { margin-bottom: 14px; }
html.con-storico .storico-niente { padding: 40px 0; text-align: center; color: var(--muted); }

/* 03/11/2026, sera (Andrea: «nella sezione storico sopra è bianco, togli il bianco»): con lo storico aperto niente
   velo bianco sotto la barra in alto, si vede il velluto. E l'icona del Triplo Vaglio disegnata (i cerchi col check). */
html .rail-ic-svg { display: inline-grid; place-items: center; }
html .rail-ic-svg svg.ic-vaglio { width: 1.12em; height: 1.12em; }
html .storico-ic svg.ic-vaglio { width: 20px; height: 20px; }


/* ── 106. Le cartelle dei Fascicoli nei colori del Finder, scelti col tasto destro (03/11/2026, Andrea) ── */
html body .fz-griglia .fz-card[data-colore="blu"] .fz-card-ic { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%2080'%3E%3Cdefs%3E%3ClinearGradient%20id='d'%20x1='0'%20y1='0'%20x2='0'%20y2='1'%3E%3Cstop%20offset='0'%20stop-color='%234a9ee8'/%3E%3Cstop%20offset='1'%20stop-color='%233a88d6'/%3E%3C/linearGradient%3E%3ClinearGradient%20id='f'%20x1='0'%20y1='0'%20x2='0'%20y2='1'%3E%3Cstop%20offset='0'%20stop-color='%2378bdf6'/%3E%3Cstop%20offset='1'%20stop-color='%235ea9ee'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath%20d='M7%203h25.5c1.7%200%203.3.7%204.5%201.9L42.6%2011H93a7%207%200%200%201%207%207v55a7%207%200%200%201-7%207H7a7%207%200%200%201-7-7V10a7%207%200%200%201%207-7z'%20fill='url%28%23d%29'/%3E%3Crect%20y='19'%20width='100'%20height='61'%20rx='7'%20fill='url%28%23f%29'/%3E%3Crect%20x='1'%20y='19.6'%20width='98'%20height='1.4'%20rx='.7'%20fill='%23fff'%20fill-opacity='.45'/%3E%3C/svg%3E") !important; }
html body .fz-griglia .fz-card[data-colore="verde"] .fz-card-ic { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%2080'%3E%3Cdefs%3E%3ClinearGradient%20id='d'%20x1='0'%20y1='0'%20x2='0'%20y2='1'%3E%3Cstop%20offset='0'%20stop-color='%234fb65a'/%3E%3Cstop%20offset='1'%20stop-color='%233f9f4b'/%3E%3C/linearGradient%3E%3ClinearGradient%20id='f'%20x1='0'%20y1='0'%20x2='0'%20y2='1'%3E%3Cstop%20offset='0'%20stop-color='%2372cf7a'/%3E%3Cstop%20offset='1'%20stop-color='%235bbd64'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath%20d='M7%203h25.5c1.7%200%203.3.7%204.5%201.9L42.6%2011H93a7%207%200%200%201%207%207v55a7%207%200%200%201-7%207H7a7%207%200%200%201-7-7V10a7%207%200%200%201%207-7z'%20fill='url%28%23d%29'/%3E%3Crect%20y='19'%20width='100'%20height='61'%20rx='7'%20fill='url%28%23f%29'/%3E%3Crect%20x='1'%20y='19.6'%20width='98'%20height='1.4'%20rx='.7'%20fill='%23fff'%20fill-opacity='.45'/%3E%3C/svg%3E") !important; }
html body .fz-griglia .fz-card[data-colore="giallo"] .fz-card-ic { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%2080'%3E%3Cdefs%3E%3ClinearGradient%20id='d'%20x1='0'%20y1='0'%20x2='0'%20y2='1'%3E%3Cstop%20offset='0'%20stop-color='%23efbd2a'/%3E%3Cstop%20offset='1'%20stop-color='%23e0a81c'/%3E%3C/linearGradient%3E%3ClinearGradient%20id='f'%20x1='0'%20y1='0'%20x2='0'%20y2='1'%3E%3Cstop%20offset='0'%20stop-color='%23fbd858'/%3E%3Cstop%20offset='1'%20stop-color='%23f4c83c'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath%20d='M7%203h25.5c1.7%200%203.3.7%204.5%201.9L42.6%2011H93a7%207%200%200%201%207%207v55a7%207%200%200%201-7%207H7a7%207%200%200%201-7-7V10a7%207%200%200%201%207-7z'%20fill='url%28%23d%29'/%3E%3Crect%20y='19'%20width='100'%20height='61'%20rx='7'%20fill='url%28%23f%29'/%3E%3Crect%20x='1'%20y='19.6'%20width='98'%20height='1.4'%20rx='.7'%20fill='%23fff'%20fill-opacity='.45'/%3E%3C/svg%3E") !important; }
html body .fz-griglia .fz-card[data-colore="arancione"] .fz-card-ic { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%2080'%3E%3Cdefs%3E%3ClinearGradient%20id='d'%20x1='0'%20y1='0'%20x2='0'%20y2='1'%3E%3Cstop%20offset='0'%20stop-color='%23f39a35'/%3E%3Cstop%20offset='1'%20stop-color='%23e5841f'/%3E%3C/linearGradient%3E%3ClinearGradient%20id='f'%20x1='0'%20y1='0'%20x2='0'%20y2='1'%3E%3Cstop%20offset='0'%20stop-color='%23fdb862'/%3E%3Cstop%20offset='1'%20stop-color='%23f7a443'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath%20d='M7%203h25.5c1.7%200%203.3.7%204.5%201.9L42.6%2011H93a7%207%200%200%201%207%207v55a7%207%200%200%201-7%207H7a7%207%200%200%201-7-7V10a7%207%200%200%201%207-7z'%20fill='url%28%23d%29'/%3E%3Crect%20y='19'%20width='100'%20height='61'%20rx='7'%20fill='url%28%23f%29'/%3E%3Crect%20x='1'%20y='19.6'%20width='98'%20height='1.4'%20rx='.7'%20fill='%23fff'%20fill-opacity='.45'/%3E%3C/svg%3E") !important; }
html body .fz-griglia .fz-card[data-colore="rosso"] .fz-card-ic { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%2080'%3E%3Cdefs%3E%3ClinearGradient%20id='d'%20x1='0'%20y1='0'%20x2='0'%20y2='1'%3E%3Cstop%20offset='0'%20stop-color='%23e8564f'/%3E%3Cstop%20offset='1'%20stop-color='%23d4423c'/%3E%3C/linearGradient%3E%3ClinearGradient%20id='f'%20x1='0'%20y1='0'%20x2='0'%20y2='1'%3E%3Cstop%20offset='0'%20stop-color='%23f5817b'/%3E%3Cstop%20offset='1'%20stop-color='%23ec6760'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath%20d='M7%203h25.5c1.7%200%203.3.7%204.5%201.9L42.6%2011H93a7%207%200%200%201%207%207v55a7%207%200%200%201-7%207H7a7%207%200%200%201-7-7V10a7%207%200%200%201%207-7z'%20fill='url%28%23d%29'/%3E%3Crect%20y='19'%20width='100'%20height='61'%20rx='7'%20fill='url%28%23f%29'/%3E%3Crect%20x='1'%20y='19.6'%20width='98'%20height='1.4'%20rx='.7'%20fill='%23fff'%20fill-opacity='.45'/%3E%3C/svg%3E") !important; }
html body .fz-griglia .fz-card[data-colore="viola"] .fz-card-ic { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%2080'%3E%3Cdefs%3E%3ClinearGradient%20id='d'%20x1='0'%20y1='0'%20x2='0'%20y2='1'%3E%3Cstop%20offset='0'%20stop-color='%23b073d6'/%3E%3Cstop%20offset='1'%20stop-color='%239b5cc6'/%3E%3C/linearGradient%3E%3ClinearGradient%20id='f'%20x1='0'%20y1='0'%20x2='0'%20y2='1'%3E%3Cstop%20offset='0'%20stop-color='%23cc9aea'/%3E%3Cstop%20offset='1'%20stop-color='%23b980df'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath%20d='M7%203h25.5c1.7%200%203.3.7%204.5%201.9L42.6%2011H93a7%207%200%200%201%207%207v55a7%207%200%200%201-7%207H7a7%207%200%200%201-7-7V10a7%207%200%200%201%207-7z'%20fill='url%28%23d%29'/%3E%3Crect%20y='19'%20width='100'%20height='61'%20rx='7'%20fill='url%28%23f%29'/%3E%3Crect%20x='1'%20y='19.6'%20width='98'%20height='1.4'%20rx='.7'%20fill='%23fff'%20fill-opacity='.45'/%3E%3C/svg%3E") !important; }
html body .fz-griglia .fz-card[data-colore="grigio"] .fz-card-ic { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%2080'%3E%3Cdefs%3E%3ClinearGradient%20id='d'%20x1='0'%20y1='0'%20x2='0'%20y2='1'%3E%3Cstop%20offset='0'%20stop-color='%23a3a3aa'/%3E%3Cstop%20offset='1'%20stop-color='%238e8e95'/%3E%3C/linearGradient%3E%3ClinearGradient%20id='f'%20x1='0'%20y1='0'%20x2='0'%20y2='1'%3E%3Cstop%20offset='0'%20stop-color='%23c3c3c8'/%3E%3Cstop%20offset='1'%20stop-color='%23adadb3'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath%20d='M7%203h25.5c1.7%200%203.3.7%204.5%201.9L42.6%2011H93a7%207%200%200%201%207%207v55a7%207%200%200%201-7%207H7a7%207%200%200%201-7-7V10a7%207%200%200%201%207-7z'%20fill='url%28%23d%29'/%3E%3Crect%20y='19'%20width='100'%20height='61'%20rx='7'%20fill='url%28%23f%29'/%3E%3Crect%20x='1'%20y='19.6'%20width='98'%20height='1.4'%20rx='.7'%20fill='%23fff'%20fill-opacity='.45'/%3E%3C/svg%3E") !important; }
html body .fzm {
  position: fixed; z-index: 1000; min-width: 210px; padding: 5px; border-radius: 12px; background: rgba(250,250,252,.96);
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 0 0 .5px rgba(0,0,0,.12), 0 12px 34px rgba(0,0,0,.16); animation: fzmEntra .14s ease-out;
}
@keyframes fzmEntra { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
html body .fzm-voce { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border: 0; border-radius: 7px;
  background: transparent; font: inherit; font-size: 13.5px; color: var(--ink); text-align: left; cursor: pointer; }
html body .fzm-voce .material-symbols-outlined { font-size: 18px; color: var(--ink-2); }
html body .fzm-voce:hover { background: rgba(0,0,0,.06); }
html body .fzm-voce.rossa, html body .fzm-voce.rossa .material-symbols-outlined { color: #d93025; }
html body .fzm-sep { height: 1px; margin: 5px 8px; background: rgba(0,0,0,.08); }
html body .fzm-colori { display: flex; justify-content: space-between; gap: 6px; padding: 5px 10px; }
html body .fzm-pallino { width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--c); box-shadow: inset 0 0 0 .5px rgba(0,0,0,.18); transition: transform .12s ease; }
html body .fzm-pallino:hover { transform: scale(1.15); }
html body .fzm-pallino.on { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--c); }
html body .fz-card .fzm-nome { width: 100%; padding: 3px 6px; border: 1px solid var(--accent, #176345); border-radius: 6px;
  font: inherit; font-size: 14px; font-weight: 600; text-align: center; outline: none; background: #fff; }


/* ── 107. Lo storico fino in fondo; il campo di ricerca resta in alto, non segue lo scorrimento (03/11/2026, sera) ── */
html.con-storico .shell:has(#vista-cerca:not([hidden])) { padding-bottom: 0 !important; }
html.con-storico .cerca-campo.storico-campo-box, html.con-storico .cerca-campo.storico-campo-box.incollato { position: relative !important; top: auto !important; }
html.con-storico .storico-altra .storico-piu { opacity: 0; }
html.con-storico .storico-altra:hover .storico-piu, html.con-storico .storico-altra:focus-within .storico-piu { opacity: 1; }


/* ── 108. Lo storico su bianco pulito, come le altre pagine (03/11/2026, sera, Andrea) ── */
/* «quando scrollo veloce si alza un pochettino e poi torna in basso, la striscia verde si vede e da fastidio; lo storico
   mettilo su sfondo bianco pulito come il resto». Niente velluto dietro e niente pannello: il fondo delle altre pagine. */
html:has(#vista-cerca:not([hidden])), html:has(#vista-cerca:not([hidden])) body { background: #fbfbfc !important; }
html:has(#vista-cerca:not([hidden])) .smeraldo-velluto { display: none !important; }
html.con-storico #vista-cerca:not([hidden]) {
  margin-top: 0 !important; padding: 26px 30px 40px !important; min-height: 0 !important; border-radius: 0 !important;
  background: transparent !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; box-shadow: none !important;
}
@media (max-width: 760px) { html.con-storico #vista-cerca:not([hidden]) { margin-top: 0 !important; padding: 16px 14px 30px !important; } }


/* ── 109. Il titolo «Storico» nel serif delle altre sezioni, come «Fascicoli» e «Banca Dati» (03/11/2026, sera) ── */
html.con-storico .storico-testa h1 {
  font-family: "LexNova Serif", "Cormorant Garamond", Garamond, Georgia, serif !important;
  font-size: 34px !important; font-weight: 600 !important; letter-spacing: -.012em !important;
}

/* ── 05/11/2026 (Andrea, schermo segnato): documento chiuso, da scrivania larga — il nome del documento sale
   nella barra in alto, al centro della colonna della chat; nella riga sotto «Chat sul documento» sta al centro
   della stessa colonna. Le misure (--rd-tit-*, i margini della colonna) le scrive static/testa-doc.js. ── */
html body.rd-titolo-su .rd-split.rd-senza-doc .rd-conv-testa .doc-tit {
  position: fixed !important; z-index: 40; left: var(--rd-tit-l) !important; top: var(--rd-tit-t) !important;
  width: var(--rd-tit-w) !important; max-width: var(--rd-tit-w) !important; transform: translateY(-50%) !important;
  text-align: center !important; padding: 0 !important; margin: 0 !important;
  font-size: 15px; font-weight: 600; color: var(--ink);
}
html body.rd-titolo-su .rd-split.rd-senza-doc .rd-conv-testa .doc-tit.si-rinomina { padding: 3px 6px !important; }
html body.rd-titolo-su .rd-split.rd-senza-doc .rd-conv-testa .rd-nome-campo {
  position: fixed !important; z-index: 41; top: var(--rd-tit-t) !important; transform: translateY(-50%) !important;
  left: calc(var(--rd-tit-l) + var(--rd-tit-w) / 4) !important; width: calc(var(--rd-tit-w) / 2) !important;
  max-width: calc(var(--rd-tit-w) / 2) !important; margin: 0 !important; text-align: center;
}
html body.rd-titolo-su .rd-split.rd-senza-doc .rd-conv-testa { justify-content: center !important; position: relative; }
html body.rd-titolo-su .rd-split.rd-senza-doc .rd-conv-testa .btn-indietro {
  position: absolute !important; left: 20px; top: 50%; transform: translateY(-50%);
}
html body.rd-titolo-su .rd-split.rd-senza-doc .rd-conv-testa .rd-conv-etichetta {
  margin: 0 auto !important; padding: 0 !important;
}

/* ── 05/11/2026 (CHAT_ATTI_LATO): il pannello a destra della Redazione è quello della chat (`.lc-lato`, static/lato-doc.js);
   il tasto per aprirlo e chiuderlo sta accanto alla campanella, come in chat ── */
.campanella-fissa .rd-lato-tasto { margin-right: 8px; position: relative; }
.campanella-fissa .rd-lato-tasto[hidden], .rd-lato-tasto[hidden] { display: none !important; }
.rd-lato-tasto svg { display: block; }
.rd-lato-tasto:not(.chiuso) svg path { stroke: var(--accent-dark, #337359); }
.rd-lato-tasto-solo { position: fixed; top: 24px; right: 18px; z-index: 55; }
.rd-lato .ad-lato { width: auto !important; max-height: none !important; }
.rd-lato .lc-appunti { min-height: 160px; }
/* il tasto dell'anteprima del documento (05/11/2026), la stessa capsula della campanella */
.rd-anteprima-tasto {
  position: fixed; z-index: 55; width: 38px; height: 38px; display: grid; place-items: center; padding: 0;
  background: var(--lg-riflesso, linear-gradient(transparent, transparent)) rgba(255,255,255,.50) !important;
  -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%);
  border: 1px solid rgba(255,255,255,.8) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), inset 0 -1px 0 rgba(255,255,255,.3), 0 0 0 .5px rgba(60,60,67,.09), 0 2px 8px rgba(22,38,32,.06) !important;
  color: var(--ink-2) !important; border-radius: 999px !important; cursor: pointer;
}
.rd-anteprima-tasto:hover { background: rgba(255,255,255,.85) !important; }
.rd-anteprima-tasto[hidden] { display: none !important; }
.rd-anteprima-tasto svg { display: block; }
/* le fonti delle risposte nella Redazione come in chat (05/11/2026): lo stesso riquadro di `.msg-ai .fonti` */
.rd-parere .fonti {
  margin-top: 18px; border: 1.5px solid rgba(52,129,98,.5); border-radius: 14px; background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.rd-parere .fonti:hover { border-color: var(--accent); box-shadow: 0 4px 16px rgba(52,129,98,.13); }
.rd-parere .fonti .fonti-bar {
  width: 100%; box-sizing: border-box; padding: 12px 12px 12px 14px !important; border: none; background: transparent !important;
  border-radius: 13px; cursor: pointer;
}
.rd-parere .fonti .fonti-ch { transform: rotate(-90deg) !important; color: var(--accent-dark, #337359) !important; }
/* la risposta a una domanda sul documento che si scrive (05/11/2026): i blocchi nuovi compaiono con una dissolvenza */
.rd-parere-testo > .rd-nuovo { animation: rdTestoEntra .32s cubic-bezier(.32,.72,0,1) both; }
@keyframes rdTestoEntra { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rd-parere-testo > .rd-nuovo { animation: none; } }

/* ── Titoli più grandi e grassetto più marcato nelle risposte (10/11/2026, Andrea: «i titoli e sottotitoli falli un
   po' più grandi così è più leggibile per l'avvocato», «il grassetto nelle parti importanti»). Il titolo della risposta
   (il primo ###) 27 px, i sottotitoli 23, il grassetto 700: il testo resta a 14. */
.msg-ai .body > h3:first-child { font-size: 27px; line-height: 1.22; font-weight: 650; letter-spacing: -.02em; margin: 0 0 12px; }
.msg-ai .body h3 { font-size: 23px; line-height: 1.25; }
.msg-ai .body > h3:first-child ~ h3 { margin-top: 32px; }
.msg-ai .body strong { font-weight: 700; color: var(--ink); }
