  :root{
    --bg:#070b14; --bg-alt:#0d1220; --card:#111827; --card-hover:#161f33;
    --border:#1f2937; --text:#e5e7eb; --muted:#8b93a7;
    --accent:#7c3aed; --accent2:#06b6d4; --danger:#ef4444; --warn:#f59e0b; --ok:#22c55e;
  }
  /* Light mode — a pragmatic, best-effort pass: the CSS custom properties
     above drive most of the UI, so re-pointing them here covers the vast
     majority of the page. A handful of decorative gradients/critical-card
     backgrounds are hardcoded hex rather than tokens (see the selectors
     below) and get their own light-mode override; Chart.js canvases keep
     their existing grid/tick colors, which read fine on a white surface
     too. Toggled via #themeToggleBtn, persisted in localStorage. */
  :root[data-theme="light"]{
    --bg:#f3f5fa; --bg-alt:#eaeef5; --card:#ffffff; --card-hover:#eef1f7;
    --border:#d8dee8; --text:#12172a; --muted:#5b6577;
    --accent:#7c3aed; --accent2:#0891b2; --danger:#dc2626; --warn:#b45309; --ok:#15803d;
  }
  :root[data-theme="light"] header{background:linear-gradient(180deg,#ffffff,#ffffffee)}
  :root[data-theme="light"] nav.tabs{background:linear-gradient(180deg, rgba(124,58,237,.08), rgba(6,182,212,.05)), #ffffff;border-top:3px solid #0891b2;border-bottom:1px solid rgba(124,58,237,.22);box-shadow:0 8px 16px -10px rgba(15,23,42,.18)}
  :root[data-theme="light"] .topbar::before{background:radial-gradient(circle,rgba(6,182,212,.10),transparent 70%)}
  :root[data-theme="light"] .card.card-critical{background:linear-gradient(160deg,#fff1f1,#ffe1e1 60%);border-color:#f3b4b4}
  :root[data-theme="light"] .grid.compact .card.card-critical{background:#fff1f1}
  :root[data-theme="light"] .modal-bg{background:#0f172acc}
  *{box-sizing:border-box}
  /* overflow-x:hidden on the document root is a safety net against
     horizontal scroll — on mobile, any single unbroken long string inside a
     card (a long domain/victim name, a hash, an amount with no spaces) used
     to force that card wider than the screen with nothing stopping it,
     which pushed the whole page's scrollable width out with it: the report
     was "le schede si aprono alla destra all'infinito" (cards open
     endlessly to the right). The overflow-wrap rules on card text below fix
     the actual cause (long words now wrap instead of overflowing); this is
     the backstop in case something else does the same thing later. */
  html, body{overflow-x:hidden; max-width:100%}
  /* scrollbar-gutter:stable — reserves the vertical scrollbar's space
     permanently, so a scrollbar appearing/disappearing never changes the
     page's available content width (which the embedded iframes below
     stretch to fill, width:100%). Defensive hardening against any
     width-driven reflow loop between this page and an embedded iframe —
     not the fix for the Threat Actors "infinite growth" bug (that was a
     different, self-contained loop inside threat-actors.html's own
     height-reporting code — see the detailed comment there). No-ops
     harmlessly on a browser that doesn't support the property. */
  html{scrollbar-gutter: stable}
  body{margin:0;background:var(--bg);color:var(--text);font-family:'Segoe UI',system-ui,-apple-system,sans-serif;}
  header{position:sticky;top:0;z-index:20;background:linear-gradient(180deg,#0a0f1c,#0a0f1cee);border-bottom:1px solid var(--border);isolation:isolate}
  /* backdrop-filter moved off header onto a ::before: filter/backdrop-filter
     on an element makes it a new CSS "containing block" for any
     position:fixed descendant (spec behavior) — with it directly on
     <header>, every position:fixed element inside it (.dropdown-menu, the
     site-nav mobile panel) stopped being positioned relative to the
     viewport and started being positioned relative to header's own short
     box instead, which is what made menus/dropdowns misbehave on scroll. A
     ::before has no children, so it can't become a containing block for
     anything — same visual blur, none of the side effect. */
  header::before{content:"";position:absolute;inset:0;z-index:-1;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
  /* NOTE: no overflow:hidden here — it previously clipped the Intelligence
     dropdown, which is position:fixed but still gets clipped by an
     ancestor's overflow:hidden. The glow below tolerates a little bleed. */
  .topbar{overflow:hidden}
  .topbar::before{content:'';position:absolute;top:-80px;right:-40px;width:260px;height:260px;background:radial-gradient(circle,rgba(6,182,212,.18),transparent 70%);pointer-events:none;z-index:-1}
  .topbar{display:flex;align-items:center;justify-content:space-between;padding:14px 24px;flex-wrap:wrap;gap:12px;position:relative}
  /* ---------- Header background fx: same falling hex/code texture as
     index.html's hero, sized to just the topbar and kept at a much lower
     opacity — this header is sticky and stays on screen while scrolling,
     so it needs to read as "barely there," not as a hero moment. Shares
     index.html's on/off choice via the same localStorage key; no separate
     toggle here (the topbar is already dense) — flip it from the homepage. */
  /* position:fixed + a body-level canvas (not nested in header/.topbar,
     which is sticky + backdrop-filter and would otherwise contain a
     fixed-position descendant to its own small box) so this covers the
     whole viewport at every scroll position instead of just the topbar. */
  .topbar-bgfx{position:fixed;inset:0;z-index:-2;opacity:.16;pointer-events:none}
  .logo{font-size:22px;font-weight:800;letter-spacing:.5px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
  .logo-link{display:flex;align-items:center;gap:8px;text-decoration:none;color:inherit;cursor:pointer}
  .logo span{background:linear-gradient(120deg,var(--accent2),#a78bfa);-webkit-background-clip:text;background-clip:text;color:transparent}
  .stats-strip{display:flex;gap:18px;padding:0 24px 14px;flex-wrap:wrap;position:relative}
  .stat-pill{background:var(--card);border:1px solid var(--border);border-radius:10px;padding:8px 16px;font-size:13px;color:var(--muted);transition:.15s}
  .stat-pill.clickable:hover{transform:translateY(-2px);box-shadow:0 6px 16px rgba(0,0,0,.35)}
  .stat-pill b{color:var(--text);font-size:16px;display:block;font-family:'Courier New',monospace;background:linear-gradient(120deg,#a78bfa,#22d3ee);-webkit-background-clip:text;background-clip:text;color:transparent}
  .pill-spark{display:block;width:48px;height:14px;margin-top:3px}
  .pill-spark polyline{fill:none;stroke:#22d3ee;stroke-width:1.6;opacity:.75}
  .pill-spark-zero polyline{opacity:.3;stroke-dasharray:2 2}
  .pill-spark-zero-label{display:block;font-size:9px;color:var(--muted);margin-top:1px;font-family:'Courier New',monospace}
  /* Purely informational (more events isn't "good" or "bad" on a neutral
     OSINT feed), so no status-red/green semantics — just direction, always
     paired with the arrow + number, never color alone. */
  .trend-badge{display:inline-block;margin-top:2px;font-family:'Courier New',monospace;font-size:10.5px;font-weight:700;letter-spacing:.2px}
  .trend-badge.trend-up{color:#22d3ee}
  .trend-badge.trend-down{color:#8b93a7}
  .trend-badge.trend-flat{color:#5f6b8a}
  .flap-num{display:inline-flex;perspective:200px}
  .flap-char{display:inline-block;min-width:.62em;text-align:center;transform-origin:50% 50%}
  .flap-char.flip{animation:flapTick .13s ease}
  @keyframes flapTick{0%{transform:rotateX(0)}45%{transform:rotateX(78deg);opacity:.35}55%{transform:rotateX(-78deg);opacity:.35}100%{transform:rotateX(0)}}
  @media (prefers-reduced-motion: reduce){.flap-char.flip{animation:none}}
  /* Third pass at this — two lightness-only nudges (--bg-alt, then --card)
     still read as "basically the same bar" to Stefano. A few-percent
     lightness delta is genuinely hard to see against a dark background, so
     this time the fix is a HUE shift, not just a shade: a faint violet/cyan
     tinted wash over a distinctly lighter navy base, framed by a bold 3px
     cyan top edge and a visible violet-tinted bottom edge. Hue differences
     read instantly even at a glance; two near-identical dark grays don't. */
  nav.tabs{display:flex;gap:4px;padding:0 24px;overflow-x:auto;background:linear-gradient(180deg, rgba(124,58,237,.14), rgba(6,182,212,.05)) , #171f36;border-top:3px solid #22d3ee;border-bottom:1px solid rgba(124,58,237,.4);box-shadow:0 8px 20px -8px rgba(0,0,0,.8);position:relative}
  nav.tabs button{background:none;border:none;color:var(--muted);padding:12px 18px;cursor:pointer;font-size:14px;font-weight:600;border-bottom:2px solid transparent;white-space:nowrap}
  nav.tabs button.active{color:var(--text);border-bottom-color:var(--accent2);background:rgba(34,211,238,.1);border-radius:6px 6px 0 0}
  nav.tabs a.nav-link-tab{display:flex;align-items:center;color:var(--muted);padding:12px 18px;font-size:14px;font-weight:600;border-bottom:2px solid transparent;white-space:nowrap;text-decoration:none}
  nav.tabs a.nav-link-tab:hover{color:var(--text)}
  .nav-dropdown{position:relative;display:flex}
  .nav-dropdown .dropdown-trigger{display:flex;align-items:center;gap:5px}
  .nav-dropdown .dropdown-trigger .caret{font-size:10px;transition:transform .15s}
  .nav-dropdown.open .dropdown-trigger .caret{transform:rotate(180deg)}
  /* position:fixed (not absolute) so it isn't clipped by nav.tabs's
     overflow-x:auto, which — per the CSS spec — also clips the y axis;
     exact coordinates are set from JS on open. */
  /* Two columns instead of one long list: with 9 entries a single column
     ran tall enough to feel slow to scan. "Panoramica Intelligence" spans
     both columns as the overview link that sits above the 8 per-category
     items, which fill the grid two-by-two below it. */
  .dropdown-menu{display:none;position:fixed;background:var(--card);border:1px solid var(--border);border-radius:10px;box-shadow:0 12px 24px -8px #000a;min-width:340px;z-index:30;grid-template-columns:1fr 1fr;gap:2px;padding:6px}
  .nav-dropdown.open .dropdown-menu{display:grid}
  .dropdown-menu button{text-align:left;padding:10px 14px;border-radius:7px;border-bottom:none!important}
  .dropdown-menu button.dropdown-span{grid-column:1 / -1}
  .dropdown-menu button:hover{background:var(--card-hover);color:var(--text)}
  .dropdown-menu button.active{background:var(--card-hover);color:var(--accent2)}
  main{padding:20px 24px 60px;max-width:1400px;margin:0 auto}
  /* Orientation aid for anyone landing on a deep tab from a shared link —
     with 7 top-level tabs plus a 7-item Intelligence dropdown, "where am I"
     isn't always obvious from the tab bar alone once you've scrolled past it. */
  .breadcrumb{font-size:12.5px;color:var(--muted);margin-bottom:10px;display:flex;align-items:center;gap:6px}
  .breadcrumb b{color:var(--text);font-weight:600}
  .filters{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:18px;align-items:center}
  /* .filters-body wraps the actual controls so they can be collapsed as a
     single block on mobile (see the @media rule below); display:contents
     makes the wrapper invisible to layout everywhere else, so on desktop
     its children keep flowing exactly as direct children of .filters
     always did — none of the .filters/.filters input/.filters select rules
     below need to change. */
  .filters-body{display:contents}
  .filters-toggle{display:none}
  .filters input, .filters select{background:var(--card);border:1px solid var(--border);color:var(--text);padding:9px 12px;border-radius:8px;font-size:13px}
  .filters input{flex:1;min-width:220px}
  .filters button{background:var(--accent);color:#fff;border:none;padding:9px 16px;border-radius:8px;cursor:pointer;font-weight:600;font-size:13px}
  /* .btn-ghost is also used outside .filters (e.g. the Panoramica
     Intelligence hero's Export CSV/JSON buttons, in .dash-hero-meta), so
     its base look lives here rather than scoped to .filters only. */
  button.btn-ghost{background:none;border:1px solid var(--border);color:var(--muted);padding:9px 16px;border-radius:8px;cursor:pointer;font-weight:600;font-size:13px;font-family:inherit}
  button.btn-ghost:hover{border-color:var(--accent2);color:var(--text)}
  .date-label{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--muted)}
  .date-label input{background:var(--card);border:1px solid var(--border);color:var(--text);padding:8px 10px;border-radius:8px;font-size:12.5px;font-family:inherit}
  /* "Solo exploited" / "Solo AI-driven" reuse .date-label for the same
     row-layout/spacing, but they're a checkbox + text label, not a text
     label + date input — the rules above (meant for the "Dal"/"Al" date
     boxes) turned the checkbox itself into a padded, background-filled box
     that fights the text for space. .check-label resets the checkbox back
     to a normal small control and wraps the text in its own <span> so it
     always has room to render (a bare text node after a flex-grown sibling
     can be squeezed to nothing). */
  .check-label input[type=checkbox]{all:revert;flex:0 0 auto;width:15px;height:15px;accent-color:var(--accent2);cursor:pointer}
  .check-label span{white-space:nowrap}
  #loadMoreWrap button{background:var(--card);border:1px solid var(--border);color:var(--text);padding:10px 22px;border-radius:8px;cursor:pointer;font-weight:600;font-size:13px}
  #loadMoreWrap button:hover{border-color:var(--accent2)}
  .stat-pill.clickable{cursor:pointer;transition:.15s}
  .stat-pill.clickable:hover{border-color:var(--accent2);background:var(--card-hover)}
  .stat-pill.active-filter{border-color:var(--accent2);background:var(--card-hover)}
  .grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:14px}
  .grid.compact{grid-template-columns:1fr;gap:0}
  .grid.compact .card{display:flex;align-items:center;gap:12px;padding:10px 14px;border-radius:0;border-left:3px solid transparent;border-bottom:1px solid var(--border)}
  .grid.compact .card-thumb,.grid.compact .card-masthead,.grid.compact .card-thumb-wrap,.grid.compact .event-thumb-fallback,.grid.compact .event-cover-wrap{display:none}
  .grid.compact .card-top{flex-shrink:0;display:flex;gap:6px}
  .grid.compact h3{font-size:13.5px;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .grid.compact .summary{display:none}
  .grid.compact .meta{flex-shrink:0;flex-wrap:nowrap}
  .grid.compact .meta span{white-space:nowrap}
  .grid.compact .compliance-tags{display:none}
  .card{background:var(--card);border:1px solid var(--border);border-radius:12px;padding:16px;transition:.15s;cursor:pointer;min-width:0;max-width:100%}
  .card:hover{background:var(--card-hover);border-color:var(--accent2)}
  .card-thumb{width:calc(100% + 32px);margin:-16px -16px 12px;display:block;height:140px;object-fit:cover;border-radius:12px 12px 0 0}
  .card-thumb-wrap{width:calc(100% + 32px);margin:-16px -16px 12px}
  .card-thumb-wrap .card-thumb{width:100%;margin:0;border-radius:12px 12px 0 0}
  .card-masthead{width:calc(100% + 32px);margin:-16px -16px 12px;padding:14px 16px;display:flex;align-items:center;gap:10px;background:linear-gradient(135deg,#151d30,#0f1626);border-radius:12px 12px 0 0;border-bottom:1px solid var(--border)}
  .card-masthead img{width:28px;height:28px;border-radius:6px;background:#fff;object-fit:contain;padding:3px;flex-shrink:0}
  .card-masthead span{font-size:13px;font-weight:700;color:#dbe3f5;letter-spacing:.2px}
  .ticker-logo{width:14px;height:14px;border-radius:3px;background:#fff;object-fit:contain;padding:1px;vertical-align:-2px;margin-right:5px}
  .ad-slot-card{grid-column:1/-1;background:var(--card);border:1px dashed var(--border);border-radius:12px;padding:10px;cursor:default}
  .ad-slot-card .ad-tag{display:block;font-size:10px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin-bottom:8px}
  .ad-banner-slot{max-width:1400px;margin:0 auto;padding:10px 24px 0}
  .ad-banner-slot .ad-tag{display:block;font-size:10px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin-bottom:6px;text-align:center}
  .card-top{display:flex;justify-content:space-between;align-items:flex-start;gap:6px;row-gap:6px;flex-wrap:wrap;margin-bottom:8px}
  /* Kept small and non-wrapping on purpose — a card-top row can stack a
     category + risk + source badge side by side (e.g. "Vulnerabilità" +
     "🎯 Exploited" + "us cisa.gov (KEV)"), and at the old 11px/3px-9px size
     the longer source labels wrapped their text onto two lines, ballooning
     the whole badge's height. white-space:nowrap keeps each badge one line
     tall; card-top's flex-wrap lets extra badges drop to a new row instead. */
  .badge{display:inline-block;font-size:9.5px;padding:2px 7px;border-radius:20px;font-weight:700;letter-spacing:.2px;white-space:nowrap;line-height:1.5}
  .compliance-tags{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0}
  .compliance-tag{display:inline-flex;align-items:center;gap:4px;font-size:11px;font-weight:700;padding:3px 9px;border-radius:20px;background:#1e1b4b;color:#c7d2fe;border:1px solid #3730a3}
  /* One-click framework filter row above the Normativa grid (see
     complianceChipsHtml) — same pill language as .compliance-tag but
     interactive, so picking NIS2/DORA/ISO/... needs no typing. */
  .compliance-chips{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px}
  .compliance-chip{background:var(--card);border:1px solid var(--border);color:var(--muted);border-radius:20px;padding:6px 14px;font-size:12.5px;font-weight:600;cursor:pointer;transition:.15s}
  .compliance-chip:hover{border-color:var(--accent2);color:var(--text)}
  .compliance-chip.active{background:#1e1b4b;color:#c7d2fe;border-color:#3730a3}
  .compliance-chip-clear{color:var(--muted);border-style:dashed}
  .compliance-guide-toggle{background:var(--bg-alt);border-style:dashed}
  .compliance-guide{margin:-8px 0 16px;padding:14px 16px;border:1px solid var(--border);border-radius:10px;background:var(--card);display:flex;flex-direction:column;gap:10px}
  .compliance-guide[hidden]{display:none}
  .compliance-guide-row{display:flex;flex-direction:column;gap:2px}
  .compliance-guide-tag{font-size:12.5px;font-weight:700;color:#c7d2fe}
  .compliance-guide-desc{font-size:12.5px;color:var(--muted);line-height:1.4}
  @media (min-width:700px){
    .compliance-guide-row{flex-direction:row;gap:14px}
    .compliance-guide-tag{flex:0 0 220px}
  }
  .badge.actor{background:#3b0764;color:#e9d5ff}
  .badge.source{background:#0e2a3a;color:#7dd3fc}
  /* Smaller than the other card-top badges (category/source/type) — it's a
     lightweight freshness flag, not information with the same weight as
     those, and at full badge size it competed with them for attention. */
  .badge-new{background:#dc2626;color:#fff;animation:pulse-new 1.6s ease-in-out infinite;font-size:9px;padding:2px 7px}
  @keyframes pulse-new{0%,100%{opacity:1}50%{opacity:.5}}
  .verified-badge{background:#052e16;color:#4ade80}
  .unverified-badge{background:#3f1d0a;color:#fdba74}
  .reg-hint{background:rgba(139,92,246,.08);border:1px solid rgba(139,92,246,.25);border-radius:10px;padding:10px 14px;font-size:12.5px;color:var(--muted);margin-bottom:14px}
  .reg-hint a{color:var(--accent2);font-weight:700;cursor:pointer;text-decoration:none}
  .reg-hint a:hover{text-decoration:underline}
  .reg-hint-pill{display:inline-flex;align-items:center;gap:3px;font-size:11px;font-weight:700;color:#c4b5fd;background:rgba(139,92,246,.12);border:1px solid rgba(139,92,246,.3);border-radius:20px;padding:3px 9px;margin:2px 0 6px;text-decoration:none;cursor:pointer;width:fit-content}
  .reg-hint-pill:hover{background:rgba(139,92,246,.22)}
  .grid.compact .reg-hint-pill{display:none}
  .badge.cat-ransomware{background:#450a0a;color:#fca5a5}
  .badge.cat-data_leak{background:#422006;color:#fdba74}
  .badge.cat-intelligence{background:#052e2b;color:#5eead4}
  .badge.cat-infostealer{background:#1e1b4b;color:#a5b4fc}
  .badge.cat-news{background:#1e293b;color:#cbd5e1}
  .badge.cat-social{background:#164e63;color:#a5f3fc}
  .badge.cat-vulnerability{background:#3f1d0a;color:#fdba74}
  .badge.cat-regulatory{background:#0c2a1e;color:#86efac}
  .badge.cat-attualita{background:#1e2a44;color:#93c5fd}
  .badge.cat-malware{background:#4a044e;color:#f0abfc}
  .badge.cat-ot_ics{background:#451a03;color:#fcd34d}
  .badge.cat-phishing{background:#4c0519;color:#fda4af}
  /* Risk-level badge for vulnerabilities — a status color (severity), so it
     stays visually distinct from the identity-colored category/source
     badges next to it, and always carries an icon + label, never color alone. */
  /* Critico era nella stessa scala rosso/arancio di Alto — a colpo d'occhio
     si confondevano. Ora è viola (stessa famiglia dell'--accent del sito),
     volutamente diverso dal fucsia/magenta già usato per "Exploited" qui
     sotto, così le due badge più urgenti restano distinguibili tra loro. */
  .badge.risk-critical{background:#2e1065;color:#ddd6fe;border:1px solid #6d28d9}
  .badge.risk-high{background:#431407;color:#fed7aa;border:1px solid #9a3412}
  .badge.risk-medium{background:#422006;color:#fde68a;border:1px solid #92400e}
  .badge.risk-low{background:#052e16;color:#bbf7d0;border:1px solid #166534}
  .badge.risk-exploited{background:#4a044e;color:#f5d0fe;border:1px solid #86198f}
  /* Classificazione AI-driven (vedi ai_classify.py) — trasversale a tutte
     le categorie, quindi un colore proprio invece di riusare la scala
     rischio/CVSS, che qui non ha senso. */
  .badge.ai-driven{background:#083344;color:#a5f3fc;border:1px solid #0e7490}
  /* "Chi l'ha data per primo" (vedi first_report.py) — oro per chi è
     arrivato primo, grigio neutro (niente di negativo: inseguire una
     notizia non è un demerito) per chi l'ha ripresa dopo. */
  .badge.first-report{background:#422006;color:#fde68a;border:1px solid #a16207}
  .badge.first-report-follow{background:var(--bg-alt);color:var(--muted);border:1px solid var(--border)}
  /* Same treatment for a ransomware/data_leak card's negotiation outcome
     (see negotiationOutcomeBadge) — reuses the risk-badge palette so paid/
     not-paid/ongoing reads at the same glance-level as a CVSS severity. */
  .badge.neg-outcome-paid{background:#052e16;color:#bbf7d0;border:1px solid #166534}
  .badge.neg-outcome-not-paid{background:#450a0a;color:#fecaca;border:1px solid #7f1d1d}
  .badge.neg-outcome-ongoing{background:#422006;color:#fde68a;border:1px solid #92400e}
  .badge.neg-outcome-unknown{background:var(--bg-alt);color:var(--muted);border:1px solid var(--border)}
  /* Eventi tab: cover shown when an event has no curated photo (see the JS
     comment on eventThumb()) — bleeds edge-to-edge like .card-thumb on the
     other tabs, but shorter: most of these are small/obscure CTF sites
     whose only real asset is a favicon, and a tiny real icon reads better
     in a compact strip than blown up to fill a tall banner. Either the
     organizer's real logo/favicon on a white plate (.has-logo), or — only
     if neither loads at all — a themed gradient with a topic icon. */
  .event-thumb-fallback{width:calc(100% + 32px);margin:-16px -16px 12px;height:84px;border-radius:12px 12px 0 0;display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden}
  .event-thumb-fallback.has-logo{background:#fff}
  .event-thumb-fallback .event-logo-img{max-width:48px;max-height:48px;width:auto;height:auto;object-fit:contain}
  .event-thumb-fallback .event-icon-hero{font-size:34px;filter:drop-shadow(0 4px 10px rgba(0,0,0,.35))}
  /* Quando l'evento ha un'immagine reale (og:image della sua stessa
     pagina — vedi fetch-preview-image lato backend), riempie tutta
     l'anteprima come sfondo, con il logo dell'organizzatore in piccolo
     sopra, invece di sostituirlo del tutto. */
  .event-cover-wrap{position:relative;width:calc(100% + 32px);margin:-16px -16px 12px;height:140px;border-radius:12px 12px 0 0;overflow:hidden;background:#0f1626}
  .event-cover-wrap .event-cover-img{width:100%;height:100%;object-fit:cover;display:block}
  .event-logo-badge{position:absolute;left:10px;bottom:10px;width:40px;height:40px;border-radius:9px;background:#fff;display:flex;align-items:center;justify-content:center;box-shadow:0 3px 10px rgba(0,0,0,.45);padding:5px}
  .event-logo-badge img{max-width:100%;max-height:100%;object-fit:contain}
  .event-logo-badge .event-icon-hero{font-size:18px;filter:none}
  /* One gradient per topic hint (see EVENT_TOPIC_HINTS) so an event without
     an uploaded photo still reads as "about" its own subject at a glance,
     instead of every CTF or every conference sharing one identical tile. */
  .event-thumb-fallback.grad-conf{background:linear-gradient(135deg,#1e293b,#0e2a3a)}
  .event-thumb-fallback.grad-ctf{background:linear-gradient(135deg,#1e1b4b,#3f1d0a)}
  .event-thumb-fallback.grad-red{background:linear-gradient(135deg,#450a0a,#7c2d12)}
  .event-thumb-fallback.grad-blue{background:linear-gradient(135deg,#0c2d48,#0e4a5e)}
  .event-thumb-fallback.grad-cloud{background:linear-gradient(135deg,#1e3a5f,#3b6ea5)}
  .event-thumb-fallback.grad-osint{background:linear-gradient(135deg,#1e293b,#334155)}
  .event-thumb-fallback.grad-forensic{background:linear-gradient(135deg,#164e3c,#0f766e)}
  .event-thumb-fallback.grad-malware{background:linear-gradient(135deg,#3f0d0d,#7f1d1d)}
  .event-thumb-fallback.grad-crypto{background:linear-gradient(135deg,#1e1b4b,#4c1d95)}
  .event-thumb-fallback.grad-industrial{background:linear-gradient(135deg,#422006,#78350f)}
  .event-thumb-fallback.grad-ai{background:linear-gradient(135deg,#1e1b4b,#5b21b6)}
  .event-thumb-fallback.grad-privacy{background:linear-gradient(135deg,#0f172a,#1e1b4b)}
  .event-thumb-fallback.grad-blockchain{background:linear-gradient(135deg,#052e16,#134e4a)}
  .event-thumb-fallback.grad-hack{background:linear-gradient(135deg,#020617,#1e293b)}
  .event-thumb-fallback.grad-diversity{background:linear-gradient(135deg,#4a044e,#831843)}
  .site-nav{display:flex;gap:16px;align-items:center}
  .site-nav a{color:var(--muted);font-size:13px;font-weight:600;text-decoration:none}
  .site-nav a:hover, .site-nav a.active{color:var(--text)}
  .site-nav-toggle{display:none;align-items:center;gap:5px;background:var(--card-hover);border:1px solid var(--border);color:var(--text);font-size:12.5px;font-weight:700;padding:7px 12px;border-radius:20px;cursor:pointer;font-family:inherit;flex-shrink:0}
  .site-nav-backdrop{display:none;position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:69}
  .site-nav-backdrop.open{display:block}
  .mobile-search-fab{display:none;position:fixed;right:18px;bottom:18px;z-index:65;width:52px;height:52px;border-radius:50%;background:linear-gradient(135deg,var(--accent),var(--accent2));color:#fff;border:none;font-size:20px;cursor:pointer;box-shadow:0 10px 24px -8px #000a;align-items:center;justify-content:center}
  .mobile-search-fab:active{transform:scale(.95)}
  .social-links{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px;margin-bottom:26px}
  .social-link-card{background:var(--card);border:1px solid var(--border);border-radius:12px;padding:14px 16px;display:flex;flex-direction:column;gap:4px}
  .social-link-card a{font-weight:700;font-size:14px}
  .social-link-card p{margin:0;color:var(--muted);font-size:12px;line-height:1.4}
  .card h3{margin:6px 0;font-size:15px;line-height:1.35;color:var(--text);overflow-wrap:anywhere}
  .card p.summary{color:var(--muted);font-size:12.5px;margin:6px 0;line-height:1.5;max-height:54px;overflow:hidden;overflow-wrap:anywhere}
  .ioc-actor-link{color:var(--cyan,#22d3ee);font-weight:700;text-decoration:underline;text-decoration-style:dotted;text-underline-offset:2px}
  .ioc-actor-link:hover{color:var(--accent2,#a78bfa)}
  .watch-star{background:none;border:1px solid var(--border);color:var(--muted);cursor:pointer;font-size:12px;padding:1px 7px}
  .watch-star:hover{border-color:#fbbf24;color:#fbbf24}
  .watch-star.active{background:#3f2d02;border-color:#fbbf24;color:#fbbf24}
  .meta{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px;font-size:11.5px;color:var(--muted)}
  .meta span{background:var(--bg-alt);padding:2px 8px;border-radius:6px;border:1px solid var(--border);max-width:100%;overflow-wrap:anywhere}
  .empty{color:var(--muted);text-align:center;padding:60px 0;font-size:14px}
  .loading{color:var(--muted);text-align:center;padding:40px 0}
  @keyframes shimmer{0%{background-position:-400px 0}100%{background-position:400px 0}}
  .skeleton-card{background:var(--card);border:1px solid var(--border);border-radius:12px;padding:16px;height:190px}
  .skeleton-line{height:12px;border-radius:6px;margin-bottom:10px;background:linear-gradient(90deg,var(--border) 0%,var(--card-hover) 50%,var(--border) 100%);background-size:800px 100%;animation:shimmer 1.4s infinite linear}
  .skeleton-line.thumb{height:76px;margin:-16px -16px 14px;width:calc(100% + 32px);border-radius:12px 12px 0 0}
  .skeleton-line.short{width:40%}
  .skeleton-line.tall{height:14px;width:85%}
  .neg-list{display:flex;flex-direction:column;gap:12px}
  .neg-card{background:var(--card);border:1px solid var(--border);border-radius:12px;padding:16px;cursor:pointer;transition:.15s}
  .neg-card:hover{border-color:var(--accent2)}
  .neg-head{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px;margin-bottom:10px}
  .neg-head b{color:var(--text)}
  .neg-vs{color:var(--muted);font-size:13px}
  .neg-head-date{font-family:'Courier New',monospace;font-size:11.5px;color:var(--muted)}
  .neg-pills{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:4px}
  /* Solid, saturated fills — matches the reference design exactly (screenshot),
     rather than the site's usual muted/outlined badge style: each pill's job
     (ask, final, outcome, secondary detail) reads at a glance by color alone,
     with the label and bold amount as white text on the fill. */
  .neg-pill{display:inline-flex;align-items:center;gap:4px;background:var(--bg-alt);border:1px solid var(--border);border-radius:20px;padding:5px 12px;font-size:12px;color:var(--muted)}
  .neg-pill b{color:var(--text);font-family:'Courier New',monospace}
  .neg-pill-demand{background:#c2410c;border-color:#c2410c;color:#fff}
  .neg-pill-demand b{color:#fff}
  .neg-pill-final{background:#15803d;border-color:#15803d;color:#fff}
  .neg-pill-final b{color:#fff}
  .neg-pill-outcome{background:#be185d;border-color:#be185d;color:#fff}
  .neg-pill-outcome b{color:#fff}
  /* Outcome-specific fill overrides the default pink when the result is
     known good/bad/pending — reuses the same semaforo palette as the
     negotiation-outcome badge shown on ransomware/data-leak cards, so the
     color means the same thing everywhere on the site. */
  .neg-pill-outcome.neg-outcome-paid{background:#15803d;border-color:#15803d}
  .neg-pill-outcome.neg-outcome-not-paid{background:#b91c1c;border-color:#b91c1c}
  .neg-pill-outcome.neg-outcome-ongoing{background:#b45309;border-color:#b45309}
  .neg-pill-outcome.neg-outcome-unknown{background:#be185d;border-color:#be185d}
  .neg-transcript{background:#000;border-radius:8px;padding:12px;font-family:'Courier New',monospace;font-size:12.5px;color:#9be9a8;white-space:pre-wrap;max-height:260px;overflow-y:auto;margin-top:10px;border:1px solid var(--border)}
  /* Per-speaker label at the start of each transcript line (see
     formatNegTranscript) — "Gruppo" (the attacker) in red. The message text
     itself is already green by default (.neg-transcript's own color), so a
     "Vittima" label in that SAME green was invisible against its own line —
     it's set to white here instead, so both labels stand out from the green
     body text and from each other. */
  .neg-line-group{color:#f87171;font-weight:700}
  .neg-line-victim{color:#f5f5f5;font-weight:700}

  /* ---------- Negotiations: grouped by threat actor, contextual filters ---------- */
  .neg-stats-strip{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:18px}
  .neg-stat-card{background:var(--card);border:1px solid var(--border);border-radius:12px;padding:12px 18px;min-width:130px}
  .neg-stat-card .ns-val{font-size:20px;font-weight:800;color:var(--text)}
  .neg-stat-card .ns-label{font-size:11.5px;color:var(--muted);margin-top:2px}
  .neg-toolbar{display:flex;align-items:center;gap:10px;margin-bottom:14px;flex-wrap:wrap}
  .neg-toolbar input[type="text"]{background:var(--card);border:1px solid var(--border);color:var(--text);padding:9px 14px;border-radius:8px;font-size:13px;min-width:200px;flex:1;max-width:320px}
  .neg-toolbar select{background:var(--card);border:1px solid var(--border);color:var(--text);padding:9px 12px;border-radius:8px;font-size:13px}
  .neg-toolbar .neg-toggle{display:flex;align-items:center;gap:6px;font-size:12.5px;color:var(--muted);cursor:pointer;white-space:nowrap}
  .neg-toolbar .neg-toggle input{accent-color:var(--accent2)}
  .neg-toolbar .neg-active-count{color:var(--muted);font-size:12.5px;margin-left:auto}

  /* ---------- Negotiations: on-chain payments (Ransomwhere) ---------- */
  /* Sequential single-hue ramp (magnitude, not identity) stepped for this
     app's dark surface (#111827 card / #070b14 page) — same cyan family as
     --accent2 so the section reads as part of this app, not a bolted-on
     widget. Lightest step = "near zero", darkest = the largest bar. */
  .neg-onchain{background:var(--card);border:1px solid var(--border);border-radius:14px;padding:18px 20px;margin-bottom:18px;
    --seq-100:#173544; --seq-300:#0f6a86; --seq-500:#06b6d4; --seq-650:#7ee8f5;}
  .noc-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:14px}
  .noc-head h4{margin:0;font-size:14px;font-weight:800;color:var(--text);display:flex;align-items:center;gap:8px}
  .noc-head h4 .noc-dot{width:8px;height:8px;border-radius:50%;background:var(--seq-500);box-shadow:0 0 8px var(--seq-500)}
  .noc-source{font-size:11px;color:var(--muted)}
  .noc-source a{color:var(--seq-500);text-decoration:none;font-weight:600}
  .noc-source a:hover{text-decoration:underline}
  .noc-stats{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:16px}
  .noc-stat{background:var(--bg-alt);border:1px solid var(--border);border-radius:10px;padding:10px 14px;min-width:118px;flex:1}
  .noc-stat .noc-val{font-size:18px;font-weight:800;color:var(--text);font-variant-numeric:normal}
  .noc-stat .noc-label{font-size:11px;color:var(--muted);margin-top:2px}
  .noc-chart-wrap{position:relative;margin-top:4px}
  .noc-empty{color:var(--muted);font-size:12.5px;padding:20px 0;text-align:center}
  @media (max-width:640px){ .noc-stat{min-width:100px} }

  /* ---------- Per-tab trend chart (above the filters, every content tab) ---------- */
  .tab-trend{background:var(--card);border:1px solid var(--border);border-radius:12px;padding:12px 16px 6px;margin-bottom:16px}
  .tt-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:8px}
  .tt-label{font-size:12.5px;font-weight:700;color:var(--muted)}
  .tt-approx{cursor:help;color:var(--accent2)}
  .tt-total{font-size:12.5px;color:var(--text);font-weight:700}
  .tt-chart-wrap{position:relative;height:90px}
  @media (max-width:640px){ .tt-chart-wrap{height:70px} }
  .neg-toolbar .neg-reset{background:none;border:1px solid var(--border);color:var(--muted);padding:9px 14px;border-radius:8px;font-size:12.5px;cursor:pointer}
  .neg-group{margin-bottom:22px}
  .neg-group-head{display:flex;align-items:center;gap:10px;cursor:pointer;padding:6px 2px;user-select:none}
  .neg-group-head .badge.actor{font-size:12.5px;padding:5px 12px}
  .neg-group-head .neg-count{color:var(--muted);font-size:12.5px}
  .neg-group-head .caret{margin-left:auto;color:var(--muted);font-size:12px;transition:transform .15s}
  .neg-group.collapsed .caret{transform:rotate(-90deg)}
  .neg-group.collapsed .neg-tiles{display:none}
  /* One full-width card per negotiation, stacked — not a compact grid — so
     the transcript is readable inline without a click (see renderNegTile). */
  .neg-tiles{display:flex;flex-direction:column;gap:12px;margin-top:10px}
  .nt-btc{color:#f7931a}
  .neg-modal-transcript{background:#000;border-radius:8px;padding:14px;font-family:'Courier New',monospace;font-size:12.5px;color:#9be9a8;white-space:pre-wrap;max-height:min(50vh,420px);overflow-y:auto;margin-top:12px;border:1px solid var(--border)}
  .neg-view-toggle{display:flex;gap:2px;background:var(--bg-alt);border:1px solid var(--border);border-radius:8px;padding:2px;margin-left:auto}
  .neg-view-toggle button{background:none;border:none;color:var(--muted);padding:7px 12px;border-radius:6px;font-size:12.5px;cursor:pointer;font-weight:600}
  .neg-view-toggle button.active{background:var(--card);color:var(--text)}
  .neg-timeline-day{margin-bottom:22px}
  .neg-timeline-date{font-size:12.5px;font-weight:700;color:var(--muted);text-transform:capitalize;margin-bottom:8px;padding-bottom:6px;border-bottom:1px solid var(--border)}
  @media (max-width:640px){
    .neg-toolbar input[type="text"]{max-width:100%}
    .neg-toolbar select{flex:1;min-width:0}
    .neg-toolbar .neg-active-count{margin-left:0;width:100%}
  }
  .health-table{width:100%;border-collapse:collapse;font-size:13px}
  .health-table th, .health-table td{padding:9px 12px;text-align:left;border-bottom:1px solid var(--border)}
  .health-table th{color:var(--muted);font-weight:600;font-size:12px;text-transform:uppercase;letter-spacing:.4px}
  .status-dot{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:6px}
  .status-ok{background:var(--ok)} .status-error{background:var(--danger)} .status-running{background:var(--warn)}
  .modal-bg{position:fixed;inset:0;background:#000a;display:none;align-items:center;justify-content:center;z-index:50;padding:20px}
  /* Con un popup aperto (dettaglio notizia/evento/negoziazione/post, o la
     command palette Ctrl+K) la pagina sotto non deve più scorrere — vedi
     il MutationObserver su #modalBg/#cmdkBg più sotto nello script che
     aggiunge/toglie questa classe automaticamente. */
  body.scroll-locked{overflow:hidden}
  .modal-bg.open{display:flex}
  .cmdk-modal{width:100%;max-width:620px;max-height:70vh;display:flex;flex-direction:column;padding:0;overflow:hidden;align-self:flex-start;margin-top:10vh}
  #cmdkInput{width:100%;box-sizing:border-box;padding:18px 20px;font-size:15px;background:var(--bg-alt);border:none;border-bottom:1px solid var(--border);color:var(--text);outline:none}
  .cmdk-results{overflow-y:auto;overscroll-behavior-y:contain;padding:8px}
  .cmdk-item{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:8px;cursor:pointer}
  .cmdk-item:hover, .cmdk-item.active{background:var(--card-hover)}
  .cmdk-item .cmdk-title{flex:1;font-size:13.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .cmdk-empty{padding:24px;text-align:center;color:var(--muted);font-size:13px}
  .cmdk-hint{padding:10px 16px;font-size:11px;color:var(--muted);border-top:1px solid var(--border)}
  .modal{background:var(--card);border:1px solid var(--border);border-radius:14px;max-width:640px;width:100%;max-height:85vh;overflow-y:auto;overscroll-behavior-y:contain;padding:24px}
  .modal h2{margin-top:0}
  /* ---------- Blog article template: logo masthead, oversized bold title,
     up to 5 numbered "capitoli" (chapters) authored as <h3> inside the
     post's own body HTML — see openBlogModal() and admin.html's post editor,
     which seeds a new article with this exact structure. ---------- */
  .blog-post-masthead{display:flex;align-items:center;gap:10px;margin-bottom:18px;padding-bottom:16px;border-bottom:1px solid var(--border)}
  .blog-post-masthead img{height:30px;width:30px;display:block}
  .blog-post-masthead span{font-size:15px;font-weight:800;letter-spacing:.3px}
  .blog-post-masthead span b{color:var(--accent2)}
  .blog-post-title{margin:0 0 14px;font-size:26px;font-weight:800;line-height:1.25}
  .blog-body h3{font-size:18px;font-weight:700;margin:28px 0 10px;padding-top:18px;border-top:1px solid var(--border)}
  .blog-body h3:first-child{margin-top:0;padding-top:0;border-top:none}
  .blog-body p{margin:0 0 14px}
  .close-btn{float:right;background:none;border:none;color:var(--muted);font-size:20px;cursor:pointer}
  .share-btn{background:var(--card);border:1px solid var(--border);color:var(--text);font-size:13px;font-weight:600;padding:6px 12px;border-radius:20px;cursor:pointer;display:inline-flex;align-items:center;gap:6px;transition:border-color .15s,color .15s}
  .share-btn:hover{border-color:var(--accent2);color:var(--accent2)}
  .share-btn.copied{border-color:var(--ok);color:var(--ok)}
  footer{text-align:center;color:var(--muted);font-size:12px;padding:30px 0;border-top:1px solid var(--border)}
  .presence-bar{display:flex;justify-content:center;align-items:center;gap:10px;margin-bottom:14px;font-size:13px;color:var(--text)}
  .presence-bar b{font-family:'Courier New',monospace;color:var(--accent2)}
  .presence-bar .sep{color:var(--border)}
  .presence-bar .live-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--ok);box-shadow:0 0 6px var(--ok);animation:pulse-live 1.6s ease-in-out infinite}
  @keyframes pulse-live{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(1.3)}}

  /* ---------- News ticker ---------- */
  /* Vertical, Italy-only "real time" ticker (task: "verticalizza solo alle
     news real time, solo per l'Italia") — one headline visible at a time,
     scrolling upward, slower than the old horizontal marquee. */
  .news-ticker-wrap{display:flex;align-items:center;gap:14px;background:var(--bg-alt);border-bottom:1px solid var(--border);padding:9px 24px;overflow:hidden;height:38px}
  .news-ticker-label{flex:0 0 auto;display:inline-flex;align-items:center;gap:6px;font-size:11.5px;font-weight:800;letter-spacing:.5px;color:#04141a;text-transform:uppercase;line-height:1;background:var(--accent2);padding:6px 11px;border-radius:20px;box-shadow:0 0 14px rgba(6,182,212,.35)}
  .news-ticker-label .nt-dot{width:6px;height:6px;border-radius:50%;background:#04141a;animation:pulse-live 1.3s ease-in-out infinite}
  .news-ticker-viewport{flex:1;overflow:hidden;height:20px;min-width:0}
  .news-ticker-track{display:flex;flex-direction:row;flex-wrap:nowrap;gap:40px;width:max-content;animation:news-scroll-left linear infinite;animation-duration:var(--nt-duration, 40s)}
  .news-ticker-wrap:hover .news-ticker-track{animation-play-state:paused}
  .news-ticker-track a{color:var(--text);text-decoration:none;font-size:12.5px;display:flex;align-items:center;gap:8px;height:20px;line-height:20px;overflow:hidden;white-space:nowrap;flex-shrink:0}
  .news-ticker-track a:hover{color:var(--accent2)}
  @keyframes news-scroll-left{from{transform:translateX(0)}to{transform:translateX(-50%)}}
  @media (prefers-reduced-motion: reduce){.news-ticker-track{animation:none}}
  @media (max-width:760px){.news-ticker-wrap{padding:8px 16px}.news-ticker-label span.nt-text{display:none}}
  a{color:var(--accent2)}

  /* ---------- Responsive ---------- */
  .health-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}
  @media (max-width:760px){
    .topbar{padding:12px 16px}
    .logo{font-size:18px}
    .site-nav-toggle{display:inline-flex}
    .site-nav{position:fixed;top:0;right:0;height:100dvh;width:min(78vw,300px);background:var(--bg-alt);border-left:1px solid var(--border);
      flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:0;padding:80px 22px 24px;
      transform:translateX(100%);transition:transform .3s ease;z-index:70;overflow-y:auto;overscroll-behavior-y:contain}
    .site-nav.open{transform:translateX(0)}
    .site-nav a{width:100%;padding:13px 0;font-size:15px;border-bottom:1px solid var(--border)}
    .stats-hero{padding:18px}
    .stats-hero h1{font-size:20px}
    .kpi-grid{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}
    .chart-wrap{height:220px}
    .chart-wrap.tall{height:260px}
    .stats-strip{width:100%;padding:0 16px 12px;overflow-x:auto;flex-wrap:nowrap;-webkit-overflow-scrolling:touch}
    .stat-pill{flex:0 0 auto}
    nav.tabs{padding:0 16px}
    nav.tabs button{padding:10px 13px;font-size:13px}
    main{padding:16px 16px 50px}
    /* Filtri chiusi di default su mobile: una decina di controlli (ricerca,
       5 select, 2 checkbox, 2 date, Reimposta, viste salvate, Compatta,
       CSV/JSON, RSS) impilati verticalmente è una scrollata lunga prima di
       arrivare ai risultati — un pulsante "Filtri ▾" li tiene fuori vista
       finché non servono davvero. */
    .filters-toggle{display:flex;align-items:center;justify-content:space-between;width:100%;background:var(--card);border:1px solid var(--border);color:var(--text);padding:10px 14px;border-radius:8px;font-weight:700;font-size:13px;cursor:pointer;font-family:inherit;margin-bottom:8px}
    .filters-body{display:none;flex-direction:column;gap:8px;width:100%}
    .filters-body.open{display:flex}
    .mobile-search-fab{display:flex}
    .filters{gap:8px}
    .filters input{min-width:100%}
    .filters select{flex:1;min-width:0}
    .date-label{width:100%;justify-content:space-between}
    .date-label input{flex:1}
    /* The checkbox rows aren't a label+stretchy-input pair like "Dal"/"Al",
       so they don't want flex:1 on the input (that's what was swallowing
       the row's width and leaving the label text with nothing to render
       in) or space-between (which would fling the text away from its own
       checkbox). */
    .check-label{justify-content:flex-start}
    .check-label input[type=checkbox]{flex:0 0 auto}
    .grid{grid-template-columns:1fr;gap:12px}
    .modal{padding:18px;max-height:90vh}
    .social-links{grid-template-columns:1fr}
    .presence-bar{flex-wrap:wrap;font-size:12px}
  }
  @media (max-width:420px){
    .logo{font-size:16px}
    .stat-pill{padding:7px 12px;font-size:12px}
    .stat-pill b{font-size:14px}
  }

  /* ---- Statistiche tab (merged in from the old standalone stats.html) ---- */
  .stats-hero{background:radial-gradient(120% 180% at 0% 0%,#1c2a4a 0%,#0a0f1c 55%),linear-gradient(120deg,#151233,#0a0f1c);border:1px solid var(--border);border-radius:18px;padding:26px 28px;margin-bottom:22px;position:relative;overflow:hidden}
  .stats-hero::after{content:'';position:absolute;top:-60px;right:-60px;width:220px;height:220px;background:radial-gradient(circle,rgba(6,182,212,.25),transparent 70%);pointer-events:none}
  .stats-hero h1{font-size:24px;margin:0 0 6px;background:linear-gradient(120deg,#e5e7eb,#a78bfa 70%);-webkit-background-clip:text;background-clip:text;color:transparent}
  .stats-hero p{color:var(--muted);font-size:13.5px;margin:0}
  .kpi-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px;margin-bottom:20px}
  .kpi-card{background:var(--card);border:1px solid var(--border);border-radius:14px;padding:18px 20px}
  .kpi-card b{display:block;font-size:26px;font-family:'Courier New',monospace;background:linear-gradient(120deg,#a78bfa,#22d3ee);-webkit-background-clip:text;background-clip:text;color:transparent}
  .kpi-card span{color:var(--muted);font-size:12.5px;font-weight:600}
  .legend-row{display:flex;flex-wrap:wrap;gap:8px 16px;margin:0 0 22px}
  .legend-chip{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--muted);font-weight:600}
  .legend-chip .dot{width:10px;height:10px;border-radius:3px;flex-shrink:0}
  .range-picker{display:flex;gap:6px;margin-bottom:16px}
  .range-picker button{background:var(--card);border:1px solid var(--border);color:var(--muted);padding:7px 16px;border-radius:8px;cursor:pointer;font-size:12.5px;font-weight:600}
  .range-picker button.active{color:var(--text);border-color:var(--accent2);background:var(--card-hover)}
  .stats-chart-grid{display:grid;grid-template-columns:2fr 1fr;gap:16px;margin-bottom:16px}
  .stats-two-col{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:16px}
  .chart-card{background:var(--card);border:1px solid var(--border);border-radius:14px;padding:20px;margin-bottom:16px}
  .chart-card.is-loading{opacity:.35;filter:saturate(.4);pointer-events:none;transition:opacity .2s,filter .2s}
  .chart-card h2{font-size:14.5px;margin:0 0 4px}
  .chart-card p.hint{color:var(--muted);font-size:11.5px;margin:0 0 14px}
  .chart-wrap{position:relative;height:280px}
  .chart-wrap.tall{height:340px}
  .full-list{max-height:320px;overflow-y:auto;border-top:1px solid var(--border)}
  .full-list-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:7px 2px;border-bottom:1px solid var(--border);font-size:12.5px}
  .full-list-row b{font-family:'Courier New',monospace;color:var(--text);flex-shrink:0}
  .full-list-bar-wrap{position:relative;flex:1;min-width:0;height:20px;display:flex;align-items:center}
  .full-list-bar{position:absolute;left:0;top:0;bottom:0;border-radius:4px;opacity:.3}
  .full-list-label{position:relative;z-index:1;padding-left:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .section-heading{font-size:15px;font-weight:700;margin:30px 0 14px;display:flex;align-items:center;gap:8px}

  /* ---------- World map (Statistiche tab) ---------- */
  .wm-wrap{position:relative}
  .wm-svg{width:100%;height:auto;display:block}
  .wm-svg path{stroke:var(--border);stroke-width:.4;cursor:pointer;transition:opacity .15s}
  .wm-svg path:hover{opacity:.75;stroke:#e5e7eb}
  .wm-legend{display:flex;align-items:center;gap:8px;margin-top:10px;font-size:11px;color:var(--muted)}
  .wm-legend .wm-ramp{width:120px;height:8px;border-radius:4px;background:linear-gradient(90deg,#173544,#0f6a86,#06b6d4,#7ee8f5)}

  /* ---------- Day x hour heatmap (Statistiche tab) ---------- */
  .heatmap-wrap{overflow-x:auto}
  .heatmap-grid{display:grid;grid-template-columns:34px repeat(24,1fr);gap:2px;min-width:640px}
  .heatmap-grid .hm-corner{grid-column:1}
  .heatmap-grid .hm-hour-label{font-size:9px;color:var(--muted);text-align:center;font-family:'Courier New',monospace}
  .heatmap-grid .hm-day-label{font-size:11px;color:var(--muted);display:flex;align-items:center}
  .heatmap-grid .hm-cell{aspect-ratio:1;border-radius:3px;cursor:default}
  .heatmap-legend{display:flex;align-items:center;gap:8px;margin-top:12px;font-size:11px;color:var(--muted)}
  .heatmap-legend .wm-ramp{width:100px;height:8px;border-radius:4px;background:linear-gradient(90deg,#173544,#0f6a86,#06b6d4,#7ee8f5)}

  /* ---- Panoramica Intelligence tab (dashboard) — mirrors the approved
     Design-artifact mockup's row list / progress-bar language rather than
     the Statistiche tab's Chart.js bars, since that's its own distinct
     visual idiom (dense, clickable, every row drills into a filtered view). */
  .dash-tri-col{display:grid;grid-template-columns:1fr 1fr 1fr;gap:16px;margin-bottom:16px}
  /* This override used to sit BEFORE the three base rules above (in an
     earlier @media block near the top of this stylesheet), which meant the
     unconditional desktop rules — later in source order, same specificity —
     always won the cascade regardless of viewport width: .dash-tri-col (and
     the Statistiche tab's two sibling grids) stayed stuck at 3/2 columns on
     mobile. Each card then had to squeeze into ~1/3 of the screen, and since
     a bare `1fr` track still respects its content's min-content width, the
     row (and the whole page, via .dash-tri-col) was forced wider than the
     viewport — "la tab Geografia va oltre la pagina in orizzontale". Moving
     this after the base rules fixes the cascade; minmax(0,...) instead of a
     bare 1fr/2fr also stops any single remaining column from re-widening
     the row past the viewport on its own. */
  @media (max-width:900px){
    .stats-chart-grid, .stats-two-col, .dash-tri-col{grid-template-columns:minmax(0,1fr)}
  }
  .dash-hero-meta{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
  .dash-online-pill{display:flex;align-items:center;gap:6px;color:var(--muted);font-size:12px}
  .dash-online-pill .dot{width:7px;height:7px;border-radius:50%;background:#22c55e;display:inline-block}
  .dash-updated-text{color:var(--muted);font-size:12px}
  .dash-list{display:flex;flex-direction:column;gap:3px}
  .dash-row{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--text);border-radius:8px;margin:0 -8px;padding:6px 8px;cursor:pointer;transition:background .12s}
  .dash-row:hover{background:var(--card-hover)}
  .dash-row:hover .dash-chev{color:var(--accent2)}
  .dash-chev{flex:none;color:var(--border);font-size:14px}
  .dash-bar-track{flex:1 1 auto;min-width:0;height:6px;border-radius:4px;background:var(--bg-alt);overflow:hidden}
  .dash-bar-fill{height:100%;border-radius:4px}
  .dash-rank{width:20px;height:20px;border-radius:6px;background:var(--bg-alt);color:var(--text);font-size:10px;font-weight:700;display:flex;align-items:center;justify-content:center;flex:none}
  .dash-rank.rank-1{background:#7c3aed;color:#fff}
  .dash-trend-up{color:#ef4444}
  .dash-trend-down{color:#22c55e}
  .dash-trend-flat{color:var(--muted)}
  .dash-tt-wrap{position:relative}
  .dash-tooltip{position:absolute;left:0;bottom:calc(100% + 8px);display:none;width:320px;max-width:min(320px,80vw);background:var(--bg-alt);border:1px solid var(--border);border-radius:8px;padding:10px 12px;box-shadow:0 10px 28px -10px #000a;z-index:20;white-space:normal;color:var(--text);font-size:12px;line-height:1.5}
  .dash-tooltip b{color:var(--text);display:block;margin-bottom:3px}
  .dash-tt-wrap:hover .dash-tooltip, .dash-tt-wrap:focus-visible .dash-tooltip{display:block}
  .dash-segbar{display:flex;height:14px;border-radius:7px;overflow:hidden;cursor:pointer}
  .dash-segbar div{height:100%}
  .dash-dot{width:8px;height:8px;border-radius:2px;display:inline-block;flex:none}
  .dash-avg-footer{display:flex;flex-direction:column;gap:6px;border-top:1px solid var(--border);padding-top:12px;margin-top:10px;font-size:12px}
  .dash-avg-footer .row{display:flex;justify-content:space-between}
  .dash-avg-footer b{color:var(--text);font-family:'Courier New',monospace}
  .dash-kpi-delta{font-size:11.5px;margin-left:4px}

  /* ---------- Live indicator + sound toggle ---------- */
  .live-indicator{display:inline-flex;align-items:center;gap:6px;font-family:'Courier New',monospace;font-size:11px;color:var(--muted);background:var(--card);border:1px solid var(--border);border-radius:20px;padding:5px 11px;margin-left:10px}
  .live-indicator .dot{width:7px;height:7px;border-radius:50%;background:var(--danger);box-shadow:0 0 8px var(--danger);animation:pulse-live 1.3s ease-in-out infinite}
  .sound-toggle{background:var(--card);border:1px solid var(--border);color:var(--muted);border-radius:20px;padding:6px 12px;font-size:12px;cursor:pointer;margin-left:8px;display:inline-flex;align-items:center;gap:6px}
  .sound-toggle.on{color:var(--accent2);border-color:var(--accent2)}
  .cmdk-trigger{background:var(--card);border:1px solid var(--border);color:var(--muted);border-radius:20px;padding:6px 12px;font-size:12px;cursor:pointer;margin-left:8px;display:inline-flex;align-items:center;gap:7px}
  .cmdk-trigger:hover{color:var(--text);border-color:var(--accent2)}
  .cmdk-trigger .cmdk-kbd{font-family:'Courier New',monospace;font-size:10px;background:var(--bg-alt);border:1px solid var(--border);border-radius:4px;padding:1px 5px;color:var(--muted)}
  /* Floating "torna su" button — hidden until the page is scrolled down a
     bit, then fades/slides in. Fixed in the bottom-right corner, above
     everything else, so it's reachable from anywhere on a long feed. */
  #backToTopBtn{position:fixed;right:20px;bottom:20px;z-index:40;width:44px;height:44px;border-radius:50%;background:var(--card);border:1px solid var(--border);color:var(--text);font-size:18px;line-height:1;cursor:pointer;box-shadow:0 8px 20px -6px #000a;display:flex;align-items:center;justify-content:center;opacity:0;transform:translateY(12px);pointer-events:none;transition:opacity .2s,transform .2s}
  #backToTopBtn.visible{opacity:1;transform:translateY(0);pointer-events:auto}
  #backToTopBtn:hover{color:var(--accent2);border-color:var(--accent2)}
  @media (max-width:760px){
    /* On mobile the search FAB (.mobile-search-fab) also sits fixed in this
       same corner (right:18px; bottom:18px; 52px tall), so without an offset
       here the two buttons draw on top of each other. Lifting this one above
       the FAB's height + a gap stacks them instead. */
    #backToTopBtn{right:24px;bottom:82px;width:40px;height:40px;font-size:16px}
  }
  @media (max-width:760px){
    .live-indicator{font-size:10px;padding:4px 9px;margin-left:6px}
    .sound-toggle{padding:5px 9px;margin-left:6px;font-size:11px}
    .cmdk-trigger{padding:5px 9px;margin-left:6px;font-size:11px}
    .cmdk-trigger .cmdk-kbd{display:none}
  }
  @media (max-width:420px){
    .live-indicator span.li-text{display:none}
  }

  /* ---------- Crude high-contrast treatment for ransomware/data leak ---------- */
  .card.card-critical{background:linear-gradient(160deg,#1a0808,#120404 60%);border-color:#3f0f0f}
  .card.card-critical:hover{border-color:#dc2626;background:linear-gradient(160deg,#210a0a,#170505 60%)}
  .card.card-critical h3{color:#fee2e2}
  .grid.compact .card.card-critical{background:#150606}

  /* ---------- Freshness pulse border (stands in for a real payment-deadline
     countdown, since that data isn't collected by any source) ---------- */
  @keyframes freshness-pulse{0%,100%{box-shadow:0 0 0 0 rgba(220,38,38,.55)}50%{box-shadow:0 0 0 5px rgba(220,38,38,0)}}
  .card.card-fresh{animation:freshness-pulse 1.4s ease-out infinite}
  @media (prefers-reduced-motion: reduce){.card.card-fresh{animation:none}}

  /* ---------- Monospace glow for technical values ---------- */
  .tech-glow{font-family:'Courier New',monospace;color:#67e8f9;text-shadow:0 0 6px rgba(34,211,238,.45);letter-spacing:.2px}

  /* ---------- Cinematic modal for critical events ---------- */
  .modal-bg.critical-modal{background:#000d}
  .modal.critical{max-width:820px;border-radius:6px;border-color:#7a1d1d;background:linear-gradient(180deg,#140505,#0d0303 220px,var(--card) 220px)}
  .modal.critical h2{font-size:26px;letter-spacing:-.3px}
  .modal.critical .card-thumb, .modal.critical .card-masthead, .modal.critical .card-thumb-wrap{border-radius:2px}
  @media (max-width:760px){
    .modal.critical{max-width:100%;width:100%;max-height:100vh;height:100%;border-radius:0;margin:-20px}
  }


/* ===== Interviste TA ===== */
nav.tabs .nav-new{font-family:'JetBrains Mono',ui-monospace,monospace;font-size:9px;font-weight:700;letter-spacing:.5px;color:#05070d;background:#a78bfa;padding:2px 6px;border-radius:8px;margin-left:6px;vertical-align:middle}
.iv{--iv-accent:#a78bfa;--iv-line:#1e2740;--iv-panel:#0f1524;--iv-soft:#a3aec4;display:flex;flex-direction:column;gap:26px;min-width:0}
:root[data-theme="light"] .iv{--iv-line:#d8dee8;--iv-panel:#ffffff;--iv-soft:#4a5468;--iv-accent:#6d4bd8}
.iv-hero{display:flex;flex-wrap:wrap;gap:22px;align-items:flex-end;justify-content:space-between}
.iv-hero-text{flex:1 1 420px;min-width:0}
.iv-kicker{display:inline-flex;align-items:center;gap:8px;font-size:12px;font-weight:700;letter-spacing:1.5px;text-transform:uppercase;color:var(--iv-accent)}
.iv-hero h2{margin:10px 0 0;font-size:clamp(24px,4.2vw,36px);line-height:1.15;letter-spacing:-.4px}
.iv-hero p{margin:12px 0 0;max-width:640px;font-size:15px;line-height:1.65;color:var(--iv-soft)}
.iv-stats{display:flex;gap:10px;flex-wrap:wrap}
.iv-stat{background:var(--iv-panel);border:1px solid var(--iv-line);border-radius:12px;padding:10px 16px;min-width:92px}
.iv-stat b{display:block;font-family:'JetBrains Mono',ui-monospace,monospace;font-size:19px}
.iv-stat span{font-size:12px;color:var(--muted)}
.iv-notice{display:flex;gap:12px;align-items:flex-start;background:rgba(251,146,60,.07);border:1px solid rgba(251,146,60,.3);border-radius:12px;padding:12px 16px}
.iv-notice p{margin:0;font-size:13px;line-height:1.6;color:var(--iv-soft)}
.iv-notice strong{color:var(--text)}
.iv-featured{border-radius:18px;padding:1px;background:linear-gradient(135deg,var(--iv-accent),#22d3ee 70%)}
.iv-featured-in{background:var(--bg-alt);border-radius:17px;padding:26px 28px;display:flex;flex-direction:column;gap:14px;min-width:0}
.iv-featured h3{margin:0;font-size:clamp(20px,3vw,26px);line-height:1.25}
.iv-pill{font-family:'JetBrains Mono',ui-monospace,monospace;font-size:10.5px;font-weight:700;letter-spacing:.6px;text-transform:uppercase;color:#05070d;background:var(--iv-accent);padding:4px 10px;border-radius:20px}
.iv-quote{margin:0;padding:2px 0 2px 16px;border-left:3px solid var(--iv-accent);font-size:15.5px;line-height:1.6;font-style:italic;overflow-wrap:anywhere}
.iv-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.iv-meta{font-size:12px;color:var(--muted);overflow-wrap:anywhere}
.iv-filters{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between}
.iv-chips{display:flex;flex-wrap:wrap;gap:8px}
.iv-chip{background:var(--iv-panel);border:1px solid var(--iv-line);color:var(--iv-soft);border-radius:20px;padding:6px 13px;font-size:12.5px;font-weight:600;cursor:pointer}
.iv-chip[aria-pressed="true"]{background:rgba(167,139,250,.16);border-color:var(--iv-accent);color:var(--text)}
.iv-chip small{opacity:.7;margin-left:4px}
.iv-tools{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.iv-tools input,.iv-tools select{background:var(--iv-panel);border:1px solid var(--iv-line);color:var(--text);border-radius:10px;height:38px;padding:0 12px;font-size:13px;font-family:inherit}
.iv-tools input{width:min(230px,100%)}
.iv-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(330px,100%),1fr));gap:16px}
.iv-card{background:var(--iv-panel);border:1px solid var(--iv-line);border-top:3px solid var(--tone,#8b93a7);border-radius:14px;padding:18px;display:flex;flex-direction:column;gap:12px;min-width:0}
.iv-who{display:flex;align-items:center;gap:11px;min-width:0}
.iv-who b{display:block;font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.iv-who span{font-size:12px;font-weight:600;color:var(--tone,#8b93a7)}
.iv-card h3{margin:0;font-size:16px;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.iv-card .iv-q{margin:0;font-size:13.5px;line-height:1.6;color:var(--iv-soft);font-style:italic;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.iv-badge{font-size:11px;font-weight:700;padding:3px 9px;border-radius:20px;border:1px solid}
.iv-badge.ok{color:#22c55e;border-color:rgba(34,197,94,.4);background:rgba(34,197,94,.08)}
.iv-badge.no{color:#fb923c;border-color:rgba(251,146,60,.4);background:rgba(251,146,60,.08)}
.iv-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:auto}
.iv-btn{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--iv-line);background:none;color:var(--text);font:inherit;font-size:13px;font-weight:600;padding:7px 13px;border-radius:9px;cursor:pointer;text-decoration:none}
.iv-btn.primary{background:linear-gradient(135deg,#8b5cf6,#22d3ee);border-color:transparent;color:#05070d;font-weight:700}
.iv-btn.quiet{border-color:transparent;color:var(--iv-soft);padding-left:4px;padding-right:4px}
.iv-empty{padding:36px 12px;text-align:center;color:var(--muted)}
.iv-modal-body{line-height:1.7;font-size:14.5px}
.iv-modal-body ul{padding-left:20px}
@media (max-width:640px){
  .iv-featured-in{padding:18px 16px}
  .iv-tools input,.iv-tools select{width:100%}
  .iv-tools label{flex:1 1 100%}
}


/* ===== Banner notizie negoziazioni (scorrimento lento) ===== */
.nt-wrap{background:var(--card);border:1px solid var(--border);border-radius:14px;margin-bottom:18px;overflow:hidden;min-width:0}
.nt-head{display:flex;flex-wrap:wrap;gap:4px 12px;justify-content:space-between;align-items:baseline;padding:11px 16px 8px;font-size:14px;font-weight:700}
.nt-head small{font-weight:400;font-size:11.5px;color:var(--muted)}
.nt-viewport{overflow:hidden;padding:2px 0 12px;-webkit-mask-image:linear-gradient(90deg,transparent,#000 4%,#000 96%,transparent);mask-image:linear-gradient(90deg,transparent,#000 4%,#000 96%,transparent)}
.nt-track{display:flex;width:max-content;animation:nt-scroll var(--nt-secs,100s) linear infinite;will-change:transform}
.nt-clone{display:flex}
.nt-viewport:hover .nt-track,.nt-viewport:focus-within .nt-track{animation-play-state:paused}
.nt-item{display:inline-flex;align-items:baseline;gap:8px;flex:none;padding:7px 28px 7px 0;font-size:13.5px;color:var(--text);text-decoration:none;white-space:nowrap}
.nt-item:hover .nt-title,.nt-item:focus-visible .nt-title{text-decoration:underline}
.nt-dot{width:6px;height:6px;border-radius:50%;background:var(--accent2);align-self:center;flex:none;margin-left:16px}
.nt-meta{font-size:12px;color:var(--muted)}
@keyframes nt-scroll{from{transform:translateX(0)}to{transform:translateX(-50%)}}
@media (prefers-reduced-motion:reduce){
  .nt-track{animation:none;flex-wrap:wrap;width:auto}
  .nt-clone{display:none}
  .nt-item{white-space:normal;padding-right:16px}
  .nt-viewport{-webkit-mask-image:none;mask-image:none}
}
