/* ============================================================
   Papertel — Prototipo statico
   Design system allineato allo stile di papertel.eu
   (bianco/blu, giallo evidenziatore, Lato + Open Sans)
   ============================================================ */

:root{
  --paper:#FAFBFD;
  --surface:#FFFFFF;
  --surface-2:#F7F9FB;
  --ink:#122B46;
  --ink-2:#4D5C6D;
  --muted:#7E8B9C;
  --line:#E7E9EC;
  --line-soft:#EFF1F4;

  --brand:#007CFF;          /* link, nav, icone */
  --brand-strong:#0063CC;
  --brand-soft:#E5F1FF;
  --btn:#385DFF;            /* bottoni primari (pillola) */
  --btn-strong:#1E42DD;
  --label-bg:#D7DFFF;       /* badge stile BuddyBoss */
  --label-tx:#385DFF;
  --accent:#ECF66D;         /* giallo evidenziatore della ricerca */
  --accent-ink:#3D4400;
  --steel:#1E669C;          /* blu dei titoli hero */

  --ok:#23A455;
  --ok-soft:#E2F4E9;
  --warn:#96690F;
  --warn-soft:#F7F0D6;
  --danger:#EF3E46;
  --danger-soft:#FBE5E6;

  --r-s:6px; --r-m:10px; --r-l:14px;
  --shadow-1:0 1px 2px rgba(18,43,70,.05), 0 3px 10px rgba(18,43,70,.05);
  --shadow-2:0 8px 26px rgba(18,43,70,.13);

  --serif:"Lato", "Open Sans", -apple-system, sans-serif;      /* titoli */
  --sans:"Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --logofont:"Courier New", "American Typewriter", "Courier", monospace;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ font-size:16px; }
body{
  margin:0;
  background:var(--paper);
  color:var(--ink-2);
  font-family:var(--sans);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
img,svg{ vertical-align:middle; }
a{ color:var(--brand); text-decoration:none; }
a:hover{ text-decoration:underline; }
h1,h2,h3,h4{ line-height:1.25; margin:0 0 .5em; color:var(--ink); font-family:var(--serif); }
p{ margin:0 0 1em; }
.serif{ font-family:var(--serif); }
.muted{ color:var(--muted); }
.small{ font-size:.85rem; }
.nowrap{ white-space:nowrap; }

.container{ max-width:1180px; margin:0 auto; padding:0 24px; }
.section{ padding:40px 0; }
.section-head{ display:flex; align-items:baseline; justify-content:space-between; gap:16px; margin-bottom:18px; }
.section-head h2{ font-family:var(--serif); font-weight:700; font-size:1.4rem; margin:0; }
.section-head .link-more{ font-size:.9rem; font-weight:600; white-space:nowrap; }

/* ---------- Barra prototipo ---------- */
.proto-strip{
  background:var(--ink); color:#C6D2E1; font-size:.75rem;
  padding:6px 0; letter-spacing:.02em;
}
.proto-strip .container{ display:flex; justify-content:space-between; gap:12px; }
.proto-strip b{ color:#fff; font-weight:600; }

/* ---------- Header ---------- */
.site-header{
  position:sticky; top:0; z-index:50;
  background:#fff;
  border-bottom:1px solid var(--line);
}
.site-header .container{
  display:flex; align-items:center; gap:26px;
  height:66px;
}
.brand{ display:inline-flex; flex-direction:column; align-items:flex-start; color:var(--ink); line-height:1; }
.brand:hover{ text-decoration:none; }
.brand .bw{
  font-family:var(--logofont); font-weight:700; font-size:1.45rem; letter-spacing:.02em;
  color:#1D3B6E;
}
.brand .feather{ margin:-3px 0 0 auto; }
.main-nav{ display:flex; gap:2px; align-items:center; flex:1; }
.main-nav a{
  color:var(--brand); font-weight:600; font-size:.9rem;
  padding:8px 12px; border-radius:8px; position:relative;
}
.main-nav a:hover{ background:var(--brand-soft); text-decoration:none; }
.main-nav a.active{ color:#fff; background:var(--brand); }
.nav-badge{
  display:inline-block; min-width:17px; height:17px; padding:0 4px;
  background:var(--danger); color:#fff; border-radius:9px;
  font-size:.68rem; line-height:17px; text-align:center; font-weight:700;
  margin-left:5px; vertical-align:1px;
}
.main-nav a.active .nav-badge{ background:#fff; color:var(--brand); }
.header-actions{ display:flex; align-items:center; gap:10px; }
.user-pill{
  display:flex; align-items:center; gap:9px; padding:5px 12px 5px 6px;
  border:1px solid var(--line); border-radius:99px; background:var(--surface);
  color:var(--ink); font-size:.85rem; font-weight:600;
  cursor:pointer; font-family:var(--sans); text-align:left;
}
.user-pill:hover{ text-decoration:none; box-shadow:var(--shadow-1); border-color:var(--brand); }
.user-pill .sub{ display:block; font-size:.68rem; font-weight:500; color:var(--muted); line-height:1.1; }
.user-pill > svg:last-child{ color:var(--muted); flex:0 0 auto; }
.user-menu.open .user-pill{ border-color:var(--brand); box-shadow:var(--shadow-1); }
.user-menu.open .user-pill > svg:last-child{ transform:rotate(180deg); }
.user-pill .up-dot{
  width:8px; height:8px; border-radius:50%; background:var(--danger); flex:0 0 auto;
}

/* Menu utente (voci personali) */
.user-menu .dropdown-menu{ min-width:308px; }
.dropdown-menu.right{ left:auto; right:0; }
.um-head{
  display:flex; align-items:center; gap:11px; padding:12px 12px 12px 12px;
  border-bottom:1px solid var(--line-soft); margin-bottom:6px;
}
.um-head b{ display:block; font-size:.88rem; color:var(--ink); line-height:1.25; }
.um-head span span{ font-size:.74rem; color:var(--muted); }
.dropdown-item.active{ background:var(--brand-soft); }
.dropdown-item.active b{ color:var(--brand); }
.dropdown-item .um-badge{ margin-left:auto; align-self:center; }
.dropdown-item .d:empty{ display:none; }
a.dropdown-item:hover{ text-decoration:none; }
.dropdown-sep{ height:1px; background:var(--line-soft); margin:6px 8px; }
.um-public{ display:none; }
.icon-btn{
  display:inline-flex; align-items:center; justify-content:center;
  width:36px; height:36px; border-radius:50%; border:1px solid var(--line);
  background:var(--surface); color:var(--ink-2); cursor:pointer;
}
.icon-btn:hover{ color:var(--brand); border-color:var(--brand); text-decoration:none; }

/* ---------- Bottoni (pillola, stile BuddyBoss) ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  font-family:var(--sans); font-weight:600; font-size:.9rem;
  padding:10px 20px; border-radius:100px; border:1px solid transparent;
  cursor:pointer; transition:all .15s ease; text-decoration:none; line-height:1.2;
}
.btn:hover{ text-decoration:none; }
.btn-primary{ background:var(--btn); color:#fff; }
.btn-primary:hover{ background:var(--btn-strong); }
.btn-ghost{ background:#fff; color:var(--btn); border-color:var(--line); }
.btn-ghost:hover{ border-color:var(--btn); }
.btn-soft{ background:var(--label-bg); color:var(--label-tx); }
.btn-soft:hover{ background:#c6d1ff; }
.btn-danger{ background:#fff; color:var(--danger); border-color:var(--danger-soft); }
.btn-danger:hover{ background:var(--danger-soft); border-color:var(--danger); }
.btn-sm{ padding:6px 14px; font-size:.82rem; }
.btn-lg{ padding:13px 28px; font-size:1rem; }
.btn[disabled]{ opacity:.5; cursor:not-allowed; }

/* ---------- Badge & chip ---------- */
.badge{
  display:inline-flex; align-items:center; gap:5px;
  font-size:.72rem; font-weight:600; letter-spacing:.02em;
  padding:3px 9px; border-radius:99px;
  background:var(--line-soft); color:var(--ink-2);
}
.badge-ok{ background:var(--ok-soft); color:var(--ok); }
.badge-warn{ background:var(--warn-soft); color:var(--warn); }
.badge-danger{ background:var(--danger-soft); color:var(--danger); }
.badge-brand{ background:var(--label-bg); color:var(--label-tx); }
.badge-accent{ background:var(--accent); color:var(--accent-ink); }

.chip-cat{
  display:inline-flex; align-items:center; gap:7px;
  font-size:.78rem; font-weight:600; color:var(--brand);
  padding:5px 14px; border-radius:99px;
  background:var(--surface); border:1px solid var(--line);
  text-decoration:none;
}
.chip-cat:hover{ text-decoration:none; border-color:var(--brand); }
.chip-cat .dot{ width:9px; height:9px; border-radius:50%; background:var(--c,var(--brand)); flex:0 0 auto; }

/* ---------- Card ---------- */
.card{
  background:var(--surface); border:1px solid var(--line);
  border-radius:var(--r-m); box-shadow:var(--shadow-1);
}
.card-pad{ padding:22px; }
.notice{
  background:var(--surface); border:1px solid var(--line);
  border-radius:var(--r-m); padding:14px 18px; font-size:.88rem; color:var(--ink-2);
  display:flex; gap:10px; align-items:flex-start;
}
.notice svg{ flex:0 0 auto; margin-top:2px; color:var(--brand); }
.notice.accent{ background:#FDFEE9; border-color:#E3EA8E; }
.notice.accent svg{ color:#8A9412; }

/* ---------- Avatar ---------- */
.avatar{
  display:inline-flex; align-items:center; justify-content:center;
  width:40px; height:40px; border-radius:50%;
  background:var(--av,#607387); color:#fff;
  font-weight:700; font-size:.85rem; letter-spacing:.02em;
  flex:0 0 auto; user-select:none; font-family:var(--serif);
}
.avatar.sq{ border-radius:10px; }
.avatar.s-sm{ width:30px; height:30px; font-size:.68rem; }
.avatar.s-lg{ width:56px; height:56px; font-size:1.15rem; }
.avatar.s-xl{ width:76px; height:76px; font-size:1.5rem; border-radius:16px; }
.avatar-stack{ display:flex; }
.avatar-stack .avatar{ border:2px solid var(--surface); margin-left:-9px; }
.avatar-stack .avatar:first-child{ margin-left:0; }

/* ---------- Form ---------- */
.input,.select,.textarea{
  width:100%; font-family:var(--sans); font-size:.92rem; color:var(--ink);
  background:var(--surface); border:1px solid var(--line); border-radius:8px;
  padding:10px 13px; outline:none; transition:border-color .15s, box-shadow .15s;
}
.input:focus,.select:focus,.textarea:focus{
  border-color:var(--brand); box-shadow:0 0 0 3px rgba(0,124,255,.14);
}
.textarea{ resize:vertical; min-height:74px; }
label.field{ display:block; font-size:.8rem; font-weight:600; color:var(--ink-2); margin-bottom:6px; }
.field-row{ margin-bottom:14px; }

/* ---------- Tabs ---------- */
.tabs{ display:flex; gap:4px; border-bottom:1px solid var(--line); margin-bottom:20px; }
.tab{
  padding:10px 18px; font-weight:600; font-size:.92rem; color:var(--ink-2);
  border:none; background:none; cursor:pointer; border-bottom:2px solid transparent;
  margin-bottom:-1px; display:inline-flex; align-items:center; gap:8px; font-family:var(--sans);
}
.tab:hover{ color:var(--brand); }
.tab.active{ color:var(--brand); border-bottom-color:var(--brand); }

/* ---------- Tabelle ---------- */
.table{ width:100%; border-collapse:collapse; font-size:.9rem; }
.table th{
  text-align:left; font-size:.72rem; text-transform:uppercase; letter-spacing:.06em;
  color:var(--muted); font-weight:700; padding:10px 14px; border-bottom:1px solid var(--line);
}
.table td{ padding:12px 14px; border-bottom:1px solid var(--line-soft); vertical-align:middle; }
.table tr:last-child td{ border-bottom:none; }
.table tr:hover td{ background:var(--surface-2); }

/* ---------- Hero (stile papertel.eu) ---------- */
.hero{ padding:46px 0 0; background:var(--paper); border-bottom:1px solid var(--line); }
.hero .hero-inner{ text-align:center; }
.hero h1{
  font-family:var(--serif); font-weight:700; font-size:1.7rem;
  color:var(--steel); margin:0 0 4px;
}
.hero .lead{ font-size:1rem; color:var(--brand); margin:0 0 26px; }
.search-band{ background:var(--accent); padding:24px 0; margin-top:6px; }
.search-band .search-big{ margin:0 auto; box-shadow:0 3px 10px rgba(61,68,0,.18); }
.search-hint{
  text-align:center; font-size:.82rem; color:var(--muted); padding:12px 16px 26px; margin:0;
}
.search-big{
  display:flex; align-items:center; gap:10px; max-width:660px;
  background:var(--surface); border:1px solid #cfd3d8; border-radius:10px;
  padding:5px 5px 5px 16px;
}
.search-big input{
  flex:1; border:none; outline:none; font-size:.98rem; font-family:var(--sans);
  background:transparent; color:var(--ink); min-width:0;
}
.search-big .btn{ flex:0 0 auto; border-radius:8px; padding:9px 16px; }
.hero-actions{ display:flex; gap:12px; flex-wrap:wrap; align-items:center; justify-content:center; padding:0 0 30px; }

/* Benvenuto (loggato) */
.welcome-bar{
  display:flex; align-items:center; gap:16px; flex-wrap:wrap;
  padding:26px 0 4px;
}
.welcome-bar h1{ font-family:var(--serif); font-size:1.55rem; margin:0; flex:1; min-width:220px; }

/* Due anime */
.duo{ display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.duo .card-pad h3{ font-family:var(--serif); font-size:1.1rem; display:flex; gap:10px; align-items:center; }
.duo .card-pad h3 svg{ color:var(--brand); }
.duo .card-pad p{ color:var(--ink-2); font-size:.92rem; margin:0; }

/* Come funziona */
.steps{ display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.step{ position:relative; padding:22px; }
.step .n{
  width:34px; height:34px; border-radius:50%; background:var(--btn); color:#fff;
  display:flex; align-items:center; justify-content:center; font-weight:700; margin-bottom:12px;
  font-family:var(--serif); font-size:1rem;
}
.step h3{ font-size:1rem; margin-bottom:6px; }
.step p{ font-size:.88rem; color:var(--ink-2); margin:0; }

/* CTA banner */
.cta-banner{
  background:linear-gradient(115deg, var(--btn) 0%, #2F51E8 55%, #1E42DD 100%);
  border-radius:var(--r-l); color:#fff; padding:38px 44px;
  display:flex; align-items:center; gap:28px; flex-wrap:wrap;
}
.cta-banner h2{ font-family:var(--serif); font-size:1.5rem; margin:0 0 6px; color:#fff; }
.cta-banner p{ margin:0; opacity:.88; font-size:.95rem; }
.cta-banner .grow{ flex:1; min-width:260px; }
.cta-banner .btn-primary{ background:#fff; color:var(--btn); }
.cta-banner .btn-primary:hover{ background:var(--accent); color:var(--accent-ink); }

/* ---------- Griglia categorie (bottoni stile papertel.eu) ---------- */
.cat-grid{ display:grid; grid-template-columns:repeat(5,1fr); gap:14px; }
.cat-cell{
  display:flex; flex-direction:column; gap:3px; align-items:center; text-align:center;
  background:var(--surface); border:1px solid #d5d9de; border-radius:10px;
  padding:13px 10px; color:var(--brand); text-decoration:none;
  transition:box-shadow .15s, border-color .15s;
}
.cat-cell:hover{ text-decoration:none; box-shadow:var(--shadow-1); border-color:var(--brand); }
.cat-cell .bar{ display:none; }
.cat-cell .name{
  font-weight:600; font-size:.95rem; line-height:1.25; font-family:var(--serif);
  display:inline-flex; align-items:center; gap:7px;
}
.cat-cell .name::before{
  content:""; width:8px; height:8px; border-radius:50%; background:var(--c,var(--brand));
}
.cat-cell .count{ font-size:.72rem; color:var(--muted); }

/* ---------- Card articolo (flat) ---------- */
.art-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.art-card{
  display:flex; flex-direction:column; overflow:hidden;
  background:var(--surface); border:1px solid var(--line); border-radius:var(--r-m);
  color:var(--ink); text-decoration:none; transition:box-shadow .15s, border-color .15s;
}
.art-card:hover{ text-decoration:none; box-shadow:var(--shadow-2); border-color:#cdd7e2; }
.art-tile{
  height:104px; position:relative; overflow:hidden;
  background:#EDF2F8;
  background:color-mix(in srgb, var(--c,#007CFF) 9%, #fff);
  border-bottom:1px solid var(--line-soft);
}
.art-tile::after{
  content:attr(data-letter);
  position:absolute; right:10px; bottom:-30px;
  font-family:var(--serif); font-weight:900; font-size:6.4rem; line-height:1;
  color:var(--c,#007CFF); opacity:.14;
}
.art-tile .src{
  position:absolute; left:12px; top:12px;
  font-size:.66rem; font-weight:700; letter-spacing:.05em; text-transform:uppercase;
  color:#fff; background:var(--c,#007CFF);
  padding:3px 10px; border-radius:99px;
}
.art-card .body{ padding:14px 18px 16px; display:flex; flex-direction:column; gap:8px; flex:1; }
.art-card h3{ font-family:var(--serif); font-size:1.02rem; margin:0; line-height:1.35; }
.art-card .excerpt{ font-size:.85rem; color:var(--ink-2); margin:0; flex:1; }
.meta-line{ display:flex; align-items:center; gap:8px; font-size:.75rem; color:var(--muted); flex-wrap:wrap; }
.meta-line .sep{ opacity:.5; }

.art-row{
  display:flex; gap:14px; align-items:flex-start; padding:14px 0;
  border-bottom:1px solid var(--line-soft); color:var(--ink); text-decoration:none;
}
.art-row:hover{ text-decoration:none; }
.art-row:hover h4{ color:var(--brand); }
.art-row:last-child{ border-bottom:none; }
.art-row .mini-tile{
  width:50px; height:50px; border-radius:10px; flex:0 0 auto;
  background:#EDF2F8;
  background:color-mix(in srgb, var(--c,#007CFF) 12%, #fff);
  border:1px solid color-mix(in srgb, var(--c,#007CFF) 24%, #fff);
  display:flex; align-items:center; justify-content:center;
  color:var(--c,#007CFF); font-family:var(--serif); font-weight:900; font-size:1.3rem;
}
.art-row h4{ font-size:.95rem; margin:0 0 3px; font-family:var(--serif); }

/* ---------- Pagina articolo ---------- */
.article-layout{ display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:36px; align-items:start; }
.article-head h1{ font-family:var(--serif); font-weight:700; font-size:1.85rem; margin:14px 0 12px; }
.article-body{ font-size:1rem; color:#33445C; max-width:70ch; }
.article-body p{ margin-bottom:1.1em; }
.breadcrumb{ font-size:.82rem; color:var(--muted); display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.breadcrumb a{ color:var(--muted); }
.breadcrumb a:hover{ color:var(--brand); }

.action-bar{
  display:flex; gap:10px; flex-wrap:wrap; align-items:center;
  padding:14px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line);
  margin:18px 0 26px; position:relative;
}
.dropdown{ position:relative; display:inline-block; }
.dropdown-menu{
  position:absolute; top:calc(100% + 6px); left:0; z-index:30; min-width:300px;
  background:var(--surface); border:1px solid var(--line); border-radius:12px;
  box-shadow:var(--shadow-2); padding:6px; display:none;
}
.dropdown.open .dropdown-menu{ display:block; }
.dropdown-menu .dd-head{
  font-size:.7rem; text-transform:uppercase; letter-spacing:.06em; font-weight:700;
  color:var(--muted); padding:8px 12px 4px;
}
.dropdown-item{
  display:flex; gap:11px; align-items:flex-start; width:100%; text-align:left;
  padding:10px 12px; border:none; background:none; border-radius:9px; cursor:pointer;
  font-family:var(--sans); font-size:.88rem; color:var(--ink);
}
.dropdown-item:hover{ background:var(--brand-soft); }
.dropdown-item svg{ flex:0 0 auto; margin-top:1px; color:var(--brand); }
.dropdown-item .d{ display:block; font-size:.76rem; color:var(--muted); font-weight:400; }
.dropdown-item b{ font-weight:600; }

.fade-gate{ position:relative; max-height:150px; overflow:hidden; }
.fade-gate::after{
  content:""; position:absolute; inset:auto 0 0 0; height:120px;
  background:linear-gradient(180deg, rgba(250,251,253,0), var(--paper));
}
.gate-card{
  margin-top:-30px; position:relative; z-index:2; text-align:center;
  padding:30px 26px;
}
.gate-card .lock-ico{
  width:46px; height:46px; margin:0 auto 12px; border-radius:50%;
  background:var(--accent); color:var(--accent-ink);
  display:flex; align-items:center; justify-content:center;
}
.gate-card h3{ font-family:var(--serif); font-size:1.2rem; margin-bottom:6px; }
.gate-card p{ color:var(--ink-2); font-size:.9rem; max-width:440px; margin:0 auto 16px; }
.gate-actions{ display:flex; gap:10px; justify-content:center; flex-wrap:wrap; }

/* Interessati */
.interested{ margin:26px 0; }
.interested-row{
  display:flex; align-items:center; gap:14px; padding:12px 14px;
  border:1px solid var(--line-soft); border-radius:10px; background:var(--surface);
  margin-bottom:10px;
}
.interested-row .who{ flex:1; min-width:0; }
.interested-row .who b{ font-size:.92rem; display:block; color:var(--ink); }
.interested-row .who span{ font-size:.78rem; color:var(--muted); }

/* Commenti */
.comment{ display:flex; gap:13px; padding:16px 0; border-bottom:1px solid var(--line-soft); }
.comment:last-of-type{ border-bottom:none; }
.comment .c-body{ flex:1; min-width:0; }
.comment .c-head{ display:flex; gap:8px; align-items:baseline; flex-wrap:wrap; }
.comment .c-head b{ font-size:.9rem; color:var(--ink); }
.comment .c-head span{ font-size:.76rem; color:var(--muted); }
.comment p{ font-size:.92rem; margin:4px 0 0; color:#33445C; }

/* Sidebar generica */
.side-card{ margin-bottom:20px; }
.side-card h3{
  font-size:.75rem; text-transform:uppercase; letter-spacing:.07em;
  color:var(--muted); margin-bottom:14px; font-weight:700; font-family:var(--sans);
}

/* ---------- Lock (contenuti riservati) ---------- */
.locked-preview{ filter:blur(7px); pointer-events:none; user-select:none; opacity:.55; }
.lock-overlay{ position:relative; }
.lock-overlay .gate-card{
  position:absolute; left:50%; top:110px; transform:translateX(-50%);
  width:min(480px, 92%); margin:0; box-shadow:var(--shadow-2);
}

/* ---------- Ricerca ---------- */
.search-page-head{ padding:36px 0 0; }
.search-page-head .search-band{
  margin:18px -24px 0; padding:22px 24px; border-radius:12px;
}
.search-page-head .search-band .search-big{ max-width:none; }
.result-item{ padding:18px 0; border-bottom:1px solid var(--line-soft); }
.result-item:last-child{ border-bottom:none; }
.result-item h3{ font-family:var(--serif); font-size:1.05rem; margin-bottom:4px; }
.result-item .excerpt{ font-size:.88rem; color:var(--ink-2); margin:4px 0 6px; }
mark{
  background:var(--accent); color:var(--accent-ink); border-radius:3px; padding:0 2px;
  font-weight:600;
}
.result-file{
  display:flex; align-items:center; gap:12px; padding:12px 14px;
  border:1px solid var(--line-soft); border-radius:10px; margin-bottom:10px; background:var(--surface);
}
.result-file .f-ico{
  width:38px; height:38px; border-radius:8px; background:var(--brand-soft); color:var(--brand);
  display:flex; align-items:center; justify-content:center; flex:0 0 auto;
}
.result-file .f-meta{ flex:1; min-width:0; }
.result-file .f-meta b{ font-size:.9rem; display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--ink); }
.result-file .f-meta span{ font-size:.76rem; color:var(--muted); }
.search-filters{ display:flex; gap:10px; flex-wrap:wrap; margin:16px 0 8px; }

/* ---------- Directory professionisti ---------- */
.pro-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:20px; }
.pro-card{ display:flex; gap:16px; padding:20px; }
.pro-card .p-main{ flex:1; min-width:0; }
.pro-card h3{ font-size:1.05rem; margin-bottom:2px; }
.pro-card h3 a{ color:var(--ink); }
.pro-card h3 a:hover{ color:var(--brand); text-decoration:none; }
.pro-card .role{ font-size:.85rem; color:var(--ink-2); margin-bottom:8px; }
.pro-card .loc{ display:inline-flex; align-items:center; gap:5px; font-size:.78rem; color:var(--muted); }
.tag{
  display:inline-block; font-size:.74rem; font-weight:600; color:var(--label-tx);
  background:var(--label-bg); border-radius:99px; padding:3px 10px; margin:0 5px 5px 0;
}
.pro-card .p-actions{ display:flex; flex-direction:column; gap:8px; justify-content:center; }
.filters-row{ display:flex; gap:12px; flex-wrap:wrap; margin-bottom:24px; }
.filters-row .input, .filters-row .select{ width:auto; min-width:180px; flex:1; }

/* ---------- Profilo ---------- */
.profile-cover{
  height:160px; border-radius:var(--r-l) var(--r-l) 0 0;
  background:var(--c,#607387);
  background:
    linear-gradient(100deg, color-mix(in srgb, var(--c,#607387) 88%, #122B46), color-mix(in srgb, var(--c,#607387) 70%, #fff));
}
.profile-head{
  background:var(--surface); border:1px solid var(--line); border-top:none;
  border-radius:0 0 var(--r-l) var(--r-l);
  padding:0 30px 24px; margin-bottom:28px;
}
.profile-head .row{ display:flex; gap:20px; align-items:flex-end; flex-wrap:wrap; }
.profile-head .avatar.s-xl{ margin-top:-34px; border:4px solid var(--surface); box-shadow:var(--shadow-1); }
.profile-head .grow{ flex:1; min-width:230px; padding-top:14px; }
.profile-head h1{ font-family:var(--serif); font-size:1.5rem; margin:0; }
.profile-head .tagline{ color:var(--ink-2); font-size:.95rem; margin:2px 0 0; }
.profile-head .p-meta{ display:flex; gap:16px; flex-wrap:wrap; margin-top:8px; font-size:.82rem; color:var(--muted); }
.profile-head .p-meta span{ display:inline-flex; align-items:center; gap:5px; }
.profile-head .actions{ display:flex; gap:10px; padding-top:14px; flex-wrap:wrap; }
.profile-layout{ display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:28px; align-items:start; }
.svc-grid{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.svc-card{ padding:16px 18px; }
.svc-card h4{ font-size:.95rem; margin:0 0 4px; display:flex; align-items:center; gap:9px; }
.svc-card h4 svg{ color:var(--ok); flex:0 0 auto; }
.svc-card p{ font-size:.84rem; color:var(--ink-2); margin:0; }
.pf-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
.pf-tile{
  border-radius:10px; overflow:hidden; border:1px solid var(--line); background:var(--surface);
}
.pf-tile .pf-cover{
  height:80px; display:flex; align-items:center; justify-content:center;
  font-family:var(--serif); font-weight:900; font-size:1.5rem;
  color:var(--c,#007CFF);
  background:#EDF2F8;
  background:color-mix(in srgb, var(--c,#007CFF) 11%, #fff);
  border-bottom:1px solid var(--line-soft);
}
.pf-tile .pf-body{ padding:12px 14px; }
.pf-tile b{ font-size:.88rem; display:block; color:var(--ink); }
.pf-tile span{ font-size:.78rem; color:var(--muted); }
.kv{ font-size:.88rem; }
.kv .kv-row{ display:flex; justify-content:space-between; gap:14px; padding:8px 0; border-bottom:1px solid var(--line-soft); }
.kv .kv-row:last-child{ border-bottom:none; }
.kv .k{ color:var(--muted); flex:0 0 auto; }
.kv .v{ text-align:right; font-weight:600; min-width:0; overflow-wrap:anywhere; color:var(--ink); }

/* ---------- Archivio personale ---------- */
.arch-row{
  display:flex; gap:14px; align-items:center; padding:12px 16px;
  border:1px solid var(--line-soft); border-radius:10px; background:var(--surface); margin-bottom:10px;
}
.arch-row .art-row{ flex:1; border-bottom:none; padding:0; min-width:0; }
.arch-row .a-actions{ display:flex; gap:8px; flex-wrap:wrap; }

/* ---------- Messaggi ---------- */
.msg-shell{ padding:22px 0 30px; }
.msg-layout{
  display:grid; grid-template-columns:300px minmax(0,1fr) 290px;
  height:calc(100vh - 210px); min-height:520px;
  background:var(--surface); border:1px solid var(--line); border-radius:var(--r-l);
  overflow:hidden; box-shadow:var(--shadow-1);
}
.chat-list{ border-right:1px solid var(--line); display:flex; flex-direction:column; min-height:0; }
.chat-list-head{ padding:14px 14px 10px; border-bottom:1px solid var(--line-soft); }
.chat-list-scroll{ overflow-y:auto; flex:1; }
.chat-item{
  display:flex; gap:11px; padding:12px 14px; cursor:pointer; border-bottom:1px solid var(--line-soft);
  align-items:flex-start; background:none; border-left:3px solid transparent;
}
.chat-item:hover{ background:var(--surface-2); }
.chat-item.active{ background:var(--brand-soft); border-left-color:var(--brand); }
.chat-item .c-main{ flex:1; min-width:0; }
.chat-item .c-top{ display:flex; justify-content:space-between; gap:8px; align-items:baseline; }
.chat-item .c-top b{ font-size:.88rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--ink); }
.chat-item .c-top time{ font-size:.68rem; color:var(--muted); flex:0 0 auto; }
.chat-item .c-prev{
  font-size:.78rem; color:var(--muted); overflow:hidden; text-overflow:ellipsis;
  white-space:nowrap; margin-top:2px;
}
.chat-item .unread{
  min-width:18px; height:18px; border-radius:9px; background:var(--danger); color:#fff;
  font-size:.68rem; font-weight:700; display:inline-flex; align-items:center; justify-content:center;
  padding:0 5px; margin-top:3px;
}

.thread{ display:flex; flex-direction:column; min-height:0; min-width:0; }
.thread-head{
  display:flex; align-items:center; gap:12px; padding:12px 18px;
  border-bottom:1px solid var(--line); background:var(--surface);
}
.thread-head .t-main{ flex:1; min-width:0; }
.thread-head b{ display:block; font-size:.95rem; color:var(--ink); }
.thread-head span{ font-size:.76rem; color:var(--muted); }
.thread-scroll{ overflow-y:auto; flex:1; padding:20px 22px; background:var(--paper); min-height:0; }
.day-sep{
  text-align:center; margin:18px 0 14px; font-size:.72rem; color:var(--muted);
  display:flex; align-items:center; gap:14px;
}
.day-sep::before,.day-sep::after{ content:""; flex:1; height:1px; background:var(--line); }
.bubble-row{ display:flex; margin-bottom:12px; }
.bubble-row.out{ justify-content:flex-end; }
.bubble{
  max-width:74%; background:var(--surface); border:1px solid var(--line);
  border-radius:12px; padding:10px 14px; position:relative; font-size:.92rem; color:var(--ink-2);
}
.bubble-row.out .bubble{ background:#E9F0FF; border-color:#D3E0FA; }
.bubble .b-head{
  display:flex; gap:6px; align-items:baseline; font-size:.76rem; margin-bottom:4px; flex-wrap:wrap;
}
.bubble .b-head b{ color:var(--btn); font-weight:700; }
.bubble .b-head .pc{ color:var(--muted); }
.bubble .b-text{ white-space:pre-line; }
.bubble .b-foot{
  display:flex; gap:9px; align-items:center; justify-content:flex-end;
  font-size:.68rem; color:var(--muted); margin-top:6px;
}
.bubble .b-foot a{ color:var(--muted); display:inline-flex; opacity:0; transition:opacity .12s; }
.bubble:hover .b-foot a{ opacity:1; }
.bubble .b-foot a:hover{ color:var(--brand); }
.file-chip{
  display:flex; align-items:center; gap:10px; margin-top:9px;
  background:var(--surface-2); border:1px solid var(--line-soft); border-radius:9px;
  padding:8px 11px; font-size:.82rem;
}
.bubble-row.out .file-chip{ background:rgba(255,255,255,.7); }
.file-chip svg{ color:var(--brand); flex:0 0 auto; }
.file-chip .fc-main{ flex:1; min-width:0; }
.file-chip .fc-main b{ display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; color:var(--ink); }
.file-chip .fc-main span{ color:var(--muted); font-size:.72rem; }
.art-ref{
  display:flex; gap:10px; align-items:center; margin-top:9px;
  border:1px solid var(--line); border-left:3px solid var(--c,var(--brand));
  border-radius:9px; padding:9px 12px; background:var(--surface);
  color:var(--ink); text-decoration:none; font-size:.82rem;
}
.art-ref:hover{ text-decoration:none; box-shadow:var(--shadow-1); }
.art-ref .ar-k{ font-size:.66rem; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); display:block; }
.art-ref b{ font-family:var(--serif); }

.composer{ border-top:1px solid var(--line); padding:12px 16px; background:var(--surface); }
.compose-stage{
  display:flex; gap:10px; flex-wrap:wrap; margin-bottom:10px;
}
.stage-item{
  display:flex; align-items:center; gap:9px; font-size:.8rem;
  background:var(--brand-soft); border:1px solid #C9E2FF; border-radius:9px;
  padding:7px 10px; max-width:100%; color:var(--ink);
}
.stage-item svg{ color:var(--brand); flex:0 0 auto; }
.stage-item .si-main{ min-width:0; }
.stage-item .si-main b{ display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.8rem; }
.stage-item .si-main span{ font-size:.7rem; color:var(--muted); display:block; }
.stage-item button{
  border:none; background:none; cursor:pointer; color:var(--muted); padding:2px; display:inline-flex;
}
.stage-item button:hover{ color:var(--danger); }
.op-select{
  display:flex; align-items:center; gap:9px; margin-bottom:9px;
  font-size:.8rem; color:var(--ink-2); flex-wrap:wrap;
}
.op-select select{
  font-family:var(--sans); font-size:.8rem; font-weight:600; color:var(--btn);
  border:1px solid var(--line); border-radius:99px; padding:4px 10px; background:var(--surface);
}
.op-select .hint{ font-size:.72rem; color:var(--muted); }
.composer-row{ display:flex; gap:9px; align-items:flex-end; }
.composer-row .textarea{ min-height:44px; max-height:120px; }
.details-panel{ border-left:1px solid var(--line); overflow-y:auto; padding:18px; min-height:0; }
.details-panel h4{
  font-size:.72rem; text-transform:uppercase; letter-spacing:.07em; color:var(--muted);
  margin:18px 0 10px; font-weight:700; font-family:var(--sans);
}
.details-panel h4:first-of-type{ margin-top:14px; }
.media-item{
  display:flex; gap:10px; align-items:center; padding:8px 0;
  border-bottom:1px solid var(--line-soft); font-size:.8rem;
}
.media-item:last-child{ border-bottom:none; }
.media-item svg{ color:var(--brand); flex:0 0 auto; }
.media-item .m-main{ flex:1; min-width:0; }
.media-item .m-main b{ display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; color:var(--ink); }
.media-item .m-main span{ color:var(--muted); font-size:.7rem; }

/* ---------- Stampa messaggio ---------- */
body[data-page="stampa"]{ background:#8A8F98; }
.sheet-wrap{ padding:34px 16px 60px; }
.sheet{
  max-width:760px; margin:0 auto; background:#fff; border-radius:4px;
  box-shadow:0 10px 40px rgba(0,0,0,.35);
  padding:58px 64px; min-height:900px; color:#20242B;
}
.sheet .s-head{
  display:flex; justify-content:space-between; align-items:flex-start;
  border-bottom:2px solid #122B46; padding-bottom:18px; margin-bottom:26px;
}
.sheet .s-head .brand .bw{ font-size:1.3rem; }
.sheet .s-title{ text-align:right; }
.sheet .s-title b{ display:block; font-size:.95rem; color:#122B46; }
.sheet .s-title span{ font-size:.75rem; color:#6A7180; }
.sheet .kv-table{ width:100%; border-collapse:collapse; font-size:.85rem; margin-bottom:28px; }
.sheet .kv-table td{ padding:7px 10px; border:1px solid #DDE0E4; vertical-align:top; }
.sheet .kv-table td:first-child{
  width:190px; background:#F2F4F5; font-weight:600; color:#4D5C6D; font-size:.78rem;
}
.sheet .msg-body{
  font-size:.95rem; line-height:1.65; white-space:pre-line;
  border:1px solid #DDE0E4; border-radius:6px; padding:20px 24px; margin-bottom:24px;
}
.sheet .att-list{ margin:0 0 30px; padding:0; list-style:none; font-size:.85rem; }
.sheet .att-list li{
  display:flex; gap:9px; align-items:center; padding:7px 4px; border-bottom:1px dashed #DDE0E4;
}
.sheet .s-foot{
  margin-top:36px; padding-top:14px; border-top:1px solid #DDE0E4;
  font-size:.72rem; color:#6A7180; line-height:1.6;
}
.print-actions{
  max-width:760px; margin:0 auto 20px; display:flex; gap:10px; justify-content:flex-end;
}
@media print{
  body[data-page="stampa"]{ background:#fff; }
  .no-print{ display:none !important; }
  .sheet-wrap{ padding:0; }
  .sheet{ box-shadow:none; border-radius:0; padding:20px 8px; min-height:0; max-width:none; }
}

/* ---------- Account / operatori ---------- */
.page-head{ padding:36px 0 8px; }
.page-head h1{ font-family:var(--serif); font-size:1.7rem; margin-bottom:6px; }
.page-head .lead{ color:var(--ink-2); max-width:660px; font-size:.98rem; }
.master-card{ display:flex; gap:18px; align-items:center; padding:22px 24px; margin-bottom:22px; }
.master-card .grow{ flex:1; min-width:0; }
.hier{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:14px 0 4px; }
.hier .node{
  display:inline-flex; align-items:center; gap:8px; padding:7px 15px;
  background:var(--surface); border:1px solid var(--line); border-radius:99px; font-size:.83rem; font-weight:600; color:var(--ink);
}
.hier .node.master{ border-color:var(--btn); color:var(--btn); background:var(--label-bg); }
.hier .arrow{ color:var(--muted); }
.trace-bar{ display:flex; align-items:center; gap:10px; margin-bottom:10px; font-size:.85rem; }
.trace-bar .tb-name{ width:150px; flex:0 0 auto; font-weight:600; color:var(--ink); }
.trace-bar .tb-track{ flex:1; height:12px; background:var(--line-soft); border-radius:6px; overflow:hidden; }
.trace-bar .tb-fill{ display:block; height:100%; background:var(--brand); border-radius:6px 3px 3px 6px; }
.trace-bar .tb-val{ width:44px; text-align:right; color:var(--ink-2); font-variant-numeric:tabular-nums; }

/* ---------- Admin ---------- */
.stat-row{ display:grid; grid-template-columns:repeat(5,1fr); gap:16px; margin-bottom:26px; }
.stat-tile{ padding:18px 20px; }
.stat-tile .s-label{ font-size:.78rem; color:var(--muted); font-weight:600; margin-bottom:6px; display:flex; gap:7px; align-items:center; }
.stat-tile .s-label svg{ color:var(--brand); }
.stat-tile .s-val{ font-family:var(--serif); font-size:1.9rem; font-weight:900; line-height:1.1; font-variant-numeric:tabular-nums; color:var(--ink); }
.stat-tile .s-delta{ font-size:.76rem; margin-top:4px; color:var(--ink-2); }
.stat-tile .s-delta.up{ color:var(--ok); font-weight:600; }

.chart-card{ padding:20px 22px; }
.chart-card h3{ font-size:.95rem; margin-bottom:2px; }
.chart-card .sub{ font-size:.78rem; color:var(--muted); margin-bottom:18px; }
.vbars{ display:flex; align-items:flex-end; gap:12px; height:150px; padding-top:8px; }
.vbar{ flex:1; display:flex; flex-direction:column; align-items:center; gap:6px; height:100%; justify-content:flex-end; position:relative; }
.vbar .vb-fill{
  width:100%; max-width:34px; background:var(--brand); border-radius:4px 4px 0 0;
  min-height:4px; position:relative;
}
.vbar:hover .vb-fill{ background:var(--btn-strong); }
.vbar .vb-tip{
  position:absolute; bottom:calc(100% + 6px); left:50%; transform:translateX(-50%);
  background:var(--ink); color:#fff; font-size:.7rem; font-weight:600;
  padding:2px 8px; border-radius:6px; opacity:0; pointer-events:none; transition:opacity .12s;
  white-space:nowrap; z-index:5;
}
.vbar:hover .vb-tip{ opacity:1; }
.vbar .vb-label{ font-size:.68rem; color:var(--muted); }
.vbar .vb-topval{ font-size:.72rem; color:var(--ink-2); font-weight:600; font-variant-numeric:tabular-nums; }
.hbar-row{ display:flex; align-items:center; gap:12px; margin-bottom:11px; font-size:.84rem; }
.hbar-row .hb-label{ width:190px; flex:0 0 auto; display:flex; align-items:center; gap:8px; color:var(--ink); }
.hbar-row .hb-label .dot{ width:9px; height:9px; border-radius:50%; flex:0 0 auto; }
.hbar-row .hb-track{ flex:1; height:12px; background:var(--line-soft); border-radius:6px; overflow:hidden; }
.hbar-row .hb-fill{ display:block; height:100%; background:var(--brand); border-radius:6px 3px 3px 6px; }
.hbar-row .hb-val{ width:44px; text-align:right; color:var(--ink-2); font-variant-numeric:tabular-nums; }
.admin-grid-2{ display:grid; grid-template-columns:1fr 1fr; gap:20px; margin-bottom:26px; }
.cat-color-dot{ display:inline-block; width:11px; height:11px; border-radius:4px; margin-right:9px; vertical-align:-1px; }

/* ---------- Matrice permessi ---------- */
.perm-table td:nth-child(2), .perm-table td:nth-child(3),
.perm-table th:nth-child(2), .perm-table th:nth-child(3){ text-align:center; }
.perm-yes{ color:var(--ok); }
.perm-no{ color:var(--danger); opacity:.55; }
.perm-note{ font-size:.76rem; color:var(--muted); display:block; }

/* ---------- Login ---------- */
.auth-layout{ display:grid; grid-template-columns:1fr 1fr; gap:24px; align-items:start; }
.auth-card h2{ font-family:var(--serif); font-size:1.3rem; margin-bottom:4px; }
.auth-card .sub{ color:var(--ink-2); font-size:.88rem; margin-bottom:20px; }
.radio-tile{
  display:flex; gap:11px; padding:13px 15px; border:1px solid var(--line);
  border-radius:10px; cursor:pointer; margin-bottom:10px; align-items:flex-start;
}
.radio-tile:hover{ border-color:var(--brand); }
.radio-tile input{ margin-top:3px; accent-color:var(--btn); }
.radio-tile b{ font-size:.9rem; display:block; color:var(--ink); }
.radio-tile span{ font-size:.78rem; color:var(--muted); }

/* ---------- Forum ---------- */
.forum-row{
  display:flex; gap:14px; align-items:center; padding:14px 18px;
  border-bottom:1px solid var(--line-soft); color:var(--ink); text-decoration:none;
}
.forum-row:hover{ background:var(--surface-2); text-decoration:none; }
.forum-row:last-child{ border-bottom:none; }
.forum-row .f-main{ flex:1; min-width:0; }
.forum-row .f-main b{ display:block; font-family:var(--serif); font-size:1rem; color:var(--brand); }
.forum-row .f-main span{ font-size:.78rem; color:var(--muted); }
.forum-stats{ text-align:center; min-width:78px; flex:0 0 auto; }
.forum-stats b{ display:block; font-size:1.05rem; color:var(--ink); font-family:var(--serif); font-variant-numeric:tabular-nums; }
.forum-stats span{ font-size:.68rem; color:var(--muted); }

.disc-row{
  display:flex; gap:12px; align-items:center; padding:12px 16px;
  border:1px solid var(--line-soft); border-radius:10px; background:var(--surface);
  margin-bottom:10px; color:var(--ink); text-decoration:none;
}
.disc-row:hover{ text-decoration:none; border-color:var(--brand); box-shadow:var(--shadow-1); }
.disc-row .d-main{ flex:1; min-width:0; }
.disc-row .d-main > b{
  display:block; font-size:.94rem; font-family:var(--serif);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.disc-row .d-meta{ font-size:.75rem; color:var(--muted); display:flex; gap:6px; flex-wrap:wrap; align-items:center; margin-top:2px; }
.disc-row .d-meta .sep{ opacity:.5; }
.disc-row .d-meta .with-art{
  color:var(--label-tx); background:var(--label-bg); border-radius:99px;
  padding:1px 8px; font-weight:600; display:inline-flex; gap:4px; align-items:center;
}
.disc-row.compatta{ padding:10px 12px; }
.disc-row.compatta .d-main > b{ font-size:.86rem; white-space:normal; line-height:1.3; }
.disc-row.compatta .d-meta{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:block; }
.disc-row.compatta .d-meta svg{ vertical-align:-1px; }
.disc-stats{ text-align:center; min-width:62px; flex:0 0 auto; }
.disc-stats b{ display:block; font-size:.92rem; color:var(--ink); font-family:var(--serif); font-variant-numeric:tabular-nums; white-space:nowrap; }
.disc-stats span{ font-size:.66rem; color:var(--muted); }

.post-card{ display:flex; gap:14px; padding:18px 20px; margin-bottom:14px; }
.post-card .p-body{ flex:1; min-width:0; }
.post-card .p-head{ display:flex; gap:8px; align-items:baseline; flex-wrap:wrap; margin-bottom:6px; }
.post-card .p-head b{ color:var(--ink); font-size:.92rem; }
.post-card .p-head .p-sub{ font-size:.75rem; color:var(--muted); }
.post-card .p-text{ font-size:.93rem; color:#33445C; white-space:pre-line; }
.badge-op{ background:var(--accent); color:var(--accent-ink); font-size:.64rem; padding:2px 8px; border-radius:99px; font-weight:700; letter-spacing:.03em; }

.new-disc-form{ padding:20px 22px; margin-bottom:20px; border:1px solid #C9E2FF; background:#F4F9FF; }
.new-disc-form h3{ font-size:1.05rem; margin-bottom:12px; }

@media (max-width:720px){
  .disc-stats{ display:none; }
  .forum-stats{ min-width:60px; }
}

/* ---------- Footer (minimale, stile papertel.eu) ---------- */
.site-footer{
  margin-top:60px; border-top:1px solid var(--line); background:#fff;
  padding:36px 0 30px; font-size:.85rem; color:#5A5A5A;
}
.site-footer .cols{ display:flex; gap:40px; flex-wrap:wrap; justify-content:space-between; }
.site-footer .f-brand{ max-width:340px; }
.site-footer h5{ margin:0 0 10px; font-size:.75rem; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); font-family:var(--sans); }
.site-footer ul{ list-style:none; margin:0; padding:0; }
.site-footer li{ margin-bottom:7px; }
.site-footer a{ color:#5A5A5A; }
.site-footer a:hover{ color:var(--brand); }
.site-footer .legal{
  margin-top:26px; padding-top:16px; border-top:1px solid var(--line-soft);
  font-size:.76rem; color:var(--muted);
  display:flex; justify-content:space-between; gap:14px; flex-wrap:wrap; align-items:center;
}
.site-footer .legal .pill-link{
  border:1px solid var(--line); border-radius:6px; padding:3px 10px; font-size:.72rem; color:#5A5A5A;
  background:#fff; cursor:pointer; font-family:var(--sans);
}

/* ---------- Interruttore demo ---------- */
.demo-switch{ position:fixed; right:18px; bottom:18px; z-index:100; font-family:var(--sans); }
.demo-switch .ds-toggle{
  display:flex; align-items:center; gap:9px;
  background:var(--ink); color:#fff; border:none; cursor:pointer;
  padding:10px 16px; border-radius:99px; font-size:.82rem; font-weight:600;
  box-shadow:var(--shadow-2); font-family:var(--sans);
}
.demo-switch .ds-toggle .st{ color:var(--accent); }
.demo-switch .ds-menu{
  position:absolute; right:0; bottom:calc(100% + 10px); width:310px;
  background:var(--surface); border:1px solid var(--line); border-radius:14px;
  box-shadow:var(--shadow-2); padding:8px; display:none;
}
.demo-switch.open .ds-menu{ display:block; }
.ds-item{
  display:flex; gap:11px; width:100%; text-align:left; padding:11px 12px;
  border:none; background:none; border-radius:10px; cursor:pointer; font-family:var(--sans);
  align-items:flex-start;
}
.ds-item:hover{ background:var(--surface-2); }
.ds-item.active{ background:var(--brand-soft); }
.ds-item .r{
  width:16px; height:16px; border-radius:50%; border:2px solid var(--line); margin-top:2px; flex:0 0 auto;
}
.ds-item.active .r{ border-color:var(--brand); background:var(--brand); box-shadow:inset 0 0 0 3px #fff; }
.ds-item b{ display:block; font-size:.86rem; color:var(--ink); }
.ds-item span{ font-size:.75rem; color:var(--muted); display:block; }
.ds-note{ font-size:.7rem; color:var(--muted); padding:8px 12px 6px; border-top:1px solid var(--line-soft); margin-top:6px; }

/* ---------- Toast ---------- */
.toast-zone{ position:fixed; top:18px; left:50%; transform:translateX(-50%); z-index:200; display:flex; flex-direction:column; gap:8px; align-items:center; }
.toast{
  background:var(--ink); color:#fff; font-size:.86rem; font-weight:500;
  padding:11px 20px; border-radius:99px; box-shadow:var(--shadow-2);
  display:flex; gap:9px; align-items:center;
  animation:toast-in .25s ease;
}
.toast svg{ color:var(--accent); }
@keyframes toast-in{ from{ opacity:0; transform:translateY(-8px);} to{ opacity:1; transform:none;} }

/* ---------- Responsive ---------- */
@media (max-width:1024px){
  .cat-grid{ grid-template-columns:repeat(3,1fr); }
  .art-grid{ grid-template-columns:repeat(2,1fr); }
  .article-layout,.profile-layout{ grid-template-columns:1fr; }
  .msg-layout{ grid-template-columns:260px minmax(0,1fr); }
  .details-panel{ display:none; }
  .stat-row{ grid-template-columns:repeat(2,1fr); }
  .admin-grid-2{ grid-template-columns:1fr; }
  .pro-grid{ grid-template-columns:1fr; }
  .duo{ grid-template-columns:1fr; }
  .steps{ grid-template-columns:1fr; }
  .auth-layout{ grid-template-columns:1fr; }
}
@media (max-width:720px){
  .main-nav{ display:none; }
  .um-public{ display:block; }
  .user-pill .up-txt{ display:none; }
  .user-menu .dropdown-menu{ min-width:0; width:min(300px, calc(100vw - 32px)); }
  .cat-grid{ grid-template-columns:repeat(2,1fr); }
  .art-grid{ grid-template-columns:1fr; }
  .msg-layout{ grid-template-columns:1fr; }
  .chat-list{ display:none; }
  .svc-grid,.pf-grid{ grid-template-columns:1fr; }
  .sheet{ padding:30px 22px; }
  .filters-row .input,.filters-row .select{ min-width:0; width:100%; }
}
