/* ==========================================================================
   Atrio — sistema di stile unico del prototipo.
   Direzione: vetro liquido. Superfici chiare che galleggiano, raggi molto
   ampi, bordo di luce, sfocatura con rifrazione. Tipografia di sistema (SF),
   numeri grandi e leggibili. Il colore si usa solo per il fuoco: l azione
   principale, lo stato che richiede una decisione, la variazione.
   Nessun font esterno, nessuna libreria, nessuna immagine: solo questo file.
   Le pagine non aggiungono CSS: se manca un componente, si aggiunge qui.
   Indice
     01 Token           07 Tabelle
     02 Base e fondale  08 Scala dei mille e grafici
     03 Guscio          09 Moduli (IA, audio, flusso, palazzina)
     04 Testata         10 Telefoni (app Flutter)
     05 Pannelli        11 Sito pubblico e centro demo
     06 Controlli       12 Utilita, responsivo, stampa
   ========================================================================== */

/* ============================== 01 Token ============================== */

:root {
  /* marca: riscritta da theme-boot.js secondo lo studio attivo */
  --brand: #0F6B5C;
  --brand-ink: #0A4A40;
  --brand-rgb: 15, 107, 92;
  --brand-weak: rgba(15, 107, 92, .12);
  --brand-soft: rgba(15, 107, 92, .07);
  --brand-on: #FFFFFF;

  --brass: #A9873F;
  --brass-weak: rgba(169, 135, 63, .14);
  --brass-ink: #6F5520;    /* testo su fondo ottone tenue */
  --brass-solid: #7E6023;  /* fondo ottone pieno sotto testo bianco: 5,9:1 */

  --ink: #10201C;
  --ink-2: #3B4E49;
  --ink-3: #54645E;
  --ink-4: #4F5F59;
  --paper: #EDF1EF;

  /* materiali in vetro liquido */
  --glass: rgba(255, 255, 255, .80);
  --glass-2: rgba(255, 255, 255, .58);
  --glass-strong: rgba(255, 255, 255, .94);
  --glass-dim: rgba(255, 255, 255, .40);
  --blur: saturate(185%) blur(28px);
  --blur-sm: saturate(170%) blur(14px);
  --hair: rgba(16, 32, 28, .08);
  --hair-2: rgba(16, 32, 28, .05);

  /* bordo di luce: e cio che fa sembrare vetro invece di carta */
  --rim:
    inset 0 1px 0 rgba(255, 255, 255, .92),
    inset 1px 0 0 rgba(255, 255, 255, .55),
    inset -1px 0 0 rgba(255, 255, 255, .40),
    inset 0 -1px 0 rgba(255, 255, 255, .30);
  --lens: linear-gradient(152deg,
    rgba(255, 255, 255, .50) 0%, rgba(255, 255, 255, .10) 34%,
    rgba(255, 255, 255, 0) 58%, rgba(255, 255, 255, .20) 100%);
  --gloss: var(--rim);

  --shadow-1: 0 2px 8px rgba(16, 32, 28, .04), 0 14px 30px -20px rgba(16, 32, 28, .28);
  --shadow-2: 0 4px 14px rgba(16, 32, 28, .07), 0 30px 48px -26px rgba(16, 32, 28, .42);
  --shadow-3: 0 6px 16px -8px rgba(16, 32, 28, .34);   /* elevazione neutra, nessun alone colorato */

  /* compatibilita con i nomi gia usati nelle pagine */
  --card: var(--glass);
  --card-2: var(--glass-2);
  --line: var(--hair);
  --line-2: var(--hair-2);

  /* --x e per i riempimenti, --x-ink per il testo sul fondo tenue (contrasto AA) */
  --ok: #1E8A5B;      --ok-weak: rgba(30, 138, 91, .14);    --ok-ink: #1A6D49;
  --warn: #BE830F;    --warn-weak: rgba(190, 131, 15, .16); --warn-ink: #7E5610;
  --danger: #C9381C;  --danger-weak: rgba(201, 56, 28, .13);--danger-ink: #97301B;
  --info: #2E6FC4;    --info-weak: rgba(46, 111, 196, .13); --info-ink: #27568F;
  --plum: #7B4A68;
  --sage: #7E9B8A;

  --nav-bg: rgba(255, 255, 255, .62);
  --nav-ink: #3B4E49;
  --nav-ink-strong: #10201C;

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, "Helvetica Neue", Arial, sans-serif;
  --display: var(--sans);
  --serif: var(--sans);   /* alias storico: la direzione ora e tutta in SF */

  --r-panel: 24px;
  --r-card: 20px;
  --r-field: 14px;
  --r-ctl: 999px;
  --r-sm: 12px;
  --nav-w: 252px;
  --top-h: 60px;
  --measure: 68ch;
  --gut: 16px;
}

:root[data-theme="dark"] {
  --brand-weak: rgba(var(--brand-rgb), .22);
  --brand-soft: rgba(var(--brand-rgb), .12);

  --brass-weak: rgba(169, 135, 63, .20);
  --brass-ink: #E0C083;
  --brass-solid: #8A6A28;

  --ink: #EAF0ED;
  --ink-2: #B7C6C0;
  --ink-3: #96A6A0;
  --ink-4: #85958F;
  --paper: #080F0E;

  --glass: rgba(34, 45, 42, .66);
  --glass-2: rgba(34, 45, 42, .44);
  --glass-strong: rgba(38, 50, 46, .90);
  --glass-dim: rgba(255, 255, 255, .07);
  --hair: rgba(255, 255, 255, .10);
  --hair-2: rgba(255, 255, 255, .06);

  --rim:
    inset 0 1px 0 rgba(255, 255, 255, .16),
    inset 1px 0 0 rgba(255, 255, 255, .07),
    inset -1px 0 0 rgba(255, 255, 255, .05),
    inset 0 -1px 0 rgba(255, 255, 255, .04);
  --lens: linear-gradient(152deg,
    rgba(255, 255, 255, .10) 0%, rgba(255, 255, 255, .03) 36%,
    rgba(255, 255, 255, 0) 60%, rgba(255, 255, 255, .05) 100%);

  --shadow-1: 0 2px 10px rgba(0, 0, 0, .34), 0 20px 44px -24px rgba(0, 0, 0, .7);
  --shadow-3: 0 6px 18px -8px rgba(0, 0, 0, .66);  /* nel tema scuro niente aloni colorati */
  --shadow-2: 0 6px 18px rgba(0, 0, 0, .44), 0 32px 54px -28px rgba(0, 0, 0, .86);

  --ok-weak: rgba(30, 138, 91, .24);    --ok-ink: #63C795;
  --warn-weak: rgba(190, 131, 15, .26); --warn-ink: #E0AE4E;
  --danger-weak: rgba(201, 56, 28, .26);--danger-ink: #F0907A;
  --info-weak: rgba(46, 111, 196, .28); --info-ink: #85B2EA;

  --nav-bg: rgba(22, 30, 28, .62);
  --nav-ink: #B2C2BC;
  --nav-ink-strong: #FFFFFF;
}

/* ========================= 02 Base e fondale ========================= */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; background: var(--paper); }

body {
  margin: 0;
  color: var(--ink);
  font: 15px/1.55 var(--sans);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -.006em;
  min-height: 100vh;
}

/* il velo di colore che il vetro raccoglie e rifrange */
body::before {
  content: "";
  position: fixed; inset: -14%;
  z-index: -1; pointer-events: none;
  background:
    radial-gradient(46vw 46vw at 4% -6%, rgba(var(--brand-rgb), .32), transparent 62%),
    radial-gradient(34vw 34vw at 98% 2%, rgba(169, 135, 63, .20), transparent 60%),
    radial-gradient(54vw 42vw at 76% 104%, rgba(var(--brand-rgb), .20), transparent 64%),
    radial-gradient(40vw 32vw at 20% 92%, rgba(126, 155, 138, .22), transparent 66%);
}
:root[data-theme="dark"] body::before { opacity: .5; }

h1, h2, h3, h4 { font-family: var(--display); margin: 0; }
h1 { font-size: 30px; line-height: 1.12; font-weight: 700; letter-spacing: -.032em; }
h2 { font-size: 22px; line-height: 1.22; font-weight: 700; letter-spacing: -.026em; }
h3 { font-size: 16.5px; line-height: 1.3; font-weight: 650; letter-spacing: -.016em; }
/* la misura la decide il posto, non il livello: la gerarchia dei titoli resta
   corretta per i lettori di schermo senza cambiare l aspetto */
.panel-head h2, .sheet-head h2, .ai-head h2, .tile h2, .section-head h3 {
  font-size: 16.5px; line-height: 1.3; font-weight: 650; letter-spacing: -.016em;
}
.panel-head h4, .tile h3, .site-feat h4 { font-size: 14.5px; line-height: 1.35; font-weight: 650; }
h4 { font-size: 14.5px; line-height: 1.35; font-weight: 650; letter-spacing: -.012em; }

p { margin: 0 0 10px; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

a { color: var(--brand); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

small { font-size: 12.5px; }
strong { font-weight: 650; }
hr { border: 0; border-top: 1px solid var(--hair); margin: 18px 0; }

:focus-visible { outline: 2.5px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
::selection { background: rgba(var(--brand-rgb), .20); color: var(--ink); }

.muted { color: var(--ink-3); }
.meta { color: var(--ink-3); font-size: 13px; }
.lede { font-size: 17px; line-height: 1.5; color: var(--ink-2); max-width: var(--measure); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.serif, .display { font-family: var(--display); font-weight: 700; letter-spacing: -.028em; }

/* vetro liquido riutilizzabile */
.glass {
  background: var(--lens), var(--glass);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border-radius: var(--r-panel);
  box-shadow: var(--rim), var(--shadow-1);
}

/* Riferimento normativo: presente, mai urlato */
.norm {
  font-size: 12px; color: var(--ink-3); font-family: var(--sans);
  border-left: 2px solid var(--brass); padding-left: 7px; display: inline-block;
}
.norm a { color: inherit; }

/* ============================== 03 Guscio ============================== */

.shell { display: flex; min-height: 100vh; padding: 12px; gap: 12px; }

.nav {
  width: var(--nav-w); flex: 0 0 var(--nav-w);
  background: var(--lens), var(--nav-bg); color: var(--nav-ink);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  display: flex; flex-direction: column;
  position: sticky; top: 12px; height: calc(100vh - 24px); overflow-y: auto;
  border-radius: var(--r-panel); box-shadow: var(--rim), var(--shadow-1);
}

.nav-brand {
  display: flex; align-items: center; gap: 11px; overflow: hidden;
  padding: 16px 16px 14px; margin: 0 4px;
}
.nav-brand:hover { text-decoration: none; }
.nav-brand-mark { flex: 0 0 34px; width: 34px; height: 34px; display: block; }
.nav-brand-text { min-width: 0; }
.nav-brand-name {
  font-family: var(--display); font-size: 16px; font-weight: 700; letter-spacing: -.024em;
  color: var(--nav-ink-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.2; display: block;
}
.nav-brand-role { font-size: 12px; color: var(--ink-3); display: block; }

.nav-scroll { flex: 1 1 auto; padding: 4px 10px 18px; }
.nav-group {
  padding: 15px 10px 5px; font-size: 12px; color: var(--ink-4); font-weight: 600; letter-spacing: -.004em;
}

.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; color: var(--nav-ink); border-radius: var(--r-ctl);
  font-size: 13.5px; font-weight: 500; line-height: 1.35; margin-bottom: 2px;
}
.nav-item:hover { background: var(--glass-dim); color: var(--nav-ink-strong); text-decoration: none; }
.nav-item svg { flex: 0 0 18px; opacity: .72; }
.nav-item.is-active {
  background: var(--brand); color: #fff; font-weight: 600;
  box-shadow: var(--shadow-3), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.nav-item.is-active svg { opacity: 1; }
.nav-count {
  margin-left: auto; font-size: 12px; font-weight: 600; padding: 0 7px; border-radius: 999px;
  background: var(--glass-dim); color: var(--ink-2); line-height: 18px;
}
.nav-item.is-active .nav-count { background: rgba(255, 255, 255, .28); color: #fff; }
.nav-count.is-hot { background: var(--danger); color: #fff; }
/* voce non compresa nel piano dello studio: si vede, non si usa */
.nav-item.is-locked { opacity: .45; }
.nav-item.is-locked:hover { opacity: .7; background: none; }
.nav-item.is-locked .nav-count { background: none; padding: 0; }

.nav-foot {
  padding: 12px 14px; margin: auto 6px 6px; border-radius: var(--r-card);
  background: var(--glass-dim);
  display: flex; align-items: center; gap: 10px; font-size: 13px;
}
.nav-foot > span:last-child { min-width: 0; }
.nav-foot-name {
  display: block; color: var(--nav-ink-strong); font-size: 13px; font-weight: 600; line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-foot-role { display: block; font-size: 12px; color: var(--ink-3); line-height: 1.2; }

.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

/* ============================= 04 Testata ============================= */

.topbar {
  min-height: var(--top-h); flex: 0 0 auto;
  background: var(--lens), var(--glass);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border-radius: var(--r-panel); box-shadow: var(--rim), var(--shadow-1);
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  position: sticky; top: 12px; z-index: 30; margin-bottom: 16px;
}

.topbar-ctx { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ctx-pick {
  display: flex; align-items: center; gap: 8px; padding: 7px 14px;
  border: 0; border-radius: var(--r-ctl); background: var(--glass-dim);
  color: var(--ink); font: inherit; font-size: 13.5px; cursor: pointer; max-width: 340px;
}
.ctx-pick:hover { background: var(--glass-strong); box-shadow: var(--rim); }
.ctx-pick b { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctx-pick .meta { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.topbar-search {
  flex: 1 1 auto; max-width: 320px; display: flex; align-items: center; gap: 8px;
  border-radius: var(--r-ctl); padding: 7px 14px;
  color: var(--ink-3); background: var(--glass-dim);
}
.topbar-search:focus-within { background: var(--glass-strong); box-shadow: var(--rim); }
.topbar-search input {
  border: 0; background: none; font: inherit; font-size: 13.5px; color: var(--ink);
  width: 100%; outline: none;
}
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 4px; }

.icon-btn {
  width: 36px; height: 36px; border: 0; border-radius: 999px;
  background: none; color: var(--ink-2); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; position: relative;
}
.icon-btn:hover { background: var(--glass-strong); box-shadow: var(--rim); color: var(--ink); }
.icon-btn .ping {
  position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 999px;
  background: var(--danger); box-shadow: 0 0 0 2px var(--glass-strong);
}

.nav-toggle { display: none; }
.topbar-ospite { margin-left: 4px; }
.topbar-sep { flex: 1 1 auto; }
/* avviso dei comandi non collegati: e un prototipo, lo dice */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  z-index: 90; display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: 999px; max-width: min(92vw, 560px);
  background: var(--lens), var(--glass-strong);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--rim), var(--shadow-2); font-size: 13.5px; color: var(--ink);
}
.toast svg { color: var(--brand); flex: 0 0 15px; }
.toast.is-out { opacity: 0; transition: opacity .4s ease; }
@media (max-width: 1180px) { .topbar-ospite { display: none; } }

/* commutatore di studio (dimostrazione white-label) */
.brand-switch { position: relative; }
.brand-switch-menu {
  position: absolute; right: 0; top: calc(100% + 10px); width: 286px; z-index: 60;
  background: var(--lens), var(--glass-strong);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border-radius: var(--r-card);
  box-shadow: var(--rim), var(--shadow-2); padding: 7px; display: none;
}
.brand-switch.is-open .brand-switch-menu { display: block; }
.brand-switch-menu .bs-head {
  padding: 9px 11px 8px; font-size: 12px; color: var(--ink-3); margin-bottom: 2px;
}
.bs-item {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 11px;
  border: 0; background: none; border-radius: var(--r-sm); cursor: pointer; text-align: left;
  color: var(--ink); font: inherit;
}
.bs-item:hover { background: var(--glass-dim); }
.bs-item.is-active { background: var(--brand-weak); }
.bs-name { font-size: 13.5px; font-weight: 600; display: block; }
.bs-sub { font-size: 12px; color: var(--ink-3); display: block; }
.role-now { font-weight: 650; }
.role-ico {
  display: inline-flex; width: 30px; height: 30px; flex: 0 0 30px; border-radius: 999px;
  background: var(--glass-dim); align-items: center; justify-content: center; color: var(--ink-2);
}
a.bs-item, a.bs-item:hover { text-decoration: none; color: var(--ink); }
.bs-item.is-active .role-ico { background: var(--brand); color: #fff; }
/* campioni delle marche: utilizzabili dalle pagine senza stile in linea */
.swatch--alfa { background: #0F6B5C; }
.swatch--delta { background: #1F4F8F; }
.swatch--meridiana { background: #A14A2A; }
.swatch--casaco { background: #4E6B2A; }
.swatch--atrio { background: #0E5247; }
.swatch--corrente { background: var(--brand); }
.swatch {
  width: 20px; height: 20px; border-radius: 999px; flex: 0 0 20px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .10), inset 0 1.5px 0 rgba(255, 255, 255, .45);
}

/* area di lavoro */
.work { flex: 1 1 auto; padding: 4px 10px 48px; max-width: 1480px; width: 100%; }

.page-head { margin-bottom: 18px; padding: 0 4px; }
.page-head-row { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.page-head h1 { flex: 1 1 auto; min-width: 240px; }
.page-head-sub {
  margin-top: 7px; color: var(--ink-3); font-size: 13.5px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
}
.page-head-sub > span { display: inline-flex; align-items: center; gap: 6px; }
.page-head-sub > span + span::before {
  content: ""; width: 3px; height: 3px; border-radius: 999px; background: var(--ink-4); opacity: .7;
}
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.section { margin: 28px 0 0; }
.section-head {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 0 4px;
  margin-bottom: 14px;
}
.section-head h2 { flex: 1 1 auto; }
.section-head .meta { flex: 0 0 auto; }

.foot {
  padding: 18px 16px 6px; color: var(--ink-4);
  font-size: 12.5px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
}
.foot a { color: var(--ink-3); font-weight: 400; }

/* ============================ 05 Pannelli ============================ */

.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gut); }
.c3 { grid-column: span 3; } .c4 { grid-column: span 4; } .c5 { grid-column: span 5; }
.c6 { grid-column: span 6; } .c7 { grid-column: span 7; } .c8 { grid-column: span 8; }
.c9 { grid-column: span 9; } .c12 { grid-column: span 12; }
.stack { display: flex; flex-direction: column; gap: var(--gut); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row-tight { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.push { margin-left: auto; }

.panel {
  background: var(--lens), var(--glass);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border-radius: var(--r-panel); box-shadow: var(--rim), var(--shadow-1);
  min-width: 0; display: flex; flex-direction: column;
}
.panel-head {
  display: flex; align-items: center; gap: 12px; padding: 16px 20px 12px;
}
.panel-head h3 { flex: 1 1 auto; min-width: 0; }
.panel-head .meta { flex: 0 0 auto; }
.panel-body { padding: 4px 20px 20px; flex: 1 1 auto; min-width: 0; }
.panel-body.is-flush { padding: 0 10px; }
.panel-body.is-flush > .table-scroll { padding-left: 0; padding-right: 0; }
.panel > .panel-body.is-flush:first-child { padding-top: 10px; }
.panel > .panel-body.is-flush:last-child { padding-bottom: 10px; }
/* rete di sicurezza per contenuto messo nel pannello senza .panel-body */
.panel > p, .panel > ul, .panel > ol, .panel > dl, .panel > .kv,
.panel > .list, .panel > .hbars, .panel > .timeline { padding-left: 20px; padding-right: 20px; }
.panel > .table-scroll { padding-left: 6px; padding-right: 6px; }
.panel > :last-child:not(.panel-foot) { padding-bottom: 16px; }
.panel-foot {
  padding: 13px 20px; margin-top: auto; border-top: 1px solid var(--hair-2);
  display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--ink-3);
}
.panel--brand { box-shadow: var(--rim), var(--shadow-1), inset 0 0 0 1.5px rgba(var(--brand-rgb), .35); }
.panel--quiet { background: var(--glass-2); box-shadow: var(--rim); }
/* lastra con velo di colore: per il pannello che deve attirare lo sguardo */
.panel--hero {
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(var(--brand-rgb), .20), transparent 60%),
    radial-gradient(100% 80% at 0% 100%, rgba(169, 135, 63, .14), transparent 62%),
    var(--lens), var(--glass-strong);
}

/* cifre di testata: schede separate, numeri grandi, colore solo dove serve */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); gap: var(--gut); }
.stat {
  padding: 16px 18px 17px; min-width: 0; border-radius: var(--r-card);
  background: var(--lens), var(--glass);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--rim), var(--shadow-1);
}
.stat-label { font-size: 12.5px; color: var(--ink-3); margin-bottom: 6px; font-weight: 500; }
.stat-value {
  font-family: var(--display); font-size: 32px; line-height: 1.05; font-weight: 700;
  letter-spacing: -.034em; display: flex; align-items: baseline; gap: 6px;
}
.stat-value small { font-size: 13px; font-weight: 500; color: var(--ink-3); letter-spacing: -.01em; }
.stat-note { font-size: 12px; color: var(--ink-3); margin-top: 8px; line-height: 1.4; }
.stat-delta {
  font-size: 12px; font-weight: 650; display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px; border-radius: 999px; background: var(--glass-dim); color: var(--ink-2);
}
.stat-delta.is-up { color: var(--ok-ink); background: var(--ok-weak); }
.stat-delta.is-down { color: var(--danger-ink); background: var(--danger-weak); }
.stat-delta.is-flat { color: var(--ink-3); }
.stat--accent { background: var(--lens), rgba(var(--brand-rgb), .13); }
.stat--warn { background: var(--lens), var(--warn-weak); }
.stat--danger { background: var(--lens), var(--danger-weak); }

/* coppie etichetta/valore */
.kv { display: grid; grid-template-columns: minmax(130px, 40%) 1fr; }
.kv > dt, .kv > dd { padding: 9px 0; border-bottom: 1px solid var(--hair-2); margin: 0; min-width: 0; }
.kv > dt { color: var(--ink-3); font-size: 13.5px; padding-right: 12px; }
.kv > dd { font-size: 14px; font-weight: 500; }
.kv > dt:last-of-type, .kv > dd:last-of-type { border-bottom: 0; }
.kv--tight > dt, .kv--tight > dd { padding: 6px 0; font-size: 13px; }

/* elenchi */
.list { list-style: none; margin: 0; padding: 6px; }
.list > li {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px;
  border-radius: var(--r-card);
}
.list > li + li { box-shadow: 0 -1px 0 var(--hair-2); }
.list > li:hover { background: var(--glass-dim); box-shadow: none; }
.list > li:hover + li { box-shadow: none; }
.list > li.is-sel { background: rgba(var(--brand-rgb), .10); box-shadow: none; }
.list-main { flex: 1 1 auto; min-width: 0; }
.list-title { display: block; font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.list-sub { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.list-side { flex: 0 0 auto; text-align: right; font-size: 13px; }

.initials {
  width: 32px; height: 32px; flex: 0 0 32px; border-radius: 999px;
  background: rgba(var(--brand-rgb), .15); color: var(--brand-ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; letter-spacing: .01em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5);
}
.initials--sm { width: 25px; height: 25px; flex-basis: 25px; font-size: 11px; }
.initials--brass { background: var(--brass-weak); color: var(--brass-ink); }

/* riquadri persona / fornitore */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(262px, 1fr)); gap: 14px; }
.tile {
  border-radius: var(--r-card); padding: 16px; background: var(--glass-2);
  min-width: 0; box-shadow: var(--rim);
}
.tile:hover { background: var(--glass); box-shadow: var(--rim), var(--shadow-1); }
.tile-head { display: flex; align-items: center; gap: 11px; margin-bottom: 11px; }
.tile-name { display: block; font-size: 14.5px; font-weight: 650; line-height: 1.25; letter-spacing: -.014em; }
.tile-sub { display: block; font-size: 12.5px; color: var(--ink-3); }
.tile--flag { box-shadow: var(--rim), inset 0 0 0 1.5px rgba(201, 56, 28, .45); }

/* avvisi */
.notice {
  border-radius: var(--r-card); padding: 15px 17px; background: var(--glass-2);
  font-size: 13.5px; box-shadow: var(--rim); position: relative; overflow: hidden;
}
.notice::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--ink-4); }
.notice-title { font-weight: 650; font-size: 14.5px; margin-bottom: 4px; letter-spacing: -.014em; }
.notice--warn { background: var(--warn-weak); }
.notice--warn::before { background: var(--warn); }
.notice--danger { background: var(--danger-weak); }
.notice--danger::before { background: var(--danger); }
.notice--ok { background: var(--ok-weak); }
.notice--ok::before { background: var(--ok); }
.notice--info { background: var(--info-weak); }
.notice--info::before { background: var(--info); }
.notice--brass { background: var(--brass-weak); }
.notice--brass::before { background: var(--brass); }

/* dentro un pannello un avviso non e una scheda: niente rilievo proprio */
.panel .notice, .panel .tile, .panel .quorum, .panel .audio { box-shadow: none; }
.panel .filters { background: none; border-bottom: 1px solid var(--hair-2); border-radius: 0; margin: 0; }
.empty { padding: 40px 20px; text-align: center; color: var(--ink-3); }
.empty h3 { margin-bottom: 6px; color: var(--ink); }

/* ============================ 06 Controlli ============================ */

.btn {
  display: inline-flex; align-items: center; gap: 7px; justify-content: center;
  padding: 9px 17px; border-radius: var(--r-ctl); border: 0;
  background: var(--glass-strong); color: var(--ink); font: inherit; font-size: 13.5px;
  font-weight: 600; letter-spacing: -.012em; cursor: pointer; line-height: 1.3; text-decoration: none;
  -webkit-backdrop-filter: var(--blur-sm); backdrop-filter: var(--blur-sm);
  box-shadow: var(--rim), var(--shadow-1);
}
.btn:hover { text-decoration: none; filter: brightness(1.03); box-shadow: var(--rim), var(--shadow-2); }
.btn:active { transform: scale(.985); }
.btn svg { flex: 0 0 16px; }
.btn--primary {
  background: var(--brand); color: var(--brand-on);
  box-shadow: var(--shadow-3), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.btn--primary:hover { background: var(--brand-ink); }
.btn--brass {
  background: var(--brass-solid); color: #fff;
  box-shadow: var(--shadow-3), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.btn--brass:hover { filter: brightness(.96); }
.btn--danger { color: var(--danger-ink); background: var(--danger-weak); box-shadow: var(--rim); }
.btn--danger:hover { background: var(--danger-weak); filter: brightness(.98); }
.btn--ghost { background: none; color: var(--brand); box-shadow: none; }
.btn--ghost:hover { background: rgba(var(--brand-rgb), .10); box-shadow: none; }
.btn--sm { padding: 5px 12px; font-size: 12.5px; }
.btn--lg { padding: 12px 22px; font-size: 15px; }
.btn--block { width: 100%; }
.btn--round { width: 40px; height: 40px; padding: 0; border-radius: 999px; }
.btn[disabled], .btn.is-disabled { opacity: .4; cursor: not-allowed; }
.btn-group { display: inline-flex; background: var(--glass-dim); border-radius: var(--r-ctl); padding: 3px; gap: 3px; }
.btn-group .btn { background: none; box-shadow: none; font-weight: 500; }
.btn-group .btn.is-active { background: var(--glass-strong); box-shadow: var(--rim), var(--shadow-1); font-weight: 600; }

.pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px;
  border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.6;
  background: var(--glass-dim); color: var(--ink-2); white-space: nowrap; letter-spacing: -.008em;
}
.pill--ok { background: var(--ok-weak); color: var(--ok-ink); }
.pill--warn { background: var(--warn-weak); color: var(--warn-ink); }
.pill--danger { background: var(--danger-weak); color: var(--danger-ink); }
.pill--info { background: var(--info-weak); color: var(--info-ink); }
.pill--brand { background: rgba(var(--brand-rgb), .14); color: var(--brand-ink); }
.pill--brass { background: var(--brass-weak); color: var(--brass-ink); }
.pill--line { background: none; box-shadow: inset 0 0 0 1px var(--hair); color: var(--ink-3); }
.pill--solid { background: var(--brand); color: #fff; box-shadow: var(--shadow-3); }

.dot { width: 9px; height: 9px; border-radius: 999px; background: var(--ink-4); flex: 0 0 9px; display: inline-block; }
.dot--ok { background: var(--ok); } .dot--warn { background: var(--warn); }
.dot--danger { background: var(--danger); } .dot--info { background: var(--info); }
.dot--brand { background: var(--brand); } .dot--brass { background: var(--brass); }

.tabs {
  display: inline-flex; gap: 3px; padding: 4px; margin-bottom: 18px;
  background: var(--glass-2); border-radius: var(--r-ctl);
  box-shadow: var(--rim); overflow-x: auto; scrollbar-width: none; max-width: 100%;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 7px 15px; border: 0; background: none; font: inherit; font-size: 13.5px;
  color: var(--ink-3); cursor: pointer; border-radius: 999px; white-space: nowrap; font-weight: 500;
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--ink); background: var(--glass-strong); box-shadow: var(--rim), var(--shadow-1); font-weight: 650; }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

/* campi */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.label { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.input, .select, .textarea {
  border: 0; border-radius: var(--r-field); padding: 10px 14px;
  font: inherit; font-size: 14px; background: var(--glass-dim); color: var(--ink); width: 100%;
  box-shadow: inset 0 0 0 1px var(--hair);
}
.input:hover, .select:hover, .textarea:hover { background: var(--glass-2); }
.input:focus, .select:focus, .textarea:focus { background: var(--glass-strong); }
.textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 30px; cursor: pointer; }
.hint { font-size: 12px; color: var(--ink-3); }
.check { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; }
.check input { margin: 3px 0 0; accent-color: var(--brand); width: 17px; height: 17px; }
.input-group { display: flex; gap: 6px; }
.range { width: 100%; accent-color: var(--brand); }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track {
  width: 42px; height: 25px; border-radius: 999px; background: var(--hair);
  position: relative; transition: background .2s ease; flex: 0 0 42px;
  box-shadow: inset 0 1px 3px rgba(16, 32, 28, .14);
}
.switch-track::after {
  content: ""; position: absolute; top: 2.5px; left: 2.5px; width: 20px; height: 20px;
  border-radius: 999px; background: #fff; transition: transform .2s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}
.switch input:checked + .switch-track { background: var(--brand); }
.switch input:checked + .switch-track::after { transform: translateX(17px); }
.switch input:focus-visible + .switch-track { outline: 2.5px solid var(--brand); outline-offset: 3px; }

/* barra filtri */
.filters {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  padding: 12px 16px; margin: 0 6px; border-radius: var(--r-card); background: var(--glass-dim);
}
.filters .select, .filters .input { width: auto; min-width: 140px; font-size: 13px; padding: 7px 12px; }

/* ============================= 07 Tabelle ============================= */

.table-scroll { overflow-x: auto; padding: 0 10px 8px; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th, .table td { text-align: left; padding: 12px 14px; vertical-align: top; }
.table tbody tr + tr td { box-shadow: 0 -1px 0 var(--hair-2); }
.table thead th {
  font-size: 12px; font-weight: 600; color: var(--ink-3); padding-top: 8px; padding-bottom: 8px;
  white-space: nowrap; position: sticky; top: 0; z-index: 2;
  background: var(--glass-strong);
  -webkit-backdrop-filter: var(--blur-sm); backdrop-filter: var(--blur-sm);
}
.table tbody tr:hover td { background: rgba(var(--brand-rgb), .06); box-shadow: none; }
.table tbody tr:hover + tr td { box-shadow: none; }
.table tbody tr td:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.table tbody tr td:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.table tbody tr.is-sel td { background: rgba(var(--brand-rgb), .10); box-shadow: none; }
.table tbody tr.is-flag td { background: var(--danger-weak); box-shadow: none; }
.table td.num, .table th.num { text-align: right; }
.table tfoot td { font-weight: 700; background: var(--glass-dim); padding: 12px 14px; }
.table tfoot tr td:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.table tfoot tr td:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.table--tight th, .table--tight td { padding: 8px 11px; font-size: 13px; }
.t-sub { display: block; font-size: 12px; color: var(--ink-3); margin-top: 3px; font-weight: 400; }
.t-main { font-weight: 600; letter-spacing: -.01em; }
.table-note { padding: 12px 20px 16px; font-size: 12.5px; color: var(--ink-3); }
.col-w { width: 1%; white-space: nowrap; }

/* ==================== 08 Scala dei mille e grafici ==================== */

/* Il dispositivo ricorrente: ogni quota e una frazione di mille. */
.mill { display: block; }
.mill-head { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; color: var(--ink-3); margin-bottom: 7px; }
.mill-head b { color: var(--ink); font-size: 15px; font-family: var(--display); font-weight: 700; letter-spacing: -.026em; }
.mill-track {
  position: relative; height: 12px; background: var(--glass-dim); border-radius: 999px;
  overflow: hidden; box-shadow: inset 0 1px 3px rgba(16, 32, 28, .12);
}
.mill-fill { position: absolute; inset: 0 auto 0 0; background: var(--brand); border-radius: 999px; }
.mill-fill--brass { background: var(--brass); }
.mill-fill--danger { background: var(--danger); }
.mill-fill--ok { background: var(--ok); }
.mill-fill--warn { background: var(--warn); }
.mill-fill--quiet { background: var(--sage); }
.mill-tick { position: absolute; top: -3px; bottom: -3px; width: 1.5px; background: var(--ink-2); opacity: .45; }
.mill-tick::after {
  content: attr(data-label); position: absolute; top: -16px; left: -2px;
  font-size: 11px; color: var(--ink-3); white-space: nowrap;
}
.mill-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-4); margin-top: 5px; }
.mill--lg .mill-track { height: 18px; }
.mill--sm .mill-track { height: 7px; }
.mill--row { display: flex; align-items: center; gap: 10px; }
.mill--row .mill-track { flex: 1 1 auto; min-width: 70px; }
.mill--row .mill-val { flex: 0 0 auto; font-size: 12.5px; color: var(--ink-2); min-width: 54px; text-align: right; font-weight: 600; }

/* barra segmentata: 12 unita su 1000 */
.mill-seg {
  display: flex; height: 18px; border-radius: 999px; overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(16, 32, 28, .14);
}
.mill-seg span { border-right: 1.5px solid rgba(255, 255, 255, .7); display: block; min-width: 1px; }
.mill-seg span:last-child { border-right: 0; }
.mill-legend { display: flex; flex-wrap: wrap; gap: 5px 14px; margin-top: 11px; font-size: 12px; color: var(--ink-3); }
.mill-legend span { display: inline-flex; align-items: center; gap: 6px; }
.mill-legend i { width: 10px; height: 10px; border-radius: 999px; display: inline-block; }

/* misuratore del quorum */
.quorum { border-radius: var(--r-card); padding: 16px; background: var(--glass-2); box-shadow: var(--rim); }
.quorum-row + .quorum-row { margin-top: 16px; }
.quorum-nums { display: flex; align-items: baseline; gap: 8px; margin-bottom: 7px; }
.quorum-nums b { font-family: var(--display); font-size: 25px; font-weight: 700; letter-spacing: -.03em; }

/* grafici disegnati a mano in SVG */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font-family: var(--sans); font-size: 11px; fill: var(--ink-3); }
.chart .axis { stroke: var(--hair); stroke-width: 1; }
.chart .grid-line { stroke: var(--hair-2); stroke-width: 1; }
.chart .series-brand { fill: var(--brand); stroke: var(--brand); }
.chart .series-brass { fill: var(--brass); stroke: var(--brass); }
.chart .series-danger { fill: var(--danger); stroke: var(--danger); }
.chart .series-info { fill: var(--info); stroke: var(--info); }
.chart .series-sage { fill: var(--sage); stroke: var(--sage); }
.chart .series-plum { fill: var(--plum); stroke: var(--plum); }
.chart .line { fill: none; stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { stroke: none; opacity: .14; }

/* campioni di colore per legende e tabelle: evitano lo stile in linea */
.sw-brand { background: var(--brand); }
.sw-brand-2 { background: rgba(var(--brand-rgb), .72); }
.sw-brand-3 { background: rgba(var(--brand-rgb), .48); }
.sw-brass { background: var(--brass); }
.sw-ok { background: var(--ok); }
.sw-warn { background: var(--warn); }
.sw-danger { background: var(--danger); }
.sw-info { background: var(--info); }
.sw-sage { background: var(--sage); }
.sw-plum { background: var(--plum); }
.sw-line { background: var(--hair); }

.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ink-3); margin-top: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 999px; display: inline-block; }

/* barre orizzontali in HTML (confronti semplici) */
.hbars { display: flex; flex-direction: column; gap: 12px; }
.hbar { display: grid; grid-template-columns: minmax(96px, 30%) 1fr auto; gap: 12px; align-items: center; font-size: 13px; }
.hbar-track {
  height: 10px; background: var(--glass-dim); border-radius: 999px; overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(16, 32, 28, .12);
}
.hbar-fill { height: 100%; background: var(--brand); border-radius: 999px; }
.hbar-fill--brass { background: var(--brass); }
.hbar-fill--danger { background: var(--danger); }
.hbar-fill--sage { background: var(--sage); }
.hbar-val { font-size: 12.5px; color: var(--ink-2); min-width: 62px; text-align: right; font-weight: 600; }

/* ============================== 09 Moduli ============================== */

/* blocco IA: ottone su vetro, sempre con fonte e comandi */
.ai {
  border-radius: var(--r-panel); background: var(--lens), var(--brass-weak);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--rim), var(--shadow-1), inset 0 0 0 1.5px rgba(169, 135, 63, .3);
  overflow: hidden;
}
.ai-head {
  display: flex; align-items: center; gap: 10px; padding: 15px 20px 11px;
  font-size: 14px; font-weight: 650; letter-spacing: -.014em;
}
.ai-head svg { color: var(--brass-ink); flex: 0 0 18px; }
.ai-head .pill { margin-left: auto; }
.ai-body { padding: 4px 20px 18px; font-size: 13.5px; }
.ai-body p { max-width: 64ch; }
.ai-source { margin-top: 13px; padding-top: 12px; border-top: 1px solid rgba(169, 135, 63, .25); font-size: 12px; color: var(--ink-3); }
.ai-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.ai--inline { border-radius: var(--r-card); }
.ai--inline .ai-body { padding: 4px 15px 13px; font-size: 13px; }

/* registrazione audio: onda, trascrizione, bozza di verbale */
.audio {
  display: flex; align-items: center; gap: 15px; padding: 15px 17px;
  border-radius: var(--r-card); background: var(--glass-2); box-shadow: var(--rim);
}
.audio-play {
  width: 46px; height: 46px; flex: 0 0 46px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-3), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.audio-main { flex: 1 1 auto; min-width: 0; }
.audio-wave { display: flex; align-items: center; gap: 2.5px; height: 32px; margin: 5px 0 6px; }
.audio-wave i {
  flex: 1 1 auto; background: var(--brand); opacity: .28; border-radius: 999px; min-width: 2px; display: block;
  height: 34%;
}
/* il profilo dell onda e un ritmo ripetuto: nessuna altezza scritta nella pagina */
.audio-wave i:nth-child(2n) { height: 58%; }
.audio-wave i:nth-child(3n) { height: 86%; }
.audio-wave i:nth-child(4n) { height: 42%; }
.audio-wave i:nth-child(5n) { height: 100%; }
.audio-wave i:nth-child(7n) { height: 26%; }
.audio-wave i:nth-child(11n) { height: 72%; }
.audio-wave i.is-played { opacity: 1; }
.audio-meta { display: flex; gap: 14px; font-size: 12px; color: var(--ink-3); flex-wrap: wrap; }

.transcript { max-height: 300px; overflow-y: auto; padding-right: 6px; }
.transcript-row { display: grid; grid-template-columns: 54px 1fr; gap: 12px; padding: 9px 10px; border-radius: var(--r-sm); }
.transcript-t { font-size: 12px; color: var(--ink-4); font-variant-numeric: tabular-nums; padding-top: 2px; }
.transcript-who { font-size: 12px; color: var(--brand-ink); font-weight: 650; }
.transcript-txt { font-size: 13px; color: var(--ink-2); }
.transcript-row.is-key { background: rgba(var(--brand-rgb), .09); }
.transcript-row.is-doubt { background: var(--warn-weak); }

/* flusso numerato: usato solo dove il contenuto e una sequenza */
.flow { list-style: none; margin: 0; padding: 0; }
.flow > li { display: flex; gap: 15px; padding-bottom: 20px; position: relative; }
.flow > li::before { content: ""; position: absolute; left: 15px; top: 32px; bottom: 0; width: 2px; background: var(--hair-2); border-radius: 999px; }
.flow > li:last-child { padding-bottom: 0; }
.flow > li:last-child::before { display: none; }
.flow-n {
  flex: 0 0 31px; width: 31px; height: 31px; border-radius: 999px; background: var(--glass-strong);
  color: var(--brand-ink); font-size: 12.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; z-index: 1;
  box-shadow: var(--rim), inset 0 0 0 1.5px rgba(var(--brand-rgb), .4);
}
.flow-n.is-ia { color: var(--brass-ink); background: var(--brass-weak); box-shadow: var(--rim), inset 0 0 0 1.5px rgba(169, 135, 63, .5); }
.flow-main { flex: 1 1 auto; min-width: 0; padding-top: 4px; }
.flow-title { display: block; font-size: 14.5px; font-weight: 650; letter-spacing: -.014em; }
.flow-when { display: block; font-size: 12px; color: var(--ink-3); margin-bottom: 5px; }
.flow-text { display: block; font-size: 13.5px; color: var(--ink-2); max-width: 70ch; }

/* conversazione (segnalazioni, chat con l amministratore) */
.thread { display: flex; flex-direction: column; gap: 12px; }
.msg { display: flex; gap: 10px; max-width: 86%; }
.msg-body {
  border-radius: 8px 20px 20px 20px; padding: 11px 15px;
  background: var(--glass-strong); font-size: 13.5px; box-shadow: var(--rim);
}
.msg-who { font-size: 12px; color: var(--ink-3); margin-bottom: 3px; }
.msg--mine { margin-left: auto; flex-direction: row-reverse; }
.msg--mine .msg-body { background: rgba(var(--brand-rgb), .14); border-radius: 20px 8px 20px 20px; }
.msg--ia .msg-body { background: var(--brass-weak); }
.msg-photos { display: flex; gap: 7px; margin-top: 9px; }
.photo-stub {
  width: 68px; height: 50px; border-radius: 12px;
  background: linear-gradient(150deg, rgba(var(--brand-rgb), .20), rgba(169, 135, 63, .22));
  display: flex; align-items: center; justify-content: center; color: var(--ink-3);
  box-shadow: var(--rim);
}

/* prospetto della palazzina: usato una volta sola, nella scheda condominio */
.palazzina { display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-end; }
.scala-col { display: flex; flex-direction: column; gap: 5px; }
.scala-name {
  order: 2; text-align: center; font-size: 12px; color: var(--ink-3); padding-top: 8px;
  margin-top: 5px; font-weight: 600;
}
.piano-row { display: flex; gap: 5px; }
.cella {
  width: 66px; padding: 9px 6px; border: 0; border-radius: var(--r-sm);
  background: var(--glass-2); text-align: center; cursor: pointer; box-shadow: var(--rim);
}
.cella:hover { background: var(--glass-strong); box-shadow: var(--rim), var(--shadow-1); }
.cella.is-sel { background: rgba(var(--brand-rgb), .16); box-shadow: var(--rim), inset 0 0 0 1.5px var(--brand); }
.cella.is-flag { background: var(--danger-weak); box-shadow: var(--rim), inset 0 0 0 1.5px rgba(201, 56, 28, .5); }
.cella.is-shop { background: var(--brass-weak); }
.cella-int { font-size: 13.5px; font-weight: 700; font-family: var(--display); letter-spacing: -.02em; }
.cella-mill { font-size: 12px; color: var(--ink-3); }
.piano-label { font-size: 11px; color: var(--ink-4); width: 56px; text-align: right; padding-right: 8px; align-self: center; }

/* calendario / scadenzario */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline > li {
  display: grid; grid-template-columns: 84px 1fr auto; gap: 12px; align-items: baseline;
  padding: 12px 0;
}
.timeline > li + li { box-shadow: 0 -1px 0 var(--hair-2); }
.tl-date { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.tl-date b { display: block; font-size: 14.5px; color: var(--ink); font-family: var(--display); font-weight: 700; letter-spacing: -.024em; }
.timeline > li.is-today .tl-date b { color: var(--brand); }
.timeline > li.is-late .tl-date b { color: var(--danger); }

/* mini calendario mensile */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-dow { font-size: 11px; color: var(--ink-3); text-align: center; padding-bottom: 4px; font-weight: 600; }
.cal-day {
  aspect-ratio: 1; border-radius: var(--r-sm); padding: 5px 6px;
  font-size: 12px; color: var(--ink-2); position: relative; min-height: 36px; background: var(--glass-dim);
}
.cal-day.is-out { opacity: .3; }
.cal-day.is-today { background: rgba(var(--brand-rgb), .14); font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--brand); }
.cal-day .cal-mark { position: absolute; bottom: 5px; left: 6px; right: 6px; height: 3.5px; border-radius: 999px; background: var(--brand); }
.cal-day .cal-mark.is-warn { background: var(--warn); }
.cal-day .cal-mark.is-danger { background: var(--danger); }
/* due scadenze nello stesso giorno: due segni impilati */
.cal-day .cal-mark + .cal-mark { bottom: 11px; }
.cal-day .cal-mark + .cal-mark + .cal-mark { bottom: 17px; }

/* matrice dei permessi */
.matrix { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.matrix th, .matrix td { padding: 10px; text-align: center; box-shadow: 0 -1px 0 var(--hair-2); }
.matrix th:first-child, .matrix td:first-child { text-align: left; min-width: 220px; }
.matrix thead th { background: var(--glass-dim); font-size: 12px; color: var(--ink-3); box-shadow: none; }
.matrix thead th:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.matrix thead th:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.cellmark { display: inline-block; width: 18px; height: 18px; border-radius: 999px; }
.cellmark--full { background: var(--brand); }
.cellmark--part { background: var(--warn); }
.cellmark--none { background: var(--hair); }

/* finestra / foglio */
.overlay {
  position: fixed; inset: 0; background: rgba(16, 32, 28, .30); z-index: 80;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  display: none; align-items: flex-start; justify-content: center; padding: 60px 16px; overflow-y: auto;
}
.overlay.is-open { display: flex; }
.sheet {
  background: var(--lens), var(--glass-strong);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border-radius: 28px; box-shadow: var(--rim), var(--shadow-2);
  width: 100%; max-width: 560px;
}
.sheet--wide { max-width: 880px; }
.sheet-head { display: flex; align-items: center; gap: 12px; padding: 20px 24px 12px; }
.sheet-head h3 { flex: 1 1 auto; }
.sheet-body { padding: 4px 24px 20px; }
.sheet-foot { padding: 14px 24px 20px; display: flex; gap: 8px; justify-content: flex-end; }

/* ===================== 10 Telefoni (app Flutter) ===================== */

.phones { display: flex; gap: 30px; flex-wrap: wrap; }
.phone-wrap { width: 300px; flex: 0 0 300px; }
.phone-cap { margin-top: 14px; font-size: 13px; }
.phone-cap b { display: block; font-size: 13.5px; font-weight: 650; }
.phone-cap span { color: var(--ink-3); font-size: 12.5px; }

.phone {
  width: 300px; height: 620px; border-radius: 48px; background: #0b100f;
  padding: 10px; box-shadow: var(--shadow-2); position: relative; flex: 0 0 300px;
}
.phone-screen {
  width: 100%; height: 100%; border-radius: 39px; overflow: hidden; background: var(--paper);
  display: flex; flex-direction: column; position: relative;
}
.phone-screen::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(80% 44% at 16% 0%, rgba(var(--brand-rgb), .34), transparent 70%),
    radial-gradient(70% 40% at 94% 98%, rgba(169, 135, 63, .24), transparent 72%);
}
.phone-status {
  height: 30px; flex: 0 0 30px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; font-size: 11px; color: var(--ink); position: relative; z-index: 1; font-weight: 700;
}
.phone-notch {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 88px; height: 24px; border-radius: 999px; background: #0b100f; z-index: 3;
}
.phone-body { flex: 1 1 auto; overflow: hidden; display: flex; flex-direction: column; position: relative; z-index: 1; }
.phone-scroll { flex: 1 1 auto; overflow: hidden; padding: 10px 12px 0; }

.app-head { padding: 6px 16px 12px; color: var(--ink); }
.app-head-row { display: flex; align-items: center; gap: 10px; }
.app-head h3, .app-head h4 { font-size: 19px; flex: 1 1 auto; font-weight: 700; letter-spacing: -.03em; }
.app-head .meta { color: var(--ink-3); }
.app-eyebrow { font-size: 12px; color: var(--ink-3); font-weight: 500; }

.app-card {
  background: var(--lens), var(--glass-strong);
  -webkit-backdrop-filter: var(--blur-sm); backdrop-filter: var(--blur-sm);
  border-radius: 22px; padding: 14px 15px; margin-bottom: 10px;
  box-shadow: var(--rim), var(--shadow-1);
}
.app-card--brand { background: var(--lens), rgba(var(--brand-rgb), .18); }
.app-card--brass { background: var(--lens), var(--brass-weak); }
.app-card-title { font-size: 13px; font-weight: 650; margin-bottom: 5px; letter-spacing: -.012em; }
.app-big { font-family: var(--display); font-size: 28px; font-weight: 700; letter-spacing: -.034em; line-height: 1.05; }
.app-big small { font-size: 13px; font-weight: 500; color: var(--ink-3); letter-spacing: -.01em; margin-left: 3px; }
.app-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; font-size: 12.5px; }
.app-row + .app-row { box-shadow: 0 -1px 0 var(--hair-2); }
.app-row-main { flex: 1 1 auto; min-width: 0; }
.app-row-title { font-size: 12.5px; font-weight: 600; }
.app-row-sub { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.app-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.app-tile {
  border-radius: 20px; padding: 13px 12px; background: var(--lens), var(--glass-strong);
  -webkit-backdrop-filter: var(--blur-sm); backdrop-filter: var(--blur-sm);
  display: flex; flex-direction: column; gap: 7px; font-size: 12px; box-shadow: var(--rim), var(--shadow-1);
}
.app-tile svg { color: var(--brand); }
.app-tile b { font-size: 12.5px; font-weight: 650; }
.app-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--brand); color: #fff; border: 0; border-radius: 999px;
  padding: 13px; font: inherit; font-size: 13.5px; font-weight: 650; width: 100%; cursor: pointer;
  box-shadow: var(--shadow-3), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.app-btn--line { background: var(--glass-strong); color: var(--ink); box-shadow: var(--rim), var(--shadow-1); }
.app-nav {
  flex: 0 0 auto; display: flex; margin: 8px 12px 12px; padding: 6px; border-radius: 999px;
  background: var(--lens), var(--glass-strong);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--rim), var(--shadow-2);
}
.app-nav a, .app-nav span {
  flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; font-size: 11px; color: var(--ink-3); padding: 7px 0 6px; border-radius: 999px; font-weight: 600;
}
.app-nav .is-active { color: #fff; background: var(--brand); box-shadow: var(--shadow-3); }
.app-fab {
  position: absolute; right: 18px; bottom: 86px; width: 52px; height: 52px; border-radius: 999px;
  background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-3), var(--shadow-2), inset 0 1px 0 rgba(255, 255, 255, .34);
  border: 0; cursor: pointer; z-index: 2;
}
.app-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 650; background: var(--glass-dim); color: var(--ink-2);
}
.app-chip--ok { background: var(--ok-weak); color: var(--ok-ink); }
.app-chip--warn { background: var(--warn-weak); color: var(--warn-ink); }
.app-chip--danger { background: var(--danger-weak); color: var(--danger-ink); }
.app-chip--brand { background: rgba(var(--brand-rgb), .16); color: var(--brand-ink); }

/* ================= 11 Sito pubblico e centro demo ================= */

.site-head {
  display: flex; align-items: center; gap: 16px; padding: 12px 20px; margin: 12px 12px 0;
  border-radius: var(--r-panel); background: var(--lens), var(--glass);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--rim), var(--shadow-1); position: sticky; top: 12px; z-index: 30;
}
.site-nav { display: flex; gap: 20px; margin-left: auto; font-size: 14px; align-items: center; }
.site-nav a { color: var(--ink-2); font-weight: 500; }
.site-wrap { max-width: 1120px; margin: 0 auto; padding: 0 28px; }
.site-hero { padding: 80px 0 60px; }
.site-hero h1 { font-size: 54px; line-height: 1.04; letter-spacing: -.04em; max-width: 19ch; }
.site-hero .lede { margin-top: 20px; font-size: 18.5px; max-width: 54ch; }
.site-hero-cta { margin-top: 30px; display: flex; gap: 10px; flex-wrap: wrap; }
.site-section { padding: 54px 0; }
.site-section + .site-section { border-top: 1px solid var(--hair-2); }
.site-section h2 { font-size: 32px; letter-spacing: -.032em; }
.site-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; margin-top: 30px; }
.site-feat h3 { margin-bottom: 7px; }
.site-feat p { font-size: 14px; color: var(--ink-2); }
.site-quote { font-size: 23px; line-height: 1.4; max-width: 46ch; font-weight: 650; letter-spacing: -.024em; }
.price-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.price-card {
  border-radius: var(--r-panel); padding: 24px; background: var(--lens), var(--glass);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--rim), var(--shadow-1);
}
.price-card.is-pick { box-shadow: var(--rim), var(--shadow-1), inset 0 0 0 2px rgba(var(--brand-rgb), .55); }
.price-num { font-family: var(--display); font-size: 40px; font-weight: 700; letter-spacing: -.038em; }
.price-num small { font-size: 13px; font-weight: 500; color: var(--ink-3); letter-spacing: -.01em; }
.price-list { list-style: none; margin: 18px 0 0; padding: 0; font-size: 13.5px; }
.price-list li { padding: 6px 0 6px 24px; position: relative; color: var(--ink-2); }
.price-list li::before {
  content: ""; position: absolute; left: 2px; top: 11px; width: 10px; height: 10px;
  border-radius: 999px; background: rgba(var(--brand-rgb), .22);
  box-shadow: inset 0 0 0 2px var(--brand);
}

/* --- sito pubblico: fasce a tutta larghezza, illustrazioni, recensioni, domande --- */
.band { padding: 76px 0; position: relative; }
.band--tint { background: rgba(var(--brand-rgb), .07); }
.band--brass { background: rgba(169, 135, 63, .10); }
.band--ink { background: var(--ink); color: #E8EEEB; }
.band--ink h2, .band--ink h3 { color: #fff; }
.band--ink .meta, .band--ink p { color: rgba(232, 238, 235, .8); }
.band--ink a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.band--ink .norm { color: rgba(232, 238, 235, .72); border-left-color: var(--brass); }
.band--ink .price-list li { color: rgba(232, 238, 235, .82); }
.band--tight { padding: 52px 0; }

/* apertura: testo a sinistra, disegno a destra */
.hero-split { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero-split h1 { font-size: 52px; line-height: 1.05; letter-spacing: -.04em; max-width: 15ch; }
.hero-split .lede { margin-top: 20px; font-size: 18.5px; max-width: 48ch; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
  color: var(--brand-ink); background: rgba(var(--brand-rgb), .13); padding: 6px 14px;
  border-radius: 999px; margin-bottom: 20px;
}
.hero-trust {
  display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 34px; padding-top: 24px;
  border-top: 1px solid var(--hair); font-size: 13px; color: var(--ink-3);
}
.hero-trust span { display: inline-flex; align-items: center; gap: 7px; }
.hero-trust svg { color: var(--brand); }

/* disegni: nessuna immagine, solo SVG scritto a mano */
.ill { display: block; width: 100%; height: auto; }
.ill-brand { fill: var(--brand); }
.ill-brand-2 { fill: rgba(var(--brand-rgb), .62); }
.ill-brand-3 { fill: rgba(var(--brand-rgb), .26); }
.ill-brand-4 { fill: rgba(var(--brand-rgb), .12); }
.ill-brass { fill: var(--brass); }
.ill-paper { fill: var(--glass-strong); }
.ill-ink { fill: var(--ink); }
.ill-stroke { fill: none; stroke: var(--brand); stroke-width: 2; }
.ill-stroke-2 { fill: none; stroke: rgba(var(--brand-rgb), .3); stroke-width: 2; }

/* numeri del sito */
.site-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 36px; }
.site-num b {
  display: block; font-family: var(--display); font-size: 46px; font-weight: 700;
  letter-spacing: -.04em; line-height: 1; color: var(--brand);
}
.band--ink .site-num b { color: #fff; }
.site-num span { display: block; margin-top: 10px; font-size: 13.5px; color: var(--ink-3); max-width: 24ch; }
.band--ink .site-num span { color: rgba(232, 238, 235, .72); }

/* servizi e impegni */
.site-feat { display: flex; flex-direction: column; gap: 10px; }
.site-feat-ico {
  width: 42px; height: 42px; border-radius: 14px; display: flex; align-items: center;
  justify-content: center; background: rgba(var(--brand-rgb), .12); color: var(--brand-ink);
}
.steps { counter-reset: passo; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 30px; }
.step { position: relative; padding-top: 44px; }
.step::before {
  counter-increment: passo; content: counter(passo);
  position: absolute; top: 0; left: 0; width: 32px; height: 32px; border-radius: 999px;
  background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
}
.step h3 { margin-bottom: 6px; }
.step p { font-size: 14px; color: var(--ink-2); }

/* recensioni */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 18px; }
.quote-card {
  border-radius: var(--r-panel); padding: 26px; background: var(--lens), var(--glass);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--rim), var(--shadow-1); display: flex; flex-direction: column; gap: 16px;
}
.quote-card p { font-size: 15.5px; line-height: 1.55; color: var(--ink); margin: 0; }
.quote-who { display: flex; align-items: center; gap: 11px; margin-top: auto; }
.quote-who b { display: block; font-size: 13.5px; }
.quote-who span { display: block; font-size: 12.5px; color: var(--ink-3); }

/* domande frequenti */
.faq { border-radius: var(--r-panel); overflow: hidden; padding: 6px; background: var(--glass-2); box-shadow: var(--rim); }
.faq details { border-bottom: 1px solid var(--hair-2); }
.faq details:last-child { border-bottom: 0; }
.faq summary {
  padding: 18px 22px; font-size: 15.5px; font-weight: 650; cursor: pointer; list-style: none;
  display: flex; align-items: center; gap: 12px; letter-spacing: -.014em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; margin-left: auto; width: 9px; height: 9px; flex: 0 0 9px;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3);
  transform: rotate(45deg); transition: transform .18s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq summary:hover { background: var(--glass-dim); }
.faq-body { padding: 0 22px 20px; font-size: 14.5px; color: var(--ink-2); max-width: 74ch; }

/* richiesta di preventivo */
.form-card {
  border-radius: var(--r-panel); padding: 30px; background: var(--lens), var(--glass-strong);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--rim), var(--shadow-2);
}

/* piede del sito */
.site-foot { padding: 60px 0 36px; }
.site-foot-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; }
.site-foot h4 { font-size: 13px; margin-bottom: 14px; color: rgba(232, 238, 235, .6); font-weight: 600; }
.site-foot ul { list-style: none; margin: 0; padding: 0; font-size: 13.5px; line-height: 2; }
.site-foot a { color: rgba(232, 238, 235, .85); text-decoration: none; }
.site-foot a:hover { color: #fff; text-decoration: underline; }
.site-foot-legal {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: 12.5px; color: rgba(232, 238, 235, .55); display: flex; gap: 20px; flex-wrap: wrap;
}

@media (max-width: 860px) {
  .band { padding: 48px 0; }
  .hero-split { grid-template-columns: 1fr; gap: 30px; }
  .site-num b { font-size: 36px; }
  .site-foot-cols { grid-template-columns: 1fr 1fr; gap: 26px; }
  .form-card { padding: 20px; }
}

/* centro demo */
.hub { max-width: 1180px; margin: 0 auto; padding: 46px 28px 80px; }
.hub-head { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 34px; }
.hub-head h1 { font-size: 40px; letter-spacing: -.038em; }
.hub-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.hub-card {
  border-radius: var(--r-panel); background: var(--lens), var(--glass);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--rim), var(--shadow-1);
  padding: 22px; display: flex; flex-direction: column; gap: 10px; color: inherit;
  position: relative;
}
.hub-card:hover { text-decoration: none; box-shadow: var(--rim), var(--shadow-2); transform: translateY(-2px); }
.hub-card h3 { font-size: 17px; }
/* tutta la scheda si clicca, ma il collegamento sta sul titolo e si allarga con
   uno strato invisibile: un <a> dentro un altro <a> non e valido, il navigatore
   chiuderebbe la scheda a meta e il contenuto resterebbe fuori dal riquadro. */
.hub-card h3 a { color: inherit; }
.hub-card h3 a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.hub-card h3 a:hover { text-decoration: none; }
.hub-links a { position: relative; z-index: 1; }
.hub-card p { font-size: 13.5px; color: var(--ink-2); margin: 0; }
.hub-role {
  font-size: 12px; font-weight: 650; color: var(--brand-ink); background: rgba(var(--brand-rgb), .14);
  padding: 3px 10px; border-radius: 999px; align-self: flex-start;
}
.hub-links { margin-top: auto; padding-top: 10px; font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 12px; }

/* Correzioni di specificita: un pulsante e un pulsante anche quando e un <a>
   dentro una navigazione che colora i propri collegamenti. Devono stare qui,
   dopo le regole di contesto, altrimenti perdono il confronto. */
a.btn { color: var(--ink); }
a.btn--primary, a.btn--brass { color: #fff; }
a.btn--ghost { color: var(--brand); }
a.btn--danger { color: var(--danger-ink); }
a.btn:hover { text-decoration: none; }
.nav-item, .bs-item, .hub-card, .nav-brand { text-decoration: none; }

/* =============== 12 Utilita, responsivo, stampa =============== */

.u-mt-0 { margin-top: 0; } .u-mt-8 { margin-top: 8px; } .u-mt-12 { margin-top: 12px; }
.u-mt-16 { margin-top: 16px; } .u-mt-24 { margin-top: 24px; }
.u-mb-0 { margin-bottom: 0; } .u-mb-8 { margin-bottom: 8px; } .u-mb-16 { margin-bottom: 16px; }
.u-right { text-align: right; } .u-center { text-align: center; }
.u-wrap { flex-wrap: wrap; }
.u-measure { max-width: var(--measure); }
.u-hide { display: none; }
.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

@media (max-width: 1180px) {
  .c3 { grid-column: span 6; } .c4 { grid-column: span 6; } .c5 { grid-column: span 6; }
  .c7 { grid-column: span 12; } .c8 { grid-column: span 12; } .c9 { grid-column: span 12; }
}

@media (max-width: 860px) {
  .shell { display: block; padding: 10px; }
  .nav {
    position: fixed; left: 10px; top: 10px; bottom: 10px; z-index: 70; transform: translateX(-112%);
    transition: transform .26s cubic-bezier(.32, .72, 0, 1); height: auto; box-shadow: var(--rim), var(--shadow-2);
  }
  :root.nav-open .nav { transform: none; }
  :root.nav-open body::after {
    content: ""; position: fixed; inset: 0; background: rgba(16, 32, 28, .3); z-index: 60;
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  }
  .nav-toggle { display: inline-flex; }
  .topbar { top: 10px; }
  .work { padding: 0 2px 40px; }
  .c3, .c4, .c5, .c6, .c7, .c8, .c9 { grid-column: span 12; }
  .kv { grid-template-columns: 1fr; }
  .kv > dt { padding-bottom: 0; border-bottom: 0; }
  .kv > dd { padding-top: 2px; }
  .topbar-search { display: none; }
  .ctx-pick { max-width: 190px; }
  .site-head { margin: 10px 10px 0; }
  .site-hero { padding: 44px 0 36px; }
  .site-hero h1 { font-size: 36px; }
  .site-wrap { padding-left: 16px; padding-right: 16px; }
  .hub { padding: 28px 16px 56px; }
  .hub-head h1 { font-size: 30px; }
  h1 { font-size: 25px; }
  .stat-value { font-size: 27px; }
  .phones { gap: 20px; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .hub-card:hover { transform: none; }
}

@media print {
  .nav, .topbar, .page-actions, .foot, .filters { display: none !important; }
  body::before { display: none; }
  body { background: #fff; }
  .shell { padding: 0; display: block; }
  .panel, .stat, .hub-card, .price-card, .ai {
    break-inside: avoid; background: #fff; box-shadow: none;
    -webkit-backdrop-filter: none; backdrop-filter: none; border: 1px solid #ccc;
  }
  .work { padding: 0; }
  a { color: inherit; text-decoration: none; }
}
