/* OSINT MPP: stile. Tema scuro "rada notturna" (predefinito) e chiaro "carta nautica".
   Principi: l'ottone segna solo il tempo (oggi) e l'azione principale; le parti (LDO, HB, TERNA) sono colori,
   gli stati sono forme e parole; Archivo espanso per i titoli, condensato e a cifre tabellari per i dati. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-wdth.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-wdth-italic.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-style: italic; font-display: swap;
}

:root {
  --font: "Archivo", "Segoe UI", system-ui, -apple-system, sans-serif;
  --bg: #EDF1F4; --panel: #FFFFFF; --raised: #F4F7F9; --line: #D9E1E7; --line-2: #BFCCD6;
  --ink: #0D2131; --ink-2: #3A5366; --ink-3: #62798C; --brass: #946A0F; --brass-2: #B08125; --brass-ink: #FFFFFF;
  --focus: #1C6FD1;
  --p-hb: #0E9A8E; --p-ldo: #6D55DB; --p-terna: #2A6FD6; --p-x1: #B8468A; --p-x2: #5E8A1C; --p-x3: #B06A12;
  --p-x4: #1E7E9E; --p-x5: #8A5A44; --p-none: #8FA3B3;
  --ok: #1B8E4E; --late: #CC3A36; --stalled: #C46A0C; --active: #0D2131; --planned: #8FA3B3;
  --weekend: rgba(13, 33, 49, .04); --odd: rgba(13, 33, 49, .025); --sel: rgba(28, 111, 209, .10);
  --hol: rgba(148, 106, 15, .45); --track-op: .24;
  --shadow: 0 1px 2px rgba(13, 33, 49, .06), 0 10px 30px rgba(13, 33, 49, .10);
  --topbar: 56px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0A1622; --panel: #0F1F2E; --raised: #152A3C; --line: #1E3548; --line-2: #2C4B64;
  --ink: #E4EDF3; --ink-2: #AFC2D1; --ink-3: #7F98AC; --brass: #D9AE52; --brass-2: #EBC677; --brass-ink: #1B1306;
  --focus: #7CC4FF;
  --p-hb: #2EC4B6; --p-ldo: #A48CFA; --p-terna: #5B9DF9; --p-x1: #E58FB5; --p-x2: #9CCB5B; --p-x3: #E8A45A;
  --p-x4: #62C7E8; --p-x5: #C9A08A; --p-none: #5E7890;
  --ok: #3CC47C; --late: #F0605D; --stalled: #F29D38; --active: #E4EDF3; --planned: #5E7890;
  --weekend: rgba(255, 255, 255, .025); --odd: rgba(255, 255, 255, .02); --sel: rgba(124, 196, 255, .11);
  --hol: rgba(217, 174, 82, .42); --track-op: .28;
  --shadow: 0 16px 40px rgba(0, 0, 0, .42);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font); font-size: 14px; line-height: 1.5; font-weight: 420; font-stretch: 100%;
  background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  min-height: 100vh;
}
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
[hidden] { display: none !important; }
.sr, .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-3); }
.bad { color: var(--late); }
.nowrap { white-space: nowrap; }
.block { display: block; }
.grow { flex: 1 1 auto; }
.ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.big { width: 28px; height: 28px; stroke-width: 1.2; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--panel); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* colori delle parti: valgono per SVG (fill) e HTML (background) */
.pf-hb { fill: var(--p-hb); background: var(--p-hb); }
.pf-ldo { fill: var(--p-ldo); background: var(--p-ldo); }
.pf-terna { fill: var(--p-terna); background: var(--p-terna); }
.pf-x1 { fill: var(--p-x1); background: var(--p-x1); }
.pf-x2 { fill: var(--p-x2); background: var(--p-x2); }
.pf-x3 { fill: var(--p-x3); background: var(--p-x3); }
.pf-x4 { fill: var(--p-x4); background: var(--p-x4); }
.pf-x5 { fill: var(--p-x5); background: var(--p-x5); }
.pf-none { fill: var(--p-none); background: var(--p-none); }
.ps-hb { stroke: var(--p-hb); } .ps-ldo { stroke: var(--p-ldo); } .ps-terna { stroke: var(--p-terna); }
.ps-x1 { stroke: var(--p-x1); } .ps-x2 { stroke: var(--p-x2); } .ps-x3 { stroke: var(--p-x3); }
.ps-x4 { stroke: var(--p-x4); } .ps-x5 { stroke: var(--p-x5); } .ps-none { stroke: var(--p-none); }
.st-done { --st: var(--ok); } .st-late { --st: var(--late); } .st-stalled { --st: var(--stalled); }
.st-active { --st: var(--active); } .st-planned { --st: var(--planned); }

/* ------------------------------------------------------------------ controlli */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 6px;
  border: 1px solid var(--line-2); background: var(--raised); color: var(--ink); font-weight: 560; font-size: 13px;
  text-decoration: none; white-space: nowrap; transition: background .12s, border-color .12s;
}
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--brass); border-color: transparent; color: var(--brass-ink); font-weight: 650; }
.btn.primary:hover { background: var(--brass-2); }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--late); border-color: transparent; color: #fff; }
.btn.big { height: 44px; font-size: 15px; justify-content: center; }
.btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.icon-btn {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 6px; border: 1px solid transparent;
  background: transparent; color: var(--ink-2); text-decoration: none;
}
.icon-btn:hover { background: var(--raised); color: var(--ink); border-color: var(--line); }
.icon-btn.danger:hover { color: var(--late); }
.linkish {
  background: none; border: 0; padding: 0; color: var(--ink); text-align: left; text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--ink) 30%, transparent); text-underline-offset: 3px;
}
.linkish:hover { text-decoration-color: var(--ink); }
input[type="text"], input[type="search"], input[type="email"], input[type="password"], input[type="date"], select {
  height: 32px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel);
  color: var(--ink); min-width: 0;
}
input:hover, select:hover { border-color: var(--ink-3); }
select { padding-right: 26px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
input[type="date"]::-webkit-calendar-picker-indicator { filter: var(--date-ico, none); cursor: pointer; }
:root[data-theme="dark"] input[type="date"] { --date-ico: invert(.8); }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden; }
.seg button { height: 30px; padding: 0 11px; border: 0; background: transparent; color: var(--ink-2); font-size: 12.5px; font-weight: 560; }
.seg button + button { border-left: 1px solid var(--line-2); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.tg { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.tg input { accent-color: var(--ink); width: 15px; height: 15px; }
.pick { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.pick select { height: 30px; font-size: 13px; }
.search { position: relative; display: inline-flex; align-items: center; }
.search .ic { position: absolute; left: 9px; color: var(--ink-3); pointer-events: none; }
.search input { padding-left: 30px; width: 220px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px;
  border: 1px solid var(--line-2); background: transparent; color: var(--ink-2); font-size: 12.5px; font-weight: 560;
}
.chip b { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip.on b { color: var(--bg); }
.chip.static { cursor: default; }
.chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.sq { display: inline-block; width: 9px; height: 9px; border-radius: 2px; flex: none; }
.pchips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.pchip {
  display: inline-flex; align-items: center; gap: 5px; padding: 1px 7px 1px 6px; border-radius: 4px;
  border: 1px solid var(--line); font-size: 11.5px; font-weight: 650; font-stretch: 94%; letter-spacing: .01em;
  color: var(--ink-2); white-space: nowrap; background: var(--panel);
}
.spill {
  display: inline-flex; align-items: center; gap: 6px; padding: 1px 9px 1px 7px; border-radius: 999px; white-space: nowrap;
  font-size: 12px; font-weight: 620; color: var(--st); background: color-mix(in srgb, var(--st) 14%, transparent);
}
.spill i { width: 7px; height: 7px; border-radius: 50%; background: var(--st); }
.spill.st-planned i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--st); }
.spill.st-active { color: var(--ink); background: color-mix(in srgb, var(--ink) 10%, transparent); }
.spill.st-planned { color: var(--ink-2); background: color-mix(in srgb, var(--ink-3) 16%, transparent); }
.spill.st-planned i { box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.spill.st-active i { background: var(--ink); }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--ink) 25%, transparent); border-top-color: var(--ink); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ barra superiore */
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--topbar); display: flex; align-items: center; gap: 18px;
  padding: 0 20px; background: color-mix(in srgb, var(--panel) 90%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.mark { width: 26px; height: 26px; color: var(--ink-2); }
.mark .dia { fill: var(--brass); }
.word { font-size: 15px; font-weight: 720; font-stretch: 125%; letter-spacing: .02em; }
.crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cr-name { font-weight: 600; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-sep { color: var(--line-2); }
.cr-sel select { border-color: transparent; background-color: transparent; font-weight: 600; font-size: 13.5px; color: var(--ink-2); max-width: 340px; }
.cr-sel select:hover, .cr-sel select:focus { border-color: var(--line-2); color: var(--ink); }
.top-r { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.sync {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--ink-2); font-size: 12.5px; white-space: nowrap;
}
.sync i { width: 8px; height: 8px; border-radius: 50%; background: var(--planned); }
.sync.ok i { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
.sync.old i { background: var(--stalled); }
.user { position: relative; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--raised);
  font-weight: 720; font-size: 11.5px; font-stretch: 112%; letter-spacing: .02em; color: var(--ink);
}
.menu {
  position: absolute; right: 0; top: 42px; min-width: 240px; padding: 8px; border-radius: 8px; z-index: 40;
  background: var(--panel); border: 1px solid var(--line-2); box-shadow: var(--shadow);
}
.menu .um-mail { margin: 4px 8px 8px; font-size: 12.5px; color: var(--ink-3); overflow-wrap: anywhere; }
.menu button { width: 100%; text-align: left; border: 0; background: transparent; padding: 8px; border-radius: 5px; font-weight: 560; }
.menu button:hover { background: var(--raised); }

/* ------------------------------------------------------------------ impianto pagina */
.view { padding: 0 28px 64px; outline: none; }
.loading { display: flex; align-items: center; gap: 12px; padding: 80px 0; color: var(--ink-3); justify-content: center; }
.phead { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 30px 0 18px; }
.phead-l { min-width: 0; }
.ptitle {
  margin: 0; font-size: clamp(28px, 3.3vw, 44px); line-height: 1.02; font-weight: 760; font-stretch: 125%;
  letter-spacing: -.018em; overflow-wrap: anywhere;
}
.pmeta { margin: 12px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; color: var(--ink-2); font-size: 13px; }
.pmeta span { display: inline-flex; align-items: center; gap: 6px; }
.pmeta b { color: var(--ink); font-weight: 620; }
.ver-chip {
  font-weight: 700; font-stretch: 110%; font-size: 12px; padding: 2px 9px; border-radius: 4px; color: var(--ink) !important;
  border: 1px solid var(--line-2); background: var(--raised);
}
.refdate { display: inline-flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-3); }
.refdate input { font-variant-numeric: tabular-nums; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tab {
  padding: 10px 14px 11px; text-decoration: none; color: var(--ink-3); font-weight: 580; font-size: 14px;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); border-bottom-color: var(--ink); }
.notice {
  margin: 14px 0 0; padding: 10px 14px; border-left: 3px solid var(--focus); background: color-mix(in srgb, var(--focus) 9%, transparent);
  font-size: 13.5px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
}
.tabpanel { padding-top: 6px; }
.panel { margin-top: 30px; }
.panel-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid var(--line-2); }
.panel-h h2 { margin: 0; font-size: 15.5px; font-weight: 660; letter-spacing: -.003em; }
.panel-sub { margin: 0; font-size: 12.5px; color: var(--ink-3); }
.count { font-size: 12px; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 44px; }
.cols.wide-left { grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); }
.empty { max-width: 620px; margin: 64px auto; }
.empty h2 { font-size: 22px; font-weight: 700; font-stretch: 110%; margin: 0 0 10px; }
.empty p { color: var(--ink-2); }
.hero-empty .ptitle { margin-bottom: 16px; font-size: clamp(28px, 2.8vw, 38px); }
.empty-s { color: var(--ink-3); font-size: 13.5px; padding: 14px 0; margin: 0; }

/* ------------------------------------------------------------------ orizzonte (fasi nel tempo) */
.horizon-wrap { margin: 18px 0 0; padding: 14px 0 6px; border-bottom: 1px solid var(--line); }
.horizon { width: 100%; min-height: 200px; }
.hz { display: block; overflow: visible; font-family: var(--font); }
.hz-m { stroke: var(--line-2); stroke-width: 1; }
.hz-w { stroke: var(--line); stroke-width: 1; opacity: .55; }
.hz-mt { fill: var(--ink-2); font-size: 12px; font-weight: 600; letter-spacing: .01em; }
.hz-lab { fill: var(--ink); font-size: 13px; font-weight: 520; font-stretch: 92%; }
.hz-lab.muted { fill: var(--ink-3); font-weight: 500; }
.hz-lab.sm { font-size: 12px; fill: var(--ink-2); paint-order: stroke; stroke: var(--bg); stroke-width: 4px; stroke-linejoin: round; }
.hz-lane { stroke: var(--line); stroke-width: 1; opacity: .7; }
.hz-evline { stroke: var(--line-2); stroke-width: 1; }
.hz-evstem { stroke: var(--line-2); stroke-width: 1; }
.hz-dia { fill: var(--ink); stroke: var(--bg); stroke-width: 1.5; }
.hz-ev.done .hz-dia { fill: var(--ok); }
.hz-ev.late .hz-dia { fill: var(--late); }
.hz-evt { fill: var(--ink-2); font-size: 11.5px; font-weight: 600; font-stretch: 90%; font-variant-numeric: tabular-nums; paint-order: stroke; stroke: var(--bg); stroke-width: 3px; stroke-linejoin: round; }
.hz-ev.next .hz-evt { fill: var(--ink); font-weight: 700; }
.hz-ev { cursor: pointer; }
.hz-ev:hover .hz-evt, .hz-ev:focus .hz-evt { fill: var(--ink); }
.hz-ev:focus { outline: none; }
.hz-ev:focus-visible .hz-dia { stroke: var(--focus); stroke-width: 2; }
.hz-track { fill-opacity: var(--track-op); }
.hz-done { fill-opacity: 1; }
.hz-bar { cursor: pointer; }
.hz-bar:hover .hz-track { fill-opacity: calc(var(--track-op) + .15); }
.hz-pct { fill: var(--ink-3); font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hz-kid { fill: var(--ink); stroke: var(--bg); stroke-width: 1.5; cursor: pointer; }
.hz-kid.done { fill: var(--ok); }
.hz-thread { stroke: var(--ink-3); stroke-width: 1.2; stroke-dasharray: 2 3; }
.hz-now line { stroke: var(--brass); stroke-width: 2; }
.hz-now rect { fill: var(--brass); }
.hz-now text { fill: var(--brass-ink); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hz-now.sweep { animation: sweep 1.25s cubic-bezier(.16, .8, .2, 1) both; }
@keyframes sweep { from { transform: translateX(var(--from)); opacity: 0; } 18% { opacity: 1; } to { transform: none; opacity: 1; } }

/* ------------------------------------------------------------------ sintesi */
.strip { display: grid; grid-template-columns: 1.05fr 1.7fr 1fr 1fr; border-bottom: 1px solid var(--line); }
.kpi { padding: 18px 22px 20px; border-left: 1px solid var(--line); min-width: 0; }
.kpi:first-child { border-left: 0; padding-left: 0; }
.kpi h3 { margin: 0 0 6px; font-size: 12.5px; font-weight: 560; color: var(--ink-3); }
.kpi-n { font-size: 36px; line-height: 1.05; font-weight: 700; font-stretch: 112%; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi-n small { font-size: 18px; font-weight: 600; margin-left: 2px; color: var(--ink-2); }
.kpi-n.date { font-size: 30px; }
.kpi-t { font-size: 16px; font-weight: 640; line-height: 1.25; margin-top: 4px; }
.kpi-t a { text-decoration: none; }
.kpi-t a:hover { text-decoration: underline; }
.kpi-s { margin-top: 6px; font-size: 13px; color: var(--ink-2); }
.dual { margin-top: 10px; display: grid; gap: 6px; }
.dual-row { display: grid; grid-template-columns: 128px 1fr 40px; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-3); }
.dual-row b { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 650; }
.track { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.fill { display: block; height: 100%; border-radius: 3px; }
.fill.decl { background: var(--ink); }
.fill.exp { background: repeating-linear-gradient(-45deg, var(--ink-3) 0 3px, transparent 3px 5px); }
.segbar { display: flex; gap: 2px; height: 12px; border-radius: 6px; overflow: hidden; margin: 12px 0 12px; }
.segbar .sgi { border: 0; border-radius: 0; background: var(--st); }
.segbar .sgi.st-planned { background: transparent; box-shadow: inset 0 0 0 1.5px var(--planned); border-radius: 2px; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12.5px; color: var(--ink-2); }
.legend a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.legend a:hover { color: var(--ink); }
.legend b { color: var(--ink); font-variant-numeric: tabular-nums; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--st); display: inline-block; }
.dot.st-planned { background: transparent; box-shadow: inset 0 0 0 1.5px var(--planned); }

/* ------------------------------------------------------------------ elenchi della panoramica */
.watch, .agenda, .agenda ul, .checks, .hol, .diff, .rels, .plist { list-style: none; margin: 0; padding: 0; }
.w-item {
  display: grid; gap: 5px; width: 100%; text-align: left; padding: 12px 10px 12px 0; border: 0; border-bottom: 1px solid var(--line);
  background: transparent;
}
.w-item:hover { background: linear-gradient(90deg, transparent, var(--raised) 12%); }
.w-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.w-when { font-size: 12.5px; color: var(--ink-3); }
.w-name { font-size: 14px; font-weight: 580; line-height: 1.3; }
.w-own { display: flex; align-items: center; gap: 10px; font-size: 12px; flex-wrap: wrap; }
.ag-day { display: grid; grid-template-columns: 62px 1fr; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ag-date { display: flex; flex-direction: column; line-height: 1.1; }
.ag-date b { font-size: 24px; font-weight: 700; font-stretch: 112%; font-variant-numeric: tabular-nums; }
.ag-date span { font-size: 12px; color: var(--ink-3); }
.ag-day.today .ag-date b { color: var(--brass); }
.ag-item { display: grid; grid-template-columns: 72px 1fr auto; align-items: baseline; gap: 10px; width: 100%; text-align: left; border: 0; background: transparent; padding: 4px 0; }
.ag-item:hover .ag-n { text-decoration: underline; text-underline-offset: 3px; }
.ag-k { font-size: 11.5px; font-weight: 650; color: var(--ink-3); }
.ag-k.ev { color: var(--ink); }
.ag-n { font-size: 13.5px; line-height: 1.3; }

.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; font-stretch: 94%; font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; font-weight: 600; font-size: 12px; color: var(--ink-3); padding: 9px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; background: var(--bg); }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl .num { text-align: right; }
.tbl td.bad a, .tbl td.bad { color: var(--late); font-weight: 700; }
.tbl.who td:first-child { white-space: nowrap; }
.checks li { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); align-items: start; }
.ck-i { padding-top: 2px; }
.checks .ok .ck-i { color: var(--ok); }
.checks .warn .ck-i { color: var(--stalled); }
.ck-t b { display: block; font-weight: 620; font-size: 13.5px; }
.ck-t span { font-size: 12.5px; color: var(--ink-3); }
.ck-t em { display: block; font-style: normal; font-size: 12.5px; color: var(--ink-2); margin-top: 4px; max-width: 60ch; }
.ck-v { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 13.5px; }
.cal-l { font-size: 13.5px; color: var(--ink-2); margin: 12px 0 0; }
.cal-l b { color: var(--ink); }
.cal-warn { display: flex; gap: 10px; margin: 14px 0 6px; padding: 12px 14px; border-left: 3px solid var(--stalled); background: color-mix(in srgb, var(--stalled) 10%, transparent); font-size: 13.5px; }
.cal-warn .ic { color: var(--stalled); margin-top: 2px; }
.hol li { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }

/* ------------------------------------------------------------------ Gantt */
.gtools, .ttools, .ctools { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; padding: 14px 0 10px; }
.glegend { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 12px; color: var(--ink-2); padding: 0 0 10px; }
.lg { display: inline-flex; align-items: center; gap: 7px; }
.lg-bar { width: 22px; height: 9px; border-radius: 2px; display: inline-block; }
.lg-bar.stripes { background: repeating-linear-gradient(-45deg, var(--p-hb) 0 4px, var(--p-ldo) 4px 8px, var(--p-terna) 8px 12px); }
.lg-bar.crit { background: transparent; box-shadow: inset 0 0 0 1.6px var(--late); }
.lg-bar.st-done { background: var(--ok); } .lg-bar.st-late { background: var(--late); } .lg-bar.st-stalled { background: var(--stalled); }
.lg-bar.st-active { background: linear-gradient(90deg, var(--active) 50%, color-mix(in srgb, var(--active) 25%, transparent) 50%); }
.lg-bar.st-planned { background: transparent; box-shadow: inset 0 0 0 1.3px var(--planned); }
.lg-now { width: 2px; height: 14px; background: var(--brass); display: inline-block; }
.lg-ghost { width: 22px; height: 5px; border-radius: 3px; border: 1px dashed var(--ink-3); display: inline-block; }
.lg-hol { width: 12px; height: 12px; display: inline-block; background: repeating-linear-gradient(45deg, var(--hol) 0 2px, transparent 2px 5px); }
.gantt-host { height: calc(100vh - var(--topbar) - 260px); min-height: 440px; }
.gantt { position: relative; }
.g-scroll { height: 100%; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); overscroll-behavior: contain; }
.g-canvas { position: relative; }
.g-head { position: sticky; top: 0; z-index: 5; display: flex; background: var(--panel); }
.g-head-grid {
  position: sticky; left: 0; z-index: 6; display: flex; align-items: flex-end; padding-bottom: 8px; flex: none;
  background: var(--panel); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  font-size: 12px; font-weight: 600; color: var(--ink-3); font-stretch: 94%;
}
.g-scale { flex: none; display: block; }
.g-body { display: flex; }
.g-grid { position: sticky; left: 0; z-index: 4; flex: none; background: var(--panel); border-right: 1px solid var(--line); }
.g-chart { flex: none; display: block; }
.g-row {
  height: 30px; display: flex; align-items: center; font-size: 13px; font-stretch: 90%; cursor: pointer;
  font-variant-numeric: tabular-nums; position: relative; color: var(--ink);
}
.g-row.odd { background: var(--odd); }
.g-row.hov { background: color-mix(in srgb, var(--sel) 60%, transparent); }
.g-row.sel { background: var(--sel); box-shadow: inset 3px 0 0 var(--focus); }
.g-row.sum { font-weight: 660; }
.c-id { width: 42px; flex: none; text-align: right; padding-right: 10px; color: var(--ink-3); }
.c-name { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 4px; padding-right: 8px; }
.c-name .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-dur { width: 62px; flex: none; text-align: right; padding-right: 10px; color: var(--ink-2); }
.c-date { width: 72px; flex: none; padding-right: 6px; color: var(--ink-2); }
.c-pct { width: 40px; flex: none; text-align: right; padding-right: 12px; color: var(--ink-2); }
.g-head-grid .c-dur, .g-head-grid .c-date, .g-head-grid .c-pct { color: var(--ink-3); }
.tog { width: 18px; height: 18px; flex: none; display: inline-grid; place-items: center; border: 0; background: transparent; color: var(--ink-3); border-radius: 4px; padding: 0; }
.tog:hover { background: var(--raised); color: var(--ink); }
.tog svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tog-sp { width: 18px; flex: none; }
.flag { width: 7px; height: 7px; border-radius: 50%; background: var(--late); flex: none; margin-left: 6px; }
.flag.stalled { background: var(--stalled); }

.g-scale text { font-family: var(--font); }
.sc-bg { fill: var(--panel); }
.sc-top { fill: var(--ink-2); font-size: 12px; font-weight: 620; }
.sc-bot { fill: var(--ink-3); font-size: 11px; font-weight: 520; font-variant-numeric: tabular-nums; font-stretch: 92%; }
.sc-dow { fill: var(--ink-3); font-size: 10px; font-weight: 500; opacity: .8; }
.sc-bot.we, .sc-dow.we { opacity: .45; }
.sc-tick { stroke: var(--line); }
.sc-tick.major { stroke: var(--line-2); }
.sc-base { stroke: var(--line); }
.sc-now rect { fill: var(--brass); }
.sc-now text { fill: var(--brass-ink); font-size: 10.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.g-chart text { font-family: var(--font); }
.row-odd { fill: var(--odd); }
.wkd { fill: var(--weekend); }
.hatch { fill: var(--hol); }
.holi { opacity: .55; }
.grid-w { stroke: var(--line); stroke-width: 1; opacity: .55; }
.grid-m { stroke: var(--line-2); stroke-width: 1; }
.sel-row { fill: var(--sel); }
.hit { fill: transparent; }
.dep { fill: none; stroke: var(--ink-3); stroke-width: 1.1; opacity: .6; }
.dep.crit { stroke: var(--late); opacity: .85; stroke-width: 1.3; }
.dep.on { stroke: var(--ink); opacity: 1; stroke-width: 1.7; }
.g-chart.focus .dep:not(.on) { opacity: .16; }
.no-deps .deps { display: none; }
.arrowhead { fill: var(--ink-3); }
.arrowhead.on { fill: var(--ink); }
.arrowhead.crit { fill: var(--late); }
.b-task, .b-sum, .b-ms { cursor: pointer; }
.p-track { fill-opacity: var(--track-op); }
.p-done { fill-opacity: 1; }
.p-edge { fill: none; stroke-width: 1; stroke-opacity: .95; }
.b-task:hover .p-track { fill-opacity: calc(var(--track-op) + .14); }
.b-task.crit .p-edge, .b-task.crit .st-track { stroke: var(--late); stroke-width: 1.8; }
.b-task.crit { filter: drop-shadow(0 0 3px color-mix(in srgb, var(--late) 55%, transparent)); }
.b-task.on-bar .p-edge, .b-task.on-bar .st-track { stroke: var(--ink); stroke-width: 1.8; }
.st-track { fill: var(--st); fill-opacity: .26; }
.st-done { fill: var(--st); fill-opacity: 1; }
.st-track.st-planned { fill: transparent; stroke: var(--planned); stroke-width: 1.3; }
.st-track.st-done { fill-opacity: 1; }
.lbl { fill: var(--ink-3); font-size: 11px; font-weight: 520; font-stretch: 90%; }
.b-task.on-bar .lbl, .b-ms.on-bar .lbl { fill: var(--ink); }
.sum-track { fill: var(--ink-3); fill-opacity: .55; }
.sum-done { fill: var(--ink); }
.sum-cap { fill: var(--ink-3); fill-opacity: .8; }
.b-sum:hover .sum-track { fill-opacity: .8; }
.ms { fill: var(--ink); stroke: var(--panel); stroke-width: 1.5; }
.b-ms.done .ms { fill: var(--ok); }
.b-ms.late .ms { fill: var(--late); }
.b-ms.crit .ms { stroke: var(--late); stroke-width: 2; }
.bflag.late { fill: var(--late); }
.bflag.stalled { fill: var(--stalled); }
.now { stroke: var(--brass); stroke-width: 1.6; }
.gh-bar { fill: none; stroke: var(--ink-3); stroke-width: 1.1; stroke-dasharray: 3 2; }
.ghost-d { font-size: 10.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ghost-d.later { fill: var(--late); }
.ghost-d.earlier { fill: var(--ok); }

/* ------------------------------------------------------------------ tabella attività */
.activefilter { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 10px; border-left: 3px solid var(--stalled); background: color-mix(in srgb, var(--stalled) 9%, transparent); font-size: 13.5px; }
.activefilter .ic { color: var(--stalled); }
.tbl-wrap.big { max-height: calc(100vh - var(--topbar) - 250px); overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.tbl-wrap.big .tbl th { position: sticky; top: 0; z-index: 1; background: var(--panel); }
.tbl-wrap.big .tbl td { background: var(--panel); }
.tbl.tasks tbody tr { cursor: pointer; }
.tbl.tasks tbody tr:hover td { background: var(--raised); }
.tbl.tasks tr.sum td { font-weight: 660; background: var(--odd); }
.tbl th button { border: 0; background: none; padding: 0; font-weight: 600; color: inherit; }
.tbl th[aria-sort="ascending"] button::after { content: " \2191"; }
.tbl th[aria-sort="descending"] button::after { content: " \2193"; }
.tname { min-width: 280px; max-width: 520px; }
.tname span { font-weight: 560; }
.tname small { display: block; color: var(--ink-3); font-size: 12px; margin-top: 3px; line-height: 1.4; font-weight: 420; }
.tbl td.small { font-size: 12px; color: var(--ink-2); min-width: 150px; }
.empty-row { text-align: center; color: var(--ink-3); padding: 30px !important; }
.tfoot { font-size: 12.5px; margin: 10px 0 0; }

/* ------------------------------------------------------------------ confronto */
.c-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 4px; }
.c-v { display: flex; flex-direction: column; gap: 3px; padding: 14px 18px; border-left: 1px solid var(--line); font-size: 13px; }
.c-v:first-child { border-left: 0; padding-left: 0; }
.c-v b { font-size: 15px; font-weight: 660; font-variant-numeric: tabular-nums; }
.c-counts { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; }
.diff li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.d-id { font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; min-width: 22px; display: inline-block; }
.d-row { display: inline-flex; gap: 8px; align-items: baseline; font-variant-numeric: tabular-nums; }
.d-dates { display: grid !important; grid-template-columns: minmax(0, 1fr) auto auto; }
.delta { font-size: 12px; font-weight: 700; padding: 0 7px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.delta.later { color: var(--late); background: color-mix(in srgb, var(--late) 13%, transparent); }
.delta.earlier { color: var(--ok); background: color-mix(in srgb, var(--ok) 13%, transparent); }
.delta.same { color: var(--ink-3); }
.d-note { margin: 4px 0 0; flex-basis: 100%; color: var(--ink-2); line-height: 1.55; max-width: 90ch; white-space: pre-wrap; }
del { color: var(--late); background: color-mix(in srgb, var(--late) 12%, transparent); text-decoration: line-through; }
ins { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); text-decoration: none; }

/* ------------------------------------------------------------------ versioni */
.versions td { vertical-align: middle; }
.versions tr.cur td { background: color-mix(in srgb, var(--sel) 55%, transparent); }
.vname { display: inline-flex; flex-direction: column; text-decoration: none; }
.vname b { font-weight: 680; font-stretch: 105%; }
.vname small, .prov small { color: var(--ink-3); font-size: 12px; }
.cur-tag { margin-left: 8px; font-size: 11px; font-weight: 700; color: var(--ink-3); }
.prov { display: inline-flex; gap: 8px; align-items: flex-start; }
.prov > span { display: flex; flex-direction: column; }
.prov .ic { margin-top: 2px; color: var(--ink-3); }
.acts { text-align: right; }
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  padding: 30px 20px; margin-top: 14px; border: 1.5px dashed var(--line-2); border-radius: 10px; cursor: pointer;
  color: var(--ink-2); transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.over { border-color: var(--ink-3); background: var(--raised); }
.dropzone b { color: var(--ink); font-size: 14.5px; }
.dropzone .muted { font-size: 12.5px; max-width: 34ch; }
.syncbox { margin-top: 18px; padding: 14px 16px; border-left: 3px solid var(--planned); background: var(--raised); font-size: 13px; }
.syncbox.ok { border-left-color: var(--ok); }
.syncbox.old { border-left-color: var(--stalled); }
.syncbox h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 13.5px; font-weight: 650; }
.syncbox p { margin: 4px 0; color: var(--ink-2); }
.syncbox b { color: var(--ink); }
.plist li { padding: 9px 0; border-bottom: 1px solid var(--line); }
.events { max-height: 360px; overflow: auto; }
.tbl.ev td { font-size: 12.5px; padding: 6px 10px; }
.tbl.ev tr.bad td { color: var(--late); }

/* ------------------------------------------------------------------ scheda laterale */
.drawer {
  position: fixed; top: var(--topbar); right: 0; bottom: 0; width: min(470px, 100vw); z-index: 30; overflow-y: auto;
  background: var(--panel); border-left: 1px solid var(--line-2); box-shadow: var(--shadow);
  transform: translateX(104%); transition: transform .22s cubic-bezier(.2, .7, .2, 1); visibility: hidden;
}
.drawer.open { transform: none; visibility: visible; }
.dr-h { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 22px; background: var(--panel); border-bottom: 1px solid var(--line); }
.dr-path { margin: 0; flex: 1; min-width: 0; font-size: 12px; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 2px 6px; }
.dr-path .linkish { color: var(--ink-3); font-size: 12px; }
.dr-path .sep { color: var(--line-2); }
.dr-body { padding: 18px 22px 40px; }
.dr-id { margin: 0 0 6px; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.dr-title { margin: 0; font-size: 22px; line-height: 1.18; font-weight: 700; font-stretch: 106%; letter-spacing: -.01em; }
.dr-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 0; }
.dr-prog { display: grid; gap: 7px; margin: 18px 0 8px; }
.kvs { margin: 10px 0 0; }
.kv { display: grid; grid-template-columns: 132px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.kv dt { color: var(--ink-3); font-size: 12.5px; }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; }
.dr-sec { margin-top: 22px; }
.dr-sec h3 { margin: 0 0 8px; font-size: 13px; font-weight: 650; color: var(--ink-2); }
.notes { margin: 0; white-space: pre-wrap; line-height: 1.6; color: var(--ink-2); font-size: 13.5px; max-width: 62ch; }
.rels li { display: grid; gap: 1px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.rels .muted { font-size: 12px; }
.dr-foot { margin-top: 26px; }

/* ------------------------------------------------------------------ tooltip, avvisi, trascinamento, dialoghi */
.tip {
  position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; max-width: 360px; padding: 10px 12px;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 8px; box-shadow: var(--shadow); font-size: 12.5px;
}
.tip-h { font-weight: 660; font-size: 13px; margin-bottom: 6px; line-height: 1.3; }
.tip-row { display: grid; grid-template-columns: 104px 1fr; gap: 8px; color: var(--ink-3); padding: 1px 0; align-items: baseline; }
.tip-row b { color: var(--ink); font-weight: 560; font-variant-numeric: tabular-nums; }
.tip-st { font-size: 11.5px; font-weight: 650; color: var(--st); }
.tip-st.st-active { color: var(--ink); }
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 70; display: grid; gap: 8px; justify-items: end; }
.toast {
  display: flex; align-items: center; gap: 12px; max-width: 440px; padding: 11px 14px; border-radius: 8px;
  background: var(--panel); border: 1px solid var(--line-2); border-left: 3px solid var(--ink-3); box-shadow: var(--shadow); font-size: 13.5px;
}
.toast.ok { border-left-color: var(--ok); }
.toast.bad { border-left-color: var(--late); }
.toast.busy { border-left-color: var(--brass); }
.toast a { font-weight: 650; white-space: nowrap; margin-left: 4px; }
.drop {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; pointer-events: none;
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(3px);
}
.drop > div { display: grid; gap: 6px; text-align: center; padding: 38px 54px; border: 2px dashed var(--brass); border-radius: 14px; background: var(--panel); }
.drop b { font-size: 18px; font-stretch: 110%; }
.drop span { color: var(--ink-2); }
dialog { padding: 0; border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(5, 12, 20, .55); }
.dlg { padding: 22px 24px; width: min(460px, 92vw); }
.dlg h2 { margin: 0 0 8px; font-size: 18px; font-weight: 700; font-stretch: 106%; }
.dlg p { color: var(--ink-2); margin: 0 0 14px; }
.dlg-b { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.fld { display: grid; gap: 6px; font-size: 13px; color: var(--ink-2); }
.fld input { height: 40px; font-size: 14.5px; }

/* ------------------------------------------------------------------ accesso */
body.login { background: var(--bg); }
.lg-wrap { display: grid; grid-template-columns: minmax(380px, 540px) 1fr; min-height: 100vh; }
.lg-panel {
  position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; gap: 0;
  padding: 56px clamp(28px, 5vw, 64px); background: var(--panel); border-right: 1px solid var(--line);
}
.lg-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 44px; }
.lg-panel h1 { margin: 0; font-size: clamp(30px, 2.8vw, 40px); line-height: 1; font-weight: 780; font-stretch: 125%; letter-spacing: -.02em; }
.lg-sub { margin: 14px 0 30px; color: var(--ink-2); font-size: 15px; max-width: 34ch; }
#lf { display: grid; gap: 16px; }
.chk { display: flex; gap: 9px; align-items: center; font-size: 13px; color: var(--ink-2); }
.chk input { accent-color: var(--brass); width: 16px; height: 16px; }
.lg-err { margin: 0; padding: 10px 12px; border-left: 3px solid var(--late); background: color-mix(in srgb, var(--late) 12%, transparent); font-size: 13.5px; }
.lg-foot { margin: 40px 0 0; font-size: 12px; color: var(--ink-3); letter-spacing: .02em; }
.btn.busy { opacity: .7; pointer-events: none; }
.lg-chart { position: relative; overflow: hidden; }
.lg-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.lc-grid { stroke: var(--line); stroke-width: 1; }
.lc-grid.m { stroke: var(--line-2); }
.lc-mt { fill: var(--ink-3); font-size: 12px; font-weight: 600; font-family: var(--font); }
.lc-bar { fill: none; stroke-width: 10; stroke-linecap: round; }
.lc-link { fill: none; stroke: var(--ink-3); stroke-width: 1.1; opacity: .5; }
.lc-now line { stroke: var(--brass); stroke-width: 2; }
.lc-now rect { fill: var(--brass); }
.lc-now text { fill: var(--brass-ink); font-size: 11px; font-weight: 700; font-family: var(--font); }
.lc-draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw .9s cubic-bezier(.3, .7, .2, 1) forwards; animation-delay: var(--d); }
@keyframes draw { to { stroke-dashoffset: 0; } }
.lg-chart::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg) 0, transparent 18%, transparent 70%, var(--bg) 100%); pointer-events: none; }

/* ------------------------------------------------------------------ adattamento */
@media (max-width: 1180px) {
  .strip { grid-template-columns: 1fr 1fr; }
  .kpi:nth-child(3) { border-left: 0; padding-left: 0; }
  .kpi:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 1000px) {
  .cols, .cols.wide-left { grid-template-columns: minmax(0, 1fr); }
  .c-sum { grid-template-columns: 1fr 1fr; }
  .c-v:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (max-width: 860px) {
  .lg-wrap { grid-template-columns: 1fr; }
  .lg-chart { position: fixed; inset: 0; opacity: .35; z-index: 0; }
  .lg-panel { background: color-mix(in srgb, var(--panel) 88%, transparent); border-right: 0; }
}
@media (max-width: 720px) {
  .view { padding: 0 16px 48px; }
  .topbar { padding: 0 12px; gap: 10px; }
  .topbar .word, .cr-name, .cr-sep { display: none; }
  .sync span { display: none; }
  .sync { padding: 0 9px; }
  .cr-sel select { max-width: 150px; }
  .phead { flex-direction: column; align-items: flex-start; }
  .strip { grid-template-columns: 1fr; }
  .kpi { border-left: 0 !important; padding-left: 0 !important; border-top: 1px solid var(--line); }
  .kpi:first-child { border-top: 0; }
  .search input { width: 160px; }
  .dual-row { grid-template-columns: 110px 1fr 36px; }
  .gantt-host { height: calc(100vh - var(--topbar) - 200px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
  .lc-draw { stroke-dashoffset: 0; }
}
@media print {
  .topbar, .tabs, .drawer, .toasts, .gtools, .ttools, .ctools, .refdate, .notice { display: none !important; }
  body { background: #fff; color: #000; }
  .view { padding: 0; }
  .panel, .strip, .horizon-wrap { break-inside: avoid; }
}

/* ------------------------------------------------------------------ ritocchi */
.gtools .btn { height: 30px; padding: 0 11px; }
.gtools { gap: 8px 10px; }
.gtools .search input { width: 160px; }
.tbl.dmoves td { vertical-align: middle; }
.tbl.dmoves .d-id { width: 40px; }

/* ------------------------------------------------------------------ avanzamento registrato nel portale */
.fill.file { background: color-mix(in srgb, var(--ink) 40%, transparent); }
.upd { font-weight: 700; color: var(--ink); white-space: nowrap; }
.upd::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 4px; border-radius: 50%; background: var(--focus); vertical-align: 1px; }
.upd-panel .panel-h { align-items: center; }
.updl { list-style: none; margin: 0; padding: 0; }
.u-item {
  display: grid; grid-template-columns: minmax(0, 1.6fr) auto minmax(0, 1.2fr); gap: 6px 22px; align-items: baseline;
  width: 100%; text-align: left; padding: 11px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent;
}
.u-item:hover .u-name { text-decoration: underline; text-underline-offset: 3px; }
.u-name { font-weight: 580; }
.u-val { font-variant-numeric: tabular-nums; white-space: nowrap; }
.u-val b { font-size: 15px; }
.u-val b::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 5px; border-radius: 50%; background: var(--focus); vertical-align: 2px; }
.u-who { font-size: 12.5px; }
.prog-ed { margin-top: 20px; padding: 14px 16px 16px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--raised); }
.prog-ed h3 { margin: 0 0 6px; }
.pe-info { margin: 0; font-size: 12.5px; color: var(--ink-3); }
.pe-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0 10px; }
.pe-num { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.pe-num input { width: 74px; text-align: right; font-variant-numeric: tabular-nums; }
.pe-note input { height: 34px; font-size: 13.5px; }
.pe-act { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 12px; }
@media (max-width: 720px) { .u-item { grid-template-columns: 1fr; } }
.ag-item.done .ag-k { color: var(--ok); }
.ag-item.done .ag-n { color: var(--ink-3); }

/* menu del tema: voce attiva */
.menu [role="menuitemradio"] { display: flex; align-items: center; justify-content: space-between; }
.menu [role="menuitemradio"][aria-checked="true"]::after {
  content: ""; width: 9px; height: 5px; margin-right: 4px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(-45deg);
}

/* .mpp da mandare: il file di Leonardo con l'avanzamento del portale, scritto da MS Project sul PC */
.mpp-box { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin: 14px 0 6px; }
.mpp-t { margin: 0; font-size: 13px; color: var(--ink-2); max-width: 78ch; }
.mpp-box.wait .mpp-t { color: var(--ink-3); }

/* elementi presenti solo nel tema Terna (theme-terna.css li mostra) */
.brand-terna, .brand-app, .ftr, .cr-home, .cr-home-sep, .avatar .un, .avatar .chev, .kpi-ic, .kpi-n-alt, .sp-ic, .ic-ring, .dlg-x { display: none; }
