/* ==========================================================================
   THE WISE GUY · Testata adattiva · Variante A: Linea di precisione (25/11/2026)
   - Sottolineatura 2px a tutta larghezza della parola, indicatore unico scorrevole
   - Angoli vivi (0px), zero pillole, zero aloni/glow sfocati
   - Hover, voce attiva e focus da tastiera allineati al pixel (155ms, easing deciso)
   - Tendine (Prodotti, Impara l'IA, Altro, Account) e menu mobile coerenti
   Tutte le regole valgono solo con html.tp (script attivo).
   Punti di passaggio: <760 menu a panino · 760–1319 voci secondarie in «Altro» · ≥1320 menu completo
   · ≥1600 voci più ariose · ≥1920 testata a tutta larghezza (fino a 2560).
   ========================================================================== */

/* larghezza: la testata segue lo schermo invece di fermarsi a 1440 px */
html.tp .site-header > .twg-container { max-width: var(--twg-container-max, 1360px); padding-inline: var(--twg-gutter, 24px); }

/* ── P1-ECOSISTEMA-b: Testata larga su hero cinema (>=1280px) che si stringe con lo scroll verso la colonna (CLS 0 GPU translate3d, 60fps) ── */
@media (min-width: 1280px) {
  html:has(#mainContent.is-home .hero-stage[data-hero-mode="cinema"]),
  html.tp.tp-hero-largo {
    --twg-wide-gx: clamp(24px, calc(3.75vw - 24px), 48px);
    --tp-shift-x: max(0px, calc((100vw - var(--twg-container-max, 1360px)) / 2 + var(--twg-gutter, 24px) - var(--twg-wide-gx)));
  }
  html:has(#mainContent.is-home .hero-stage[data-hero-mode="cinema"]) .site-header > .twg-container,
  html.tp.tp-hero-largo .site-header > .twg-container {
    max-width: none;
    padding-inline: var(--twg-wide-gx);
  }
  html:has(#mainContent.is-home .hero-stage[data-hero-mode="cinema"]) .site-header .nav-bar > .brand-link,
  html:has(#mainContent.is-home .hero-stage[data-hero-mode="cinema"]) .site-header .nav-bar > .wj-brand-shell,
  html.tp.tp-hero-largo .site-header .nav-bar > .brand-link,
  html.tp.tp-hero-largo .site-header .nav-bar > .wj-brand-shell {
    position: relative;
    z-index: 3;
    transform: translate3d(calc(var(--tp-chiudi, 0) * var(--tp-shift-px, var(--tp-shift-x))), 0, 0);
    will-change: transform;
  }
  html:has(#mainContent.is-home .hero-stage[data-hero-mode="cinema"]) .site-header .nav-actions,
  html.tp.tp-hero-largo .site-header .nav-actions {
    position: relative;
    z-index: 3;
    transform: translate3d(calc(var(--tp-chiudi, 0) * var(--tp-shift-px, var(--tp-shift-x)) * -1), 0, 0);
    will-change: transform;
  }
}
html.tp .nav-bar { gap: clamp(10px, 1.4vw, 28px); transition: height .35s ease; }
html.tp .brand-emblem { transition: width .35s ease, height .35s ease, transform .3s cubic-bezier(.22,1,.36,1), border-color .25s ease; }

/* menu sempre in riga da 760 px in su (prima spariva sotto 1440) */
@media (min-width: 960px) {
  html.tp .desktop-nav { display: flex !important; position: relative; flex: 1 1 auto; justify-content: center; align-items: center; min-width: 0; gap: clamp(4px, .45vw, 8px); }
  html.tp .mobile-menu-btn { display: none !important; }
  html.tp .hide-mobile-cta { display: inline-flex !important; }
  html.tp .mobile-drawer { display: none !important; }
}
@media (min-width: 960px) and (max-width: 1319px) {
  html.tp .desktop-nav > a.tp-sec { display: none !important; }
  html.tp .tp-altro { display: inline-flex !important; }
  html.tp .brand-name { font-size: 16px; }
  html.tp .hide-mobile-cta.btn-sm { padding: 0 12px; font-size: 12.5px; }
}
@media (min-width: 960px) and (max-width: 899px) {
  html.tp .brand-text-wrap { display: none; }
}
@media (min-width: 1320px) {
  html.tp .desktop-nav .nav-link {
    font-size: clamp(13px, 0.88vw, 14px);
    padding-inline: clamp(6px, 0.58vw, 10px);
    white-space: nowrap;
  }
  html.tp.tp-compatto .desktop-nav > a.tp-sec { display: none !important; }
  html.tp.tp-compatto .tp-altro { display: inline-flex !important; }
}
@media (max-width: 959px) {
  html.tp .desktop-nav { display: none !important; }
  html.tp .nav-bar { gap: 6px; }
  html.tp .nav-actions { gap: 6px; }
}

/* ── «Altro» (760–1319 px) ── */
html.tp .tp-altro { display: none; position: relative; align-items: center; }
html.tp .tp-altro-btn { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; cursor: pointer; font-family: inherit; }
html.tp .tp-altro-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 150ms cubic-bezier(.2,0,0,1); }
html.tp .tp-altro-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
html.tp .tp-altro-btn { anchor-name: --tp-altro; }
html.tp .tp-altro-menu {
  margin: 0; inset: auto; min-width: 210px; padding: 6px;
  border-radius: 0 !important;
  border: 1px solid var(--border-medium);
  border-top: 2px solid var(--accent-cyan);
  background: var(--bg-nav); color: var(--fg-primary);
  backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%);
  box-shadow: 0 18px 40px rgba(0,0,0,.42);
}
html.tp[data-theme="light"] .tp-altro-menu { box-shadow: 0 16px 36px rgba(15,23,42,.14); }
@supports (position-area: block-end) {
  html.tp .tp-altro-menu[popover] { position: fixed; position-anchor: --tp-altro; position-area: block-end span-inline-start; margin-top: 10px; position-try-fallbacks: flip-inline; }
}
html.tp .tp-altro-menu:popover-open { display: flex; flex-direction: column; gap: 2px; }
html.tp .tp-altro-item {
  display: block; padding: 9px 12px; border-radius: 0 !important;
  border-left: 2px solid transparent;
  color: var(--fg-secondary); font-size: 14.5px; text-decoration: none; white-space: nowrap;
  transition: border-color 140ms cubic-bezier(.2,0,0,1), background-color 140ms cubic-bezier(.2,0,0,1), color 140ms cubic-bezier(.2,0,0,1);
}
html.tp .tp-altro-item:hover,
html.tp .tp-altro-item:focus-visible,
html.tp .tp-altro-item[aria-current],
html.tp .tp-altro-item.tp-on {
  background: rgba(34,211,238,.07);
  border-left-color: var(--accent-cyan);
  color: var(--fg-primary);
}
html.tp[data-theme="light"] .tp-altro-item:hover,
html.tp[data-theme="light"] .tp-altro-item:focus-visible,
html.tp[data-theme="light"] .tp-altro-item[aria-current],
html.tp[data-theme="light"] .tp-altro-item.tp-on {
  background: rgba(14,116,144,.07);
}
html.tp .tp-altro-item:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: -2px; border-radius: 0 !important; }

/* ── 2 · Linea di precisione (Variante A: sottolineatura 2px, angoli vivi, indicatore unico) ── */
html.tp .desktop-nav > .nav-link,
html.tp .desktop-nav > .nav-dropdown,
html.tp .desktop-nav > .tp-altro { position: relative; z-index: 1; }
html.tp .desktop-nav .nav-dropdown { display: inline-flex; align-items: center; }
html.tp .desktop-nav .nav-link,
html.tp .desktop-nav .nav-link:hover,
html.tp .desktop-nav .nav-link.is-active,
html.tp .desktop-nav .nav-link:focus-visible,
html.tp .desktop-nav .nav-dropdown-trigger,
html.tp .desktop-nav .nav-dropdown-trigger:hover,
html.tp .desktop-nav .nav-dropdown-trigger:focus-visible,
html.tp .desktop-nav .tp-altro-btn,
html.tp .desktop-nav .tp-altro-btn:hover,
html.tp .desktop-nav .tp-altro-btn:focus-visible {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}
html.tp .desktop-nav .nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  line-height: 1.45;
  color: var(--fg-secondary);
  transition: color 140ms cubic-bezier(.2,0,0,1);
}
html.tp .desktop-nav .nav-link.is-active:not(.tp-on):not(:hover):not(:focus-visible) {
  color: var(--fg-secondary);
}
html.tp .desktop-nav .nav-link:hover,
html.tp .desktop-nav .nav-link:focus-visible,
html.tp .desktop-nav .nav-link.tp-on,
html.tp .desktop-nav .nav-link[aria-current="page"],
html.tp .desktop-nav .nav-link[aria-expanded="true"],
html.tp .desktop-nav .nav-dropdown:has(.nav-link:hover, .nav-link:focus-visible, .nav-dropdown-trigger[aria-expanded="true"]) > .tp-dd-link {
  color: var(--fg-primary) !important;
}
html.tp .desktop-nav .nav-link:focus-visible,
html.tp .desktop-nav .tp-altro-btn:focus-visible {
  outline: 2px solid var(--accent-cyan) !important;
  outline-offset: 2px !important;
  border-radius: 0 !important;
}
html.tp .tp-pill {
  position: absolute;
  left: 0;
  top: 0;
  width: 100px;
  height: 2px;
  z-index: 2;
  border-radius: 0 !important;
  pointer-events: none;
  opacity: 0;
  transform-origin: 0 0;
  background: linear-gradient(90deg, var(--accent-violet, #a855f7) 0%, var(--accent-cyan, #22d3ee) 100%);
  box-shadow: none !important;
}
html.tp[data-theme="light"] .tp-pill {
  background: linear-gradient(90deg, var(--accent-violet, #6d28d9) 0%, var(--accent-cyan, #0e7490) 100%);
  box-shadow: none !important;
}
@media (prefers-reduced-motion: no-preference) {
  html.tp .tp-pill {
    transition: transform 155ms cubic-bezier(.2,0,0,1), opacity 130ms ease;
  }
}

/* ── Tendine «Prodotti» e «Impara l'IA»: angoli vivi, 2px hairline, zero pillole/aloni ── */
html.tp #siteHeader .nav-oss-popover {
  border-radius: 0 !important;
  border: 1px solid var(--border-medium) !important;
  border-top: 2px solid var(--accent-cyan) !important;
  box-shadow: 0 22px 54px rgba(0,0,0,.56) !important;
}
html.tp[data-theme="light"] #siteHeader .nav-oss-popover {
  box-shadow: 0 18px 42px rgba(15,23,42,.14) !important;
}
@media (prefers-reduced-motion: no-preference) {
  html.tp #siteHeader .nav-oss-popover[popover] {
    transform: translateY(-4px);
    transition: opacity 150ms cubic-bezier(.2,0,0,1), transform 150ms cubic-bezier(.2,0,0,1), display 150ms, overlay 150ms;
    transition-behavior: allow-discrete;
  }
  html.tp #siteHeader .nav-oss-popover[popover]:is(:popover-open, .\:popover-open) {
    transform: translateY(0);
  }
  @starting-style {
    html.tp #siteHeader .nav-oss-popover[popover]:is(:popover-open, .\:popover-open) {
      opacity: 0;
      transform: translateY(-4px);
    }
  }
}
html.tp #siteHeader .pp-menu-item,
html.tp #siteHeader .nav-oss-item {
  border-radius: 0 !important;
  border: 0 !important;
  border-left: 2px solid transparent !important;
  box-shadow: none !important;
  transition: border-color 140ms cubic-bezier(.2,0,0,1), background-color 140ms cubic-bezier(.2,0,0,1) !important;
}
html.tp #siteHeader .pp-menu-item:hover,
html.tp #siteHeader .pp-menu-item:focus-visible,
html.tp #siteHeader .pp-menu-item[aria-current="page"],
html.tp #siteHeader .nav-oss-item:hover,
html.tp #siteHeader .nav-oss-item:focus-visible,
html.tp #siteHeader .nav-oss-item[aria-current="page"] {
  background: rgba(34,211,238,.06) !important;
  border-left-color: var(--accent-cyan) !important;
}
html.tp[data-theme="light"] #siteHeader .pp-menu-item:hover,
html.tp[data-theme="light"] #siteHeader .pp-menu-item:focus-visible,
html.tp[data-theme="light"] #siteHeader .pp-menu-item[aria-current="page"],
html.tp[data-theme="light"] #siteHeader .nav-oss-item:hover,
html.tp[data-theme="light"] #siteHeader .nav-oss-item:focus-visible,
html.tp[data-theme="light"] #siteHeader .nav-oss-item[aria-current="page"] {
  background: rgba(14,116,144,.06) !important;
}
html.tp #siteHeader .aa-ico {
  border-radius: 0 !important;
  background: transparent !important;
  border: 1px solid var(--border-medium) !important;
  transition: border-color 140ms cubic-bezier(.2,0,0,1), color 140ms cubic-bezier(.2,0,0,1), background-color 140ms cubic-bezier(.2,0,0,1);
}
html.tp #siteHeader .aa-menu-item:hover .aa-ico,
html.tp #siteHeader .aa-menu-item:focus-visible .aa-ico,
html.tp #siteHeader .aa-menu-item[aria-current="page"] .aa-ico {
  border-color: var(--accent-cyan) !important;
  color: var(--accent-cyan) !important;
  background: rgba(34,211,238,.08) !important;
}
html.tp[data-theme="light"] #siteHeader .aa-menu-item:hover .aa-ico,
html.tp[data-theme="light"] #siteHeader .aa-menu-item:focus-visible .aa-ico,
html.tp[data-theme="light"] #siteHeader .aa-menu-item[aria-current="page"] .aa-ico {
  background: rgba(14,116,144,.08) !important;
}
html.tp #siteHeader .nav-oss-featured {
  border-radius: 0 !important;
  border: 1px solid var(--border-medium) !important;
  border-left: 2px solid var(--accent-cyan) !important;
  box-shadow: none !important;
}
html.tp #siteHeader .nav-oss-featured:hover,
html.tp #siteHeader .nav-oss-featured:focus-visible {
  border-color: var(--accent-cyan) !important;
  box-shadow: none !important;
}
html.tp #siteHeader .nav-oss-badge,
html.tp #siteHeader .nav-oss-chip,
html.tp #siteHeader .nav-oss-follow {
  border-radius: 0 !important;
  box-shadow: none !important;
}
html.tp #siteHeader .pp-menu-foot a:hover,
html.tp #siteHeader .pp-menu-foot a:focus-visible,
html.tp #siteHeader .pp-menu-foot a[aria-current="page"],
html.tp #siteHeader .nav-oss-all:hover,
html.tp #siteHeader .nav-oss-all:focus-visible {
  text-decoration: none !important;
  border-bottom: 2px solid var(--accent-cyan);
  padding-bottom: 1px;
}
html.tp #siteHeader .nav-oss-popover :is(a, button):focus-visible {
  outline: 2px solid var(--accent-cyan) !important;
  outline-offset: -2px !important;
  border-radius: 0 !important;
}

/* ── Comandi sempre in vista (sostituisce la capsula «Opzioni», 23/11): IT|EN · tema · musica · account · Prenota ── */
html.tp .tp-acts { gap: 8px; }
html.tp .tp-acts > .lang-switch { order: 1; display: inline-flex !important; }
html.tp .tp-acts > #themeToggleBtn { order: 2; width: 36px; min-width: 36px; padding: 0 !important; justify-content: center; border-radius: 999px; }
html.tp #themeToggleLabel { display: none !important; }
html.tp .tp-acts > .twg-jam-note { order: 3; }
html.tp .tp-acts > .twg-lucchetto { order: 4; }
html.tp .tp-acts > .hide-mobile-cta { order: 5; }
html.tp .tp-acts > .mobile-menu-btn { order: 6; }
html.tp .tp-acc { display: contents; }
html.tp .tp-acts:has(.tp-acc--dentro) > .twg-lucchetto::after { content: ""; width: 7px; height: 7px; margin-left: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); opacity: .7; }
html.tp .tp-acc-pan {
  position: fixed; z-index: 160; min-width: 230px; display: flex; flex-direction: column; gap: 2px; padding: 6px;
  border-radius: 0 !important; border: 1px solid var(--border-medium); border-top: 2px solid var(--accent-cyan);
  background: var(--bg-nav); backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%);
  box-shadow: 0 18px 40px rgba(0,0,0,.42);
}
html.tp[data-theme="light"] .tp-acc-pan { box-shadow: 0 16px 36px rgba(15,23,42,.14); }
html.tp .tp-acc-pan[hidden] { display: none; }
html.tp .tp-acc-pan > * {
  display: flex !important; align-items: center; gap: 10px; width: 100%; height: auto !important; padding: 9px 12px !important;
  border-radius: 0 !important; border: 0 !important; border-left: 2px solid transparent !important;
  background: transparent !important; color: var(--fg-primary) !important; font: 500 14px var(--font-sans);
  text-decoration: none; cursor: pointer; box-shadow: none !important;
  transition: border-color 140ms cubic-bezier(.2,0,0,1), background-color 140ms cubic-bezier(.2,0,0,1);
}
html.tp .tp-acc-pan > *:hover,
html.tp .tp-acc-pan > *:focus-visible {
  background: rgba(34,211,238,.06) !important;
  border-left-color: var(--accent-cyan) !important;
}
html.tp[data-theme="light"] .tp-acc-pan > *:hover,
html.tp[data-theme="light"] .tp-acc-pan > *:focus-visible { background: rgba(14,116,144,.06) !important; }
html.tp .tp-acc-pan > *:focus-visible { outline: 2px solid var(--accent-cyan) !important; outline-offset: -2px !important; }
html.tp .tp-acc-pan svg, html.tp .tp-riga-b svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* musica: acceso / spento riconoscibili a colpo d'occhio */
html.tp .twg-jam-note.is-jam-playing { border-color: #22d3ee !important; color: #22d3ee !important; box-shadow: 0 0 0 3px rgba(34,211,238,.16), 0 0 16px rgba(34,211,238,.35); }
html.tp .twg-jam-note:not(.is-jam-playing) { opacity: .75; }
/* 760–1099: solo icone (IT|EN resta testo corto) */
@media (max-width: 1099px) { html.tp .twg-lucchetto .tl-t { display: none; } html.tp .twg-lucchetto { padding: 0 8px !important; } }
/* sotto 960: nella barra IT|EN, Prenota corto e panino; tema, musica e account in cima al menu a panino */
@media (max-width: 959px) {
  html.tp .tp-acts > #themeToggleBtn, html.tp .tp-acts > .twg-jam-note, html.tp .tp-acts > .twg-lucchetto { display: none !important; }
  html.tp .tp-acts > .lang-switch a { padding: 4px 7px; }
}
html.tp .tp-riga { display: none; }
@media (max-width: 959px) {
  html.tp .tp-riga { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 2px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--border-subtle); }
  html.tp .tp-riga-b {
    display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px;
    border-radius: 0 !important; border: 1px solid var(--border-medium); background: var(--bg-subtle);
    color: var(--fg-primary); font: 600 13.5px var(--font-sans); text-decoration: none; cursor: pointer;
    box-shadow: none !important;
    transition: border-color 140ms cubic-bezier(.2,0,0,1), background-color 140ms cubic-bezier(.2,0,0,1);
  }
  html.tp .tp-riga-b:hover, html.tp .tp-riga-b:focus-visible { border-color: var(--accent-cyan); }
  html.tp .tp-riga-jam.is-on { border-color: var(--accent-cyan); border-bottom: 2px solid var(--accent-cyan); color: var(--accent-cyan); box-shadow: none !important; }
  html.tp .tp-riga-esci { color: var(--fg-secondary); }
}

/* ── 1 · Vetro che si stringe: trasparente in cima, vetro sfocato e più bassa dopo 40 px ── */
html.tp:not(.tp-vetro) .site-header > .twg-container::before { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom-color: transparent; box-shadow: none; }
html.tp.tp-vetro .site-header > .twg-container::before { backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); box-shadow: 0 8px 30px rgba(0,0,0,.25); }
html.tp .site-header > .twg-container::before { transition: background-color .35s ease, border-color .35s ease, box-shadow .35s ease; }
html.tp.tp-vetro .nav-bar { height: 58px !important; }
html.tp.tp-vetro .brand-emblem { transform: scale(.72); }
html.tp.tp-vetro .brand-link:hover .brand-emblem { transform: scale(.76); }
html.tp .twg-crumbbar { transition: box-shadow .3s ease, border-color .3s ease, background-color .3s ease; }
html.tp.tp-vetro .twg-crumbbar { box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }

/* ── 3 · Testata sempre visibile (nessun nascondimento allo scorrimento) ── */
html.tp .site-header { transition: background-color .3s ease, border-color .3s ease, box-shadow .3s ease; transform: none !important; }

@media (prefers-reduced-motion: reduce) {
  html.tp .site-header,
  html.tp .nav-bar,
  html.tp .brand-emblem,
  html.tp .tp-pill,
  html.tp .desktop-nav .nav-link,
  html.tp .tp-altro-btn svg,
  html.tp .tp-altro-item,
  html.tp .tp-acc-pan > *,
  html.tp .tp-riga-b,
  html.tp #siteHeader .nav-oss-popover[popover],
  html.tp #siteHeader .pp-menu-item,
  html.tp #siteHeader .nav-oss-item,
  html.tp #siteHeader .aa-ico,
  html.tp .mobile-drawer > a.nav-link,
  html.tp .mobile-drawer .mobile-oss-trigger,
  html.tp .site-header > .twg-container::before { transition: none !important; }
}

/* ── «Dove sono»: voce attiva evidenziata ovunque (Variante A: angoli vivi, zero pillole, zero aloni) ── */
html.tp .desktop-nav .tp-on { color: var(--fg-primary) !important; }
html.tp .nav-dropdown .tp-prod-link, html.tp .nav-dropdown .tp-dd-link { padding-right: 2px; display: inline-flex; align-items: center; gap: 6px; }
html.tp .tp-solo-freccia { padding-left: 2px !important; padding-right: 6px !important; }
html.tp .tp-solo-freccia > span { display: none !important; }

/* Menu mobile coerente con la linea di precisione */
html.tp #siteHeader .mobile-drawer {
  border-radius: 0 !important;
  border: 1px solid var(--border-medium) !important;
  border-top: 2px solid var(--accent-cyan) !important;
  box-shadow: 0 22px 48px rgba(0,0,0,.52) !important;
}
html.tp[data-theme="light"] #siteHeader .mobile-drawer { box-shadow: 0 18px 40px rgba(15,23,42,.14) !important; }
html.tp #siteHeader .mobile-drawer > a.nav-link,
html.tp #siteHeader .mobile-drawer .mobile-oss-trigger {
  position: relative;
  border-radius: 0 !important;
  border: 0 !important;
  border-left: 2px solid transparent !important;
  background: transparent !important;
  color: var(--fg-secondary);
  transition: border-color 140ms cubic-bezier(.2,0,0,1), background-color 140ms cubic-bezier(.2,0,0,1), color 140ms cubic-bezier(.2,0,0,1);
}
html.tp #siteHeader .mobile-drawer > a.nav-link:hover,
html.tp #siteHeader .mobile-drawer > a.nav-link:focus-visible,
html.tp #siteHeader .mobile-drawer .mobile-oss-trigger:hover,
html.tp #siteHeader .mobile-drawer .mobile-oss-trigger:focus-visible {
  background: rgba(34,211,238,.06) !important;
  border-left-color: var(--accent-cyan) !important;
  color: var(--fg-primary) !important;
}
html.tp[data-theme="light"] #siteHeader .mobile-drawer > a.nav-link:hover,
html.tp[data-theme="light"] #siteHeader .mobile-drawer > a.nav-link:focus-visible,
html.tp[data-theme="light"] #siteHeader .mobile-drawer .mobile-oss-trigger:hover,
html.tp[data-theme="light"] #siteHeader .mobile-drawer .mobile-oss-trigger:focus-visible {
  background: rgba(14,116,144,.06) !important;
}
html.tp #siteHeader .mobile-drawer .tp-on,
html.tp #siteHeader .mobile-drawer > a.nav-link.is-active,
html.tp #siteHeader .mobile-drawer > a.nav-link[aria-current="page"] {
  position: relative;
  color: var(--fg-primary) !important;
  background: rgba(34,211,238,.08) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
html.tp[data-theme="light"] #siteHeader .mobile-drawer .tp-on,
html.tp[data-theme="light"] #siteHeader .mobile-drawer > a.nav-link.is-active,
html.tp[data-theme="light"] #siteHeader .mobile-drawer > a.nav-link[aria-current="page"] {
  background: rgba(14,116,144,.08) !important;
}
html.tp #siteHeader .mobile-drawer .tp-on::before,
html.tp #siteHeader .mobile-drawer > a.nav-link.is-active::before,
html.tp #siteHeader .mobile-drawer > a.nav-link[aria-current="page"]::before {
  content: ""; position: absolute; left: -2px; top: 0; bottom: 0; width: 2px; border-radius: 0 !important;
  background: linear-gradient(180deg, var(--accent-violet), var(--accent-cyan));
}
html.tp #siteHeader .mobile-drawer .mobile-oss-group {
  border-radius: 0 !important;
  border: 1px solid var(--border-subtle) !important;
  background: transparent !important;
}
html.tp #siteHeader .mobile-drawer .mobile-oss-feat,
html.tp #siteHeader .mobile-drawer .mobile-oss-link {
  border-radius: 0 !important;
  box-shadow: none !important;
}
html.tp #siteHeader .mobile-drawer .pp-menu-item[aria-current="page"],
html.tp #siteHeader .mobile-drawer .mobile-oss-link[aria-current="page"] {
  border-left: 2px solid var(--accent-cyan) !important;
  padding-left: 10px !important;
  background: rgba(34,211,238,.06) !important;
}
html.tp[data-theme="light"] #siteHeader .mobile-drawer .pp-menu-item[aria-current="page"],
html.tp[data-theme="light"] #siteHeader .mobile-drawer .mobile-oss-link[aria-current="page"] {
  background: rgba(14,116,144,.06) !important;
}
html.tp #siteHeader .mobile-drawer .lang-switch--drawer,
html.tp #siteHeader .mobile-drawer .lang-switch--drawer a {
  border-radius: 0 !important;
  box-shadow: none !important;
}
html.tp #siteHeader .mobile-drawer .lang-switch--drawer a[aria-current="page"] {
  background: rgba(34,211,238,.08) !important;
  border-bottom: 2px solid var(--accent-cyan) !important;
  color: var(--fg-primary) !important;
}
html.tp[data-theme="light"] #siteHeader .mobile-drawer .lang-switch--drawer a[aria-current="page"] {
  background: rgba(14,116,144,.08) !important;
}
html.tp #siteHeader .mobile-drawer :is(a, button):focus-visible {
  outline: 2px solid var(--accent-cyan) !important;
  outline-offset: -2px !important;
  border-radius: 0 !important;
}
@media (forced-colors: active) {
  html.tp .tp-pill { background: Highlight !important; border-bottom: 2px solid Highlight; }
  html.tp #siteHeader .mobile-drawer .tp-on::before,
  html.tp #siteHeader .mobile-drawer > a.nav-link.is-active::before { background: Highlight; }
  html.tp .tp-altro-item.tp-on,
  html.tp #siteHeader .pp-menu-item[aria-current="page"],
  html.tp #siteHeader .nav-oss-item[aria-current="page"],
  html.tp #siteHeader .mobile-drawer .pp-menu-item[aria-current="page"] { border-left: 2px solid Highlight !important; }
}

/* arrivo sulle sezioni (clic sul menu, #ancora): il titolo resta sempre sotto testata + barra sezione */
html.tp { scroll-padding-top: 124px !important; }
html.tp:has(#mainContent.is-home) { scroll-padding-top: 82px !important; }
html.tp:has(.aa-bar),
html.tp:has(.wjp-subnav) { scroll-padding-top: 168px !important; }
@media (max-width: 959px) {
  html.tp { scroll-padding-top: 108px !important; }
  html.tp:has(#mainContent.is-home) { scroll-padding-top: 74px !important; }
  html.tp:has(.aa-bar),
  html.tp:has(.wjp-subnav) { scroll-padding-top: 160px !important; }
}

/* ── Etichette sotto il logo (Jam: umore «Vibe coding» + brano in onda): mai sovrapposte né tagliate ── */
@media (min-width: 1100px) {
  html.tp .wj-brand-col { max-width: 250px !important; }
  html.tp .wj-brand-shell.is-jam-live .wj-vibe, html.tp .wj-brand-shell.is-jam-live .wj-live-trigger { max-width: var(--tp-brand-w, 150px) !important; }
  html.tp .wj-brand-shell.is-jam-live .wj-live-trigger { width: max-content; }
  html.tp .wj-ticker-viewport { flex: 0 1 auto !important; max-width: calc(var(--tp-brand-w, 150px) - 30px); mask-image: none !important; -webkit-mask-image: none !important; }
  html.tp .wj-ticker-track { display: block !important; max-width: 100%; overflow: hidden; text-overflow: ellipsis; padding-right: 0 !important; animation: none !important; transform: none !important; }
}
/* barra ristretta (vetro) e sotto 1100 px: resta solo il nome */
html.tp.tp-vetro .wj-brand-shell .wj-vibe, html.tp.tp-vetro .wj-brand-shell .wj-live-trigger { display: none !important; }
html.tp.tp-vetro .wj-brand-shell .wj-word-guy { font-size: 18px !important; }
@media (max-width: 1099px) {
  html.tp .wj-brand-shell .wj-vibe, html.tp .wj-brand-shell .wj-live-trigger { display: none !important; }
  html.tp .wj-brand-shell.is-jam-live .wj-word-guy { font-size: 17px !important; }
}

/* ── Pannello LIVE delle attività del Lab: solo per l'admin, aperto solo a richiesta e senza coprire mezza pagina ── */
html.tp:not(.tp-admin) #wjLabPopover, html.tp:not(.tp-admin) #wjOpenLabBtn { display: none !important; }
html.tp.tp-admin #wjLabPopover { max-height: min(60vh, 520px); overflow: auto; }

/* spazio fra 760 e 1319 px: «Prenota» corto (testo messo dallo script), voci più compatte, sotto 900 solo l'avatar */
@media (min-width: 960px) and (max-width: 1099px) {
  /* margini a 16 px solo nel portale clienti (le sue pagine caricano twg-impaginazione.css, il sito pubblico no):
     sul sito la testata resta sul gutter --twg-gutter come barra, testo e piede (P1-GRIGLIA-FIX D1) */
  html.tp:has(link[href*="/assets/restyling/twg-impaginazione.css"]) .site-header > .twg-container { padding-inline: 16px; }
  html.tp .nav-bar { gap: 8px; }
  html.tp .brand-emblem { width: 42px; height: 42px; }
  html.tp .brand-name { font-size: 14.5px; }
  html.tp .desktop-nav { gap: 4px; }
  html.tp .desktop-nav .nav-link, html.tp .desktop-nav .tp-dd-link { padding: 6px 6px !important; font-size: 12.5px !important; }
  html.tp .tp-acts { gap: 5px; }
  html.tp .hide-mobile-cta.btn-sm { padding: 0 10px; font-size: 12px; }
}
@media (min-width: 960px) and (max-width: 959px) {
  html.tp .wj-brand-col { display: none !important; }
}

/* pannelli della Jam agganciati all'etichetta, con la freccia */
html.tp .wj-popover.tp-agganciato { position: fixed; overflow: visible; }
html.tp .wj-popover.tp-agganciato::before { content: ""; position: absolute; top: -7px; left: calc(var(--tp-freccia, 30px) - 7px); width: 14px; height: 14px; rotate: 45deg;
  background: inherit; border-left: 1px solid var(--wj-border, rgba(255,255,255,.12)); border-top: 1px solid var(--wj-border, rgba(255,255,255,.12)); border-top-left-radius: 3px; }
html.tp #wjLabPopover.tp-agganciato { overflow: visible; }
html.tp #wjLabPopover.tp-agganciato > * { position: relative; }
/* ── P1-TESTATA: Account dropdown unificato (#tpAcc) e parita 1:1 area riservata ── */
html.tp .tp-acc-pan { min-width: 248px; }
html.tp .tp-acts > .twg-esci-pill,
html.tp .tp-acts > .twg-area-menu,
html.tp .tp-acts > .twg-acc-role,
html.tp .tp-acts > .twg-acc-profilo,
html.tp .tp-acts > .twg-acc-pub,
html.tp .tp-acts > .twg-acc-torna,
html.tp .tp-acts > .twg-demo,
html.tp .tp-acts > .twg-demo-status { display: none !important; }
html.tp .tp-acc-pan > .twg-acc-role {
  display: flex !important; flex-direction: column; align-items: flex-start !important; gap: 2px;
  padding: 8px 12px 10px !important; margin-bottom: 4px; border-bottom: 1px solid var(--border-subtle) !important;
  border-radius: 0 !important; cursor: default !important; pointer-events: none;
}
html.tp .tp-acc-pan > .twg-acc-role:hover { background: transparent !important; border-left-color: transparent !important; }
html.tp .twg-acc-role-ey {
  font: 600 10.5px/1.2 var(--font-mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-violet-bright, #c084fc);
}
:root[data-theme="light"] .twg-acc-role-ey { color: var(--accent-violet, #6d28d9); }
html.tp .twg-acc-role b { font: 700 13.5px/1.25 var(--font-sans); color: var(--fg-primary); }
html.tp .tp-acc-pan > .twg-esci-pill {
  margin-top: 4px; padding-top: 11px !important; border-top: 1px solid var(--border-subtle) !important;
  border-radius: 0 !important; color: var(--fg-secondary) !important;
}
html.tp .tp-acc-pan > .twg-esci-pill:hover { color: var(--fg-primary) !important; }
html.tp .tp-acc-pan > .twg-acc-torna { color: var(--accent-violet-bright, #c084fc) !important; font-weight: 600 !important; }
:root[data-theme="light"] .twg-acc-pan > .twg-acc-torna { color: var(--accent-violet, #6d28d9) !important; }
html.tp .tp-acc-pan > .twg-demo-status {
  padding: 4px 12px !important; font: 500 12px/1.35 var(--font-sans) !important;
  color: var(--fg-muted) !important; cursor: default !important;
}
html.tp .tp-acc-pan > .twg-demo-status:empty { display: none !important; }
html.tp .tp-riga-b svg { width: 16px; height: 16px; }
html.tp .tp-riga-torna { border-color: var(--border-strong); color: var(--accent-violet-bright, #c084fc); }
:root[data-theme="light"] .tp-riga-torna { color: var(--accent-violet, #6d28d9); }

/* Dentro /clienti/* la fascia unica #twg-barra sostituisce .twg-crumbbar senza doppioni */
html.twg-area-template .twg-crumbbar,
body.twg-in-clienti .twg-crumbbar { display: none !important; }
html.twg-area-template #mainContent:not(.is-home),
body.twg-in-clienti #mainContent:not(.is-home) { margin-top: 0 !important; }

/* ── P1-CTA-TESTATA · Variante A «vetro + icona» (calendario con spunta, bordo e alone viola/ciano, chiaro/scuro 1:1) ── */
html.tp #siteHeader .hide-mobile-cta,
html.tp #siteHeader .mobile-drawer > a.btn-primary {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: 999px !important; border: 1px solid rgba(192, 132, 252, 0.72) !important;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.26) 0%, rgba(13, 9, 24, 0.88) 48%, rgba(34, 211, 238, 0.22) 100%) !important;
  background-color: rgba(13, 9, 24, 0.88) !important; color: #F8FAFC !important;
  backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.22) inset, 0 0 16px rgba(168, 85, 247, 0.38), 0 0 26px rgba(34, 211, 238, 0.22), 0 4px 14px rgba(0, 0, 0, 0.44) !important;
  font-weight: 600; letter-spacing: -0.01em; text-decoration: none !important; white-space: nowrap !important;
  transition: transform 160ms cubic-bezier(.2, 0, 0, 1), border-color 160ms ease, box-shadow 180ms ease, background 180ms ease;
}
html.tp #siteHeader .hide-mobile-cta { height: 36px; min-height: 36px; padding: 0 14px !important; font-size: 13px; }
html.tp #siteHeader .tp-cta-ico {
  width: 16px; height: 16px; flex: 0 0 auto; color: #22D3EE;
  filter: drop-shadow(0 0 5px rgba(34, 211, 238, 0.45));
  transition: transform 160ms cubic-bezier(.2, 0, 0, 1), color 160ms ease;
}
html.tp #siteHeader .tp-cta-txt { display: inline-block; line-height: 1.15; }
html.tp #siteHeader .hide-mobile-cta:hover,
html.tp #siteHeader .mobile-drawer > a.btn-primary:hover {
  border-color: rgba(34, 211, 238, 0.92) !important;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.36) 0%, rgba(16, 11, 30, 0.92) 48%, rgba(34, 211, 238, 0.32) 100%) !important;
  box-shadow: 0 0 0 1px rgba(192, 132, 252, 0.34) inset, 0 0 20px rgba(168, 85, 247, 0.56), 0 0 32px rgba(34, 211, 238, 0.38), 0 6px 18px rgba(0, 0, 0, 0.52) !important;
  transform: translateY(-1px);
}
html.tp #siteHeader .hide-mobile-cta:hover .tp-cta-ico,
html.tp #siteHeader .mobile-drawer > a.btn-primary:hover .tp-cta-ico { color: #67E8F9; transform: scale(1.06); }
html.tp #siteHeader .hide-mobile-cta:active,
html.tp #siteHeader .mobile-drawer > a.btn-primary:active { transform: translateY(0) scale(0.985); }
html.tp #siteHeader .hide-mobile-cta:focus-visible,
html.tp #siteHeader .mobile-drawer > a.btn-primary:focus-visible {
  outline: 2px solid var(--accent-cyan, #22D3EE) !important; outline-offset: 2px !important;
  border-radius: 999px !important; border-color: rgba(34, 211, 238, 0.95) !important;
}
html.tp[data-theme="light"] #siteHeader .hide-mobile-cta,
html.tp[data-theme="light"] #siteHeader .mobile-drawer > a.btn-primary {
  border-color: rgba(109, 40, 217, 0.62) !important;
  background: linear-gradient(135deg, rgba(109, 40, 217, 0.14) 0%, rgba(255, 255, 255, 0.94) 48%, rgba(14, 116, 144, 0.15) 100%) !important;
  background-color: rgba(255, 255, 255, 0.94) !important; color: #1E1B4B !important;
  box-shadow: 0 0 0 1px rgba(14, 116, 144, 0.20) inset, 0 0 15px rgba(109, 40, 217, 0.26), 0 0 24px rgba(14, 116, 144, 0.18), 0 4px 12px rgba(15, 23, 42, 0.08) !important;
}
html.tp[data-theme="light"] #siteHeader .tp-cta-ico { color: #6D28D9; filter: drop-shadow(0 0 4px rgba(109, 40, 217, 0.22)); }
html.tp[data-theme="light"] #siteHeader .hide-mobile-cta:hover,
html.tp[data-theme="light"] #siteHeader .mobile-drawer > a.btn-primary:hover {
  border-color: rgba(14, 116, 144, 0.85) !important;
  background: linear-gradient(135deg, rgba(109, 40, 217, 0.20) 0%, rgba(255, 255, 255, 0.97) 48%, rgba(14, 116, 144, 0.22) 100%) !important;
  box-shadow: 0 0 0 1px rgba(109, 40, 217, 0.28) inset, 0 0 18px rgba(109, 40, 217, 0.36), 0 0 28px rgba(14, 116, 144, 0.28), 0 6px 16px rgba(15, 23, 42, 0.12) !important;
}
html.tp[data-theme="light"] #siteHeader .hide-mobile-cta:hover .tp-cta-ico,
html.tp[data-theme="light"] #siteHeader .mobile-drawer > a.btn-primary:hover .tp-cta-ico { color: #0E7490; }
@media (max-width: 1399px) { #siteHeader .hide-mobile-cta .tp-cta-long { display: none !important; } }
@media (min-width: 960px) and (max-width: 1319px) { html.tp #siteHeader .hide-mobile-cta { padding: 0 12px !important; font-size: 12.5px; gap: 6px; } }
@media (min-width: 960px) and (max-width: 1099px) { html.tp #siteHeader .hide-mobile-cta { padding: 0 10px !important; font-size: 12px; gap: 5px; } }
@media (max-width: 959px) {
  html.tp .tp-acts { gap: 6px; }
  html.tp #siteHeader .tp-acts > .hide-mobile-cta { display: inline-flex !important; height: 34px; min-height: 34px; padding: 0 10px !important; gap: 5px; font-size: 12px; }
  html.tp #siteHeader .hide-mobile-cta .tp-cta-ico { width: 14px; height: 14px; }
  html.tp #siteHeader .hide-mobile-cta::before { content: ""; position: absolute; left: 50%; top: 50%; width: max(100%, 44px); height: 44px; transform: translate(-50%, -50%); }
}
@media (max-width: 430px) {
  html.tp .site-header > .twg-container { padding-inline: 12px; }
  html.tp #siteHeader .nav-bar, html.tp #siteHeader .tp-acts { gap: 5px; }
  html.tp #siteHeader .brand-link, html.tp #siteHeader .wj-brand-shell { gap: 6px; max-width: none; }
  html.tp #siteHeader .brand-emblem, html.tp #siteHeader .wj-emblem-stage, html.tp #siteHeader .wj-face--guy .brand-emblem, html.tp #siteHeader .wj-face--jam .wj-jam-emblem, html.tp #siteHeader .wj-face--mood .wj-mood-emblem { width: 38px !important; height: 38px !important; }
  html.tp #siteHeader .brand-name, html.tp #siteHeader .wj-word-guy, html.tp #siteHeader .wj-brand-shell.is-jam-live .wj-word-guy { font-size: 13.5px !important; }
  html.tp #siteHeader .wj-brand-col { min-width: 0 !important; max-width: none !important; }
  html.tp #siteHeader .tp-acts > .lang-switch a { padding: 3px 6px; font-size: 11.5px; }
  html.tp #siteHeader .tp-acts > .hide-mobile-cta { height: 32px; min-height: 32px; padding: 0 9px !important; gap: 4px; font-size: 12px; }
}
html.tp body.twg-in-clienti #siteHeader .tp-acts > .hide-mobile-cta { display: none !important; }
@media (prefers-reduced-motion: reduce) {
  html.tp #siteHeader .hide-mobile-cta, html.tp #siteHeader .mobile-drawer > a.btn-primary, html.tp #siteHeader .tp-cta-ico { transition: none !important; transform: none !important; }
}
