/* =========================================================
   Fix Italia — stile applicazione (mobile first)
   Breakpoint: 768px tablet · 1024px desktop
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--navy);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  padding-bottom: var(--tabbar-offset);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
a:hover { color: var(--red-text); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 10px 16px; background: var(--white); border-radius: var(--r-sm); }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: calc(var(--maxw) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }

.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.ic--sm { width: 16px; height: 16px; }
.ic--fill { fill: currentColor; stroke: none; }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.dot--g { background: var(--green); } .dot--r { background: var(--red); } .dot--a { background: var(--amber-dot); } .dot--n { background: var(--navy); }

/* ---------- Bottoni, badge, chip ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border: 1px solid transparent; border-radius: var(--pill);
  font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap;
  background: var(--navy); color: var(--white); transition: background .15s, border-color .15s;
}
.btn:hover { color: var(--white); background: var(--navy-800); }
.btn--red { background: var(--red); }
.btn--red:hover { background: var(--red-700); }
.btn--green { background: var(--green); }
.btn--green:hover { background: var(--green-700); }
.btn--ghost { background: var(--white); color: var(--navy); border-color: var(--navy); }
.btn--ghost:hover { background: var(--paper); color: var(--navy); }
.btn--line { background: transparent; color: var(--navy); border-color: var(--line-strong); }
.btn--line:hover { background: var(--white); color: var(--navy); }
.btn--line.is-following {
  background: var(--green-bg);
  border-color: var(--green);
  color: var(--green-700);
  font-weight: 700;
}
.btn--line.is-shared { border-color: var(--navy); background: #EEF3F8; }
.btn--dark-line { background: transparent; color: var(--white); border-color: var(--navy-600); }
.btn--dark-line:hover { background: var(--navy-800); }
.btn--lg { min-height: 54px; font-size: 16px; padding: 0 26px; }
.btn--block { width: 100%; }
.btn--icon { width: 44px; padding: 0; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--pill); font-size: 12px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; }
.badge--critica { background: var(--red-bg); color: var(--red-700); }
.badge--alta { background: var(--amber-bg); color: var(--amber-text); }
.badge--media { background: var(--blue-bg); color: var(--blue-text); }
.badge--bassa, .badge--ok { background: var(--green-bg); color: var(--green-700); }
.badge--solid-g { background: var(--green); color: var(--white); }
.badge--neutral { background: #E3E7EA; color: var(--text-2); }
.badge--outline { border: 1px solid var(--line-strong); color: var(--text-2); }

.status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; min-height: 40px; padding: 0 16px; border-radius: var(--pill);
  border: 1px solid var(--line-strong); background: var(--white); font-size: 14px; font-weight: 600;
}
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); }
.chip--static { display: inline-flex; align-items: center; min-height: 36px; }

.seg { display: flex; gap: 4px; padding: 4px; background: #E3E7EA; border-radius: var(--pill); }
.seg button { flex: 1; min-height: 38px; padding: 0 14px; border: 0; border-radius: var(--pill); background: transparent; font-size: 14px; font-weight: 600; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--white); color: var(--navy); box-shadow: 0 1px 2px rgba(0,0,0,.06); }

.kicker { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.kicker--g { color: var(--green); }
.h1 { font-size: clamp(40px, 7vw, 82px); font-weight: 800; line-height: .98; letter-spacing: -.035em; }
.h2 { font-size: clamp(28px, 3.6vw, 44px); font-weight: 800; line-height: 1.05; letter-spacing: -.03em; }
.h3 { font-size: clamp(22px, 2.4vw, 34px); font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.lead { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); }

/* ---------- Util bar + header ---------- */
.utilbar { display: none; background: var(--navy-900); color: #A9B6C2; font-size: 13px; }
.utilbar__in { display: flex; justify-content: space-between; align-items: center; height: 36px; }
.utilbar__links { display: flex; gap: 28px; }
.utilbar__links a { color: #E4EAF0; text-decoration: none; }
.tagline { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: .14em; }
.tagline .dot { width: 6px; height: 6px; }

.header { position: sticky; top: 0; z-index: 40; background: var(--navy); padding-top: var(--safe-top); border-bottom: 1px solid var(--navy-700); }
.header__in { display: flex; align-items: center; gap: 16px; height: var(--header-h); }
.header__logo { display: flex; align-items: center; margin-right: auto; min-width: 0; }
.header__logo .logo-full {
  display: block;
  height: 36px;
  width: auto;
  max-width: min(175px, 55vw);
}
.header__logo .logo-mark { display: none; }
.mainnav { display: none; }
.header__actions { display: flex; align-items: center; gap: 10px; }
.header__cta { display: none; }
.header__menu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--navy-600);
  border-radius: 12px;
  background: transparent;
  color: var(--white);
}
.header__menu .ic { width: 22px; height: 22px; }
.header__menu-close { display: none; }
.header__menu[aria-expanded="true"] .header__menu-open { display: none; }
.header__menu[aria-expanded="true"] .header__menu-close { display: block; }
html.is-app .header__menu { display: none; }
.auth-slot { display: inline-flex; align-items: center; }
.auth-login {
  border-color: var(--navy-600) !important;
  color: var(--white) !important;
  background: transparent !important;
  min-height: 40px;
  padding: 0 16px;
  font-weight: 700;
}
.auth-login:hover { border-color: var(--white) !important; color: var(--white) !important; }
.auth-menu { position: relative; }
.auth-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35);
  background: hsl(var(--av-h, 200) 42% 38%);
  color: #fff; font-weight: 800; font-size: 13px; letter-spacing: .02em;
  display: inline-grid; place-items: center; cursor: pointer; padding: 0;
}
.auth-avatar:hover, .auth-avatar[aria-expanded="true"] {
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255,255,255,.12);
}
.auth-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 50;
  min-width: 220px; padding: 14px;
  background: var(--white); color: var(--navy);
  border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,28,48,.18);
}
.auth-dropdown__name { margin: 0; font-weight: 800; font-size: 15px; line-height: 1.3; }
.auth-dropdown__mail { margin: 4px 0 12px; font-size: 13px; color: var(--muted); word-break: break-all; }
.auth-dropdown .btn { width: 100%; justify-content: center; margin-top: 4px; }

@media (min-width: 1024px) {
  .utilbar { display: block; }
  .header__logo { margin-right: 0; }
  .header__logo .logo-full { height: 46px; max-width: none; }
  .mainnav { display: flex; align-self: stretch; gap: 36px; margin-left: 40px; margin-right: auto; }
  .mainnav a { display: flex; align-items: center; color: var(--on-dark); text-decoration: none; font-weight: 600; font-size: 15px; border-bottom: 3px solid transparent; padding-top: 3px; }
  .mainnav a:hover { color: var(--white); }
  .mainnav a.is-active { color: var(--white); border-bottom-color: var(--red); }
  .header__cta { display: inline-flex; }
  .header__menu { display: none; }
}

.mt-banner { background: var(--amber-bg); color: var(--amber-text); font-size: 14px; }
.mt-banner[hidden] { display: none !important; }
.mt-banner .wrap { display: flex; gap: 12px; align-items: center; justify-content: space-between; min-height: 44px; }
.mt-banner button { border: 0; background: none; font-weight: 700; text-decoration: underline; color: inherit; }

/* ---------- Tab bar flottante (solo PWA / Capacitor) ---------- */
.tabbar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(var(--tabbar-float-gap) + var(--safe-bottom));
  z-index: 50;
  display: none;
  justify-content: space-around;
  align-items: center;
  height: var(--tabbar-h);
  padding: 0 6px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  backdrop-filter: blur(18px) saturate(1.35);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 10px 30px rgba(0, 28, 48, 0.16);
}
html.is-app .tabbar:not([hidden]) { display: flex; }
.tabbar[hidden] { display: none !important; }
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; min-width: 56px; min-height: 48px;
  font-size: 10px; font-weight: 600; color: var(--muted); text-decoration: none;
}
.tabbar a.is-active { color: var(--navy); }
.tabbar .ic { width: 22px; height: 22px; }
.tabbar__fab {
  width: 52px !important; min-width: 52px !important; height: 52px;
  margin-top: -18px; border-radius: 50%; justify-content: center;
  background: var(--red); color: var(--white) !important;
  box-shadow: 0 8px 20px rgba(235, 0, 23, 0.35);
  border: 3px solid rgba(255, 255, 255, 0.85);
}
.tabbar__fab .ic { width: 22px; height: 22px; stroke-width: 2.6; }
@media (min-width: 1024px) { html.is-app .tabbar { display: none !important; } }

/* ---------- Home mobile (senza hero pieno) ---------- */
.homemobile { display: none; background: var(--paper); border-bottom: 1px solid var(--line); }
.homemobile__in { display: flex; flex-direction: column; gap: 14px; padding-top: 16px; padding-bottom: 18px; }
.homemobile__kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.homemobile__title {
  margin: 0; font-size: 26px; line-height: 1.15; letter-spacing: -0.02em; color: var(--navy);
}
.homemobile__title em { font-style: normal; color: var(--red-text); }
.homemobile__title strong { font-weight: inherit; color: var(--green); }
.homemobile .search { margin: 0; }

@media (max-width: 767px) {
  .hero { display: none !important; }
  .homemobile { display: block; }
  /* testate pagina più compatte: niente “hero” su mobile */
  .pagehead__in { gap: 8px; padding-top: 16px; padding-bottom: 16px; }
  .pagehead .h1, .pagehead .h2 { font-size: clamp(22px, 6.5vw, 28px) !important; }
  .bughead__in { gap: 12px; padding-top: 16px; padding-bottom: 16px; }
  .bughead__h { font-size: clamp(22px, 6.8vw, 30px); }
  .bughead__lead { font-size: 15px; }
}

/* ---------- Drawer menu (browser mobile) ---------- */
.navdrawer {
  position: fixed; inset: 0; z-index: 60;
  display: flex; justify-content: flex-end;
}
.navdrawer[hidden] { display: none !important; }
.navdrawer__backdrop {
  position: absolute; inset: 0;
  border: 0; padding: 0; margin: 0;
  background: rgba(0, 28, 48, .45);
  cursor: pointer;
}
.navdrawer__panel {
  position: relative;
  display: flex; flex-direction: column; gap: 4px;
  width: min(320px, 88vw);
  height: 100%;
  padding: calc(var(--header-h) + var(--safe-top) + 16px) 20px 28px;
  background: var(--white);
  color: var(--navy);
  box-shadow: -12px 0 40px rgba(0, 28, 48, .2);
  overflow-y: auto;
}
.navdrawer__panel a {
  display: flex; align-items: center;
  min-height: 48px; padding: 0 14px;
  border-radius: 12px;
  font-weight: 700; font-size: 16px;
  text-decoration: none; color: var(--navy);
}
.navdrawer__panel a:hover,
.navdrawer__panel a.is-active { background: #F0F4F8; color: var(--navy); }
.navdrawer__cta {
  margin-top: 12px !important;
  justify-content: center !important;
  background: var(--red) !important;
  color: var(--white) !important;
}
.navdrawer__cta:hover { filter: brightness(1.05); color: var(--white) !important; }
html.is-app .navdrawer { display: none !important; }
@media (min-width: 1024px) { .navdrawer { display: none !important; } }

/* ---------- Footer ---------- */
.footer { display: none; background: var(--navy); color: var(--on-dark); }
.footer__in { display: flex; flex-direction: column; gap: 32px; padding-top: 56px; padding-bottom: 32px; }
.footer__brand { display: flex; flex-direction: column; gap: 16px; max-width: 420px; }
.footer__brand img { width: auto; height: 44px; align-self: flex-start; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding-top: 20px; border-top: 1px solid var(--navy-700); font-size: 13px; color: var(--on-dark-muted); }
.footer__legal { margin: 0; line-height: 1.45; }
.footer__platforms { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.footer__plat {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 30px; padding: 0 12px 0 10px;
  border: 1px solid var(--navy-600); border-radius: var(--pill);
  background: rgba(255,255,255,.04);
  color: #D5DEE7; font-size: 12px; font-weight: 600; letter-spacing: .02em;
}
.footer__plat svg { width: 14px; height: 14px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.footer__plat--ios svg, .footer__plat--android svg { fill: currentColor; stroke: none; }
.footer__plat--ios { color: #E8ECF0; border-color: rgba(232,236,240,.22); }
.footer__plat--android { color: #A8E6A1; border-color: rgba(168,230,161,.28); }
@media (min-width: 1024px) { .footer { display: block; } }

/* ---------- Home: hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--navy); color: var(--white); }
.hero__bgmark { position: absolute; right: -120px; top: -40px; width: 520px; opacity: .07; pointer-events: none; }
.hero__in { position: relative; display: grid; gap: 40px; padding-top: 40px; padding-bottom: 48px; }
.hero__main { display: flex; flex-direction: column; gap: 24px; }
.hero__pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; min-height: 32px; padding: 0 14px; border: 1px solid var(--navy-600); border-radius: var(--pill); font-size: 12px; font-weight: 600; letter-spacing: .06em; color: var(--on-dark); }
.hero .h1 em { font-style: normal; color: var(--red-bright); }
.hero .h1 strong { font-weight: inherit; color: var(--green-bright); }
.hero .lead { color: var(--on-dark); max-width: 600px; }
.search { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 0 6px 0 20px; background: var(--white); border-radius: var(--pill); max-width: 660px; }
.search input { flex: 1; min-width: 0; height: 48px; border: 0; outline: 0; background: transparent; font-size: 16px; color: var(--navy); }
.search .ic { color: var(--muted); }
.search .btn { min-height: 48px; }
.quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--on-dark-muted); }
.quick a { padding: 6px 12px; border-radius: var(--pill); background: var(--navy-800); color: #E4EAF0; text-decoration: none; }
.quick a:hover { background: var(--navy-700); color: var(--white); }

.featured { display: flex; flex-direction: column; gap: 20px; padding: 24px; background: var(--white); color: var(--navy); border-radius: var(--r-lg); text-decoration: none; box-shadow: 0 30px 60px rgba(0,10,20,.35); }
.featured:hover { color: var(--navy); }
.featured__top { display: flex; justify-content: space-between; align-items: center; }
.featured__title { font-size: 24px; font-weight: 800; line-height: 1.12; letter-spacing: -.02em; }
.chain { display: flex; flex-direction: column; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.chain__row { display: flex; gap: 14px; }
.chain__rail { display: flex; flex-direction: column; align-items: center; width: 14px; }
.chain__node { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.chain__line { width: 2px; height: 28px; background: var(--line); }
.chain__label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .1em; color: var(--muted); }
.chain__text { display: block; font-size: 15px; font-weight: 600; padding-bottom: 6px; }
.featured__cta { display: flex; justify-content: space-between; align-items: center; min-height: 48px; padding: 0 20px; border-radius: var(--pill); background: var(--paper); font-weight: 700; }

@media (min-width: 1024px) {
  .hero__in { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 64px; align-items: center; padding-top: 88px; padding-bottom: 96px; }
  .hero__bgmark { width: 760px; right: -150px; top: -60px; }
  .featured { padding: 32px; }
}

/* ---------- Stat band ---------- */
.stats { background: var(--white); border-bottom: 1px solid var(--line); }
.stats__in { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 22px 0; }
.stat:nth-child(odd) { padding-right: 16px; border-right: 1px solid var(--line); }
.stat:nth-child(even) { padding-left: 20px; }
.stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.stat__n { font-size: clamp(32px, 4vw, 44px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.stat__l { font-size: 14px; font-weight: 500; color: var(--muted); }
@media (min-width: 768px) {
  .stats__in { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stat, .stat:nth-child(odd), .stat:nth-child(even) { padding: 32px 32px; border-bottom: 0; border-right: 1px solid var(--line); }
  .stat:first-child { padding-left: 0; }
  .stat:last-child { border-right: 0; }
}

/* ---------- Sezioni generiche ---------- */
.section { padding: 48px 0; }
#registro { scroll-margin-top: calc(var(--header-h) + var(--safe-top) + 12px); }
.section--white { background: var(--white); border-top: 1px solid var(--line); }
.section--dark { background: var(--navy); color: var(--white); }
.section__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; }
.section__head > div { display: flex; flex-direction: column; gap: 8px; }
.section__link { font-weight: 700; font-size: 15px; }
.section--dark .section__link { color: var(--white); }
@media (min-width: 1024px) { .section { padding: 88px 0; } .section__head { margin-bottom: 32px; } }

/* ---------- Feed fix applicati ---------- */
.fixfeed { display: grid; gap: 16px; }
@media (min-width: 768px) { .fixfeed { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
.fixcard { display: flex; flex-direction: column; gap: 12px; padding: 22px; background: var(--navy-800); border: 1px solid var(--navy-700); border-radius: 16px; color: var(--white); text-decoration: none; }
.fixcard:hover { color: var(--white); border-color: var(--navy-600); }
.fixcard__top { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--g-patch); }
.fixcard__top span:last-child { color: var(--on-dark-muted); font-weight: 500; letter-spacing: 0; font-size: 13px; }
.fixcard__title { font-size: 19px; font-weight: 800; line-height: 1.2; }
.fixcard__atto { font-size: 14px; color: var(--on-dark); }
.fixcard__foot { display: flex; justify-content: space-between; gap: 8px; padding-top: 12px; border-top: 1px solid var(--navy-700); font-size: 13px; }
.fixcard__foot .mono { color: var(--on-dark-muted); }

/* ---------- Lista segnalazioni (tabella su desktop, card su mobile) ---------- */
.buglist { display: flex; flex-direction: column; gap: 12px; }
.buglist__head { display: none; }
.bugrow { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; padding: 18px; background: var(--white); border: 1px solid var(--line); border-radius: 18px; text-decoration: none; color: var(--navy); }
.bugrow:hover { color: var(--navy); border-color: var(--line-strong); }
.bugrow__id { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.bugrow__sev { justify-self: end; }
.bugrow__main { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 2px; }
.bugrow__title { font-size: 18px; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; }
.bugrow__area { font-size: 13px; color: var(--muted); }
.bugrow__exploit { display: none; font-size: 14px; color: var(--text-2); }
.bugrow__laws { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bugrow__status { justify-self: end; }

@media (min-width: 1024px) {
  .buglist { gap: 0; background: var(--white); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
  .buglist__head, .bugrow {
    display: grid; grid-template-columns: 150px minmax(0, 3fr) minmax(0, 2fr) minmax(0, 2fr) 110px 150px;
    column-gap: 24px; align-items: center; padding: 20px 28px; border-radius: 0; border: 0; border-bottom: 1px solid var(--line-soft);
  }
  .buglist__head { padding: 14px 28px; background: #F8F9F7; border-bottom-color: var(--line); font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--muted); }
  .bugrow:last-child { border-bottom: 0; }
  .bugrow:hover { background: #FAFBF9; }
  .bugrow__id { order: 1; }
  .bugrow__main { order: 2; grid-column: auto; }
  .bugrow__exploit { order: 3; display: block; }
  .bugrow__laws { order: 4; font-size: 14px; color: var(--text-2); }
  .bugrow__sev { order: 5; justify-self: start; }
  .bugrow__status { order: 6; justify-self: start; }
}

/* ---------- Metodo ---------- */
.steps { display: grid; gap: 14px; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }
.step { display: flex; flex-direction: column; gap: 10px; padding: 28px; background: var(--paper); border-radius: 16px; }
.step__n { font-size: 44px; font-weight: 900; letter-spacing: -.04em; line-height: 1; }
.step__t { font-size: 21px; font-weight: 800; }
.step p { color: var(--text-2); }
.step--dark { background: var(--navy); color: var(--white); }
.step--dark p { color: var(--on-dark); }

/* ---------- Scheda segnalazione ---------- */
.crumb { display: none; gap: 10px; align-items: center; min-height: 48px; font-size: 14px; color: var(--muted); }
.crumb a { text-decoration: none; }
@media (min-width: 1024px) { .crumb { display: flex; } }

.bughead { background: var(--white); border-bottom: 1px solid var(--line); }
.bughead__in { display: flex; flex-direction: column; gap: 18px; padding-top: 24px; padding-bottom: 24px; }
.bughead__badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bughead__title { display: flex; flex-direction: column; gap: 16px; }
.bughead__h { font-size: clamp(30px, 4.4vw, 60px); margin: 0; min-width: 0; }
.bughead__lead { width: 100%; max-width: none; margin: 0; color: var(--text-2); }
.bughead__meta { display: flex; flex-wrap: wrap; gap: 6px 28px; font-size: 14px; color: var(--muted); }
.bughead__meta b { color: var(--navy); font-weight: 600; }
.bughead__actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.bughead__actions-row { display: flex; gap: 10px; flex: 1; min-width: 0; }
.bughead__actions-row .btn { flex: 1; }
@media (min-width: 1024px) {
  .bughead__in { gap: 20px; padding-top: 48px; padding-bottom: 48px; }
  .bughead__title {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
    align-items: start;
    gap: 24px 40px;
  }
  .bughead__actions { flex-direction: column; width: 100%; }
  .bughead__actions-row { flex: 0 0 auto; }
}

.subnav { position: sticky; top: calc(var(--header-h) + var(--safe-top)); z-index: 30; background: var(--white); border-bottom: 1px solid var(--line); }
.subnav__in { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.subnav__in::-webkit-scrollbar { display: none; }
.subnav a { flex-shrink: 0; padding: 14px 12px 11px; border-bottom: 3px solid transparent; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; white-space: nowrap; }
.subnav a.is-active { color: var(--navy); border-bottom-color: var(--red); }

.buglayout { display: grid; gap: 48px; padding-top: 32px; padding-bottom: 64px; }
.buglayout__main { display: flex; flex-direction: column; gap: 56px; min-width: 0; }
.buglayout__side { display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 1024px) {
  .buglayout { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 32px; padding-top: 56px; padding-bottom: 96px; }
  .buglayout__side { position: sticky; top: calc(var(--header-h) + 72px); align-self: start; }
}
.bsec { display: flex; flex-direction: column; gap: 18px; scroll-margin-top: calc(var(--header-h) + 64px); }
.bsec__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.bsec__head > div { display: flex; flex-direction: column; gap: 8px; }

.rows { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.rows > * { border-bottom: 1px solid var(--line-soft); }
.rows > *:last-child { border-bottom: 0; }
.exploit { display: flex; gap: 18px; padding: 20px 22px; }
.exploit__code { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--red-text); padding-top: 2px; }
.exploit__t { font-size: 17px; font-weight: 700; }
.exploit__d { color: var(--text-2); font-size: 15px; }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 768px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
.tile { display: flex; flex-direction: column; gap: 6px; padding: 18px; }
.tile__t { font-weight: 700; }
.tile__d { font-size: 14px; color: var(--muted); }

.lawrow { display: grid; gap: 4px; padding: 18px 22px; font-size: 15px; }
.lawrow__ref { font-family: var(--mono); font-size: 14px; font-weight: 700; }
.lawrow__c { color: var(--text-2); }
.lawrow__v { color: var(--text-2); }
.lawrow__v::before { content: "↳ "; color: var(--red-text); }
@media (min-width: 768px) {
  .lawrow { grid-template-columns: 200px minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
  .lawrow__v::before { content: ""; }
}

.actors { display: grid; gap: 14px; }
@media (min-width: 768px) { .actors { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
.actor { display: flex; flex-direction: column; gap: 12px; padding: 24px; border-top: 3px solid var(--navy); }
.actor--g { border-top-color: var(--green); }
.actor__who { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.actor__t { font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.actor ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--text-2); }

.ente {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 14px 20px;
  align-items: stretch;
}
.ente__row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 6px 14px;
  align-items: center;
}
.ente__av {
  grid-row: span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
  color: var(--white);
  background: var(--navy);
  flex-shrink: 0;
  text-decoration: none;
}
a.ente__name { color: inherit; text-decoration: none; }
a.ente__name:hover { color: var(--navy); text-decoration: underline; }
.ente__profile {
  display: inline-block;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
}
.ente__profile:hover { text-decoration: underline; }
.ente__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ente__name { font-weight: 700; }
.ente__role { font-size: 13px; color: var(--muted); }
.ente__pcodes {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.ente__state {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-2);
}
.ente__detail {
  margin-top: 12px;
  padding: 14px 16px;
  background: #F4F6F8;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.ente__detail[hidden] { display: none !important; }
.ente-fix { display: flex; flex-direction: column; gap: 10px; }
.ente-fix__top { display: flex; align-items: center; gap: 10px; }
.ente-fix__status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.ente-fix__t { font-size: 16px; font-weight: 800; line-height: 1.3; }
.ente-fix__meta {
  display: grid;
  gap: 8px;
  margin: 0;
}
.ente-fix__meta > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px; font-size: 14px; }
.ente-fix__meta dt { margin: 0; color: var(--muted); font-weight: 600; }
.ente-fix__meta dd { margin: 0; }
.ente-fix__d { margin: 0; font-size: 14px; color: var(--text-2); line-height: 1.45; }
.ente-fix__actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (min-width: 768px) {
  .ente__row {
    grid-template-columns: 40px minmax(0, 1fr) auto auto;
    gap: 12px 16px;
  }
  .ente__av { grid-row: auto; }
  .ente__pcodes { grid-column: auto; justify-content: flex-end; }
  .ente__state { grid-column: auto; white-space: nowrap; }
}
.pcode { display: inline-flex; padding: 3px 9px; border-radius: var(--pill); background: var(--green-bg); color: var(--green-700); font-size: 12px; font-weight: 800; }
.pcode--neutral { background: #E3E7EA; color: var(--text-2); }
.pcode--solid { background: var(--green); color: var(--white); }
.pcode--btn {
  cursor: pointer; border: 0; font: inherit; line-height: inherit;
  transition: transform .12s ease, box-shadow .12s ease;
}
.pcode--btn:hover, .pcode--btn[aria-expanded="true"] {
  box-shadow: 0 0 0 2px var(--green-700);
  transform: translateY(-1px);
}

/* changelog */
.change { overflow: hidden; }
.change__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 20px; background: var(--green-bg); border-bottom: 1px solid var(--green-line); font-size: 14px; color: var(--text-2); }
.change__top > span:first-child { display: flex; align-items: center; gap: 10px; }
.change__state { font-size: 13px; font-weight: 800; letter-spacing: .06em; color: var(--green-700); }
.change__body { display: flex; flex-direction: column; gap: 20px; padding: 22px; }
.change__title { font-size: 21px; font-weight: 800; }
.atto { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
@media (min-width: 768px) { .atto { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.atto > div { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; background: var(--white); }
.atto small { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.atto span { font-weight: 600; font-size: 15px; }
.diff { border-radius: 10px; overflow: hidden; background: var(--navy-900); font-family: var(--mono); font-size: 13px; line-height: 22px; }
.diff__h { display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px; background: var(--navy); color: var(--on-dark-muted); font-size: 12px; }
.diff__b { display: flex; flex-direction: column; padding: 10px 0; overflow-x: auto; }
.diff__b span { padding: 0 16px; white-space: pre-wrap; }
.diff .hunk { color: var(--g-asset); }
.diff .del { background: rgba(255,77,94,.14); color: #FFB3BA; }
.diff .add { background: rgba(47,210,122,.14); color: #A8EFC6; }
.diff .n-del { color: var(--g-origin); } .diff .n-add { color: var(--g-patch); }
.change__links { display: flex; flex-wrap: wrap; gap: 10px; }
.verify { display: grid; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
@media (min-width: 768px) { .verify { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.verify__s { display: flex; gap: 10px; }
.verify__s b { display: block; font-size: 14px; }
.verify__s small { font-size: 13px; color: var(--muted); }
.vdot { width: 14px; height: 14px; margin-top: 3px; border-radius: 50%; flex-shrink: 0; }
.vdot--done { background: var(--green); }
.vdot--now { background: var(--navy); box-shadow: 0 0 0 4px #D6E0EC; }
.vdot--todo { border: 2px solid var(--line-strong); }
.pending { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 16px 20px; background: var(--white); border: 1px dashed var(--line-strong); border-radius: var(--r-md); }
.pending__txt { flex: 1; min-width: 200px; display: flex; flex-direction: column; }
.pending__txt small { color: var(--muted); font-size: 13px; }

/* sidebar */
.impact { display: flex; flex-direction: column; gap: 16px; padding: 24px; background: var(--navy); color: var(--on-dark); border-radius: var(--r-md); }
.impact__n { display: flex; align-items: baseline; gap: 8px; }
.impact__n b { font-size: 56px; line-height: 1; color: var(--white); font-weight: 800; }
.impact__rows { display: flex; flex-direction: column; gap: 8px; padding-top: 14px; border-top: 1px solid var(--navy-700); font-size: 14px; }
.impact__rows div { display: flex; justify-content: space-between; }
.side-card { display: flex; flex-direction: column; gap: 14px; padding: 24px; }
.side-card__t { font-size: 20px; font-weight: 800; }
.timeline { display: flex; flex-direction: column; gap: 16px; }
.timeline li { display: flex; gap: 12px; list-style: none; }
.timeline ul, ul.timeline { margin: 0; padding: 0; }
.minigraph { display: flex; align-items: center; padding: 18px 10px; background: var(--paper); border-radius: 10px; }
.minigraph i { width: 14px; height: 14px; border-radius: 50%; }
.minigraph span { flex: 1; height: 2px; background: var(--line-strong); }

/* ---------- Galleria media ---------- */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 768px) { .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
.gallery--feature > .mitem:first-child { grid-column: 1 / -1; }
.mitem { display: flex; flex-direction: column; gap: 8px; padding: 0; border: 0; background: none; text-align: left; color: var(--navy); }
.mthumb { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 11; width: 100%; border-radius: 12px; overflow: hidden; background: #CBD3DA; color: var(--muted); }
.mthumb img, .mthumb video { width: 100%; height: 100%; object-fit: cover; }
.mthumb--video { background: var(--navy); color: var(--white); }
.mthumb--pdf { flex-direction: column; gap: 6px; background: var(--white); border: 1px solid var(--line); color: var(--red-text); font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.mthumb .ic { width: 32px; height: 32px; stroke-width: 1.6; }
.play { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background: var(--red); color: var(--white); }
.play .ic { width: 20px; height: 20px; }
.mtag { position: absolute; left: 8px; top: 8px; padding: 2px 8px; border-radius: 8px; background: var(--white); color: var(--navy); font-size: 11px; font-weight: 700; }
.mdur { position: absolute; right: 8px; bottom: 8px; padding: 2px 8px; border-radius: 8px; background: rgba(0,0,0,.6); color: var(--white); font-size: 12px; font-weight: 600; }
.mver { position: absolute; right: 8px; top: 8px; display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--green); color: var(--white); }
.mver .ic { width: 13px; height: 13px; stroke-width: 3; }
.mitem__t { font-size: 15px; font-weight: 700; line-height: 1.25; }
.mitem__m { font-size: 13px; color: var(--muted); }
.upload { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; aspect-ratio: 16 / 11; padding: 16px; border: 2px dashed var(--line-strong); border-radius: 12px; background: transparent; text-align: center; }
.upload small { color: var(--muted); font-size: 13px; }

.lightbox { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; background: #000A12; color: var(--white); padding: var(--safe-top) 0 var(--safe-bottom); }
.lightbox[hidden] { display: none; }
.lightbox__bar { display: flex; align-items: center; gap: 4px; min-height: 60px; padding: 0 8px; }
.lightbox__count { flex: 1; text-align: center; font-family: var(--mono); font-size: 13px; color: #B7C6D3; }
.lightbox__bar button, .lightbox__nav { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--white); }
.lightbox__stage { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; background: #1B2A36; color: #6E8091; }
.lightbox__stage .mthumb { aspect-ratio: auto; height: 100%; border-radius: 0; background: transparent; }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.45); }
.lightbox__nav--prev { left: 10px; } .lightbox__nav--next { right: 10px; }
.lightbox__info { display: flex; flex-direction: column; gap: 8px; padding: 20px; max-width: 760px; width: 100%; margin: 0 auto; }
.lightbox__info h2 { font-size: 22px; font-weight: 800; }
.lightbox__info p { color: #B7C6D3; font-size: 14px; }
.nodelink { align-self: flex-start; padding: 6px 12px; border: 1px solid var(--g-node-line); border-radius: 8px; font-family: var(--mono); font-size: 12px; color: #B7C6D3; text-decoration: none; }
.nodelink b { color: var(--g-asset); }

/* ---------- Grafo ---------- */
.graphview { display: flex; flex-direction: column; background: var(--navy-900); color: var(--g-text); font-family: var(--mono); min-height: calc(100vh - var(--header-h) - var(--tabbar-offset)); }
@media (min-width: 1024px) { .graphview { min-height: calc(100vh - var(--header-h) - 36px); } }
.gbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px var(--gutter); background: var(--navy); border-bottom: 1px solid var(--navy-700); font-size: 13px; }
.gbar__path { color: var(--on-dark-muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1023px) { .gbar { flex-wrap: nowrap; } .gbar__tools { flex-shrink: 0; } }
.gbar__path b { color: var(--g-text); font-weight: 500; }
.gbar__tools { display: flex; gap: 8px; margin-left: auto; }
.gbtn { min-height: 36px; padding: 0 12px; border: 1px solid var(--g-node-line); border-radius: 6px; background: transparent; color: var(--g-text); font-family: var(--mono); font-size: 13px; }
.gbtn:hover { background: var(--g-node); }
.gfilters { display: flex; gap: 6px; padding: 10px var(--gutter); overflow-x: auto; scrollbar-width: none; font-size: 12px; }
.gfilters button { flex-shrink: 0; min-height: 34px; padding: 0 12px; border: 1px solid var(--g-node-line); border-radius: 6px; background: transparent; font-family: var(--mono); font-size: 12px; }
.gfilters button[aria-pressed="true"] { background: var(--g-text); color: var(--navy-900) !important; border-color: var(--g-text); font-weight: 700; }
.gbody { flex: 1; display: grid; min-height: 0; }
@media (min-width: 1024px) { .gbody { grid-template-columns: minmax(0, 1fr) 320px; } }

.gcanvas { position: relative; overflow: auto; background-color: var(--g-bg); background-image: radial-gradient(var(--g-dot) 1px, transparent 1px); background-size: 24px 24px; touch-action: pan-x pan-y; }
.gstage { position: relative; transform-origin: 0 0; }
.gband { position: absolute; border: 1px solid #1B3A52; border-radius: 10px; background: rgba(0,18,31,.55); }
.gband--patch { border-style: dashed; border-color: #1E6B45; background: rgba(4,44,28,.45); }
.gband__label { position: absolute; left: 16px; top: 12px; font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--on-dark-muted); }
.gband--patch .gband__label { color: var(--g-patch); }
.gedges { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.gedges .e { fill: none; stroke: var(--g-edge); stroke-width: 2; stroke-linecap: round; }
.gedges .e--hl { stroke: var(--g-origin); }
.gedges .e--patch { stroke: var(--g-patch); stroke-dasharray: 6 6; }
.gedges .e--applied { stroke: var(--g-patch); stroke-width: 3; stroke-dasharray: none; }
.gedges text { fill: var(--on-dark-muted); font-family: var(--mono); font-size: 12px; }
.gedges text.pt { fill: var(--g-patch); }

.gnode {
  position: absolute; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px;
  border: 1px solid var(--g-node-line); border-radius: 8px; background: var(--g-node); color: #8FA3B5;
  font-family: var(--mono); font-size: 11px; line-height: 16px; text-align: left; transition: box-shadow .15s, border-color .15s;
}
.gnode:hover { border-color: #3B6282; color: #8FA3B5; }
.gnode__k { font-weight: 700; }
.gnode__t { font-family: var(--font); font-size: 14px; line-height: 19px; font-weight: 700; color: var(--g-text); }
.gnode--origin .gnode__k { color: var(--g-origin); }
.gnode--exploit .gnode__k { color: var(--g-exploit); }
.gnode--asset .gnode__k { color: var(--g-asset); }
.gnode--impact .gnode__k { color: var(--g-impact); }
.gnode--patch { background: #062A1B; border-color: #1E6B45; color: #8FC4A6; }
.gnode--patch .gnode__k { color: var(--g-patch); }
.gnode--applied { background: #0F7A45; border: 2px solid var(--g-patch); color: #D4F5E2; }
.gnode--applied .gnode__k, .gnode--applied .gnode__t { color: var(--white); }
.gnode.is-sel { background: #2A1420; border: 2px solid #FF4D5E; box-shadow: 0 0 0 4px rgba(255,77,94,.2); }
.gnode.is-sel .gnode__t { color: var(--white); }
.gnode.is-dim { opacity: .28; }
.gnode .fixmark { color: var(--g-patch); }

/* grafo verticale (mobile) */
.gstack { display: flex; flex-direction: column; padding: 8px 16px 24px; }
.glayer__h { margin: 4px 0 6px; font-size: 10px; font-weight: 700; letter-spacing: .14em; color: var(--g-edge); }
.glayer__nodes { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; }
.gstack .gnode { position: static; }
.gstack .gnode__t { font-size: 12px; line-height: 15px; }
.gconn { display: flex; align-items: center; gap: 8px; height: 28px; padding-left: 50%; font-size: 10px; color: var(--on-dark-muted); }
.gconn::before { content: ""; width: 2px; height: 100%; margin-left: -1px; background: var(--g-edge); }

.inspector { display: flex; flex-direction: column; gap: 16px; padding: 22px; background: var(--navy); border-left: 1px solid var(--navy-700); font-size: 13px; line-height: 20px; }
.inspector__k { font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--g-edge); }
.inspector__t { font-family: var(--font); font-size: 24px; line-height: 28px; font-weight: 800; color: var(--white); }
.props { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; padding: 14px; background: var(--g-node); border-radius: 8px; font-size: 12px; }
.props dt { color: var(--on-dark-muted); } .props dd { margin: 0; }
.inspector__d { font-family: var(--font); font-size: 14px; line-height: 21px; color: var(--on-dark); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 3px 8px; border-radius: 5px; background: var(--g-node); border: 1px solid #1E6B45; color: var(--g-patch); font-size: 12px; }
.tag--law { border-color: var(--g-node-line); color: var(--g-asset); }
.inspector .btn { font-family: var(--font); }
.glegend { display: none; }
@media (min-width: 1024px) {
  .glegend { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 12px var(--gutter); border-top: 1px solid var(--navy-700); font-size: 12px; color: #B7C6D3; }
  .glegend span { display: flex; align-items: center; gap: 8px; }
  .glegend i { width: 10px; height: 10px; border-radius: 2px; }
}
.gstatus { display: none; }
@media (min-width: 1024px) { .gstatus { display: flex; flex-wrap: wrap; gap: 24px; padding: 7px var(--gutter); background: var(--red); color: var(--white); font-size: 12px; } .gstatus span:last-child { margin-left: auto; } }

/* bottom sheet su mobile */
@media (max-width: 1023px) {
  .inspector { position: fixed; left: 0; right: 0; bottom: var(--tabbar-offset); z-index: 45; max-height: 52vh; overflow-y: auto; border-left: 0; border-top: 1px solid var(--navy-700); border-radius: 20px 20px 0 0; box-shadow: 0 -12px 30px rgba(0,0,0,.4); transform: translateY(0); transition: transform .2s; }
  .inspector[data-open="false"] { transform: translateY(110%); }
  .inspector::before { content: ""; align-self: center; width: 40px; height: 4px; border-radius: 2px; background: var(--navy-600); }
}
.inspector__close { display: none; }
@media (max-width: 1023px) { .inspector__close { display: inline-flex; position: absolute; right: 12px; top: 12px; } }

/* ---------- Norme ---------- */
.lawlist { display: flex; flex-direction: column; gap: 10px; }
.lawitem { display: flex; align-items: center; gap: 14px; padding: 16px; text-decoration: none; }
.lawitem__n { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; flex-shrink: 0; border-radius: 12px; background: var(--navy); color: var(--white); font-weight: 800; font-size: 16px; }
.lawitem__txt { flex: 1; display: flex; flex-direction: column; }
.lawitem__txt b { font-size: 16px; }
.lawitem__txt small { font-size: 13px; color: var(--muted); }
.lawitem__c { font-family: var(--mono); font-size: 12px; color: var(--red-700); white-space: nowrap; }
@media (min-width: 768px) { .lawlist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } }

.pagehead { background: var(--navy); color: var(--white); }
.pagehead__in { display: flex; flex-direction: column; gap: 14px; padding-top: 28px; padding-bottom: 28px; }
.pagehead p { color: var(--on-dark); }
@media (min-width: 1024px) { .pagehead__in { padding-top: 64px; padding-bottom: 64px; } }

.progetto {
  max-width: 760px;
  padding: 32px 0 72px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: var(--text-2);
  line-height: 1.65;
}
.progetto__lead {
  margin: 0;
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.5;
  color: var(--navy);
  font-weight: 600;
}
.progetto h2 {
  margin: 28px 0 4px;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.25;
  color: var(--navy);
  letter-spacing: -.02em;
}
.progetto h3 {
  margin: 18px 0 2px;
  font-size: 18px;
  color: var(--navy);
}
.progetto p, .progetto ul { margin: 0; }
.progetto ul {
  padding-left: 1.2em;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.progetto a { color: var(--navy); font-weight: 600; }
.progetto a:hover { color: var(--red-text); }
.progetto__flow {
  margin: 8px 0 4px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #F0F4F8;
  border: 1px solid var(--line);
  color: var(--navy);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .01em;
  line-height: 1.45;
}
.progetto__flow--wrap { word-break: break-word; }
.progetto__close {
  margin-top: 8px;
  color: var(--navy);
  font-size: 18px;
  line-height: 1.45;
}
.progetto__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

/* ---------- Aiutaci ---------- */
@keyframes aiutaci-holo {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
.nav-aiutaci {
  position: relative;
  font-weight: 800 !important;
  letter-spacing: .02em;
  background-image: linear-gradient(
    115deg,
    #006B3F 0%,
    #008C45 14%,
    #1FB463 28%,
    #C8F5D8 40%,
    #FFFFFF 46%,
    #FFE566 52%,
    #FFFFFF 58%,
    #7ED9A0 68%,
    #008C45 84%,
    #006B3F 100%
  );
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  animation: aiutaci-holo 4.5s linear infinite;
  text-shadow: none;
}
.mainnav a.nav-aiutaci {
  border-bottom-color: transparent !important;
}
.mainnav a.nav-aiutaci::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 2px;
  background-image: linear-gradient(90deg, #006B3F, #1FB463, #C8F5D8, #FFE566, #1FB463, #006B3F);
  background-size: 200% 100%;
  animation: aiutaci-holo 4.5s linear infinite;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: center;
  transition: opacity .18s ease, transform .18s ease;
}
.mainnav a.nav-aiutaci.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}
.navdrawer__panel a.nav-aiutaci {
  border-radius: 12px;
}
.navdrawer__panel a.nav-aiutaci:hover,
.navdrawer__panel a.nav-aiutaci.is-active {
  background: linear-gradient(90deg, #E2F3EA, #F5FFF8) !important;
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .nav-aiutaci {
    color: #1FB463 !important;
    background: none;
    animation: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .nav-aiutaci,
  .mainnav a.nav-aiutaci::after,
  .aiutaci__hero-title,
  .aiutaci__btn {
    animation: none !important;
    background-position: 40% 50% !important;
  }
}

.aiutaci {
  max-width: 760px;
  padding: 32px 0 72px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: var(--text-2);
  line-height: 1.65;
}
.aiutaci__hero-title {
  color: transparent !important;
  background-image: linear-gradient(
    115deg,
    #006B3F 0%,
    #1FB463 22%,
    #C8F5D8 38%,
    #FFFFFF 48%,
    #FFE566 55%,
    #FFFFFF 62%,
    #7ED9A0 75%,
    #008C45 100%
  );
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: aiutaci-holo 5s linear infinite;
  filter: drop-shadow(0 0 18px rgba(31, 180, 99, .35));
}
.aiutaci__hero-lead {
  color: var(--on-dark);
  max-width: 720px;
}
.aiutaci__lead {
  margin: 0;
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.5;
  color: var(--navy);
  font-weight: 600;
}
.aiutaci h2 {
  margin: 28px 0 4px;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.25;
  color: var(--navy);
  letter-spacing: -.02em;
}
.aiutaci h3 {
  margin: 18px 0 2px;
  font-size: 18px;
  color: var(--navy);
}
.aiutaci p, .aiutaci ul, .aiutaci ol { margin: 0; }
.aiutaci ul, .aiutaci ol {
  padding-left: 1.2em;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.aiutaci a { color: var(--navy); font-weight: 600; }
.aiutaci a:hover { color: var(--green-700); }
.aiutaci__roles { list-style: none; padding-left: 0; gap: 8px; }
.aiutaci__roles li {
  padding: 10px 14px;
  border-radius: 12px;
  background: #F0F7F3;
  border: 1px solid var(--green-line);
}
.aiutaci__method,
.aiutaci__network {
  margin: 8px 0 4px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #E2F3EA;
  border: 1px solid var(--green-line);
  color: var(--green-700);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .01em;
  line-height: 1.45;
}
.aiutaci__quote {
  margin: 8px 0;
  padding: 16px 18px;
  border-left: 4px solid var(--green);
  background: #F5FBF7;
  border-radius: 0 12px 12px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--navy);
}
.aiutaci__steps { gap: 8px; }
.aiutaci__join {
  margin-top: 20px;
  padding: 28px 24px;
  border-radius: 16px;
  background: linear-gradient(160deg, #E2F3EA 0%, #F7FBF9 55%, #fff 100%);
  border: 1px solid var(--green-line);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.aiutaci__join h2 { margin-top: 0; }
.aiutaci__close {
  color: var(--navy);
  font-size: 18px;
  line-height: 1.45;
}
.aiutaci__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.aiutaci__btn {
  position: relative;
  overflow: hidden;
  background: linear-gradient(115deg, #006B3F, #008C45 30%, #1FB463 50%, #008C45 70%, #006B3F);
  background-size: 200% 100%;
  color: #fff !important;
  border: 0;
  animation: aiutaci-holo 3.5s linear infinite;
  box-shadow: 0 8px 24px rgba(0, 115, 62, .28);
}
.aiutaci__btn:hover {
  filter: brightness(1.06);
  color: #fff !important;
}

/* ---------- Form segnalazione ---------- */
.formwrap { max-width: 720px; margin: 0 auto; padding: 24px var(--gutter) 48px; }
.progress { display: flex; gap: 6px; margin: 8px 0 24px; }
.progress span { flex: 1; height: 5px; border-radius: 3px; background: #E3E7EA; }
.progress span.is-on { background: var(--navy); }
.form { display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field legend { font-size: 14px; font-weight: 700; }
.field label small, .field legend small { font-weight: 500; color: var(--muted); }
.input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--white); font-size: 16px;
}
.field textarea { padding: 12px 14px; min-height: 110px; resize: vertical; }
.input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--navy); box-shadow: 0 0 0 3px #D6E0EC; }
fieldset.field { margin: 0; padding: 0; border: 0; }
.chipset { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.withicon { position: relative; }
.withicon .input { padding-right: 52px; }
.withicon button { position: absolute; right: 4px; top: 3px; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 16px; border: 2px dashed var(--line-strong); border-radius: 14px; text-align: center; background: var(--white); }
.dropzone.is-over { border-color: var(--navy); background: #F0F4F8; }
.dropzone__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.previews { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.preview { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #E3E7EA; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--muted); padding: 6px; text-align: center; word-break: break-all; }
.preview img, .preview video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.preview button { position: absolute; right: 4px; top: 4px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(0,0,0,.6); color: var(--white); display: flex; align-items: center; justify-content: center; }
.taginput { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; min-height: 50px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--white); }
.taginput input { flex: 1; min-width: 140px; border: 0; outline: 0; font-size: 16px; }
.enttag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: var(--pill); background: var(--navy); color: var(--white); font-size: 13px; font-weight: 700; }
.enttag button { width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(255,255,255,.2); color: var(--white); line-height: 1; }
.formnav { position: sticky; bottom: var(--tabbar-offset); display: flex; gap: 10px; margin-top: 28px; padding: 12px 0; background: var(--paper); }
@media (min-width: 1024px) { .formnav { bottom: 0; } }
.review { display: flex; flex-direction: column; gap: 10px; padding: 18px; }
.review div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; font-size: 14px; }
.review dt { color: var(--muted); } .review dd { margin: 0; font-weight: 600; }
.success { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 48px 0; text-align: center; }
.success__ic { display: flex; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: 50%; background: var(--green); color: var(--white); }
.success__ic .ic { width: 36px; height: 36px; stroke-width: 3; }

/* ---------- Onboarding ---------- */
.onb { position: relative; overflow: hidden; min-height: calc(100vh - var(--header-h) - var(--tabbar-offset)); background: var(--navy); color: var(--white); }
.onb__in { position: relative; display: flex; flex-direction: column; gap: 32px; max-width: 560px; padding-top: 40px; padding-bottom: 40px; }
.onb__bg { position: absolute; right: -170px; bottom: 60px; width: 460px; opacity: .06; }
.onb__f { width: 80px; height: 80px; }
.onb .h1 { font-size: clamp(38px, 9vw, 64px); }
.onb .h1 em { font-style: normal; color: var(--red-bright); }
.onb .h1 strong { font-weight: inherit; color: var(--green-bright); }
.onb p { color: var(--on-dark); font-size: 17px; }
.onb__steps { display: flex; flex-direction: column; gap: 16px; }
.onb__step { display: flex; align-items: center; gap: 14px; }
.onb__step i { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: var(--navy-800); font-style: normal; font-weight: 800; }
.onb__step b { display: block; }
.onb__step small { color: var(--on-dark-muted); font-size: 14px; }
.onb__cta { display: flex; flex-direction: column; gap: 12px; }

/* ---------- Modal auth / proponi fix ---------- */
.fi-modal { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 20px; }
.fi-modal__backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .55); }
.fi-modal__panel {
  position: relative; z-index: 1; width: min(520px, 100%); max-height: min(90vh, 720px);
  overflow: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .25);
}
.fi-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 0; }
.fi-modal__head h2 { margin: 0; font-size: 22px; font-weight: 800; }
.fi-modal__body { padding: 16px 20px 22px; }
.fi-modal__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.fi-modal__err { margin: 0; color: var(--red); font-size: 14px; font-weight: 600; }
.fi-modal .field > span { font-size: 14px; font-weight: 700; }
.fi-modal textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  font: inherit; min-height: 120px; resize: vertical; background: var(--white);
}
.fi-modal textarea:focus { outline: 0; border-color: var(--navy); box-shadow: 0 0 0 3px #D6E0EC; }
.linkish {
  appearance: none; border: 0; background: none; padding: 0; color: var(--navy);
  font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer;
}

/* ---------- Profilo ente ---------- */
.enteprof { background: var(--navy); color: var(--white); padding: 28px 0 32px; }
.enteprof__in { display: flex; flex-direction: column; gap: 22px; }
.enteprof__head { display: flex; gap: 16px; align-items: center; }
.enteprof__av {
  display: flex; align-items: center; justify-content: center;
  width: 72px; height: 72px; border-radius: 50%;
  font-size: 22px; font-weight: 900; color: #fff; flex-shrink: 0;
}
.enteprof__id .kicker { color: var(--on-dark-muted); }
.enteprof__id .h2 { color: #fff; }
.enteprof__stats {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
}
@media (min-width: 700px) {
  .enteprof__stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .enteprof__stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.enteprof__stats > div {
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.08);
}
.enteprof__stats b { font-size: 28px; font-weight: 900; line-height: 1; }
.enteprof__stats span { font-size: 13px; color: var(--on-dark-muted); }
.ente-reqs { display: flex; flex-direction: column; gap: 14px; }
.ente-req { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.ente-req__h { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: flex-start; }
.ente-req__t { margin: 4px 0 8px; font-size: 18px; font-weight: 800; }
.ente-req__t a { color: inherit; text-decoration: none; }
.ente-req__t a:hover { color: var(--navy); }
.ente-req__meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ente-req__state {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: #FFF6E5; color: var(--text);
  white-space: nowrap;
}
.ente-req__state.is-replied { background: var(--green-bg); color: var(--green-700); }
.ente-req__state.is-partial { background: #E8EEF5; color: var(--navy); }
.ente-req__state.is-waiting { background: #F4F1EA; color: #8A6A2F; }
.ente-req__role { margin: 0; font-size: 14px; color: var(--text-2); }
.ente-req__fixes-k { display: block; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.ente-req__fixes ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ente-req__fixes li {
  display: grid; grid-template-columns: auto 1fr auto; gap: 10px 12px; align-items: start;
  padding: 10px 12px; border-radius: 10px; background: #F4F6F8; border: 1px solid var(--line);
}
.ente-req__fixes li b { display: block; }
.ente-req__fixes li small { display: block; margin-top: 2px; }
.ente-req__fixd { display: block; margin-top: 4px; font-size: 13px; color: var(--text-2); }
.ente-req__f { display: flex; gap: 8px; }

/* ---------- Varie ---------- */
.empty { padding: 32px; text-align: center; color: var(--muted); }
.fade-in { animation: fade .18s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
