/* CNSBII · 388A | Compattazione controllata dell'intestazione pubblica.
   Soli elementi del header canonico. Nessun menu o URL modificato. */
html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns384a-lang {
  grid-area:lang !important;
  position:relative !important;
  z-index:10030 !important;
  justify-self:end !important;
  min-width:0 !important;
  width:auto !important;
}
html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns384a-lang-menu > summary {
  box-sizing:border-box !important;
  width:54px !important;
  min-width:54px !important;
  min-height:44px !important;
  padding:7px 5px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:3px !important;
  border:1px solid #839aaa !important;
  background:#fff !important;
  color:#102d40 !important;
  font-size:12px !important;
  line-height:1.1 !important;
  cursor:pointer !important;
}
html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns384a-lang-menu > summary span:not(.cns384a-caret) {display:none !important}
html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns384a-lang-menu > summary strong {font-size:11px !important;line-height:1 !important}
html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns384a-lang-panel {z-index:10050 !important}

/* Desktop: marchio | UE | navigazione | lingue | accessi, tutti nella stessa barra. */
@media (min-width:1041px) {
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-head-main {
    grid-template-columns:minmax(200px,270px) minmax(70px,112px) minmax(0,1fr) 54px minmax(104px,126px) !important;
    grid-template-areas:"brand eu nav lang access" !important;
    column-gap:8px !important;
    row-gap:0 !important;
  }
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns130d-eu-primary {max-width:112px !important}
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-idra-access {min-width:0 !important;max-width:126px !important}
}
@media (min-width:1041px) and (max-width:1280px) {
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-head-main {
    grid-template-columns:minmax(185px,220px) 68px minmax(0,1fr) 48px 104px !important;
    column-gap:6px !important;
  }
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns384a-lang-menu > summary {width:48px !important;min-width:48px !important}
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-idra-access {max-width:104px !important}
}

/* Tablet: mantenere il drawer esistente e tutti i controlli sulla stessa riga. */
@media (min-width:701px) and (max-width:1040px) {
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-head-main {
    min-height:68px !important;
    grid-template-columns:minmax(0,1fr) 40px 48px 48px 48px !important;
    grid-template-areas:"brand eu lang access menu" !important;
    column-gap:8px !important;
    row-gap:0 !important;
    padding-block:7px !important;
  }
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns384a-lang-menu > summary {width:48px !important;min-width:48px !important}
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-menu-toggle {
    grid-area:menu !important;width:48px !important;min-width:48px !important;max-width:48px !important;
    min-height:46px !important;padding-inline:7px !important;
  }
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-idra-access {
    width:48px !important;min-width:48px !important;max-width:48px !important;
    min-height:46px !important;padding:4px !important;
  }
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-idra-access span {display:none !important}
}

/* Smartphone: CNSBII | globo | accessi | menu. La bandiera UE resta nel menu. */
@media (max-width:700px) {
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-head-main {
    min-height:62px !important;
    grid-template-columns:minmax(0,1fr) 44px 44px 46px !important;
    grid-template-areas:"brand lang access menu" !important;
    column-gap:4px !important;
    row-gap:0 !important;
    align-items:center !important;
    padding-block:8px !important;
  }
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-brand {min-width:0 !important;gap:6px !important}
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-brand-text {min-width:0 !important}
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-brand-text strong {font-size:clamp(18px,5vw,22px) !important;white-space:nowrap !important}
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-brand-text em {display:none !important}
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns130d-eu-primary {display:none !important}
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns384a-lang {justify-self:stretch !important;width:44px !important}
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns384a-lang-menu > summary {
    width:44px !important;min-width:44px !important;height:44px !important;
    padding:5px 2px !important;gap:2px !important;
  }
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns384a-lang-menu > summary svg {width:17px !important;height:17px !important}
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns384a-lang-menu > summary strong {font-size:10px !important}
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns384a-lang-menu > summary .cns384a-caret {font-size:9px !important}
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-idra-access {
    grid-area:access !important;
    width:44px !important;min-width:44px !important;max-width:44px !important;
    height:44px !important;min-height:44px !important;
    display:flex !important;align-items:center !important;justify-content:center !important;
    padding:4px !important;gap:0 !important;
  }
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-idra-access img {width:27px !important;height:27px !important;flex-basis:27px !important}
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-idra-access span {display:none !important}
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-menu-toggle {
    grid-area:menu !important;width:46px !important;min-width:46px !important;
    height:44px !important;min-height:44px !important;
    padding-inline:8px !important;
  }
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns384a-lang-panel {
    position:fixed !important;
    left:12px !important;right:12px !important;top:76px !important;
    width:auto !important;max-width:none !important;
    max-height:min(70dvh,520px) !important;
    overflow-y:auto !important;
  }
}
@media (max-width:375px) {
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-head-main {
    grid-template-columns:minmax(0,1fr) 42px 42px 44px !important;
    column-gap:3px !important;
  }
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-brand-mark {width:38px !important;height:38px !important;flex-basis:38px !important}
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-brand-logo {width:33px !important;height:33px !important}
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-brand-text strong {font-size:18px !important}
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns384a-lang {width:42px !important}
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns384a-lang-menu > summary {width:42px !important;min-width:42px !important}
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-idra-access {width:42px !important;min-width:42px !important;max-width:42px !important}
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-menu-toggle {width:44px !important;min-width:44px !important}
}
@media (prefers-reduced-motion:reduce) {
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns384a-lang-panel {scroll-behavior:auto !important}
}


/* CNSBII 388B — eliminazione collisioni e riduzione ingombri.
   Prevale sul layout 388A senza cambiare menu, URL o logica JS. */
html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-brand,
html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-brand-text {
  min-width:0 !important; max-width:100% !important;
}
html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-brand-text em {
  display:block !important; box-sizing:border-box !important;
  max-width:min(100%,245px) !important;
  white-space:normal !important; overflow-wrap:normal !important;
  font-size:8px !important;line-height:1.32 !important;
}
html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns384a-lang-menu > summary {
  flex-wrap:nowrap !important; white-space:nowrap !important; writing-mode:horizontal-tb !important;
  overflow:visible !important; gap:4px !important;
}
html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns384a-lang-menu > summary strong {
  display:inline-block !important; white-space:nowrap !important; overflow-wrap:normal !important;
  word-break:normal !important; flex-shrink:0 !important; writing-mode:horizontal-tb !important;
  font-size:11px !important; line-height:1 !important;
}
html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns384a-lang-menu > summary svg {flex:0 0 16px !important;width:16px !important;height:16px !important}
html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns384a-lang-menu > summary .cns384a-caret {display:none !important}
@media(min-width:1501px){
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-head-main {
    grid-template-columns:minmax(310px,350px) minmax(100px,130px) minmax(0,1fr) 62px 130px !important;
    grid-template-areas:"brand eu nav lang access" !important;column-gap:clamp(9px,1vw,18px) !important;
  }
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns130d-eu-primary {max-width:130px !important}
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns384a-lang-menu > summary {width:62px !important;min-width:62px !important}
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-idra-access {max-width:130px !important}
}
@media(min-width:1281px) and (max-width:1500px){
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-head-main {
    grid-template-columns:minmax(275px,300px) minmax(90px,108px) minmax(0,1fr) 60px minmax(108px,120px) !important;
    grid-template-areas:"brand eu nav lang access" !important;column-gap:8px !important;
  }
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns384a-lang-menu > summary {width:60px !important;min-width:60px !important}
}
@media(min-width:1041px) and (max-width:1280px){
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-head-main {
    grid-template-columns:minmax(215px,245px) 56px minmax(0,1fr) 53px 104px !important;
    grid-template-areas:"brand eu nav lang access" !important;column-gap:6px !important;
  }
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns130d-eu-primary {
    width:56px !important;max-width:56px !important;min-width:56px !important;justify-content:center !important;padding-inline:4px !important;
  }
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns130d-eu-primary span {position:absolute !important;width:1px !important;height:1px !important;overflow:hidden !important;clip:rect(0 0 0 0) !important;white-space:nowrap !important}
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns384a-lang-menu > summary {width:53px !important;min-width:53px !important}
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-brand-text em {font-size:7px !important;max-width:155px !important}
}
@media(min-width:701px) and (max-width:1040px){
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns384a-lang-menu > summary {width:48px !important;min-width:48px !important;gap:3px !important}
}
@media(max-width:700px){
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-head-main {min-height:58px !important;padding-block:6px !important}
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-brand-mark {width:42px !important;height:42px !important;flex-basis:42px !important}
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-brand-logo {width:37px !important;height:37px !important}
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-brand-text strong {font-size:clamp(17px,5vw,21px) !important}
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns384a-lang-menu > summary {gap:2px !important}
}
/* Evitare titoli UE tagliati: due righe leggibili quando il testo è visibile. */
@media(min-width:1281px){
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns130d-eu-primary strong {
    white-space:normal !important; overflow:visible !important; text-overflow:clip !important;
    line-height:1.18 !important; font-size:9px !important;
  }
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns130d-eu-primary small {display:none !important}
}
/* Su smartphone il descrittore lungo resta accessibile nelle altre pagine,
   ma non appesantisce l'intestazione: mantiene esattamente la riga compatta. */
@media(max-width:700px){
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-brand-text em {display:none !important}
}

/* 388C · Sottotitolo del marchio. Denominazione ufficiale invariata altrove. */
html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-brand-text em {
  font-style:normal !important;
  text-transform:uppercase !important;
  max-width:100% !important;
  white-space:normal !important;
  overflow-wrap:normal !important;
  word-break:normal !important;
  hyphens:none !important;
}
@media (max-width:700px) {
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-brand-text {
    display:flex !important; flex-direction:column !important; justify-content:center !important;
  }
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-brand-text em {
    display:block !important;
    visibility:visible !important;
    font-size:clamp(8px,2.35vw,9.5px) !important;
    line-height:1.25 !important;
    letter-spacing:0 !important;
    margin-top:2px !important;
  }
}

/* CNSBII 181J | Visual QA 20-10-2026.
   Menu compatto: testo leggibile dagli screen reader, icona centrata.
   Non cambiano drawer, keyboard flow, routing o attributi aria-expanded. */
@media (max-width:1040px) {
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-menu-toggle {
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:0 !important;
    flex-wrap:nowrap !important;
    overflow:hidden !important;
    box-sizing:border-box !important;
    white-space:nowrap !important;
    writing-mode:horizontal-tb !important;
  }
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-menu-toggle-label {
    position:absolute !important;
    width:1px !important;
    height:1px !important;
    margin:-1px !important;
    padding:0 !important;
    border:0 !important;
    overflow:hidden !important;
    clip-path:inset(50%) !important;
    white-space:nowrap !important;
  }
  html body.cnsbii-lumen-ui.cns-shell-contract-132b header.cns-shell.cns-shell--87y1-locked .cns-menu-toggle i {
    display:block !important;
    flex:0 0 24px !important;
    width:24px !important;
    min-width:24px !important;
    height:3px !important;
    margin:0 auto !important;
  }
}
