/* ============================================================
   IAC DIGITAL — Design System & Stylesheet
   Futuristic, interactive corporate site
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
  /* Palette */
  --bg: #05060c;
  --bg-2: #080b16;
  --bg-3: #0b1022;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #eaf0ff;
  --text-muted: #96a1c0;
  --text-dim: #737f9e; /* was #5f6b8a: 3.81:1 on --bg, under 4.5 */

  /* sober tech palette: cyan → blue (violet retired: too loud for a broad,
     often senior business audience) */
  --cyan: #22e0ff;
  --blue: #3b82f6;
  --violet: #5b7cf6;
  --magenta: #3b82f6;

  --grad: linear-gradient(120deg, #22e0ff 0%, #3b82f6 60%, #4f6ef0 100%);
  /* --grad is for TEXT and decoration and is remapped per theme. Anything that
     is FILLED with the gradient and then carries text/icons uses --grad-fill +
     --on-fill instead: it stays bright in both themes and takes near-black ink,
     which measures >= 4.65:1 on every stop. White on the cyan stop was 1.59:1. */
  --grad-fill: linear-gradient(120deg, #22e0ff 0%, #3b82f6 60%, #4f6ef0 100%);
  --on-fill: #05060c;
  --grad-soft: linear-gradient(120deg, rgba(34,224,255,.15), rgba(79,110,240,.15));
  --glow-cyan: 0 0 40px rgba(34, 224, 255, .35);
  --glow-violet: 0 0 40px rgba(91, 124, 246, .35);

  /* Type */
  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  /* Layout */
  --maxw: 1200px;
  --radius: 18px;
  --radius-lg: 26px;
  --nav-h: 76px;

  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* tell the UA which scheme we are in, so it paints the native bits (scrollbars,
   form controls, the caret) to match instead of defaulting to light */
:root { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }
/* and give the placeholder an explicit colour: left to the UA it was painted
   with the light scheme's grey on our dark inputs */
::placeholder { color: var(--text-dim); opacity: 1; }

/* ---------- Skip link ----------
   11 tab stops (logo, 5 nav links, 2 language buttons, theme toggle, CTA) stood
   between the keyboard and the content on every single page. */
.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: 10001;
  padding: 12px 18px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--cyan);
  color: var(--text); font-family: var(--font-display); font-weight: 600; font-size: .9rem;
  transform: translateY(-160%);
  transition: transform .25s var(--ease);
}
.skip-link:focus { transform: none; outline: 2px solid var(--cyan); outline-offset: 2px; }
main:focus { outline: none; }
/* chi arriva da un link a una sezione (/servizi#ai) non la trova sotto l'intestazione fissa */
[id] { scroll-margin-top: calc(var(--nav-h) + 18px); }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* l'attributo hidden del browser vale meno di qualunque classe con un
   display: .btn e' inline-flex, quindi un <button hidden class="btn"> si
   vedeva lo stesso. Qui hidden torna a significare nascosto. */
[hidden] { display: none !important; }

/* ---------- Text selection ----------
   Site-wide: nothing is selectable. It reads more "app" than "web page", and a
   drag on the hero canvas or on any card never paints a stray blue highlight.
   Re-enabled ONLY where a visitor genuinely copies something — the three islands
   the owner chose plus every form field (you must be able to select what you
   type, or a `user-select: none` ancestor makes the textareas uncopyable):
     · contact details (email / phone / VAT / address)
     · the AI tool results and the editable document box (home + tools page)
     · inputs, textareas and selects everywhere */
body {
  -webkit-user-select: none;
  user-select: none;
}
.contact-info-card,
.tool-out, .tool-fields, .fn-recap, .fn-pre,
input, textarea, select {
  -webkit-user-select: text;
  user-select: text;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* hard kill for horizontal page scroll: clip forbids scrolling on the
     axis without creating a scroll container (body overflow-x is the
     fallback for older engines) */
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  /* hidden only where clip is unknown: "hidden" makes body a scroll
     container that never scrolls, and every position: sticky inside
     (curriculum preview, its phone bar) stops sticking */
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }

/* ---------- Ambient background ---------- */
.bg-fx {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}
.bg-fx::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(600px 480px at 12% 8%, rgba(34,224,255,.14), transparent 60%),
    radial-gradient(680px 520px at 88% 18%, rgba(91,124,246,.14), transparent 60%),
    radial-gradient(700px 600px at 50% 100%, rgba(59,130,246,.12), transparent 60%);
}
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(72px, 10vw, 130px) 0; position: relative; }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.08; letter-spacing: -.02em; }
.display { font-size: clamp(2.2rem, 6.5vw, 5rem); font-weight: 800; }
.h-sec { font-size: clamp(2rem, 4.4vw, 3.2rem); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.28rem); color: var(--text-muted); max-width: 62ch; }
.muted { color: var(--text-muted); }
.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--cyan);
  padding: 7px 15px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--surface);
  backdrop-filter: blur(8px);
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.section-head { max-width: 720px; margin: 0 auto clamp(44px, 6vw, 70px); }
.section-head.center { text-align: center; }
.section-head .lead { margin: 18px auto 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .96rem;
  padding: 14px 26px;
  border-radius: 100px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s;
  white-space: nowrap;
  position: relative;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  color: var(--on-fill);
  background: var(--grad-fill);
  background-size: 160% 160%;
  box-shadow: 0 10px 30px -8px rgba(109, 139, 255, .6);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 18px 44px -10px rgba(109,139,255,.75); background-position: 100% 0; }
.btn-ghost {
  color: var(--text);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { transform: translateY(-3px); border-color: var(--cyan); box-shadow: var(--glow-cyan); }
.btn .arrow { transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  transition: background .4s, border-color .4s, backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(5, 6, 12, .72);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--border);
}
.nav {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
/* Il marchio e' un'immagine sola: dentro c'e' gia' scritto "IAC DIGITAL",
   ripeterlo accanto era una ridondanza. picture non e' un box: display block,
   o l'immagine eredita la riga di testo e si porta dietro qualche pixel sotto. */
.brand { display: flex; align-items: center; }
.brand picture { display: block; line-height: 0; }
.logo-nav { display: block; width: auto; height: 44px; }
.logo-footer { display: block; width: auto; height: 52px; }
@media (max-width: 480px) { .logo-nav { height: 38px; } }

.nav-links { display: flex; align-items: center; gap: 4px; position: relative; }
.nav-links a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: .95rem;
  color: var(--text-muted);
  padding: 9px 11px;   /* 15px non faceva stare 6 voci: vedi il commento sul breakpoint */
  border-radius: 10px;
  white-space: nowrap; /* un'etichetta futura deve traboccare visibilmente, non spezzarsi in due righe */
  transition: color .25s, background .25s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: ""; display: block; height: 2px; margin-top: 5px; border-radius: 2px;
  background: var(--grad);
}
.nav-cta { display: flex; align-items: center; gap: 14px; }

.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.nav-toggle span { display: block; width: 20px; height: 2px; margin: 4px auto; background: var(--text); border-radius: 2px; transition: transform .3s, opacity .3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding-top: calc(var(--nav-h) + clamp(40px, 8vw, 90px)); padding-bottom: clamp(60px, 9vw, 120px); overflow: hidden; }
#hero-canvas { position: absolute; inset: 0; z-index: -1; opacity: .9; }
.hero-inner { max-width: 980px; }
.hero-text { min-width: 0; }
.hero h1 { margin: 22px 0 24px; }
.hero .lead { font-size: clamp(1.1rem, 1.8vw, 1.4rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 40px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 48px; color: var(--text-dim); font-size: .9rem; font-family: var(--font-display); }
.hero-badges span { display: inline-flex; align-items: center; gap: 8px; }
.hero-badges span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }

/* ---------- Marquee ---------- */
.marquee { border-block: 1px solid var(--border); background: var(--bg-2); overflow: hidden; padding: 20px 0; --gap: 3rem; }
.marquee-track { display: flex; gap: var(--gap); width: max-content; animation: scroll-x 32s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--text-dim); display: inline-flex; align-items: center; gap: var(--gap); white-space: nowrap; }
.marquee-track span::after { content: "◆"; color: var(--violet); font-size: .7rem; }
@keyframes scroll-x { to { transform: translateX(calc(-50% - var(--gap) / 2)); } }

/* ---------- Cards / grid ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  position: relative;
  padding: 30px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform .4s var(--ease), border-color .4s, background .4s;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .4s;
}
.card:hover { transform: translateY(-6px); background: var(--surface-2); }
.card:hover::before { opacity: 1; }

/* interactive glow follows cursor */
.card.glow::after {
  content: "";
  position: absolute;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(34,224,255,.16), transparent 65%);
  border-radius: 50%;
  left: var(--mx, 50%); top: var(--my, 50%);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity .35s;
  pointer-events: none;
}
.card.glow:hover::after { opacity: 1; }

.card .icon {
  width: 54px; height: 54px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  margin-bottom: 20px;
  color: var(--cyan);
}
.card .icon svg { width: 26px; height: 26px; }
.card h3 { font-size: 1.28rem; margin-bottom: 10px; }
.card p { color: var(--text-muted); font-size: .98rem; }
.card .tag { position: absolute; top: 22px; right: 22px; font-family: var(--font-display); font-size: .7rem; letter-spacing: .12em; color: var(--text-dim); text-transform: uppercase; }

/* feature list inside cards */
.feat-list { margin-top: 16px; display: grid; gap: 9px; }
.feat-list li { display: flex; gap: 10px; align-items: flex-start; font-size: .93rem; color: var(--text-muted); }
.feat-list li::before { content: ""; margin-top: 8px; width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--grad); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { text-align: center; padding: 28px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.stat .num { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.2rem, 4vw, 3.1rem); line-height: 1; }
.stat .label { margin-top: 10px; color: var(--text-muted); font-size: .92rem; }

/* ---------- Split / showcase ---------- */
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(36px, 5vw, 72px); align-items: center; }
.split > * { min-width: 0; } /* prevent grid blowout on narrow screens */
.split.reverse { direction: rtl; }
.split.reverse > * { direction: ltr; }

/* Platform mock dashboard */
.mock {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: linear-gradient(160deg, rgba(18,24,45,.9), rgba(9,12,24,.9));
  padding: 18px;
  box-shadow: 0 40px 90px -40px rgba(0,0,0,.8), var(--glow-violet);
  position: relative;
  overflow: hidden;
}
.mock::before { content: ""; position: absolute; inset: 0; background: var(--grad-soft); opacity: .4; }
.mock-bar { display: flex; gap: 7px; margin-bottom: 16px; position: relative; }
.mock-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--border-strong); }
.mock-bar i:first-child { background: #ff5f57; }
.mock-bar i:nth-child(2) { background: #febc2e; }
.mock-bar i:nth-child(3) { background: #28c840; }
.mock-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; position: relative; }
.mock-tile { border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--border); padding: 16px; min-width: 0; }
.mock-tile .k { font-size: .72rem; color: var(--text-dim); font-family: var(--font-display); letter-spacing: .08em; text-transform: uppercase; }
.mock-tile .v { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.1rem, 4.5vw, 1.5rem); margin-top: 6px; }
.mock-tile.wide { grid-column: span 3; }
.mock-chart { display: flex; align-items: flex-end; gap: 8px; height: 90px; margin-top: 8px; }
.mock-chart i { flex: 1; border-radius: 5px 5px 0 0; background: var(--grad); opacity: .85; animation: growBar 1.4s var(--ease) both; }
@keyframes growBar { from { height: 0; opacity: 0; } }

.trace-line { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--border); position: relative; }
.trace-line:first-of-type { border-top: none; }
.trace-line .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); flex: none; }
.trace-line .t { font-size: .82rem; color: var(--text-dim); font-family: var(--font-display); margin-left: auto; }

/* ---------- Steps / process ---------- */
.steps { display: grid; gap: 20px; grid-template-columns: repeat(4, 1fr); counter-reset: step; }
.step { padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); position: relative; }
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--font-display); font-weight: 800; font-size: 1.4rem;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.step h4 { margin: 12px 0 8px; font-size: 1.15rem; }
.step p { color: var(--text-muted); font-size: .93rem; }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  border-radius: var(--radius-lg);
  padding: clamp(44px, 6vw, 80px);
  text-align: center;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: linear-gradient(150deg, rgba(34,224,255,.1), rgba(91,124,246,.11));
}
.cta-band::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(600px 300px at 50% -20%, rgba(34,224,255,.25), transparent 70%);
}
.cta-band > * { position: relative; }
.cta-band h2 { margin-bottom: 16px; }
.cta-band .lead { margin: 0 auto 30px; }
.cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-2); padding: 70px 0 34px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; gap: 36px; }
.footer-grid h5 { font-family: var(--font-display); font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 18px; }
.footer-grid a { display: block; color: var(--text-muted); padding: 6px 0; font-size: .95rem; transition: color .2s; }
.footer-grid a:hover { color: var(--cyan); }
.footer-brand p { color: var(--text-muted); margin-top: 16px; max-width: 34ch; font-size: .95rem; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 54px; padding-top: 26px; border-top: 1px solid var(--border); color: var(--text-dim); font-size: .88rem; }
.social { display: flex; gap: 12px; }
.social a, .social .social-soon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; border: 1px solid var(--border); color: var(--text-muted); transition: all .25s; }
.social a:hover { color: var(--cyan); border-color: var(--cyan); transform: translateY(-3px); box-shadow: var(--glow-cyan); }
/* the accounts do not exist yet: show the icon, but never a link to nowhere */
.social .social-soon { opacity: .4; cursor: default; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding-top: calc(var(--nav-h) + 80px); padding-bottom: 40px; position: relative; }
.page-hero .lead { margin-top: 20px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.field { margin-bottom: 18px; }
.field label { display: block; font-family: var(--font-display); font-size: .85rem; margin-bottom: 8px; color: var(--text-muted); }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: .98rem;
  transition: border-color .25s, box-shadow .25s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34,224,255,.12); }
.field textarea { resize: vertical; min-height: 130px; }
/* JS replaces the native select with .sel below. This is the no-JS fallback:
   the OS draws the option popup on its own white background, so the options
   must carry their own colours or dark mode renders white-on-white. */
.field select option { background: var(--surface); color: var(--text); }

/* ---------- Custom listbox (our own dropdown, styled like the rest) ---------- */
.sel { position: relative; }
.sel-btn {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-family: inherit; font-size: .98rem; text-align: left;
  transition: border-color .25s, box-shadow .25s;
}
.sel-btn:hover { border-color: var(--border-strong); }
.sel-btn:focus-visible,
.sel.open .sel-btn { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 224, 255, .12); }
.sel-val { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel-caret {
  flex: none; width: 9px; height: 9px;
  border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted);
  transform: translateY(-2px) rotate(45deg);
  transition: transform .3s var(--ease), border-color .25s;
}
.sel.open .sel-caret { transform: translateY(1px) rotate(-135deg); border-color: var(--cyan); }
.sel-list {
  position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 8px);
  max-height: 264px; overflow-y: auto;
  list-style: none; margin: 0; padding: 6px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  box-shadow: 0 26px 54px -22px rgba(0, 0, 0, .7);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .22s var(--ease), transform .22s var(--ease), visibility 0s .22s;
  outline: none;
}
.sel.open .sel-list {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .22s var(--ease), transform .22s var(--ease);
}
html[data-theme="light"] .sel-list { box-shadow: 0 26px 54px -24px rgba(30, 40, 80, .3); }
.sel-opt {
  padding: 11px 12px; border-radius: 9px;
  font-size: .92rem; line-height: 1.4; color: var(--text-muted);
  cursor: pointer;
  transition: background .18s, color .18s;
}
.sel-opt:hover, .sel-opt.active { background: var(--surface); color: var(--text); }
.sel-opt.on { color: var(--text); font-weight: 600; }
.sel-opt.on::after { content: "✓"; float: right; margin-left: 10px; color: var(--cyan); font-weight: 700; }
.form-note { font-size: .85rem; color: var(--text-dim); margin-top: 10px; }
.contact-info-card { padding: 32px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.contact-info-card .row { display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid var(--border); }
.contact-info-card .row:first-of-type { border-top: none; }
.contact-info-card .row .ic { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 11px; background: var(--grad-soft); color: var(--cyan); }
.contact-info-card .row b { font-family: var(--font-display); }
.contact-info-card .row a, .contact-info-card .row span { color: var(--text-muted); font-size: .95rem; }
/* the email and phone links are the page's primary conversion actions: they
   were 19px tall inline anchors — too small to tap reliably */
.contact-info-card .row a {
  display: inline-block;
  min-height: 44px; padding: 11px 0;
  line-height: 22px;
}
.contact-info-card .row a:hover { color: var(--text); }

.form-success { padding: 16px 18px; border-radius: 12px; background: rgba(40,200,100,.1); border: 1px solid rgba(40,200,100,.4); color: #7ff0a8; font-size: .95rem; margin-top: 16px; display: none; }
.form-success.show { display: block; }

/* ---------- Accordion (FAQ) ---------- */
.acc { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.acc-item + .acc-item { border-top: 1px solid var(--border); }
.acc-q { width: 100%; text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 26px; font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; }
.acc-q .plus { flex: none; width: 24px; height: 24px; position: relative; transition: transform .3s; }
.acc-q .plus::before, .acc-q .plus::after { content: ""; position: absolute; inset: 0; margin: auto; background: var(--cyan); }
.acc-q .plus::before { width: 14px; height: 2px; }
.acc-q .plus::after { width: 2px; height: 14px; transition: transform .3s; }
.acc-item.open .plus::after { transform: rotate(90deg); }
/* `visibility: hidden` (not display:none) takes the collapsed answer out of the
   accessibility tree — max-height alone leaves every answer readable by a
   screen reader as if the FAQ were fully expanded — while still allowing the
   max-height transition to run. The 0s delay defers it until the collapse ends. */
.acc-a {
  max-height: 0; overflow: hidden;
  visibility: hidden;
  transition: max-height .35s var(--ease), visibility 0s .35s;
}
.acc-item.open .acc-a { visibility: visible; transition: max-height .35s var(--ease), visibility 0s 0s; }
.acc-a p { padding: 0 26px 24px; color: var(--text-muted); }

/* ---------- Value / icon rows ---------- */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.value { padding: 28px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.value .ic { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--grad-soft); color: var(--cyan); margin-bottom: 16px; }
.value h4 { font-size: 1.15rem; margin-bottom: 8px; }
.value p { color: var(--text-muted); font-size: .95rem; }

/* ---------- Custom cursor ---------- */
.cursor-glow {
  position: fixed; top: 0; left: 0;
  width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid rgba(34,224,255,.6);
  transform: translate(-50%, -50%);
  pointer-events: none; z-index: 9999;
  transition: width .25s, height .25s, background .25s, border-color .25s;
  mix-blend-mode: screen;
}
.cursor-dot {
  position: fixed; top: 0; left: 0;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--cyan);
  transform: translate(-50%, -50%);
  pointer-events: none; z-index: 9999;
}
.cursor-glow.hovering { width: 52px; height: 52px; background: rgba(34,224,255,.08); border-color: var(--violet); }

/* La freccia di sistema sparisce: al suo posto restano il nostro anello e il
   punto da 6px, che e' preciso al pixel esattamente come la punta della freccia.
   La classe la mette main.js al PRIMO movimento del mouse, e solo quando il
   cursore nostro esiste davvero (computer, mouse vero, nessuna richiesta di
   ridurre le animazioni): senza quella garanzia resteremmo con un puntatore
   invisibile e nient'altro.
   I 721px non sono un capriccio: sotto quella soglia anello e punto sono
   display:none (media query piu' in basso), quindi qui la freccia deve restare.
   Serve !important su tutto: ogni pulsante porta con se' "cursor: pointer" e
   ogni campo di testo "cursor: text", e vincerebbero loro.
   (La lineetta che lampeggia mentre scrivi non e' il puntatore: quella resta.) */
@media (min-width: 721px) {
  html.cursore-proprio,
  html.cursore-proprio * { cursor: none !important; }
}

/* ---------- Scroll reveal (blur-in, futuristic) ---------- */
[data-reveal] { opacity: 0; transform: translateY(34px) scale(.985); filter: blur(8px); transition: opacity .7s var(--ease), transform .7s var(--ease), filter .7s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; filter: none; }
[data-reveal-delay="1"] { transition-delay: .08s; }
[data-reveal-delay="2"] { transition-delay: .16s; }
[data-reveal-delay="3"] { transition-delay: .24s; }
[data-reveal-delay="4"] { transition-delay: .32s; }

/* scroll progress bar */
.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 200; background: var(--grad); box-shadow: 0 0 12px rgba(34,224,255,.6); }
/* col menu a tutto schermo aperto non c'e' niente da misurare, e questa riga
   sta sopra al menu (z 200): lasciarla li' voleva dire vederla sobbalzare */
body.menu-open .scroll-progress { opacity: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .split { grid-template-columns: 1fr; }
  .split.reverse { direction: ltr; }
  .contact-grid { grid-template-columns: 1fr; }
}
/* 1200, measured — not guessed. With the real Sora metrics the desktop row
   (brand 153 + 6 links 582 + lang/theme/CTA 339) needs ~1074px, while the
   available width is min(vw,1200) - 48 container padding - 48 of flex gaps.
   That is satisfied only from ~1170px up, so the burger takes over at 1200.
   Too low a breakpoint does not merely cramp the CTA: html has overflow-x:
   clip, so the CTA is CUT AWAY — invisible and unclickable.
   Keep in sync with isMobileNav/mq in main.js and the snap floor. */
@media (max-width: 1200px) {
  .nav-cta .btn { display: none; }
  .nav-cta { position: relative; z-index: 2; }
  /* il pannello ora e' opaco: senza questo il marchio ci finirebbe sotto e
     a menu aperto sparirebbe */
  .brand { position: relative; z-index: 2; }
  .nav-toggle { display: block; }
  .nav-pill { display: none; }

  /* backdrop-filter would turn the fixed header into a containing block
     for the fixed .nav-links panel (clipping it to 76px) — use a solid
     background on mobile instead */
  .site-header.scrolled {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(5, 6, 12, .92);
  }

  /* Menu a tutto schermo.
     PRIMA: sfondo semitrasparente con backdrop-filter blur(24) e apertura
     animata in clip-path. Sul telefono era insostenibile: a ogni fotogramma
     il browser doveva rifare la sfocatura dell'INTERA pagina sottostante —
     canvas delle particelle compreso, che continua a disegnare — e per di piu'
     mentre ricalcolava una maschera clip-path a tutto schermo. Risultato:
     apertura a scatti e sfarfallii.
     ORA: fondo opaco (tanto copre tutto: la sfocatura non si vedeva comunque)
     e apertura in opacita' + scala, che la scheda grafica fa da sola senza
     ridisegnare nulla. */
  .nav-links {
    position: fixed; inset: 0;
    flex-direction: column; align-items: flex-start; justify-content: center; justify-content: safe center; gap: 2px;
    overflow-y: auto;
    overscroll-behavior: contain; /* arrivato in fondo, non trascina la pagina sotto */
    padding: calc(var(--nav-h) + 10px) 34px 40px;
    background:
      radial-gradient(500px 400px at 85% 10%, rgba(91,124,246,.16), transparent 60%),
      radial-gradient(500px 500px at 15% 90%, rgba(34,224,255,.13), transparent 60%),
      #05060c;
    /* SOLO opacita'. Niente scala, niente clip-path: qualunque trasformazione
       geometrica costringe il browser a ridisegnare da capo, a ogni fotogramma,
       un pannello grande quanto lo schermo con due sfumature e sei scritte
       grandi. Su un telefono non ce la fa e si vede uno sfarfallio — che poi e'
       l'animazione che perde fotogrammi. L'opacita', da sola, non ridisegna
       niente: il pannello e' gia' pronto e la scheda grafica lo sfuma. */
    opacity: 0; visibility: hidden;
    transition: opacity .2s linear, visibility 0s .2s;
    pointer-events: none;
    counter-reset: navItem;
  }
  /* "pronto": il pannello e' gia' disegnato ma ancora trasparente. Lo mette
     main.js al primo tocco sul pulsante, cosi' l'apertura non deve aspettare
     che il browser dipinga fondo, sfumature e sei voci grandi. */
  .nav-links.pronto { visibility: visible; }
  .nav-links.open {
    opacity: 1; visibility: visible; pointer-events: auto;
    transition: opacity .2s linear, visibility 0s;
  }
  .nav-links a {
    font-size: clamp(2rem, 9vw, 2.7rem);
    font-weight: 700; padding: 12px 0; width: 100%;
    /* anche qui solo opacita': sei scritte di 2,7rem che scivolano sono sei
       superfici da ridisegnare a ogni fotogramma */
    opacity: 0;
    transition: opacity .22s linear, color .25s;
  }
  .nav-links a::before {
    counter-increment: navItem;
    content: "0" counter(navItem);
    font-size: .85rem; font-weight: 600; letter-spacing: .1em;
    color: var(--cyan); margin-right: 16px; vertical-align: super;
  }
  /* la scaletta resta, ma stretta: il pannello ora si apre in 0,2s e ritardi
     da mezzo secondo lascerebbero le voci indietro rispetto allo sfondo */
  .nav-links.open a { opacity: 1; }
  .nav-links.open a:nth-of-type(1) { transition-delay: .05s; }
  .nav-links.open a:nth-of-type(2) { transition-delay: .09s; }
  .nav-links.open a:nth-of-type(3) { transition-delay: .13s; }
  .nav-links.open a:nth-of-type(4) { transition-delay: .17s; }
  .nav-links.open a:nth-of-type(5) { transition-delay: .21s; }
  .nav-links.open a:nth-of-type(6) { transition-delay: .25s; }
  .nav-links a.active { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .nav-links a.active::after { display: none; }
}

/* everything below is PHONE rhythm, not nav: it must not reach tablets just
   because the burger appears at 1200 */
@media (max-width: 720px) {
  /* tighter rhythm: less wall-of-text feeling */
  .section { padding: 60px 0; }
  .section-head { margin-bottom: 36px; }
  .hero-badges { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

  .grid-2 { grid-template-columns: 1fr; }

  /* card grids become swipeable snap carousels */
  .grid-3, .grid-4 {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: min(80%, 330px);
    overflow-x: auto;
    overflow-y: hidden; /* no vertical slack: first swipe must scroll the page */
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 24px;
    margin-inline: -24px;
    padding: 6px 24px 16px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .grid-3::-webkit-scrollbar, .grid-4::-webkit-scrollbar { display: none; }
  .grid-3 > *, .grid-4 > * { scroll-snap-align: center; }
  /* carousel children reveal in place (no translateY inside a scroller) */
  .grid-3 > [data-reveal], .grid-4 > [data-reveal] { transform: none; }

  .values { grid-template-columns: 1fr; }

  /* steps become a glowing vertical timeline */
  .steps { grid-template-columns: 1fr; position: relative; padding-left: 18px; }
  .steps::before {
    content: ""; position: absolute; left: 2px; top: 10px; bottom: 10px; width: 2px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--cyan), var(--violet));
    opacity: .45;
  }

  .cursor-glow, .cursor-dot, .spotlight { display: none; }
}

/* very narrow phones: dashboard labels must fit their tiles */
@media (max-width: 480px) {
  .mock-tile .k { font-size: .6rem; letter-spacing: .05em; overflow-wrap: anywhere; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  [data-reveal] { opacity: 1; transform: none; filter: none; }
}

/* ============================================================
   FX v2 — living background, avant-garde menu, micro-interactions
   ============================================================ */

/* NO opacity animation on <body>. The page veil is a CHILD of body, so any
   opacity on body multiplies through and blanks the veil — while body's
   background still paints the root canvas at full strength (the canvas is not
   part of body's rendering group). That combination is exactly a full-screen
   flash of bare background on the arrival frame of a real navigation, which is
   what every cross-document load does. The veil plus [data-reveal] already
   provide the entrance; nothing here needs to fade the whole document. */

/* Blocco dello scorrimento col menu aperto.
   PRIMA: body { position: fixed; top: -scrollY }. Regge ovunque, ma toglie il
   corpo della pagina dal flusso: il documento si accorcia di settemila pixel,
   il browser ricalcola tutto (apertura lenta), la barra degli indirizzi del
   telefono si apre e si richiude, e in chiusura la pagina saltava a zero e poi
   tornava (lo sfarfallio in chiusura). ORA: overflow nascosto sulla radice.
   Non si sposta niente, quindi non c'e' niente da ricalcolare.
   Il pannello ha il suo scorrimento e con overscroll-behavior: contain non
   passa la mano alla pagina sotto quando arriva in fondo. */
html.blocco-scorrimento { overflow: hidden; }
body.menu-open { overflow: hidden; }
/* pause the living background while the blurred menu is open (perf) */
body.menu-open .bg-fx::before,
body.menu-open .bg-fx::after,
body.menu-open .bg-grid::after { animation-play-state: paused; }

/* living background: drifting nebulas */
.bg-fx::before { animation: bgDrift 26s ease-in-out infinite alternate; }
.bg-fx::after {
  content: ""; position: absolute; left: 50%; top: 30%;
  width: 70vmax; height: 70vmax; border-radius: 50%;
  background: radial-gradient(circle, rgba(109,139,255,.09), transparent 62%);
  animation: orbDrift 22s ease-in-out infinite alternate;
}
@keyframes bgDrift { to { transform: translate(-2.5%, 2%) scale(1.07); } }
@keyframes orbDrift {
  from { transform: translate(-60%, -40%) scale(1); }
  to   { transform: translate(-40%, -55%) scale(1.18); }
}

/* scanning beam sweeping down the grid */
.bg-grid::after {
  content: ""; position: absolute; left: 0; right: 0; top: -240px; height: 240px;
  background: linear-gradient(180deg, transparent, rgba(34,224,255,.04) 40%, rgba(34,224,255,.13) 50%, rgba(34,224,255,.04) 60%, transparent);
  animation: gridScan 8s linear infinite;
}
@keyframes gridScan { to { transform: translateY(calc(100vh + 480px)); } }

/* (header -webkit-backdrop-filter lives in the base .site-header.scrolled rule:
   it must precede the max-width:720px override that disables it — the prefixed
   name is a cascade alias of backdrop-filter and would re-clip the menu) */

/* desktop nav: magic pill that glides between links */
.nav-pill {
  position: absolute; z-index: -1; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  opacity: 0;
  transition: left .35s var(--ease), top .35s var(--ease), width .35s var(--ease), height .35s var(--ease), opacity .25s;
  pointer-events: none;
}

/* primary button: shine sweep on hover */
.btn-primary { overflow: hidden; }
.btn-primary::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(115deg, transparent 25%, rgba(255,255,255,.55) 50%, transparent 75%);
  transform: translateX(-130%); transition: transform .65s ease;
  pointer-events: none;
}
.btn-primary:hover::after { transform: translateX(130%); }

/* lift + glow for stats / values / steps
   (scoped :not([data-reveal]) so it can't clobber the reveal transition;
   JS removes the attribute once the reveal completes) */
.stat:not([data-reveal]), .value:not([data-reveal]), .step:not([data-reveal]) { transition: transform .4s var(--ease), border-color .4s, box-shadow .4s; }
.stat:hover, .value:hover, .step:hover {
  transform: translateY(-5px);
  border-color: rgba(34,224,255,.35);
  box-shadow: 0 0 36px -14px rgba(34,224,255,.5);
}

/* dashboard mock: charts animate only when revealed, dots pulse */
.mock-chart i { animation-play-state: paused; }
.mock.in .mock-chart i { animation-play-state: running; }
.trace-line .dot { animation: pulse 2.4s infinite; }
.trace-line:nth-of-type(2) .dot { animation-delay: .8s; }
.trace-line:nth-of-type(3) .dot { animation-delay: 1.6s; }

/* marquee edge fade */
.marquee {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

/* click burst particles */
.burst-p {
  position: fixed; width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; box-shadow: 0 0 10px currentColor;
  pointer-events: none; z-index: 9998;
}

/* cursor press feedback */
.cursor-glow.clicking { width: 16px; height: 16px; border-color: var(--magenta); }

/* cursor hidden until the first mousemove seeds its position */
.cursor-glow:not(.on), .cursor-dot:not(.on) { opacity: 0; }

/* Safari <18 needs the -webkit prefix for glass surfaces */
.eyebrow, .btn-ghost { -webkit-backdrop-filter: blur(8px); }

/* touch devices: cards light up entering the viewport, mocks float */
@media (pointer: coarse) {
  /* lighter blur kernel on phones (GPU cost at 3x DPR) */
  [data-reveal] { filter: blur(4px); }
  /* floaty starts only after the reveal has played (.in) */
  .mock.in { animation: floaty 7s ease-in-out infinite; }
  .card.touch-glow { background: var(--surface-2); }
  .card.touch-glow::before { opacity: 1; }
  .value.touch-glow, .step.touch-glow, .stat.touch-glow {
    transform: translateY(-3px);
    border-color: rgba(34,224,255,.35);
    box-shadow: 0 0 34px -14px rgba(34,224,255,.45);
  }
}
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ============================================================
   FX v3 — depth layer: glare, spotlight, shimmer, guided wizard
   ============================================================ */

/* moving glare inside tilted elements (created by initTilt) */
.tilt-glare {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,.14), transparent 55%);
  opacity: 0; transition: opacity .45s;
}
[data-tilt]:hover .tilt-glare { opacity: 1; }

/* global cursor spotlight (desktop, created by initCursor) */
.spotlight {
  position: fixed; left: 0; top: 0; width: 1100px; height: 1100px;
  border-radius: 50%; pointer-events: none; z-index: 1;
  background: radial-gradient(circle, rgba(109,139,255,.07), transparent 60%);
  mix-blend-mode: screen;
  transform: translate(-9999px, -9999px);
}

/* slow shimmer on headline gradients only (stats/mock values stay static:
   cheaper repaints + avoids Safari clip-text glitches inside tilted mocks) */
h1 .gradient-text, .h-sec .gradient-text {
  background-size: 200% auto;
  animation: shimmer 7s ease-in-out infinite;
}
@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ---------- guided wizard ---------- */
.wizard[hidden] { display: none; } /* author display:grid would beat UA [hidden] */
.wizard {
  position: fixed; inset: 0; z-index: 300;
  display: grid; place-items: center; padding: 20px;
  background: rgba(5, 6, 12, .72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 0; pointer-events: none;
  transition: opacity .35s;
}
.wizard.open { opacity: 1; pointer-events: auto; }
/* stesso blocco leggero del menu: html.blocco-scorrimento, niente body fissato */
body.wizard-open { overflow: hidden; }

.wizard-panel {
  width: min(660px, 100%); max-height: min(86vh, 720px); overflow-y: auto;
  overscroll-behavior: contain; /* in fondo non trascina la pagina sotto */
  position: relative;
  border-radius: var(--radius-lg); border: 1px solid var(--border-strong);
  background: linear-gradient(165deg, rgba(16,22,44,.97), rgba(7,9,20,.97));
  padding: clamp(26px, 5vw, 44px);
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.8), var(--glow-violet);
  transform: translateY(22px) scale(.97);
  transition: transform .45s var(--ease);
}
.wizard.open .wizard-panel { transform: none; }

.wizard-close {
  position: absolute; top: 16px; right: 16px; width: 40px; height: 40px;
  border-radius: 50%; border: 1px solid var(--border); color: var(--text-muted);
  font-size: 1rem; display: grid; place-items: center; transition: all .25s;
}
.wizard-close:hover { color: var(--text); border-color: var(--cyan); box-shadow: var(--glow-cyan); }

.wizard-head { display: flex; align-items: center; gap: 16px; margin: 4px 44px 26px 0; }
.wizard-progress { flex: 1; height: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.wizard-progress i {
  display: block; height: 100%; width: 0; border-radius: 4px;
  background: var(--grad); box-shadow: 0 0 12px rgba(34,224,255,.6);
  transition: width .5s var(--ease);
}
.wizard-step-label { font-family: var(--font-display); font-size: .8rem; color: var(--text-dim); letter-spacing: .15em; white-space: nowrap; }

@keyframes wizIn { from { opacity: 0; transform: translateY(14px); } }
.wizard-q {
  font-family: var(--font-display); font-size: clamp(1.35rem, 3vw, 1.8rem);
  letter-spacing: -.01em; margin-bottom: 22px;
  animation: wizIn .45s var(--ease) both;
}
.wizard-options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .wizard-options { grid-template-columns: 1fr; } }
.wizard-opt {
  text-align: left; padding: 18px 20px; border-radius: 14px;
  border: 1px solid var(--border); background: var(--surface);
  display: grid; gap: 5px; cursor: pointer;
  animation: wizIn .5s var(--ease) both; animation-delay: var(--d, 0ms);
  transition: border-color .25s, background .25s, box-shadow .25s, opacity .3s, transform .25s;
}
.wizard-opt b { font-family: var(--font-display); font-size: 1.02rem; color: var(--text); }
.wizard-opt span { font-size: .88rem; color: var(--text-muted); }
.wizard-opt:hover { border-color: var(--cyan); background: var(--surface-2); box-shadow: var(--glow-cyan); transform: translateY(-2px); }
.wizard-opt.selected { border-color: var(--cyan); background: var(--grad-soft); box-shadow: var(--glow-cyan); }
.wizard-options.picked .wizard-opt:not(.selected) { opacity: .3; }

.wizard-result { animation: wizIn .45s var(--ease) both; }
.wizard-result h3 {
  font-family: var(--font-display); font-size: clamp(1.5rem, 3.4vw, 2rem); margin: 14px 0 10px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.wizard-result p { color: var(--text-muted); margin-bottom: 8px; }
.wizard-result h4 {
  font-family: var(--font-display); font-size: 1rem; margin: 22px 0 0; color: var(--text);
}
.wizard-result .feat-list { margin: 12px 0 22px; }
.wizard-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* torna alla domanda precedente: piccolo, in alto, non compete col resto */
.wizard-back {
  display: inline-flex; align-items: center; gap: 6px;
  margin: -8px 0 14px; padding: 6px 12px 6px 8px; border-radius: 10px;
  font-family: var(--font-display); font-size: .84rem; color: var(--text-muted);
  border: 1px solid transparent; cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.wizard-back:hover { color: var(--text); border-color: var(--border); background: var(--surface); }
.wizard-back:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* quello che il visitatore ha gia' segnato nel check-up della home */
.wizard-ctx {
  margin-bottom: 20px; padding: 14px 16px; border-radius: 14px;
  background: var(--grad-soft); border: 1px solid var(--border);
  animation: wizIn .45s var(--ease) both;
}
.wizard-ctx b { display: block; font-family: var(--font-display); font-size: .82rem; color: var(--text); margin-bottom: 6px; }
.wizard-ctx ul { list-style: none; display: grid; gap: 4px; }
.wizard-ctx li { font-size: .86rem; color: var(--text-muted); padding-left: 16px; position: relative; }
.wizard-ctx li::before { content: "·"; position: absolute; left: 4px; color: var(--cyan); font-weight: 700; }

/* il riepilogo delle risposte, sopra la raccomandazione */
.wizard-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.wizard-chip {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 6px 12px; border-radius: 100px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: .82rem; color: var(--text);
}
.wizard-chip i {
  font-style: normal; font-family: var(--font-display); font-size: .68rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim);
}

/* ============================================================
   FX v4 — branded page veil + magnetic progress bar words
   ============================================================ */

/* transition veil: covers page changes, owns slow cloud loads */
.page-veil {
  /* above EVERYTHING, decorations included: the custom cursor (.cursor-glow /
     .cursor-dot, z 9999, mix-blend-mode screen) and the click-burst particles
     (.burst-p, z 9998, glowing) are painted at the click point — at z 400 they
     shone straight through the curtain and read as a flash on every desktop
     navigation. They do not exist on touch, which is why phones looked clean. */
  position: fixed; inset: 0; z-index: 10000;
  display: grid; place-items: center;
  background:
    radial-gradient(700px 500px at 72% 18%, rgba(91,124,246,.13), transparent 60%),
    radial-gradient(700px 520px at 24% 82%, rgba(34,224,255,.11), transparent 60%),
    #05060c;
  opacity: 0; visibility: hidden; pointer-events: none;
}
/* arrival: the inline <head> script sets html.veil-hold before first paint */
html.veil-hold .page-veil { opacity: 1; visibility: visible; pointer-events: auto; }
.page-veil.out {
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(-2.5%);
  transition: opacity .55s ease, transform .55s var(--ease), visibility 0s .55s;
}
/* departure: circle wipe expanding from the click point */
.page-veil.arm {
  opacity: 1; visibility: visible; pointer-events: auto;
  clip-path: circle(0px at var(--vx, 50%) var(--vy, 50%));
  transform: none; transition: none;
}
.page-veil.arm.enter {
  clip-path: circle(165% at var(--vx, 50%) var(--vy, 50%));
  transition: clip-path .5s var(--ease);
}
/* Sul telefono niente spazzata circolare: animare una maschera clip-path a
   tutto schermo obbliga il browser a ridisegnare l'intera pagina a ogni
   fotogramma, ed e' da li' che venivano gli sfarfallii al cambio pagina.
   Qui e' una dissolvenza: la fa la scheda grafica, non costa niente.
   html.tocco lo mette main.js, cosi' CSS e JS non possono dissentire. */
html.tocco .page-veil.arm {
  clip-path: none;
  opacity: 0;
  transition: opacity .2s ease;
}
html.tocco .page-veil.arm.enter { opacity: 1; transition: opacity .2s ease; }
html.tocco .page-veil.out { transform: none; transition: opacity .28s ease, visibility 0s .28s; }
/* con una copertura cosi' breve la barra farebbe in tempo solo a partire */
html.tocco .page-veil.arm .veil-bar { visibility: hidden; }

.veil-inner { text-align: center; display: grid; justify-items: center; gap: 14px; padding: 24px; }
.veil-inner picture { display: block; line-height: 0; }
.veil-logo { display: block; width: 168px; height: auto; filter: drop-shadow(0 0 22px rgba(34,224,255,.35)); }
.veil-line {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.02rem, 2.4vw, 1.3rem); line-height: 1.45;
  color: rgba(255,255,255,.88); max-width: 34ch;
}
.veil-bar { width: 132px; height: 2px; border-radius: 2px; overflow: hidden; background: rgba(255,255,255,.08); margin-top: 6px; }
.veil-bar i {
  display: block; height: 100%; width: 40%; border-radius: 2px;
  background: var(--grad);
  animation: veilSlide 1.1s ease-in-out infinite;
}
@keyframes veilSlide { from { transform: translateX(-110%); } to { transform: translateX(340%); } }


/* ============================================================
   FX v5 — accelerating load bar, back-to-top, i18n & theme UI
   ============================================================ */

/* arrival: determinate bar that starts slow and accelerates (progressive
   speed feel), then the veil lifts */
/* pre-JS hold state: the bar reads "just starting" (empty, left-anchored),
   not the default 40% shimmer chunk — no geometry jump when JS resumes it */
html.veil-hold .veil-bar i {
  animation: none;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
}
/* pure-CSS escape hatch: if JS never runs on arrival (failed script fetch),
   the veil lifts by itself after 6s — nobody gets stranded behind it */
html.veil-hold .page-veil { animation: veilAutoLift .6s ease 6s forwards; }
@keyframes veilAutoLift { to { opacity: 0; visibility: hidden; } }
/* One CONTINUOUS accelerating fill across the page swap: the exit page
   starts it at click (slow part of the curve), the arrival page resumes it
   from the elapsed time via a negative animation-delay set by JS.
   (.page-veil ancestor added for specificity: must beat the veil-hold rule) */
.page-veil .veil-bar.load i {
  width: 100%;
  transform-origin: left center;
  animation: veilLoad 1.55s cubic-bezier(.72, .04, .93, .36) both;
}
@keyframes veilLoad { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* floating back-to-top (appears when the footer enters view) */
.back-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(10, 14, 28, .82);
  border: 1px solid var(--border-strong);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--cyan);
  opacity: 0; transform: translateY(16px) scale(.85); pointer-events: none;
  transition: opacity .35s var(--ease), transform .35s var(--ease), box-shadow .25s, border-color .25s;
}
.back-top.show { opacity: 1; transform: none; pointer-events: auto; }
.back-top:hover { border-color: var(--cyan); box-shadow: var(--glow-cyan); transform: translateY(-3px); }

/* nav tools: language switch + theme toggle */
.nav-tools { display: flex; align-items: center; gap: 10px; }
.lang-switch {
  display: flex; border: 1px solid var(--border); border-radius: 100px;
  overflow: hidden; background: var(--surface);
}
.lang-switch button {
  font-family: var(--font-display); font-size: .7rem; font-weight: 700;
  letter-spacing: .08em; padding: 7px 11px; color: var(--text-dim);
  transition: color .2s, background .2s;
}
.lang-switch button:hover { color: var(--text); }
.lang-switch button.active { color: var(--on-fill); background: var(--grad-fill); }
.theme-toggle {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface);
  display: grid; place-items: center; color: var(--text-muted);
  transition: color .25s, border-color .25s, box-shadow .25s;
}
.theme-toggle:hover { color: var(--cyan); border-color: var(--cyan); box-shadow: var(--glow-cyan); }
.theme-toggle .ic-moon { display: none; }
html[data-theme="light"] .theme-toggle .ic-sun { display: none; }
html[data-theme="light"] .theme-toggle .ic-moon { display: block; }
/* the demo button sat too tall in the 76px header */
.nav-cta .btn { padding: 10px 20px; font-size: .9rem; }

/* ---------- light theme ----------
   Ottobre 2026: il grigio-blu (#dfe5f1) e' stato bocciato ("inguardabile").
   Ora e' bianco vero, come Zucchetti e TeamSystem: pagina bianca, fasce
   alternate appena azzurrate, schede bianche staccate da bordo sottile e
   ombra morbida, accenti nel blu elettrico del marchio.
   ATTENZIONE: nel tema chiaro --surface-2 e' piu' SCURO di --surface (nel
   tema scuro e' l'opposto). E' voluto: --surface sono le schede, --surface-2
   e' cio' che sta dentro una scheda o si accende al passaggio del mouse. */
html[data-theme="light"] {
  --bg: #ffffff;
  --bg-2: #f4f7fc;
  --bg-3: #e8eef8;
  --surface: #ffffff;
  --surface-2: #f1f5fb;
  --border: #e1e7f1;
  --border-strong: #cdd6e4;
  --text: #0a1324;
  --text-muted: #45516a;
  --text-dim: #586480; /* 5.9:1 sul bianco */
  --glow-cyan: 0 0 34px rgba(8, 145, 178, .22);
  --glow-violet: 0 0 34px rgba(79, 70, 229, .18);
}
/* le schede di carta hanno bisogno di un'ombra, o galleggiano senza appoggio */
html[data-theme="light"] .card,
html[data-theme="light"] .stat,
html[data-theme="light"] .step,
html[data-theme="light"] .value,
html[data-theme="light"] .acc,
html[data-theme="light"] .pg-card,
html[data-theme="light"] .contact-info-card,
html[data-theme="light"] .fn-card,
html[data-theme="light"] .cta-band {
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 16px 36px -22px rgba(16, 32, 72, .28);
}
html[data-theme="light"] .bg-grid {
  background-image:
    linear-gradient(rgba(15,23,42,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,.05) 1px, transparent 1px);
}
html[data-theme="light"] .site-header.scrolled { background: rgba(255, 255, 255, .88); box-shadow: 0 1px 0 var(--border); }
html[data-theme="light"] .mock {
  background: linear-gradient(160deg, #ffffff, #eef2fa);
  box-shadow: 0 40px 90px -40px rgba(30, 40, 80, .35), var(--glow-violet);
}
html[data-theme="light"] .mock-tile { background: rgba(15, 23, 42, .04); }
html[data-theme="light"] .wizard-panel { background: linear-gradient(165deg, #ffffff, #eef2fa); }
html[data-theme="light"] .spotlight { mix-blend-mode: multiply; background: radial-gradient(circle, rgba(80, 110, 230, .08), transparent 60%); }
html[data-theme="light"] .cursor-glow { mix-blend-mode: normal; }
html[data-theme="light"] .back-top { background: rgba(255, 255, 255, .85); }
html[data-theme="light"] .btn-ghost { color: var(--text); }
/* 1200, non 720: il menu a tutto schermo entra in funzione a 1200, e con la
   soglia sbagliata su un tablet in modalita' chiara il pannello restava nero */
@media (max-width: 1200px) {
  html[data-theme="light"] .site-header.scrolled { background: rgba(255, 255, 255, .97); }
  html[data-theme="light"] .nav-links {
    background:
      radial-gradient(500px 400px at 85% 10%, rgba(91,124,246,.14), transparent 60%),
      radial-gradient(500px 500px at 15% 90%, rgba(34,224,255,.11), transparent 60%),
      #ffffff;
  }
}
/* accent palette remapped for light backgrounds (contrast) */
html[data-theme="light"] {
  --cyan: #0a6f8c;                 /* 5.6:1 come testo sul bianco */
  /* blu elettrico sul bianco: ogni tappa regge 4.5:1 col bianco sopra (bottoni)
     e come titolo grande sul bianco */
  --grad: linear-gradient(120deg, #0a7ea4 0%, #2563eb 55%, #4f46e5 100%);
  /* bottoni pieni: stesso blu scuro del testo, cosi' il bianco sopra si legge (sul ciano chiaro era 1,6:1) */
  --grad-fill: linear-gradient(120deg, #0a7ea4 0%, #2563eb 55%, #4f46e5 100%);
  --on-fill: #ffffff;
  --grad-soft: linear-gradient(120deg, rgba(10,126,164,.12), rgba(79,70,229,.12));
}
html[data-theme="light"] .form-success {
  background: rgba(18, 140, 70, .1);
  border-color: rgba(18, 140, 70, .45);
  color: #0c6e3c;
}
html[data-theme="light"] .wizard-panel { box-shadow: 0 40px 90px -30px rgba(30, 40, 80, .35), var(--glow-violet); }
html[data-theme="light"] .tilt-glare {
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 50%), rgba(15, 23, 42, .07), transparent 55%);
}
html[data-theme="light"] .burst-p { filter: saturate(1.3) brightness(.7); }
/* soften the ambience layers on light backgrounds: al 55% gli aloni
   schiarivano la pagina fin quasi al bianco proprio dove si legge */
html[data-theme="light"] .bg-fx::before,
html[data-theme="light"] .bg-fx::after { opacity: .38; }
html[data-theme="light"] .bg-grid::after { opacity: .4; }
/* the light gradient is darker: white text reads better on it */
html[data-theme="light"] .btn-primary { color: #fff; }
html[data-theme="light"] .lang-switch button.active { color: #fff; }
html[data-theme="light"] .wizard { background: rgba(232, 238, 248, .78); }
/* il velo di passaggio segue il tema: in chiaro sbatteva in faccia una
   schermata nera a ogni cambio pagina */
html[data-theme="light"] .page-veil {
  background:
    radial-gradient(700px 500px at 72% 18%, rgba(91,124,246,.16), transparent 60%),
    radial-gradient(700px 520px at 24% 82%, rgba(14,116,144,.12), transparent 60%),
    #ffffff;
}
html[data-theme="light"] .veil-line { color: rgba(14, 21, 38, .82); }
html[data-theme="light"] .veil-bar { background: rgba(15, 23, 42, .1); }
html[data-theme="light"] .veil-logo { filter: drop-shadow(0 10px 26px rgba(30, 60, 140, .22)); }
html[data-theme="light"] .wizard-progress { background: rgba(15, 23, 42, .12); }

/* ============================================================
   FX v6 — Playground: interactive mini-demos on the home page
   ============================================================ */
.playground-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 900px) { .playground-grid { grid-template-columns: 1fr; } }

.pg-card {
  position: relative;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}
/* scoped :not([data-reveal]): a bare `transition` here has the same specificity
   as [data-reveal] but comes later, so it would REPLACE the reveal transition
   and the cards would snap in with no fade (same trap as .stat/.value/.step) */
.pg-card:not([data-reveal]) { transition: border-color .4s, box-shadow .4s; }
.pg-card:hover { border-color: rgba(34,224,255,.3); box-shadow: 0 0 36px -16px rgba(34,224,255,.45); }
.pg-card h3 { font-size: 1.22rem; margin-bottom: 6px; }
.pg-sub { color: var(--text-muted); font-size: .92rem; margin-bottom: 20px; }


/* playground result area */
.pg-result { margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--border); }
.pg-out { font-size: .95rem; color: var(--text-muted); line-height: 1.7; }

/* Digital check-up */
.check-list { display: grid; gap: 8px; }
.check-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left;
  padding: 11px 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted); font-size: .88rem; line-height: 1.45;
  transition: color .25s, border-color .25s, background .25s;
  cursor: pointer;
}
.check-item::before {
  content: ""; flex: 0 0 auto;
  width: 20px; height: 20px; border-radius: 7px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  display: grid; place-items: center;
  font-size: .72rem; font-weight: 700; color: #fff;
  transition: background .25s, border-color .25s;
}
.check-item:hover { color: var(--text); border-color: var(--border-strong); }
.check-item.on { color: var(--text); border-color: rgba(34,224,255,.45); background: var(--grad-soft); }
.check-item.on::before { content: "✓"; background: var(--grad-fill); color: var(--on-fill); border-color: transparent; }
#checkOut { font-family: var(--font-display); font-size: .98rem; color: var(--text); }

/* what the check-up would actually DO about each thing you ticked */
.check-fix { list-style: none; display: grid; gap: 7px; margin-top: 12px; }
.check-fix li {
  position: relative; padding-left: 22px;
  font-size: .84rem; line-height: 1.55; color: var(--text-muted);
  animation: exIn .35s var(--ease) both; animation-delay: var(--d, 0ms);
}
.check-fix li::before {
  content: "→"; position: absolute; left: 0; top: 0;
  font-family: var(--font-display); font-weight: 700; color: var(--cyan);
}

/* pulsantino tondo dentro le schede del playground */
.pg-mini {
  font-family: var(--font-display); font-size: .78rem; font-weight: 600;
  padding: 7px 13px; border-radius: 100px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-muted);
  transition: color .25s, border-color .25s;
}
.pg-mini:hover { color: var(--text); border-color: var(--border-strong); }
.pg-mini:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
/* i campi che escono dalla lettura di un documento entrano uno alla volta */
@keyframes exIn { to { opacity: 1; transform: none; } }
.btn-sm { padding: 10px 18px; font-size: .85rem; }
/* un pulsante spento deve sembrare spento: acceso e inerte e' peggio che assente */
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn:disabled:hover { transform: none; }

/* small-phone hardening (arithmetic audit findings) */
@media (max-width: 480px) {
  .cta-band { padding: 40px 24px; }
  .cta-actions .btn { white-space: normal; }
}
@media (max-width: 360px) {
  .display { font-size: 2rem; }
  .eyebrow { letter-spacing: .14em; }
}

/* Live brand playground — every knob feeds the same preview.
   The stage is a FIXED box: the spacing/size sliders change the preview inside
   it, never the height of the card (which would shove the whole grid around). */
.brand-stage {
  margin-bottom: 18px;
  height: 248px;            /* FIXED, not min-height: a floor still grows */
  display: grid; align-content: center;
  overflow: hidden;
}
.brand-mini {
  --bh: 210; --bsat: 80%; --bl: 56%;
  --br: 14px; --bbw: 1px; --bsh: 14;
  --bs: 1; --bfs: 1; --bfw: 700;
  border: var(--bbw) solid hsl(var(--bh) var(--bsat) var(--bl) / .55);
  border-radius: var(--br);
  padding: calc(20px * var(--bs));
  gap: calc(10px * var(--bs));
  background: linear-gradient(160deg, hsl(var(--bh) var(--bsat) var(--bl) / .14), transparent 70%);
  display: grid; justify-items: start;
  transition: border-color .2s, border-width .2s;
}
.bm-badge {
  font-family: var(--font-display); font-weight: 700;
  font-size: calc(.68rem * var(--bfs));
  letter-spacing: .16em; text-transform: uppercase;
  padding: calc(5px * var(--bs)) calc(11px * var(--bs));
  border-radius: calc(var(--br) * 2);
  color: var(--bbadge, hsl(var(--bh) var(--bsat) 72%)); /* JS picks a ratio-safe tone per theme */
  border: var(--bbw) solid hsl(var(--bh) var(--bsat) var(--bl) / .55);
}
.bm-title {
  font-family: var(--font-display);
  font-size: calc(1.1rem * var(--bfs));
  font-weight: var(--bfw);
}
.bm-field {
  width: 100%;
  font-size: calc(.85rem * var(--bfs)); color: var(--text-dim);
  padding: calc(9px * var(--bs)) calc(14px * var(--bs));
  border-radius: calc(var(--br) * 0.9);
  border: var(--bbw) solid var(--border);
  background: var(--surface);
}
.bm-btn {
  font-family: var(--font-display); font-weight: 600;
  font-size: calc(.85rem * var(--bfs));
  padding: calc(9px * var(--bs)) calc(18px * var(--bs));
  border-radius: calc(var(--br) * 1.4);
  background: hsl(var(--bh) var(--bsat) var(--bl));
  color: var(--bfg, #000); /* matches what inkOn() computes for the default accent */
  box-shadow: 0 calc(var(--bsh) * 0.45px) calc(var(--bsh) * 1.3px) calc(var(--bsh) * -0.4px)
              hsl(var(--bh) var(--bsat) var(--bl) / .75);
}
html[data-theme="light"] .bm-badge { color: var(--bbadge, hsl(var(--bh) var(--bsat) 30%)); }

/* ============================================================
   Mock dashboards: swipeable multi-screen carousel
   ============================================================ */
.mock-screens {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  position: relative;
  border-radius: 12px;
}
.mock-screens::-webkit-scrollbar { display: none; }
.mock-screen { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.mock-screen + .mock-screen { margin-left: 16px; }
.mock-dots { display: flex; gap: 7px; justify-content: center; margin-top: 14px; position: relative; }
.mock-dots i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--text-dim); opacity: .45;
  transition: opacity .3s, transform .3s, background .3s;
}
.mock-dots i.on { background: var(--cyan); opacity: 1; transform: scale(1.25); box-shadow: 0 0 8px var(--cyan); }
.badge-ok, .badge-mid {
  font-size: .68rem !important;
  padding: 3px 9px; border-radius: 100px;
  font-family: var(--font-display);
}
.badge-ok { color: #46d68c !important; border: 1px solid rgba(70,214,140,.4); background: rgba(70,214,140,.08); }
.badge-mid { color: #e8b23f !important; border: 1px solid rgba(232,178,63,.4); background: rgba(232,178,63,.08); }
html[data-theme="light"] .badge-ok { color: #14804a !important; }
html[data-theme="light"] .badge-mid { color: #9a6b0c !important; }

/* ============================================================
   FX v7 — Chat assistant widget
   ============================================================ */
.chat-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 95;
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--grad-fill); color: var(--on-fill);
  box-shadow: 0 10px 30px -8px rgba(59, 130, 246, .6);
  transition: transform .3s var(--ease), box-shadow .3s;
}
.chat-fab:hover { transform: translateY(-3px); box-shadow: 0 16px 40px -10px rgba(59, 130, 246, .75); }
.chat-fab .ic-close { display: none; }
.chat-fab.open .ic-open { display: none; }
.chat-fab.open .ic-close { display: block; }
/* the back-to-top button moves up to make room for the chat bubble */
body.has-chat .back-top { bottom: 92px; }

.chat-panel {
  position: fixed; right: 22px; bottom: 92px; z-index: 95;
  width: min(380px, calc(100vw - 32px));
  /* vh fallback first (dvh unsupported → whole declaration dropped);
     -190px clears the 76px fixed header on short viewports */
  height: min(560px, calc(100vh - 190px));
  height: min(560px, calc(100dvh - 190px));
  display: flex; flex-direction: column;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: linear-gradient(165deg, rgba(16, 22, 44, .97), rgba(7, 9, 20, .97));
  box-shadow: 0 30px 70px -25px rgba(0, 0, 0, .75), var(--glow-violet);
  overflow: hidden;
  animation: wizIn .35s var(--ease);
}
.chat-panel[hidden] { display: none; }

.chat-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.chat-dot {
  width: 10px; height: 10px; border-radius: 50%; flex: none;
  background: #46d68c; box-shadow: 0 0 10px rgba(70, 214, 140, .8);
  animation: pulse 2.4s infinite;
}
.chat-head-txt { display: grid; line-height: 1.3; }
.chat-head-txt b { font-family: var(--font-display); font-size: 1rem; }
.chat-head-txt span { font-size: .76rem; color: var(--text-dim); }

.chat-log {
  flex: 1; overflow-y: auto;
  padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  scrollbar-width: thin;
}
.chat-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: .92rem; line-height: 1.55;
  white-space: pre-wrap; overflow-wrap: anywhere;
  animation: wizIn .3s var(--ease);
}
.chat-msg.from-bot {
  align-self: flex-start;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-bottom-left-radius: 5px;
  color: var(--text);
}
.chat-msg.from-user {
  align-self: flex-end;
  background: var(--grad-fill);
  color: var(--on-fill);
  border-bottom-right-radius: 5px;
}
.chat-typing { display: flex; gap: 5px; padding: 14px; }
.chat-typing i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--text-dim);
  animation: chatBlink 1.2s infinite;
}
.chat-typing i:nth-child(2) { animation-delay: .2s; }
.chat-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes chatBlink { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }

.chat-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px; }
.chat-chips:empty { display: none; }
.chat-chip {
  font-family: var(--font-display); font-size: .78rem;
  padding: 7px 12px; border-radius: 100px;
  border: 1px solid var(--border); color: var(--text-muted);
  background: var(--surface);
  transition: color .2s, border-color .2s;
}
.chat-chip:hover { color: var(--text); border-color: var(--cyan); }

.chat-form {
  display: flex; gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
}
.chat-form input {
  flex: 1;
  padding: 11px 14px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit; font-size: .92rem;
}
.chat-form input:focus { outline: none; border-color: var(--cyan); }
.chat-send {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--grad-fill); color: var(--on-fill);
  transition: transform .25s var(--ease), opacity .25s;
}
.chat-send:hover { transform: scale(1.06); }
.chat-send:disabled { opacity: .5; }

html[data-theme="light"] .chat-panel { background: linear-gradient(165deg, #ffffff, #eef2fa); }
html[data-theme="light"] .chat-fab { color: #fff; }

@media (max-width: 480px) {
  .chat-panel {
    right: 16px; left: 16px; width: auto;
    bottom: 88px;
    height: min(70vh, 540px);
    height: min(70dvh, 540px);
  }
  .chat-fab { right: 16px; bottom: 16px; }
  body.has-chat .back-top { bottom: 86px; }
}

/* hero on mobile: readable text over the particle network */
@media (max-width: 720px) {
  .hero-text { position: relative; }
  .hero-text::before {
    content: ""; position: absolute; inset: -18px -12px; z-index: -1;
    border-radius: 24px;
    background: radial-gradient(ellipse at 42% 42%, rgba(5, 6, 12, .74), transparent 76%);
  }
  html[data-theme="light"] .hero-text::before {
    background: radial-gradient(ellipse at 42% 42%, rgba(242, 245, 251, .82), transparent 76%);
  }
}

/* ============================================================
   FX v8 — Strumenti AI (strumenti.html)
   ============================================================ */
.tools-limit {
  margin-top: 18px; font-size: .88rem; color: var(--text-dim);
  max-width: 62ch; line-height: 1.65;
}
.tools-off {
  margin-top: 20px; padding: 14px 18px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border-strong);
  font-size: .9rem; color: var(--text-muted); line-height: 1.6; max-width: 62ch;
}
.tools-off b { color: var(--text); }

.tools-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 900px) { .tools-grid { grid-template-columns: 1fr; } }

.tool-card {
  display: flex; flex-direction: column;
  padding: 26px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}
.tool-card:not([data-reveal]) { transition: border-color .4s, box-shadow .4s; }
.tool-card:hover { border-color: rgba(34, 224, 255, .3); box-shadow: 0 0 36px -18px rgba(34, 224, 255, .45); }
.tool-card.busy { opacity: .82; }

.tool-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.tool-ic {
  flex: none; width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--grad-soft); color: var(--cyan);
}
.tool-head h2 { font-family: var(--font-display); font-size: 1.15rem; margin-bottom: 4px; }
.tool-sub { font-size: .88rem; color: var(--text-muted); line-height: 1.55; }
.tool-sub b { color: var(--text); font-weight: 600; }

.tool-body { display: grid; gap: 12px; }

/* zona di caricamento immagine */
.tool-drop {
  position: relative; /* contiene l'input nascosto otticamente */
  display: grid; place-items: center; gap: 8px;
  padding: 22px 16px; text-align: center;
  border-radius: 14px;
  border: 1px dashed var(--border-strong);
  background: var(--surface-2);
  /* --text-dim qui misurava 4.21:1 (scuro) e 4.10:1 (chiaro): sotto soglia */
  color: var(--text-muted); font-size: .85rem;
  cursor: pointer;
  transition: border-color .25s, color .25s, background .25s;
}
.tool-drop:hover, .tool-drop.over { border-color: var(--cyan); color: var(--text-muted); }
.tool-drop b { color: var(--text); font-weight: 600; }
.tool-drop:focus-within { outline: 2px solid var(--cyan); outline-offset: 2px; }
/* NON usare hidden: toglierebbe l'input dalla tabulazione e non ci sarebbe
   più modo di allegare una foto da tastiera */
.tool-file {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.tool-lab {
  font-family: var(--font-display); font-size: .82rem; color: var(--text-muted);
}
.tool-prev { border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.tool-prev img { display: block; width: 100%; max-height: 260px; object-fit: contain; background: var(--surface-2); }
.tool-or { display: block; font-size: .78rem; color: var(--text-muted); text-align: center; }

/* campi */
.tool-ta, .tool-in {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); font-family: inherit; font-size: .9rem; line-height: 1.6;
  transition: border-color .25s, box-shadow .25s;
}
.tool-ta { resize: vertical; min-height: 84px; }
.tool-ta:focus, .tool-in:focus {
  outline: none; border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 224, 255, .12);
}
.tool-field { display: grid; gap: 7px; }
.tool-field > label {
  font-family: var(--font-display); font-size: .82rem; color: var(--text-muted);
}
.tool-card .btn-sm { justify-self: start; }

/* risultati */
.tool-out {
  margin-top: 18px; padding-top: 18px;
  border-top: 1px solid var(--border);
}
.tool-note { font-size: .86rem; color: var(--text-dim); line-height: 1.6; }
.tool-note.bad { color: #ffb4a8; }
html[data-theme="light"] .tool-note.bad { color: #a3301f; }
.tool-kind {
  font-family: var(--font-display); font-size: .72rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: 10px;
}
.tool-fields { list-style: none; display: grid; gap: 6px; }
.tool-fields li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 8px 12px; border-radius: 9px;
  background: var(--surface-2); border: 1px solid var(--border);
  animation: exIn .32s var(--ease) both;
}
/* niente nowrap senza min-width: un'etichetta lunga usciva dalla card e
   veniva tagliata via da overflow-x: clip, cioè spariva */
.tool-fields .k { font-family: var(--font-display); font-size: .74rem; color: var(--text-muted); min-width: 0; overflow-wrap: anywhere; }
.tool-fields .v { font-size: .84rem; font-weight: 600; color: var(--text); text-align: right; min-width: 0; overflow-wrap: anywhere; }
/* quanto il modello si fida di quello che ha letto: dirlo è più utile che nasconderlo */
.tool-flag {
  margin-left: 7px; padding: 1px 7px; border-radius: 100px;
  font-family: var(--font-display); font-size: .6rem; font-style: normal; font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase; white-space: nowrap;
}
.tool-flag.media { color: #f0c674; border: 1px solid rgba(240, 198, 116, .4); }
.tool-flag.bassa { color: #ff9d8f; border: 1px solid rgba(255, 157, 143, .45); }
html[data-theme="light"] .tool-flag.media { color: #7a4f00; border-color: rgba(122, 79, 0, .45); }
html[data-theme="light"] .tool-flag.bassa { color: #a3301f; border-color: rgba(163, 48, 31, .4); }

.tool-draft, .tool-answer {
  font-family: inherit; font-size: .88rem; line-height: 1.7; color: var(--text);
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.tool-scripts { list-style: none; display: grid; gap: 12px; }
.tool-scripts li {
  padding: 12px 14px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.tool-scripts b {
  display: block; font-family: var(--font-display); font-size: .74rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--cyan); margin-bottom: 6px;
}
/* il ciano del tema chiaro su questa superficie è 3.86:1 — qui serve più scuro */
html[data-theme="light"] .tool-scripts b { color: #0a5c6d; }
html[data-theme="light"] .tool-kind { color: #0a5c6d; }
.tool-scripts p { font-size: .86rem; line-height: 1.65; color: var(--text-muted); }
.tool-row { display: flex; gap: 8px; margin-top: 10px; }

.tool-mini {
  margin-top: 12px;
  font-family: var(--font-display); font-size: .74rem; font-weight: 600;
  padding: 6px 12px; border-radius: 100px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-muted);
  transition: color .25s, border-color .25s;
}
.tool-row .tool-mini { margin-top: 0; }
.tool-mini:hover { color: var(--text); border-color: var(--border-strong); }

.tools-foot {
  margin-top: 30px; max-width: 70ch;
  font-size: .9rem; color: var(--text-muted); line-height: 1.75;
}

/* ============================================================
   FX v9 — Funnel "Sito Pronto" (sito-pronto.html)
   ============================================================ */
#funnelPage{ display:flex; align-items:flex-start; justify-content:center; min-height:60vh; }
.fn-wrap{ width:100%; max-width:600px; margin:0 auto; padding:0 20px; }
.fn-prog{ height:3px; border-radius:3px; background:var(--border); overflow:hidden; margin-bottom:8px; }
.fn-prog i{ display:block; height:100%; background:var(--grad); border-radius:3px; transition:width .45s var(--ease); }
.fn-count{ font-size:.72rem; color:var(--text-dim); letter-spacing:.06em; text-align:right; margin-bottom:20px; }
.fn-card{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:26px 22px 22px; }
.fn-q{ font-family:var(--font-display); font-weight:700; font-size:clamp(1.5rem,6vw,2rem); line-height:1.15; margin:0 0 6px; }
.fn-help{ color:var(--text-muted); font-size:.92rem; margin:0 0 20px; }
.fn-opts{ display:grid; gap:10px; }
.fn-opt{ display:flex; align-items:center; gap:14px; width:100%; text-align:left; padding:15px 16px; border-radius:14px; cursor:pointer; background:var(--surface-2); border:1.5px solid var(--border); color:var(--text); font-family:inherit; font-size:1rem; transition:border-color .18s, background .18s, transform .06s; }
.fn-opt:hover{ border-color:var(--border-strong); }
.fn-opt:active{ transform:scale(.995); }
.fn-tick{ flex:none; width:22px; height:22px; border-radius:50%; border:1.5px solid var(--border-strong); display:grid; place-items:center; transition:border-color .18s; }
.fn-tick::after{ content:""; width:10px; height:10px; border-radius:50%; background:transparent; transition:background .18s; }
.fn-opt.sel{ border-color:var(--cyan); background:var(--grad-soft); }
.fn-opt.sel .fn-tick{ border-color:var(--cyan); }
.fn-opt.sel .fn-tick::after{ background:var(--grad-fill); }
.fn-opt:focus-visible{ outline:2px solid var(--cyan); outline-offset:2px; }
.fn-tiers{ display:grid; gap:12px; }
.fn-tier{ position:relative; width:100%; text-align:left; cursor:pointer; padding:18px; border-radius:16px; background:var(--surface-2); border:1.5px solid var(--border); color:var(--text); font-family:inherit; transition:border-color .18s, background .18s; }
.fn-tier:hover{ border-color:var(--border-strong); }
.fn-tier.sel{ border-color:var(--cyan); background:var(--grad-soft); }
.fn-tier:focus-visible{ outline:2px solid var(--cyan); outline-offset:2px; }
.fn-tier-top{ display:flex; align-items:baseline; justify-content:space-between; gap:10px; }
.fn-tier-name{ font-family:var(--font-display); font-weight:700; font-size:1.24rem; }
.fn-tier-tag{ font-size:.68rem; letter-spacing:.1em; text-transform:uppercase; color:var(--text-dim); }
.fn-tier-sub{ color:var(--text-muted); font-size:.9rem; margin:2px 0 12px; }
.fn-tier-price{ display:flex; align-items:baseline; gap:8px; margin-bottom:10px; }
.fn-tier-price b{ font-family:var(--font-display); font-size:1.5rem; }
.fn-tier-price span{ font-size:.8rem; color:var(--text-dim); }
.fn-tier-pay{ font-size:.82rem; color:var(--text-muted); line-height:1.5; margin-bottom:12px; }
.fn-tier-pay em{ color:var(--text); font-style:normal; font-weight:600; }
.fn-tier-inc{ list-style:none; margin:0; padding:0; display:grid; gap:6px; }
.fn-tier-inc li{ position:relative; padding-left:22px; font-size:.9rem; color:var(--text-muted); }
.fn-tier-inc li::before{ content:"\2713"; position:absolute; left:0; color:var(--cyan); font-weight:700; }
.fn-flag{ position:absolute; top:-9px; right:16px; background:var(--grad-fill); color:var(--on-fill); font-size:.64rem; letter-spacing:.06em; text-transform:uppercase; padding:3px 10px; border-radius:100px; font-family:var(--font-display); font-weight:600; }
.fn-presets{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.fn-preset{ cursor:pointer; text-align:left; padding:0; border-radius:14px; overflow:hidden; background:var(--surface-2); border:1.5px solid var(--border); color:var(--text); font-family:inherit; transition:border-color .18s; }
.fn-preset:hover{ border-color:var(--border-strong); }
.fn-preset.sel{ border-color:var(--cyan); }
.fn-preset:focus-visible{ outline:2px solid var(--cyan); outline-offset:2px; }
.fn-swatch{ display:flex; height:72px; }
.fn-swatch i{ flex:1; }
.fn-pmeta{ display:block; padding:10px 12px 12px; }
.fn-pname{ display:block; font-family:var(--font-display); font-weight:600; font-size:1rem; }
.fn-preset.sel .fn-pname::after{ content:" \2713"; color:var(--cyan); }
.fn-pvibe{ display:block; font-size:.76rem; color:var(--text-muted); line-height:1.4; }
.fn-fields{ display:grid; gap:14px; }
.fn-field label{ display:block; font-family:var(--font-display); font-size:.82rem; color:var(--text-muted); margin-bottom:6px; }
.fn-field input{ width:100%; padding:13px 14px; border-radius:12px; border:1.5px solid var(--border); background:var(--surface-2); color:var(--text); font-family:inherit; font-size:1rem; transition:border-color .2s, box-shadow .2s; }
.fn-field input:focus{ outline:none; border-color:var(--cyan); box-shadow:0 0 0 3px rgba(34,224,255,.12); }
.fn-nav{ display:flex; gap:12px; margin-top:22px; }
.fn-btn-next{ flex:1; }
.fn-btn-lg{ width:100%; justify-content:center; }
.btn.fn-btn-next:disabled{ opacity:.4; cursor:not-allowed; box-shadow:none; }
.fn-intro{ text-align:center; padding:36px 22px 28px; }
.fn-kicker{ font-family:var(--font-display); font-size:.72rem; letter-spacing:.18em; text-transform:uppercase; color:var(--cyan); margin-bottom:16px; }
.fn-intro h1{ font-family:var(--font-display); font-weight:800; font-size:clamp(2rem,8vw,2.8rem); line-height:1.08; margin:0 0 14px; }
.fn-intro p{ color:var(--text-muted); font-size:1.02rem; max-width:34ch; margin:0 auto 26px; }
.fn-re{ display:flex; gap:18px; justify-content:center; flex-wrap:wrap; margin-top:22px; font-size:.82rem; color:var(--text-dim); }
.fn-re span{ position:relative; padding-left:18px; }
.fn-re span::before{ content:"\2713"; position:absolute; left:0; color:var(--cyan); }
.fn-done{ text-align:center; }
.fn-party{ font-size:2rem; }
.fn-big{ font-family:var(--font-display); font-weight:700; font-size:clamp(1.6rem,6vw,2.1rem); margin:6px 0 4px; }
.fn-lead{ color:var(--text-muted); margin:0 auto 22px; max-width:36ch; }
.fn-recap{ text-align:left; background:var(--surface-2); border:1px solid var(--border); border-radius:16px; padding:18px; margin-bottom:20px; }
.fn-rrow{ display:flex; justify-content:space-between; gap:12px; padding:7px 0; border-top:1px solid var(--border); font-size:.92rem; }
.fn-rrow:first-child{ border-top:0; }
.fn-rrow span:first-child{ color:var(--text-muted); }
.fn-rrow span:last-child{ font-weight:600; text-align:right; color:var(--text); }
.fn-rprice{ margin-top:12px; padding-top:12px; border-top:1.5px solid var(--border-strong); }
.fn-tot{ display:flex; justify-content:space-between; font-family:var(--font-display); font-weight:700; font-size:1.15rem; }
.fn-rprice small{ display:block; color:var(--text-muted); font-size:.82rem; margin-top:4px; }
.fn-wa{ background:#25D366; color:#062b14; display:inline-flex; align-items:center; justify-content:center; gap:10px; }
.fn-wa:hover{ background:#20bd5a; }
.fn-wa svg{ width:20px; height:20px; }
.fn-alt{ display:inline-block; margin-top:14px; color:var(--text-muted); font-size:.9rem; }
.fn-details{ margin-top:22px; text-align:left; }
.fn-details summary{ cursor:pointer; font-size:.78rem; color:var(--text-dim); letter-spacing:.04em; }
.fn-pre{ margin-top:10px; padding:12px; border-radius:12px; background:var(--surface-2); border:1px solid var(--border); font-size:.72rem; white-space:pre-wrap; word-break:break-word; color:var(--text-muted); font-family:ui-monospace,Menlo,Consolas,monospace; }
@media (max-width:430px){ .fn-presets{ grid-template-columns:1fr; } }

/* ============================================================
   FX v10 — Funnel: prezzo di lancio, listino barrato, ancore
   ============================================================ */
.fn-tier-old{ font-family:var(--font-display); font-size:1rem; color:var(--text-dim); text-decoration:line-through; text-decoration-thickness:1.5px; opacity:.75; }
.fn-tier-camp{ font-size:.72rem; line-height:1.45; color:var(--cyan); margin:-4px 0 10px; letter-spacing:.01em; }
.fn-tier-pay br{ content:""; display:block; height:2px; }
.fn-ancora{ margin:18px 0 0; padding:12px 14px; border-radius:12px; background:var(--surface-2); border:1px solid var(--border); color:var(--text-muted); font-size:.84rem; line-height:1.55; }
.fn-secco{ margin:10px 0 0; font-family:var(--font-display); font-weight:600; font-size:.92rem; color:var(--text); text-align:center; }
.fn-scad{ margin:8px 0 0; font-size:.76rem; color:var(--text-dim); text-align:center; }

/* ============================================================
   FX v11 — Configuratore: layout con anteprima, settori, logo, catalogo
   ============================================================ */
.fn-layout{ display:grid; grid-template-columns:minmax(0,1fr); gap:26px; width:100%; max-width:1180px; margin:0 auto; padding:0 20px; align-items:start; justify-items:center; }
.fn-layout .fn-wrap{ padding:0; max-width:600px; width:100%; }
.fn-prev-col{ position:sticky; top:96px; }
.fn-prev-tit{ font-family:var(--font-display); font-size:.72rem; letter-spacing:.16em; text-transform:uppercase; color:var(--text-dim); margin-bottom:10px; }
@media (min-width:1024px){
  .fn-layout{ grid-template-columns:minmax(0,1fr) minmax(320px,440px); justify-items:stretch; }
  #funnelPage{ align-items:flex-start; }
}
@media (max-width:1023px){
  .fn-prev-col{ position:static; margin-top:8px; }
  .fn-layout{ gap:18px; }
}

/* ---------- il tasto Avanti non si schiaccia ----------
   In basso ci sono solo Indietro e Avanti; sui passi che si possono lasciare
   per dopo, finche' sono vuoti, Avanti dice «Lo faccio dopo». */
.fn-nav .btn{ min-width:0; }
.fn-btn-back{ flex:none; }

/* ---------- l'anteprima sul telefono: pannello a scomparsa con linguetta ---------- */
.fn-linguetta, .fn-prev-velo, .fn-prev-chiudi{ display:none; }
.fn-prev-testa{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; }
.fn-prev-testa .fn-prev-tit{ margin-bottom:0; }
@media (max-width:1023px){
  .fn-prev-col{
    position:fixed; top:0; right:0; bottom:0; z-index:1200; margin:0;
    width:min(94vw,480px); overflow-y:auto; overscroll-behavior:contain;
    padding:calc(14px + env(safe-area-inset-top)) 14px calc(18px + env(safe-area-inset-bottom));
    background:var(--bg-2); border-left:1px solid var(--border-strong);
    box-shadow:-30px 0 60px -30px rgba(0,0,0,.6);
    transform:translateX(105%); visibility:hidden;
    transition:transform .32s var(--ease), visibility 0s .32s;
  }
  .fn-prev-col.aperta{ transform:none; visibility:visible; transition:transform .32s var(--ease), visibility 0s; }
  .fn-prev-chiudi{ display:grid; place-items:center; width:44px; height:44px; border-radius:12px; border:1px solid var(--border-strong); background:var(--surface-2); color:var(--text); font-size:1.5rem; line-height:1; cursor:pointer; }
  .fn-prev-velo:not([hidden]){ display:block; position:fixed; inset:0; z-index:1190; background:rgba(5,6,12,.55); -webkit-backdrop-filter:blur(2px); backdrop-filter:blur(2px); }
  .fn-linguetta{
    display:flex; flex-direction:column; align-items:center; gap:8px;
    position:fixed; right:0; top:50%; transform:translateY(-50%); z-index:1100;
    padding:14px 9px; border-radius:14px 0 0 14px; border:1px solid var(--border-strong); border-right:0;
    background:var(--grad-fill); color:var(--on-fill); cursor:pointer;
    font-family:var(--font-display); font-weight:700; font-size:.82rem; letter-spacing:.05em;
    box-shadow:-10px 10px 30px -14px rgba(0,0,0,.6);
    transition:opacity .2s;
  }
  .fn-linguetta span:last-child{ writing-mode:vertical-rl; transform:rotate(180deg); }
  .fn-linguetta-ico svg{ display:block; width:18px; height:18px; }
  .fn-prev-col.aperta ~ .fn-linguetta{ opacity:0; pointer-events:none; }
  .fn-linguetta.saluta{ animation:fn-saluta 1.1s var(--ease) .7s 2; }
  html.fn-prev-bloccata, html.fn-prev-bloccata body{ overflow:hidden; }
}
@keyframes fn-saluta{ 0%,100%{ transform:translateY(-50%); } 40%{ transform:translate(-12px,-50%); } }
@media (prefers-reduced-motion:reduce){ .fn-prev-col{ transition:none !important; } .fn-linguetta.saluta{ animation:none; } }

/* ============================================================
   CONFIGURATORE A TUTTO SCHERMO (/sito-pronto), come /crea-curriculum
   Niente menu ne' piede del sito. Sul telefono e' un'app: in alto la barra
   del curriculum (.cv-appbar) con il passo e l'avanzamento, le domande a
   tutta larghezza, Indietro/Avanti fermi in basso sotto il pollice,
   l'anteprima dalla linguetta. Sul computer: domande in una scheda,
   anteprima ferma a destra, che entra tutta nello schermo.
   ============================================================ */
.fn-pagina { background: var(--bg); min-height: 100vh; min-height: 100dvh; }
/* --fn-opaco: la scheda e la barra in fondo sul computer devono coprire
   quello che ci scorre sotto (--surface e' trasparente), come nel curriculum */
.fn-app { --nav-h: 58px; --fn-opaco: #0e0f15; min-height: 100vh; min-height: 100dvh; }
html[data-theme="light"] .fn-app { --fn-opaco: #f7f8fb; }
.fn-app #funnelPage { display: block; min-height: 0; }
.fn-carico { padding: 48px 20px; text-align: center; color: var(--text-muted); }
.fn-carico a { color: var(--cyan); text-decoration: underline; }
/* il passo nella barra si legge e basta: niente elenco a tendina */
.fn-testa { cursor: default; }
.fn-testa:hover { background: none; }
.fn-q:focus, .fn-intro h1:focus, .fn-big:focus { outline: none; }

/* le domande: a tutta larghezza, senza scheda */
.fn-app .fn-layout { display: block; max-width: none; padding: 0; }
.fn-app .fn-wrap { max-width: 640px; padding: 0 0 calc(86px + env(safe-area-inset-bottom, 0px)); }
.fn-pagina .fn-app .fn-card {
  border: 0; border-radius: 0; background: none; box-shadow: none;
  padding: 22px max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px));
}
.fn-app .fn-wrap-intro {
  display: grid; align-content: center; padding-bottom: 0;
  min-height: calc(100vh - var(--nav-h)); min-height: calc(100dvh - var(--nav-h));
}
.fn-pagina .fn-app .fn-intro { padding: 28px max(16px, env(safe-area-inset-right, 0px)) 36px max(16px, env(safe-area-inset-left, 0px)); }

/* Indietro / Avanti: fermi in basso */
.fn-app .fn-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; margin: 0;
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px;
  /* sul tablet i tasti stanno nella stessa colonna delle domande (640 px), non da bordo a bordo */
  padding: 10px max(16px, env(safe-area-inset-right, 0px), calc((100% - 640px) / 2))
           calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px), calc((100% - 640px) / 2));
  background: var(--bg); border-top: 1px solid var(--border);
}
.fn-app .fn-nav.solo-avanti { grid-template-columns: minmax(0, 1fr); }
.fn-app .fn-nav .btn { padding: 14px 18px; }
.fn-app .fn-nav .fn-wa { gap: 8px; }
.fn-app .fn-nav .fn-wa span { overflow: hidden; text-overflow: ellipsis; }
/* il riepilogo finisce sopra i tasti: l'ultima riga non resta sotto la barra */
.fn-app .fn-done .fn-details { margin-bottom: 8px; }
/* sul telefono la linguetta dell'anteprima ha la sua corsia a destra: non copre mai prezzi e
   risposte. Sul tablet le domande stanno in 640 px e la linguetta sta gia' nel margine. */
@media (max-width: 1023px) {
  .fn-app .fn-linguetta { padding-left: 8px; padding-right: 8px; }
}
@media (max-width: 719px) {
  .fn-pagina .fn-app .fn-layout.con-anteprima .fn-card { padding-right: max(48px, env(safe-area-inset-right, 0px)); }
}

/* ---------- sul computer: TUTTO lo schermo ----------
   Sotto la barra due pannelli alti quanto lo schermo: a sinistra le domande (scorrono da
   sole, Indietro/Avanti fermi in fondo al pannello), a destra l'anteprima grande quanto
   resta, fino alla grandezza vera della versione computer. «Schermo intero» la apre su
   tutto lo schermo (anteprima.js). Prima: una colonna di 620 px e un riquadro piccolo. */
.fn-intro p { text-wrap: pretty; }
@media (min-width: 1024px) {
  .fn-app { --nav-h: 64px; }
  .fn-app .fn-layout {
    display: grid; grid-template-columns: clamp(440px, 34vw, 600px) minmax(0, 1fr);
    gap: 0; max-width: none; margin: 0; padding: 0; align-items: stretch;
    height: calc(100vh - var(--nav-h)); height: calc(100dvh - var(--nav-h));
  }
  .fn-app .fn-wrap {
    display: flex; flex-direction: column; max-width: none; padding: 0; min-height: 0;
    overflow-y: auto; overscroll-behavior: contain;
    background: var(--fn-opaco); border-right: 1px solid var(--border);
  }
  .fn-pagina .fn-app .fn-card {
    flex: 1 0 auto; display: flex; flex-direction: column;
    border: 0; border-radius: 0; background: none; box-shadow: none; padding: 34px 36px 0;
  }
  /* Indietro/Avanti in fondo al pannello: anche sui passi corti stanno giu', sotto il pollice del mouse */
  .fn-app .fn-nav {
    position: sticky; left: auto; right: auto; bottom: 0; z-index: 5;
    display: flex; justify-content: space-between;
    margin: auto -36px 0; padding: 16px 36px;
    border-radius: 0; background: var(--fn-opaco); border-top: 1px solid var(--border);
  }
  .fn-app .fn-card > :not(.fn-nav):nth-last-child(2) { margin-bottom: 28px; }
  .fn-app .fn-nav.solo-avanti { justify-content: flex-end; }
  .fn-app .fn-nav .btn { flex: none; }
  /* l'anteprima: tutto quello che resta, alta quanto lo schermo */
  .fn-app .fn-prev-col {
    position: relative; top: auto; height: 100%; max-height: none; min-width: 0; overflow: hidden;
    padding: 18px 28px 12px; border: 0; border-radius: 0;
    background: radial-gradient(ellipse at 50% 40%, rgba(34, 224, 255, .06), transparent 65%), var(--bg);
  }
  html[data-theme="light"] .fn-app .fn-prev-col { background: var(--bg-2); }
  .fn-app #fnPrev .ap-pie { margin-bottom: 0; }
  /* il benvenuto: a sinistra, centrato in altezza */
  .fn-app .fn-layout-intro .fn-wrap { justify-content: center; }
  .fn-app .fn-layout-intro .fn-wrap-intro { min-height: 0; margin: 0; }
  .fn-pagina .fn-app .fn-layout-intro .fn-intro { flex: none; display: block; text-align: left; padding: 44px 44px 40px; }
  .fn-app .fn-layout-intro .fn-intro h1 { font-size: clamp(2rem, 2.6vw, 2.6rem); text-wrap: balance; }
  .fn-app .fn-layout-intro .fn-intro p { margin-left: 0; max-width: 40ch; }
  .fn-app .fn-layout-intro .fn-re { justify-content: flex-start; }
}

/* scelta del settore */
.fn-settori{ display:grid; grid-template-columns:repeat(auto-fill,minmax(140px,1fr)); gap:10px; }
.fn-settore{ display:flex; flex-direction:column; align-items:center; gap:8px; padding:18px 12px; border-radius:16px; cursor:pointer; background:var(--surface-2); border:1.5px solid var(--border); color:var(--text); font-family:inherit; transition:border-color .18s, background .18s, transform .06s; }
.fn-settore:hover:not(.spento){ border-color:var(--border-strong); }
.fn-settore:active:not(.spento){ transform:scale(.985); }
.fn-settore.sel{ border-color:var(--cyan); background:var(--grad-soft); }
.fn-settore:focus-visible{ outline:2px solid var(--cyan); outline-offset:2px; }
.fn-settore-ico{ font-size:1.9rem; line-height:1; }
.fn-settore-nome{ font-family:var(--font-display); font-weight:600; font-size:.95rem; text-align:center; }
.fn-settore.spento{ opacity:.45; cursor:not-allowed; }
.fn-settore-presto{ font-size:.62rem; letter-spacing:.1em; text-transform:uppercase; color:var(--text-dim); }

/* il canone dentro la scheda pacchetto */
.fn-tier-canone{ margin:10px 0 12px; padding:10px 12px; border-radius:12px; background:var(--grad-soft); border:1px solid var(--border); font-size:.86rem; color:var(--text-muted); }
.fn-tier-canone b{ font-family:var(--font-display); font-size:1.05rem; color:var(--text); }
.fn-tier-canone small{ display:block; margin-top:3px; font-size:.74rem; color:var(--text-dim); }

/* logo */
.fn-logo{ display:grid; gap:12px; justify-items:center; }
.fn-logo-drop{ display:flex; flex-direction:column; align-items:center; gap:8px; width:100%; padding:30px 20px; border-radius:16px; cursor:pointer; background:var(--surface-2); border:1.5px dashed var(--border-strong); color:var(--text-muted); text-align:center; transition:border-color .18s, background .18s; }
.fn-logo-drop:hover{ border-color:var(--cyan); background:var(--grad-soft); }
.fn-logo-drop span:nth-child(2){ font-family:var(--font-display); font-weight:600; color:var(--text); }
.fn-logo-drop small{ font-size:.76rem; color:var(--text-dim); }
.fn-logo-ico{ font-size:2rem; line-height:1; }
.fn-logo-vista{ display:grid; place-items:center; width:100%; padding:22px; border-radius:16px; background:var(--surface-2); border:1px solid var(--border); }
.fn-logo-vista img{ max-width:220px; max-height:120px; object-fit:contain; }
.fn-nota{ margin:0; font-size:.82rem; color:var(--text-muted); min-height:1em; text-align:center; }

/* catalogo */
.fn-catalogo{ display:grid; gap:8px; }
.fn-art{ display:grid; grid-template-columns:1fr 92px 40px; gap:8px; align-items:center; }
.fn-art input{ width:100%; padding:12px 12px; border-radius:12px; border:1.5px solid var(--border); background:var(--surface-2); color:var(--text); font-family:inherit; font-size:.95rem; transition:border-color .2s, box-shadow .2s; }
.fn-art input:focus{ outline:none; border-color:var(--cyan); box-shadow:0 0 0 3px rgba(34,224,255,.12); }
.fn-art-via{ width:40px; height:40px; border-radius:12px; border:1.5px solid var(--border); background:transparent; color:var(--text-dim); font-size:1.3rem; line-height:1; cursor:pointer; transition:border-color .18s, color .18s; }
.fn-art-via:hover{ border-color:#e5484d; color:#e5484d; }
.fn-art-piu{ margin-top:4px; padding:13px; border-radius:12px; border:1.5px dashed var(--border-strong); background:transparent; color:var(--text-muted); font-family:var(--font-display); font-weight:600; font-size:.92rem; cursor:pointer; transition:border-color .18s, color .18s; }
.fn-art-piu:hover{ border-color:var(--cyan); color:var(--text); }

/* domande specifiche del settore */
.fn-domande{ display:grid; gap:20px; }
.fn-dom-q{ font-family:var(--font-display); font-weight:600; font-size:1rem; margin-bottom:3px; }
.fn-dom-help{ font-size:.82rem; color:var(--text-muted); margin-bottom:9px; }
.fn-dom-opts{ display:flex; flex-wrap:wrap; gap:8px; }
.fn-dom-opt{ padding:9px 15px; border-radius:100px; cursor:pointer; background:var(--surface-2); border:1.5px solid var(--border); color:var(--text); font-family:inherit; font-size:.9rem; transition:border-color .18s, background .18s; }
.fn-dom-opt:hover{ border-color:var(--border-strong); }
.fn-dom-opt.sel{ border-color:var(--cyan); background:var(--grad-soft); }
.fn-dom-opt:focus-visible{ outline:2px solid var(--cyan); outline-offset:2px; }
.fn-dom-testo{ width:100%; padding:12px 13px; border-radius:12px; border:1.5px solid var(--border); background:var(--surface-2); color:var(--text); font-family:inherit; font-size:.95rem; resize:vertical; transition:border-color .2s, box-shadow .2s; }
.fn-dom-testo:focus{ outline:none; border-color:var(--cyan); box-shadow:0 0 0 3px rgba(34,224,255,.12); }

/* ============================================================
   FX v12 — Scelta dello schizzo e delle sezioni
   ============================================================ */
.fn-schizzi{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.fn-schizzo{ display:flex; flex-direction:column; gap:0; padding:0; overflow:hidden; cursor:pointer; text-align:left; background:var(--surface-2); border:1.5px solid var(--border); border-radius:16px; color:var(--text); font-family:inherit; transition:border-color .18s, transform .06s; }
.fn-schizzo:hover{ border-color:var(--border-strong); }
.fn-schizzo:active{ transform:scale(.99); }
.fn-schizzo.sel{ border-color:var(--cyan); }
.fn-schizzo:focus-visible{ outline:2px solid var(--cyan); outline-offset:2px; }

/* la miniatura: tre barre disposte in modo diverso per ogni schizzo */
.fn-sk{ display:flex; flex-direction:column; gap:5px; height:86px; padding:14px; background:var(--surface); border-bottom:1px solid var(--border); }
.fn-sk i{ display:block; background:var(--border-strong); border-radius:3px; }
.fn-sk-classico{ align-items:center; justify-content:center; }
.fn-sk-classico i:nth-child(1){ width:52%; height:11px; background:var(--grad-fill); }
.fn-sk-classico i:nth-child(2){ width:34%; height:6px; }
.fn-sk-classico i:nth-child(3){ width:70%; height:20px; margin-top:5px; }
.fn-sk-editoriale{ align-items:flex-start; justify-content:center; }
.fn-sk-editoriale i:nth-child(1){ width:26%; height:5px; }
.fn-sk-editoriale i:nth-child(2){ width:80%; height:18px; background:var(--grad-fill); }
.fn-sk-editoriale i:nth-child(3){ width:46%; height:6px; }
.fn-sk-griglia{ justify-content:flex-start; }
.fn-sk-griglia i:nth-child(1){ width:40%; height:7px; background:var(--grad-fill); }
.fn-sk-griglia i:nth-child(2){ width:100%; height:22px; }
.fn-sk-griglia i:nth-child(3){ width:100%; height:22px; }
.fn-sk-manifesto{ padding:0; justify-content:center; align-items:center; gap:6px; background:var(--grad-fill); }
.fn-sk-manifesto i:nth-child(1){ width:30%; height:5px; background:var(--on-fill); opacity:.55; }
.fn-sk-manifesto i:nth-child(2){ width:64%; height:20px; background:var(--on-fill); }
.fn-sk-manifesto i:nth-child(3){ display:none; }
.fn-sk-meta{ display:block; padding:12px 14px 14px; }
.fn-sk-nome{ display:block; font-family:var(--font-display); font-weight:600; font-size:1rem; }
.fn-schizzo.sel .fn-sk-nome::after{ content:" \2713"; color:var(--cyan); }
.fn-sk-vibe{ display:block; font-size:.78rem; color:var(--text-muted); line-height:1.4; margin-top:2px; }
.fn-sk-per{ display:block; font-size:.72rem; color:var(--text-dim); margin-top:6px; }

/* le sezioni da accendere e spegnere */
.fn-sezioni{ display:grid; gap:8px; }
.fn-sez-riga{ display:flex; align-items:center; justify-content:space-between; gap:14px; width:100%; padding:14px 16px; cursor:pointer; background:var(--surface-2); border:1.5px solid var(--border); border-radius:14px; color:var(--text-dim); font-family:inherit; font-size:.98rem; text-align:left; transition:border-color .18s, color .18s, background .18s; }
.fn-sez-riga:hover{ border-color:var(--border-strong); }
.fn-sez-riga.on{ color:var(--text); border-color:var(--cyan); background:var(--grad-soft); }
.fn-sez-riga:focus-visible{ outline:2px solid var(--cyan); outline-offset:2px; }
.fn-lev{ flex:none; width:44px; height:26px; border-radius:100px; background:var(--surface); border:1.5px solid var(--border-strong); position:relative; transition:background .2s, border-color .2s; }
.fn-lev i{ position:absolute; top:3px; left:3px; width:16px; height:16px; border-radius:50%; background:var(--text-dim); transition:transform .2s, background .2s; }
.fn-sez-riga.on .fn-lev{ background:var(--grad-fill); border-color:transparent; }
.fn-sez-riga.on .fn-lev i{ transform:translateX(18px); background:var(--on-fill); }
@media (max-width:520px){ .fn-schizzi{ grid-template-columns:1fr; } }

/* ============================================================
   FX v13 — Pagine legali, errori del modulo, footer legale
   ============================================================ */
.legal { max-width: 78ch; }
.legal .aggiornato { color: var(--text-dim); font-size: .9rem; margin: 0 0 8px; }
.legal .nota-minore { color: var(--text-dim); font-size: .9rem; }
.legal h2 { font-family: var(--font-display); font-size: 1.35rem; line-height: 1.3; margin: 44px 0 12px; }
.legal h3 { font-family: var(--font-display); font-size: 1.05rem; margin: 28px 0 8px; color: var(--text); }
.legal p, .legal li { color: var(--text-muted); line-height: 1.75; }
.legal p + p { margin-top: 12px; }
.legal ul { list-style: disc; margin: 10px 0 0 1.2em; padding: 0; }
.legal li + li { margin-top: 6px; }
.legal b { color: var(--text); }
.legal a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.legal-scroll { overflow-x: auto; margin-top: 12px; }
.legal-tab { width: 100%; min-width: 560px; border-collapse: collapse; font-size: .92rem; }
.legal-tab th, .legal-tab td { text-align: left; vertical-align: top; padding: 11px 12px; border-top: 1px solid var(--border); color: var(--text-muted); }
.legal-tab th { border-top: 0; color: var(--text); font-family: var(--font-display); font-weight: 600; }
.legal-tab td:first-child { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; color: var(--text); }

.contact-info-card .row .sede { display: block; }
.form-note a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.form-error { display: none; margin-top: 16px; padding: 16px 18px; border-radius: 12px; background: rgba(255, 90, 100, .1); border: 1px solid rgba(255, 90, 100, .4); color: #ffaab1; font-size: .95rem; }
.form-error.show { display: block; }
html[data-theme="light"] .form-error { color: #a1202b; }
/* campo trappola: fuori dallo schermo, ma non display:none (alcuni robot lo saltano) */
.hp { position: absolute !important; left: -10000px !important; top: auto; width: 1px; height: 1px; overflow: hidden; }

.footer-legal a { color: var(--text-dim); text-decoration: underline; text-underline-offset: 3px; transition: color .2s; }
.footer-legal a:hover { color: var(--cyan); }
.footer-brand .footer-sedi { margin-top: 10px; font-size: .88rem; color: var(--text-dim); }

/* accesso all'area riservata: stessa forma del selettore del tema */
.nav-user {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface);
  display: grid; place-items: center; color: var(--text-muted);
  transition: color .25s, border-color .25s, box-shadow .25s;
}
.nav-user:hover { color: var(--cyan); border-color: var(--cyan); box-shadow: var(--glow-cyan); }
.nav-user:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ---------- "Troppo scuro?": fumetto sul pulsante del tema, prima visita ---------- */
.tema-suggerimento {
  position: fixed; z-index: 1000;
  width: min(290px, calc(100vw - 24px));
  padding: 16px 16px 14px; border-radius: 16px;
  background: var(--bg-2); border: 1px solid var(--border);
  box-shadow: 0 22px 50px -18px rgba(0, 0, 0, .7), var(--glow-cyan);
  color: var(--text);
  opacity: 0; transform: translateY(-6px) scale(.98);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.tema-suggerimento.in { opacity: 1; transform: none; }
.tema-suggerimento::before {
  content: ""; position: absolute; top: -7px; left: var(--freccia, 50%);
  width: 12px; height: 12px; margin-left: -6px;
  background: var(--bg-2); border-left: 1px solid var(--border); border-top: 1px solid var(--border);
  transform: rotate(45deg);
}
.tema-suggerimento strong { display: block; font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 4px; }
.tema-suggerimento p { color: var(--text-muted); font-size: .9rem; line-height: 1.5; margin: 0 0 12px; }
.tema-suggerimento .azioni { display: flex; flex-wrap: wrap; gap: 8px; }
.tema-suggerimento button { min-height: 38px; padding: 8px 14px; border-radius: 10px; font-family: var(--font-display); font-weight: 600; font-size: .86rem; cursor: pointer; }
.tema-suggerimento .si { background: var(--grad-fill); color: var(--on-fill); border: 0; }
.tema-suggerimento .no { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.tema-suggerimento .no:hover { color: var(--text); border-color: var(--text-muted); }
.tema-suggerimento button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.theme-toggle.nav-tema-evidenza { color: var(--cyan); border-color: var(--cyan); animation: temaPulsa 1.6s var(--ease) infinite; }
@keyframes temaPulsa {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 224, 255, .5); }
  60% { box-shadow: 0 0 0 10px rgba(34, 224, 255, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .tema-suggerimento { transition: none; }
  .theme-toggle.nav-tema-evidenza { animation: none; }
}

/* ============================================================
   FX v14 — Playground rifatto: scheda larga, stili che cambiano da soli
   ============================================================ */
/* la scheda del design occupa tutta la riga: il pannello di anteprima ha
   bisogno di respiro, e con tre schede la griglia resterebbe zoppa */
.pg-wide { grid-column: 1 / -1; }

.pg-note { margin-top: 2px; font-size: .78rem; color: var(--text-dim); line-height: 1.5; }

/* barra sotto l'anteprima: nome dello stile, pallini, pulsante */
.stile-barra { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 16px; }
.stile-nome {
  font-family: var(--font-display); font-weight: 600; font-size: .92rem;
  color: var(--text); min-width: 11ch;
}
.stile-punti { display: flex; gap: 7px; margin-right: auto; }
.stile-punti i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--border-strong);
  transition: background .3s, transform .3s;
}
.stile-punti i.on { background: var(--cyan); transform: scale(1.35); }

/* il cambio stile e' una dissolvenza corta: le variabili CSS non si
   interpolano, e uno scatto secco sembrerebbe un difetto */
.brand-mini { transition: opacity .24s ease; }
.brand-mini.cambio { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .brand-mini { transition: none; }
  .stile-punti i { transition: none; }
}

/* la scheda che legge la fattura vive in home dentro una .pg-card */
.pg-card.tool-card { padding: 28px; }
.pg-card .tool-body { margin-top: 2px; }

/* ============================================================
   FX v15 — Le tre porte della home
   ============================================================ */
/* Le schede devono avere la stessa altezza e il collegamento sempre in fondo,
   allineato tra le tre: un invito che balla a mezza altezza si legge come tre
   inviti diversi invece che come tre strade pari. */
.porte .porta { display: flex; flex-direction: column; }
.porta p { margin-bottom: 22px; }
.porta .porta-link { margin-top: auto; }
.porta-link {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  font-family: var(--font-display); font-weight: 700;
  font-size: .78rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--cyan);
  padding-bottom: 3px; border-bottom: 1px solid transparent;
  transition: border-color .25s, gap .25s;
}
.porta-link:hover { border-bottom-color: var(--cyan); gap: 12px; }
.porta-link:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }
.porta-link .arrow { transition: transform .25s var(--ease); }
.porta:hover .porta-link .arrow { transform: translateX(3px); }

/* ============================================================
   MENU "STRUMENTI"
   Sul computer una tendina; nel menu a tutto schermo del telefono le voci
   stanno gia' aperte sotto il titolo del gruppo. Sito Pronto e' la voce in
   evidenza. Sul telefono niente animazioni nuove: solo l'opacita' che il
   menu usa gia' (vedi il commento sul menu a tutto schermo).
   ============================================================ */
.nav-gruppo { position: relative; display: flex; }
.nav-apri {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-display); font-weight: 500; font-size: .95rem;
  color: var(--text-muted); background: none; border: 0; cursor: pointer;
  padding: 9px 11px; border-radius: 10px; white-space: nowrap;
  transition: color .25s;
}
.nav-apri:hover, .nav-gruppo.aperto .nav-apri, .nav-apri.active { color: var(--text); }
.nav-apri:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
/* la voce attiva ha la stessa sottolineatura sfumata delle altre */
.nav-apri.active {
  background-image: var(--grad); background-repeat: no-repeat;
  background-size: calc(100% - 22px) 2px; background-position: 11px calc(100% - 1px);
}
.nav-freccia { transition: transform .2s var(--ease); }

.nav-links a.nav-voce {
  display: grid; gap: 3px; padding: 12px 14px; border-radius: 12px;
  white-space: normal; color: var(--text); text-align: left;
  transition: background .2s;
}
.nav-links a.nav-voce::after { display: none; }
.nav-links a.nav-voce:hover, .nav-links a.nav-voce.active { background: var(--surface-2); }
.nav-voce-tit { font-family: var(--font-display); font-weight: 600; font-size: .98rem; line-height: 1.25; }
.nav-voce-desc { font-family: var(--font-body); font-weight: 400; font-size: .84rem; line-height: 1.35; color: var(--text-muted); }
.nav-badge {
  justify-self: start; margin-bottom: 4px; padding: 4px 8px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 700; font-size: .62rem; line-height: 1;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--on-fill); background: var(--grad-fill);
}
/* Sito Pronto: bordo sfumato e titolo nel colore del marchio */
.nav-links a.nav-voce.evidenza {
  border: 1px solid transparent; padding: 14px 16px; margin-bottom: 4px;
  background: linear-gradient(var(--bg-2), var(--bg-2)) padding-box, var(--grad-fill) border-box;
}
.nav-links a.nav-voce.evidenza:hover,
.nav-links a.nav-voce.evidenza.active {
  background: linear-gradient(var(--bg-3), var(--bg-3)) padding-box, var(--grad-fill) border-box;
}
.nav-voce.evidenza .nav-voce-tit {
  font-size: 1.12rem;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}

@media (min-width: 1201px) {
  .nav-tendina {
    position: absolute; top: calc(100% + 12px); left: 50%; z-index: 5;
    width: 330px; margin-left: -165px;
    display: grid; gap: 4px; padding: 10px;
    border-radius: 18px; background: var(--bg-2);
    border: 1px solid var(--border-strong);
    box-shadow: 0 30px 70px -28px rgba(0, 0, 0, .7);
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity .18s ease, transform .22s var(--ease), visibility 0s .22s;
  }
  /* un ponte invisibile tra la voce e la tendina: il mouse ci passa sopra
     senza che la tendina si chiuda */
  .nav-tendina::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
  .nav-gruppo:hover .nav-tendina,
  .nav-gruppo.aperto .nav-tendina { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .nav-gruppo:hover .nav-freccia,
  .nav-gruppo.aperto .nav-freccia { transform: rotate(180deg); }
  /* scelta una voce, la tendina si ritira anche col mouse ancora sopra */
  .nav-gruppo.riposo .nav-tendina { opacity: 0; visibility: hidden; transform: translateY(-6px); }
  .nav-gruppo.riposo .nav-freccia { transform: none; }
  html[data-theme="light"] .nav-tendina { box-shadow: 0 30px 70px -30px rgba(20, 30, 60, .45); }
}

@media (max-width: 1200px) {
  .nav-gruppo { width: 100%; flex-direction: column; align-items: stretch; }
  .nav-apri {
    width: 100%; justify-content: flex-start; cursor: default; gap: 0;
    font-size: clamp(2rem, 9vw, 2.7rem); font-weight: 700; padding: 12px 0;
    opacity: 0; transition: opacity .22s linear, color .25s;
  }
  .nav-links.open .nav-apri { opacity: 1; transition-delay: .17s; }
  .nav-apri::before {
    counter-increment: navItem; content: "0" counter(navItem);
    align-self: flex-start; margin: .5em 16px 0 0;
    font-size: .85rem; font-weight: 600; letter-spacing: .1em; color: var(--cyan);
  }
  .nav-apri.active { background: none; }
  .nav-freccia { display: none; }
  .nav-tendina { display: grid; gap: 8px; width: 100%; padding: 2px 0 14px; }
  .nav-links a.nav-voce {
    width: 100%; padding: 12px 14px; font-size: 1rem; font-weight: 500;
    border: 1px solid var(--border); background: var(--surface);
  }
  .nav-links a.nav-voce::before { content: none; }
  .nav-links a.nav-voce.active {
    background: var(--surface-2); -webkit-background-clip: border-box; background-clip: border-box; color: var(--text);
  }
  .nav-links a.nav-voce.evidenza,
  .nav-links a.nav-voce.evidenza.active {
    border-color: transparent;
    background: linear-gradient(var(--bg-2), var(--bg-2)) padding-box, var(--grad-fill) border-box;
    -webkit-background-clip: padding-box, border-box; background-clip: padding-box, border-box;
  }
}

/* il pie' di pagina ha una colonna in piu', "Strumenti": sul telefono il
   marchio va su una riga sua e le quattro colonne restano due per due */
@media (max-width: 1000px) {
  .footer-brand { grid-column: 1 / -1; }
}

/* ============================================================
   SITO PRONTO (pagina di presentazione, senza prezzi)
   ============================================================ */
.sp-azioni { justify-content: flex-start; margin-top: 30px; }
.sp-lista { list-style: none; display: grid; gap: 12px; }
.sp-lista li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 16px 18px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border); font-size: 1rem;
}
.sp-lista li::before {
  content: "✓"; flex: none; display: grid; place-items: center;
  width: 22px; height: 22px; margin-top: 1px; border-radius: 50%;
  background: var(--grad-fill); color: var(--on-fill); font-size: .75rem; font-weight: 700;
}

/* ============================================================
   FAI IL TUO CURRICULUM
   Lo strumento e' in assets/js/curriculum.js. Sul telefono l'anteprima e'
   uno strato a tutto schermo: si apre e si chiude solo in opacita', come
   il menu, e lo sfondo si blocca con la classe blocco-scorrimento.
   ============================================================ */
.cv-hero { padding-bottom: 8px; }
.cv-punti {
  list-style: none; display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 26px;
  color: var(--text-muted); font-family: var(--font-display); font-size: .92rem;
}
.cv-punti li { display: inline-flex; align-items: center; gap: 8px; }
.cv-punti li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--grad-fill); }
.cv-sezione { padding-top: 24px; }
.cv-carico { color: var(--text-muted); padding: 30px 0; }

.cv-griglia { display: grid; gap: 28px; align-items: start; }
.cv-colonna { min-width: 0; }

/* i passi, in fila; sul telefono scorrono di lato */
.cv-passi { list-style: none; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 12px; margin-bottom: 6px; }
.cv-passi::-webkit-scrollbar { display: none; }
.cv-passi button {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-muted); font-family: var(--font-display); font-weight: 600; font-size: .82rem; line-height: 1;
  white-space: nowrap; cursor: pointer; transition: border-color .2s, color .2s;
}
.cv-passi button:hover { color: var(--text); border-color: var(--border-strong); }
.cv-passi .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: .74rem; }
.cv-passi button.fatto .n { background: rgba(34, 224, 255, .14); color: var(--cyan); }
.cv-passi button[aria-current="step"] { color: var(--text); border-color: var(--cyan); }
.cv-passi button[aria-current="step"] .n { background: var(--grad-fill); color: var(--on-fill); }

.cv-pannello { padding: clamp(20px, 3.4vw, 34px); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); }
.cv-num { font-family: var(--font-display); font-weight: 600; font-size: .75rem; line-height: 1; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); }
.cv-tit { font-size: clamp(1.5rem, 3vw, 2rem); margin: 10px 0 8px; outline: none; }
.cv-spiega { color: var(--text-muted); margin-bottom: 24px; max-width: 62ch; }
.cv-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.cv-sottotit { font-family: var(--font-display); font-weight: 600; font-size: .8rem; line-height: 1.2; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); margin: 22px 0 12px; }
.cv-aiuto { font-size: .86rem; color: var(--text-dim); margin-top: 8px; }
.cv-aiuto a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.cv-nota-campo { font-size: .84rem; color: #ffcf7a; margin-top: 6px; }
.cv-avviso, .cv-ripreso { font-size: .9rem; padding: 12px 16px; border-radius: 12px; margin-bottom: 14px; }
.cv-avviso { background: rgba(255, 180, 60, .1); border: 1px solid rgba(255, 180, 60, .4); color: #ffd28a; }
.cv-ripreso { background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); }
.cv-errore { color: #ffaab1; font-size: .92rem; margin-top: 12px; }
html[data-theme="light"] .cv-nota-campo { color: #8a5a00; }
html[data-theme="light"] .cv-avviso { color: #7a4d00; }
html[data-theme="light"] .cv-errore { color: #a1202b; }

/* campi: 16px pieni, altrimenti l'iPhone ingrandisce la pagina a ogni tocco */
.cv-campo { margin-bottom: 16px; }
.cv-app input[type="text"], .cv-app input[type="email"], .cv-app input[type="tel"],
.cv-app input[type="url"], .cv-app input[type="date"], .cv-app select, .cv-app textarea {
  width: 100%; padding: 13px 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  font-family: inherit; font-size: 1rem; transition: border-color .25s, box-shadow .25s;
}
.cv-app input:focus, .cv-app select:focus, .cv-app textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 224, 255, .12); }
.cv-app textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
.cv-app input:disabled, .cv-app select:disabled { opacity: .45; }
/* i menu a tendina li disegna il sistema: che usino i colori del tema */
.cv-app select, .cv-app input[type="date"] { color-scheme: dark; }
html[data-theme="light"] .cv-app select, html[data-theme="light"] .cv-app input[type="date"] { color-scheme: light; }
.cv-app select option { background: var(--bg-2); color: var(--text); }
.cv-griglia2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; }
@media (max-width: 560px) { .cv-griglia2 { grid-template-columns: minmax(0, 1fr); } }

.cv-data { border: 0; margin: 0 0 12px; padding: 0; min-width: 0; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 8px; }
.cv-data.solo-anno { grid-template-columns: minmax(0, 1fr); }
.cv-data legend { font-family: var(--font-display); font-size: .85rem; color: var(--text-muted); margin-bottom: 8px; padding: 0; }
.cv-data.spenta { opacity: .5; }

.cv-spunta { display: flex; align-items: center; gap: 10px; cursor: pointer; margin: 4px 0 16px; color: var(--text-muted); font-size: .95rem; }
.cv-spunta input { width: 20px; height: 20px; flex: none; accent-color: #22c3e6; }

.cv-voci { display: grid; gap: 16px; margin-bottom: 14px; }
.cv-voce { border: 1px solid var(--border); border-radius: 18px; padding: 16px 18px 8px; background: var(--surface); min-width: 0; }
.cv-voce-tit { font-family: var(--font-display); font-weight: 600; font-size: .95rem; color: var(--text); padding: 0 6px; margin-left: -6px; }
.cv-voce-piede { display: flex; justify-content: flex-end; }
.cv-elimina { background: none; border: 0; color: var(--text-dim); font-family: var(--font-body); font-size: .88rem; cursor: pointer; padding: 8px 4px; }
.cv-elimina:hover { color: var(--text); }
.cv-elimina.armato { color: #ff8a93; }
.cv-aggiungi { width: 100%; justify-content: center; }

.cv-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cv-chip {
  font-family: var(--font-body); font-weight: 500; font-size: .92rem; line-height: 1.25;
  padding: 9px 14px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); cursor: pointer; text-align: left;
  transition: background .2s, border-color .2s, color .2s;
}
.cv-chip:hover { border-color: var(--cyan); }
.cv-chip[aria-pressed="true"] { background: var(--grad-fill); color: var(--on-fill); border-color: transparent; }
.cv-sugg { margin: -4px 0 14px; }
.cv-sugg .cv-chip { font-size: .86rem; padding: 7px 12px; }
.cv-gruppo { margin-bottom: 8px; }
.cv-aggiungi-riga { display: flex; gap: 8px; margin-top: 12px; }
.cv-aggiungi-riga input { flex: 1; min-width: 0; }
.cv-aggiungi-riga .btn { flex: none; padding: 12px 18px; }

.cv-settori { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 8px; margin-bottom: 10px; }
.cv-settore {
  display: grid; gap: 3px; align-content: start; text-align: left; padding: 11px 13px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer;
  transition: border-color .2s, background .2s;
}
.cv-settore b { font-family: var(--font-display); font-weight: 600; font-size: .92rem; line-height: 1.25; }
.cv-settore span { font-size: .8rem; line-height: 1.35; color: var(--text-muted); }
.cv-settore:hover { border-color: var(--border-strong); }
.cv-settore[aria-pressed="true"] { border-color: var(--cyan); background: var(--surface-2); box-shadow: 0 0 0 3px rgba(34, 224, 255, .12); }

/* la foto */
.cv-carica {
  position: relative; display: grid; justify-items: center; gap: 6px; padding: 34px 20px;
  border: 1.5px dashed var(--border-strong); border-radius: 20px; background: var(--surface);
  text-align: center; cursor: pointer; transition: border-color .2s, background .2s;
}
.cv-carica:hover, .cv-carica:focus-within, .cv-carica.sopra { border-color: var(--cyan); background: var(--surface-2); }
.cv-carica b { font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; }
.cv-carica span { color: var(--text-muted); font-size: .92rem; }
.cv-carica-ic { color: var(--cyan); }
.cv-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.cv-link { background: none; border: 0; color: var(--cyan); font-family: var(--font-body); font-size: .95rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px 0; }
.cv-pericolo { color: #ff8a93; }
html[data-theme="light"] .cv-pericolo { color: #a1202b; }
.cv-senza { margin-top: 14px; }
.cv-consiglio { margin-top: 18px; font-size: .88rem; color: var(--text-dim); max-width: 60ch; }
.cv-foto-ok { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.cv-foto-min { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 3px solid var(--surface-2); }
.cv-foto-min.quadrata { border-radius: 12px; }
.cv-foto-azioni { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cv-crop-box { display: grid; gap: 12px; justify-items: start; }
.cv-crop {
  position: relative; width: min(300px, 100%); aspect-ratio: 1; border-radius: 20px; overflow: hidden;
  background: #0b0f1a; touch-action: none; cursor: grab; -webkit-user-select: none; user-select: none;
}
.cv-crop:active { cursor: grabbing; }
.cv-crop:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.cv-crop img { position: absolute; left: 50%; top: 50%; max-width: none; pointer-events: none; -webkit-user-drag: none; }
.cv-crop-guida { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 999px rgba(5, 6, 12, .55); border: 2px solid rgba(255, 255, 255, .85); pointer-events: none; }
.cv-crop.quadrata .cv-crop-guida { border-radius: 8%; }
.cv-zoom { display: flex; align-items: center; gap: 12px; width: min(300px, 100%); color: var(--text-muted); font-size: .9rem; }
.cv-zoom input { flex: 1; accent-color: #22c3e6; }

/* lingue */
.cv-lingue { display: grid; gap: 12px; margin-bottom: 12px; }
.cv-lingua-riga { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.cv-togli { width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); cursor: pointer; }
.cv-togli:hover { color: var(--text); border-color: var(--border-strong); }
.cv-livelli { list-style: none; display: grid; gap: 6px; margin-top: 10px; font-size: .9rem; color: var(--text-muted); }
.cv-altri { margin: 6px 0 12px; }
.cv-altri summary { cursor: pointer; color: var(--cyan); font-family: var(--font-body); font-size: .95rem; padding: 8px 0; }
.cv-altri[open] summary { margin-bottom: 12px; }

/* due righe su di te */
.cv-proposte { display: grid; gap: 10px; margin-bottom: 18px; }
.cv-proposta {
  display: grid; gap: 8px; text-align: left; padding: 14px 16px; border-radius: 14px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer;
  font-family: var(--font-body); font-size: .95rem; line-height: 1.5; transition: border-color .2s;
}
.cv-proposta b { font-family: var(--font-display); font-weight: 600; font-size: .82rem; color: var(--cyan); }
.cv-proposta:hover { border-color: var(--cyan); }

/* aspetto */
.cv-modelli { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 560px) { .cv-modelli { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cv-modello {
  display: grid; gap: 6px; align-content: start; padding: 10px 10px 12px; border-radius: 14px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; text-align: left;
}
.cv-modello svg { width: 100%; height: auto; border-radius: 6px; display: block; box-shadow: 0 6px 18px -10px rgba(0, 0, 0, .5); }
.cv-modello b { font-family: var(--font-display); font-weight: 600; font-size: .95rem; margin-top: 4px; }
.cv-modello span { font-size: .78rem; color: var(--text-muted); line-height: 1.35; }
.cv-modello[aria-pressed="true"] { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 224, 255, .12); }
@media (max-width: 480px) { .cv-modello span { display: none; } }
.cv-colori { display: flex; flex-wrap: wrap; gap: 14px; }
.cv-colore-box { display: grid; justify-items: center; gap: 6px; font-size: .8rem; color: var(--text-muted); }
.cv-colore { width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer; box-shadow: 0 0 0 1px var(--border-strong); transition: box-shadow .2s; }
.cv-colore[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--cyan); }
.cv-segmenti { display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 5px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.cv-segmenti button { padding: 10px 18px; border-radius: 10px; border: 0; background: none; color: var(--text-muted); font-family: var(--font-display); font-weight: 600; font-size: .92rem; cursor: pointer; }
.cv-segmenti button[aria-checked="true"] { background: var(--grad-fill); color: var(--on-fill); }

/* scarica */
.cv-scarica { display: flex; flex-wrap: wrap; gap: 12px; }
.cv-grande { padding: 16px 26px; font-size: 1.02rem; }
.cv-stato { min-height: 1.5em; margin: 12px 0 18px; color: var(--text-muted); }
.cv-manca { display: grid; gap: 10px; justify-items: start; padding: 14px 16px; margin-bottom: 18px; border-radius: 14px; background: rgba(255, 180, 60, .1); border: 1px solid rgba(255, 180, 60, .4); }
.cv-interruttore { position: relative; padding: 14px 0; border-top: 1px solid var(--border); }
.cv-interruttore label { display: flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 500; }
.cv-leva-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cv-leva { flex: none; position: relative; width: 44px; height: 26px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border-strong); transition: background .2s; }
.cv-leva::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text-muted); transition: transform .2s var(--ease), background .2s; }
.cv-leva-input:checked + .cv-leva { background: var(--grad-fill); border-color: transparent; }
.cv-leva-input:checked + .cv-leva::after { transform: translateX(18px); background: var(--on-fill); }
.cv-leva-input:focus-visible + .cv-leva { outline: 2px solid var(--cyan); outline-offset: 2px; }
.cv-ricomincia { padding-top: 14px; border-top: 1px solid var(--border); }

/* anteprima */
.cv-anteprima { min-width: 0; }
.cv-anteprima-testa { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.cv-anteprima-testa b { font-family: var(--font-display); font-weight: 600; font-size: .95rem; }
.cv-conta { font-size: .85rem; color: var(--text-dim); }
.cv-chiudi { margin-left: auto; padding: 10px 18px; }
.cv-nota-pagine { font-size: .86rem; color: #ffd28a; margin-bottom: 10px; }
html[data-theme="light"] .cv-nota-pagine { color: #7a4d00; }
.cv-fogli { display: grid; gap: 16px; }
.cv-foglio { display: block; width: 100%; height: auto; background: #fff; border-radius: 6px; box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .06); }
html[data-theme="light"] .cv-foglio { box-shadow: 0 20px 50px -28px rgba(20, 30, 60, .45), 0 0 0 1px rgba(15, 23, 42, .08); }
.cv-barra { display: none; }

@media (min-width: 1024px) {
  .cv-griglia { grid-template-columns: minmax(0, 1fr) minmax(0, .86fr); }
  .cv-anteprima {
    position: sticky; top: calc(var(--nav-h) + 16px);
    max-height: calc(100vh - var(--nav-h) - 32px); overflow-y: auto; scrollbar-width: thin; padding-right: 4px;
  }
  .cv-chiudi { display: none; }
}
@media (max-width: 1023px) {
  .cv-anteprima {
    position: fixed; inset: 0; z-index: 300;
    padding: max(16px, env(safe-area-inset-top)) 16px 40px;
    background: var(--bg); overflow-y: auto; overscroll-behavior: contain;
    opacity: 0; visibility: hidden; transition: opacity .2s linear, visibility 0s .2s;
  }
  .cv-anteprima.aperta { opacity: 1; visibility: visible; transition: opacity .2s linear, visibility 0s; }
  .cv-anteprima-testa, .cv-nota-pagine, .cv-fogli { max-width: 560px; margin-left: auto; margin-right: auto; }
  .cv-barra { display: flex; justify-content: center; position: sticky; bottom: 14px; z-index: 5; margin-top: 16px; }
  .cv-vedi { background: var(--bg-2); box-shadow: 0 14px 40px -18px rgba(0, 0, 0, .7); }
}

/* ---- curriculum: mestieri, livelli, controllo ---- */
/* il carattere con le grazie del modello «Elegante» (lo stesso file del PDF) */
@font-face { font-family: "Lora CV"; src: url(/assets/fonts/pdf/lora-400.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Lora CV"; src: url(/assets/fonts/pdf/lora-600.ttf) format("truetype"); font-weight: 600; font-display: swap; }

.cv-consiglio-box {
  margin: -8px 0 24px; padding: 12px 14px; max-width: 62ch; border-radius: 12px;
  background: rgba(34, 224, 255, .06); border: 1px solid rgba(34, 224, 255, .22);
  font-size: .9rem; line-height: 1.5; color: var(--text-muted);
}
.cv-consiglio-box b { font-family: var(--font-display); font-weight: 600; color: var(--cyan); }
html[data-theme="light"] .cv-consiglio-box { background: rgba(11, 114, 136, .06); border-color: rgba(11, 114, 136, .25); }

/* il mestiere con i suggerimenti */
.cv-auto { position: relative; }
.cv-auto-lista {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30;
  list-style: none; margin: 0; padding: 6px; max-height: 300px; overflow-y: auto; overscroll-behavior: contain;
  border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border-strong);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .7);
}
.cv-auto-lista li { display: grid; gap: 1px; padding: 9px 12px; border-radius: 8px; cursor: pointer; }
.cv-auto-lista li b { font-weight: 600; color: var(--text); }
.cv-auto-lista li span { font-size: .8rem; color: var(--text-muted); }
.cv-auto-lista li:hover, .cv-auto-lista li[aria-selected="true"] { background: var(--surface-2); }
html[data-theme="light"] .cv-auto-lista { background: #fff; box-shadow: 0 18px 40px -20px rgba(20, 30, 60, .35); }
.cv-livelli-mestiere { margin: -4px 0 16px; }
.cv-livelli-mestiere .cv-sottotit { margin: 0 0 10px; }
.cv-aiuto-sopra { margin: 0 0 12px; }
.cv-settore-box[open] summary { margin-bottom: 8px; }

/* frasi pronte da cercare */
.cv-cerca-frasi { margin: 2px 0 18px; }
.cv-cerca-frasi input { margin-bottom: 10px; }
.cv-cerca-frasi .cv-chips:empty { display: none; }

/* lingue: certificato e griglia europea */
.cv-lingua { display: grid; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.cv-lingua .cv-aiuto { margin-top: 0; }
.cv-lingua .cv-altri { margin: 0; }
.cv-griglia-eu { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); gap: 10px; }
.cv-griglia-eu label { display: grid; gap: 6px; font-size: .85rem; color: var(--text-muted); }

/* il livello di ogni competenza */
.cv-comp-livelli .cv-sottotit { margin-top: 4px; }
.cv-comp-lista { display: grid; gap: 8px; margin-bottom: 18px; }
.cv-comp-riga {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px;
  padding: 8px 8px 8px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border);
}
.cv-comp-nome { font-size: .92rem; min-width: 0; overflow-wrap: anywhere; }
.cv-mini-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 10px; background: var(--surface-2); }
.cv-mini-seg button {
  min-height: 32px; padding: 5px 10px; border-radius: 8px; border: 0; background: none; cursor: pointer;
  color: var(--text-muted); font-family: var(--font-display); font-weight: 600; font-size: .8rem;
}
.cv-mini-seg button:hover { color: var(--text); }
.cv-mini-seg button[aria-checked="true"] { background: var(--grad-fill); color: var(--on-fill); }

/* il controllo prima di scaricare */
.cv-controllo { display: grid; gap: 10px; padding: 16px 18px; margin-bottom: 22px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.cv-controllo-testa { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 12px; }
.cv-controllo-testa b { font-family: var(--font-display); font-weight: 600; }
.cv-punteggio { font-size: .9rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.cv-punti-barra { display: block; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.cv-punti-barra i { display: block; height: 100%; border-radius: inherit; background: var(--grad-fill); transition: width .3s var(--ease); }
.cv-controllo-lista { list-style: none; display: grid; gap: 4px; margin: 2px 0 0; padding: 0; }
.cv-esito { display: flex; align-items: flex-start; gap: 10px; padding: 7px 4px; font-size: .92rem; line-height: 1.45; color: var(--text); }
.cv-esito::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: .5em; border-radius: 50%; background: var(--text-dim); }
.cv-esito-manca::before { background: #ffb43c; }
.cv-esito-errore::before { background: #ff6b76; }
.cv-esito-consiglio::before { background: #22c3e6; }
.cv-esito-sistemabile::before { background: #3ddc97; }
.cv-esito span { flex: 1; min-width: 0; }
.cv-esito .cv-link { flex: none; padding: 0; font-size: .88rem; }
.cv-tutto-ok { color: #3ddc97; font-weight: 500; }
html[data-theme="light"] .cv-tutto-ok { color: #137a4b; }
.cv-controllo-azioni { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 4px; }
.cv-controllo .cv-aiuto { margin-top: 0; }
.cv-foglio text { white-space: pre; }
/* tre scelte non stanno in una riga del telefono: diventano un elenco */
@media (max-width: 520px) {
  .cv-segmenti.tre { display: grid; grid-template-columns: minmax(0, 1fr); }
  .cv-segmenti.tre button { text-align: left; }
}
@media (max-width: 520px) {
  .cv-mini-seg { display: flex; width: 100%; flex-wrap: nowrap; }
  .cv-mini-seg button { flex: 1 1 0; min-width: 0; padding: 5px 2px; font-size: .76rem; }
}

/* ============================================================
   CURRICULUM: il builder su una pagina tutta sua (/crea-curriculum)
   Sul telefono e' un'app: barra in alto con il passo, domande a tutta
   larghezza, Indietro/Avanti fermi in basso sotto il pollice, anteprima
   a tutto schermo a un tocco. Sugli schermi larghi: passi di lato,
   domande al centro, anteprima a destra.
   ============================================================ */
.cv-pagina { background: var(--bg); min-height: 100vh; min-height: 100dvh; }
.cv-app-pieno { --nav-h: 58px; --cv-opaco: #0e0f15; min-height: 100vh; min-height: 100dvh; }
html[data-theme="light"] .cv-app-pieno { --cv-opaco: #f7f8fb; }
.cv-app-pieno > .cv-carico { padding: 48px 20px; text-align: center; }
.cv-ic { display: inline-grid; place-items: center; flex: none; }
.cv-ic svg { display: block; }

/* la barra in alto */
.cv-appbar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 6px;
  height: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) max(8px, env(safe-area-inset-right, 0px)) 0 max(8px, env(safe-area-inset-left, 0px));
  background: var(--bg); border-bottom: 1px solid var(--border);
}
.cv-appbar-logo { display: none; }
.cv-appbar-logo img { display: block; width: auto; height: 30px; }
.cv-esci {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: none;
  width: 44px; height: 44px; border-radius: 12px; color: var(--text-muted);
  font-family: var(--font-display); font-weight: 600; transition: background .2s, color .2s;
}
.cv-esci span:not(.cv-ic) { display: none; }
.cv-esci:hover { color: var(--text); background: var(--surface-2); }
.cv-testa {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px;
  padding: 5px 8px; border-radius: 12px; text-align: left; color: var(--text); cursor: pointer;
  transition: background .2s;
}
.cv-testa:hover { background: var(--surface-2); }
.cv-testa-testi { display: grid; min-width: 0; line-height: 1.25; }
.cv-testa-passo { font-family: var(--font-display); font-weight: 600; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); }
.cv-testa-nome { font-family: var(--font-display); font-weight: 600; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-testa .cv-ic { color: var(--text-muted); transition: transform .2s var(--ease); }
.cv-testa[aria-expanded="true"] .cv-ic { transform: rotate(180deg); }
.cv-salvato { display: none; }
.cv-appbar .btn { flex: none; gap: 8px; padding: 10px 14px; font-size: .9rem; }
.cv-appbar-scarica { display: none !important; }
.cv-progresso { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; pointer-events: none; }
.cv-progresso i { display: block; width: 0; height: 100%; border-radius: 0 3px 3px 0; background: var(--grad-fill); transition: width .35s var(--ease); }

/* i passi: tendina sotto la barra; di lato sugli schermi larghi */
.cv-app-pieno .cv-indice {
  display: none; position: fixed; z-index: 58; left: 0; right: 0;
  top: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
  max-height: calc(100vh - var(--nav-h) - 24px); overflow-y: auto; overscroll-behavior: contain;
  padding: 8px 10px 12px; background: var(--cv-opaco); border-bottom: 1px solid var(--border);
  box-shadow: 0 28px 50px -24px rgba(0, 0, 0, .65);
}
.cv-app-pieno .cv-indice.aperto { display: block; }
.cv-app-pieno .cv-passi { display: grid; gap: 2px; overflow: visible; padding: 0; margin: 0; }
.cv-app-pieno .cv-passi button {
  width: 100%; justify-content: flex-start; gap: 12px; padding: 8px 10px;
  border: 0; border-radius: 12px; background: none; font-size: .95rem; color: var(--text-muted);
}
.cv-app-pieno .cv-passi button:hover { background: var(--surface-2); color: var(--text); }
.cv-app-pieno .cv-passi button[aria-current="step"] { background: var(--surface-2); color: var(--text); }
.cv-app-pieno .cv-passi .n { width: 28px; height: 28px; font-size: .78rem; }

/* le domande */
.cv-app-pieno .cv-griglia { display: block; }
.cv-app-pieno .cv-colonna { padding-bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
.cv-app-pieno .cv-colonna > .cv-ripreso, .cv-app-pieno .cv-colonna > .cv-avviso { margin: 14px 16px 0; }
.cv-app-pieno .cv-pannello {
  border: 0; border-radius: 0; background: none;
  padding: 22px max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px));
}
.cv-app-pieno .cv-tit { margin-top: 0; }

/* Indietro / Avanti: fermi in basso */
.cv-app-pieno .cv-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; margin: 0;
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px;
  padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: var(--bg); border-top: 1px solid var(--border);
}
.cv-app-pieno .cv-nav.solo-avanti { grid-template-columns: minmax(0, 1fr); }
.cv-app-pieno .cv-nav .btn { padding: 14px 18px; }

/* l'anteprima a tutto schermo del telefono: si scarica anche da li' */
.cv-anteprima-scarica { margin-left: auto; padding: 10px 16px; }
.cv-anteprima-scarica + .cv-chiudi { margin-left: 0; }

@media (min-width: 1024px) {
  .cv-solo-telefono { display: none !important; }
  .cv-app-pieno { --nav-h: 64px; }
  .cv-appbar { gap: 14px; padding-left: 24px; padding-right: 24px; }
  .cv-appbar-logo { display: block; flex: none; padding-right: 16px; border-right: 1px solid var(--border); }
  .cv-esci { order: 10; width: auto; height: 42px; padding: 0 14px; }
  .cv-esci span:not(.cv-ic) { display: inline; font-size: .92rem; }
  .cv-testa { flex: 0 1 auto; }
  .cv-salvato { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font-size: .85rem; color: var(--text-dim); white-space: nowrap; }
  .cv-salvato .cv-ic { color: #3ddc97; }
  html[data-theme="light"] .cv-salvato .cv-ic { color: #137a4b; }
  .cv-appbar-vedi { display: none !important; }
  .cv-appbar-scarica { display: inline-flex !important; }
  .cv-app-pieno .cv-indice.aperto { left: 16px; right: auto; width: 300px; border: 1px solid var(--border); border-top: 0; border-radius: 0 0 16px 16px; }
  .cv-app-pieno .cv-griglia {
    display: grid; grid-template-columns: minmax(0, 600px) minmax(0, 1fr); gap: 28px;
    max-width: 1440px; margin: 0 auto; padding: 24px 24px 0; align-items: start;
  }
  .cv-app-pieno .cv-colonna { padding-bottom: 32px; }
  .cv-app-pieno .cv-colonna > .cv-ripreso, .cv-app-pieno .cv-colonna > .cv-avviso { margin: 0 0 14px; }
  .cv-app-pieno .cv-pannello { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--cv-opaco); padding: 30px 32px 0; }
  .cv-app-pieno .cv-nav {
    position: sticky; left: auto; right: auto; bottom: 0; z-index: 5;
    display: flex; justify-content: space-between;
    margin: 28px -32px 0; padding: 16px 32px; border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    background: var(--cv-opaco); border-top: 1px solid var(--border);
  }
  .cv-app-pieno .cv-nav.solo-avanti { justify-content: flex-end; }
  .cv-app-pieno .cv-anteprima {
    top: calc(var(--nav-h) + 24px); max-height: calc(100vh - var(--nav-h) - 48px);
    padding: 16px; border-radius: var(--radius-lg); background: var(--bg-2); border: 1px solid var(--border);
  }
}
@media (min-width: 1280px) {
  .cv-app-pieno .cv-griglia { grid-template-columns: 196px minmax(0, 600px) minmax(0, 1fr); }
  .cv-app-pieno .cv-indice, .cv-app-pieno .cv-indice.aperto {
    display: block; position: sticky; top: calc(var(--nav-h) + 24px); left: auto; right: auto; width: auto;
    max-height: calc(100vh - var(--nav-h) - 48px); padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none;
  }
  .cv-testa { pointer-events: none; }
  .cv-testa .cv-ic { display: none; }
}

/* la presentazione (/curriculum): tasto per entrare e galleria dei modelli */
.cv-azioni { justify-content: flex-start; margin-top: 30px; }
.cv-riprendi { margin-top: 14px; font-size: .92rem; color: var(--text-muted); }
.cv-galleria { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 760px) { .cv-galleria { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; } }
.cv-mod {
  display: grid; gap: 4px; align-content: start; padding: 10px 10px 14px; border-radius: 16px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  transition: border-color .2s, transform .25s var(--ease);
}
.cv-mod img { width: 100%; height: auto; margin-bottom: 8px; border-radius: 6px; background: #fff; box-shadow: 0 14px 30px -18px rgba(0, 0, 0, .7); }
.cv-mod b { font-family: var(--font-display); font-weight: 600; font-size: 1rem; }
.cv-mod span { font-size: .84rem; line-height: 1.4; color: var(--text-muted); }
.cv-mod:hover { border-color: var(--cyan); transform: translateY(-2px); }
.cv-mod:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
@media (max-width: 480px) { .cv-mod span { display: none; } }
.cv-nota-esempi { margin-top: 16px; text-align: center; font-size: .82rem; color: var(--text-dim); }

/* ============================================================
   CONSENSO AI COOKIE (assets/js/consenso.js)
   «Rifiuta» e «Accetta» identici per forma, colore e posizione: il Garante
   vuole che rifiutare sia facile quanto accettare. La X chiude rifiutando.
   ============================================================ */
.consenso {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 400;
  display: flex; justify-content: center; pointer-events: none;
  padding: 0 max(12px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
}
.consenso-box {
  position: relative; pointer-events: auto; width: min(100%, 460px);
  max-height: calc(100vh - 24px); overflow-y: auto; overscroll-behavior: contain;
  padding: 20px 20px 16px; border-radius: 22px;
  background: var(--bg-2); border: 1px solid var(--border-strong); color: var(--text);
  box-shadow: 0 30px 80px -28px rgba(0, 0, 0, .85), 0 0 0 1px rgba(34, 224, 255, .05);
  animation: consensoEntra .35s var(--ease) both;
}
html[data-theme="light"] .consenso-box { background: #fff; box-shadow: 0 30px 70px -30px rgba(20, 30, 60, .45); }
@keyframes consensoEntra { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .consenso-box { animation: none; } }
.consenso-x {
  position: absolute; top: 12px; right: 12px; display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%; color: var(--text-muted); cursor: pointer;
  transition: background .2s, color .2s;
}
.consenso-x:hover { background: var(--surface-2); color: var(--text); }
.consenso-tit {
  display: flex; align-items: center; gap: 10px; padding-right: 36px; outline: none;
  font-family: var(--font-display); font-weight: 600; font-size: 1.06rem; line-height: 1.25;
}
.consenso-ic { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--grad-soft); color: var(--cyan); }
.consenso-testo { margin: 12px 0 14px; font-size: .9rem; line-height: 1.55; color: var(--text-muted); }
.consenso-testo a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.consenso-dettagli { display: grid; gap: 8px; margin-bottom: 14px; }
.consenso-voce {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border); cursor: pointer;
}
.consenso-voce-testi { display: grid; gap: 2px; flex: 1; min-width: 0; }
.consenso-voce-testi b { font-size: .92rem; font-weight: 600; }
.consenso-voce-testi span { font-size: .8rem; line-height: 1.4; color: var(--text-muted); }
.consenso-sempre { flex: none; font-family: var(--font-display); font-weight: 600; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--cyan); }
.consenso-leva { position: absolute; opacity: 0; width: 1px; height: 1px; }
.consenso-leva-vista { flex: none; position: relative; width: 42px; height: 24px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border-strong); transition: background .2s; }
.consenso-leva-vista::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--text-muted); transition: transform .2s var(--ease), background .2s; }
.consenso-leva:checked + .consenso-leva-vista { background: var(--grad-fill); border-color: transparent; }
.consenso-leva:checked + .consenso-leva-vista::after { transform: translateX(18px); background: var(--on-fill); }
.consenso-leva:focus-visible + .consenso-leva-vista { outline: 2px solid var(--cyan); outline-offset: 2px; }
.consenso-azioni { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.consenso-btn {
  padding: 13px 16px; border-radius: 999px; cursor: pointer;
  font-family: var(--font-display); font-weight: 600; font-size: .95rem;
  background: var(--text); color: var(--bg); border: 1px solid var(--text);
  transition: transform .2s var(--ease), opacity .2s;
}
.consenso-btn:hover { opacity: .9; }
.consenso-btn:active { transform: scale(.98); }
.consenso-btn:focus-visible, .consenso-link:focus-visible, .consenso-x:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.consenso-link {
  display: block; width: 100%; margin-top: 10px; padding: 11px 16px; border-radius: 999px; cursor: pointer;
  font-family: var(--font-display); font-weight: 600; font-size: .9rem; color: var(--text);
  background: none; border: 1px solid var(--border-strong); transition: border-color .2s;
}
.consenso-link:hover { border-color: var(--cyan); }
.consenso-nota { margin-top: 10px; font-size: .8rem; color: #ffcf7a; text-align: center; }
html[data-theme="light"] .consenso-nota { color: #8a5a00; }
@media (min-width: 700px) {
  .consenso { justify-content: flex-start; padding: 0 24px 24px; }
}

/* «Preferenze cookie» nel piede: un pulsante vestito da collegamento */
.footer-link-btn {
  padding: 0; border: 0; background: none; font: inherit; color: var(--text-dim); cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px; transition: color .2s;
}
.footer-link-btn:hover { color: var(--cyan); }

/* ============================================================
   FONDI UE (Reg. UE 2021/1060, art. 47 e Allegato IX)
   Emblema con bordo bianco (serve sugli sfondi colorati) e dicitura
   accanto, in Arial, bianca sullo scuro e nera sul chiaro, mai in corsivo.
   Si accende con PROGETTO_UE in components.js.
   ============================================================ */
.footer-ue-riga { margin-top: 18px; }
.footer-ue { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-family: Arial, Helvetica, sans-serif; font-style: normal; font-size: .8rem; line-height: 1.2; }
html[data-theme="light"] .footer-ue { color: #000; }
.footer-ue .emblema-ue { flex: none; width: auto; height: 24px; }
.footer-ue:hover span, .footer-ue:focus-visible span { text-decoration: underline; text-underline-offset: 3px; }
.ue-testata { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 28px; }
.ue-testata .emblema-ue { flex: none; width: auto; height: 64px; }
.ue-dicitura { font-family: Arial, Helvetica, sans-serif; font-style: normal; font-size: 1.15rem; color: #fff; }
html[data-theme="light"] .ue-dicitura { color: #000; }


/* ============================================================
   PERSONE — il lato umano del sito (ottobre 2026)
   Ispirazione: Zucchetti (persone scontornate su riquadri nei colori del
   marchio, una per mestiere, pose che "recitano" il messaggio), SAP e
   Aruba (etichette del software che galleggiano accanto alla persona),
   Microsoft (foto e schermate nella stessa cornice).
   Regole (vedi docs_not_to_upload/ricerca-persone):
   - foto d'archivio (Pexels) SOLO come illustrazione: mai presentate come
     nostri clienti o come nostro team, mai accanto a testimonianze;
   - la persona guarda o indica verso il testo o il bottone;
   - la pelle resta naturale: il blu del sito sta intorno (alone, anello,
     riflesso sul bordo gia' nella foto), non sopra i volti;
   - il tocco "avanzato" lo danno anelli, aloni ed etichette di vetro.
   ============================================================ */

/* la figura scontornata: appoggiata in basso, con un'ombra e un alone */
.persona-img {
  display: block; width: 100%; height: auto;
  filter: drop-shadow(18px 20px 26px rgba(0, 0, 0, .55)) drop-shadow(0 0 26px rgba(34, 224, 255, .14));
}
/* l'ombra che le persone proiettano sullo sfondo, spostata di lato come in Zucchetti */
html[data-theme="light"] .persona-img { filter: drop-shadow(16px 18px 22px rgba(16, 36, 80, .22)) drop-shadow(0 2px 3px rgba(16, 36, 80, .12)); }

/* etichette di vetro "del software" che galleggiano accanto alle persone */
.hud {
  position: absolute; z-index: 3;
  display: flex; align-items: center; gap: 11px;
  padding: 10px 16px 10px 10px; border-radius: 15px;
  background: rgba(9, 14, 30, .74);
  border: 1px solid rgba(34, 224, 255, .24);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 20px 44px -20px rgba(0, 0, 0, .75), inset 0 1px 0 rgba(255, 255, 255, .06);
  line-height: 1.25; white-space: nowrap; text-align: left;
  animation: hud-galleggia 7s ease-in-out infinite;
}
.hud-ic {
  flex: none; width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--grad-fill); color: var(--on-fill);
  box-shadow: 0 0 18px rgba(34, 224, 255, .45);
}
.hud-ic svg { width: 17px; height: 17px; }
.hud-ic.verde { background: linear-gradient(120deg, #4ade80, #22c55e); box-shadow: 0 0 18px rgba(74, 222, 128, .4); }
.hud-ic.ambra { background: linear-gradient(120deg, #fcd34d, #f59e0b); box-shadow: 0 0 18px rgba(251, 191, 36, .4); }
.hud b { display: block; font-family: var(--font-display); font-weight: 600; font-size: .88rem; color: var(--text); }
.hud span > span { display: block; font-size: .77rem; color: var(--text-muted); }
html[data-theme="light"] .hud {
  background: rgba(255, 255, 255, .86); border-color: rgba(59, 130, 246, .22);
  box-shadow: 0 18px 40px -22px rgba(20, 30, 60, .45);
}
@keyframes hud-galleggia { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes anello-gira { to { transform: rotate(360deg); } }

/* ---------- HERO: testo a sinistra, persona a destra ---------- */
.hero-umano .hero-inner {
  max-width: var(--maxw);
  display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  gap: clamp(16px, 3vw, 44px); align-items: center;
}
.hero-umano h1.display { font-size: clamp(2.2rem, 5.2vw, 4.25rem); }
.hero-visual { position: relative; height: clamp(440px, 46vw, 600px); }
.hero-portale {
  position: absolute; left: 50%; top: 52%; width: min(500px, 96%); aspect-ratio: 1;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(34, 224, 255, .2), rgba(59, 130, 246, .1) 48%, transparent 70%);
}
.hero-portale::before {
  content: ""; position: absolute; inset: 9%; border-radius: 50%;
  border: 1px solid rgba(34, 224, 255, .38);
  box-shadow: 0 0 46px rgba(34, 224, 255, .22), inset 0 0 46px rgba(34, 224, 255, .12);
}
.hero-portale::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 1px dashed rgba(34, 224, 255, .22);
  animation: anello-gira 80s linear infinite;
}
html[data-theme="light"] .hero-portale { background: radial-gradient(circle, rgba(34, 224, 255, .22), rgba(59, 130, 246, .1) 48%, transparent 70%); }
html[data-theme="light"] .hero-portale::before { border-color: rgba(59, 130, 246, .35); box-shadow: 0 0 40px rgba(59, 130, 246, .14); }
.hero-persona {
  position: absolute; left: 50%; bottom: 0; width: min(430px, 88%);
  transform: translateX(-50%);
  -webkit-mask-image: linear-gradient(to bottom, #000 84%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 84%, transparent 100%);
}
.hero-visual .hud-1 { left: -2%; top: 20%; animation-delay: -1s; }
.hero-visual .hud-2 { right: -3%; top: 47%; animation-delay: -3.4s; }
.hero-visual .hud-3 { left: 2%; bottom: 13%; animation-delay: -5.2s; }

/* ---------- TESTATA GIGANTE (ottobre 2026) ----------
   "Zucchetti ha una giga hero section, appena entri": la testata riempie lo
   schermo, la persona e' alta quanto lui e poggia sul bordo in basso, dove
   sfuma nella fascia che scorre. */
.hero.hero-umano {
  min-height: 640px; min-height: max(640px, 100svh);
  padding-top: var(--nav-h); padding-bottom: 0;
  display: flex; flex-direction: column;
}
.hero-umano .hero-inner { flex: 1; width: 100%; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: stretch; }
.hero-umano .hero-text { align-self: center; padding: clamp(24px, 5vh, 60px) 0 clamp(60px, 11vh, 130px); }
.hero-umano h1.display { font-size: clamp(2.5rem, 4.9vw, 4.5rem); }
.hero-umano .hero-visual { height: auto; min-height: 560px; align-self: stretch; }
.hero-umano .hero-persona { width: auto; height: calc(100% - 6px); max-width: none; }
.hero-umano .hero-portale { width: min(620px, 112%); top: 46%; }
.hero-umano .hero-visual .hud-1 { left: -3%; top: 25%; }
.hero-umano .hero-visual .hud-2 { right: -6%; top: 55%; }
.hero-umano .hero-visual .hud-3 { left: -8%; bottom: 16%; }

/* ---------- LE TRE PORTE, ognuna con la sua persona ---------- */
.porte-umane .porta { padding-bottom: 0; min-height: 0; }
.porta-figura {
  position: relative; margin: 26px -30px 0; height: 240px; overflow: hidden;
  border-top: 1px solid var(--border);
  background: radial-gradient(70% 90% at 70% 100%, var(--porta-col, rgba(34, 224, 255, .26)), transparent 70%);
}
.porta-figura::before {
  content: ""; position: absolute; right: 6%; bottom: -46%; width: 76%; aspect-ratio: 1; border-radius: 50%;
  border: 1px solid rgba(34, 224, 255, .22); box-shadow: inset 0 0 40px rgba(34, 224, 255, .1);
}
.porta-figura img {
  position: absolute; right: 7%; bottom: 0; height: 100%; width: auto; max-width: 88%;
  object-fit: contain; object-position: bottom right;
  transition: transform .5s var(--ease);
}
.porta:hover .porta-figura img { transform: translateY(-4px) scale(1.02); }
.porta.p-auto { --porta-col: rgba(91, 124, 246, .34); }
.porta.p-online { --porta-col: rgba(56, 189, 248, .3); }

/* ---------- SETTORI: una persona per mestiere (come Zucchetti) ---------- */
.settori { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.settore {
  --s-col: rgba(34, 224, 255, .42);
  position: relative; display: flex; flex-direction: column; gap: 10px;
  min-height: 420px; padding: 26px 26px 0; border-radius: var(--radius-lg); overflow: hidden;
  color: var(--text); text-decoration: none;
  background: radial-gradient(70% 62% at 72% 100%, var(--s-col), transparent 74%), radial-gradient(60% 50% at 0% 0%, rgba(255, 255, 255, .035), transparent 70%), var(--surface);
  border: 1px solid var(--border);
  transition: transform .45s var(--ease), border-color .3s, box-shadow .45s var(--ease);
  isolation: isolate;
}
.settore::after {
  content: ""; position: absolute; right: -18%; bottom: -32%; width: 92%; aspect-ratio: 1; border-radius: 50%; z-index: -1;
  border: 1px solid rgba(255, 255, 255, .1); box-shadow: inset 0 0 60px rgba(34, 224, 255, .08);
}
.settore:hover { transform: translateY(-6px); border-color: rgba(34, 224, 255, .35); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7); }
.settore:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.settore-tag {
  align-self: flex-start; padding: 6px 12px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 600; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text); background: rgba(255, 255, 255, .06); border: 1px solid var(--border-strong);
}
.settore-tit { font-family: var(--font-display); font-weight: 600; font-size: 1.18rem; line-height: 1.3; max-width: 22ch; }
.settore-vai { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 600; font-size: .9rem; color: var(--cyan); }
.settore-vai .arrow { transition: transform .25s var(--ease); }
.settore:hover .settore-vai .arrow { transform: translateX(4px); }
.settore-img {
  margin-top: auto; align-self: flex-end; width: auto; height: 250px; max-width: 100%;
  object-fit: contain; object-position: bottom;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .45));
  transition: transform .5s var(--ease);
}
.settore:hover .settore-img { transform: scale(1.03); transform-origin: bottom center; }
.settore.s-ristorazione { --s-col: rgba(59, 130, 246, .46); }
.settore.s-bellezza { --s-col: rgba(139, 92, 246, .44); }
.settore.s-artigiani { --s-col: rgba(20, 184, 166, .42); }
.settore.s-studi { --s-col: rgba(99, 102, 241, .46); }
.settore.s-produzione { --s-col: rgba(14, 165, 233, .44); }
html[data-theme="light"] .settore { background: radial-gradient(85% 70% at 75% 100%, var(--s-col), transparent 72%), rgba(255, 255, 255, .7); }
html[data-theme="light"] .settore-tag { background: rgba(255, 255, 255, .8); }
html[data-theme="light"] .settore-img { filter: drop-shadow(0 16px 26px rgba(20, 30, 60, .25)); }

/* ---------- CHI C'E' DIETRO: il fondatore ---------- */
.fondatore {
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(30px, 5vw, 70px); align-items: center;
}
.fondatore-foto { position: relative; aspect-ratio: 4 / 5; max-width: 420px; width: 100%; justify-self: center; }
.fondatore-foto::before {
  content: ""; position: absolute; inset: 6% 2% 0; border-radius: 50% 50% 28px 28px;
  background: radial-gradient(circle at 50% 35%, rgba(34, 224, 255, .22), rgba(59, 130, 246, .08) 60%, transparent 75%);
  border: 1px solid rgba(34, 224, 255, .25);
}
.fondatore-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: bottom; }
/* finche' non c'e' la foto: un monogramma luminoso, voluto e non "vuoto" */
.fondatore-monogramma {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 58%; aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: clamp(4rem, 10vw, 7rem);
  color: transparent; background: var(--grad); -webkit-background-clip: text; background-clip: text;
  border: 1px solid rgba(34, 224, 255, .35); box-shadow: 0 0 60px rgba(34, 224, 255, .18), inset 0 0 50px rgba(34, 224, 255, .1);
}
.fondatore .lead { margin: 18px 0 26px; }
.fondatore-azioni { display: flex; flex-wrap: wrap; gap: 14px; }
.fondatore-dove { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--text-dim); font-size: .92rem; }
.fondatore-dove span { display: inline-flex; align-items: center; gap: 8px; }
.fondatore-dove span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }

/* ---------- PIATTAFORMA: la persona col cruscotto IAC ---------- */
.hero-piattaforma .container {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(20px, 4vw, 56px); align-items: center;
}
.piattaforma-visual { position: relative; height: clamp(400px, 38vw, 520px); }
.piattaforma-visual .hero-portale { width: min(450px, 98%); top: 50%; }
.piattaforma-persona {
  position: absolute; left: 50%; bottom: 0; height: 100%; width: auto; max-width: 100%;
  transform: translateX(-50%); object-fit: contain; object-position: bottom;
  -webkit-mask-image: linear-gradient(to bottom, #000 88%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 88%, transparent 100%);
}
.piattaforma-visual .hud-1 { left: -8%; top: 36%; animation-delay: -1.5s; }
.piattaforma-visual .hud-2 { right: -6%; top: 50%; animation-delay: -4s; }

/* ---------- CONTATTI: chi ti risponde ---------- */
.persona-contatto {
  display: flex; align-items: center; gap: 16px; margin-bottom: 18px;
  padding: 16px 18px; border-radius: var(--radius-lg);
  background: linear-gradient(120deg, rgba(34, 224, 255, .08), rgba(59, 130, 246, .05)), var(--surface);
  border: 1px solid rgba(34, 224, 255, .22);
}
.persona-contatto-foto {
  position: relative; flex: none; width: 64px; height: 64px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 35%, rgba(34, 224, 255, .25), rgba(59, 130, 246, .08) 70%), var(--surface);
  box-shadow: 0 0 0 1px rgba(34, 224, 255, .4), 0 0 24px rgba(34, 224, 255, .25);
}
.persona-contatto-foto > span {
  font-family: var(--font-display); font-weight: 800; font-size: 1.7rem;
  color: transparent; background: var(--grad); -webkit-background-clip: text; background-clip: text;
}
.persona-contatto-foto img { width: 100%; height: 100%; object-fit: cover; }
.persona-contatto b { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.persona-contatto div > span { display: block; color: var(--text-muted); font-size: .92rem; line-height: 1.45; margin-top: 2px; }

/* ---------- CHIAMATA FINALE con persona ---------- */
.cta-band.cta-persona {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); align-items: end; gap: 20px;
  text-align: left; padding-bottom: 0;
}
.cta-persona .cta-testo { padding-bottom: clamp(44px, 6vw, 80px); }
.cta-persona .lead { margin: 0 0 30px; }
.cta-persona .cta-actions { justify-content: flex-start; }
.cta-persona .cta-figura { position: relative; align-self: end; height: clamp(300px, 30vw, 400px); }
.cta-persona .cta-figura img { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); height: 100%; width: auto; max-width: none; }
.cta-persona .hud { left: -10%; top: 22%; }

/* ---------- MENU GRANDE (come Zucchetti e TeamSystem) ----------
   Sul computer ogni gruppo apre un pannello largo, centrato sotto
   l'intestazione: voci in colonne con un titoletto, "Tutti i..." in fondo e
   a destra un riquadro con una persona. Sul telefono: fisarmonica. */
.nav-colonna-tit, .nav-tutti { display: none; }
.nav-promo { display: none; }
@media (min-width: 1201px) {
  /* il pannello si appoggia all'intestazione intera (fissa, larga quanto lo schermo):
     cosi' e' centrato nella pagina e parte sotto la barra, non sopra le altre voci */
  .nav-links, .nav-gruppo { position: static; }
  .nav-tendina.mega {
    --largh: min(900px, calc(100vw - 48px));
    top: calc(100% - 2px); left: 50%; width: var(--largh); margin-left: calc(var(--largh) / -2);
    grid-template-columns: minmax(0, 1fr) 250px; gap: 18px; padding: 18px;
    border-radius: 22px;
  }
  #menuStrumenti.mega { --largh: min(640px, calc(100vw - 48px)); }
  /* ponte tra la voce e il pannello: solo sotto i pulsanti (che finiscono 17px sopra il bordo),
     altrimenti copre le voci vicine e il pannello sbagliato resta aperto */
  .nav-tendina.mega::before { top: -16px; height: 16px; }
  .nav-colonne { display: grid; grid-template-columns: repeat(var(--col, 2), minmax(0, 1fr)); gap: 4px 10px; align-content: start; }
  .nav-colonna { display: grid; gap: 2px; align-content: start; }
  .nav-colonna-tit {
    display: block; padding: 6px 14px 8px;
    font-family: var(--font-display); font-weight: 700; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
    color: var(--text-dim);
  }
  .nav-links a.nav-tutti {
    grid-column: 1 / -1; display: inline-flex; align-items: center; gap: 8px; justify-self: start;
    margin-top: 6px; padding: 10px 14px; border-radius: 12px;
    font-family: var(--font-display); font-weight: 600; font-size: .9rem; color: var(--cyan);
  }
  .nav-links a.nav-tutti::after { display: none; }
  .nav-links a.nav-tutti:hover { background: var(--surface-2); }
  .nav-links a.nav-voce.solo-telefono { display: none; }
  .nav-promo {
    position: relative; display: flex; flex-direction: column; gap: 6px;
    min-height: 280px; padding: 18px 18px 0; border-radius: 16px; overflow: hidden;
    background: radial-gradient(90% 70% at 60% 100%, rgba(34, 224, 255, .32), transparent 70%), linear-gradient(160deg, rgba(59, 130, 246, .22), rgba(79, 110, 240, .1));
    border: 1px solid rgba(34, 224, 255, .25);
    text-decoration: none;
    transition: border-color .25s, transform .35s var(--ease);
  }
  .nav-promo .nav-badge { margin-bottom: 2px; align-self: flex-start; }
  .nav-promo b { font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; line-height: 1.25; }
  .nav-promo > span:not(.nav-badge):not(.nav-promo-mono) { font-size: .82rem; line-height: 1.4; color: var(--text-muted); }
  .nav-promo img { margin-top: auto; align-self: center; width: 172px; height: auto; filter: drop-shadow(10px 12px 16px rgba(0, 0, 0, .45)); transition: transform .45s var(--ease); }
  .nav-promo:hover img { transform: translateY(-3px) scale(1.03); }
  .nav-promo-mono {
    margin: auto auto 26px; width: 120px; height: 120px; border-radius: 50%;
    display: grid; place-items: center;
    font-family: var(--font-display); font-weight: 800; font-size: 3.4rem;
    color: transparent; background: var(--grad); -webkit-background-clip: text; background-clip: text;
    border: 1px solid rgba(34, 224, 255, .4); box-shadow: 0 0 40px rgba(34, 224, 255, .2), inset 0 0 30px rgba(34, 224, 255, .12);
  }
  .nav-links a.nav-promo::after { display: none; }
  /* le regole generali dei link del menu (grigio, una riga sola) qui non valgono */
  .nav-links a.nav-promo { color: var(--text); white-space: normal; font-weight: 400; }
  .nav-links a.nav-promo:hover { border-color: rgba(34, 224, 255, .55); }
  html[data-theme="light"] .nav-promo { background: radial-gradient(90% 70% at 60% 100%, rgba(37, 99, 235, .16), transparent 70%), linear-gradient(160deg, #f2f7ff, #eaf1fe); border-color: rgba(37, 99, 235, .2); }
  html[data-theme="light"] .nav-promo img { filter: drop-shadow(10px 12px 14px rgba(16, 36, 80, .22)); }
  html[data-theme="light"] .nav-tendina { background: #ffffff; }
}
/* telefono e tablet: i gruppi si aprono a fisarmonica, con la freccia */
@media (max-width: 1200px) {
  .nav-links.gruppo-aperto { justify-content: flex-start; scroll-padding-top: calc(var(--nav-h) + 6px); }
  .nav-apri { cursor: pointer; }
  .nav-apri .nav-freccia { display: inline-block; width: 18px; height: 18px; margin-left: 12px; align-self: center; transition: transform .25s var(--ease); }
  .nav-gruppo.aperto .nav-freccia { transform: rotate(180deg); }
  .nav-gruppo:not(.aperto) .nav-tendina { display: none; }
  .nav-tendina.mega { display: grid; gap: 8px; }
  .nav-gruppo.aperto .nav-colonne { display: grid; gap: 8px; }
  .nav-colonna { display: grid; gap: 8px; }
  .nav-links a.nav-tutti { display: inline-flex; gap: 8px; font-size: 1rem; font-weight: 600; color: var(--cyan); padding: 6px 2px 4px; }
  .nav-links a.nav-tutti::before { content: none; }
}

/* ---------- SERVIZI: ogni servizio con la sua persona ---------- */
.servizio-scena { position: relative; display: grid; gap: 18px; }
.servizio-palco {
  position: relative; height: clamp(300px, 30vw, 380px); border-radius: var(--radius-lg); overflow: hidden;
  background: radial-gradient(70% 80% at 50% 100%, var(--sv-col, rgba(34, 224, 255, .28)), transparent 72%), var(--surface);
  border: 1px solid var(--border);
}
.servizio-palco::before {
  content: ""; position: absolute; left: 50%; bottom: -40%; width: 80%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%;
  border: 1px solid rgba(34, 224, 255, .22); box-shadow: inset 0 0 50px rgba(34, 224, 255, .1);
}
.servizio-palco img { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); height: 100%; width: auto; max-width: 96%; object-fit: contain; object-position: bottom; }
.servizio-palco.a-sinistra img { left: 7%; transform: none; object-position: bottom left; }
/* la foto esce dal bordo destro dello scatto: la appoggiamo al bordo del riquadro, cosi' il taglio non si vede */
.servizio-palco.a-destra img { left: auto; right: 0; transform: none; object-position: bottom right; }
.servizio-palco .hud { right: 5%; top: 9%; }
.servizio-palco.hud-sx .hud { right: auto; left: 5%; top: 30%; }
.servizio-palco.hud-sx.hud-alto .hud { top: 7%; }
.servizio-palco.hud-giu .hud { top: auto; bottom: 8%; }
.servizio-palco.hud-sx-giu .hud { right: auto; left: 5%; top: auto; bottom: 9%; }
.servizio-palco.hud-medio .hud { top: 46%; }
/* nella pagina Settori le persone riempiono il palco: l'etichetta sta in basso, sui vestiti, mai sul viso */
.servizio-palco.settore-palco .hud { top: auto; bottom: 9%; right: 4%; }
.servizio-scena > .grid { position: relative; z-index: 2; }
html[data-theme="light"] .servizio-palco { background: radial-gradient(70% 80% at 50% 100%, var(--sv-col, rgba(34, 224, 255, .28)), transparent 72%), rgba(255, 255, 255, .7); }

/* ---------- SETTORI (pagina): indice a pillole e palco piu' alto ---------- */
.settori-indice { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.settori-indice a {
  padding: 9px 16px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 600; font-size: .88rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong);
  transition: border-color .25s, background .25s, transform .25s var(--ease);
}
.settori-indice a:hover { border-color: var(--cyan); transform: translateY(-2px); }
.settore-azioni { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.servizio-palco.settore-palco { height: clamp(340px, 34vw, 440px); }

/* ---------- STRUMENTI AI: il volto illuminato dal codice ---------- */
.hero-strumenti .container {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(28px, 4vw, 60px); align-items: center;
}
.volto-ai {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4 / 5;
  width: 100%; max-width: 440px; justify-self: end;
  border: 1px solid rgba(34, 224, 255, .25); box-shadow: 0 30px 70px -36px rgba(0, 0, 0, .8), 0 0 70px -24px rgba(34, 224, 255, .35);
}
.volto-ai img { width: 100%; height: 100%; object-fit: cover; display: block; }
.volto-ai::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 60%, rgba(5, 6, 12, .5)); }
.volto-ai .hud { z-index: 2; }
.volto-ai .hud-a { left: 5%; top: 7%; animation-delay: -2s; }
.volto-ai .hud-b { right: 5%; bottom: 6%; animation-delay: -4.5s; }

/* ---------- telefono e tablet ---------- */
@media (max-width: 1000px) {
  .settori { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .hero-umano .hero-inner { grid-template-columns: 1fr; }
  .hero.hero-umano { min-height: 0; padding-top: calc(var(--nav-h) + 24px); }
  .hero-umano .hero-text { padding: 10px 0 0; }
  .hero-umano .hero-visual { height: 430px; min-height: 0; margin-top: 18px; }
  .hero-umano .hero-persona { height: 100%; }
  .hero-umano .hero-portale { width: min(400px, 100%); top: 52%; }
  .hero-umano .hero-visual .hud-1 { left: 0; top: 34%; }
  .hero-umano .hero-visual .hud-2 { right: 0; top: 60%; }
  .hero-portale { width: min(380px, 100%); }
  .hero-visual .hud-1 { left: 0; top: 10%; }
  .hero-visual .hud-2 { right: 0; top: 46%; }
  .hero-visual .hud-3 { display: none; }
  .fondatore { grid-template-columns: 1fr; }
  .fondatore-foto { max-width: 300px; }
  .cta-band.cta-persona { grid-template-columns: 1fr; text-align: center; }
  .cta-persona .cta-actions { justify-content: center; }
  .cta-persona .lead { margin: 0 auto 30px; }
  .cta-persona .cta-testo { padding-bottom: 0; }
  .cta-persona .cta-figura { height: 280px; }
  .cta-persona .hud { left: 0; top: auto; bottom: 34%; }
  /* sul telefono la persona occupa quasi tutto il riquadro: l'etichetta scende per non coprire il viso */
  .servizio-palco.tel-giu .hud { top: auto; bottom: 7%; }
  .servizio-palco.tel-medio .hud { top: 46%; }
  .hero-strumenti .container, .hero-piattaforma .container { grid-template-columns: 1fr; }
  .piattaforma-visual { height: 380px; margin-top: 8px; }
  .piattaforma-visual .hud-1 { left: 0; top: 40%; }
  .piattaforma-visual .hud-2 { right: 0; top: 66%; }
  .volto-ai { justify-self: stretch; max-width: none; aspect-ratio: 4 / 3; }
  .volto-ai img { object-position: 50% 38%; }
}
@media (max-width: 720px) {
  /* settori: una fila che scorre col dito, con la scheda dopo che si intravede */
  .settori {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 74%;
    overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin: 0 -24px; padding: 4px 24px 12px; scrollbar-width: none;
  }
  .settori::-webkit-scrollbar { display: none; }
  .settore { scroll-snap-align: start; min-height: 380px; }
  .settore-img { height: 220px; }
  .porta-figura { height: 210px; }
  .hud { padding: 8px 12px 8px 8px; gap: 9px; }
  .hud-ic { width: 28px; height: 28px; }
  .hud b { font-size: .8rem; }
  .hud span > span { font-size: .7rem; }
}
@media (prefers-reduced-motion: reduce) {
  .hud, .hero-portale::after { animation: none; }
  .settore, .settore-img, .porta-figura img { transition: none; }
}

/* ============================================================
   HOME — «CHE ATTIVITÀ HAI?» (assets/js/prova-settore.js)
   Il prodotto vero al posto del quiz: scelte del mestiere, nome facoltativo,
   anteprima del sito dal vivo, cosa facciamo per quel mestiere.
   Telefono: scelte → nome → anteprima → offerta. Computer: comandi e offerta
   a sinistra, il telefono con il sito a destra.
   ============================================================ */
.ps-grid {
  display: grid; gap: 18px; align-items: start;
  /* minmax(0, 1fr): la cornice del telefono dell'anteprima (414 px prima di essere scalata)
     non deve allargare la colonna oltre lo schermo */
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "scelte" "nome" "vetrina" "offerta" "altro";
}
.ps-grid > * { min-width: 0; }
.ps-chips { grid-area: scelte; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ps-chip {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 84px; padding: 14px 10px; border-radius: 16px; cursor: pointer; text-align: center;
  background: var(--surface); border: 1.5px solid var(--border); color: var(--text);
  font-family: var(--font-display); font-weight: 600; font-size: .92rem; line-height: 1.25;
  transition: border-color .2s, background .2s, box-shadow .2s, transform .08s;
}
.ps-chip svg { color: var(--cyan); }
.ps-chip:hover { border-color: var(--border-strong); }
.ps-chip:active { transform: scale(.98); }
.ps-chip[aria-pressed="true"] { border-color: var(--cyan); background: var(--grad-soft); box-shadow: var(--glow-cyan); }
.ps-chip:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.ps-nome { grid-area: nome; display: grid; gap: 6px; }
.ps-nome span { font-family: var(--font-display); font-size: .86rem; color: var(--text-muted); }
.ps-nome small { font-size: .8rem; color: var(--text-dim); font-weight: 400; }
.ps-nome input {
  width: 100%; padding: 13px 14px; border-radius: 12px; border: 1.5px solid var(--border);
  background: var(--surface-2); color: var(--text); font-family: inherit; font-size: 1rem;
  transition: border-color .2s, box-shadow .2s;
}
.ps-nome input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 224, 255, .14); }
.ps-vetrina { grid-area: vetrina; position: relative; display: grid; justify-items: center; gap: 10px; padding: 8px 0 4px; }
/* un alone tenue dietro il telefono: la luce del sito */
.ps-vetrina::before {
  content: ""; position: absolute; inset: 6% 8% 12%; z-index: 0; pointer-events: none; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(34, 224, 255, .16), rgba(79, 70, 229, .08) 60%, transparent);
  filter: blur(8px);
}
html[data-theme="light"] .ps-vetrina::before { background: radial-gradient(closest-side, rgba(37, 99, 235, .12), transparent); }
.ps-telefono { position: relative; z-index: 1; width: 100%; max-width: 420px; min-height: 420px; display: grid; grid-template-columns: minmax(0, 1fr); }
.ps-telefono .ap-pie { display: none; }   /* la nota sotto l'anteprima la mettiamo noi */
.ps-carico { align-self: center; justify-self: center; color: var(--text-dim); font-size: .9rem; }
.ps-nota { position: relative; z-index: 1; margin: 0; font-size: .8rem; color: var(--text-dim); text-align: center; }
.ps-offerta {
  grid-area: offerta; padding: 22px 20px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border);
}
html[data-theme="light"] .ps-offerta { box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 16px 36px -22px rgba(16, 32, 72, .28); }
.ps-tag { font-family: var(--font-display); font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); }
.ps-offerta h3 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.25rem, 3vw, 1.5rem); line-height: 1.2; margin: 8px 0 14px; text-wrap: balance; }
.ps-punti { list-style: none; display: grid; gap: 9px; margin: 0 0 20px; padding: 0; }
.ps-punti li { position: relative; padding-left: 26px; color: var(--text-muted); line-height: 1.5; }
.ps-punti li::before { content: "\2713"; position: absolute; left: 2px; top: 0; color: var(--cyan); font-weight: 700; }
.ps-azioni { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.ps-link { font-family: var(--font-display); font-weight: 600; font-size: .92rem; color: var(--text-muted); border-bottom: 1px solid transparent; }
.ps-link:hover { color: var(--text); border-bottom-color: var(--cyan); }
.ps-altro { grid-area: altro; margin: 0; font-size: .92rem; color: var(--text-muted); }
.ps-altro a { color: var(--cyan); font-weight: 600; white-space: nowrap; }
@media (min-width: 560px) {
  .ps-chips { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .ps-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 440px); column-gap: 56px; row-gap: 18px;
    grid-template-areas: "scelte vetrina" "nome vetrina" "offerta vetrina" "altro vetrina";
    grid-template-rows: auto auto auto 1fr;
  }
  .ps-vetrina { align-self: center; }
  .ps-offerta { padding: 26px 28px; }
}
@media (prefers-reduced-motion: reduce) { .ps-chip { transition: none; } }
