
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --white:#ffffff; --bg:#f5f5f7; --surface:#ffffff; --surface2:#f5f5f7;
  --ink:#1d1d1f; --ink2:#6e6e73; --ink3:#aeaeb2; --border:#e5e5ea;
  --blue:#0071e3; --blue2:#0a84ff; --blue-soft:#eef4ff; --blue-mid:#c8dcff;
  --green:#34c759; --green-soft:#f0faf3; --green-ink:#1a7a30;
  --amber:#ff9500; --amber-soft:#fff8f0; --amber-ink:#a05a00;
  --red:#ff3b30; --red-soft:#fff5f5; --red-ink:#c0251b;
  --r-xs:6px; --r-sm:10px; --r-md:14px; --r-lg:18px; --r-xl:22px; --r-2xl:28px;
}
html { scroll-behavior:smooth; overflow-x: hidden; }
body { font-family:'Manrope',sans-serif; background:#ffffff; color:var(--ink); min-height:calc(100vh / var(--z,1)); font-size:15px; line-height:1.55; -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; text-rendering: optimizeLegibility; overflow-x: hidden; }

/* ottimizzazioni rendering per scroll fluido */
.header { will-change: transform; }
.page { will-change: opacity, transform; }
* { -webkit-backface-visibility: hidden; backface-visibility: hidden; }

/* ════════════════════════════
   HEADER STICKY — logo + search + filtri
════════════════════════════ */
.header {
  position: sticky; top: 0; z-index: 200;
  background: #ffffff;
  border-bottom: 0.5px solid var(--border);
  box-shadow: 0 4px 16px rgba(0,30,100,0.08), 0 1px 4px rgba(0,0,0,0.05);
  transform: translateZ(0);
}

/* riga 1: logo + search + pulsante guida */
.header-row1 {
  display: flex; align-items: center; gap: 20px;
  padding: 26px 56px 26px 40px; max-width: 1480px; margin: 0 auto;
}
.logo {
  font-size: 32px; font-weight: 800; letter-spacing: -1px;
  color: var(--ink); cursor: pointer; flex-shrink: 0; transition: opacity .12s;
  line-height: 1;
}
.logo:hover { opacity: .7; }
.logo span { color: var(--blue); }

.header-search-wrap {
  display: flex; align-items: center; flex: 1; min-width: 0;
  background: #ffffff;
  border: 1.5px solid #d0d8e8;
  border-radius: 999px;
  padding: 6px 6px 6px 22px;
  box-shadow: 0 2px 8px rgba(0,40,120,0.1), 0 1px 3px rgba(0,0,0,0.08);
  transition: border-color .18s, box-shadow .18s;
}
.header-search-wrap:focus-within {
  border-color: #1a3a8a;
  box-shadow: 0 1px 4px rgba(0,40,120,0.1), 0 0 0 3px rgba(26,58,138,0.1);
}
.search-icon-btn {
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; padding: 0; margin-right: 12px;
  color: #8898aa; cursor: pointer; flex-shrink: 0;
  transition: color .15s, transform .15s;
}
.search-icon-btn:hover { color: var(--blue); transform: scale(1.08); }
.search-icon-btn:active { transform: scale(0.95); }
.header-search-wrap input {
  flex: 1; border: none; background: transparent; outline: none;
  font-family: 'Manrope',sans-serif; font-size: 16px; font-weight: 500;
  color: var(--ink); padding: 11px 0; min-width: 0;
}
.header-search-wrap input::placeholder { color: #a0aec0; font-weight: 400; letter-spacing: .1px; }

/* pulsante guida dentro la barra */
.nav-btn-inline {
  text-decoration: none; display: inline-block;
  font-family: 'Manrope',sans-serif; font-size: 14px; font-weight: 700;
  background: var(--ink); color: #fff; border: none; border-radius: 999px;
  padding: 13px 24px; cursor: pointer; white-space: nowrap; flex-shrink: 0;
  width: auto; max-width: 220px;
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: scale(1) translateY(0);
  transition: opacity .45s cubic-bezier(.4,0,.2,1),
              transform .45s cubic-bezier(.4,0,.2,1),
              max-width .5s cubic-bezier(.4,0,.2,1),
              padding .5s cubic-bezier(.4,0,.2,1),
              visibility 0s .0s;
  overflow: hidden;
}
.nav-btn-inline:hover { opacity: .82; }
.nav-btn-inline.hidden-btn {
  opacity: 0;
  max-width: 0;
  padding-left: 0;
  padding-right: 0;
  pointer-events: none;
  visibility: hidden;
  transform: scale(0.9) translateY(5px);
  transition: opacity .45s cubic-bezier(.4,0,.2,1),
              transform .45s cubic-bezier(.4,0,.2,1),
              max-width .5s cubic-bezier(.4,0,.2,1),
              padding .5s cubic-bezier(.4,0,.2,1),
              visibility 0s .5s;
}

/* bottone homepage */
.nav-btn {
  font-family: 'Manrope',sans-serif; font-size: 14px; font-weight: 700;
  border: none; border-radius: 999px; padding: 13px 24px;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  background: var(--ink); color: var(--white);
  width: auto; max-width: 220px;
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: scale(1) translateY(0);
  transition: opacity .45s cubic-bezier(.4,0,.2,1),
              transform .45s cubic-bezier(.4,0,.2,1),
              max-width .5s cubic-bezier(.4,0,.2,1),
              padding .5s cubic-bezier(.4,0,.2,1),
              visibility 0s .0s;
  overflow: hidden;
}
.nav-btn:hover { opacity: .85; }
.nav-btn.hidden-btn {
  opacity: 0;
  max-width: 0;
  padding-left: 0;
  padding-right: 0;
  pointer-events: none;
  visibility: hidden;
  transform: scale(0.9) translateY(5px);
  transition: opacity .45s cubic-bezier(.4,0,.2,1),
              transform .45s cubic-bezier(.4,0,.2,1),
              max-width .5s cubic-bezier(.4,0,.2,1),
              padding .5s cubic-bezier(.4,0,.2,1),
              visibility 0s .5s;
}

/* riga 2: filtri emittenti + ordina */
.header-row2 {
  padding: 16px 56px;
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  max-width: 1480px; margin: 0 auto;
  position: relative;
}
.header-row2::before {
  content: '';
  position: absolute; top: 0; left: 56px; right: 56px; height: max(1px, calc(0.5px / var(--z,1))); /* con lo zoom al 90% una linea da 0.5px spariva */
  background: linear-gradient(to right, transparent, #94b4e0 15%, #94b4e0 85%, transparent);
}
.header-row2.hidden { display: none; }
.fbtn-scroll { display: flex; align-items: center; gap: 10px; }
.filter-label {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--ink2); margin-right: 6px; flex-shrink: 0;
  padding: 9px 0; line-height: 1;
}

/* bottoni emittenti — hover blu con sollevamento */
.fbtn {
  text-decoration: none; display: inline-block;
  font-family: 'Manrope',sans-serif; font-size: 14px; font-weight: 600;
  background: transparent; border: 0.5px solid var(--border); border-radius: 999px;
  color: var(--ink2); padding: 9px 20px; cursor: pointer; white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 2px 6px rgba(0,40,120,0.09), 0 1px 2px rgba(0,0,0,0.06);
  animation: btnAppear .4s cubic-bezier(.4,0,.2,1) both;
}
@keyframes btnAppear {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fbtn:nth-child(1) { animation-delay: .05s; }
.fbtn:nth-child(2) { animation-delay: .12s; }
.fbtn:nth-child(3) { animation-delay: .19s; }
.fbtn:nth-child(4) { animation-delay: .26s; }
.fbtn:nth-child(5) { animation-delay: .33s; }
.fbtn:nth-child(6) { animation-delay: .40s; }
.fbtn:nth-child(7) { animation-delay: .47s; }
.fbtn:nth-child(8) { animation-delay: .54s; }
.fbtn:hover {
  background: #1a3a8a; color: #fff; border-color: #1a3a8a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26,58,138,0.25);
}
.fbtn.active {
  background: #1a3a8a; border-color: #1a3a8a; color: #fff;
  box-shadow: 0 2px 10px rgba(26,58,138,.25);
}

/* ordina per — dropdown custom */
.sort-wrap { display: flex; align-items: center; gap: 10px; margin-left: 22px; margin-right: 0; padding-left: 26px; border-left: 1px solid rgba(0,40,120,.12); }
.sort-lbl { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--ink2); white-space: nowrap; padding: 9px 0; line-height: 1; }

.custom-dropdown { position: relative; }
.sort-trigger {
  font-family: 'Manrope',sans-serif; font-size: 14px; font-weight: 600;
  background: var(--white); border: 0.5px solid var(--border); border-radius: 999px;
  color: var(--ink2); padding: 9px 16px 9px 18px;
  cursor: pointer; display: flex; align-items: center; gap: 8px; white-space: nowrap;
  min-width: 232px; width: 232px; justify-content: space-between;
  box-shadow: 0 2px 6px rgba(0,40,120,0.09), 0 1px 2px rgba(0,0,0,0.06);
  transition: background .2s, color .2s, border-color .2s, transform .15s, box-shadow .2s;
  animation: btnAppear .4s cubic-bezier(.4,0,.2,1) .54s both;
}
.custom-dropdown:hover .sort-trigger,
.custom-dropdown.open .sort-trigger {
  background: #1a3a8a; color: #fff; border-color: #1a3a8a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26,58,138,0.25);
}
.sort-trigger svg { transition: transform .28s cubic-bezier(.4,0,.2,1); flex-shrink: 0; }
.custom-dropdown:hover .sort-trigger svg,
.custom-dropdown.open .sort-trigger svg { transform: rotate(180deg); }

.sort-menu {
  position: absolute; right: 0; top: 100%;
  padding-top: 8px;
  background: transparent;
  width: 100%;
  max-height: 0; opacity: 0; pointer-events: none;
  transition: max-height .3s cubic-bezier(.4,0,.2,1), opacity .25s ease;
  z-index: 300;
}
.sort-menu-inner {
  background: var(--white);
  border: 1px solid #c8d8ff;
  border-radius: 28px;
  overflow: hidden;
  box-shadow:
    0 16px 48px rgba(26,58,138,0.2),
    0 4px 12px rgba(0,0,0,0.08);
}
.sort-menu-inner {
  background: var(--white);
  border: 1px solid #c8d8ff;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(26,58,138,0.15), 0 3px 10px rgba(0,0,0,0.06);
  transform: translateY(-6px); opacity: 0;
  transition: transform .3s cubic-bezier(.22,1,.36,1), opacity .25s ease;
}
.custom-dropdown:hover .sort-menu,
.custom-dropdown.open .sort-menu {
  max-height: 220px; opacity: 1; pointer-events: auto;
}
.custom-dropdown:hover .sort-menu-inner,
.custom-dropdown.open .sort-menu-inner {
  transform: translateY(0); opacity: 1;
  animation: none;
}
.sort-option {
  padding: 12px 18px; font-size: 14px; font-weight: 500;
  color: var(--ink2); cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s;
  position: relative;
  letter-spacing: -.1px;
}
.sort-option:first-child { border-radius: 28px 28px 0 0; }
.sort-option:last-child { border-radius: 0 0 28px 28px; }
.sort-option:hover { background: #eef3ff; color: #1a3a8a; }
.sort-option.active,
.sort-option.active:hover { font-weight: 650; color: #1a3a8a; background: #f0f4ff; position: relative; z-index: 2; }

/* linea sopra l'opzione attiva */
.sort-option.active::before,
.sort-option.active:hover::before {
  content: '';
  position: absolute; top: 0; left: 14px; right: 14px; height: 1px;
  background: linear-gradient(to right, transparent, #7aa8e8 20%, #7aa8e8 80%, transparent);
  animation: lineAppear .35s ease both;
  z-index: 3;
}
/* linea sotto l'opzione attiva */
.sort-option.active::after,
.sort-option.active:hover::after {
  content: '';
  position: absolute; bottom: 0; left: 14px; right: 14px; height: 1px;
  background: linear-gradient(to right, transparent, #7aa8e8 20%, #7aa8e8 80%, transparent);
  animation: lineAppear .35s ease both;
  z-index: 3;
}
.sort-option:first-child.active::before,
.sort-option:first-child.active:hover::before { display: none; }
.sort-option:last-child.active::after,
.sort-option:last-child.active:hover::after  { display: none; }

/* impedisci che hover delle opzioni adiacenti crei pseudo-elementi sopra le linee */
.sort-option.active + .sort-option:hover::before,
.sort-option.active + .sort-option:hover::after { display: none; }
.sort-option:hover + .sort-option.active::before { z-index: 4; }

@keyframes lineAppear {
  from { opacity: 0; transform: scaleX(.3); }
  to   { opacity: 1; transform: scaleX(1); }
}

/* ════════════════════════════
   HOME HERO — sfondo trasparente, eredita da pageHome
════════════════════════════ */
.home-hero {
  background: transparent;
  text-align: center;
  padding: 100px 48px 48px;
}
.home-hero-inner {
  display: inline-block;
  max-width: 760px;
}
.home-hero-title {
  font-size: 72px; font-weight: 800; letter-spacing: -2.7px;
  color: #ffffff; margin-bottom: 28px; line-height: 1.22;
  text-shadow:
    0 2px 6px rgba(0,30,100,0.25),
    0 8px 24px rgba(0,30,100,0.18),
    0 1px 2px rgba(0,0,0,0.12);
}
.home-hero-tagline {
  font-size: 20px; font-weight: 500; color: rgba(255,255,255,0.92);
  line-height: 1.7; margin: 0;
  text-shadow:
    0 1px 4px rgba(0,30,100,0.2),
    0 4px 12px rgba(0,30,100,0.12);
}

/* ════════════════════════════
   PAGES — transizione
════════════════════════════ */
.page { display: none; }
.page.active { display: block; animation: pageIn .28s cubic-bezier(.4,0,.2,1) both; }
.page.exit    { animation: pageOut .2s cubic-bezier(.4,0,.2,1) both; }

#pageCert.page.active { animation: pageInTop .34s cubic-bezier(.22,.8,.3,1) both; }
@keyframes pageInTop {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pageOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-10px); }
}
/* ── home: sfondo bianco, gradiente gestito via body.home-active ── */
#pageHome {
  background: transparent;
  min-height: calc(100vh / var(--z,1));
}
.home-gradient-bg { display: none; }
body.home-active, body.home-filtered {
  background: linear-gradient(to bottom,
    #03183a 0px,
    #05204d 80px,
    #082d6b 180px,
    #0d3d82 calc(280px + var(--hs,0px)),
    #1255b5 calc(380px + var(--hs,0px)),
    #2070cc calc(480px + var(--hs,0px)),
    #4a9ee5 calc(570px + var(--hs,0px)),
    #6ab2ef calc(630px + var(--hs,0px)),
    #8dc5f5 calc(680px + var(--hs,0px)),
    #aad4f8 calc(720px + var(--hs,0px)),
    #c0e0fb calc(755px + var(--hs,0px)),
    #d0e9fd calc(785px + var(--hs,0px)),
    #daeffe calc(810px + var(--hs,0px)),
    #e3f3fe calc(830px + var(--hs,0px)),
    #eaf6ff calc(850px + var(--hs,0px)),
    #f0f9ff calc(870px + var(--hs,0px)),
    #f5fbff calc(890px + var(--hs,0px)),
    #f8fdff calc(910px + var(--hs,0px)),
    #fbfeff calc(930px + var(--hs,0px)),
    #fdfdff calc(955px + var(--hs,0px)),
    #ffffff calc(990px + var(--hs,0px))
  ) top / 100% calc(990px + var(--hs,0px)) no-repeat #ffffff;
  min-height: calc(100vh / var(--z,1));
}

/* certs-bg: nessun background proprio, eredita da pageHome */
.certs-bg {
  width: 100%;
  padding-bottom: 32px;
  min-height: 400px;
}

/* sfumatura gestita dal gradiente stesso, nessun overlay */

/* ── contatore certificati ── */
.count-row {
  max-width: 1100px; margin: 0 auto; padding: 20px 56px 4px;
  display: flex; align-items: center; gap: 10px;
}
.count-badge {
  font-size: 13px; font-weight: 700; color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.3);
  border-radius: 999px; padding: 4px 14px; backdrop-filter: blur(8px);
}
.count-label { font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.65); }
.count-date { margin-left: auto; font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.65); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.count-date svg { width: 13px; height: 13px; opacity: .8; }
.count-date .d-short { display: none; }
@media (max-width:480px){ .count-date { font-size: 12px; } .count-date .d-long { display: none; } .count-date .d-short { display: inline; } }

.grid { max-width: 1100px; margin: 0 auto; padding: 12px 56px 0; display: flex; flex-direction: column; gap: 18px; }

/* ════════════════════════════
   CARD
════════════════════════════ */
.card {
  background: #ffffff;
  border: 0.5px solid var(--border);
  border-radius: var(--r-2xl);
  padding: 34px 38px 28px;
  transition: box-shadow .25s cubic-bezier(.4,0,.2,1), transform .25s cubic-bezier(.4,0,.2,1), border-color .25s, opacity .3s cubic-bezier(.4,0,.2,1), translate .3s cubic-bezier(.4,0,.2,1);
  cursor: default;
  position: relative; overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,40,120,0.10), 0 1px 4px rgba(0,0,0,0.06);
  opacity: 0;
  translate: 0 14px;
  content-visibility: auto;
  contain-intrinsic-size: auto 420px;
}
.card.visible { opacity: 1; translate: 0 0; }
.card::before {
  content:''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #0d47a1, #1a7fe8, #34aadc);
  opacity: 0.35;
  transition: opacity .25s, height .25s;
}

/* skeleton loading — placeholder durante il cambio filtro */
@keyframes skeletonPulse {
  0%, 100% { opacity: .55; }
  50% { opacity: .9; }
}
.skeleton-card {
  background: #ffffff; border: 0.5px solid var(--border); border-radius: var(--r-2xl);
  padding: 34px 38px 28px;
}
.skeleton-line {
  background: linear-gradient(90deg, #eef1f7, #e4e9f2, #eef1f7);
  background-size: 200% 100%;
  border-radius: 8px;
  animation: skeletonShimmer 1.4s ease-in-out infinite;
}
@keyframes skeletonShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skel-top { display: flex; gap: 16px; margin-bottom: 22px; }
.skel-logo { width: 56px; height: 56px; border-radius: 14px; flex-shrink: 0; }
.skel-meta { flex: 1; display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.skel-theme { width: 90px; height: 12px; }
.skel-title { width: 70%; height: 18px; }
.skel-rend { width: 70px; height: 30px; margin-left: auto; align-self: flex-start; }
.skel-chips { display: flex; gap: 8px; margin-bottom: 22px; }
.skel-chip { width: 80px; height: 26px; border-radius: 999px; }
.skel-chip:nth-child(2) { width: 110px; }
.skel-chip:nth-child(3) { width: 60px; }
.skel-params { height: 70px; margin-bottom: 20px; border-radius: 14px; }
.skel-footer { display: flex; justify-content: space-between; align-items: center; }
.skel-date { width: 80px; height: 30px; }
.skel-btn { width: 100px; height: 38px; border-radius: 999px; }
.card:hover {
  box-shadow: 0 16px 48px rgba(0,40,120,0.16), 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-4px);
  border-color: #b8d0ff;
}
.card:hover::before { opacity: 1; height: 4px; }
.card.scroll-active {
  box-shadow: 0 16px 48px rgba(0,40,120,0.16), 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-4px);
  border-color: #b8d0ff;
}
.card.scroll-active::before { opacity: 1; height: 4px; }

.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; margin-bottom: 18px; }
.card-left { display: flex; align-items: flex-start; gap: 16px; flex: 1; min-width: 0; }

/* logo emittente — immagine reale */
.issuer-logo-wrap {
  width: 64px; height: 64px; border-radius: 15px;
  background: var(--white); border: 0.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden; padding: 0;
}
.issuer-logo-wrap img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; -webkit-user-drag: none; user-select: none; pointer-events: none; }

.card-meta { flex: 1; min-width: 0; }
.card-theme { font-size: 17px; font-weight: 700; letter-spacing: -.1px; color: var(--blue); text-transform: none; margin-bottom: 4px; }
.card-title { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 22px; font-weight: 500; letter-spacing: -.3px; color: var(--ink); line-height: 1.3; }

/* rendimento — colore per fascia */
.rend-box { flex-shrink: 0; text-align: center; display: flex; flex-direction: column; align-items: center; }
.rend-num { font-size: 36px; font-weight: 800; letter-spacing: -1.2px; line-height: 1; color: var(--blue); }
.rend-sub { font-size: 11px; font-weight: 600; letter-spacing: .3px; margin-top: 6px; text-align: center; line-height: 1.5; }
.mobile-break { display: none; }

.chips-wrap { margin-bottom: 22px; }
.chips-label {
  display: block; font-size: 10px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; color: var(--ink3); margin-bottom: 8px;
}
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  background: rgba(255,255,255,0.7); border: 1px solid rgba(200,220,255,0.9);
  border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ink2);
  padding: 7px 15px; cursor: default;
  transition: border-color .15s, color .15s, background .15s;
}
.chip:hover { border-color: #1a3a8a; color: #1a3a8a; background: #eef3ff; }

/* params — 4 colonne, stile Apple morbido */
.params {
  display: grid; grid-template-columns: repeat(4,1fr);
  border: none; border-radius: 18px;
  overflow: hidden; margin-bottom: 18px; background: rgba(255,255,255,0.55);
}
.param { padding: 16px 18px; position: relative; }
.param:not(:last-child)::after {
  content: '';
  position: absolute; top: 20%; bottom: 20%; right: 0; width: 1px;
  background: rgba(180,200,240,0.4);
}
.p-label {
  font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  color: var(--ink3); display: flex; align-items: center; gap: 4px; margin-bottom: 7px;
}
.p-hint {
  width: 15px; height: 15px; border-radius: 50%; background: var(--border); color: var(--ink3);
  font-size: 9px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; border: none; font-family: 'Manrope',sans-serif; transition: background .1s, color .1s;
}
.p-hint:hover { background: var(--blue); color: var(--white); }
.p-val { font-size: 19px; font-weight: 700; color: var(--ink); letter-spacing: -.2px; }
.p-val.green { color: var(--green-ink); }
.p-val.amber { color: var(--amber-ink); }

.card-footer {
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 12px; width: 100%;
}
.stato { display: inline-flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 700; border-radius: 999px; padding: 9px 20px; }
.stato-dot { width: 8px; height: 8px; border-radius: 50%; }
.s-validata{background:var(--green-soft);color:var(--green-ink);} .s-validata .stato-dot{background:var(--green);}
.s-attesa  {background:var(--amber-soft);color:var(--amber-ink);} .s-attesa   .stato-dot{background:var(--amber);}
.s-nonval  {background:var(--red-soft)  ;color:var(--red-ink)  ;} .s-nonval   .stato-dot{background:var(--red);}

.date-item { display: flex; flex-direction: column; gap: 3px; }
.d-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--ink3); }
.d-val   { font-size: 13px; font-weight: 600; color: var(--ink2); }
.d-dark  { font-size: 15px; font-weight: 700; color: var(--ink) !important; }

/* ISIN — pillola più leggera, coerente con isin kpi della pagina dettaglio */
.isin-btn {
  font-family: 'Manrope',sans-serif; font-size: 13px; font-weight: 700;
  letter-spacing: .4px; text-transform: uppercase;
  background: #f0f4ff; color: var(--blue);
  border: none; border-radius: 999px;
  padding: 10px 20px;
  cursor: default; white-space: nowrap; flex-shrink: 0;
  box-shadow: none;
}


/* copia ISIN */
.isin-btn { display: inline-flex; align-items: center; gap: 6px; }
.copy-isin {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; padding: 0; margin: -4px -8px -4px 0;
  border: none; border-radius: 7px; background: transparent; color: var(--blue);
  cursor: pointer; opacity: .6; position: relative;
  transition: opacity .15s, background .15s, transform .12s;
}
.copy-isin:hover { opacity: 1; background: rgba(0,113,227,.1); }
.copy-isin:active { transform: scale(.9); }
.copy-isin svg { width: 14px; height: 14px; position: absolute; transition: opacity .18s, transform .18s; }
.copy-isin .ic-ok { opacity: 0; transform: scale(.5); color: #1a9a4b; }
.copy-isin.done { opacity: 1; }
.copy-isin.done .ic-copy { opacity: 0; transform: scale(.5); }
.copy-isin.done .ic-ok { opacity: 1; transform: scale(1); }
.copy-isin.lg { width: 28px; height: 28px; margin: 0; }
.copy-isin.lg svg { width: 16px; height: 16px; }
.copy-isin.done::after {
  content: "Copiato"; position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--ink, #1d1d1f); color: #fff; font: 600 11px/1 'Manrope',sans-serif; letter-spacing: 0; text-transform: none;
  padding: 6px 8px; border-radius: 6px; white-space: nowrap; pointer-events: none;
  animation: copyTip .2s ease both;
}
@keyframes copyTip { from { opacity: 0; transform: translate(-50%, 4px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media print { .copy-isin { display: none !important; } }
.card.back-focus { box-shadow: 0 0 0 2px rgba(0,113,227,.35), 0 12px 40px rgba(0,40,120,0.14); transition: box-shadow .6s ease; }
.isin-val { font-size: 18px; }
@media (max-width:480px){ .isin-val { font-size: 15px; gap: 2px !important; letter-spacing: 0 !important; } .isin-val .copy-isin.lg { width: 24px; height: 24px; flex-shrink: 0; } .isin-val .copy-isin.lg svg { width: 14px; height: 14px; } }
.missing-toast{position:fixed;left:50%;bottom:28px;transform:translate(-50%,20px);opacity:0;z-index:9999;max-width:min(560px,calc(100vw - 32px));background:#1d1d1f;color:#fff;font:600 14px/1.45 'Manrope',sans-serif;padding:14px 20px;border-radius:14px;box-shadow:0 10px 30px rgba(0,0,0,.25);transition:opacity .3s,transform .3s;text-align:center}
.missing-toast.show{opacity:1;transform:translate(-50%,0)}

/* ════ header che si nasconde scorrendo + mini menu in basso (vetro) ════ */
.header { transition: transform .38s cubic-bezier(.2,.8,.2,1), box-shadow .3s; }
.header.header-away { transform: translateY(-105%); box-shadow: none; }
.dock {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom) + var(--kb, 0px)); z-index: 300;
  width: min(440px, calc(100vw - 32px));
  display: flex; align-items: center; gap: 8px; padding: 7px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(235,242,252,.08));
  -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%);
  border: 1px solid rgba(255,255,255,.45);
  box-shadow: 0 8px 28px rgba(0,30,90,.12), inset 0 1px 0 rgba(255,255,255,.6), inset 0 -1px 0 rgba(0,40,120,.05);
  transform: translate(-50%, 140%) scale(.92); opacity: 0; pointer-events: none;
  transition: transform .5s cubic-bezier(.2,1.25,.35,1), opacity .25s ease;
}
.dock.show { transform: translate(-50%, 0) scale(1); opacity: 1; pointer-events: auto; }
.dock-home {
  flex-shrink: 0; width: 46px; height: 46px; border-radius: 999px; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: var(--ink);
  background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 1px rgba(255,255,255,.3);
  transition: background .35s ease, box-shadow .35s ease, transform .35s cubic-bezier(.2,1.4,.4,1);
}
.dock-home:hover { background: rgba(255,255,255,.3); }
.dock-home:active { transform: scale(.88); }
.dock-home.pop { background: #fff; box-shadow: 0 4px 14px rgba(0,30,90,.18), inset 0 0 0 1px rgba(255,255,255,1); transform: scale(1.06); }
.dock-home svg { width: 22px; height: 22px; }
.dock-search {
  flex: 1; min-width: 0; height: 46px; display: flex; align-items: center; gap: 9px;
  padding: 0 8px 0 15px; border-radius: 999px; background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.32); cursor: text;
  transition: background .4s ease, box-shadow .4s ease, border-color .4s ease, transform .45s cubic-bezier(.2,1.3,.4,1);
}
.dock-search:hover { background: rgba(255,255,255,.26); }
.dock-search:focus-within { background: #fff; border-color: #fff; transform: scale(1.025); box-shadow: 0 6px 20px rgba(0,30,90,.16), 0 0 0 3px rgba(0,113,227,.14); }
.dock-search svg { width: 17px; height: 17px; flex-shrink: 0; color: var(--ink3, #86868b); }
.dock-search input {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent;
  font: 500 15px 'Manrope', sans-serif; color: var(--ink);
}
.dock-search input::placeholder { color: rgba(29,29,31,.55); transition: color .3s; }
.dock-search:focus-within input::placeholder { color: #9a9aa0; }
.dock-search svg { color: rgba(29,29,31,.6); }
.dock-clear { display: none; width: 28px; height: 28px; border: none; border-radius: 999px; background: rgba(0,0,0,.08); color: #555; cursor: pointer; align-items: center; justify-content: center; flex-shrink: 0; }
.dock-clear.on { display: flex; }
.dock-clear svg { width: 13px; height: 13px; color: #555; }
@media (max-width:480px){ .dock-search input { font-size: 16px; } }  /* 16px: iPhone non zooma sul campo */
@media print { .dock { display: none !important; } }
/* ── pulsante dettaglio ── */
.card-btn {
  text-decoration: none;
  font-family: 'Manrope',sans-serif; font-size: 14px; font-weight: 700;
  background: var(--blue); color: #fff; border: none;
  border-radius: 999px; padding: 10px 22px; cursor: pointer; flex-shrink: 0;
  transition: background .15s, transform .15s;
  box-shadow: 0 2px 10px rgba(0,113,227,0.25);
  display: flex; align-items: center; gap: 6px;
}
.card-btn:hover { background: #005bb8; transform: translateY(-1px); }
.card-btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.empty {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 80px 24px; max-width: 420px; margin: 0 auto;
}
.empty-icon {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--blue-soft); display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
}
.empty-icon svg { width: 32px; height: 32px; color: var(--blue); opacity: .8; }
.empty h4 { font-size: 18px; font-weight: 800; color: var(--ink); margin-bottom: 8px; }
.empty p { font-size: 14px; color: var(--ink2); line-height: 1.6; margin-bottom: 20px; }
.empty p strong { color: var(--ink); font-weight: 700; }
.empty-tips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.empty-tip {
  font-size: 12px; font-weight: 600; color: var(--blue);
  background: var(--white); border: 1px solid var(--blue-mid);
  border-radius: 999px; padding: 7px 14px; cursor: pointer;
  transition: background .15s, transform .15s;
}
.empty-tip:hover { background: var(--blue-soft); transform: translateY(-1px); }

/* ════════════════════════════
   HOVER CARD (guide + inner)
════════════════════════════ */
.hover-card {
  background: var(--white); border: 0.5px solid var(--border); border-radius: var(--r-xl);
  box-shadow: 0 4px 16px rgba(0,40,120,0.08), 0 1px 4px rgba(0,0,0,0.05);
  transition: box-shadow .2s, transform .2s;
}
.hover-card:hover { box-shadow: 0 12px 40px rgba(0,40,120,0.14), 0 2px 8px rgba(0,0,0,0.07); transform: translateY(-2px); }
.hover-card.scroll-active { box-shadow: 0 12px 40px rgba(0,40,120,0.14), 0 2px 8px rgba(0,0,0,0.07); transform: translateY(-2px); }

/* ════════════════════════════
   PAGINA DETTAGLIO CERTIFICATO
════════════════════════════ */
.cert-hero { background: var(--white); border-bottom: 0.5px solid var(--border); padding: 48px 52px 40px; }
.cert-hero-inner { max-width: 860px; margin: 0 auto; }
.cert-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--blue);
  background: none; border: none; cursor: pointer; padding: 0; margin-bottom: 24px;
  font-family: 'Manrope',sans-serif; transition: opacity .12s;
}
.cert-back:hover { opacity: .7; }

.cert-body { max-width: 860px; margin: 0 auto; padding: 36px 52px 72px; }

/* scenario table */

/* ════════════════════════════
   GUIDA
════════════════════════════ */
.guide-hero {
  background: linear-gradient(135deg, #03183a 0%, #0d3d82 40%, #1a6cc8 70%, #2882d8 100%);
  border-bottom: none;
  padding: 72px 0 64px;
}
.guide-hero-inner { max-width: 900px; margin: 0 auto; padding: 0 64px; }
.guide-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: rgba(255,255,255,0.7); margin-bottom: 16px; }
.guide-hero h2 { font-size: 52px; font-weight: 800; letter-spacing: -1.8px; line-height: 1.08; color: #ffffff; margin-bottom: 18px; }
.guide-hero h2 span {
  color: #5bc8ff;
}
.guide-hero p  { font-size: 19px; color: rgba(255,255,255,0.85); max-width: 560px; line-height: 1.7; }

/* guida body: contenitore centrato */
.guide-body { max-width: 900px; margin: 0 auto; padding: 60px 64px 56px; }

/* sfondo guida — bianco pulito */
.guide-body-bg {
  background: #ffffff;
  width: 100%;
}
.guide-section { margin-bottom: 60px; }
.guide-section h3 { font-size: 28px; font-weight: 800; letter-spacing: -.6px; color: #111111; margin-bottom: 14px; }
.guide-section > p { font-size: 17px; color: #2a2a2a; line-height: 1.8; margin-bottom: 16px; }
.guide-section > p:last-child { margin-bottom: 0; }
.guide-cards { display: grid; grid-template-columns: repeat(auto-fit,minmax(240px,1fr)); gap: 20px; margin-top: 26px; }
.guide-card { padding: 38px; }
.guide-card-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--blue-soft); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.guide-card-icon svg { color: var(--blue); width: 26px; height: 26px; }
.guide-card h4 { font-size: 18px; font-weight: 700; color: #111111; margin-bottom: 10px; }
.guide-card p  { font-size: 15px; color: #2a2a2a; line-height: 1.7; }
.guide-term-list { margin-top: 20px; display: flex; flex-direction: column; gap: 6px; }
.guide-term { padding: 28px 32px; display: flex; gap: 24px; align-items: flex-start; }
.guide-term-name { font-size: 17px; font-weight: 700; color: var(--blue); min-width: 160px; flex-shrink: 0; padding-top: 2px; }
.guide-term-def  { font-size: 15px; color: #2a2a2a; line-height: 1.75; }
.guide-risk-row { display: grid; grid-template-columns: repeat(auto-fit,minmax(210px,1fr)); gap: 14px; margin-top: 20px; }
.risk-card { padding: 26px; }
.risk-label { font-size: 15px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; margin-bottom: 10px; }
.risk-label.low{color:var(--green-ink);} .risk-label.medium{color:var(--amber-ink);} .risk-label.high{color:var(--red-ink);}
.risk-card p { font-size: 15px; color: #2a2a2a; line-height: 1.7; }
.faq-list { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.faq-item { padding: 26px 30px; cursor: pointer; }
.faq-q { font-size: 18px; font-weight: 600; color: #111111; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-arrow { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,0.5); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: transform .3s cubic-bezier(.4,0,.2,1), background .2s; }
.faq-item.open .faq-arrow { transform: rotate(180deg); background: rgba(255,255,255,0.8); }
.faq-item.open .faq-arrow svg { color: var(--blue); }
.faq-a {
  font-size: 16px; color: #2a2a2a; line-height: 1.8;
  border-top: 0.5px solid rgba(0,0,0,0.1);
  overflow: hidden; height: 0;
  opacity: 0; margin-top: 0; padding-top: 0;
  transition: height .38s cubic-bezier(.4,0,.2,1),
              opacity .32s cubic-bezier(.4,0,.2,1),
              margin-top .38s cubic-bezier(.4,0,.2,1),
              padding-top .38s cubic-bezier(.4,0,.2,1);
}
.guide-cta { display: flex; justify-content: center; padding: 20px 0 0; }
.guide-cta-btn {
  font-family: 'Manrope',sans-serif; font-size: 17px; font-weight: 800;
  background: var(--ink); color: var(--white); border: none; border-radius: 999px;
  padding: 18px 48px; cursor: pointer; box-shadow: 0 4px 18px rgba(0,0,0,.2);
  transition: opacity .15s, transform .12s;
}
.guide-cta-btn:hover { opacity: .85; transform: translateY(-1px); }

/* ════════════════════════════
   INNER PAGES
════════════════════════════ */
.inner-hero { background: var(--white); border-bottom: 0.5px solid var(--border); padding: 72px 64px 64px; }
.inner-hero-inner { max-width: 900px; margin: 0 auto; }
.inner-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--blue); margin-bottom: 16px; }
.inner-hero h2 { font-size: 48px; font-weight: 800; letter-spacing: -1.4px; line-height: 1.1; color: var(--ink); margin-bottom: 16px; }
.inner-hero h2 span { color: var(--blue); }
.inner-hero p  { font-size: 19px; color: var(--ink2); max-width: 620px; line-height: 1.7; }
.inner-body { max-width: 900px; margin: 0 auto; padding: 56px 64px 100px; }
.inner-section { margin-bottom: 52px; }
.inner-section h3 { font-size: 24px; font-weight: 700; letter-spacing: -.4px; color: var(--ink); margin-bottom: 14px; }
.inner-section p  { font-size: 16px; color: var(--ink2); line-height: 1.8; margin-bottom: 12px; }
.legal-list { margin: 0 0 14px 0; padding-left: 20px; }
.legal-list li { font-size: 16px; color: var(--ink2); line-height: 1.8; margin-bottom: 8px; }
.legal-list a { color: var(--blue); text-decoration: none; }
.legal-list a:hover { text-decoration: underline; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 14px; margin-top: 20px; }
.team-card { padding: 28px 24px; text-align: center; }
.team-avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--blue-soft); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; font-size: 22px; font-weight: 800; color: var(--blue); }
.team-name { font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.team-role { font-size: 13px; font-weight: 500; color: var(--ink3); margin-bottom: 10px; }
.team-bio  { font-size: 13px; color: var(--ink2); line-height: 1.6; }
.jobs-list { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.job-card  { padding: 22px 26px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.job-info h4 { font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.job-info p  { font-size: 13px; color: var(--ink3); }
.job-btn { font-family: 'Manrope',sans-serif; font-size: 13px; font-weight: 700; background: var(--ink); color: var(--white); border: none; border-radius: 999px; padding: 10px 22px; cursor: pointer; white-space: nowrap; transition: opacity .12s; }
.job-btn:hover { opacity: .8; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 14px; margin-top: 20px; }
.contact-card { padding: 26px 22px; }
.contact-inline-strip {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-bottom: 28px; padding: 14px 20px;
  background: var(--blue-soft); border-radius: 999px;
}
.contact-inline-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--blue);
  text-decoration: none;
}
a.contact-inline-item:hover { text-decoration: underline; }
.contact-inline-item svg { flex-shrink: 0; opacity: .8; }
.contact-inline-sep { width: 1px; height: 16px; background: var(--blue-mid); }
.contact-subject-dropdown .sort-trigger { width: 100%; min-width: 0; background: var(--white); }
.contact-subject-dropdown .sort-menu-inner { width: 100%; }
/* disabilita apertura al hover — solo click */
.contact-subject-dropdown:hover .sort-trigger {
  background: var(--white) !important; border-color: var(--border) !important; color: var(--ink2) !important;
  transform: none !important; box-shadow: 0 2px 6px rgba(0,40,120,0.09), 0 1px 2px rgba(0,0,0,0.06) !important;
}
.contact-subject-dropdown:hover .sort-trigger svg { transform: none !important; }
.contact-subject-dropdown:hover .sort-menu { max-height: 0; opacity: 0; pointer-events: none; }
.contact-subject-dropdown.open .sort-trigger {
  background: var(--white) !important; border-color: #1a3a8a !important; color: #1a3a8a !important;
  transform: none !important;
}
.contact-subject-dropdown.open .sort-trigger svg { transform: rotate(180deg) !important; }
.contact-subject-dropdown.open .sort-menu { max-height: 220px; opacity: 1; pointer-events: auto; }
.contact-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--blue-soft); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.contact-icon svg { color: var(--blue); }
.contact-card h4 { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.contact-card p  { font-size: 14px; color: var(--ink2); line-height: 1.6; }
.contact-card a  { color: var(--blue); text-decoration: none; font-weight: 700; }
.form-wrap { background: var(--white); border: 0.5px solid var(--border); border-radius: var(--r-2xl); padding: 36px 40px; margin-top: 24px; }
.form-wrap h4 { font-size: 19px; font-weight: 700; color: var(--ink); margin-bottom: 22px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--ink3); }
.form-group input,.form-group textarea,.form-group select { font-family:'Manrope',sans-serif; font-size:14px; font-weight:500; background:var(--bg); border:0.5px solid var(--border); border-radius:var(--r-md); color:var(--ink); padding:12px 16px; outline:none; transition:border-color .15s,box-shadow .15s; }
.form-group input:focus,.form-group textarea:focus { border-color:var(--blue); box-shadow:0 0 0 3px rgba(0,113,227,.1); }
.form-group textarea { resize:vertical; min-height:110px; }
.form-submit { font-family:'Manrope',sans-serif; font-size:15px; font-weight:700; background:var(--ink); color:var(--white); border:none; border-radius:999px; padding:14px 32px; cursor:pointer; margin-top:8px; box-shadow:0 2px 10px rgba(0,0,0,.15); transition:opacity .12s; }
.form-submit:hover { opacity:.82; }
.value-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap: 14px; margin-top: 20px; }
.value-card { padding: 26px; }
.value-num { font-size: 38px; font-weight: 800; letter-spacing: -1px; color: var(--blue); margin-bottom: 4px; }
.value-label { font-size: 14px; font-weight: 500; color: var(--ink2); }

/* ════════════════════════════
   MODAL
════════════════════════════ */
.modal-bg { display:none; position:fixed; inset:0; z-index:300; background:rgba(0,0,0,.3); align-items:center; justify-content:center; }
.modal-bg.open { display:flex; }
.modal { background:var(--white); border-radius:var(--r-2xl); padding:36px 40px 32px; max-width:440px; width:90%; box-shadow:0 24px 64px rgba(0,0,0,.14); }
.modal-term { font-size:24px; font-weight:800; letter-spacing:-.5px; color:var(--ink); margin-bottom:12px; }
.modal-def  { font-size:15px; color:var(--ink2); line-height:1.75; margin-bottom:26px; }
.modal-close { font-family:'Manrope',sans-serif; font-size:14px; font-weight:700; background:var(--ink); color:var(--white); border:none; border-radius:999px; padding:10px 22px; cursor:pointer; box-shadow:0 2px 8px rgba(0,0,0,.15); }

/* ── COOKIE BANNER ── */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999;
  background: #10142a; color: rgba(255,255,255,0.92);
  transform: translateY(100%); opacity: 0; pointer-events: none;
  transition: transform .4s cubic-bezier(.4,0,.2,1), opacity .4s ease;
}
.cookie-banner.visible { transform: translateY(0); opacity: 1; pointer-events: auto; }
.cookie-banner-inner {
  max-width: 1100px; margin: 0 auto; padding: 18px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.cookie-banner-inner p { font-size: 13px; line-height: 1.6; color: rgba(255,255,255,0.75); flex: 1; min-width: 240px; margin: 0; }
.cookie-banner-inner p a { color: #fff; text-decoration: underline; cursor: pointer; }
.cookie-banner-btns { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-btn { font-family: 'Manrope',sans-serif; font-size: 13px; font-weight: 700; border-radius: 999px; padding: 10px 20px; cursor: pointer; border: none; white-space: nowrap; transition: transform .15s, opacity .15s; }
.cookie-btn:hover { transform: translateY(-1px); }
.cookie-btn-decline { background: transparent; color: rgba(255,255,255,0.75); border: 1px solid rgba(255,255,255,0.3); }
.cookie-btn-decline:hover { background: rgba(255,255,255,0.08); }
.cookie-btn-accept { background: var(--blue); color: #fff; }
@media (max-width:780px) {
  .cookie-banner-inner { padding: 16px 18px; flex-direction: column; align-items: stretch; gap: 14px; }
  .cookie-banner-btns { width: 100%; }
  .cookie-btn { flex: 1; text-align: center; }
}

/* trigger emittenti/ordina mobile — nascosti su desktop */
.mobile-filter-trigger { display: none; }

/* finestrelle mobile (bottom sheet) */
.mobile-sheet-bg {
  display: none; position: fixed; inset: 0; z-index: 400;
  background: rgba(0,0,0,.35);
  align-items: flex-end; justify-content: center;
}
.mobile-sheet-bg.open { display: flex; animation: sheetBgIn .2s ease; }
@keyframes sheetBgIn { from { opacity: 0; } to { opacity: 1; } }
.mobile-sheet {
  background: var(--white); width: 100%; max-width: 560px;
  border-radius: 24px 24px 0 0; padding: 12px 20px 28px;
  max-height: 70vh; overflow-y: auto;
  animation: sheetSlideUp .25s cubic-bezier(.4,0,.2,1);
}
@keyframes sheetSlideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.mobile-sheet-handle { width: 40px; height: 4px; border-radius: 999px; background: var(--border); margin: 0 auto 16px; }
.mobile-sheet h4 { font-size: 17px; font-weight: 800; color: var(--ink); margin-bottom: 14px; }
.mobile-sheet-list { display: flex; flex-direction: column; gap: 6px; }
.mobile-sheet-option {
  font-family: 'Manrope',sans-serif; font-size: 15px; font-weight: 600;
  text-align: left; background: var(--bg); border: none; border-radius: 14px;
  padding: 14px 16px; color: var(--ink2); cursor: pointer;
  transition: background .15s, color .15s;
}
.mobile-sheet-option.active { background: #1a3a8a; color: #fff; font-weight: 700; }

/* ── newsletter CTA ── */
.newsletter-strip {
  background: #ffffff;
  padding: 32px 56px 36px;
}
.newsletter-inner {
  max-width: 900px; margin: 0 auto;
  background: linear-gradient(135deg, #0a1a6e 0%, #1a4aaa 50%, #2060cc 100%);
  border-radius: 20px; padding: 22px 30px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  box-shadow: 0 8px 32px rgba(10,26,110,0.18);
}
.newsletter-title { font-size: 15px; font-weight: 800; color: #fff; margin-bottom: 4px; letter-spacing: -.2px; }
.newsletter-sub   { font-size: 13px; color: rgba(255,255,255,.75); }
.newsletter-btn {
  font-family: 'Manrope',sans-serif; font-size: 13px; font-weight: 700;
  background: #fff; color: #0a1a6e; border: none; border-radius: 999px;
  padding: 10px 22px; cursor: pointer; white-space: nowrap; text-decoration: none;
  display: inline-block; transition: opacity .15s, transform .12s;
}
.newsletter-btn:hover { opacity: .9; transform: translateY(-1px); }

/* ── pageCert: sfondo blu in alto nell'hero, bianco sotto ── */
#pageCert { background: #ffffff; }

.cert-hero {
  background: linear-gradient(135deg, #03183a 0%, #0d3d82 40%, #1a6cc8 70%, #2882d8 100%);
  padding: 48px 64px 48px;
  position: relative; overflow: hidden;
}
.cert-hero-inner { max-width: 1100px; margin: 0 auto; }
.cert-back-wrap { margin-bottom: 24px; }
.cert-hero-meta { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
/* pattern sottile nell'hero */
.cert-hero::after {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

/* back button */
.cert-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px; padding: 7px 16px;
  cursor: pointer; transition: all .2s; margin-bottom: 20px;
  position: relative; z-index: 1;
}
.cert-back:hover { background: rgba(255,255,255,0.2); color: #fff; }

/* header hero */
.cert-header {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 24px;
  position: relative; z-index: 1;
}
.cert-header-left { min-width: 0; display: flex; flex-direction: column; align-items: center; }

/* tema badge */
.cert-tema-badge {
  display: inline-block; font-size: 17px; font-weight: 700;
  letter-spacing: -.1px; text-transform: none;
  color: rgba(255,255,255,0.85); background: transparent;
  margin-bottom: 8px;
}

/* logo emittente nell'hero — più grande */
.cert-hero-logo {
  width: 92px; height: 92px; border-radius: 22px;
  background: transparent; display: flex; align-items: center; justify-content: center;
  overflow: hidden; padding: 0; flex-shrink: 0;
  box-shadow: 0 10px 32px rgba(0,0,0,0.35), 0 3px 10px rgba(0,0,0,0.2);
}
.cert-hero-logo img { width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; user-select: none; pointer-events: none; }

/* layout logo + testo affiancati */
.cert-hero-meta {
  display: flex; align-items: center; gap: 22px; margin-bottom: 16px;
}
.cert-hero-meta-text { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; text-align: left; }

.cert-eyebrow { display: none; }

.cert-h1 { font-size: 32px; font-weight: 800; letter-spacing: -.7px; line-height: 1.15; color: #ffffff; margin: 0; }

/* animazione entrata elementi hero */
.cert-anim { opacity: 0; transform: translateY(-10px); animation: certAnimIn .5s cubic-bezier(.4,0,.2,1) forwards; }
.cert-hero-logo.cert-anim { animation-delay: .05s; }
.cert-tema-badge.cert-anim { animation-delay: .15s; }
.cert-h1.cert-anim { animation-delay: .22s; }
@keyframes certAnimIn { to { opacity: 1; transform: translateY(0); } }

/* ISIN pill */
.cert-isin {
  font-family: 'Manrope', sans-serif; font-size: 13px; font-weight: 700;
  color: rgba(255,255,255,0.85); background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25); border-radius: 999px;
  padding: 6px 16px; display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer; transition: background .2s; text-decoration: none;
}
.cert-isin:hover { background: rgba(255,255,255,0.22); }
.cert-isin svg { width: 13px; height: 13px; opacity: .7; }

/* cert body */
.cert-body { max-width: 1000px; margin: 0 auto; padding: 48px 64px 0; }
.cert-section { margin-bottom: 56px; }
.cert-section h3 { font-size: 22px; font-weight: 800; letter-spacing: -.4px; color: var(--ink); margin-bottom: 24px; display: flex; align-items: center; gap: 10px; }
.cert-section h3::after { content: ''; flex: 1; height: 1px; background: linear-gradient(to right, var(--border), transparent); }

/* bottone stampa / salva PDF */
.cert-print-wrap { max-width: 1000px; margin: 0 auto; padding: 40px 64px 40px; display: flex; justify-content: center; }
.cert-print-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Manrope',sans-serif; font-size: 13px; font-weight: 700;
  background: #fff; color: var(--blue); border: 1px solid var(--blue-mid);
  border-radius: 999px; padding: 9px 18px; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,80,200,0.09);
  transition: background .15s, transform .15s;
}
.cert-print-btn:hover { background: var(--blue-soft); transform: translateY(-1px); }
.cert-print-btn svg { flex-shrink: 0; }

/* KPI grid — vedi blocco unificato più sotto */

/* grafico cedola simulato */
.cedola-chart { background: #f7f9fc; border: none; border-radius: 20px; padding: 26px 28px; }
.cedola-chart h4 { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 20px; }
.bar-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.bar-row:last-child { margin-bottom: 0; }
.bar-label { font-size: 12px; font-weight: 700; color: var(--ink3); width: 34px; flex-shrink: 0; text-transform: uppercase; letter-spacing: .3px; }
.bar-track { flex: 1; height: 12px; background: #e8ecf5; border-radius: 999px; overflow: hidden; }
.bar-fill  { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #1a7fe8, #4ade80); box-shadow: 0 0 8px rgba(26,127,232,0.35); }
.bar-fill.amber { background: linear-gradient(90deg, #f5a623, #fbbf24); box-shadow: 0 0 8px rgba(245,166,35,0.35); }
.bar-fill.red   { background: linear-gradient(90deg, var(--red), #ff8a80); box-shadow: 0 0 8px rgba(220,38,38,0.35); }
.bar-fill.green { background: linear-gradient(90deg, #16a34a, #4ade80); box-shadow: 0 0 8px rgba(22,163,74,0.4); }
.bar-tag {
  font-size: 10px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; flex-shrink: 0; white-space: nowrap;
}
.bar-tag.amber { background: #fff3d6; color: #a05a00; }
.bar-tag.green { background: #dcfce7; color: #15803d; }
.bar-val { font-size: 13px; font-weight: 700; color: var(--ink); width: 64px; text-align: right; flex-shrink: 0; white-space: nowrap; }

/* sottostanti cards */
.sottostanti-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.sott-card {
  display: flex; align-items: center; gap: 10px;
  background: #f5f7fb; border: none;
  border-radius: 999px; padding: 8px 18px 8px 8px;
  font-size: 14px; font-weight: 600; color: var(--ink);
  transition: background .2s, transform .15s;
}
.sott-card:hover { background: #ebf0fb; transform: translateY(-1px); }
.sott-card.scroll-active { background: #ebf0fb; transform: translateY(-1px); }
.sott-avatar {
  width: 35px; height: 35px; border-radius: 50%;
  background: linear-gradient(135deg, #1255b5, #2882d8);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #fff; flex-shrink: 0;
}

/* timeline date */
.cert-timeline-card {
  background: #f7f9fc; border-radius: 20px;
  padding: 28px 36px; margin: 0 auto;
  max-width: 520px;
}
.cert-timeline { display: flex; align-items: flex-start; gap: 0; }
.timeline-node { text-align: center; flex-shrink: 0; width: 130px; }
.timeline-dot {
  width: 14px; height: 14px; border-radius: 50%; background: var(--blue);
  margin: 0 auto 10px; box-shadow: 0 0 0 5px rgba(26,127,232,0.14);
}
.timeline-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--ink3); margin-bottom: 5px; display: flex; align-items: center; justify-content: center; gap: 4px; }
.timeline-date { font-size: 16px; font-weight: 800; color: var(--ink); letter-spacing: -.2px; }
.timeline-days { font-size: 12px; font-weight: 600; color: var(--blue); margin-top: 4px; }
.timeline-days.past { color: var(--ink3); font-weight: 500; }
.timeline-line-wrap { flex: 1; display: flex; align-items: center; padding-top: 6px; margin: 0 4px; }
.timeline-line { flex: 1; height: 2px; background: linear-gradient(to right, var(--blue), #4a9ee5); }

/* stato cedola grande */
.stato-big {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 12px;
  font-size: 14px; font-weight: 700;
}
.stato-big.green { background: #e8f5e9; color: #1a7a30; }
.stato-big.amber { background: #fff8e1; color: #a05a00; }
.stato-big.red   { background: #ffebee; color: #c0251b; }
.stato-big-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* steps — stile Apple, timeline con icone e accento */
.steps { display: flex; flex-direction: column; position: relative; }
.step {
  display: flex; gap: 24px; align-items: flex-start;
  padding: 20px 16px;
  margin: 0 -16px;
  position: relative;
  border-radius: 16px;
  transition: background .2s;
}
.step:hover { background: #f7f9fc; }
.step.scroll-active { background: #f7f9fc; }
.step:not(:last-child)::after {
  content: '';
  position: absolute; left: 34px; top: 58px; bottom: 4px;
  width: 2px;
  background: linear-gradient(to bottom, #d8e2f5, transparent);
}
.step-num {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, #1a7fe8, #4ade80);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 2px;
  position: relative; z-index: 1;
  box-shadow: 0 4px 14px rgba(26,127,232,0.3);
}
.step-num svg { width: 18px; height: 18px; }
.step-body { padding-top: 6px; }
.step-body h4 { font-size: 17px; font-weight: 700; color: var(--ink); margin-bottom: 6px; letter-spacing: -.2px; }
.step-body p  { font-size: 15px; color: var(--ink2); line-height: 1.7; margin: 0; }

/* disclaimer box elegante */
.cert-disclaimer-box {
  display: flex; gap: 14px; align-items: flex-start;
  background: #f7f9fc; border: none;
  border-radius: 18px; padding: 18px 22px; margin-top: 32px;
}
.cert-disclaimer-box svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--ink3); margin-top: 1px; }
.cert-disclaimer-box p { font-size: 12px; color: var(--ink3); line-height: 1.8; margin: 0; }

/* CTA finale */
.cert-cta-final {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  margin-top: 40px; padding: 28px 32px;
  background: linear-gradient(135deg, #0d3d82, #1a6cc8);
  border-radius: 20px;
}
.cert-cta-final p { font-size: 16px; font-weight: 700; color: #fff; margin: 0; }
.cert-cta-final button {
  font-family: 'Manrope',sans-serif; font-size: 14px; font-weight: 700;
  background: #fff; color: #0d3d82; border: none; border-radius: 999px;
  padding: 12px 26px; cursor: pointer; transition: transform .15s, box-shadow .15s;
}
.cert-cta-final button:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,0.2); }

/* scenari — card stile Apple, colore solo sull'icona */
.scen-list { display: flex; flex-direction: column; gap: 10px; }
.scen-card {
  display: flex; align-items: center; gap: 18px;
  padding: 22px 24px;
  border-radius: 18px;
  background: #f7f9fc;
  transition: background .2s;
}
.scen-card:hover { background: #f1f4fa; }
.scen-card.scroll-active { background: #f1f4fa; }
.scen-icon-lg {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.scen-icon-lg svg { width: 14px; height: 14px; }
.scen-good .scen-icon-lg { background: #4ade80; color: #0a4a1a; }
.scen-mid  .scen-icon-lg { background: #fbbf24; color: #4a3200; }
.scen-bad  .scen-icon-lg { background: #f87171; color: #4a0a0a; }
.scen-body { width: 280px; flex-shrink: 0; }
.scen-title { font-size: 17px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.scen-desc { font-size: 14px; color: var(--ink3); }
.scen-effects { display: flex; gap: 32px; flex-shrink: 0; }
.scen-effects > div { min-width: 150px; }
.scen-effect-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--ink3); margin-bottom: 4px; }
.scen-effect-val { font-size: 15px; font-weight: 700; color: var(--ink); white-space: nowrap; }
footer { background:var(--white); border-top: none; position: relative; }
footer::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(to right, transparent, #c4d8f5 20%, #c4d8f5 80%, transparent);
}
.footer-top {
  max-width:1000px; margin:0 auto; padding:32px 52px;
  display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:24px;
}
.footer-brand { display:flex; flex-direction:column; align-items:flex-start; gap:10px; }
.footer-brand-top { display:flex; align-items:center; gap:14px; }
.footer-brand .logo-f { font-size:28px; font-weight:800; letter-spacing:-.5px; color:var(--ink); }
.footer-brand .logo-f span { color:var(--blue); }
.footer-brand p { font-size:13px; color:var(--ink3); line-height:1.6; max-width:340px; margin:0; }
.footer-brand p strong { color:var(--ink2); font-weight:700; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--bg); display: flex; align-items: center; justify-content: center;
  color: var(--ink2); transition: background .15s, color .15s;
}
.footer-social a:hover { background: var(--blue); color: #fff; }
.footer-social svg { width: 16px; height: 16px; }
.footer-col { display:flex; align-items:center; gap:22px; }
.footer-col h5 { font-size:11px; font-weight:700; letter-spacing:.5px; text-transform:uppercase; color:var(--ink3); margin:0; }
.footer-col a  { display:inline-block; font-size:14px; font-weight:500; color:var(--ink2); text-decoration:none; transition:color .12s; cursor:pointer; }
.footer-col a:hover { color:var(--blue); }
.footer-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; color: var(--ink3);
  background: var(--bg); border-radius: 999px; padding: 5px 12px;
}
.footer-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: #4ade80; }
.footer-bottom { border-top:0.5px solid var(--border); padding:20px 52px; }
.footer-bottom-inner { max-width:1100px; margin:0 auto; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; }
.footer-copy { font-size:12px; color:var(--ink3); }
.footer-legal { display:flex; gap:18px; }
.footer-legal a { font-size:12px; color:var(--ink3); text-decoration:none; transition:color .12s; }
.footer-legal a:hover { color:var(--blue); }
.disclaimer { background: var(--white); border-top: none; padding: 28px 56px; }
.disclaimer-inner { max-width:1100px; margin:0 auto; font-size:11px; color:var(--ink3); line-height:1.85; }

/* ── kpi-card upgrade ── */
.cert-issuer-logo { border: 0.5px solid rgba(255,255,255,0.3) !important; box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important; }
.cert-issuer-name { color: rgba(255,255,255,0.8) !important; }
.cert-title { color: #ffffff !important; }

.kpi-grid { display: grid; grid-template-columns: repeat(3,1fr) !important; gap: 16px; margin-bottom: 16px; }
.kpi-card {
  background: #ffffff;
  border: 1px solid #e8eef8;
  border-left: 3px solid var(--blue);
  border-radius: 20px;
  padding: 22px 22px;
  box-shadow: 0 4px 16px rgba(0,40,120,0.07), 0 1px 4px rgba(0,0,0,0.04);
  transition: box-shadow .2s, transform .2s, border-color .2s;
  animation: kpiIn .4s cubic-bezier(.4,0,.2,1) both;
}
.kpi-card:nth-child(1) { animation-delay: .05s; }
.kpi-card:nth-child(2) { animation-delay: .10s; }
.kpi-card:nth-child(3) { animation-delay: .15s; }
.kpi-card:nth-child(4) { animation-delay: .20s; }
.kpi-card:nth-child(5) { animation-delay: .25s; }
.kpi-card:nth-child(6) { animation-delay: .30s; }
@keyframes kpiIn { from { opacity:0; transform: translateY(12px); } to { opacity:1; transform:none; } }
.kpi-card:hover { box-shadow: 0 10px 32px rgba(0,40,120,0.13); transform: translateY(-3px); }
.kpi-card.scroll-active { box-shadow: 0 10px 32px rgba(0,40,120,0.13); transform: translateY(-3px); }
.kpi-card.accent-green { border-left-color: #4ade80; }
.kpi-card.accent-amber { border-left-color: #fbbf24; }
.kpi-card.accent-red   { border-left-color: #f87171; }
.kpi-card.accent-blue  { border-left-color: var(--blue); }
.kpi-label {
  font-size: 13px; font-weight: 800; letter-spacing: .3px; color: var(--ink);
  margin-bottom: 12px; display: flex; align-items: center; gap: 6px; line-height: 1.3;
  flex-wrap: nowrap; white-space: nowrap; overflow: hidden;
}
.kpi-label > :not(svg):not(.p-hint) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi-label .p-hint { margin-left: auto; flex-shrink: 0; }
.kpi-label svg { width: 14px; height: 14px; color: var(--blue); opacity: .8; flex-shrink: 0; display: block; }
.kpi-val { font-size: 22px; font-weight: 800; letter-spacing: -.5px; line-height: 1; margin-bottom: 6px; }
.kpi-val.green { color: #1a7a30; }
.kpi-val.amber { color: #a05a00; }
.kpi-val.red   { color: #c0251b; }
.kpi-val.blue  { color: var(--blue); }
.kpi-sub { font-size: 12px; color: var(--ink3); font-weight: 500; }

@media (min-width:1441px) {
  html { zoom: 1.1; }
  .home-hero-title, .home-hero-tagline { zoom: 0.9091; }
}

@media (min-width:781px) and (max-width:1440px), (max-width:780px) and (orientation:landscape) {
  .header-row2 { padding: 14px 24px; gap: 8px; flex-wrap: nowrap; }
  .header-row2::before { left: 24px; right: 24px; }
  .fbtn-scroll {
    display: flex; align-items: center; gap: 10px;
    flex: 0 1 auto; min-width: 0; overflow-x: auto; flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
    padding: 6px 8px 10px 2px; margin: -6px -8px -10px -2px;
  }
  .fbtn-scroll.has-overflow {
    mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent 100%);
  }
  .fbtn-scroll::-webkit-scrollbar { display: none; }
  .filter-label { font-size: 11.5px; margin-right: 3px; }
  .fbtn { font-size: 13px; padding: 8px 14px; }
  .sort-wrap { margin-left: 14px; margin-right: 0; padding-left: 18px; gap: 8px; flex-shrink: 0; }
  .sort-lbl { font-size: 11.5px; }
  .sort-trigger { min-width: 232px; width: 232px; font-size: 13px; padding: 9px 16px 9px 18px; }
  .home-hero { padding: 72px 40px 48px; }
  .home-hero-title { font-size: 56px; margin-bottom: 22px; }
  .home-hero-tagline { font-size: 18px; }

  /* fix overflow: gli scenari sul certificato non si adattavano a questa fascia */
  .scen-card { flex-wrap: wrap; }
  .scen-body { width: auto; flex: 1 1 220px; min-width: 200px; }
  .scen-effects { flex-wrap: wrap; gap: 20px; }
  .scen-effects > div { min-width: 130px; }
  .scen-effect-val { white-space: normal; }
}

/* telefono in orizzontale: eredita il layout da tablet, ma senza queste
   regole i testi restavano alla dimensione desktop (troppo grandi per
   uno schermo così basso e stretto) */
@media (max-width:780px) and (orientation:landscape) {
  .card-theme { font-size: 13px; margin-bottom: 3px; }
  .card-title { font-size: 17px; line-height: 1.3; }
  .rend-num { font-size: 24px; }
  .issuer-logo-wrap { width: 44px; height: 44px; border-radius: 11px; }
  .home-hero { padding: 36px 40px 28px; }
  .home-hero-title { font-size: 37px; margin-bottom: 14px; }
  .home-hero-tagline { font-size: 15px; }
}

@media (max-width:780px) and (orientation:portrait) {

  /* ── HEADER ── */
  .header-row1 { padding: 20px 16px 14px; gap: 10px; }
  .header-row2 { padding: 16px 16px; gap: 7px; }
  .header-row2::before { left: 16px; right: 16px; }
  .logo { font-size: 20px; }

  /* barra ricerca compatta */
  .header-search-wrap { padding: 4px 4px 4px 12px; }
  .header-search-wrap input { font-size: 14px; padding: 8px 0; }
  .header-search-wrap input::placeholder { font-size: 14px; }
  .nav-btn-inline { font-size: 12px; padding: 9px 13px; max-width: 160px; }
  .nav-btn { font-size: 12px; padding: 9px 13px; }

  /* nascondi vecchi filtri/dropdown, mostra le due finestrelle */
  .header-row2 { gap: 10px; }
  .fbtn, .filter-label, .sort-wrap { display: none; }
  .mobile-filter-trigger {
    display: flex; align-items: center; gap: 7px;
    font-family: 'Manrope',sans-serif; font-size: 13px; font-weight: 600;
    background: var(--white); border: 0.5px solid var(--border); border-radius: 999px;
    padding: 9px 15px; color: var(--ink2); cursor: pointer; flex: 1; min-width: 0;
    box-shadow: 0 2px 6px rgba(0,40,120,0.06);
  }
  .mobile-filter-trigger svg { flex-shrink: 0; opacity: .6; }
  .mobile-filter-trigger span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* ── HERO — un po' più di respiro sopra e sotto ── */
  .home-hero { padding: 90px 20px 46px; }
  .home-hero-title { font-size: 32px; letter-spacing: -1px; margin-bottom: 14px; line-height: 1.16; }
  .home-hero-tagline { font-size: 14px; line-height: 1.6; margin-bottom: 8px; text-wrap: balance; }
  .count-row { padding: 22px 16px 4px; }
  .count-badge { font-size: 12px; padding: 3px 12px; }

  /* ── GRIGLIA CERTIFICATI ── */
  .certs-bg { padding-bottom: 60px; }
  .grid { padding: 12px 14px 0; gap: 12px; }

  /* ── CARD ── */
  .card { padding: 18px 16px 14px; border-radius: 18px; }
  .skeleton-card { padding: 18px 16px 14px; border-radius: 18px; }
  .skel-logo { width: 44px; height: 44px; border-radius: 11px; }
  .card-top { gap: 12px; margin-bottom: 12px; }
  .card-left { gap: 12px; }
  .issuer-logo-wrap { width: 49px; height: 49px; border-radius: 12px; flex-shrink: 0; }
  .card-theme { font-size: 13px; margin-bottom: 3px; }
  .card-title { font-size: 16px; line-height: 1.3; }
  .rend-num { font-size: 22px; }
  .rend-sub { font-size: 8.5px; }
  .mobile-break { display: inline; }

  /* sottostanti (chip semplici in home) */
  .chips-wrap { margin-bottom: 14px; }
  .chips { gap: 4px; flex-wrap: wrap; }
  .chip { font-size: 11px; padding: 4px 10px; }

  /* params: 2 colonne */
  .params { grid-template-columns: repeat(2,1fr); margin-bottom: 14px; }
  .param:nth-child(2) { border-right: none; }
  .param:nth-child(3) { border-top: 0.5px solid rgba(200,220,255,0.5); }
  .param:nth-child(4) { border-top: 0.5px solid rgba(200,220,255,0.5); border-right: none; }
  .param { padding: 10px 10px; text-align: center; min-width: 0; }
  .p-label { justify-content: center; }
  .p-label { font-size: 8.5px; margin-bottom: 3px; }
  .p-val { font-size: 13px; }

  /* card footer */
  .card-footer {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-areas: "d1 d2 scad" "isin isin dett";
    row-gap: 14px; column-gap: 6px;
    align-items: center;
    margin-top: 16px;
  }
  .date-item:nth-of-type(1) { grid-area: d1; text-align: center; align-items: center; }
  .date-item:nth-of-type(2) { grid-area: d2; text-align: center; align-items: center; }
  .date-item:nth-of-type(3) { grid-area: scad; text-align: center; align-items: center; }
  .date-item { flex-direction: column; gap: 2px; }
  .isin-btn { grid-area: isin; justify-self: start; padding: 9px 16px; font-size: 11px; }
  .card-btn { grid-area: dett; justify-self: end; padding: 9px 18px; font-size: 13px; }
  .d-label { font-size: 8.5px; }
  .d-dark { font-size: 12px; }
  .isin-btn { font-size: 10px; padding: 6px 10px; letter-spacing: .2px; }
  .card-btn { font-size: 12px; padding: 8px 16px; }

  /* ── GUIDE ── */
  .guide-hero { padding: 36px 0 30px; }
  .guide-hero-inner { padding: 0 24px; }
  .guide-hero h2 { font-size: 26px; letter-spacing: -.7px; }
  .guide-hero p { font-size: 14px; }
  .guide-body { padding: 28px 24px 60px; }
  .guide-section { margin-bottom: 36px; }
  .guide-section h3 { font-size: 19px; margin-bottom: 16px; }
  .guide-section > p { font-size: 14px; margin-bottom: 12px; }

  /* card "Cos'è un certificato" — icona e testo ridimensionati in scala */
  .guide-cards { grid-template-columns: 1fr; gap: 10px; margin-top: 18px; }
  .guide-card { padding: 18px; }
  .guide-card-icon { width: 38px; height: 38px; border-radius: 11px; margin-bottom: 12px; }
  .guide-card-icon svg { width: 18px; height: 18px; }
  .guide-card h4 { font-size: 15px; margin-bottom: 6px; }
  .guide-card p { font-size: 13px; }

  /* glossario */
  .guide-term-list { margin-top: 14px; gap: 4px; }
  .guide-term { flex-direction: column; gap: 4px; padding: 14px 16px; }
  .guide-term-name { min-width: unset; font-size: 14px; padding-top: 0; }
  .guide-term-def { font-size: 13px; }

  /* livelli di rischio — coerenti con guide-card */
  .guide-risk-row { grid-template-columns: 1fr; gap: 10px; }
  .risk-card { padding: 18px; }
  .risk-label { font-size: 13px; margin-bottom: 8px; }
  .risk-card p { font-size: 13px; }

  /* FAQ — coerenti con guide-term */
  .faq-list { margin-top: 14px; gap: 6px; }
  .faq-item { padding: 16px 18px; }
  .faq-q { font-size: 14px; }
  .faq-a { font-size: 13px; }
  .faq-arrow { width: 24px; height: 24px; }

  .guide-cta { padding: 12px 0 0; }
  .guide-cta-btn { font-size: 14px; padding: 13px 30px; }

  /* ── INNER PAGES ── */
  .inner-hero { padding: 36px 18px 32px; }
  .inner-hero h2 { font-size: 26px; }
  .inner-hero p { font-size: 15px; max-width: none; }
  .inner-body { padding: 28px 18px 56px; }
  .inner-section h3 { font-size: 20px; }
  .inner-section p, .legal-list li { font-size: 14px; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-inline-strip { flex-direction: column; align-items: flex-start; gap: 10px; border-radius: 16px; }
  .contact-inline-sep { display: none; }
  .form-wrap { padding: 24px 18px; }
  .form-row { grid-template-columns: 1fr; gap: 14px; }

  /* ── NEWSLETTER ── */
  .newsletter-strip { padding: 16px 14px 24px; }
  .newsletter-inner { padding: 20px 20px; flex-direction: column; align-items: flex-start; gap: 14px; border-radius: 16px; }
  .newsletter-btn { align-self: stretch; text-align: center; display: block; }

  /* ── FOOTER ── */
  .footer-top { flex-direction: column; align-items: flex-start; padding: 28px 18px; gap: 22px; }
  .footer-brand-top { flex-wrap: wrap; gap: 10px; }
  .footer-brand .logo-f { font-size: 24px; }
  .footer-badge { font-size: 10px; padding: 4px 10px; }
  .footer-brand p { max-width: none; font-size: 13px; }
  .footer-col { flex-wrap: wrap; gap: 14px 20px; }
  .footer-bottom-inner { flex-direction: column; gap: 8px; align-items: flex-start; }
  .footer-bottom { padding: 14px 18px; }
  .disclaimer { padding: 18px 18px; }

  /* ── CERT DETAIL ── */
  .cert-hero { padding: 28px 18px 28px; }
  .cert-back { font-size: 13px; margin-bottom: 14px; }
  .cert-header { gap: 18px; }
  .cert-hero-meta { flex-direction: column; align-items: center; gap: 14px; }
  .cert-hero-logo { width: 56px; height: 56px; border-radius: 14px; }
  .cert-hero-meta-text { align-items: center; text-align: center; }
  .cert-tema-badge { font-size: 15px; }
  .cert-h1 { font-size: 20px; line-height: 1.3; }

  .cert-body { padding: 20px 18px 48px; }
  .cert-section { margin-bottom: 32px; }
  .cert-section h3 { font-size: 17px; margin-bottom: 14px; }

  /* KPI grid: 2 colonne su mobile */
  .kpi-grid { grid-template-columns: repeat(2,1fr) !important; gap: 10px; }
  .kpi-card { padding: 16px 14px; border-radius: 16px; display: flex; flex-direction: column; min-width: 0; }
  .kpi-label { font-size: 10.5px; letter-spacing: 0; gap: 5px; margin-bottom: 10px; min-width: 0; }
  .kpi-label .p-hint { margin-left: auto; flex-shrink: 0; }
  .kpi-val { font-size: 17px; word-break: break-word; min-width: 0; }
  .kpi-val[style*="18px"] { font-size: 15px !important; }
  .kpi-sub { font-size: 10.5px; word-break: break-word; }
  .stato-big { font-size: 12px; padding: 6px 11px; }

  /* timeline date */
  .cert-timeline-card { padding: 20px 18px; }
  .cert-timeline { flex-direction: column; gap: 18px; align-items: flex-start; }
  .timeline-line-wrap { display: none; }
  .timeline-node { width: 100%; text-align: left; }
  .timeline-dot { margin: 0 0 8px 0; }
  .timeline-label { justify-content: flex-start; }

  /* sottostanti */
  .sottostanti-grid { gap: 8px; }
  .sott-card { font-size: 13px; padding: 7px 16px 7px 7px; }
  .sott-avatar { width: 30px; height: 30px; font-size: 11px; }

  /* steps */
  .step { padding: 16px 12px; margin: 0 -12px; gap: 16px; }
  .step-num { width: 32px; height: 32px; }
  .step-num svg { width: 15px; height: 15px; }
  .step-body h4 { font-size: 15px; }
  .step-body p { font-size: 13px; }

  /* grafico cedola */
  .cedola-chart { padding: 20px 16px; }
  .cedola-chart h4 { font-size: 13px; }
  .bar-label { font-size: 10px; width: 28px; }
  .bar-val { font-size: 12px; width: 56px; }

  /* scenari */
  .scen-card { flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px; }
  .scen-icon-lg { width: 26px; height: 26px; }
  .scen-icon-lg svg { width: 12px; height: 12px; }
  .scen-title { font-size: 15px; }
  .scen-desc { font-size: 12px; }
  .scen-body { width: 100%; }
  .scen-effects { gap: 20px; width: 100%; flex-wrap: wrap; }
  .scen-effects > div { min-width: 0; }
  .scen-effect-label { font-size: 10px; }
  .scen-effect-val { font-size: 13px; white-space: normal; }

  /* ── MODAL ── */
  .modal { padding: 26px 22px 22px; margin: 0 14px; max-width: calc(100% - 28px); }
  .modal-term { font-size: 18px; }
  .modal-def { font-size: 13px; }
}

/* schermi molto piccoli */
/* computer e iPad orizzontale: titolo e primo certificato più in basso,
   così la card spunta dal fondo e invita a scorrere */
@media (min-width:1025px) and (orientation:landscape) and (hover:hover) and (pointer:fine) {
  .home-hero { padding-top: calc(100px + var(--hs-top)); padding-bottom: calc(48px + var(--hs-bot)); }
  body { --hs-top: max(0px, calc(100vh / var(--z,1) * 0.14 - 100px)); --hs-bot: max(0px, calc(100vh / var(--z,1) * 0.11 - 48px)); --hs: calc(var(--hs-top) + var(--hs-bot)); }
}
@media (max-width:380px) {
  .home-hero-title { font-size: 28px; }
  .card-title { font-size: 16px; }
  .isin-btn, .card-btn { width: 100%; text-align: center; justify-content: center; display: flex; align-items: center; }
  .kpi-grid { grid-template-columns: 1fr !important; }
}

/* ════════════════════════════
   STAMPA — versione pulita della scheda certificato
════════════════════════════ */
@media print {
  /* margini di pagina e dimensione testo adatta alla carta */
  @page { margin: 1.5cm; }
  body { font-size: 13px; }

  /* reset difensivo: nessun bordo/contorno residuo su elementi di layout */
  html, body, #pageCert { border: none !important; outline: none !important; overflow-x: hidden !important; box-shadow: none !important; }

  /* la pagina di stampa rientra nel breakpoint mobile per larghezza: forziamo qui il layout desktop */
  .kpi-grid { grid-template-columns: repeat(3,1fr) !important; }

  /* forza la stampa di sfondi e gradienti colorati (disattivata di default nei browser) */
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; color-adjust: exact !important; }

  /* nascondi tutto tranne la pagina certificato aperta (le altre pagine sono già display:none) */
  .header, footer, .cert-print-wrap { display: none !important; }
  .page.active#pageCert { display: block !important; }

  /* hero: sfondo blu diventa bianco con testo scuro e bordo, niente animazioni/ombre */
  .cert-hero {
    background: #fff !important; padding: 0 0 16px !important;
    border-bottom: 2px solid var(--ink); overflow: visible;
  }
  .cert-hero::after, .cert-hero::before { display: none !important; }
  .cert-anim { opacity: 1 !important; transform: none !important; animation: none !important; }
  .cert-tema-badge { color: var(--ink3) !important; }
  .cert-h1 { color: var(--ink) !important; font-size: 26px !important; }
  .cert-hero-logo { box-shadow: none !important; border: 1px solid var(--border) !important; width: 64px !important; height: 64px !important; }

  /* corpo: niente ombre, bordi sottili al posto delle card elevate, più compatto */
  .cert-body { max-width: 100%; padding: 16px 0 0 !important; }
  .cert-section { margin-bottom: 22px !important; page-break-inside: avoid; }
  .cert-section h3 { font-size: 16px !important; margin-bottom: 14px !important; page-break-after: avoid; }
  .kpi-card, .scen-card, .step, .cert-timeline-card, .cedola-chart, .cert-disclaimer-box, .sott-card {
    box-shadow: none !important; border: 1px solid var(--border) !important;
    background: #fff !important; break-inside: avoid;
  }
  .kpi-card { border-left: 3px solid var(--border) !important; padding: 12px 14px !important; }
  .kpi-val { font-size: 17px !important; }
  .p-hint { display: none !important; }
  .isin-btn, .card-btn, .form-submit, .cert-back { display: none !important; }

  /* colori informativi (stato cedola, scenari, grafico cedole) restano leggibili — non azzerati come le altre card */
  .stato-big.green, .stato-big.amber, .stato-big.red,
  .bar-fill, .bar-fill.amber, .bar-fill.red, .bar-fill.green {
    box-shadow: none !important;
  }
  .scen-icon-lg { border: 1px solid rgba(0,0,0,0.15) !important; }

  /* cerchi "Data di osservazione/pagamento" e numeri "Come funziona": fallback pieno anche se lo sfondo non stampa */
  .timeline-dot {
    background: var(--blue) !important; box-shadow: none !important;
    border: 1px solid var(--blue) !important;
  }
  .step-num {
    background: var(--blue) !important; box-shadow: none !important;
    border: 1px solid var(--blue) !important; color: #fff !important;
    width: 32px !important; height: 32px !important;
  }
  .step-num svg { color: #fff !important; stroke: #fff !important; width: 15px !important; height: 15px !important; }
  .step:not(:last-child)::after { background: var(--border) !important; }
  .step { padding: 12px 0 !important; margin: 0 !important; }
  .step:hover { background: none !important; }

  /* nessun URL visibile di default sui link, tranne dove esplicitamente utile (sotto) */
  a[href]::after { content: none !important; }

  /* rende visibile l'URL sotto i link cliccabili (inutili su carta senza indirizzo) */
  .kpi-sub a[href]::after,
  #certIsinHero[href]::after {
    content: " (" attr(href) ")";
    font-size: 8px; color: var(--ink3); word-break: break-all;
  }

  /* evita che titoli restino soli in fondo pagina */
  h3, h4 { page-break-after: avoid; }

  /* nota finale generata per il documento stampato */
  #pageCert::after {
    content: "Generato da CertFolio — solo a scopo informativo, non costituisce consulenza finanziaria.";
    display: block; margin-top: 24px; padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 9px; color: var(--ink3); text-align: center;
  }
}
