/* FlowAIQ, sito di marca. Direzione Pietra: sfondi tenui, inchiostro e blu del logo.
   Mobile first. Prefisso classi: fq- */

@font-face { font-family: "Sora"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/sora-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Sora"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/sora-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/figtree-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/figtree-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/figtree-latin-600-normal.woff2") format("woff2"); }

:root {
  /* Sfondi */
  --fq-bg: #F6F5F2;
  --fq-bg-alt: #EDEBE6;
  --fq-surface: #FFFFFF;
  --fq-tint: #E7ECFA;
  /* Testo */
  --fq-ink: #0B0E14;
  --fq-text-2: #4D5160;
  /* Linee */
  --fq-line: #E4E1DA;
  --fq-line-2: #D3CFC6;
  /* Accento dal logo */
  --fq-blue: #1F5BFF;
  --fq-blue-dark: #1746C7;
  --fq-blue-soft: #E9EEFF;
  --fq-electric: #2E2BFF;
  --fq-electric-dark: #1F1CD6;
  /* Badge di tempo */
  --fq-warn-bg: #FBEBD9;
  --fq-warn: #8A4A0C;
  --fq-run-bg: #E6ECFF;
  --fq-run: #1746C7;
  --fq-ok-bg: #E2F1E6;
  --fq-ok: #24613A;
  /* Caratteri */
  --fq-head: "Sora", system-ui, sans-serif;
  --fq-body: "Figtree", system-ui, sans-serif;
  /* Misure */
  --fq-slant: -18deg;
  --fq-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --fq-gutter: clamp(1rem, 5vw, 3rem);
  --fq-space: clamp(4rem, 9vw, 7.5rem);
  --fq-radius: 12px;
  --fq-shadow: 0 1px 2px rgba(11, 14, 20, 0.04), 0 12px 32px rgba(11, 14, 20, 0.07);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  overflow-x: clip;
  background: var(--fq-bg);
  color: var(--fq-ink);
  font-family: var(--fq-body);
  font-size: 1.0625rem;
  line-height: 1.65;
}
body.fq-locked { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
a { color: var(--fq-blue-dark); }
a:hover { color: var(--fq-blue); }
h1, h2, h3, h4 { font-family: var(--fq-head); }
section[id] { scroll-margin-top: 4.5rem; }
:focus-visible { outline: 2px solid var(--fq-blue); outline-offset: 2px; }

.fq-wrap {
  width: 100%;
  max-width: calc(72rem + 2 * var(--fq-gutter));
  margin: 0 auto;
  padding-inline: var(--fq-gutter);
}

.fq-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.fq-skip {
  position: fixed;
  z-index: 40;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  background: var(--fq-ink);
  color: #fff;
  font-weight: 600;
  transform: translateY(-200%);
}
.fq-skip:focus { transform: none; color: #fff; }

.fq-todo {
  display: inline-block;
  padding: 0 0.4rem;
  border: 1px dashed currentColor;
  border-radius: 4px;
  font-size: 0.9em;
}

/* ---------- Header ---------- */
[data-fq="header"] { min-height: 4.25rem; }

.fq-header {
  position: sticky;
  z-index: 30;
  top: 0;
  isolation: isolate;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
/* La sfocatura sta su uno strato a parte: sull'header renderebbe il menu del telefono
   relativo all'header invece che alla finestra. */
.fq-header::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: rgba(246, 245, 242, 0.92);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
}
.fq-header.is-stuck { border-bottom-color: var(--fq-line); }
.fq-header__bar { display: flex; align-items: center; justify-content: space-between; min-height: 4.25rem; }
.fq-header__logo { display: flex; align-items: center; min-height: 2.75rem; margin-left: -0.3rem; }
.fq-header__logo img { width: auto; height: 2rem; }

.fq-burger {
  position: relative;
  width: 3rem;
  height: 3rem;
  margin-right: -0.5rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.fq-burger span {
  position: absolute;
  left: 0.75rem;
  width: 1.5rem;
  height: 3px;
  border-radius: 1px;
  background: var(--fq-ink);
  transform: skewX(var(--fq-slant));
  transition: transform 0.2s, top 0.2s, width 0.2s;
}
.fq-burger span:nth-child(1) { top: 1.125rem; }
.fq-burger span:nth-child(2) { top: 1.625rem; width: 1rem; }
.fq-burger[aria-expanded="true"] span:nth-child(1) { top: 1.4rem; transform: rotate(45deg); }
.fq-burger[aria-expanded="true"] span:nth-child(2) { top: 1.4rem; width: 1.5rem; transform: rotate(-45deg); }

.fq-nav {
  position: fixed;
  top: 4.25rem;
  right: 0;
  bottom: 0;
  left: 0;
  display: none;
  flex-direction: column;
  padding: 0.5rem var(--fq-gutter) 2rem;
  overflow-y: auto;
  background: var(--fq-bg);
}
.fq-nav.is-open { display: flex; }
.fq-nav__link,
.fq-nav__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 3.25rem;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--fq-line);
  background: none;
  color: var(--fq-ink);
  font: 500 1.1875rem/1.3 var(--fq-head);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.fq-nav__link[aria-current="page"],
.fq-nav__toggle.is-current { color: var(--fq-blue-dark); }
.fq-nav__chev {
  width: 0.625rem;
  height: 0.625rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-25%) rotate(45deg);
  transition: transform 0.2s;
}
.fq-nav__toggle[aria-expanded="true"] .fq-nav__chev { transform: translateY(15%) rotate(-135deg); }
.fq-nav__menu { display: none; margin: 0; padding: 0.25rem 0 0.75rem 1rem; list-style: none; border-bottom: 1px solid var(--fq-line); }
.fq-nav__menu.is-open { display: block; }
.fq-nav__menu a {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--fq-text-2);
  font-weight: 500;
  text-decoration: none;
}
.fq-nav__menu a[aria-current="page"] { color: var(--fq-blue-dark); }
.fq-nav__menu a:hover { color: var(--fq-ink); }
.fq-nav .fq-btn { margin-top: 1.5rem; }

/* Senza JavaScript: il menu resta visibile in linea, i settori sono raggiungibili dal footer */
html:not(.fq-js) .fq-header__bar { flex-wrap: wrap; padding-block: 0.5rem; }
html:not(.fq-js) .fq-burger,
html:not(.fq-js) .fq-nav__item { display: none; }
html:not(.fq-js) .fq-nav { position: static; display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.25rem; padding: 0; overflow: visible; background: none; }
html:not(.fq-js) .fq-nav__link { width: auto; min-height: 2.5rem; border: 0; font-size: 1rem; }
html:not(.fq-js) .fq-nav .fq-btn { margin-top: 0; }

.fq-noscript-nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; padding: 1rem var(--fq-gutter); border-bottom: 1px solid var(--fq-line); }

/* ---------- Pulsanti ---------- */
.fq-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3.125rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--fq-electric);
  border-radius: 8px;
  background: var(--fq-electric);
  color: #fff;
  font: 600 1rem/1.2 var(--fq-body);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.fq-btn:hover { border-color: var(--fq-electric-dark); background: var(--fq-electric-dark); color: #fff; }
.fq-btn--ghost { border-color: var(--fq-line-2); background: transparent; color: var(--fq-ink); }
.fq-btn--ghost:hover { border-color: var(--fq-ink); background: rgba(11, 14, 20, 0.04); color: var(--fq-ink); }

.fq-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--fq-blue-dark);
  font-weight: 600;
  text-decoration: none;
}
.fq-link::after { content: "\2192"; transition: transform 0.15s; }
.fq-link:hover::after { transform: translateX(3px); }

/* ---------- Sezioni e tipografia ---------- */
.fq-section { padding-block: var(--fq-space); }
.fq-section--alt { background: var(--fq-bg-alt); }
.fq-section--tint { background: var(--fq-tint); }

.fq-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  color: var(--fq-blue-dark);
  font: 600 0.875rem/1.3 var(--fq-body);
  letter-spacing: 0.02em;
}
.fq-eyebrow::before {
  content: "";
  width: 1.25rem;
  height: 0.375rem;
  border-radius: 1px;
  background: var(--fq-blue);
  transform: skewX(var(--fq-slant));
}

.fq-h1 {
  margin: 0;
  max-width: 18ch;
  font-size: clamp(2.375rem, 5.4vw, 4rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.fq-h2 {
  margin: 0;
  max-width: 24ch;
  font-size: clamp(1.875rem, 4.2vw, 3rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.fq-h3 {
  margin: 0;
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
}
.fq-lead {
  max-width: 38em;
  margin: 1.25rem 0 0;
  color: var(--fq-text-2);
  font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
  line-height: 1.6;
}
.fq-head { max-width: 46rem; }
.fq-note { margin: 0.75rem 0 0; color: var(--fq-text-2); font-size: 0.8125rem; }

/* ---------- Apertura ---------- */
.fq-hero { position: relative; padding-top: clamp(2.5rem, 6vw, 4.5rem); padding-bottom: var(--fq-space); }
.fq-hero__grid { display: grid; gap: 2.5rem; align-items: center; }
.fq-hero__title span { display: block; }
.fq-hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.fq-hero__accent { color: var(--fq-blue-dark); }
.fq-hero__grid--stat .fq-h1 { max-width: 22ch; font-size: clamp(2.125rem, 4.4vw, 3.5rem); }
.fq-hero__art { display: none; justify-self: end; width: 100%; max-width: 17rem; transform: translate3d(0, var(--fq-hero-y, 0), 0); }

/* Riquadro numerico dell'apertura */
.fq-stat {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid #D5DEF8;
  border-radius: var(--fq-radius);
  background: var(--fq-tint);
}
.fq-stat__num {
  margin: 0;
  color: var(--fq-blue-dark);
  font: 600 clamp(2.75rem, 5.2vw, 4rem)/1 var(--fq-head);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.fq-stat__unit { margin: 0.375rem 0 0; font: 600 1.125rem/1.3 var(--fq-head); letter-spacing: -0.01em; }
.fq-stat__text { margin: 1rem 0 0; color: var(--fq-text-2); }
.fq-stat__note { margin: 1.25rem 0 0; padding-top: 1rem; border-top: 1px solid #C9D3F0; color: var(--fq-text-2); font-size: 0.8125rem; line-height: 1.55; }
.fq-hero__mark { width: 100%; height: auto; overflow: visible; }
.fq-mark-bar, .fq-piece { fill: var(--fq-ink); }
.fq-mark-spark { fill: var(--fq-blue); transform-origin: 20px 77px; }
.fq-hero__stage { margin-top: clamp(2.5rem, 6vw, 4rem); perspective: 1400px; }
.fq-tilt { transform: rotateX(var(--fq-tilt, 0deg)); transform-origin: 50% 100%; will-change: transform; }

/* Apertura delle pagine di settore: testo e schermata affiancati */
.fq-hero--sector .fq-hero__grid { align-items: center; }
.fq-hero--sector .fq-h1 { max-width: 16ch; font-size: clamp(2.25rem, 4.8vw, 3.5rem); }

/* ---------- Schermate del prodotto (ricostruzioni con dati di esempio) ---------- */
.fq-app {
  container-type: inline-size;
  overflow: hidden;
  border: 1px solid var(--fq-line);
  border-radius: var(--fq-radius);
  background: var(--fq-surface);
  color: var(--fq-ink);
  font-size: 0.8125rem;
  line-height: 1.45;
  box-shadow: var(--fq-shadow);
}
.fq-app__bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.875rem;
  border-bottom: 1px solid #ECEAE5;
  font-size: 0.875rem;
}
.fq-app__bar b { font-family: var(--fq-head); font-weight: 600; }
.fq-app__spark { flex: none; display: inline-block; width: 0.875rem; height: 0.875rem; }
.fq-app__spark svg { width: 100%; height: 100%; fill: var(--fq-blue); }
.fq-app__ask {
  display: none;
  margin-left: auto;
  padding: 0.25rem 0.75rem;
  border: 1px solid #ECEAE5;
  border-radius: 999px;
  color: var(--fq-text-2);
  font-size: 0.75rem;
}
.fq-app__body { display: grid; grid-template-columns: minmax(0, 1fr); }
.fq-app__pad { padding: 0.875rem; }

.fq-side {
  display: flex;
  gap: 0.25rem;
  padding: 0.5rem;
  overflow-x: auto;
  border-bottom: 1px solid #ECEAE5;
  background: #FBFAF8;
  scrollbar-width: thin;
}
.fq-side span,
.fq-side__tab {
  flex: none;
  padding: 0.4rem 0.625rem;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--fq-text-2);
  font: inherit;
  text-align: left;
  white-space: nowrap;
}
.fq-side__tab { cursor: pointer; transition: background-color 0.15s, color 0.15s; }
.fq-side__tab:hover { background: #F1EFEA; color: var(--fq-ink); }
.fq-side .is-active,
.fq-side .is-active:hover { background: var(--fq-blue-soft); color: var(--fq-blue-dark); font-weight: 600; }

/* Dashboard interattiva dell'apertura */
/* Tutte le sezioni nello stesso spazio: la finestra non cambia altezza a ogni clic. */
.fq-views { display: grid; min-width: 0; background: #FAF9F7; }
.fq-view { grid-area: 1 / 1; min-width: 0; }
.fq-view:not(.is-active) { visibility: hidden; pointer-events: none; }
.fq-view:focus-visible { outline-offset: -2px; }
.fq-motion .fq-view.is-active { animation: fq-view-in 0.35s var(--fq-ease); }
@keyframes fq-view-in { from { opacity: 0; transform: translateY(0.375rem); } }
.fq-view__pad { display: grid; gap: 0.75rem; align-content: start; padding: 0.875rem; }
.fq-view__lead { margin: 0; color: var(--fq-text-2); }
.fq-view__lead b { color: var(--fq-ink); font-family: var(--fq-head); font-weight: 600; }

.fq-filters { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.fq-filters span { padding: 0.2rem 0.625rem; border: 1px solid #E4E1DA; border-radius: 999px; background: #fff; color: var(--fq-text-2); font-size: 0.75rem; }
.fq-filters .is-on { border-color: var(--fq-blue); background: var(--fq-blue-soft); color: var(--fq-blue-dark); font-weight: 600; }

.fq-tbl { width: 100%; border-collapse: collapse; overflow: hidden; border: 1px solid #ECEAE5; border-radius: 8px; background: #fff; font-size: 0.8125rem; }
.fq-tbl th { padding: 0.5rem 0.75rem; border-bottom: 1px solid #ECEAE5; background: #FBFAF8; color: var(--fq-text-2); font-size: 0.6875rem; font-weight: 600; text-align: left; white-space: nowrap; }
.fq-tbl td { padding: 0.5rem 0.75rem; border-bottom: 1px solid #F0EEEA; vertical-align: middle; }
.fq-tbl tr:last-child td { border-bottom: 0; }
.fq-tbl td:last-child, .fq-tbl th:last-child { text-align: right; }
.fq-tbl .fq-badge { white-space: nowrap; }
.fq-tbl .fq-num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.fq-row__main .is-warn-text { color: var(--fq-warn); }
.fq-person { display: flex; align-items: center; gap: 0.5rem; }

.fq-badge.is-late { background: #FBE4E1; color: #9B2C1F; }

.fq-board.fq-board--pipe { grid-template-columns: repeat(3, minmax(11.5rem, 1fr)); overflow-x: auto; }
.fq-board--pipe .fq-board__col > b { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 0.5rem; }
.fq-board--pipe .fq-board__col > b small { color: var(--fq-ink); font-weight: 600; }
.fq-board--pipe .fq-board__card b { display: block; font-weight: 600; }
.fq-board--pipe .fq-board__card span { display: block; color: var(--fq-text-2); }
.fq-board--pipe .fq-board__card .fq-badge { display: inline-flex; color: var(--fq-warn); }
.fq-board--pipe .fq-board__col { background: #F3F1EC; }

.fq-proj { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.fq-proj li { padding: 0.625rem 0.75rem; border: 1px solid #ECEAE5; border-radius: 8px; background: #fff; }
.fq-proj__head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.fq-proj__bar { display: flex; align-items: center; gap: 0.625rem; margin-top: 0.25rem; }
.fq-proj__bar .fq-progress { flex: 1; margin: 0; }
.fq-proj__bar small { color: var(--fq-text-2); font-size: 0.75rem; font-variant-numeric: tabular-nums; }

@container (max-width: 519px) {
  .fq-tbl .fq-opt { display: none; }
}

.fq-dash { display: grid; gap: 0.75rem; min-width: 0; padding: 0.875rem; background: #FAF9F7; }
.fq-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
.fq-kpi { min-width: 0; padding: 0.625rem 0.75rem; border: 1px solid #ECEAE5; border-radius: 8px; background: #fff; }
.fq-kpi small { display: block; color: var(--fq-text-2); font-size: 0.6875rem; }
.fq-kpi b { display: block; font-family: var(--fq-head); font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.02em; white-space: nowrap; }
.fq-dash__row { display: grid; gap: 0.75rem; min-width: 0; }
.fq-card { min-width: 0; padding: 0.75rem; border: 1px solid #ECEAE5; border-radius: 8px; background: #fff; }
.fq-card h4 { margin: 0 0 0.5rem; font-size: 0.8125rem; font-weight: 600; }

.fq-bars { display: flex; align-items: flex-end; gap: 0.375rem; height: 5.5rem; padding-inline: 0.25rem; }
.fq-bars i { flex: 1; height: var(--h); border-radius: 2px; background: #CCD8FF; transform: skewX(var(--fq-slant)); }
.fq-bars .is-now { background: var(--fq-blue); }

.fq-rows { display: grid; margin: 0; padding: 0; list-style: none; }
.fq-rows li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid #F0EEEA;
}
.fq-rows li:last-child { border-bottom: 0; }
.fq-rows span { min-width: 0; }
.fq-rows small { flex: none; color: var(--fq-text-2); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.fq-rows .is-total { font-weight: 600; }
.fq-rows .is-total small { color: var(--fq-ink); font-weight: 600; font-size: 0.8125rem; }
.fq-row__main { display: flex; flex-direction: column; min-width: 0; }
.fq-app__sep { margin-top: 0.75rem; padding-top: 0.5rem; border-top: 1px solid #F0EEEA; }
.fq-app__hours { display: flex; justify-content: space-between; gap: 0.75rem; margin-top: 0.25rem; color: var(--fq-text-2); font-size: 0.75rem; }
.fq-app__hours b { color: var(--fq-ink); font-weight: 600; }
.fq-row__main small { color: var(--fq-text-2); }

/* Etichette di stato e badge di tempo: arancio scadenza, blu in corso, verde concluso */
.fq-tagl, .fq-badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.0625rem 0.5rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-style: normal;
  font-weight: 500;
  line-height: 1.6;
  white-space: nowrap;
}
.fq-tagl { background: #F1EFEA; color: var(--fq-text-2); }
.fq-badge { background: var(--fq-run-bg); color: var(--fq-run); }
.fq-badge.is-warn { background: var(--fq-warn-bg); color: var(--fq-warn); }
.fq-badge.is-ok { background: var(--fq-ok-bg); color: var(--fq-ok); }
.fq-badge.is-todo { background: #F1EFEA; color: var(--fq-text-2); }

.fq-coach { display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.625rem 0.75rem; border-radius: 8px; background: var(--fq-blue-soft); }
.fq-coach .fq-app__spark { margin-top: 0.2rem; }

@container (min-width: 620px) {
  .fq-app__ask { display: block; }
  .fq-app__body { grid-template-columns: 10.5rem minmax(0, 1fr); }
  .fq-side { flex-direction: column; gap: 0.125rem; padding: 0.75rem; overflow: visible; border-bottom: 0; border-right: 1px solid #ECEAE5; }
  .fq-view__pad { padding: 1.125rem; gap: 0.875rem; }
  .fq-dash { padding: 1.125rem; gap: 0.875rem; }
  .fq-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .fq-kpis--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fq-kpi b { font-size: 1.25rem; }
  .fq-dash__row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Fasi di un lavoro (cantiere, ordine): percorso verticale */
.fq-stages { margin: 0; padding: 0; list-style: none; }
.fq-stages li {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 2.75rem;
  padding-left: 2rem;
}
.fq-stages li::before {
  content: "";
  position: absolute;
  left: 0.25rem;
  top: 50%;
  width: 0.9rem;
  height: 0.9rem;
  border: 2px solid var(--fq-line-2);
  border-radius: 50%;
  background: #fff;
  transform: translateY(-50%);
}
.fq-stages li::after {
  content: "";
  position: absolute;
  left: calc(0.25rem + 0.45rem - 1px);
  top: calc(50% + 0.45rem);
  height: calc(100% - 0.9rem);
  width: 2px;
  background: var(--fq-line);
}
.fq-stages li:last-child::after { display: none; }
.fq-stages .is-done::before { border-color: var(--fq-ok); background: var(--fq-ok); }
.fq-stages .is-done::after { background: #A9CDB4; }
.fq-stages .is-run::before { border-color: var(--fq-blue); background: var(--fq-blue-soft); box-shadow: 0 0 0 4px rgba(31, 91, 255, 0.12); }
.fq-stages .is-run span { font-weight: 600; }
.fq-stages .is-todo span { color: var(--fq-text-2); }

.fq-progress { height: 0.375rem; margin: 0.5rem 0 0.375rem; border-radius: 3px; background: #F0EEEA; overflow: hidden; }
.fq-progress i { display: block; width: var(--w); height: 100%; background: var(--fq-blue); }

/* Bacheca a colonne (servizi professionali) */
.fq-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.fq-board__col { min-width: 0; padding: 0.5rem; border-radius: 8px; background: #FAF9F7; }
.fq-board__col > b { display: block; margin-bottom: 0.375rem; color: var(--fq-text-2); font-size: 0.6875rem; font-weight: 600; }
.fq-board__card { margin-top: 0.375rem; padding: 0.5rem; border: 1px solid #ECEAE5; border-radius: 6px; background: #fff; font-size: 0.75rem; }
.fq-board__card .fq-badge { margin-top: 0.375rem; white-space: normal; line-height: 1.35; }

/* ---------- Il problema ---------- */
.fq-problem { display: grid; gap: 2.5rem; align-items: center; }
.fq-problem__key {
  max-width: 30em;
  margin: 1.75rem 0 0;
  padding-left: 1rem;
  border-left: 3px solid var(--fq-blue);
  font: 600 clamp(1.125rem, 1.8vw, 1.3125rem)/1.4 var(--fq-head);
  letter-spacing: -0.015em;
}
.fq-scatter {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.875rem 0.625rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.fq-tag {
  position: relative;
  padding: 0.75rem 0.875rem 0.75rem 1.25rem;
  border: 1px solid var(--fq-line);
  border-radius: 8px;
  background: var(--fq-surface);
  box-shadow: 0 6px 18px rgba(11, 14, 20, 0.05);
  transform: translate3d(0, var(--fq-y, 0), 0) rotate(var(--r, 0deg));
}
.fq-tag::before {
  content: "";
  position: absolute;
  top: 0.75rem;
  bottom: 0.75rem;
  left: 0.625rem;
  width: 3px;
  background: var(--fq-blue);
  transform: skewX(var(--fq-slant));
}
.fq-tag b, .fq-tag span { display: block; }
.fq-tag b { font-family: var(--fq-head); font-size: 0.9375rem; font-weight: 600; line-height: 1.3; }
.fq-tag span { color: var(--fq-text-2); font-size: 0.8125rem; line-height: 1.4; }

/* Elenco con segno inclinato del logo */
.fq-list { display: grid; gap: 0.75rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.fq-list li { position: relative; padding-left: 1.75rem; }
.fq-list li::before {
  content: "";
  position: absolute;
  left: 0.25rem;
  top: 0.6em;
  width: 0.875rem;
  height: 0.3125rem;
  border-radius: 1px;
  background: var(--fq-blue);
  transform: skewX(var(--fq-slant));
}

/* ---------- Permessi ---------- */
.fq-perm-grid { display: grid; gap: 2.5rem; align-items: center; }
.fq-perm__user { display: flex; align-items: center; gap: 0.625rem; padding: 0.75rem 0.875rem; border-bottom: 1px solid #ECEAE5; background: #FAF9F7; }
.fq-perm__user b, .fq-perm__user small { display: block; }
.fq-perm__user b { font-weight: 600; }
.fq-perm__user small { color: var(--fq-text-2); font-size: 0.75rem; }
.fq-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.125rem;
  height: 2.125rem;
  border-radius: 50%;
  background: var(--fq-blue);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
}
.fq-avatar--s { width: 1.5rem; height: 1.5rem; font-size: 0.625rem; }
.fq-perm__rows { padding: 0.25rem 0.875rem 0.5rem; }
.fq-perm__row { display: grid; gap: 0.375rem; align-items: center; padding: 0.5625rem 0; border-bottom: 1px solid #F0EEEA; }
.fq-perm__row:last-child { border-bottom: 0; }
.fq-perm__area { font-weight: 500; }
.fq-seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; padding: 2px; border-radius: 6px; background: #F1EFEA; }
.fq-seg i {
  padding: 0.25rem 0;
  border-radius: 4px;
  color: var(--fq-text-2);
  font-size: 0.6875rem;
  font-style: normal;
  text-align: center;
  transition: background-color 0.3s, color 0.3s;
  transition-delay: calc(var(--i, 0) * 0.09s + 0.2s);
}
.fq-seg i.on { background: var(--fq-blue); color: #fff; font-weight: 500; }
.fq-motion .fq-perm:not(.is-in) .fq-seg i.on { background: transparent; color: var(--fq-text-2); }
@container (min-width: 460px) {
  .fq-perm__row { grid-template-columns: 6.5rem minmax(0, 1fr); }
}

/* ---------- Flusso del lavoro ---------- */
.fq-thread {
  --fq-p: 1;
  position: relative;
  display: grid;
  gap: 2rem;
  margin: clamp(2rem, 5vw, 3.5rem) 0 0;
  padding: 0 0 0 2.5rem;
  list-style: none;
}
.fq-thread__line { position: absolute; top: 0.25rem; bottom: 0.25rem; left: 0.75rem; width: 2px; background: var(--fq-line-2); }
.fq-thread__fill { position: absolute; top: 0; left: 0; width: 100%; height: calc(var(--fq-p) * 100%); background: var(--fq-blue); }
.fq-thread__spark {
  position: absolute;
  top: calc(var(--fq-p) * 100%);
  left: 1px;
  width: 1.5rem;
  max-width: none;
  height: 1.5rem;
  fill: var(--fq-blue);
  transform: translate(-50%, -50%) rotate(calc(var(--fq-p) * 180deg));
}
.fq-thread__item { transition: opacity 0.35s; }
.fq-motion .fq-thread__item:not(.is-on) { opacity: 0.45; }
.fq-thread__num { display: block; color: var(--fq-blue-dark); font-size: 0.9375rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.fq-thread__item h3 { margin: 0.25rem 0 0; font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.015em; }
.fq-thread__item p { margin: 0.25rem 0 0; max-width: 24em; }
.fq-thread--text p { color: var(--fq-text-2); }
.fq-thread:not(.fq-thread--text) .fq-thread__item p { font-family: var(--fq-head); font-size: clamp(1.0625rem, 1.6vw, 1.1875rem); font-weight: 500; line-height: 1.4; letter-spacing: -0.01em; }

.fq-mini {
  margin-top: 0.875rem;
  padding: 0.75rem;
  border: 1px solid var(--fq-line);
  border-radius: 10px;
  background: var(--fq-surface);
  font-size: 0.8125rem;
  line-height: 1.4;
  box-shadow: 0 8px 22px rgba(11, 14, 20, 0.05);
}
.fq-mini__head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.375rem; }
.fq-mini__head b { min-width: 0; font-weight: 600; }

/* ---------- Convergenza: strumenti sparsi, FlowAIQ, aree ordinate ---------- */
.fq-conv {
  position: relative;
  display: grid;
  gap: 4rem;
  justify-items: center;
  margin-top: clamp(3.5rem, 8vw, 6rem);
}
.fq-hero .fq-conv { margin-top: clamp(3rem, 7vw, 5rem); }
.fq-problem__demo { margin-top: clamp(3.5rem, 8vw, 6rem); perspective: 1400px; }
.fq-conv__lines { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.fq-conv__col { position: relative; z-index: 1; margin: 0; padding: 0; list-style: none; }
.fq-conv__col--in { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.625rem; max-width: 30rem; }
.fq-conv__col--out { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.625rem 2.25rem; width: 100%; max-width: 24rem; }
.fq-conv__chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem 0.5rem 0.625rem;
  border: 1px solid var(--fq-line);
  border-radius: 10px;
  background: var(--fq-surface);
  font: 500 0.9375rem/1.2 var(--fq-body);
  white-space: nowrap;
}
.fq-conv__col--in .fq-conv__chip {
  border-color: var(--fq-line-2);
  border-style: dashed;
  background: #F8F7F4;
  color: var(--fq-text-2);
  transform: rotate(var(--r, 0deg));
}
.fq-conv__col--out .fq-conv__chip { border-color: #D5DEF8; box-shadow: 0 4px 14px rgba(31, 91, 255, 0.06); }
.fq-conv__icon { flex: none; width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.fq-conv__col--in .fq-conv__icon { color: #8F8A7E; }
.fq-conv__col--out .fq-conv__icon { color: var(--fq-blue); }

.fq-conv__hub {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 12rem;
  height: 7.5rem;
  border: 1px solid #C9D3F0;
  border-radius: 20px;
  background: var(--fq-surface);
  box-shadow: 0 2px 4px rgba(31, 91, 255, 0.06), 0 18px 40px rgba(31, 91, 255, 0.14);
}
.fq-conv__hub img { width: 8.25rem; height: auto; }
.fq-conv__hub::after {
  content: "";
  position: absolute;
  inset: -1px;
  border: 2px solid var(--fq-blue);
  border-radius: inherit;
  opacity: 0;
}
.fq-motion .fq-conv.is-in .fq-conv__hub::after { animation: fq-hub-pulse 2.8s ease-out 1.2s infinite; }
@keyframes fq-hub-pulse { from { opacity: 0.45; transform: scale(1); } to { opacity: 0; transform: scale(1.22); } }

.fq-conv__path { fill: none; stroke-width: 1.5; stroke-linecap: round; }
.fq-conv__path--in { stroke: #B9B3A6; stroke-dasharray: 3 5; }
.fq-conv__path--out { stroke: var(--fq-blue); stroke-opacity: 0.5; }
.fq-conv__dot--in { fill: #A39D90; }
.fq-conv__dot--out { fill: var(--fq-blue); }

/* Comparsa: prima gli strumenti, poi le linee, infine le aree ordinate */
/* Solo dissolvenza: le linee si agganciano alla posizione finale delle etichette. */
.fq-motion .fq-conv__chip { opacity: 0; transition: opacity 0.5s ease; }
.fq-motion .fq-conv__col--in .fq-conv__chip { transition-delay: calc(var(--i) * 0.06s); }
.fq-motion .fq-conv__col--out .fq-conv__chip { transition-delay: calc(1s + var(--i) * 0.06s); }
.fq-motion .fq-conv.is-in .fq-conv__chip { opacity: 1; }
.fq-motion .fq-conv__hub { opacity: 0; transition: opacity 0.5s ease 0.5s; }
.fq-motion .fq-conv.is-in .fq-conv__hub { opacity: 1; }
.fq-motion .fq-conv__path--in { opacity: 0; transition: opacity 0.6s ease 0.3s; }
.fq-motion .fq-conv.is-in .fq-conv__path--in { opacity: 1; }
.fq-motion .fq-conv__path--out { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 0.9s var(--fq-ease) 0.8s; }
.fq-motion .fq-conv.is-in .fq-conv__path--out { stroke-dashoffset: 0; }
.fq-conv:not(.is-in) .fq-conv__dot { visibility: hidden; }

/* ---------- Settori (fascia della home) ---------- */
.fq-sectors { display: grid; gap: 0.75rem; margin: clamp(2rem, 5vw, 3rem) 0 0; padding: 0; list-style: none; }
.fq-sector {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--fq-line);
  border-radius: var(--fq-radius);
  background: var(--fq-surface);
  color: var(--fq-ink);
  text-decoration: none;
  transition: border-color 0.15s, transform 0.2s var(--fq-ease), box-shadow 0.2s;
}
.fq-sector:hover { border-color: var(--fq-blue); color: var(--fq-ink); box-shadow: var(--fq-shadow); transform: translateY(-2px); }
.fq-sector__body { display: flex; flex: 1; flex-direction: column; gap: 0.375rem; padding: 1.125rem 1.25rem; }
.fq-sector__body > b { font-family: var(--fq-head); font-size: 1.125rem; font-weight: 600; letter-spacing: -0.015em; }
.fq-sector__body > span { color: var(--fq-text-2); font-size: 0.9375rem; line-height: 1.5; }
.fq-sector__body > .fq-link { margin-top: auto; padding-top: 0.5rem; color: var(--fq-blue-dark); font-size: 0.9375rem; }

/* Mini dashboard simulata in testa a ogni scheda settore */
.fq-sector__media {
  height: 13rem;
  overflow: hidden;
  padding: 1.25rem 1.25rem 0;
  border-bottom: 1px solid var(--fq-line);
  background: var(--fq-tint);
}
.fq-sectors li:nth-child(even) .fq-sector__media { background: #F3F1EC; }
.fq-mini-app {
  height: 100%;
  overflow: hidden;
  border: 1px solid #E4E1DA;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: #fff;
  font-size: 0.75rem;
  line-height: 1.4;
  box-shadow: 0 10px 28px rgba(11, 14, 20, 0.08);
  transform: translateY(0.75rem) rotate(-2deg);
  transform-origin: 50% 100%;
  transition: transform 0.45s var(--fq-ease);
}
.fq-sectors li:nth-child(even) .fq-mini-app { transform: translateY(0.75rem) rotate(1.5deg); }
.fq-sector:hover .fq-mini-app,
.fq-sectors li:nth-child(even) .fq-sector:hover .fq-mini-app { transform: none; }
.fq-mini-app__bar { display: flex; align-items: center; gap: 0.375rem; padding: 0.5rem 0.75rem; border-bottom: 1px solid #ECEAE5; }
.fq-mini-app__bar b { font: 600 0.8125rem/1.2 var(--fq-head); }
.fq-mini-app__bar i { width: 0.4rem; height: 0.4rem; border-radius: 50%; background: #E4E1DA; }
.fq-mini-app__bar i:first-of-type { margin-left: auto; }
.fq-mini-app__body { padding: 0.5rem 0.75rem; }
.fq-mini-app .fq-rows li { padding: 0.3rem 0; }
.fq-mini-app .fq-row__main small { font-size: 0.6875rem; }
.fq-mini-progs { display: grid; gap: 0.625rem; margin: 0; padding: 0.25rem 0 0; list-style: none; }
.fq-mini-prog__head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.fq-mini-prog .fq-progress { margin: 0.375rem 0 0; }
.fq-board--mini { gap: 0.375rem; }
.fq-board--mini .fq-board__col { padding: 0.375rem; }
.fq-board--mini .fq-board__card { padding: 0.375rem; font-size: 0.6875rem; }
.fq-board--mini .fq-badge { display: flex; width: fit-content; margin-top: 0.25rem; white-space: normal; }
.fq-mini-app .fq-app__hours { margin-top: 0.625rem; }

/* Pagine settore: schermata dell'apertura in un pannello colorato, inclinata come le schede della home */
.fq-stage {
  padding: clamp(1rem, 3vw, 1.75rem);
  border-radius: 18px;
  background: var(--fq-tint);
}
.fq-stage .fq-app { transform: rotate(-1.5deg); transition: transform 0.45s var(--fq-ease); }
.fq-stage:hover .fq-app { transform: none; }

/* Pagine settore: una mini finestra per ogni passaggio del flusso */
.fq-thread--text .fq-thread__item { display: flex; flex-direction: column; }
.fq-thread--text .fq-thread__item p { margin-bottom: 1rem; }
.fq-flow-media {
  height: 11.5rem;
  overflow: hidden;
  margin-top: auto;
  padding: 1rem 1rem 0;
  border-radius: 12px;
  background: var(--fq-tint);
}
.fq-thread__item:nth-child(odd) .fq-flow-media { background: var(--fq-bg-alt); }
.fq-flow-media .fq-mini-app { transform: translateY(0.75rem) rotate(-2deg); }
.fq-thread__item:nth-child(odd) .fq-flow-media .fq-mini-app { transform: translateY(0.75rem) rotate(1.5deg); }
.fq-thread__item:hover .fq-flow-media .fq-mini-app { transform: none; }
.fq-flow-media .fq-mini-app { font-size: 0.6875rem; }
.fq-flow-media .fq-mini-app__bar i { display: none; }
.fq-flow-media .fq-mini-app__bar b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fq-flow-media .fq-rows li { flex-wrap: wrap; gap: 0.125rem 0.5rem; }
.fq-flow-media .fq-row__main small { font-size: 0.625rem; }
.fq-mini-app .fq-rows .is-total small { font-size: 0.75rem; }
.fq-mini-app__note { margin-top: 0.375rem; }

/* Indicatori in testa alle schermate delle pagine settore */
.fq-app__kpis { margin-bottom: 0.875rem; }

/* Le barre di avanzamento si riempiono quando il blocco entra in vista */
.fq-motion .fq-rv .fq-progress i { width: 0; transition: width 1.2s var(--fq-ease) calc(var(--d, 0s) + 0.35s); }
.fq-motion .fq-rv.is-in .fq-progress i { width: var(--w); }

/* ---------- Schede di funzione ---------- */
.fq-feats { display: grid; gap: 0.75rem; margin: clamp(2rem, 5vw, 3rem) 0 0; padding: 0; list-style: none; }
.fq-feat { padding: 1.25rem; border: 1px solid var(--fq-line); border-radius: var(--fq-radius); background: var(--fq-surface); }
.fq-feat h3 { margin: 0; font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em; }
.fq-feat p { margin: 0.375rem 0 0; color: var(--fq-text-2); font-size: 0.9688rem; line-height: 1.55; }
.fq-feat__icon { display: block; width: 1.75rem; height: 0.5rem; margin-bottom: 1rem; border-radius: 1px; background: var(--fq-blue); transform: skewX(var(--fq-slant)); }
.fq-feats--ai .fq-feat { border-color: #D5DEF8; }
.fq-feats--ai .fq-feat__icon { width: 1.25rem; height: 1.25rem; background: none; transform: none; }
.fq-feats--ai .fq-feat__icon svg { width: 100%; height: 100%; fill: var(--fq-blue); }

/* Cosa FlowAIQ non fa */
.fq-nots { display: grid; gap: 0.625rem; margin: 2rem 0 0; padding: 0; list-style: none; max-width: 46rem; }
.fq-nots li {
  position: relative;
  padding: 0.875rem 1rem 0.875rem 2.75rem;
  border: 1px solid var(--fq-line);
  border-radius: 10px;
  background: var(--fq-surface);
}
.fq-nots li::before,
.fq-nots li::after {
  content: "";
  position: absolute;
  left: 1.125rem;
  top: 1.45rem;
  width: 0.875rem;
  height: 2px;
  border-radius: 1px;
  background: var(--fq-text-2);
  transform: rotate(45deg);
}
.fq-nots li::after { transform: rotate(-45deg); }

/* ---------- AI ---------- */
.fq-ai { position: relative; isolation: isolate; overflow: clip; }
.fq-ai__spark {
  position: absolute;
  z-index: -1;
  top: -12rem;
  right: -14rem;
  width: min(120vw, 52rem);
  max-width: none;
  height: auto;
  fill: var(--fq-blue);
  opacity: 0.06;
  transform: rotate(var(--fq-rot, 0deg));
}
.fq-ai__title {
  max-width: 16ch;
  margin: 0;
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.fq-ai__line { display: block; }
.fq-ai__line + .fq-ai__line { color: var(--fq-blue-dark); }
.fq-aidemo { display: grid; gap: 1.75rem; margin-top: clamp(2.25rem, 6vw, 4rem); }
.fq-aitabs { order: 2; min-width: 0; }
.fq-aiscreen { order: 1; min-width: 0; }

.fq-aitab {
  position: relative;
  display: block;
  width: 100%;
  padding: 0.875rem 0;
  border: 0;
  border-top: 1px solid #C9D3F0;
  background: none;
  color: var(--fq-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.fq-aitab:last-child { border-bottom: 1px solid #C9D3F0; }
.fq-aitab__title {
  display: block;
  font-family: var(--fq-head);
  font-size: clamp(1.1875rem, 2.2vw, 1.5rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--fq-text-2);
  transition: color 0.2s;
}
.fq-aitab:hover .fq-aitab__title,
.fq-aitab[aria-selected="true"] .fq-aitab__title { color: var(--fq-ink); }
.fq-aitab__desc { display: grid; grid-template-rows: 0fr; color: var(--fq-text-2); transition: grid-template-rows 0.3s var(--fq-ease); }
.fq-aitab__desc > span { overflow: hidden; }
.fq-aitab[aria-selected="true"] .fq-aitab__desc { grid-template-rows: 1fr; }
.fq-aitab[aria-selected="true"] .fq-aitab__desc > span { padding-top: 0.375rem; }
.fq-aitab__bar {
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--fq-blue);
  transform: scaleX(0);
  transform-origin: left;
}
.fq-aitab[aria-selected="true"] .fq-aitab__bar { animation: fq-fill 8s linear forwards; }
.fq-aidemo.is-paused .fq-aitab__bar { animation-play-state: paused; }
.fq-aidemo.is-stopped .fq-aitab[aria-selected="true"] .fq-aitab__bar,
.fq-aidemo.is-static .fq-aitab[aria-selected="true"] .fq-aitab__bar { animation: none; transform: scaleX(1); }
@keyframes fq-fill { to { transform: scaleX(1); } }

.fq-aipause {
  min-height: 2.75rem;
  margin-top: 0.75rem;
  padding: 0 0.875rem;
  border: 1px solid #B9C6EC;
  border-radius: 8px;
  background: transparent;
  color: var(--fq-ink);
  font: inherit;
  font-size: 0.9375rem;
  cursor: pointer;
}
.fq-aipause:hover { background: rgba(255, 255, 255, 0.6); }
.fq-aidemo.is-static .fq-aipause { display: none; }

.fq-aipanels { display: grid; }
.fq-js .fq-aipanel { grid-area: 1 / 1; visibility: hidden; opacity: 0; transition: opacity 0.25s; }
.fq-js .fq-aipanel.is-active { visibility: visible; opacity: 1; }
html:not(.fq-js) .fq-aipanel + .fq-aipanel { margin-top: 1rem; }
html:not(.fq-js) .fq-aitabs { display: none; }
.fq-aipanel .fq-app { height: 100%; font-size: 0.875rem; }
.fq-aipanel__body { padding: 1rem; }
.fq-motion .fq-aipanel.is-play .fq-seq { animation: fq-seq 0.5s var(--fq-ease) var(--s0, 0s) backwards; }
@keyframes fq-seq { from { opacity: 0; transform: translateY(0.625rem); } }

.fq-chat { display: grid; gap: 0.75rem; }
.fq-chat__me {
  justify-self: end;
  max-width: 85%;
  min-height: 2.5em;
  margin: 0;
  padding: 0.5rem 0.875rem;
  border-radius: 12px 12px 2px 12px;
  background: var(--fq-blue);
  color: #fff;
}
.fq-chat__ai { display: flex; gap: 0.5rem; }
.fq-chat__ai p { margin: 0; }
.fq-chat__ai .fq-app__spark { margin-top: 0.2rem; }
.fq-chips { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.fq-chips span { padding: 0.25rem 0.625rem; border: 1px solid #D5DEF8; border-radius: 999px; color: var(--fq-blue-dark); font-size: 0.75rem; }
.fq-report { display: grid; gap: 0.875rem; }
.fq-bars--wide { height: 6.5rem; }
.fq-report__text { display: flex; gap: 0.5rem; margin: 0; padding: 0.625rem 0.75rem; border-radius: 8px; background: var(--fq-blue-soft); }
.fq-report__text .fq-app__spark { margin-top: 0.2rem; }
.fq-kpis--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fq-kpis--3 .fq-kpi { padding: 0.5rem; }
.fq-kpis--3 .fq-kpi b { font-size: 1rem; }
@container (max-width: 340px) {
  .fq-kpis--3 .fq-kpi { padding: 0.5rem 0.375rem; }
  .fq-kpis--3 .fq-kpi b { font-size: 0.8125rem; letter-spacing: -0.03em; }
  .fq-kpis--3 .fq-kpi small { font-size: 0.625rem; }
}
.fq-suggest__hint { display: flex; align-items: center; gap: 0.375rem; margin: 0.625rem 0 0.25rem; color: var(--fq-blue-dark); font-size: 0.75rem; font-weight: 600; }
.fq-doc__file { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem; border: 1px solid #ECEAE5; border-radius: 8px; }
.fq-doc__file b, .fq-doc__file small { display: block; }
.fq-doc__file b { font-weight: 600; overflow-wrap: anywhere; }
.fq-doc__file small { color: var(--fq-text-2); font-size: 0.75rem; }
.fq-doc__icon { flex: none; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 6px; background: var(--fq-blue); color: #fff; font-size: 0.6875rem; font-weight: 600; }
.fq-doc__icon--call { background: var(--fq-ink); }
.fq-voice { display: grid; gap: 0.75rem; }
.fq-voice__rec { display: flex; align-items: center; gap: 0.625rem; padding: 0.625rem 0.75rem; border-radius: 8px; background: var(--fq-blue-soft); }
.fq-voice__rec b { flex: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.fq-voice__dot { flex: none; width: 0.625rem; height: 0.625rem; border-radius: 50%; background: var(--fq-blue); }
.fq-wave { display: flex; flex: 1; align-items: center; justify-content: space-between; gap: 2px; min-width: 0; height: 2rem; overflow: hidden; }
.fq-wave i { flex: 0 0 3px; height: calc(var(--a) * 10%); border-radius: 1px; background: var(--fq-blue); transform-origin: center; }
.fq-motion .fq-aipanel.is-active .fq-wave i { animation: fq-wave 1.1s ease-in-out infinite alternate; animation-delay: calc(var(--a) * -0.17s); }
@keyframes fq-wave { to { transform: scaleY(0.4); } }
.fq-voice__text { margin: 0; padding: 0.625rem 0.75rem; border-radius: 8px; background: #FAF9F7; }
.fq-bullets { margin: 0; padding-left: 1.125rem; }
.fq-bullets li + li { margin-top: 0.25rem; }

/* ---------- AI: tre funzioni nel dettaglio ---------- */
.fq-ai__more { margin: clamp(2rem, 4vw, 3rem) 0 0; }
.fq-ai--page { padding-top: clamp(3rem, 7vw, 5rem); }
#funzioni-ai .fq-aidetail { margin-top: 0; }
.fq-aidetail { display: grid; gap: clamp(3rem, 7vw, 5rem); margin-top: clamp(4rem, 9vw, 6.5rem); }
.fq-aidetail__title { margin: 0; font-size: clamp(1.625rem, 3vw, 2.25rem); font-weight: 600; letter-spacing: -0.025em; }
.fq-aifeat { display: grid; gap: 2rem; align-items: center; }
.fq-aifeat__num { display: block; color: var(--fq-blue-dark); font-weight: 600; font-variant-numeric: tabular-nums; }
.fq-aifeat h3 { margin: 0.375rem 0 0; font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 600; line-height: 1.2; letter-spacing: -0.025em; }
.fq-aifeat__text > p { max-width: 34em; margin: 0.875rem 0 0; color: var(--fq-text-2); }
.fq-aifeat__text .fq-aifeat__label { margin-top: 1.25rem; color: var(--fq-ink); font-weight: 600; }
.fq-aifeat__text .fq-list { margin-top: 0.625rem; }
.fq-aifeat__media {
  display: grid;
  gap: 0.875rem;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  border: 1px solid #D5DEF8;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
}
.fq-aifeat__media .fq-mini-app {
  height: auto;
  border-bottom: 1px solid #E4E1DA;
  border-radius: 10px;
  font-size: 0.8125rem;
  transform: rotate(-1.5deg);
}
.fq-aifeat--rev .fq-aifeat__media .fq-mini-app { transform: rotate(1.5deg); }
.fq-aifeat__media:hover .fq-mini-app { transform: none; }
.fq-aifeat__media .fq-mini-app__body { display: grid; gap: 0.5rem; padding: 0.75rem 0.875rem; }
.fq-aifeat__chat { width: 92%; justify-self: end; padding: 0.75rem 0.875rem; border: 1px solid #E4E1DA; border-radius: 12px; background: #fff; font-size: 0.8125rem; box-shadow: 0 10px 24px rgba(11, 14, 20, 0.07); }
.fq-aifeat__chat .fq-chat__me { max-width: 90%; }

/* Foto di un documento, inquadrata come dalla fotocamera del telefono */
.fq-aifeat__stack { display: grid; }
.fq-aifeat__stack > * { grid-area: 1 / 1; }
.fq-docphoto { position: relative; z-index: 0; justify-self: start; align-self: start; width: 58%; transform: rotate(-6deg); }
.fq-docphoto__paper {
  display: grid;
  gap: 0.375rem;
  padding: 0.875rem;
  border-radius: 4px;
  background: #FDFCF7;
  box-shadow: 0 12px 26px rgba(11, 14, 20, 0.14);
  font-size: 0.6875rem;
}
.fq-docphoto__paper b { font-family: var(--fq-head); font-size: 0.75rem; }
.fq-docphoto__paper small { color: var(--fq-text-2); }
.fq-docphoto__paper > i { display: block; width: var(--w); height: 0.375rem; border-radius: 2px; background: #E4E1DA; }
.fq-docphoto__table { display: grid; grid-template-columns: 2fr 1fr; gap: 0.25rem 0.5rem; padding: 0.375rem 0; border-block: 1px solid #ECEAE5; }
.fq-docphoto__table i { height: 0.3125rem; border-radius: 2px; background: #D3CFC6; }
.fq-docphoto__frame { position: absolute; z-index: 1; inset: -0.5rem; pointer-events: none;
  background:
    linear-gradient(var(--fq-blue), var(--fq-blue)) top left / 1rem 2px,
    linear-gradient(var(--fq-blue), var(--fq-blue)) top left / 2px 1rem,
    linear-gradient(var(--fq-blue), var(--fq-blue)) top right / 1rem 2px,
    linear-gradient(var(--fq-blue), var(--fq-blue)) top right / 2px 1rem,
    linear-gradient(var(--fq-blue), var(--fq-blue)) bottom left / 1rem 2px,
    linear-gradient(var(--fq-blue), var(--fq-blue)) bottom left / 2px 1rem,
    linear-gradient(var(--fq-blue), var(--fq-blue)) bottom right / 1rem 2px,
    linear-gradient(var(--fq-blue), var(--fq-blue)) bottom right / 2px 1rem;
  background-repeat: no-repeat;
}
.fq-docphoto > .fq-badge { position: absolute; z-index: 2; left: 0.5rem; bottom: -0.75rem; }
.fq-aifeat__stack .fq-mini-app { position: relative; z-index: 1; justify-self: end; align-self: start; width: 78%; margin-top: 4.5rem; }
.fq-motion .fq-aifeat__media.is-in .fq-docphoto__frame { animation: fq-focus 1.6s var(--fq-ease) 0.4s both; }
@keyframes fq-focus { from { inset: -1.5rem; opacity: 0; } to { inset: -0.5rem; opacity: 1; } }

.fq-aifeat__chip { display: flex; align-items: center; gap: 0.625rem; padding: 0.625rem 0.75rem; border: 1px solid #E4E1DA; border-radius: 10px; background: #fff; font-size: 0.8125rem; }
.fq-aifeat__chip b, .fq-aifeat__chip small { display: block; }
.fq-aifeat__chip b { font-weight: 600; overflow-wrap: anywhere; }
.fq-aifeat__chip small { color: var(--fq-text-2); font-size: 0.75rem; }
.fq-aifeat__chip .fq-badge { margin-left: auto; }
.fq-doc__icon--s { width: 2.25rem; height: 2.25rem; font-size: 0.625rem; }

/* Onda della nota vocale: si muove quando il blocco è in vista */
.fq-motion .fq-aifeat__media.is-in .fq-wave i { animation: fq-wave 1.1s ease-in-out infinite alternate; animation-delay: calc(var(--a) * -0.17s); }

/* ---------- Protezione dei dati ---------- */
.fq-trust { display: grid; gap: 2rem; align-items: start; }
.fq-trust__mark { width: 4.5rem; height: auto; }
.fq-trust__mark path { fill: var(--fq-ink); }
.fq-trust__mark .fq-mark-spark { fill: var(--fq-blue); }
.fq-trust p { max-width: 42em; margin: 0; color: var(--fq-text-2); font-size: 1.0625rem; }

/* ---------- Come si parte ---------- */
.fq-steps { display: grid; gap: 2rem; margin: clamp(2rem, 5vw, 3.5rem) 0 0; padding: 0; list-style: none; }
.fq-steps__item { position: relative; padding-top: 1.25rem; }
.fq-steps__item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0.25rem;
  width: 3.5rem;
  height: 0.5rem;
  border-radius: 2px;
  background: var(--fq-blue);
  transform: skewX(var(--fq-slant));
}
.fq-steps__num { display: block; color: var(--fq-blue-dark); font-size: 0.9375rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.fq-steps__item h3 { margin: 0.25rem 0 0; font-size: clamp(1.375rem, 2.6vw, 1.75rem); font-weight: 600; line-height: 1.2; letter-spacing: -0.025em; }
.fq-steps__item p { margin: 0.5rem 0 0; max-width: 26em; color: var(--fq-text-2); }

/* ---------- Domande frequenti ---------- */
.fq-faq { display: grid; gap: 2rem; }
.fq-faq__list { max-width: 50rem; border-top: 1px solid var(--fq-line-2); }
.fq-faq__item { border-bottom: 1px solid var(--fq-line-2); }
.fq-faq__item summary {
  position: relative;
  display: block;
  padding: 1.125rem 2.5rem 1.125rem 0;
  font: 600 clamp(1.0625rem, 1.8vw, 1.1875rem)/1.4 var(--fq-head);
  letter-spacing: -0.01em;
  list-style: none;
  cursor: pointer;
}
.fq-faq__item summary::-webkit-details-marker { display: none; }
.fq-faq__item summary::before,
.fq-faq__item summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0.5rem;
  width: 0.875rem;
  height: 2px;
  border-radius: 1px;
  background: var(--fq-blue);
  transition: transform 0.2s var(--fq-ease);
}
.fq-faq__item summary::after { transform: rotate(90deg); }
.fq-faq__item[open] summary::after { transform: rotate(0deg); }
.fq-faq__item summary:hover { color: var(--fq-blue-dark); }
.fq-faq__item p { max-width: 44em; margin: 0 0 1.25rem; color: var(--fq-text-2); }
@media (min-width: 960px) {
  .fq-faq { grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: clamp(3rem, 6vw, 5rem); align-items: start; }
}

/* ---------- Contatto e form ---------- */
.fq-contact__grid { display: grid; gap: 2.5rem; align-items: start; }
.fq-form {
  display: grid;
  gap: 1.125rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid #D5DEF8;
  border-radius: var(--fq-radius);
  background: var(--fq-surface);
}
.fq-form__row { display: grid; gap: 1.125rem; align-items: end; }
.fq-input { display: grid; gap: 0.375rem; min-width: 0; }
.fq-input > label, .fq-input__label { font-size: 0.9375rem; font-weight: 600; }
.fq-input__opt { color: var(--fq-text-2); font-weight: 400; }
.fq-input input,
.fq-input select,
.fq-input textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--fq-line-2);
  border-radius: 8px;
  background: #fff;
  color: var(--fq-ink);
  font: 400 1rem/1.4 var(--fq-body);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.fq-input textarea { min-height: 7.5rem; resize: vertical; }
.fq-input select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.5rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--fq-text-2) 50%), linear-gradient(135deg, var(--fq-text-2) 50%, transparent 50%);
  background-position: calc(100% - 1.25rem) 55%, calc(100% - 0.9rem) 55%;
  background-size: 0.375rem 0.375rem;
  background-repeat: no-repeat;
}
.fq-input input:focus,
.fq-input select:focus,
.fq-input textarea:focus { outline: none; border-color: var(--fq-blue); box-shadow: 0 0 0 3px rgba(31, 91, 255, 0.18); }
.fq-input [aria-invalid="true"] { border-color: #B3261E; }
.fq-err { margin: 0; color: #B3261E; font-size: 0.875rem; }
.fq-err:empty { display: none; }
.fq-check { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.625rem; align-items: start; font-size: 0.9375rem; line-height: 1.5; }
.fq-check input { width: 1.25rem; height: 1.25rem; margin: 0.15rem 0 0; accent-color: var(--fq-electric); }
.fq-check .fq-err { grid-column: 2; }
.fq-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fq-form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.fq-form__status { margin: 0; font-size: 0.9375rem; }
.fq-form__status.is-error { color: #B3261E; }
.fq-form.is-sending .fq-btn { opacity: 0.7; pointer-events: none; }
.fq-done { padding: clamp(1.5rem, 4vw, 2.25rem); border: 1px solid #D5DEF8; border-radius: var(--fq-radius); background: var(--fq-surface); }
.fq-done h3 { margin: 0; font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; }
.fq-done p { margin: 0.5rem 0 0; color: var(--fq-text-2); }

/* ---------- Footer ---------- */
.fq-footer { padding-block: clamp(3rem, 7vw, 4.5rem) 2rem; border-top: 1px solid var(--fq-line); background: var(--fq-bg-alt); color: var(--fq-text-2); font-size: 0.9375rem; }
.fq-footer__top { display: grid; gap: 2.5rem; }
.fq-footer__brand img { width: auto; height: 1.875rem; margin-left: -0.25rem; }
.fq-footer__brand p { max-width: 24em; margin: 0.875rem 0 0; }
.fq-footer__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1.5rem; }
.fq-footer h2 { margin: 0 0 0.75rem; color: var(--fq-ink); font-size: 0.9375rem; font-weight: 600; }
.fq-footer ul { margin: 0; padding: 0; list-style: none; }
.fq-footer li + li { margin-top: 0.375rem; }
.fq-footer a { color: var(--fq-text-2); text-decoration: none; }
.fq-footer a:hover { color: var(--fq-ink); text-decoration: underline; }
.fq-footer__legal { margin: 2.5rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--fq-line-2); font-size: 0.875rem; }

/* ---------- Simulatore ---------- */
.fq-sim__grid { display: grid; gap: 2.5rem; margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.fq-sim__title { margin: 0; max-width: 24ch; font-size: clamp(1.875rem, 4.2vw, 3rem); font-weight: 600; line-height: 1.12; letter-spacing: -0.03em; text-wrap: balance; }
.fq-sim__intro { margin: 1rem 0 0; max-width: 44ch; color: var(--fq-text-2); font-size: clamp(1.0625rem, 1.6vw, 1.1875rem); }

.fq-field { margin: 0; padding: 0; border: 0; min-width: 0; }
.fq-field + .fq-field { margin-top: 2.5rem; }
.fq-field__label { display: block; padding: 0; margin-bottom: 1rem; font-family: var(--fq-head); font-size: 1.0625rem; font-weight: 500; line-height: 1.4; }
.fq-people { display: flex; align-items: center; gap: 0.5rem; }
.fq-step {
  flex: none;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 1px solid var(--fq-line-2);
  border-radius: 8px;
  background: var(--fq-surface);
  color: var(--fq-ink);
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s;
}
.fq-step:hover { border-color: var(--fq-blue); }
.fq-people__input {
  width: 5.25rem;
  height: 3rem;
  padding: 0;
  border: 1px solid var(--fq-line-2);
  border-radius: 8px;
  background: var(--fq-surface);
  color: var(--fq-ink);
  font: 600 1.5rem/1 var(--fq-head);
  text-align: center;
  font-variant-numeric: tabular-nums;
  appearance: textfield;
  -moz-appearance: textfield;
}
.fq-people__input::-webkit-outer-spin-button,
.fq-people__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fq-range {
  --fq-pct: 9%;
  display: block;
  width: 100%;
  height: 2.75rem;
  margin: 0.5rem 0 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.fq-range::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--fq-blue) var(--fq-pct), var(--fq-line-2) var(--fq-pct)); }
.fq-range::-moz-range-track { height: 6px; border-radius: 3px; background: var(--fq-line-2); }
.fq-range::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--fq-blue); }
.fq-range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 28px; margin-top: -11px; border: 0; border-radius: 3px; background: var(--fq-ink); transform: skewX(var(--fq-slant)); }
.fq-range::-moz-range-thumb { width: 18px; height: 28px; border: 0; border-radius: 3px; background: var(--fq-ink); transform: skewX(var(--fq-slant)); }

.fq-presets { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.375rem; padding: 0 0.5rem; }
.fq-preset { position: relative; display: block; cursor: pointer; }
.fq-preset input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.fq-preset__face {
  display: grid;
  place-items: center;
  min-height: 3.25rem;
  border: 1px solid var(--fq-line-2);
  border-radius: 4px;
  background: var(--fq-surface);
  transform: skewX(var(--fq-slant));
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.fq-preset__text { display: block; transform: skewX(18deg); font: 600 clamp(1rem, 2.6vw, 1.125rem)/1 var(--fq-head); font-variant-numeric: tabular-nums; }
.fq-preset:hover .fq-preset__face { border-color: var(--fq-blue); }
.fq-preset input:checked + .fq-preset__face { border-color: var(--fq-blue); background: var(--fq-blue); color: #fff; }
.fq-preset input:focus-visible + .fq-preset__face { outline: 2px solid var(--fq-ink); outline-offset: 2px; }
.fq-presets__unit { margin: 0.75rem 0 0; color: var(--fq-text-2); font-size: 0.875rem; }
.fq-hint { min-height: 3em; margin: 0.75rem 0 0; font-size: 0.9688rem; line-height: 1.5; }

.fq-peek {
  position: sticky;
  z-index: 2;
  bottom: 0.75rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
  padding: 0.75rem 1rem;
  border: 1px solid #C9D3F0;
  border-radius: 8px;
  background: var(--fq-tint);
  font-size: 0.875rem;
  box-shadow: var(--fq-shadow);
  transition: opacity 0.2s, visibility 0.2s;
}
.fq-peek strong { font: 600 1.25rem/1.2 var(--fq-head); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--fq-blue-dark); }
.fq-peek.is-hidden { opacity: 0; visibility: hidden; }

.fq-result {
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  overflow: hidden;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  border: 1px solid #D5DEF8;
  border-radius: var(--fq-radius);
  background: var(--fq-tint);
}
.fq-result__mark { position: absolute; z-index: -1; right: -2.5rem; bottom: -3.5rem; width: min(52cqi, 17rem); height: auto; fill: var(--fq-blue); opacity: 0.08; pointer-events: none; }
.fq-result__label { margin: 0; color: var(--fq-text-2); font-size: 0.9375rem; font-weight: 500; }
.fq-result__minutes { display: block; margin-top: 0.25rem; font: 600 clamp(1.75rem, 4.5vw, 2.5rem)/1.15 var(--fq-head); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.fq-result__note { margin: 0.375rem 0 0; font-size: 0.9375rem; }
.fq-day { margin-top: 1.25rem; }
.fq-day__track { position: relative; overflow: hidden; height: 0.875rem; border-radius: 3px; background: #CBD5F3; }
.fq-day__fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -0.5rem;
  width: calc(var(--fq-day, 6.25%) + 0.5rem);
  background: var(--fq-blue);
  transform: skewX(var(--fq-slant));
  transform-origin: bottom left;
  transition: width 0.45s var(--fq-ease);
}
.fq-day__caption { margin: 0.5rem 0 0; color: var(--fq-text-2); font-size: 0.875rem; }
.fq-result__divider { height: 1px; margin: clamp(1.5rem, 3vw, 2.25rem) 0; border: 0; background: #C9D3F0; }
.fq-result__money { display: block; margin-top: 0.25rem; color: var(--fq-blue-dark); font: 600 clamp(2rem, 16.5cqi, 4.5rem)/1.05 var(--fq-head); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; white-space: nowrap; }

.fq-close { display: grid; gap: 1.5rem; margin-top: clamp(2.5rem, 5vw, 3.5rem); padding-top: clamp(2rem, 4vw, 2.75rem); border-top: 1px solid var(--fq-line-2); }
.fq-close__text { margin: 0; max-width: 34em; font: 500 clamp(1.125rem, 2vw, 1.375rem)/1.45 var(--fq-head); letter-spacing: -0.015em; }
.fq-close__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; }
.fq-foot { margin: 1.75rem 0 0; max-width: 62em; color: var(--fq-text-2); font-size: 0.8125rem; line-height: 1.6; }

.fq-method { display: grid; gap: 1.5rem; margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.fq-method > div { padding: 1.25rem 1.5rem; border: 1px solid var(--fq-line); border-radius: var(--fq-radius); background: var(--fq-surface); }
.fq-method h3 { margin: 0; font-size: 1.0625rem; font-weight: 600; }
.fq-method p { margin: 0.5rem 0 0; color: var(--fq-text-2); }

/* ---------- Pagina 404: ricerca simulata nell'app ---------- */
.fq-404 { padding-block: clamp(3rem, 8vw, 6rem); }
.fq-404__app { font-size: 0.875rem; }
.fq-404__app .fq-app__pad { display: grid; gap: 0.875rem; padding: 1rem 1.125rem 1.25rem; }
.fq-404__search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #C9D3F0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(31, 91, 255, 0.08);
}
.fq-404__search span { min-width: 0; overflow-wrap: anywhere; font-weight: 500; }
.fq-404__icon { flex: none; width: 1.125rem; height: 1.125rem; fill: none; stroke: var(--fq-text-2); stroke-width: 1.8; stroke-linecap: round; }
.fq-404__caret { flex: none; width: 2px; height: 1.1em; margin-left: -0.375rem; background: var(--fq-blue); }
.fq-motion .fq-404__caret { animation: fq-caret 1s steps(1) infinite; }
@keyframes fq-caret { 50% { opacity: 0; } }
.fq-404__result { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding-bottom: 0.75rem; border-bottom: 1px solid #F0EEEA; color: var(--fq-text-2); }
.fq-404__chips { display: flex; flex-wrap: wrap; gap: 0.375rem; padding-left: 1.375rem; }
.fq-404__chips a {
  padding: 0.3rem 0.75rem;
  border: 1px solid #D5DEF8;
  border-radius: 999px;
  background: #fff;
  color: var(--fq-blue-dark);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s;
}
.fq-404__chips a:hover { border-color: var(--fq-blue); background: var(--fq-blue-soft); }

/* ---------- Pagine di testo (legali, conferma) ---------- */
/* La colonna resta allineata al logo: la larghezza limitata vale per il testo, non per il contenitore. */
.fq-prose > * { max-width: 46rem; }
.fq-prose h2 { margin: 2.5rem 0 0; font-size: 1.375rem; font-weight: 600; letter-spacing: -0.02em; }
.fq-prose p, .fq-prose ul { margin: 0.75rem 0 0; color: var(--fq-text-2); }
.fq-prose ul { padding-left: 1.25rem; }
.fq-prose li + li { margin-top: 0.375rem; }
.fq-prose .fq-updated { margin-top: 1rem; font-size: 0.9375rem; }

/* ---------- Movimento: attivo solo con JS e movimento consentito ---------- */
.fq-motion .fq-rv {
  opacity: 0;
  transform: translateY(1.25rem);
  transition: opacity 0.7s ease var(--d, 0s), transform 0.8s var(--fq-ease) var(--d, 0s);
}
.fq-motion .fq-rv.is-in { opacity: 1; transform: none; }
.fq-wipe__in { display: block; }
.fq-motion .fq-wipe__in {
  clip-path: polygon(-31% -20%, 0% -20%, -30% 120%, -31% 120%);
  transition: clip-path 1.1s var(--fq-ease) var(--d, 0s);
}
.fq-motion .fq-wipe.is-in .fq-wipe__in { clip-path: polygon(-31% -20%, 131% -20%, 101% 120%, -31% 120%); }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Schermi medi ---------- */
@media (min-width: 560px) {
  .fq-scatter { gap: 1rem; }
  .fq-sectors, .fq-feats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fq-form__row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fq-method { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 380px) {
  .fq-presets { gap: 0.25rem; padding: 0 0.375rem; }
  .fq-preset__text { font-size: 0.9375rem; }
}

/* ---------- Schermi grandi ---------- */
@media (min-width: 960px) {
  [data-fq="header"] { min-height: 4.5rem; }
  .fq-header__bar { min-height: 4.5rem; }
  .fq-burger { display: none; }
  .fq-nav {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.75rem;
    padding: 0;
    overflow: visible;
    background: none;
  }
  .fq-nav__item { position: relative; }
  .fq-nav__link,
  .fq-nav__toggle {
    width: auto;
    min-height: 2.75rem;
    gap: 0.5rem;
    border: 0;
    font: 500 0.9688rem/1.3 var(--fq-body);
  }
  .fq-nav__link:hover, .fq-nav__toggle:hover { color: var(--fq-blue-dark); }
  .fq-nav__chev { width: 0.4375rem; height: 0.4375rem; border-width: 1.5px; }
  .fq-nav__menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: -1rem;
    min-width: 17rem;
    padding: 0.5rem;
    border: 1px solid var(--fq-line);
    border-radius: var(--fq-radius);
    background: var(--fq-surface);
    box-shadow: var(--fq-shadow);
  }
  .fq-nav__menu a { min-height: 2.5rem; padding: 0 0.75rem; border-radius: 8px; color: var(--fq-ink); }
  .fq-nav__menu a:hover { background: var(--fq-bg); }
  .fq-nav .fq-btn { margin-top: 0; min-height: 2.75rem; padding: 0.5rem 1.125rem; font-size: 0.9375rem; }

  .fq-hero__grid { grid-template-columns: minmax(0, 1.9fr) minmax(0, 0.8fr); gap: clamp(2rem, 4vw, 4rem); }
  .fq-hero__grid--stat { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); align-items: center; }
  .fq-hero__art { display: block; }
  .fq-hero--sector .fq-hero__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }

  .fq-aifeat { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(3rem, 6vw, 5rem); }
  .fq-aifeat--rev .fq-aifeat__media { order: -1; }
  .fq-conv { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: clamp(4rem, 9vw, 8rem); align-items: center; }
  .fq-conv__col--in { flex-direction: column; flex-wrap: nowrap; align-items: flex-start; justify-self: start; gap: 0.75rem; max-width: none; }
  .fq-conv__col--in .fq-conv__chip { transform: translateX(var(--x, 0)) rotate(var(--r, 0deg)); }
  .fq-conv__col--out { grid-template-columns: minmax(0, 1fr); justify-self: end; width: auto; min-width: 12.5rem; }
  .fq-conv__hub { width: 13rem; height: 8.5rem; }
  .fq-conv__hub img { width: 9rem; }

  .fq-problem, .fq-perm-grid, .fq-contact__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(3rem, 6vw, 5.5rem); }
  .fq-contact__grid { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
  .fq-trust { grid-template-columns: auto minmax(0, 1fr); gap: 3rem; }

  .fq-scatter { display: block; position: relative; min-height: 32rem; }
  .fq-tag { position: absolute; width: max-content; padding: 1rem 1.5rem 1rem 1.75rem; }
  .fq-tag::before { left: 0.875rem; top: 1rem; bottom: 1rem; }
  .fq-tag b { font-size: 1.125rem; }
  .fq-tag span { font-size: 0.9375rem; }
  .fq-tag:nth-child(1) { top: 0; left: 0; }
  .fq-tag:nth-child(2) { top: 17%; right: 0; }
  .fq-tag:nth-child(3) { top: 35%; left: 4%; }
  .fq-tag:nth-child(4) { top: 52%; right: 4%; }
  .fq-tag:nth-child(5) { top: 70%; left: 0; }
  .fq-tag:nth-child(6) { bottom: 0; right: 0; }

  .fq-thread { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; padding: 2.75rem 0 0; }
  .fq-thread:not(.fq-thread--text) .fq-thread__item p { min-height: 4.2em; }
  .fq-thread__line { top: 0.75rem; right: 0; bottom: auto; left: 0; width: auto; height: 2px; }
  .fq-thread__fill { width: calc(var(--fq-p) * 100%); height: 100%; }
  .fq-thread__spark { top: 1px; left: calc(var(--fq-p) * 100%); }

  .fq-sectors { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fq-feats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fq-feats--ai { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fq-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 3.5rem); }

  .fq-aidemo { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(3rem, 6vw, 5.5rem); align-items: start; }
  .fq-aitabs { order: 1; }
  .fq-aiscreen { order: 2; }
  .fq-aitab { padding: 1.125rem 0; }
  .fq-aipanel__body { padding: 1.5rem; }
  .fq-aipanel .fq-app { font-size: 0.9375rem; }

  .fq-peek { display: none; }
  .fq-sim__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(3rem, 6vw, 5.5rem); align-items: start; }
  .fq-close { grid-template-columns: minmax(0, 1fr) auto; gap: 3rem; align-items: center; }

  .fq-footer__top { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 4rem; }
  .fq-footer__cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
