/* ============================================================
   NidInsieme — sezione pubblica · foglio di stile unico
   = design system condiviso (token app) + stili per-pagina.
   Drop-in: copiare in public/css/nidinsieme-public.css
   ============================================================ */

/* ============================================================================
   NidInsieme — sezione pubblica
   Design system derivato dal tema reale dell'app (Flutter AppColors light +
   AppTheme "iOS 26"). Token come CSS custom properties → mappabili 1:1 sul
   blocco @theme di Tailwind (vedi HANDOFF.md).
   ========================================================================== */

:root {
  /* — Brand / semantici (da app_colors.dart · AppColors.light) — */
  --brand: #673AB7;        /* viola istituzionale (deepPurple) */
  --brand-2: #8B5CF6;      /* viola chiaro (gradienti)         */
  --brand-ink: #5B34A6;    /* inchiostro brand alto contrasto  */
  --success: #388E3C;
  --warning: #F57C00;
  --danger: #D32F2F;
  --info: #1976D2;
  --neutral: #757575;

  /* — Tinte pastello bento ("Direzione C", caldo) — */
  --tint-brand: #EDE7F6;
  --tint-success: #E6F4EA;
  --tint-warning: #FFF3E0;
  --tint-danger: #FDECEA;
  --tint-info: #E3F0FB;
  --tint-neutral: #F0F0F3;
  --ink-brand: #5B34A6;
  --ink-success: #2E7D32;
  --ink-warning: #E65100;
  --ink-danger: #C62828;
  --ink-info: #1565C0;
  --ink-neutral: #5A5A5E;

  /* — Sfondi di sistema iOS + testo — */
  --sys-bg: #F2F2F7;       /* grouped background iOS  */
  --card: #FFFFFF;
  --ink: #1C1C1E;
  --ink-2: #3C3C43;        /* usato al 60% via color-mix */
  --hairline: rgba(60,60,67,0.12);

  /* — Raggi (da AppTheme: card 20, button 14, sheet 24) — */
  --r-sm: 12px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 24px;
  --r-2xl: 32px;

  /* — Ombre morbide — */
  --shadow-sm: 0 1px 2px rgba(28,28,30,0.05), 0 1px 3px rgba(28,28,30,0.04);
  --shadow-md: 0 6px 22px rgba(28,28,30,0.07), 0 2px 6px rgba(28,28,30,0.04);
  --shadow-lg: 0 18px 50px rgba(28,28,30,0.12), 0 6px 16px rgba(28,28,30,0.06);
  --shadow-brand: 0 12px 30px rgba(103,58,183,0.30);

  --wrap: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "SF Pro Text", system-ui, sans-serif;
}

/* ── Reset essenziale ─────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--sys-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
[data-icon] { display: inline-flex; }
[data-icon] svg { display: block; }
button { font-family: inherit; -webkit-tap-highlight-color: transparent; cursor: pointer; }
:focus-visible { outline: 2.5px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

/* ── Layout ───────────────────────────────────────────────────────────────── */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 22px; }
.section { padding-block: clamp(56px, 9vw, 110px); }
.muted { color: color-mix(in srgb, var(--ink-2) 62%, transparent); }
.center { text-align: center; }

/* Etichetta di sezione (eyebrow) */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--brand-ink);
  background: var(--tint-brand);
  padding: 7px 14px; border-radius: 999px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 999px; background: var(--brand); }

h1, h2 { letter-spacing: -0.025em; line-height: 1.05; font-weight: 800; text-wrap: balance; }
.h-display { font-size: clamp(38px, 6vw, 66px); }
.h-section { font-size: clamp(30px, 4.4vw, 46px); }
.lead { font-size: clamp(17px, 1.4vw, 21px); color: color-mix(in srgb, var(--ink-2) 68%, transparent); text-wrap: pretty; }

/* ── Header / footer ─────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--sys-bg) 72%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
}
.site-header .bar { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand-logo { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; font-size: 19px; letter-spacing: -0.02em; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px; flex: none;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: grid; place-items: center; color: #fff;
  box-shadow: var(--shadow-brand);
}
.nav { display: flex; align-items: center; gap: 6px; }
.nav-link { padding: 9px 14px; border-radius: 10px; font-size: 15px; font-weight: 600; color: color-mix(in srgb, var(--ink-2) 70%, transparent); transition: background .15s, color .15s; }
.nav-link:hover { background: rgba(60,60,67,0.06); color: var(--ink); }
.nav-sep { width: 1px; height: 24px; background: var(--hairline); margin-inline: 8px; }
.nav-toggle { display: none; }

.site-footer { background: #fff; border-top: 1px solid var(--hairline); padding-block: 56px 30px; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 34px; }
.foot-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: color-mix(in srgb, var(--ink-2) 55%, transparent); margin-bottom: 14px; }
.foot-col a { display: block; padding: 6px 0; font-size: 15px; color: color-mix(in srgb, var(--ink-2) 72%, transparent); }
.foot-col a:hover { color: var(--brand-ink); }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--hairline); font-size: 14px; color: color-mix(in srgb, var(--ink-2) 55%, transparent); flex-wrap: wrap; }

/* ── Bottoni ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-weight: 700; font-size: 15px; border: none; border-radius: var(--r-md);
  padding: 13px 20px; transition: transform .12s ease, box-shadow .2s, background .2s; white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn svg { width: 19px; height: 19px; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-brand); }
.btn-primary:hover { background: #5e34a8; }
.btn-ghost { background: var(--card); color: var(--ink); border: 1px solid var(--hairline); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { background: rgba(60,60,67,0.04); }
.btn-soft { background: var(--tint-brand); color: var(--brand-ink); }
.btn-soft:hover { background: #e4d9f7; }
.btn-lg { padding: 16px 26px; font-size: 16.5px; border-radius: var(--r-lg); }
.btn-block { width: 100%; }

/* ── Card / bento ─────────────────────────────────────────────────────────── */
.card { background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-xl); box-shadow: var(--shadow-md); }
.tile {
  border-radius: var(--r-xl); padding: 26px; border: 1px solid transparent;
  background: var(--tint-neutral); transition: transform .2s ease, box-shadow .2s;
}
.tile .ic {
  width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center;
  background: #fff; box-shadow: var(--shadow-sm); margin-bottom: 18px;
}
.tile .ic svg { width: 26px; height: 26px; }
.tile h3 { font-size: 19px; font-weight: 750; letter-spacing: -0.01em; margin-bottom: 7px; }
.tile p { font-size: 15px; color: color-mix(in srgb, var(--ink-2) 70%, transparent); text-wrap: pretty; }
.tile.lift:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

/* toni */
.t-brand   { background: var(--tint-brand);   color: var(--ink-brand);   }
.t-success { background: var(--tint-success); color: var(--ink-success); }
.t-warning { background: var(--tint-warning); color: var(--ink-warning); }
.t-info    { background: var(--tint-info);    color: var(--ink-info);    }
.t-danger  { background: var(--tint-danger);  color: var(--ink-danger);  }
.t-neutral { background: var(--tint-neutral); color: var(--ink-neutral); }
.t-brand h3,.t-success h3,.t-warning h3,.t-info h3,.t-danger h3,.t-neutral h3 { color: var(--ink); }
.t-brand .ic   { color: var(--brand);   }
.t-success .ic { color: var(--success); }
.t-warning .ic { color: var(--warning); }
.t-info .ic    { color: var(--info);    }
.t-danger .ic  { color: var(--danger);  }
.t-neutral .ic { color: var(--neutral); }

/* pill / badge */
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.pill svg { width: 15px; height: 15px; }

/* ── Phone frame (mockup app) ─────────────────────────────────────────────── */
.phone {
  position: relative; width: 280px; aspect-ratio: 280 / 580; flex: none;
  background: #1c1c1e; border-radius: 44px; padding: 11px;
  box-shadow: 0 30px 70px rgba(28,28,30,0.28), 0 8px 20px rgba(28,28,30,0.14), inset 0 0 0 2px rgba(255,255,255,0.07);
}
.phone .screen { position: relative; width: 100%; height: 100%; border-radius: 34px; overflow: hidden; background: var(--sys-bg); }
.phone .notch { position: absolute; top: 9px; left: 50%; transform: translateX(-50%); width: 96px; height: 26px; background: #1c1c1e; border-radius: 999px; z-index: 3; }
/* placeholder schermata: striato + label monospace (qui andranno gli screenshot reali) */
.shot {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px;
  background:
    repeating-linear-gradient(135deg, rgba(103,58,183,0.05) 0 11px, rgba(103,58,183,0.10) 11px 22px),
    var(--tint-brand);
  color: var(--brand-ink);
}
.shot .lbl { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; line-height: 1.5; }
.shot .lbl b { display: block; font-size: 13px; margin-bottom: 4px; }

/* ── Sfondo decorativo morbido (blob pastello, solo cerchi) ───────────────── */
.glow { position: absolute; border-radius: 999px; filter: blur(60px); opacity: 0.7; pointer-events: none; z-index: 0; }

/* ── Reveal on scroll ─────────────────────────────────────────────────────── */
/* Nota: animiamo SOLO il transform (mai l'opacità da 0). Così, anche dove le
   transition restano congelate (anteprime headless / cattura screenshot), il
   contenuto è sempre visibile — al massimo leggermente spostato. Nei browser
   reali scorre dolcemente verso l'alto. */
.reveal { transform: translateY(14px); transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.reveal.in { transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { transform: none; transition: none; } }

/* ── Form ─────────────────────────────────────────────────────────────────── */
.field { display: block; margin-bottom: 18px; }
.field > label { display: block; font-size: 14px; font-weight: 650; margin-bottom: 7px; }
.input, .textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink);
  background: #fff; border: 1px solid color-mix(in srgb, var(--ink-2) 22%, transparent);
  border-radius: var(--r-md); padding: 12px 14px; transition: border-color .15s, box-shadow .15s;
}
.input:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3.5px rgba(103,58,183,0.15); }
.input::placeholder { color: color-mix(in srgb, var(--ink-2) 42%, transparent); }
.hint { font-size: 13px; color: color-mix(in srgb, var(--ink-2) 60%, transparent); margin-top: 6px; }

/* ── FAQ ──────────────────────────────────────────────────────────────────── */
.faq { border: 1px solid var(--hairline); border-radius: var(--r-lg); background: #fff; overflow: hidden; box-shadow: var(--shadow-sm); }
.faq details { border-bottom: 1px solid var(--hairline); }
.faq details:last-child { border-bottom: none; }
.faq summary { list-style: none; cursor: pointer; padding: 22px 24px; font-weight: 700; font-size: 17px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chev { flex: none; width: 22px; height: 22px; transition: transform .25s; color: var(--brand); }
.faq details[open] summary .chev { transform: rotate(90deg); }
.faq .ans { padding: 0 24px 24px; color: color-mix(in srgb, var(--ink-2) 72%, transparent); font-size: 15.5px; max-width: 70ch; }

/* ── Toggle segmentato (mensile/annuale) ──────────────────────────────────── */
.seg { display: inline-flex; background: rgba(60,60,67,0.08); padding: 5px; border-radius: 999px; gap: 4px; }
.seg button {
  border: none; background: transparent; padding: 9px 20px; border-radius: 999px;
  font-weight: 700; font-size: 14.5px; color: color-mix(in srgb, var(--ink-2) 65%, transparent); transition: all .18s;
}
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.seg .save { color: var(--success); font-weight: 800; }

/* ── Tabella confronto piani ──────────────────────────────────────────────── */
.cmp { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--hairline); border-radius: var(--r-lg); overflow: hidden; }
.cmp th, .cmp td { padding: 15px 18px; text-align: left; font-size: 15px; border-bottom: 1px solid var(--hairline); }
.cmp thead th { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: color-mix(in srgb, var(--ink-2) 55%, transparent); background: var(--sys-bg); }
.cmp td.c { text-align: center; }
.cmp tr:last-child td { border-bottom: none; }
.cmp .yes { color: var(--success); }
.cmp .no { color: color-mix(in srgb, var(--ink-2) 32%, transparent); }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 26px; }
  .nav .nav-link.hide-sm, .nav .nav-sep { display: none; }
}
@media (max-width: 600px) {
  .foot-grid { grid-template-columns: 1fr; }
  .phone { width: 240px; }
}


/* ===== Pagina: index ===== */
/* — Hero — */
  .hero { position: relative; overflow: hidden; padding-top: clamp(40px, 6vw, 76px); padding-bottom: clamp(40px, 6vw, 70px); }
  .hero .wrap { position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
  .hero .glow-1 { width: 520px; height: 520px; background: var(--tint-brand); top: -160px; left: -120px; }
  .hero .glow-2 { width: 440px; height: 440px; background: var(--tint-warning); bottom: -200px; right: -120px; opacity: 0.55; }
  .hero h1 { margin-top: 20px; }
  .hero .lead { margin-top: 20px; max-width: 30ch; }
  .hero .cta-row { display: flex; gap: 13px; margin-top: 30px; flex-wrap: wrap; }
  .hero .trust { display: flex; align-items: center; gap: 18px; margin-top: 26px; font-size: 14px; color: color-mix(in srgb, var(--ink-2) 65%, transparent); flex-wrap: wrap; }
  .hero .trust .it { display: inline-flex; align-items: center; gap: 7px; }
  .hero .trust .it svg { width: 17px; height: 17px; color: var(--success); }

  /* cluster telefoni */
  .phones { position: relative; height: 600px; display: flex; align-items: center; justify-content: center; }
  .phones .phone { position: absolute; }
  .phones .p-back { transform: translate(82px, -18px) rotate(6deg) scale(0.92); z-index: 1; }
  .phones .p-front { transform: translate(-72px, 28px) rotate(-4deg); z-index: 2; }
  .float-card {
    position: absolute; z-index: 3; background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
    border: 1px solid var(--hairline); padding: 13px 16px; display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 14px;
  }
  .float-card .fc-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; }
  .float-card small { display: block; font-weight: 600; font-size: 12px; color: color-mix(in srgb, var(--ink-2) 60%, transparent); }
  .fc-1 { top: 40px; left: 6px; }
  .fc-2 { bottom: 56px; right: -4px; }

  /* — Feature bento — */
  .bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 48px; }
  .bento .span-2 { grid-column: span 2; }

  /* — Showcase alternato — */
  .showcase { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; margin-top: 64px; }
  .showcase.flip .copy { order: 2; }
  .showcase .feat-list { margin-top: 22px; display: grid; gap: 14px; }
  .showcase .feat-list .li { display: flex; gap: 13px; align-items: flex-start; }
  .showcase .feat-list .li .ck { width: 26px; height: 26px; border-radius: 8px; background: var(--tint-success); color: var(--success); display: grid; place-items: center; flex: none; margin-top: 1px; }
  .showcase .feat-list .li .ck svg { width: 16px; height: 16px; }
  .showcase .feat-list .li b { font-weight: 700; }
  .showcase .feat-list .li p { font-size: 14.5px; color: color-mix(in srgb, var(--ink-2) 68%, transparent); margin-top: 2px; }
  .showcase .stage { position: relative; display: flex; justify-content: center; }

  /* — Ruoli — */
  .roles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 46px; }

  /* — Banda cooperative — */
  .coop-band { position: relative; overflow: hidden; border-radius: var(--r-2xl); color: #fff;
    background: linear-gradient(135deg, #5e2fb0 0%, var(--brand) 46%, #7c4fd0 100%); padding: clamp(34px, 5vw, 60px); }
  .coop-band .glow-c { width: 380px; height: 380px; background: rgba(255,255,255,0.16); top: -140px; right: -80px; }
  .coop-band .wrap2 { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 0.9fr; gap: 44px; align-items: center; }
  .coop-band .mini { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .coop-band .mini .m { background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.18); border-radius: var(--r-lg); padding: 18px; backdrop-filter: blur(6px); }
  .coop-band .mini .m b { font-size: 28px; font-weight: 820; letter-spacing: -0.02em; }
  .coop-band .mini .m span { font-size: 13.5px; opacity: 0.86; }

  /* — Pricing teaser — */
  .price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 44px; align-items: stretch; }
  .price-card { background: #fff; border: 1px solid var(--hairline); border-radius: var(--r-xl); padding: 28px; box-shadow: var(--shadow-md); display: flex; flex-direction: column; }
  .price-card.pop { border: 2px solid var(--brand); box-shadow: var(--shadow-lg); position: relative; }
  .price-card .tag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff; font-size: 12px; font-weight: 800; padding: 5px 14px; border-radius: 999px; letter-spacing: 0.02em; }
  .price-card .nm { font-size: 18px; font-weight: 750; }
  .price-card .amt { margin-top: 14px; display: flex; align-items: baseline; gap: 4px; }
  .price-card .amt .cur { font-size: 22px; font-weight: 700; }
  .price-card .amt .val { font-size: 44px; font-weight: 840; letter-spacing: -0.03em; }
  .price-card .amt .per { font-size: 15px; color: color-mix(in srgb, var(--ink-2) 60%, transparent); }
  .price-card .inc { font-size: 14.5px; color: color-mix(in srgb, var(--ink-2) 70%, transparent); margin-top: 8px; }
  .price-card .btn { margin-top: 20px; }

  /* — CTA finale — */
  .cta-final { text-align: center; background: #fff; border: 1px solid var(--hairline); border-radius: var(--r-2xl); padding: clamp(40px, 6vw, 72px); box-shadow: var(--shadow-md); position: relative; overflow: hidden; }
  .cta-final .glow-f { width: 360px; height: 360px; background: var(--tint-brand); top: -160px; left: 50%; transform: translateX(-50%); }
  .cta-final > * { position: relative; z-index: 2; }

  @media (max-width: 940px) {
    .hero .wrap { grid-template-columns: 1fr; }
    .phones { height: 480px; margin-top: 10px; }
    .bento { grid-template-columns: 1fr 1fr; }
    .bento .span-2 { grid-column: span 2; }
    .showcase { grid-template-columns: 1fr; gap: 30px; }
    .showcase.flip .copy { order: 0; }
    .roles { grid-template-columns: 1fr 1fr; }
    .coop-band .wrap2 { grid-template-columns: 1fr; }
    .price-grid { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
  }
  @media (max-width: 560px) {
    .bento, .bento .span-2 { grid-template-columns: 1fr; grid-column: auto; }
    .roles { grid-template-columns: 1fr; }
  }

/* ===== Pagina: prezzi ===== */
.price-hero { position: relative; overflow: hidden; padding-top: clamp(40px, 6vw, 70px); padding-bottom: 30px; text-align: center; }
  .price-hero .glow-1 { width: 520px; height: 520px; background: var(--tint-brand); top: -200px; left: 50%; transform: translateX(-50%); }
  .price-hero .wrap { position: relative; z-index: 2; }
  .price-hero h1 { margin-top: 18px; }
  .price-hero .lead { margin-top: 14px; max-width: 52ch; margin-inline: auto; }
  .seg-row { margin-top: 30px; display: flex; justify-content: center; }

  .plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
  .plan { background: #fff; border: 1px solid var(--hairline); border-radius: var(--r-xl); padding: 30px; box-shadow: var(--shadow-md); display: flex; flex-direction: column; position: relative; }
  .plan.pop { border: 2px solid var(--brand); box-shadow: var(--shadow-lg); }
  .plan .tag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff; font-size: 12px; font-weight: 800; padding: 5px 14px; border-radius: 999px; }
  .plan .nm { font-size: 20px; font-weight: 780; }
  .plan .sub { font-size: 14px; color: color-mix(in srgb, var(--ink-2) 62%, transparent); margin-top: 4px; }
  .plan .amt { margin-top: 18px; display: flex; align-items: baseline; gap: 5px; }
  .plan .amt .cur { font-size: 24px; font-weight: 700; }
  .plan .amt .val { font-size: 50px; font-weight: 840; letter-spacing: -0.03em; line-height: 1; }
  .plan .amt .per { font-size: 15px; color: color-mix(in srgb, var(--ink-2) 60%, transparent); }
  .plan .over { font-size: 13.5px; color: color-mix(in srgb, var(--ink-2) 60%, transparent); margin-top: 8px; }
  .plan ul { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 11px; }
  .plan li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; }
  .plan li .ck { width: 20px; height: 20px; border-radius: 6px; background: var(--tint-success); color: var(--success); display: grid; place-items: center; flex: none; margin-top: 1px; }
  .plan li .ck svg { width: 13px; height: 13px; }
  .plan .btn { margin-top: 26px; }
  .vat { text-align: center; margin-top: 18px; font-size: 13.5px; color: color-mix(in srgb, var(--ink-2) 55%, transparent); }

  .coop-plans { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; }
  .coop-feature { background: linear-gradient(135deg, #5e2fb0, var(--brand) 55%, #7c4fd0); color: #fff; border-radius: var(--r-xl); padding: 34px; position: relative; overflow: hidden; }
  .coop-feature .glow-c { width: 320px; height: 320px; background: rgba(255,255,255,0.16); top: -120px; right: -80px; }
  .coop-feature > * { position: relative; z-index: 2; }
  .coop-feature ul { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 11px; }
  .coop-feature li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
  .coop-feature li .ck { width: 20px; height: 20px; border-radius: 6px; background: rgba(255,255,255,0.22); color: #fff; display: grid; place-items: center; flex: none; margin-top: 1px; }
  .coop-feature li .ck svg { width: 13px; height: 13px; }

  .cmp-wrap { overflow-x: auto; }
  .cmp .feat-name { font-weight: 650; }
  .cmp thead th.plan-col { text-align: center; color: var(--ink); font-size: 15px; text-transform: none; letter-spacing: 0; font-weight: 750; background: #fff; }
  .cmp thead th.plan-col.pop { color: var(--brand-ink); }

  @media (max-width: 940px) {
    .plans { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
    .coop-plans { grid-template-columns: 1fr; }
  }

/* ===== Pagina: registrazione ===== */
.reg { position: relative; overflow: hidden; padding-block: clamp(32px, 5vw, 56px) clamp(48px, 7vw, 90px); }
  .reg .glow-1 { width: 480px; height: 480px; background: var(--tint-brand); top: -220px; left: -120px; }
  .reg .wrap { position: relative; z-index: 2; }
  .reg-head { text-align: center; max-width: 640px; margin: 0 auto clamp(28px, 4vw, 44px); }
  .reg-head h1 { margin-top: 16px; }
  .reg-head .lead { margin-top: 12px; }

  .reg-grid { display: grid; grid-template-columns: 1.4fr 0.9fr; gap: 26px; align-items: start; }
  .reg-card { background: #fff; border: 1px solid var(--hairline); border-radius: var(--r-xl); box-shadow: var(--shadow-md); padding: clamp(22px, 3vw, 34px); }
  .seg-full { display: flex; background: rgba(60,60,67,0.08); padding: 5px; border-radius: var(--r-md); gap: 4px; margin-bottom: 26px; }
  .seg-full button { flex: 1; border: none; background: transparent; padding: 12px; border-radius: 11px; font-weight: 700; font-size: 15px; color: color-mix(in srgb, var(--ink-2) 65%, transparent); transition: all .18s; display: flex; align-items: center; justify-content: center; gap: 8px; }
  .seg-full button svg { width: 18px; height: 18px; }
  .seg-full button.on { background: #fff; color: var(--brand-ink); box-shadow: var(--shadow-sm); }
  .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  details.billing { border: 1px solid var(--hairline); border-radius: var(--r-md); padding: 16px 18px; margin-bottom: 18px; background: var(--sys-bg); }
  details.billing summary { list-style: none; cursor: pointer; font-weight: 650; font-size: 14.5px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  details.billing summary::-webkit-details-marker { display: none; }
  details.billing summary .chev { width: 18px; height: 18px; color: var(--brand); transition: transform .25s; flex: none; }
  details.billing[open] summary .chev { transform: rotate(90deg); }
  details.billing .body { margin-top: 16px; }
  .check-row { display: flex; gap: 11px; align-items: flex-start; font-size: 14.5px; color: color-mix(in srgb, var(--ink-2) 78%, transparent); margin-bottom: 20px; }
  .check-row input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--brand); flex: none; }

  /* riepilogo */
  .summary { position: sticky; top: 88px; display: grid; gap: 16px; }
  .sum-card { background: #fff; border: 1px solid var(--hairline); border-radius: var(--r-xl); box-shadow: var(--shadow-md); overflow: hidden; }
  .sum-card .top { background: linear-gradient(135deg, #5e2fb0, var(--brand) 60%, #7c4fd0); color: #fff; padding: 22px 24px; }
  .sum-card .top .nm { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.85; }
  .sum-card .top .pl { font-size: 26px; font-weight: 820; letter-spacing: -0.02em; margin-top: 2px; }
  .sum-card .top .pr { margin-top: 8px; font-size: 15px; opacity: 0.92; }
  .sum-card .rows { padding: 20px 24px; display: grid; gap: 12px; }
  .sum-card .row { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; }
  .sum-card .row .k { color: color-mix(in srgb, var(--ink-2) 62%, transparent); }
  .sum-card .row .v { font-weight: 650; }
  .sum-card .foot { border-top: 1px dashed var(--hairline); padding: 16px 24px; font-size: 13.5px; color: color-mix(in srgb, var(--ink-2) 60%, transparent); }
  .trust-card { background: var(--tint-brand); border-radius: var(--r-lg); padding: 20px 22px; }
  .trust-card .t-row { display: flex; gap: 11px; align-items: flex-start; margin-bottom: 13px; font-size: 14px; }
  .trust-card .t-row:last-child { margin-bottom: 0; }
  .trust-card .t-row .ic { width: 26px; height: 26px; border-radius: 8px; background: #fff; color: var(--brand); display: grid; place-items: center; flex: none; }
  .trust-card .t-row .ic svg { width: 16px; height: 16px; }
  .trust-card .t-row b { display: block; color: var(--ink); }
  .trust-card .t-row span { color: color-mix(in srgb, var(--ink-2) 65%, transparent); }

  @media (max-width: 940px) {
    .reg-grid { grid-template-columns: 1fr; }
    .summary { position: static; order: -1; }
  }
  @media (max-width: 520px) { .grid-2 { grid-template-columns: 1fr; } }

/* ===== Pagina: abbonamento ===== */
.portal { position: relative; overflow: hidden; min-height: 70vh; padding-block: clamp(36px, 6vw, 72px); display: flex; flex-direction: column; }
  .portal .glow-1 { width: 460px; height: 460px; background: var(--tint-brand); top: -200px; right: -120px; }
  .portal .wrap { position: relative; z-index: 2; flex: 1; }

  .preview-toggle { display: flex; justify-content: center; margin-bottom: 30px; }

  /* — LOGIN — */
  .login-card { max-width: 420px; margin: 0 auto; background: #fff; border: 1px solid var(--hairline); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); padding: 34px; }
  .login-card .mark { width: 56px; height: 56px; border-radius: 17px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); display: grid; place-items: center; color: #fff; box-shadow: var(--shadow-brand); margin: 0 auto 18px; }
  .login-card .mark svg { width: 30px; height: 30px; }
  .login-card h1 { font-size: 24px; text-align: center; }
  .login-card .sub { text-align: center; margin: 8px 0 26px; font-size: 15px; color: color-mix(in srgb, var(--ink-2) 65%, transparent); }
  .login-card .or { text-align: center; font-size: 13px; color: color-mix(in srgb, var(--ink-2) 50%, transparent); margin: 18px 0; position: relative; }
  .login-card .or::before, .login-card .or::after { content: ''; position: absolute; top: 50%; width: 38%; height: 1px; background: var(--hairline); }
  .login-card .or::before { left: 0; } .login-card .or::after { right: 0; }
  .login-card .help { text-align: center; font-size: 13.5px; margin-top: 20px; color: color-mix(in srgb, var(--ink-2) 60%, transparent); }

  /* — DASHBOARD — */
  .dash { max-width: 720px; margin: 0 auto; }
  .dash-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
  .dash-head .org { display: flex; align-items: center; gap: 13px; }
  .dash-head .org .av { width: 46px; height: 46px; border-radius: 13px; background: var(--tint-brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 800; font-size: 16px; }
  .dash-head .org b { font-size: 18px; }
  .dash-head .org span { font-size: 13.5px; color: color-mix(in srgb, var(--ink-2) 60%, transparent); }
  .logout { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: color-mix(in srgb, var(--ink-2) 65%, transparent); background: none; border: none; }
  .logout svg { width: 17px; height: 17px; }
  .logout:hover { color: var(--ink); }

  .status-banner { display: flex; align-items: center; gap: 14px; background: var(--tint-warning); border: 1px solid color-mix(in srgb, var(--warning) 20%, transparent); border-radius: var(--r-lg); padding: 16px 20px; margin-bottom: 16px; }
  .status-banner .ic { width: 40px; height: 40px; border-radius: 12px; background: #fff; color: var(--warning); display: grid; place-items: center; flex: none; }
  .status-banner .ic svg { width: 22px; height: 22px; }
  .status-banner b { display: block; }
  .status-banner span { font-size: 14px; color: color-mix(in srgb, var(--ink-2) 72%, transparent); }

  .sub-card { background: #fff; border: 1px solid var(--hairline); border-radius: var(--r-xl); box-shadow: var(--shadow-md); overflow: hidden; }
  .sub-card .head { padding: 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--hairline); }
  .sub-card .head .pl { font-size: 22px; font-weight: 800; }
  .sub-card .head .pl small { font-weight: 500; font-size: 15px; color: color-mix(in srgb, var(--ink-2) 60%, transparent); }
  .badge { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; font-size: 13px; font-weight: 700; }
  .badge svg { width: 14px; height: 14px; }
  .badge.trial { background: var(--tint-warning); color: var(--ink-warning); }
  .badge.active { background: var(--tint-success); color: var(--ink-success); }

  .dl { padding: 22px 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; }
  .dl .it .k { font-size: 13px; color: color-mix(in srgb, var(--ink-2) 58%, transparent); }
  .dl .it .v { font-size: 16px; font-weight: 650; margin-top: 3px; }
  .actions { padding: 0 24px 24px; display: flex; gap: 12px; flex-wrap: wrap; }

  .invoices { background: #fff; border: 1px solid var(--hairline); border-radius: var(--r-xl); box-shadow: var(--shadow-md); margin-top: 16px; overflow: hidden; }
  .invoices .ih { padding: 18px 24px; font-weight: 700; border-bottom: 1px solid var(--hairline); display: flex; align-items: center; justify-content: space-between; }
  .invoices .ih span { font-size: 13.5px; font-weight: 500; color: color-mix(in srgb, var(--ink-2) 55%, transparent); }
  .inv-row { padding: 15px 24px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--hairline); font-size: 14.5px; }
  .inv-row:last-child { border-bottom: none; }
  .inv-row .when { font-weight: 600; }
  .inv-row .meta { color: color-mix(in srgb, var(--ink-2) 58%, transparent); font-size: 13px; }
  .inv-row .amt { font-weight: 700; margin-left: auto; }
  .inv-row .dl-btn { display: inline-flex; align-items: center; gap: 6px; color: var(--brand-ink); font-weight: 600; font-size: 13.5px; background: none; border: none; }
  .inv-row .dl-btn svg { width: 16px; height: 16px; }

  .hidden { display: none !important; }

/* ===== Pagina: grazie ===== */
.thanks { position: relative; overflow: hidden; min-height: 78vh; display: flex; align-items: center; padding-block: clamp(40px, 7vw, 90px); }
  .thanks .glow-1 { width: 520px; height: 520px; background: var(--tint-success); top: -200px; left: 50%; transform: translateX(-50%); opacity: 0.5; }
  .thanks .glow-2 { width: 360px; height: 360px; background: var(--tint-brand); bottom: -160px; right: -80px; }
  .thanks .wrap { position: relative; z-index: 2; }
  .thanks-card { max-width: 620px; margin: 0 auto; background: #fff; border: 1px solid var(--hairline); border-radius: var(--r-2xl); box-shadow: var(--shadow-lg); padding: clamp(30px, 5vw, 52px); text-align: center; }
  .badge-ok { width: 76px; height: 76px; border-radius: 24px; background: var(--tint-success); color: var(--success); display: grid; place-items: center; margin: 0 auto 24px; }
  .badge-ok svg { width: 42px; height: 42px; }
  .thanks-card h1 { font-size: clamp(28px, 4vw, 40px); }
  .thanks-card .lead { margin: 14px auto 0; max-width: 42ch; }
  .thanks-card .email { display: inline-block; margin-top: 16px; background: var(--tint-brand); color: var(--brand-ink); font-weight: 700; padding: 8px 16px; border-radius: 999px; font-size: 14.5px; }

  .steps { text-align: left; margin: 32px 0; display: grid; gap: 14px; }
  .step { display: flex; gap: 16px; align-items: flex-start; background: var(--sys-bg); border-radius: var(--r-lg); padding: 18px 20px; }
  .step .n { width: 32px; height: 32px; border-radius: 10px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
  .step b { font-size: 16px; }
  .step p { font-size: 14.5px; color: color-mix(in srgb, var(--ink-2) 68%, transparent); margin-top: 3px; }

  .cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
