/* ==========================================================================
   Canali collegati: hub, marquee, "aggiorni una volta", tessere, catalogo.
   Si appoggia ai token di site.css (--teal, --menta, --arancio, --r-*, Poppins).
   I componenti PHP stanno in inc/canali/. Tutto è progressivo: senza JS i
   contenuti restano completi, il JS (canali.js) aggiunge solo movimento e
   filtri. Con prefers-reduced-motion nulla si muove.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Token nuovi (solo qui, prefisso --ch-)
   -------------------------------------------------------------------------- */
:root {
  /* Ombre a tre livelli: sono quelle proposte nell'audit immagini §4.1
     (oggi in site.css sono ripetute a mano). Se entrano in Figma, vanno
     spostate in site.css come --ombra-1/2/3. */
  --ch-ombra-1: 0 2px 6px rgba(0, 66, 73, 0.06);
  --ch-ombra-2: 0 12px 28px rgba(0, 66, 73, 0.08);
  --ch-ombra-3: 0 24px 60px -12px rgba(0, 66, 73, 0.22);

  /* I due versi del dato: in uscita (tariffe, disponibilità) e in entrata
     (prenotazioni). Alias semantici di colori già esistenti. */
  --ch-esce:  var(--teal);
  --ch-entra: var(--arancio);

  /* Altezza della barra di navigazione fissa: la barra del catalogo si
     ferma subito sotto. canali.js la misura e la aggiorna. */
  --ch-header: 76px;
}

/* --------------------------------------------------------------------------
   Il simbolo di un canale: logo vero o badge con la sigla
   -------------------------------------------------------------------------- */
.ch-simbolo {
  --ch-brand: var(--teal-profondo);
  --ch-simbolo: 40px;
  flex: none;
  display: inline-grid;
  place-items: center;
  width: var(--ch-simbolo);
  height: var(--ch-simbolo);
  border-radius: 30%;
  background: var(--teal-chiaro);
  background: color-mix(in srgb, var(--ch-brand) 9%, #fff);
  color: var(--ch-brand-icona, var(--ch-brand));
  line-height: 1;
}
.ch-simbolo__svg { width: 54%; height: 54%; display: block; }
/* Loghi che sono una scritta orizzontale (EPSON, "Trip."): più larghi. */
.ch-simbolo--scritta .ch-simbolo__svg { width: 80%; height: 80%; }

/* Il badge tipografico: la sigla nel colore del marchio, su una tinta
   chiara dello stesso colore. Non imita il logo: dice il nome. */
.ch-simbolo--sigla {
  font-size: calc(var(--ch-simbolo) * 0.44);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.ch-simbolo--lunga { font-size: calc(var(--ch-simbolo) * 0.29); letter-spacing: 0; }
.ch-simbolo--neutro { background: var(--teal-chiaro); color: var(--teal-scuro); }
.ch-simbolo--sito { background: var(--teal-chiaro); color: var(--teal-scuro); }

/* --------------------------------------------------------------------------
   Tessere
   -------------------------------------------------------------------------- */
.ch-tessera {
  /* Il vecchio .tessera spezzava i nomi ovunque ("Booking.co / m"): qui si
     va a capo solo agli spazi. */
  overflow-wrap: normal;
  word-break: normal;
  hyphens: manual;
}
.ch-tessera__testo { display: grid; min-width: 0; }
.ch-tessera__nome {
  min-width: 0;
  font-weight: 600;
  color: var(--teal-profondo);
  line-height: 1.25;
}
.ch-tessera__cat {
  margin-top: 0.125rem;
  font-size: 0.75rem;
  line-height: 1.3;
  color: var(--grigio);
}

.ch-tessera--grande {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 72px;
  padding: 0.75rem 1rem 0.75rem 0.75rem;
  background: var(--carta);
  border: 1px solid var(--filetto);
  border-radius: var(--r-piccolo);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.ch-tessera--grande .ch-tessera__nome { font-size: var(--t-piccolo); }
.ch-tessera--grande:hover {
  transform: translateY(-2px);
  box-shadow: var(--ch-ombra-2);
  border-color: var(--menta-scura);
}
.ch-tessera--lungo .ch-tessera__nome {
  font-size: 0.8125rem;
  /* Ultima risorsa, SOLO per i nomi lunghi senza spazi (domini): spezza
     soltanto se la parola da sola non entra nella riga. */
  overflow-wrap: break-word;
}

.ch-tessera--pillola {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3125rem 1rem 0.3125rem 0.3125rem;
  background: var(--carta);
  border: 1px solid var(--filetto);
  border-radius: var(--r-pillola);
  box-shadow: var(--ch-ombra-1);
  font-size: var(--t-piccolo);
}
.ch-tessera--pillola .ch-simbolo { --ch-simbolo: 32px; border-radius: 50%; }

.ch-tessera--finale { padding: 0; border: 0; background: var(--teal-profondo); }
.ch-tessera--finale :is(a, span) {   /* span: con la pagina Integrazioni spenta non è un link */
  display: block;
  padding: 0.6875rem 1.125rem;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   HUB a due vie
   -------------------------------------------------------------------------- */
.ch-hub {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

.ch-hub__scena {
  position: relative;
  aspect-ratio: 1 / 1;
  container-type: inline-size;
  /* Un alone menta dietro l'orbita: dà profondità senza un'immagine. */
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.9) 0 16%, transparent 17%),
    radial-gradient(circle at 50% 50%, var(--teal-chiaro) 0 44%, rgba(230, 244, 246, 0) 72%);
  border-radius: 50%;
}

.ch-hub__rete {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.ch-hub__alone { fill: none; stroke: var(--menta); stroke-width: 0.3; }

.ch-hub__anello {
  fill: none;
  stroke: var(--menta-scura);
  stroke-width: 0.35;
  stroke-dasharray: 0.8 1.6;
  transform-box: fill-box;
  transform-origin: center;
  animation: ch-gira 110s linear infinite;
}
.ch-hub__anello--esterno { animation-duration: 160s; animation-direction: reverse; }

.ch-hub__satellite {
  fill: var(--menta-scura);
  animation: ch-brilla 5s ease-in-out infinite;
  animation-delay: calc(var(--k) * -0.45s);
}

.ch-hub__traccia {
  fill: none;
  stroke: var(--menta-scura);
  stroke-width: 0.4;
  stroke-linecap: round;
}

/* Gli impulsi: un trattino che scorre sul filo. pathLength=100 sul path,
   quindi le misure sono in percentuale della lunghezza. Il vuoto (300) è
   più lungo del filo, così il trattino non ricompare all'altro capo. */
.ch-hub__impulso {
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 9 300;
}
.ch-hub__impulso--esce {
  stroke: var(--ch-esce);
  stroke-width: 1;
  stroke-dashoffset: 9;
  animation: ch-esce 3.6s cubic-bezier(0.45, 0, 0.55, 1) infinite;
  animation-delay: calc(var(--i) * -0.41s);
}
.ch-hub__impulso--entra {
  stroke: var(--ch-entra);
  stroke-width: 1.35;
  stroke-dashoffset: -100;
  opacity: 0;
  /* Senza JS: una prenotazione ogni tanto, da un canale diverso ogni volta. */
  animation: ch-entra 13.5s linear infinite;
  animation-delay: calc(var(--i) * 1.5s);
}

@keyframes ch-esce {
  0%   { stroke-dashoffset: 9;    opacity: 0; }
  6%   { opacity: 1; }
  52%  { stroke-dashoffset: -100; opacity: 1; }
  53%, 100% { stroke-dashoffset: -100; opacity: 0; }
}
@keyframes ch-entra {
  0%   { stroke-dashoffset: -100; opacity: 1; }
  8%   { stroke-dashoffset: 9;    opacity: 1; }
  8.5%, 100% { stroke-dashoffset: 9; opacity: 0; }
}
@keyframes ch-entra-una {
  0%   { stroke-dashoffset: -100; opacity: 1; }
  92%  { stroke-dashoffset: 9;    opacity: 1; }
  100% { stroke-dashoffset: 9;    opacity: 0; }
}
@keyframes ch-gira { to { transform: rotate(360deg); } }
@keyframes ch-brilla { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }

/* Il centro: il marchio BookingDesigner, con un respiro teal. */
.ch-hub__centro {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22%;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  background: var(--carta);
  border-radius: 50%;
  box-shadow: 0 0 0 2.2cqi var(--teal-chiaro), 0 0 0 2.5cqi var(--menta), var(--ch-ombra-3);
  z-index: 1;
}
.ch-hub__centro img { width: 50%; height: auto; }
.ch-hub__centro::before,
.ch-hub__centro::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--teal);
  opacity: 0;
  animation: ch-respiro 3.6s ease-out infinite;
}
.ch-hub__centro::after { animation-delay: 1.8s; }
@keyframes ch-respiro {
  0%   { transform: scale(1);   opacity: 0.45; }
  100% { transform: scale(1.7); opacity: 0; }
}

/* I nodi: il chip è centrato sul punto dell'orbita, il nome gli sta sotto. */
.ch-hub__nodi { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; }
.ch-hub__nodo {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 12%;
  transform: translate(-50%, -50%);
  z-index: 1;
}
.ch-hub__nodo--interno { width: 15%; }

.ch-hub__chip {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: var(--carta);
  box-shadow: var(--ch-ombra-2), 0 0 0 1px rgba(0, 66, 73, 0.05);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  animation: ch-galleggia 7s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.8s);
}
.ch-hub__chip .ch-simbolo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: transparent;
  font-size: 4.4cqi;
}
.ch-hub__nodo--esterno .ch-hub__chip .ch-simbolo { font-size: 3.6cqi; }
.ch-hub__chip .ch-simbolo--lunga { font-size: 3cqi; }
.ch-hub__nodo--esterno .ch-hub__chip .ch-simbolo--lunga { font-size: 2.6cqi; }
.ch-hub__chip .ch-simbolo__svg { width: 46%; height: 46%; }
.ch-hub__chip .ch-simbolo--scritta .ch-simbolo__svg { width: 68%; height: 68%; }

@keyframes ch-galleggia {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-0.9cqi); }
}

.ch-hub__nome {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 0.9cqi;
  padding: 0.1em 0.55em;
  border-radius: var(--r-pillola);
  background: rgba(255, 255, 255, 0.88);
  font-size: clamp(0.625rem, 2.1cqi, 0.8125rem);
  font-weight: 600;
  line-height: 1.35;
  color: var(--teal-profondo);
  white-space: nowrap;
}

/* Il canale che ha appena mandato una prenotazione. */
.ch-hub__nodo.is-evento .ch-hub__chip {
  animation-play-state: paused;
  transform: scale(1.1);
  box-shadow: 0 0 0 1cqi rgba(242, 140, 31, 0.28), var(--ch-ombra-2);
}

/* Le card che compaiono a turno. */
.ch-avviso {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: max-content;
  max-width: 250px;
  padding: 0.625rem 0.9375rem 0.625rem 0.625rem;
  background: var(--carta);
  border-radius: var(--r-piccolo);
  box-shadow: var(--ch-ombra-3), 0 0 0 1px rgba(0, 66, 73, 0.05);
  font-size: 0.8125rem;
  line-height: 1.3;
  transition: opacity 0.45s ease, transform 0.45s ease;
}
/* Negli angoli liberi dell'orbita. La prima è ancorata a DESTRA al 38%:
   cresce verso sinistra e non copre mai il nodo in alto (Google Hotel). */
.ch-avviso--entra { right: 62%; top: 1%; }
.ch-avviso--esce  { right: -3%; bottom: 1%; }

.ch-avviso__icona { flex: none; display: grid; place-items: center; }
.ch-avviso__icona .ch-simbolo { --ch-simbolo: 36px; border-radius: 50%; }
.ch-avviso__icona--ok {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--verde-chiaro);
  color: var(--verde-scuro);
}
.ch-avviso__corpo { display: grid; min-width: 0; }
.ch-avviso__titolo { font-weight: 600; color: var(--teal-profondo); }
.ch-avviso--entra .ch-avviso__titolo::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 0.4em;
  border-radius: 50%;
  background: var(--ch-entra);
  vertical-align: 0.1em;
}
.ch-avviso__titolo strong { font-weight: 700; }
.ch-avviso__riga { color: var(--grigio); font-size: 0.75rem; }

/* Con JS le card sono nascoste e compaiono a turno. */
.ch-hub.ch-js .ch-avviso { opacity: 0; transform: translateY(8px) scale(0.98); pointer-events: none; }
.ch-hub.ch-js .ch-avviso.is-visibile { opacity: 1; transform: none; }
/* …e l'impulso arancio parte solo con l'evento. */
.ch-hub.ch-js .ch-hub__impulso--entra { animation: none; opacity: 0; }
.ch-hub.ch-js .ch-hub__filo.is-evento .ch-hub__impulso--entra {
  animation: ch-entra-una 1.1s cubic-bezier(0.5, 0, 0.75, 0) 1 forwards;
}

.ch-hub__legenda {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.375rem 1.25rem;
  margin-top: 1rem;
  font-size: var(--t-etichetta);
  color: var(--grigio);
}
.ch-hub__verso { display: inline-flex; align-items: center; gap: 0.5rem; }
.ch-hub__verso::before {
  content: "";
  width: 22px;
  height: 3px;
  border-radius: 3px;
  background: var(--ch-esce);
}
.ch-hub__verso--entra::before { background: var(--ch-entra); }

/* Su schermi stretti le card escono dall'orbita e si mettono sotto, nello
   stesso posto: con JS si alternano, senza JS resta quella della prenotazione. */
@media (max-width: 560px) {
  .ch-hub__scena { margin-bottom: 5.75rem; }
  .ch-avviso,
  .ch-avviso--entra,
  .ch-avviso--esce {
    left: 50%;
    right: auto;
    top: calc(100% + 0.75rem);
    bottom: auto;
    width: max-content;
    max-width: 100%;
    transform: translateX(-50%);
  }
  .ch-hub:not(.ch-js) .ch-avviso--esce { display: none; }
  .ch-hub.ch-js .ch-avviso { transform: translate(-50%, 8px) scale(0.98); }
  .ch-hub.ch-js .ch-avviso.is-visibile { transform: translateX(-50%); }
  .ch-hub__legenda { margin-top: 0.5rem; }
}

/* --------------------------------------------------------------------------
   MARQUEE
   -------------------------------------------------------------------------- */
.ch-marquee {
  display: grid;
  gap: 0.875rem;
  overflow: hidden;
  padding-block: 0.375rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.ch-marquee__riga { overflow: hidden; padding-block: 0.25rem; }
.ch-marquee__pista {
  display: flex;
  width: max-content;
  animation: ch-scorri var(--ch-durata, 48s) linear infinite;
}
.ch-marquee__riga--dx .ch-marquee__pista { animation-direction: reverse; }
.ch-marquee:hover .ch-marquee__pista,
.ch-marquee:focus-within .ch-marquee__pista { animation-play-state: paused; }

.ch-marquee__lista {
  display: flex;
  flex: none;
  gap: 0.75rem;
  /* Il padding a destra è uguale al gap: le due copie si danno il cambio
     senza scatto al -50%. */
  padding: 0 0.75rem 0 0;
  margin: 0;
  list-style: none;
}
.ch-marquee .ch-tessera--pillola { white-space: nowrap; }
@keyframes ch-scorri { to { transform: translateX(-50%); } }

/* --------------------------------------------------------------------------
   "Aggiorni una volta, cambia ovunque"
   -------------------------------------------------------------------------- */
.ch-prop-blocco {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: clamp(2rem, 4vw, 4.5rem);
  align-items: center;
}
.ch-prop-blocco__testo { max-width: 46ch; }
.ch-prop-blocco__titolo { margin-top: 0.75rem; }
.ch-prop-blocco__testo > p:not(.etichetta) { margin-top: 0.875rem; }
.ch-prop-blocco__punti { display: grid; gap: 0.5rem; margin-top: 1.25rem; }
.ch-prop-blocco__punti li {
  position: relative;
  padding-left: 1.75rem;
  font-size: var(--t-piccolo);
  color: var(--grigio-scuro);
}
.ch-prop-blocco__punti li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3em;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 50%;
  background: var(--verde-chiaro)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234f6145' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.2 4.2L19 7'/%3E%3C/svg%3E")
    center / 62% no-repeat;
}

.ch-prop { width: 100%; }
.ch-prop__finestra {
  max-width: 500px;
  margin-inline: auto;
  background: var(--carta);
  border: 1px solid var(--filetto);
  border-radius: var(--r-card);
  box-shadow: var(--ch-ombra-3);
  overflow: hidden;
  font-size: var(--t-piccolo);
}

.ch-prop__barra {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem 0.75rem 1.25rem;
  background: var(--fascia);
  border-bottom: 1px solid var(--filetto);
}
.ch-prop__pallini { display: flex; gap: 5px; }
.ch-prop__pallini i { width: 9px; height: 9px; border-radius: 50%; background: var(--menta-scura); }
.ch-prop__titolo {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--t-etichetta);
  font-weight: 600;
  color: var(--teal-profondo);
}
@media (max-width: 420px) {
  .ch-prop__pallini { display: none; }
  .ch-prop__barra { padding-left: 1rem; }
  .ch-prop__sorgente { margin: 0.75rem; }
  .ch-prop__canale { padding-inline: 0.875rem 1rem; gap: 0.625rem; }
}
.ch-prop__sync {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.65rem;
  border-radius: var(--r-pillola);
  background: var(--verde-chiaro);
  color: var(--verde-scuro);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.ch-prop__sync-punto { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ch-prop.is-in-corso .ch-prop__sync { background: var(--teal-chiaro); color: var(--teal-scuro); }
.ch-prop.is-in-corso .ch-prop__sync-punto { animation: ch-brilla 0.8s ease-in-out infinite; }

.ch-prop__sorgente {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1rem;
  padding: 0.875rem 0.875rem 0.875rem 1rem;
  background: var(--teal-chiaro);
  border: 1.5px solid var(--menta-scura);
  border-radius: var(--r-piccolo);
  transition: border-color 0.3s ease;
}
.ch-prop__cosa { display: grid; min-width: 0; }
.ch-prop__camera { font-weight: 600; color: var(--teal-profondo); line-height: 1.3; }
.ch-prop__data { font-size: 0.75rem; color: var(--grigio); }
.ch-prop__campo {
  flex: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 5.5rem;
  justify-content: flex-end;
  padding: 0.4rem 0.75rem;
  background: var(--carta);
  border: 1px solid var(--filetto);
  border-radius: 10px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.ch-prop__prezzo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--teal-profondo);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.ch-prop__cursore {
  width: 2px;
  height: 1.2em;
  margin-left: 2px;
  background: var(--teal);
  opacity: 0;
}
.ch-prop.is-modifica .ch-prop__sorgente { border-color: var(--teal); }
.ch-prop.is-modifica .ch-prop__campo { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0, 147, 163, 0.18); }
.ch-prop.is-modifica .ch-prop__cursore { animation: ch-cursore 0.9s steps(1) infinite; }
@keyframes ch-cursore { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

.is-cambio { animation: ch-cambio 0.5s ease-out; }
@keyframes ch-cambio {
  0%   { transform: translateY(-40%); opacity: 0; }
  100% { transform: none; opacity: 1; }
}

.ch-prop__canali { margin: 0; padding: 0 0 0.5rem; list-style: none; }
.ch-prop__canale {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5625rem 1.25rem 0.5625rem 1rem;
  border-top: 1px solid var(--filetto);
}
.ch-prop__canale .ch-simbolo { --ch-simbolo: 32px; border-radius: 50%; }
.ch-prop__nome { font-weight: 600; color: var(--grigio-scuro); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-prop__valore {
  font-weight: 600;
  color: var(--teal-profondo);
  font-variant-numeric: tabular-nums;
  transition: color 0.3s ease;
}
.ch-prop__stato {
  position: relative;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--verde-chiaro);
  color: var(--verde-scuro);
  transition: background-color 0.3s ease, transform 0.3s ease;
}
.ch-prop__stato svg { transition: opacity 0.2s ease; }

/* In attesa: prezzo vecchio in grigio, al posto della spunta un puntino. */
.ch-prop__canale.is-attesa .ch-prop__valore { color: var(--grigio-tenue); }
.ch-prop__canale.is-attesa .ch-prop__stato { background: var(--grigio-chiaro); }
.ch-prop__canale.is-attesa .ch-prop__stato svg { opacity: 0; }
.ch-prop__canale.is-attesa .ch-prop__stato::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--grigio-tenue);
}
/* L'onda: la riga si illumina quando il prezzo arriva. */
.ch-prop__canale.is-arrivo { animation: ch-onda 0.9s ease-out; }
.ch-prop__canale.is-arrivo .ch-prop__stato { transform: scale(1.18); }
@keyframes ch-onda {
  0%   { background: var(--teal-chiaro); }
  100% { background: rgba(230, 244, 246, 0); }
}

/* --------------------------------------------------------------------------
   Pagina Integrazioni
   -------------------------------------------------------------------------- */
.ch-hero__griglia {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}
.ch-hero__testo { max-width: 50ch; }
/* La riga "Con Sales Hub … già inclusi", sotto il testo dell'hero. */
.ch-hero__incluso {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 1.25rem;
  font-size: var(--t-piccolo);
  font-weight: 500;
  color: var(--teal-profondo);
}
.ch-hero__incluso .ch-simbolo { --ch-simbolo: 28px; border-radius: 50%; }
.ch-hero__incluso span { margin-left: 0.375rem; }
@media (max-width: 1000px) {
  .ch-hero__griglia { grid-template-columns: minmax(0, 1fr); }
  .ch-hero__testo { max-width: 60ch; }
}

.ch-numeri__nota { margin-top: 1rem; font-size: var(--t-etichetta); color: var(--grigio); }
@media (max-width: 560px) {
  .ch-numeri .numeri { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ch-numeri .numero { padding: 1rem 1.125rem; }
  .ch-numeri .numero__valore { font-size: 1.375rem; }
}

.ch-marquee-fascia { padding-block: clamp(1.5rem, 3vw, 2.5rem) 0; }

/* --- Catalogo ------------------------------------------------------------- */
.ch-catalogo__testa { max-width: 52ch; }
.ch-catalogo__testa h2 { margin-top: 0.75rem; }
.ch-catalogo__testa p:not(.etichetta) { margin-top: 0.75rem; }

.ch-strumenti {
  position: sticky;
  top: var(--ch-header);
  z-index: 20;
  margin-top: 1.75rem;
  padding-block: 0.875rem;
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--filetto);
}
.ch-strumenti__riga { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }

.ch-cerca { position: relative; flex: 1 1 280px; max-width: 420px; }
.ch-cerca svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--teal-scuro);
  pointer-events: none;
}
.ch-cerca input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border: 1.5px solid var(--filetto);
  border-radius: var(--r-pillola);
  background: var(--carta);
  font: inherit;
  font-size: 1rem;   /* sotto i 16px iOS ingrandisce la pagina al tocco */
  color: var(--inchiostro);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.ch-cerca input::placeholder { color: var(--grigio); opacity: 0.8; }
.ch-cerca input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0, 147, 163, 0.18); }

.ch-esito { font-size: var(--t-etichetta); color: var(--grigio); min-height: 1.3em; }
.ch-esito:empty { display: none; }

.ch-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}
.ch-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4375rem 0.875rem;
  border: 1.5px solid transparent;
  border-radius: var(--r-pillola);
  background: var(--teal-chiaro);
  color: var(--teal-profondo);
  font: inherit;
  font-size: var(--t-etichetta);
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.ch-chip:hover { border-color: var(--menta-scura); }
.ch-chip__n { font-weight: 500; color: var(--teal-scuro); font-variant-numeric: tabular-nums; }
.ch-chip[aria-pressed="true"] { background: var(--teal-profondo); color: #fff; }
.ch-chip[aria-pressed="true"] .ch-chip__n { color: var(--menta-scura); }

@media (max-width: 700px) {
  .ch-strumenti { padding-block: 0.625rem; }
  /* Una riga sola che scorre di lato: la barra resta bassa anche con
     undici categorie. Esce dal margine della pagina fino al bordo. */
  .ch-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-inline: calc(var(--bordo) * -1);
    padding-inline: var(--bordo);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .ch-chips::-webkit-scrollbar { display: none; }
  .ch-chips li { flex: none; }
}

/* In evidenza */
.ch-evidenza { margin-top: 2rem; }
.ch-evidenza__titolo { font-size: var(--t-h4); font-weight: 600; color: var(--teal-profondo); }
.ch-griglia {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr));
  gap: 0.75rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}
@media (max-width: 560px) {
  .ch-griglia { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
  .ch-griglia .ch-tessera--grande { gap: 0.5rem; min-height: 60px; padding: 0.5rem 0.625rem 0.5rem 0.5rem; }
  .ch-griglia .ch-simbolo { --ch-simbolo: 34px; }
  .ch-griglia .ch-tessera__nome { font-size: 0.8125rem; }
  /* Su mobile bastano i nomi, e le prime dodici: gli altri marchi hanno
     comunque il loro simbolo nell'elenco qui sotto. */
  .ch-griglia .ch-tessera__cat { display: none; }
  .ch-evidenza .ch-griglia > :nth-child(n+13) { display: none; }
}

/* Gruppi */
.ch-gruppi { margin-top: 2.25rem; border-bottom: 1px solid var(--filetto); }
.ch-gruppo { border-top: 1px solid var(--filetto); scroll-margin-top: calc(var(--ch-header) + 9rem); }
.ch-gruppo__testa {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.125rem 0;
  cursor: pointer;
  list-style: none;
}
.ch-gruppo__testa::-webkit-details-marker { display: none; }
.ch-gruppo__titolo { font-size: 1.125rem; }
.ch-gruppo__conteggio {
  font-size: var(--t-etichetta);
  font-weight: 600;
  color: var(--teal-scuro);
  background: var(--teal-chiaro);
  border-radius: var(--r-pillola);
  padding: 0.15rem 0.65rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ch-gruppo__nota { font-size: var(--t-etichetta); color: var(--grigio); }
@media (max-width: 560px) {
  .ch-gruppo__nota { display: none; }
  .ch-gruppo__titolo { font-size: 1.0625rem; }
}
.ch-gruppo__freccia {
  margin-left: auto;
  flex: none;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--fascia);
  color: var(--teal-profondo);
  transition: transform 0.25s ease, background-color 0.2s ease;
}
.ch-gruppo[open] > .ch-gruppo__testa .ch-gruppo__freccia { transform: rotate(180deg); }
.ch-gruppo__testa:hover .ch-gruppo__freccia { background: var(--menta); }

.ch-voci {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0 0 1.5rem;
  list-style: none;
}
.ch-voce {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 100%;
  padding: 0.375rem 0.875rem;
  border-radius: var(--r-pillola);
  background: var(--fascia);
  color: var(--grigio-scuro);
  font-size: 0.875rem;
  line-height: 1.3;
  overflow-wrap: normal;
}
.ch-voce--marchio { padding-left: 0.25rem; background: var(--carta); border: 1px solid var(--filetto); }
.ch-voce .ch-simbolo { --ch-simbolo: 24px; border-radius: 50%; }
.ch-voce mark { background: var(--senape-chiara); color: inherit; border-radius: 3px; padding: 0 1px; }

.ch-vuoto {
  margin-top: 2rem;
  padding: 1.5rem;
  text-align: center;
  background: var(--teal-chiaro);
  border-radius: var(--r-media);
  color: var(--teal-profondo);
}
.ch-vuoto p + p { margin-top: 0.75rem; }

.ch-marchi-nota { margin-top: 1.5rem; font-size: 0.75rem; color: var(--grigio); max-width: 80ch; }

/* L'attributo hidden deve vincere sui display dichiarati qui sopra. */
.ch-voce[hidden],
.ch-gruppo[hidden],
.ch-evidenza[hidden],
.ch-vuoto[hidden],
.ch-cerca[hidden],
.ch-griglia > [hidden] { display: none !important; }

/* --------------------------------------------------------------------------
   Pagina di validazione /_canali
   -------------------------------------------------------------------------- */
.ch-prova__blocco + .ch-prova__blocco { margin-top: 1rem; }
.ch-prova__nota { font-size: var(--t-etichetta); color: var(--grigio); margin-top: 0.5rem; }

/* --------------------------------------------------------------------------
   Movimento: fermo fuori dallo schermo e per chi lo chiede
   -------------------------------------------------------------------------- */
.ch-fermo,
.ch-fermo *,
.ch-fermo *::before,
.ch-fermo *::after { animation-play-state: paused !important; }

@media (prefers-reduced-motion: reduce) {
  .ch-hub *,
  .ch-hub *::before,
  .ch-hub *::after,
  .ch-marquee *,
  .ch-prop *,
  .ch-prop *::before { animation: none !important; transition: none !important; }

  /* Gli impulsi diventano un tratto fermo a metà filo: il verso resta leggibile. */
  .ch-hub__impulso--esce { opacity: 1; stroke-dashoffset: -30; }
  .ch-hub__impulso--entra { opacity: 0; }

  /* Il marquee diventa un elenco fermo, a capo, centrato. */
  .ch-marquee { -webkit-mask-image: none; mask-image: none; padding-inline: var(--bordo); }
  .ch-marquee__pista { width: auto; }
  .ch-marquee__lista { flex: 1 1 auto; flex-wrap: wrap; justify-content: center; padding: 0; }
  .ch-marquee__lista[aria-hidden="true"],
  .ch-marquee__lista > [aria-hidden="true"] { display: none; }
}

/* Hero della pagina Integrazioni con il titolo display: nella colonna
   stretta il corpo pieno andava su tre righe (come .hero--prodotto). */
.ch-hero__griglia .display { font-size: clamp(2.125rem, 2.4vw + 1.25rem, 3.75rem); }

/* Revisione mobile (ottobre 2026): chip alti 44 px, la striscia sfuma a
   destra per far capire che continua, contatori dei gruppi in colonna. */
@media (max-width: 700px) {
  .ch-chip { min-height: 2.75rem; padding-inline: 1rem; }
  .ch-chips {
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 2.5rem), transparent);
            mask-image: linear-gradient(90deg, #000 calc(100% - 2.5rem), transparent);
  }
}
@media (max-width: 560px) {
  .ch-gruppo__conteggio { margin-left: auto; }
  .ch-gruppo__freccia { margin-left: 0; width: 36px; height: 36px; }
  .ch-gruppo__testa { min-height: 3.5rem; }
  .ch-hub__legenda { flex-direction: column; align-items: flex-start; width: max-content; margin-inline: auto; }
}
