/* Radar Fondi v2 — "Notte e giorno"
   Notte (inchiostro-blu) per Home, accesso e testate; giorno (quasi bianco) per il lavoro.
   Una sola pillola d'azione piena per vista; il resto è traslucido. Elevazione tonale. */

:root {
  /* Notte */
  --night: #071A2C;
  --night-2: #0D2742;
  --night-3: #14365A;
  --night-line: rgba(160, 200, 240, 0.14);
  --night-line-2: rgba(160, 200, 240, 0.24);
  --on-night: #F2F7FC;
  --on-night-2: #AFC4DA;
  --on-night-3: #7F98B3;
  --sky: #8FC1F0;

  /* Giorno */
  --canvas: #F6F8FC;
  --surface: #FFFFFF;
  --tint: #EEF3FA;
  --tint-2: #E3ECF7;
  --ink: #0B1B2B;
  --ink-2: #3A4C5F;
  --ink-3: #66788B;
  --line: #E4EAF2;
  --line-2: #D3DDE8;

  /* Brand e stati */
  --brand: #145284;
  --brand-2: #1B64A0;
  --brand-soft: rgba(20, 82, 132, 0.08);
  --brand-soft-2: rgba(20, 82, 132, 0.14);
  --green: #3CA434;
  --green-ink: #1C6A16;
  --green-soft: #E4F6E1;
  --amber: #F0B43C;
  --amber-ink: #7A4B00;
  --amber-soft: #FFF3DA;
  --red: #E5484D;
  --red-ink: #A11F24;
  --red-soft: #FDECEC;
  --grey-soft: #EEF1F5;
  --grey-ink: #4C5B6B;

  --font: 'Titillium Web', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r-ctl: 12px; --r-card: 16px; --r-hero: 24px; --r-pill: 999px;
  --shadow-float: 0 18px 40px -18px rgba(7, 26, 44, 0.45), 0 3px 10px rgba(7, 26, 44, 0.08);
  --shadow-pop: 0 30px 80px -20px rgba(7, 26, 44, 0.55), 0 8px 24px rgba(7, 26, 44, 0.18);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --side-w: 252px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--canvas); color: var(--ink); font-family: var(--font);
  font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  font-variant-numeric: tabular-nums;
}
::selection { background: rgba(143, 193, 240, 0.45); }
[hidden] { display: none !important; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; letter-spacing: -0.015em; line-height: 1.15; }
h1 { font-size: clamp(1.75rem, 1.25rem + 1.8vw, 2.5rem); font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: 1.25rem; font-weight: 700; }
h3 { font-size: 1.0625rem; font-weight: 700; }
p { margin: 0; }
a { color: var(--brand); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-2); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; border-radius: 8px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -80px; z-index: 200; background: var(--surface); padding: 8px 14px; border-radius: var(--r-pill); box-shadow: var(--shadow-float); }
.skip-link:focus { top: calc(12px + var(--safe-t)); }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
input, textarea { caret-color: var(--brand); }
.noscript { padding: 24px; }
@media (max-width: 719px) { .hide-m { display: none !important; } }
kbd { font: 600 0.75rem/1 var(--font); padding: 3px 6px; border-radius: 6px; border: 1px solid currentColor; opacity: 0.7; }

/* ───────────── Avvio ───────────── */
.boot { min-height: 100dvh; display: grid; place-content: center; gap: 12px; text-align: center; background: var(--night); color: var(--on-night); }
.boot-text { color: var(--on-night-2); }

/* ───────────── Marchio ───────────── */
.brandmark { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.01em; }
.brandmark b { font-weight: 900; }
.brandmark svg { width: 28px; height: 28px; flex: none; }
.wordmark { font-weight: 600; } .wordmark b { font-weight: 900; }

/* ───────────── Guscio ───────────── */
.shell { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); }
.shell > *, .page { min-width: 0; }
.page { position: relative; }
main { min-width: 0; padding-bottom: calc(110px + var(--safe-b)); }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 720px) { .wrap { padding-left: 28px; padding-right: 28px; } }
@media (min-width: 1024px) { .wrap { padding-left: 44px; padding-right: 44px; } main { padding-bottom: 64px; } }

/* Barra superiore mobile (vetro) */
.mtop {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 10px;
  padding: calc(10px + var(--safe-t)) 14px 10px;
  background: rgba(246, 248, 252, 0.8); -webkit-backdrop-filter: saturate(1.8) blur(18px); backdrop-filter: saturate(1.8) blur(18px);
  border-bottom: 1px solid rgba(11, 27, 43, 0.06); color: var(--ink);
}
.mtop .ente { flex: 1; min-width: 0; color: var(--ink-3); font-size: 0.875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[data-world="night"] .mtop { background: rgba(7, 26, 44, 0.72); color: var(--on-night); border-bottom-color: var(--night-line); }
[data-world="night"] .mtop .ente { color: var(--on-night-3); }
.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-pill);
  border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 1.05rem; text-decoration: none; flex: none;
}
.icon-btn:hover { background: var(--brand-soft); color: inherit; }
[data-world="night"] .mtop .icon-btn:hover { background: rgba(255, 255, 255, 0.1); }
.badge { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--green); color: #fff; font-size: 0.7rem; font-weight: 700; line-height: 18px; text-align: center; }

/* Dock di navigazione mobile (vetro fluttuante) */
.dock {
  position: fixed; z-index: 45; left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); bottom: calc(12px + var(--safe-b));
  border-radius: 24px; padding: 6px;
  background: rgba(255, 255, 255, 0.94); border: 1px solid rgba(255, 255, 255, 0.7); box-shadow: var(--shadow-float), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .dock { background: rgba(255, 255, 255, 0.68); -webkit-backdrop-filter: saturate(1.9) blur(22px); backdrop-filter: saturate(1.9) blur(22px); }
}
.dock ul { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); max-width: 520px; gap: 2px; }
.dock a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 54px; border-radius: 18px; color: var(--ink-3); text-decoration: none; font-size: 0.75rem; font-weight: 600; transition: background 200ms var(--ease), color 200ms var(--ease); }
.dock a i { font-size: 1.1rem; }
.dock a[aria-current="page"] { background: var(--brand); color: #fff; box-shadow: 0 6px 16px -8px rgba(20, 82, 132, 0.8); }

/* Barra laterale desktop (giorno) */
.side { display: none; }
@media (min-width: 1024px) {
  .shell { grid-template-columns: var(--side-w) minmax(0, 1fr); }
  .mtop, .dock { display: none; }
  .side {
    display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100dvh; overflow: auto;
    padding: 22px 14px 18px; background: var(--surface); border-right: 1px solid var(--line);
  }
  .side .brandmark { padding: 0 10px; color: var(--ink); }
  .side nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
  .side nav a {
    display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: var(--r-ctl);
    color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 0.9375rem; transition: background 160ms var(--ease);
  }
  .side nav a i { width: 18px; text-align: center; color: var(--ink-3); }
  .side nav a:hover { background: var(--tint); color: var(--ink); }
  .side nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
  .side nav a[aria-current="page"] i { color: var(--brand); }
  .side nav .count { margin-left: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 10px; background: var(--green); color: #fff; font-size: 0.75rem; font-weight: 700; line-height: 20px; text-align: center; }
  .side .group { margin: 10px 12px 6px; color: var(--ink-3); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
  .side .search-trigger { margin: 0 2px; width: auto; }
  .side .foot { margin-top: auto; display: grid; gap: 10px; }
  .ente-card { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px; border-radius: var(--r-card); background: var(--tint); }
  .ente-card .av { width: 36px; height: 36px; border-radius: 10px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; }
  .ente-card .nm { font-weight: 700; font-size: 0.875rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ente-card .sub { color: var(--ink-3); font-size: 0.8125rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* Pillola di ricerca / apertura palette */
.search-trigger {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 42px; padding: 0 12px 0 14px; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--canvas); color: var(--ink-3); cursor: pointer; text-align: left; font-size: 0.9375rem;
}
.search-trigger:hover { border-color: var(--line-2); color: var(--ink-2); }
.search-trigger .lbl { flex: 1; }

/* Nastro demo */
.demo-ribbon { display: flex; align-items: center; gap: 10px; padding: 8px 16px; font-size: 0.8125rem; color: var(--amber-ink); background: var(--amber-soft); border-bottom: 1px solid rgba(122, 75, 0, 0.12); }
.demo-ribbon strong { font-weight: 700; letter-spacing: 0.04em; }
[data-world="night"] .demo-ribbon { background: #1A2A20; color: #F7D38A; border-bottom-color: rgba(247, 211, 138, 0.18); }
@media (min-width: 1024px) { .demo-ribbon { padding-left: 44px; } }

/* ───────────── Eroe notte ───────────── */
.hero {
  position: relative; overflow: hidden; color: var(--on-night); background:
    radial-gradient(900px 520px at 78% 18%, rgba(29, 102, 160, 0.38), transparent 62%),
    radial-gradient(700px 400px at 10% 110%, rgba(60, 164, 52, 0.12), transparent 60%),
    var(--night);
}
.hero::after { content: ''; position: absolute; inset: auto 0 0 0; height: 1px; background: var(--night-line); }
.hero-grid { display: grid; gap: 20px; padding-block: 26px 30px; grid-template-areas: "head" "radar" "actions"; }
.hero-head { grid-area: head; } .hero-actions { grid-area: actions; } .hero-radar, .hero-grid > .radar-wrap { grid-area: radar; }
.hero-actions .hero-search { margin-top: 0; }
@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 540px); grid-template-areas: "head radar" "actions radar"; gap: 0 40px; padding-block: 52px 56px; }
  .hero-head { align-self: end; } .hero-actions { align-self: start; padding-top: 26px; }
}
@media (max-width: 719px) { .hero .display { font-size: 2.25rem; } .hero .lead { font-size: 1.0625rem; } }
.hero .kicker-ente { display: inline-flex; align-items: center; gap: 8px; color: var(--on-night-2); font-weight: 600; font-size: 0.9375rem; }
.hero .kicker-ente .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(60, 164, 52, 0.2); }
.display { font-size: clamp(2.25rem, 1.3rem + 3.6vw, 4rem); line-height: 1.02; font-weight: 700; letter-spacing: -0.035em; margin-top: 14px; }
.display em { font-style: normal; color: var(--sky); }
.lead { font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem); font-weight: 300; color: var(--on-night-2); margin-top: 14px; max-width: 46ch; line-height: 1.45; }
.lead strong { font-weight: 600; color: var(--on-night); }
.hero-search {
  margin-top: 26px; display: flex; align-items: center; gap: 12px; width: 100%; max-width: 560px; height: 56px; padding: 0 10px 0 20px;
  border-radius: var(--r-pill); border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.07);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: var(--on-night-2); cursor: pointer; text-align: left; font-size: 1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08); transition: background 200ms var(--ease), border-color 200ms var(--ease);
}
.hero-search:hover { background: rgba(255, 255, 255, 0.11); border-color: rgba(255, 255, 255, 0.26); }
.hero-search .lbl { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-search kbd { color: var(--on-night-2); }
.hero-search .go { flex: none; width: 38px; height: 38px; border-radius: 50%; background: #fff; color: var(--brand); display: grid; place-items: center; }
.qpills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.qpill {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: var(--r-pill);
  background: rgba(175, 196, 218, 0.12); color: var(--on-night); text-decoration: none; font-weight: 600; font-size: 0.875rem; border: 1px solid transparent;
}
.qpill:hover { background: rgba(175, 196, 218, 0.2); color: var(--on-night); }
.qpill b { font-weight: 700; color: var(--sky); }
.qpill.warn b { color: var(--amber); }
.qpill.ok b { color: #8FDC86; }

/* ───────────── Radar delle competenze ───────────── */
.radar-wrap { position: relative; width: 100%; max-width: 540px; margin-inline: auto; }
.radar { width: 100%; height: auto; display: block; overflow: visible; }
.radar .ring { fill: none; stroke: var(--night-line-2); stroke-width: 1; }
.radar .ring-fill { fill: rgba(143, 193, 240, 0.035); }
.radar .spoke { stroke: var(--night-line); stroke-width: 1; }
.radar .tick { fill: var(--on-night-3); font: 600 11px var(--font); letter-spacing: 0.02em; }
.radar .ring-label { fill: var(--on-night-2); font: 700 10px var(--font); letter-spacing: 0.14em; paint-order: stroke; stroke: var(--night); stroke-width: 6px; stroke-linejoin: round; }
.radar .center-dot { fill: #fff; }
.radar .center-halo { fill: rgba(255, 255, 255, 0.08); }
.radar .sweep { opacity: 0; }
.radar.scanning .sweep { animation: sweep 1.6s var(--ease) 1 forwards; }
@keyframes sweep { 0% { transform: rotate(0deg); opacity: 0.9; } 80% { opacity: 0.5; } 100% { transform: rotate(360deg); opacity: 0; } }
.radar .blip { cursor: pointer; transition: transform 200ms var(--ease); transform-box: fill-box; transform-origin: center; }
.radar .blip circle.core { stroke: rgba(7, 26, 44, 0.9); stroke-width: 1.5; }
.radar .blip.doc circle.core { fill: #6BD15F; }
.radar .blip.men circle.core { fill: var(--sky); }
.radar .blip.unk circle.core { fill: rgba(242, 247, 252, 0.5); }
.radar .blip circle.ring-u { fill: none; stroke: var(--amber); stroke-width: 1.5; }
.radar .blip:hover, .radar .blip:focus-visible, .radar .blip.active { transform: scale(1.4); outline: none; }
.radar.scanning .blip { opacity: 0; animation: blip-in 420ms var(--ease) forwards; animation-delay: var(--d, 0ms); }
@keyframes blip-in { from { opacity: 0; transform: scale(0.2); } to { opacity: 1; transform: scale(1); } }
.radar-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; margin-top: 12px; color: var(--on-night-2); font-size: 0.8125rem; }
.radar-legend span { display: inline-flex; align-items: center; gap: 7px; }
.radar-legend i.sw { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.radar-tip {
  position: absolute; z-index: 5; width: min(300px, 78vw); padding: 14px 16px; border-radius: var(--r-card); pointer-events: none;
  background: rgba(13, 39, 66, 0.94); border: 1px solid var(--night-line-2); color: var(--on-night); box-shadow: var(--shadow-pop);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); opacity: 0; transform: translateY(6px); transition: opacity 160ms var(--ease), transform 160ms var(--ease);
}
.radar-tip.show { opacity: 1; transform: none; }
.radar-tip .t { font-weight: 700; line-height: 1.3; }
.radar-tip .m { color: var(--on-night-2); font-size: 0.8125rem; margin-top: 6px; }
.radar-tip .d { color: var(--amber); font-weight: 700; font-size: 0.8125rem; margin-top: 6px; }
.radar-note { color: var(--on-night-3); text-align: center; margin-top: 6px; font-size: 0.8125rem; }

/* ───────────── Testata delle pagine (giorno) ───────────── */
.pagehead { padding: 26px 0 18px; display: grid; gap: 8px; }
@media (min-width: 1024px) { .pagehead { padding-top: 40px; } }
.pagehead p { color: var(--ink-2); max-width: 70ch; font-size: 1.0625rem; font-weight: 300; }
.pagehead .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.backlink { display: inline-flex; align-items: center; gap: 8px; height: 36px; font-weight: 600; text-decoration: none; color: var(--ink-3); font-size: 0.9375rem; }
.backlink:hover { color: var(--brand); }

/* Campo di ricerca nelle pagine */
.search { position: relative; }
.search input {
  width: 100%; height: 50px; padding: 0 16px 0 46px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface);
  font-size: 1rem; color: var(--ink); transition: border-color 160ms, box-shadow 160ms;
}
.search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.search > i { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }

/* ───────────── Sezioni ───────────── */
.section { margin-top: 36px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.section-head h2 { font-size: 1.25rem; }
.section-head a { font-weight: 600; font-size: 0.9375rem; text-decoration: none; white-space: nowrap; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.panel-pad { padding: 18px; }
@media (min-width: 720px) { .panel-pad { padding: 24px; } }
.footnote { color: var(--ink-3); font-size: 0.875rem; margin-top: 12px; max-width: 72ch; }

/* ───────────── Righe opportunità ───────────── */
.opp-list { list-style: none; margin: 0; padding: 0; }
.opp-list > li + li { border-top: 1px solid var(--line); }
.opp {
  display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 14px; padding: 16px; text-decoration: none; color: inherit;
  transition: background 160ms var(--ease);
}
.opp:hover { background: #FAFCFF; color: inherit; }
.opp:hover .opp-title { color: var(--brand); }
.opp .chev { display: none; color: var(--line-2); transition: transform 160ms var(--ease), color 160ms; }
.opp:hover .chev { color: var(--brand); transform: translateX(3px); }
.opp-body { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.opp-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.opp-title { font-weight: 700; font-size: 1rem; line-height: 1.35; color: var(--ink); overflow-wrap: anywhere; letter-spacing: -0.005em; }
.opp-meta { color: var(--ink-3); font-size: 0.875rem; overflow-wrap: anywhere; }
.opp-meta span + span::before { content: '·'; margin: 0 7px; color: var(--line-2); }
.opp-side { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; grid-column: 2; min-width: 0; }
.opp-side .budget { font-weight: 700; font-size: 0.9375rem; color: var(--ink); }
@media (min-width: 900px) {
  .opp { grid-template-columns: 76px minmax(0, 1fr) 220px 18px; align-items: center; gap: 4px 20px; padding: 16px 22px; }
  .opp .opp-side { grid-column: auto; display: grid; justify-items: end; gap: 6px; text-align: right; }
  .opp .chev { display: block; }
}

/* Data compatta */
.when { display: grid; justify-items: center; align-content: center; text-align: center; width: 64px; padding: 8px 0 7px; border-radius: 14px; background: var(--tint); color: var(--ink); line-height: 1; align-self: start; }
@media (min-width: 900px) { .when { width: 76px; align-self: center; } }
.when .day { font-weight: 700; font-size: 1.625rem; letter-spacing: -0.03em; }
.when .mon { font-weight: 700; font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; margin-top: 3px; color: var(--ink-2); }
.when .sub { font-size: 0.6875rem; color: var(--ink-3); margin-top: 5px; font-weight: 600; }
.when.urgent { background: var(--red-soft); } .when.urgent .day, .when.urgent .mon { color: var(--red-ink); }
.when.soon { background: var(--amber-soft); } .when.soon .day, .when.soon .mon { color: var(--amber-ink); }
.when.opens { background: var(--brand-soft); } .when.opens .day, .when.opens .mon { color: var(--brand); }
.when.none { background: var(--grey-soft); color: var(--ink-3); } .when.none i { font-size: 1.15rem; margin-bottom: 4px; }
.when.past { background: var(--grey-soft); } .when.past .day, .when.past .mon { color: var(--ink-3); }

/* Pillole (sempre puntino + parola) */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--r-pill); font-size: 0.8125rem; font-weight: 700; white-space: nowrap; background: var(--grey-soft); color: var(--grey-ink); max-width: 100%; min-width: 0; }
.pill > span { overflow: hidden; text-overflow: ellipsis; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.pill.noDot::before { display: none; }
.pill.ok { background: var(--green-soft); color: var(--green-ink); }
.pill.check { background: var(--amber-soft); color: var(--amber-ink); }
.pill.no { background: var(--red-soft); color: var(--red-ink); }
.pill.info { background: var(--brand-soft); color: var(--brand); }
.pill.demo { background: var(--amber-soft); color: var(--amber-ink); border: 1px dashed rgba(122, 75, 0, 0.4); }
.pill i { font-size: 0.75rem; }
.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 0.8125rem; color: var(--ink-2); }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status i { display: none; }
.status.s-aperto { color: var(--green-ink); }
.status.s-in_scadenza { color: var(--red-ink); }
.status.s-prossima_apertura, .status.s-programmato { color: var(--brand); }
.status.s-scaduto, .status.s-concluso, .status.s-revocato { color: var(--ink-3); }
.status.s-sospeso, .status.s-da_verificare { color: var(--amber-ink); }
.scope { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.tag { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--r-pill); font-size: 0.8125rem; font-weight: 600; background: var(--grey-soft); color: var(--grey-ink); max-width: 100%; min-width: 0; }
.tag > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag.ok { background: var(--green-soft); color: var(--green-ink); }
.tag.check { background: var(--amber-soft); color: var(--amber-ink); }
.tag.no { background: var(--red-soft); color: var(--red-ink); }
.tag.info { background: var(--brand-soft); color: var(--brand); }
.tag.demo { background: var(--amber-soft); color: var(--amber-ink); border: 1px dashed rgba(122, 75, 0, 0.4); }

/* ───────────── Pulsanti e controlli ───────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: var(--r-pill);
  border: 1px solid transparent; font-weight: 700; font-size: 0.9375rem; cursor: pointer; text-decoration: none; white-space: nowrap;
  background: var(--brand); color: #fff; transition: background 160ms var(--ease), transform 100ms, box-shadow 160ms;
  box-shadow: 0 8px 18px -10px rgba(20, 82, 132, 0.8);
}
.btn:hover { background: var(--brand-2); color: #fff; }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn.secondary, .btn.soft { background: var(--brand-soft); color: var(--brand); box-shadow: none; }
.btn.secondary:hover, .btn.soft:hover { background: var(--brand-soft-2); color: var(--brand); }
.btn.ghost { background: transparent; color: var(--ink-2); box-shadow: none; padding: 0 14px; }
.btn.ghost:hover { background: var(--tint); color: var(--ink); }
.btn.positive { background: var(--green-ink); box-shadow: none; }
.btn.positive:hover { background: #155210; }
.btn.on-brand, .btn.on-night { background: #fff; color: var(--brand); box-shadow: none; }
.btn.glass { background: rgba(175, 196, 218, 0.14); color: var(--on-night); box-shadow: none; }
.btn.glass:hover { background: rgba(175, 196, 218, 0.24); color: var(--on-night); }
.btn.small { height: 36px; padding: 0 14px; font-size: 0.875rem; }
.btn[disabled], .btn[aria-disabled="true"] { background: var(--grey-soft); color: var(--ink-3); cursor: not-allowed; box-shadow: none; transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Tab come controllo segmentato */
.tabs { display: inline-flex; gap: 2px; padding: 4px; border-radius: var(--r-pill); background: var(--tint-2); overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: var(--r-pill); color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 0.9375rem; transition: background 160ms var(--ease); }
.tabs a:hover { color: var(--ink); }
.tabs a .count { font-size: 0.75rem; font-weight: 700; color: var(--ink-3); }
.tabs a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(7, 26, 44, 0.08), 0 4px 10px -4px rgba(7, 26, 44, 0.12); }
.tabs a[aria-current="page"] .count { color: var(--brand); }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 0; }
.toolbar .grow { flex: 1; }
.chip-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: 0.875rem; cursor: pointer; text-decoration: none;
}
.chip-btn:hover { border-color: var(--brand); color: var(--brand); }
.chip-btn[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.inline-input { height: 36px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface); width: min(240px, 60vw); }

.field { display: grid; gap: 6px; }
.field label, .field .label { font-weight: 700; font-size: 0.875rem; color: var(--ink); }
.field .hint { color: var(--ink-3); font-size: 0.8125rem; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: var(--r-ctl); border: 1px solid var(--line-2); background: var(--surface); transition: border-color 160ms, box-shadow 160ms;
}
.field textarea { min-height: 110px; resize: vertical; line-height: 1.45; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.field [aria-invalid="true"] { border-color: var(--red); }
.field .error, .error { color: var(--red-ink); font-size: 0.875rem; font-weight: 600; }
.form-grid { display: grid; gap: 16px; }
@media (min-width: 720px) { .form-grid.two { grid-template-columns: 1fr 1fr; } .form-grid .span2 { grid-column: 1 / -1; } }
.checkrow { display: flex; align-items: flex-start; gap: 12px; min-height: 40px; cursor: pointer; }
.checkrow input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--brand); flex: none; }
.required { color: var(--red-ink); }

/* ───────────── Fogli e palette (vetro) ───────────── */
.sheet-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(7, 26, 44, 0.42); display: flex; align-items: flex-end; justify-content: center; animation: fade 200ms var(--ease); }
@keyframes fade { from { opacity: 0; } }
.sheet {
  width: 100%; max-width: 640px; max-height: min(86dvh, 760px); border-radius: var(--r-hero) var(--r-hero) 0 0;
  display: flex; flex-direction: column; overflow: hidden; background: rgba(255, 255, 255, 0.97); box-shadow: var(--shadow-pop);
  padding: 8px 18px calc(16px + var(--safe-b)); animation: sheet-in 320ms var(--ease);
}
.sheet.form-grid { display: grid; overflow: auto; }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .sheet { background: rgba(255, 255, 255, 0.84); -webkit-backdrop-filter: saturate(1.8) blur(26px); backdrop-filter: saturate(1.8) blur(26px); }
}
.sheet .grabber { width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 0 auto 12px; flex: none; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 0 8px; flex: none; }
.sheet-body { overflow: auto; min-height: 0; flex: 1; padding-bottom: 12px; overscroll-behavior: contain; }
.sheet fieldset { border: 0; padding: 0; margin: 18px 0 0; }
.sheet fieldset:first-child { margin-top: 0; }
.sheet legend { font-weight: 700; margin-bottom: 8px; font-size: 0.75rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.08em; }
.sheet .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sheet-foot { display: flex; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); flex: none; }
.sheet-foot .btn { flex: 1; }
@media (min-width: 720px) { .sheet-backdrop { align-items: center; } .sheet { border-radius: var(--r-hero); } }
@keyframes sheet-in { from { transform: translateY(28px) scale(0.98); opacity: 0.3; } to { transform: none; opacity: 1; } }

.palette-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(7, 26, 44, 0.5); display: flex; justify-content: center; align-items: flex-start; padding: calc(9vh + var(--safe-t)) 12px 12px; animation: fade 160ms var(--ease); }
.palette {
  width: 100%; max-width: 680px; border-radius: 22px; overflow: hidden; background: rgba(255, 255, 255, 0.92); box-shadow: var(--shadow-pop);
  -webkit-backdrop-filter: saturate(1.8) blur(30px); backdrop-filter: saturate(1.8) blur(30px); border: 1px solid rgba(255, 255, 255, 0.7);
  animation: sheet-in 260ms var(--ease); display: flex; flex-direction: column; max-height: 76dvh;
}
.palette-in { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--line); flex: none; }
.palette-in i { color: var(--ink-3); }
.palette-in input { flex: 1; min-width: 0; height: 62px; border: 0; background: transparent; font-size: 1.125rem; outline: none; color: var(--ink); }
.palette-list { overflow: auto; padding: 8px; }
.palette-group { padding: 10px 12px 6px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.palette-item { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; text-decoration: none; color: var(--ink); cursor: pointer; }
.palette-item .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--tint); color: var(--brand); }
.palette-item .tt { font-weight: 700; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.palette-item .ss { color: var(--ink-3); font-size: 0.8125rem; }
.palette-item[aria-selected="true"], .palette-item:hover { background: var(--brand-soft); color: var(--ink); }
.palette-foot { display: flex; gap: 14px; padding: 10px 18px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 0.8125rem; flex: none; }
.palette-empty { padding: 28px 16px; text-align: center; color: var(--ink-3); }
@media (max-width: 719px) { .palette-foot { display: none; } }

/* ───────────── Dettaglio ───────────── */
.dhead { padding: 18px 0 8px; }
@media (min-width: 1024px) { .dhead { padding-top: 32px; } }
.dhead h1 { font-size: clamp(1.625rem, 1.15rem + 1.9vw, 2.625rem); margin-top: 12px; max-width: 32ch; overflow-wrap: anywhere; line-height: 1.12; }
.dhead .funder { color: var(--ink-2); margin-top: 10px; font-size: 1.0625rem; font-weight: 300; }
.dhead .funder strong { font-weight: 600; color: var(--ink); }

.window { margin-top: 22px; padding: 18px 20px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line); }
.window-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; }
.window-top .lbl { color: var(--ink-3); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; display: block; margin-bottom: 4px; }
.window-top .big { font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); font-weight: 700; letter-spacing: -0.02em; }
.window-top .big.urgent { color: var(--red-ink); }
.window-top .cd { font-weight: 700; color: var(--ink-2); }
.window-top .cd.urgent { color: var(--red-ink); }
.track { position: relative; height: 10px; margin: 26px 0 8px; border-radius: 6px; background: var(--tint-2); }
.track .fill { position: absolute; inset: 0 auto 0 0; border-radius: 6px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.track .fill.urgent { background: linear-gradient(90deg, var(--amber), var(--red)); }
.track .today { position: absolute; top: -6px; width: 2px; height: 22px; background: var(--ink); border-radius: 1px; }
.track .today::after { content: 'oggi'; position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: 0.6875rem; font-weight: 700; color: var(--ink); }
.track-labels { display: flex; justify-content: space-between; color: var(--ink-3); font-size: 0.8125rem; gap: 12px; }
.window-note { color: var(--ink-2); font-size: 0.9375rem; margin-top: 6px; }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0 0; }
@media (min-width: 900px) { .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fact { padding: 14px 16px; border-radius: var(--r-card); background: var(--tint); min-width: 0; margin: 0; }
.fact dt { color: var(--ink-3); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.fact dd { margin: 6px 0 0; font-weight: 700; font-size: 1.125rem; overflow-wrap: anywhere; letter-spacing: -0.01em; }
.fact dd.unknown { font-weight: 400; color: var(--ink-3); font-size: 0.875rem; letter-spacing: 0; }
.detail-actions { margin-top: 18px; }

.detail-grid { display: grid; gap: 22px; padding-top: 22px; }
@media (min-width: 1100px) { .detail-grid { grid-template-columns: minmax(0, 1fr) 330px; align-items: start; gap: 32px; } .detail-aside { position: sticky; top: 24px; } }
.block { padding: 22px 0; border-top: 1px solid var(--line); }
.block:first-child { border-top: 0; padding-top: 0; }
.block h2 { font-size: 1.1875rem; margin-bottom: 12px; }
.prose { max-width: 72ch; white-space: pre-line; color: var(--ink-2); line-height: 1.6; }
.prose.muted { color: var(--ink-3); }
.lang-note { color: var(--ink-3); font-size: 0.8125rem; margin-top: 10px; display: flex; gap: 8px; align-items: baseline; }
.more-btn { margin-top: 8px; }

.verdict { display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: center; padding: 16px 18px; border-radius: var(--r-card); }
.verdict > i { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.25rem; background: rgba(255, 255, 255, 0.7); }
.verdict strong { display: block; font-size: 1.0625rem; }
.verdict p { color: var(--ink-2); margin-top: 2px; font-size: 0.9375rem; }
.verdict.ok { background: var(--green-soft); color: var(--green-ink); }
.verdict.check { background: var(--amber-soft); color: var(--amber-ink); }
.verdict.no { background: var(--red-soft); color: var(--red-ink); }
.criteria { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.criteria li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding: 14px 16px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line); }
.criteria .r { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 0.875rem; }
.criteria .r.SATISFIED { background: var(--green-soft); color: var(--green-ink); }
.criteria .r.UNKNOWN { background: var(--amber-soft); color: var(--amber-ink); }
.criteria .r.NOT_SATISFIED { background: var(--red-soft); color: var(--red-ink); }
.criteria .lbl { font-weight: 700; }
.criteria .res { font-size: 0.8125rem; font-weight: 700; margin-left: 6px; color: var(--ink-3); }
.criteria .exp { color: var(--ink-2); margin-top: 3px; font-size: 0.9375rem; }
.quote { margin: 10px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--tint); font-size: 0.875rem; color: var(--ink-2); overflow-wrap: anywhere; line-height: 1.5; }
.quote q { quotes: '“' '”'; font-style: italic; }
.quote a { font-weight: 700; white-space: nowrap; font-style: normal; }

.doclist, .plainlist { list-style: none; padding: 0; margin: 0; }
.doclist li + li, .plainlist li + li { border-top: 1px solid var(--line); }
.doclist a { display: flex; gap: 12px; align-items: center; padding: 12px 0; text-decoration: none; overflow-wrap: anywhere; font-weight: 600; }
.doclist a i { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--tint); flex: none; }
.plainlist li { padding: 12px 0; }
.plainlist .sub { color: var(--ink-3); font-size: 0.875rem; margin-top: 2px; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 18px 26px; }
.timeline li::before { content: ''; position: absolute; left: 6px; top: 10px; bottom: -6px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ''; position: absolute; left: 0; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--brand); }
.timeline li.sub::after { border-color: var(--red); }
.timeline .when-t { font-size: 0.8125rem; color: var(--ink-3); }
.change { font-size: 0.875rem; color: var(--ink-2); margin-top: 3px; overflow-wrap: anywhere; }
.change del { color: var(--red-ink); }
.change ins { color: var(--green-ink); text-decoration: none; font-weight: 700; }

.evidence-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.evidence-table th { text-align: left; color: var(--ink-3); font-weight: 700; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line-2); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }
.evidence-table td { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; color: var(--ink-2); }
.evidence-table td:first-child { font-weight: 700; white-space: nowrap; color: var(--ink); }
@media (max-width: 719px) { .evidence-table thead { display: none; } .evidence-table tr { display: grid; padding: 8px 0; border-bottom: 1px solid var(--line); } .evidence-table td { border: 0; padding: 2px 0; } }

.aside-card { display: grid; gap: 12px; }
.aside-card .kv { grid-template-columns: 1fr; gap: 0; }
.aside-card .kv dt { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 10px; }
.aside-card .kv dt:first-child { margin-top: 0; }
.aside-card .kv dd { font-size: 0.9375rem; }
.aside-card h2 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); }
.premium-teaser { border-radius: var(--r-card); padding: 18px; display: grid; gap: 10px; color: var(--on-night); background: radial-gradient(400px 200px at 90% 0%, rgba(29, 102, 160, 0.5), transparent 70%), var(--night); }
.premium-teaser p { color: var(--on-night-2); font-size: 0.875rem; }
.premium-teaser .btn.secondary { background: rgba(175, 196, 218, 0.16); color: var(--on-night); }

/* Barra azioni mobile nel dettaglio */
.actionbar { position: fixed; z-index: 44; left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); bottom: calc(84px + var(--safe-b)); display: flex; gap: 8px; padding: 8px; border-radius: 22px; background: rgba(7, 26, 44, 0.88); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: var(--shadow-float); }
.actionbar .btn { flex: 1; height: 44px; min-width: 0; }
.actionbar .btn.secondary { background: rgba(175, 196, 218, 0.16); color: var(--on-night); }
.actionbar .btn.on-night { flex: 1.4; }
@media (min-width: 1024px) { .actionbar { display: none; } }
.has-actionbar main { padding-bottom: calc(100px + var(--safe-b)); }
.has-actionbar .dock { display: none; }
.has-actionbar .actionbar { bottom: calc(12px + var(--safe-b)); }
@media (max-width: 719px) { .dhead h1 { font-size: 1.5rem; line-height: 1.2; } }

/* ───────────── Banner, vuoti, caricamento ───────────── */
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-card); font-size: 0.9375rem; }
.banner i { margin-top: 3px; }
.banner.warn { background: var(--amber-soft); color: var(--amber-ink); }
.banner.info { background: var(--brand-soft); color: var(--brand); }
.banner.info p { color: var(--ink-2); }
.banner.error { background: var(--red-soft); color: var(--red-ink); }
.banner.ok { background: var(--green-soft); color: var(--green-ink); }
.banner p + p { margin-top: 4px; }
.banner a { color: inherit; font-weight: 700; }
.empty { text-align: center; padding: 40px 18px; display: grid; gap: 12px; justify-items: center; }
.empty > i { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font-size: 1.35rem; color: var(--brand); background: var(--brand-soft); }
.empty p { color: var(--ink-2); max-width: 46ch; }
.skel { background: linear-gradient(90deg, var(--tint) 0%, #F7FAFD 50%, var(--tint) 100%); background-size: 200% 100%; animation: skel 1.3s linear infinite; border-radius: 8px; }
@keyframes skel { to { background-position: -200% 0; } }
.skel-row { display: grid; grid-template-columns: 64px 1fr; gap: 14px; padding: 16px; }
.skel-row + .skel-row { border-top: 1px solid var(--line); }
.toast {
  position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translate(-50%, 16px); z-index: 120; padding: 12px 18px; border-radius: var(--r-pill);
  background: rgba(7, 26, 44, 0.92); color: #fff; box-shadow: var(--shadow-float); opacity: 0; pointer-events: none; font-weight: 600;
  transition: opacity 220ms var(--ease), transform 220ms var(--ease); max-width: calc(100vw - 32px); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 1024px) { .toast { bottom: 28px; } }

/* ───────────── Moduli della Home (giorno) ───────────── */
.home-grid { display: grid; gap: 22px; }
@media (min-width: 1100px) { .home-grid { grid-template-columns: minmax(0, 1fr) 330px; align-items: start; gap: 28px; } }
.stack { display: grid; gap: 16px; }
.mini { padding: 18px 20px; }
.mini h3 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); margin-bottom: 14px; }
.levels { display: grid; gap: 14px; }
.level { display: grid; grid-template-columns: 1fr auto; gap: 6px; text-decoration: none; color: inherit; }
.level .nm { font-weight: 600; font-size: 0.9375rem; }
.level .n { font-weight: 700; }
.level .bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--tint-2); overflow: hidden; }
.level .bar span { display: block; height: 100%; border-radius: 3px; background: var(--brand); }
.level:hover .nm { color: var(--brand); }
.sources { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.sources li { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 12px; align-items: start; }
.sources .led { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.sources .led.stale { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.sources .nm { font-weight: 600; font-size: 0.9375rem; line-height: 1.3; }
.sources .when-s { color: var(--ink-3); font-size: 0.8125rem; }
.proj-mini { display: grid; gap: 4px; padding: 12px 0; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.proj-mini:first-of-type { border-top: 0; padding-top: 0; }
.proj-mini .t { font-weight: 700; font-size: 0.9375rem; line-height: 1.3; }
.proj-mini:hover .t { color: var(--brand); }

/* Progetti */
.project { display: grid; gap: 8px; padding: 18px; text-decoration: none; color: inherit; transition: background 160ms; }
.project:hover { background: #FAFCFF; color: inherit; }
.project .ttl { font-weight: 700; font-size: 1.0625rem; letter-spacing: -0.01em; }
.project .desc { color: var(--ink-2); font-size: 0.9375rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.project .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.prio { font-size: 0.8125rem; font-weight: 700; display: inline-flex; gap: 6px; align-items: center; }
.prio.ALTA { color: var(--red-ink); } .prio.MEDIA { color: var(--amber-ink); } .prio.BASSA { color: var(--ink-3); }

.agenda-month { margin-top: 28px; }
.agenda-month h2 { font-size: 1.375rem; text-transform: capitalize; margin-bottom: 10px; letter-spacing: -0.02em; }

.notif { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; padding: 16px 18px; }
.notif + .notif { border-top: 1px solid var(--line); }
.notif .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.notif.unread { background: #FAFCFF; }
.notif.unread .ttl::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 8px; vertical-align: middle; }
.notif .ttl { font-weight: 700; overflow-wrap: anywhere; text-decoration: none; color: var(--ink); }
.notif a.ttl:hover { color: var(--brand); }
.notif .when-n { color: var(--ink-3); font-size: 0.8125rem; }
.notif details { margin-top: 8px; }
.notif summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: 0.875rem; }
.notif details p { color: var(--ink-2); font-size: 0.9375rem; margin-top: 6px; }

.menu { list-style: none; margin: 0; padding: 6px; }
.menu a, .menu button { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 60px; padding: 8px 12px; border-radius: 14px; text-decoration: none; color: var(--ink); background: none; border: 0; text-align: left; cursor: pointer; font-weight: 700; }
.menu a:hover, .menu button:hover { background: var(--tint); }
.menu i.lead { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.menu .sub { display: block; font-weight: 400; color: var(--ink-3); font-size: 0.875rem; }
.menu .chev { margin-left: auto; color: var(--line-2); }

.facts-list { display: grid; margin: 0; }
.facts-list > div { display: grid; gap: 2px; padding: 12px 0; border-top: 1px solid var(--line); }
.facts-list > div:first-child { border-top: 0; }
.facts-list dt { color: var(--ink-3); font-size: 0.8125rem; font-weight: 700; }
.facts-list dd { margin: 0; font-weight: 600; }
.facts-list .prov { font-weight: 400; color: var(--ink-3); font-size: 0.8125rem; }
@media (min-width: 720px) { .facts-list > div { grid-template-columns: 240px 1fr; gap: 16px; } }
.topic-grid { display: flex; flex-wrap: wrap; gap: 8px; }

/* Accesso: notte a tutta pagina */
.login { min-height: 100dvh; display: grid; background: var(--night); color: var(--on-night); }
@media (min-width: 1024px) { .login { grid-template-columns: 1.15fr 0.85fr; } }
.login-art { position: relative; overflow: hidden; padding: calc(24px + var(--safe-t)) 20px 28px; display: grid; align-content: space-between; gap: 22px;
  background: radial-gradient(800px 500px at 80% 30%, rgba(29, 102, 160, 0.45), transparent 60%), var(--night); }
@media (min-width: 1024px) { .login-art { padding: 48px 56px; } }
.login-art .display { max-width: 15ch; }
.login-art .radar-wrap { max-width: 400px; margin: 0; }
@media (max-width: 1023px) { .login-art .radar-wrap { display: none; } }
.login-form { display: grid; align-content: center; padding: 28px 20px calc(28px + var(--safe-b)); background: var(--canvas); color: var(--ink); border-radius: var(--r-hero) var(--r-hero) 0 0; }
@media (min-width: 1024px) { .login-form { border-radius: 0; padding: 56px; } }
.login-form form { width: 100%; max-width: 400px; margin: 0 auto; display: grid; gap: 16px; }
.login-form h2 { font-size: 1.75rem; letter-spacing: -0.025em; }
.login-form .btn { width: 100%; height: 50px; }

/* Console GrowApp */
.console-nav { display: inline-flex; gap: 2px; padding: 4px; border-radius: var(--r-pill); background: var(--tint-2); overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.console-nav a { flex: none; height: 36px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: var(--r-pill); text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 0.9375rem; }
.console-nav a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(7, 26, 44, 0.08), 0 4px 10px -4px rgba(7, 26, 44, 0.12); }
.todo { list-style: none; margin: 0; padding: 0; }
.todo li { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 14px; padding: 14px 18px; align-items: center; }
.todo li + li { border-top: 1px solid var(--line); }
.todo .ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; }
.todo .ic.err { background: var(--red-soft); color: var(--red-ink); } .todo .ic.warn { background: var(--amber-soft); color: var(--amber-ink); } .todo .ic.ok { background: var(--green-soft); color: var(--green-ink); }
.todo .sub { color: var(--ink-3); font-size: 0.875rem; overflow-wrap: anywhere; }
.data-table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.data-table th { text-align: left; font-weight: 700; color: var(--ink-3); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }
.data-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table td.num, .data-table th.num { text-align: right; }
.data-table tbody tr:hover td { background: #FAFCFF; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px; font-size: 0.9375rem; margin: 0; }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; overflow-wrap: anywhere; font-weight: 600; }
.split { display: grid; gap: 16px; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } }
.meter { display: inline-flex; align-items: center; gap: 8px; }
.meter-bar { width: 64px; height: 6px; border-radius: 3px; background: var(--tint-2); overflow: hidden; }
.meter-bar span { display: block; height: 100%; border-radius: 3px; background: var(--green); }
.meter-bar.check span { background: var(--amber); } .meter-bar.no span { background: var(--red); }
.meter-v { font-weight: 700; font-size: 0.875rem; min-width: 36px; }
.mono-id { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 0.8125rem; color: var(--ink-3); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .radar.scanning .blip { opacity: 1; }
}
@media print {
  .mtop, .dock, .side, .demo-ribbon, .detail-actions, .detail-aside, .actionbar, .toast { display: none !important; }
  .shell { display: block; } body { background: #fff; } main { padding: 0; }
}
