.container,
.section,
.inner-section{
  display:block;
}
.inner-section{
  height: auto;
}
.component-inner-wrapper{
  width: 100%;
}
:root{
  --link-font-size: 11px;
  --icon-size: 13px;
  --bg-darker: #0052a3;
  --bg-lighter: #0066CC;
}

/* HEADER */
header{
  display:flex;
  flex-direction: column;
}
header .header-row{
  flex:1;
  display: flex;
  align-items: center;
  padding: 12px 24px;
}
header .header-row > a:first-child img,
header .header-row > img:first-child{
  max-width: var(--img-width, 200px);
  height: auto;
}
header .header-row .ty19{
  display: flex;
  align-self: stretch;
  margin: 0;
}
header .header-row .ty13{
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-wrap: anywhere;
}
header .header-tools{
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 0 0 auto;
  margin-left: auto;
}
header .header-tools .lang-selector-btn,
header .header-tools .header-login-btn{
    padding: 6px 12px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 3px;
    transition: background 0.3s ease;
  }
header .header-tools .lang-selector-btn:hover,
header .header-tools .header-login-btn:hover{
  background: rgba(255, 255, 255, 0.14);
  transition: background 0.3s ease;
}
.legR{
  position:absolute;
  top:0!important;
  bottom:0!important;
  left:0!important;
  z-index: 999!important;
}

.legR{display:none;}

header .header-title{
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}
header .header-title ~ br{
  display:none;
}
header .header-subtitle{
  font-size: 11px;
  font-weight: 400;
  color:rgba(255, 255, 255, 0.72);
}
.vertical-divider{
  display: block;
  width: 1px;
  height: 100%;
  background:rgba(255, 255, 255, 0.28);
}
header .vertical-divider{
  margin-left:24px;
  margin-right: 24px;
}

header .header-login-box{
  position:relative;
}
header .header-login-box .header-login-dropdown{
  position:absolute;
  top:100%;
  padding:0;
  padding-top:5px;
  right: 0;
  width: max-content;
  margin: 0;
  list-style: none;
  font: normal 1em TitilliumWebRegular;
  z-index: 999;
  display:none;
}
header .header-login-box.is-open .header-login-dropdown,
header .header-login-box:hover .header-login-dropdown{
  display: block;
}
header .header-login-dropdown .header-login-item a {
  background: var(--bg-darker);
  color: #FFFFFF;
  font-size: var(--link-font-size);
  font-weight: 600;
  padding: 5px 10px;
  box-sizing: border-box;
  border: 1px solid #FFFFFF;
  display: flex;
  align-items: center;
  gap: 5px;
}
header .header-login-dropdown .header-login-item a:hover {
  background: var(--bg-lighter);
}
header .header-login-dropdown .header-login-item a img{
  width: var(--icon-size);
  height: var(--icon-size);
}
header .lang-selector-wrapper a,
header .header-login-btn{
  display: flex;
  align-items: center;
  color: rgba(255, 255, 255, 1);
  gap: 5px;
  font-size: var(--link-font-size);
  font-weight: 600;
}
header .lang-selector-wrapper a img,
header .header-login-btn img{
  width: var(--icon-size);
  height: var(--icon-size);
}

/* Menù principale */
header .header-row.header-nav{
  background: var(--bg-darker);
  padding:0 24px;
  justify-content: space-between;
}
nav.main-menu .menu{
  display:flex;
  align-items: center;
  font-size: var(--link-font-size);
}
nav.main-menu .menu .menu-item.main-level{
  border-bottom: 3px solid transparent;
  padding: 12px 0;
  transition: border 0.3s ease;
}
nav.main-menu .menu .menu-item.main-level:not(.has-submenu):hover,
nav.main-menu .menu .menu-item.main-level.is-active{
  border-bottom: 3px solid #ffffff;
  transition: border 0.3s ease;
}
nav.main-menu .menu > .menu-item .menu-link{
  display:flex;
  align-items: center;
  gap: 5px;
}
nav.main-menu .menu > .menu-item.has-submenu .submenu .menu-link {
  background: var(--bg-darker);
}
nav.main-menu .menu > .menu-item.has-submenu .submenu .menu-link:hover {
  background: var(--bg-lighter);
}
nav.main-menu .menu .menu-item.main-level > .menu-link:hover,
nav.main-menu .menu .menu-item.main-level > .menu-link.selected{
  background: transparent;
}
nav.main-menu .menu .menu-item .menu-link img{
  width: var(--icon-size);
  height: var(--icon-size);
}
nav.main-menu .menu > .menu-item.is-repository{
  order: 999;
}
header .header-row.header-nav .hp-body-drawer-trigger-container .hp-body-drawer-trigger{
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 3px;
  padding: 6px;
  background: #FFFFFF;
  border: 1px solid #BEB6BA;
  color: var(--bg-darker);
}
header .header-row.header-nav .hp-body-drawer-trigger-container .hp-body-drawer-trigger img{
  min-width: 14px;
  min-height: 14px;
  width: 14px;
  height: 14px;
  filter: brightness(0) saturate(100%) invert(20%) sepia(96%) saturate(1845%) hue-rotate(194deg) brightness(91%) contrast(102%);
}

@media screen and (min-width: 992px) and (max-width: 1223.98px){
  header .header-tools{
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
  }
  header .header-row.header-nav .hp-body-drawer-trigger-container .hp-body-drawer-trigger span{
    display: none;
  }
}

/* FOOTER */
.privacy{
  display:none;
}
.component-inner-wrapper:has(>footer){
  position:static;
}
footer{
  display: flex;
  flex-direction: column;
}
footer .footer-row{
  flex: 1;
  display: flex;
  padding: 12px 24px;
}
footer .footer-main{
  padding:15px 24px;
  justify-content: space-between;
  align-items: flex-start;
  background: var(--bg-darker);
}
footer .footer-title{
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 1);
}
footer .footer-subtitle{
  font-size: 11px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.78);
}
footer .footer-disclaimer{
  font-size: 11px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.58);
}
footer .footer-text{
  display: flex;
  flex-direction: column;
  gap: 4px;
}
footer .footer-menus{
  /*display: flex;*/
  /*gap: 32px;*/
  /*flex: 0 0 auto;*/
}
footer .footer-menu ul{
  list-style: none;
  margin: 0;
  padding: 0;
  column-count: 3;
  column-gap: 32px;
  line-height: 100%;
  font-family: TitilliumWebRegular, sans-serif;
}
footer .footer-menu ul li{
  display: block;
  border-bottom: 1px solid #fff;
  padding-bottom:2px;
  margin-bottom: 12px;
}
footer .footer-menu ul li a{
  color: #fff;
  font-size: var(--link-font-size);
  font-weight: 400;
  text-decoration: none;
  transition: color 0.3s ease;
  text-transform: uppercase;
}
footer .footer-menu ul li a:hover{
  color: #ffffff;
}
footer .footer-stats{
  padding: 12px 24px;
  background: var(--bg-lighter);
  justify-content: flex-end;
}
footer .footer-stats p{
  font-size: var(--link-font-size);
  color: #fff;
}
footer .footer-stats .separator{
  align-self: stretch;
  display: flex;
}
footer .footer-stats .separator .vertical-divider{
  background: #fff;
  margin: 0 32px;
}

/* ── Map pages: neutralize table, flex 100dvh ──────── */

.map-container{
  display: flex;
  flex-direction: column;
  height: 100dvh;
}

/* Footer → shrink-0, static (override C11 position:fixed) */
.map-container > .section:last-child {
  flex: 0 0 auto;
}
.map-container > .component-inner-wrapper,
.map-container > .section:last-child > .component-inner-wrapper,
.map-container > .section:last-child .component-inner-wrapper {
  position: static;
  height: auto;
  flex: 0 0 auto;
  border: none;
  display: block;
}

/* Map row → flex grow */
.map-container .map-row {
  flex: 1 1 0;
  min-height: 0;
  position:relative;
  
}
.map-container #GEOmap {
  width: 100%;
  height: 100%;
  border:none;
}

/* Legenda reti → left shoulder */
.map-container .map-row .legR{
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  display: block;
  overflow-y: auto;
  z-index: 1000;
}

/* Body text HP */
.map-container .map-panel + .hp-body-drawer{
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  transform: translateX(100%);
  z-index: 1001;
  overflow-y: auto;
  background: #fff;
  padding:12px;
}
.map-container .map-panel + .hp-body-drawer a{
  color: var(--bg-darker);
}
.map-container .map-panel + .hp-body-drawer.is-open{
  transform: translateX(0);
  box-shadow: -2px 0 8px rgba(0,0,0,.15);
}

/* Body overflow on map pages */
body.map-page {
  overflow: hidden;
}
.map-container > .map-header{
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}
.map-container .map-row{
  flex: 1 1 100%;
}
.map-container .map-row .map-col,
.map-container .map-row .map-col .map-outer-wrapper,
.map-container .map-row .map-col .map-outer-wrapper .map-inner-wrapper,
.map-container .map-row .map-col .map-outer-wrapper .map-inner-wrapper .map-wrapper,
.map-container .map-row .map-col .map-outer-wrapper .map-inner-wrapper .map-wrapper .map-frame,
.map-container .map-row .map-col .map-outer-wrapper .map-inner-wrapper .map-panel{
  height: 100%;
  display: block;
  width: 100%;
}
/* Right panel interactive map, param selector Interactive */
.options-panel .options-panel-item:hover,
.options-panel .options-panel-item.dMsel{
  background: var(--bg-darker);
}
.map-container .map-row #oP{
  top: 0!important;
  right: 0;
  z-index: 900;
}
.map-container .map-row #oS{
  top: 100%;
  transform: translateY(-100%);
  right: 0;
  z-index: 900;
}
.map-container .map-row #maptitle{
  top:0;
  left:50%;
  transform:translateX(-50%);
  z-index: 900;
  background: var(--bg-darker);
}
.map-container .map-row #maphelp1{
  left: 50px;
  bottom: 12px;
}

/* Left panel HP network toggler */
.legR ul li img,
.leaflet-container .leaflet-marker-pane img{
  width: var(--icon-size)!important;
  height: var(--icon-size)!important;
}
.leaflet-container .leaflet-marker-pane .maplabels{
  background: var(--bg-darker);
}
.legR li{
  display: flex;
  align-items: center;
  gap: 8px;
}
.legR li:hover{
  background: var(--bg-darker);
}
.legR li img{
  margin:0;
}
.legR li input[type="checkbox"]{
  accent-color: #1B6480;
}
.legR li .legCount{
  margin-left: auto;
}
.legR h4.legT{
  margin: 6px 0 2px;
  padding: 2px 4px;
  font-size: 9pt;
  font-weight: 700;
  color: #505050;
  text-transform: uppercase;
}
.legR h4.legT + ul{
  margin-bottom: 8px;
}
.leaflet-container .leaflet-popup-pane .leaflet-popup-content-wrapper{
  padding:44px 17px 14px;
  min-width: 225px;
}
.leaflet-container .leaflet-popup-pane .leaflet-popup-content{
  margin:0;
  min-width: 100%;
}
.leaflet-container .leaflet-popup-pane .leaflet-popup-content .infohome .popup-network{
  margin:0;
  font-size: 11px;
  font-weight: 600;
  color:var(--bg-darker);
  text-transform: uppercase;
}
.leaflet-container .leaflet-popup-pane .leaflet-popup-content .infohome .popup-station{
  margin:0;
  font-size: 18px;
  font-weight: 600;
  color:#1B1719;
}
.leaflet-container .leaflet-popup-pane .leaflet-popup-content .popup-ctas{
  margin-top: 16px;
  display:flex;
  flex-direction: column;
  gap: 16px;
}
.leaflet-container .leaflet-popup-pane .leaflet-popup-content .popup-ctas a {
  display:flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: var(--bg-darker);
  padding: 11px 0;
  border-radius: 3px;
  text-align: center;
  color:#fff;
}
.leaflet-container .leaflet-popup-pane .leaflet-popup-content .popup-ctas a img{
  width: 16px;
  height: 16px;
}
.leaflet-container .leaflet-popup-pane .leaflet-popup-close-button{
  top: 14px;
  right: 14px;
  width: 10px;
  height: 10px;
}
.leaflet-container .leaflet-popup-pane .leaflet-popup-content .infowin{
  width: 100%;
}
.leaflet-container .leaflet-popup-pane .leaflet-popup-content .infowin caption{
  background: var(--bg-darker);
  border-radius: 3px;
}
.leaflet-container .leaflet-popup-pane .leaflet-popup-content .infowin .infolink{
  border-radius: 3px;
}
.leaflet-container .leaflet-popup-pane .leaflet-popup-content .infowin .infolink:hover{
  background: var(--bg-darker);
}

/*#mS .dMsel{*/
/*  background: var(--bg-darker);*/
/*}*/
.staz h1{
  color: var(--bg-darker);
}
.staz button{
  background: var(--bg-darker);
}

/* Stations Page */
.station-container{
  font-family: TitilliumWebRegular;
}

.station-container .station-header{
  display:flex;
  justify-content: space-between;
  padding:16px 24px;
}
.station-container .station-header .station-title-wrapper{

}
.station-container .station-header .station-title-wrapper .station-title{
  display: flex;
  align-items: baseline;
  gap:10px;
}
.station-container .station-header .station-title-wrapper .station-title h1{
  font-size: 12px;
  font-weight: 600;
  color: #7A7175;
  margin: 0;
  line-height: 1;
}
.station-container .station-header .station-title-wrapper .station-title h1 .station-name{
  font-size: 22px;
  color: #1B1719;
  margin-left: 4px;
  margin-right: 4px;
}
.network-badge{
  display:inline-block;
  background: color-mix(in srgb, var(--network-badge-color, transparent) 15%, transparent);
  border: 1px solid var(--network-badge-color, #BEB6BA);
  padding:10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--network-badge-color, #7A7175);
  line-height: normal;
}
.network-badge.network-badge-sm{
  padding: 2px 8px;
  font-size: 10px;
  margin-left: 6px;
}
.station-container .station-header .station-title-wrapper .station-title .network-status{
  display:flex;
  align-items: center;
  gap: 8px;
  
}
.station-container .station-header .station-title-wrapper .station-title .network-status .status-text{
  font-size: 11px;
  font-weight: 600;
  color: #7A7175;
}
.status-icon{
  width: 8px;
  height: 8px;
  min-width: 8px;
  min-height: 8px;
  border-radius: 100%;
  display:block;
}
.status-icon.status-on{
  background:#1F6B45;
}
.status-icon.status-off{
  background:#4C1A2B;
}
.station-container .station-header .station-title-wrapper .station-network{
  color:var(--bg-darker);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  margin:0;
}
.station-container .station-header .station-title-wrapper .station-description{
  color:#7A7175;
  font-size: 15px;
  font-weight: 400;
}

.station-container .station-header .station-infos{
  display:flex;
  gap:24px;
}
.station-container .station-header .station-infos .station-coords{

}
.station-container .station-header .station-infos .station-coords button{
  display:flex;
  flex-direction: column;
  background:transparent;
  border:none;
  color: #154E66;
  font-size: 15px;
  margin:0;
  padding:0;
  gap: 10px;
}
.station-container .station-header .station-infos .station-coords .coord-label{
  padding-left: 5px;
  font-size: var(--link-font-size);
  color:#9B9297;
  text-transform: uppercase;
}
.station-container .station-header .station-infos .station-ctas{
  display: flex;
  gap: 8px;
}
.station-container .station-header .station-infos .station-ctas summary::-webkit-details-marker,
.station-container .station-header .station-infos .station-ctas summary::marker{
  content: none;
  display: none;
}
.station-container .station-header .station-infos .station-ctas details{
  position: relative;
  height: fit-content;
}
.station-container .station-header .station-infos .station-ctas summary{
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--bg-darker);
  font-size: var(--link-font-size);
  text-transform: uppercase;
  padding:8px 12px;
  border: 1px solid #BEB6BA;
  border-radius: 3px;
  line-height: normal;
}
.station-container .station-header .station-infos .station-ctas ul{
  position:absolute;
  top:100%;
  left:0;
  right: 0;
  padding:8px 12px;
  margin:0;
  max-height: 200px;
  overflow-x: auto;
  display:flex;
  flex-direction: column;
  gap:5px;
  border: 1px solid #BEB6BA;
  border-top:0;
}
.station-container .station-header .station-infos .station-ctas ul li{
  display:flex;
  line-height: 1.1;
  cursor: pointer;
  font-size: var(--link-font-size);
}


.station-container .station-content{
  display: flex;
  border-top: 1px solid #DAD4D7;
}
.station-container .station-content .station-list-wrapper{
  border-right: 1px solid #DAD4D7;
  flex: 0 0 12.5%;
  min-width: 180px;
}
.list-title#mSoff{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding: 10px 16px;
  background: #EAE6E8;
  border-top: 2px solid var(--bg-darker);
  width: auto!important;
  margin: 0!important;
}
.station-list-wrapper .list-title#mSoff{
  margin-right: 18px!important;
}
.list-title#mSoff h3{
  margin:0;
  font-size: 12px;
  font-weight: 700;
  color:#1B1719;
  text-align: left;
}
.list-title#mSoff .list-title-close{
  width: 14px;
  height: 14px;
  margin: 0;
  cursor: pointer;
  flex: 0 0 auto;
  filter: brightness(0) saturate(100%) invert(20%) sepia(96%) saturate(1845%) hue-rotate(194deg) brightness(91%) contrast(102%);
}
.station-container .station-content .station-list-wrapper .list-search{
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 0 10px 16px;
  margin-right: 18px;
}
.station-container .station-content .station-list-wrapper .list-search:has(input:focus-visible){
  outline:-webkit-focus-ring-color auto 1px;
}
.station-container .station-content .station-list-wrapper .list-search img{
  width: 14px;
  height: 14px;
}
.station-container .station-content .station-list-wrapper .list-search input{
  border:none;
  background:transparent;
  min-width: 0;
}
.station-container .station-content .station-list-wrapper .list-search input:focus-visible{
  outline:none;
}

.station-container .station-content .station-list-wrapper .list-inner-wrapper{
  margin-top:-1px;
}
.station-container .station-content .station-list-wrapper .list-inner-wrapper ul{
  list-style: none;
  padding:0;
  margin:0;
  padding-right: 18px;
}

.station-container .station-content .station-list-wrapper .list-inner-wrapper ul li .station-link{
  margin:0;
  padding:8px 16px;
  border:0;
  width: 100%;
  background: transparent;
  color:#453E42;
  font-size: 12px;
  font-weight: 400;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap:8px;
  position:relative;
}
.station-container .station-content .station-list-wrapper .list-inner-wrapper ul li .station-link{
  white-space: break-spaces;
  text-align: left;
}
.station-container .station-content .station-list-wrapper .list-inner-wrapper ul li .station-link.dMsel,
.station-container .station-content .station-list-wrapper .list-inner-wrapper ul li .station-link:hover{
  background: color-mix(in srgb, var(--bg-darker) 5%, transparent);
  font-weight: 700;
}

.station-container .station-content .station-list-wrapper .list-inner-wrapper ul li .station-link::before{
  content:"";
  position:absolute;
  top:0;
  left:0;
  width: 100%;
  height: 100%;
  border-left: 3px solid transparent;
}
.station-container .station-content .station-list-wrapper .list-inner-wrapper ul li .station-link.dMsel::before,
.station-container .station-content .station-list-wrapper .list-inner-wrapper ul li .station-link:hover::before{
  border-left: 3px solid var(--bg-darker);
}
.station-container .station-content .station-list-wrapper .list-inner-wrapper ul li .station-link::after{
  content:"";
  position:absolute;
  top:0;
  left:0;
  width: 100%;
  height: 100%;
  border-bottom: 1px solid transparent;
  background:
      linear-gradient(
          to right,
          transparent 0%,
          transparent 33%,
          #EAE6E8 33%,
          #EAE6E8 100%
      ) bottom / 100% 1px no-repeat;
}
.station-container .station-content .station-list-wrapper .list-inner-wrapper ul li:last-child .station-link::after{
  background:none;
}
.station-container .station-content .station-list-wrapper .list-inner-wrapper ul li .station-link.dMsel::after,
.station-container .station-content .station-list-wrapper .list-inner-wrapper ul li .station-link:hover::after{
  background:
      linear-gradient(
          to right,
          var(--bg-darker) 0%,
          var(--bg-darker) 33%,
          #EAE6E8 33%,
          #EAE6E8 100%
      ) bottom / 100% 1px no-repeat;
}
.station-container .station-content .station-list-wrapper .list-inner-wrapper ul li.station-no-results{
  padding: 8px 16px;
  font-size: 12px;
  color: #453E42;
  font-style: italic;
  line-height: normal;
}
.station-container .station-content .station-filter-wrapper{
  padding: 18px 20px;
  border-right: 1px solid #DAD4D7;
  flex: 0 1 20%;
  min-width: 260px;
}
.station-container .station-content .station-filter-wrapper .station-last-data-wrapper{
  padding-bottom: 18px;
  border-bottom: 1px solid #DAD4D7;
}
.station-container .station-content .station-filter-wrapper .station-last-data-wrapper .station-last-data-content{
  display:flex;
  flex-direction: column;
  gap:8px;
}
.station-container .station-content .station-filter-wrapper .station-last-data-wrapper .station-last-data-content .last-data-title{
  font-size: 11px;
  font-weight: 600;
  color:#7A7175;
  margin:0;
  text-align: left;
}
.station-container .station-content .station-filter-wrapper .station-last-data-wrapper .station-last-data-content .last-data-range{
  font-size:15px;
  font-weight: 400;
  color:#453E42;
}
.station-container .station-content .station-filter-wrapper .station-last-data-wrapper .station-last-data-content details{
  position: relative;
}
.station-container .station-content .station-filter-wrapper .station-last-data-wrapper .station-last-data-content details summary{
  display:flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size:11px;
  font-weight: 600;
  color: #fff;
  padding:8px;
  background:#1B6480;
  cursor: pointer;
  border-radius: 3px;
}
.station-container .station-content .station-filter-wrapper .station-last-data-wrapper .station-last-data-content details summary::marker{
  content:"";
}
.station-container .station-content .station-filter-wrapper .station-last-data-wrapper .station-last-data-content details summary img{
  width: 14px;
  height: 14px;
  filter: brightness(0) invert(1);
}
.station-container .station-content .station-filter-wrapper .station-last-data-wrapper .station-last-data-content details .last-data-table{
  position:absolute;
  top:100%;
  left: 0;
  width: 100%;
  line-height: normal;
  background: #fff;
  border-collapse: collapse;
  border: 1px solid #DAD4D7;
  margin-top:5px;
  z-index: 1;
}
.station-container .station-content .station-filter-wrapper .station-last-data-wrapper .station-last-data-content details .last-data-table caption{
  background:#fff;
}
.station-container .station-content .station-filter-wrapper .station-last-data-wrapper .station-last-data-content details .last-data-table td{
  border: 1px solid #DAD4D7;
  padding: 5px;
}
.station-container .station-content .station-filter-wrapper .station-last-data-wrapper .station-last-data-content details .last-data-table .last-data-value{
  white-space: nowrap;
  vertical-align: middle;
}
/* ── Shared form controls (stations + comparison) ───── */
.data-filter-time-range .range-selector-default{
  flex-wrap: wrap;
  text-align: center;
}
.data-filter-time-range h4{
  font-size: 12px;
  font-weight: 700;
  color: #1B1719;
  margin:0 0 12px;
}
.options-group-wrapper-outer{
  margin-bottom: 14px;
}
.options-group{
  border:none;
  padding:0;
  margin:0;
  min-width: 0;
}
.options-group .options-group-legend{
  font-size: 11px;
  font-weight: 600;
  color:#7A7175;
  line-height: normal;
}
.options-group .options-group-selector{
  display: flex;
  align-items: center;
  gap:3px;
  border-radius: 3px;
  border: 1px solid #DAD4D7;
  background: #F4F1F2;
  padding:3px;
  margin-bottom: 10px;
}
.options-group-wrapper-outer.data-filter-result-type .options-group .options-group-selector .option-group-item{
  flex: 1;
  text-align: center;
}
.options-group .options-group-selector .option-group-item{
  align-items: center;
  font-size: 11px;
  line-height: normal;
  position:relative;
  flex: 1 0 auto;
}
.options-group-wrapper-outer.data-filter-time-range .options-group .options-group-selector .option-group-item{
  flex: 1 1 20%;
}
.options-group .options-group-selector .option-group-item label{
  padding: 8px 16px;
  border-radius: 3px;
  display: block;
  color: #7A7175;
  cursor: pointer;
}
.options-group .options-group-selector .option-group-item input[type="radio"]{
  position: absolute;
  opacity: 0;
}
.options-group .options-group-selector .option-group-item input[type="radio"]:checked ~ label{
  background: var(--bg-darker);
  color: #fff;
}
.options-group .options-group-selector .option-group-item input[type="radio"]:disabled ~ label{
  cursor: not-allowed;
}
.data-filter-time-range .range-selector-custom{
  display:flex;
  flex-direction: column;
}
.data-filter-time-range .range-selector-custom > span{
  display: flex;
  align-items: center;
  gap: 8px;
}
.range-selector-custom .inpdate tr td{
  padding: 2px;
}
.range-selector-custom .inpdate #oraini,
.range-selector-custom .inpdate #orafin{
  margin:0 8px;
}
.data-filter-graph-type{
  padding: 10px 12px;
  background: #EAE6E8;
}
.data-filter-graph-type .options-group{
  display: flex;
  gap: 10px;
  flex-direction: column;
  line-height: normal;
}
.data-filter-graph-type .options-group legend{
  margin-bottom: 10px;
}

.data-params legend{
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 10px;
}
.data-params .data-params-item{
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.data-params input[type="radio"],
.data-params input[type="checkbox"],
.options-group input[type="radio"],
.options-group input[type="checkbox"]{
  accent-color: var(--bg-darker);
}
.data-params .data-params-item > span{
  display: block;
  line-height: normal;
  font-size: 12px;
  font-weight: 400;
  color: #453E42;
}
.data-params .data-params-item .param-color-bar{
  flex: 0 0 3px;
  width: 3px;
  border-radius: 2px;
  align-self: stretch;
  font-size: 0;
  line-height: normal;
  color: transparent;
}
.filter-cta-wrapper .mybutt,
.filter-download-wrapper-inner .download{
  background: var(--bg-darker);
  display:flex;
  align-items: center;
  width: 100%;
  gap:8px;
  font-size: 12px;
  font-weight: 600;
  justify-content: center;
  height: auto;
  padding: 12px;
  margin:0;
}
.filter-cta-wrapper .mybutt:hover,
.filter-download-wrapper-inner .download:hover{
  color: #fff;
  background: var(--bg-lighter);
}
.filter-cta-wrapper .mybutt img,
.filter-download-wrapper-inner .download img{
  width: 16px;
  height: 16px;
}

.filter-download-wrapper-inner {
  display:flex;
  align-items: center;
  width: 100%;
  flex-wrap: wrap;
  gap: 5px;
}
.filter-download-wrapper-inner .download {
  flex:1;
  margin: 8px 0 0;
  padding: 6px;
}
.filter-download-wrapper-inner .download img {
  filter: brightness(0) invert(1);
}
.station-container .station-content .station-data-wrapper{
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 18px;
}
.station-container .station-content .station-data-wrapper #output{
  display: block;
  width: 100% !important;
  max-width: none;
  margin-left: 0;
  box-sizing: border-box;
  margin-bottom: 0!important;
}

/* tabella dati stazione: scroll interno e header/caption sticky */
#TAwrap{
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: auto;
  background:#F3F3F3;
}
#DAT{
  margin: auto;
  max-width: fit-content;
  right: 0;
}
#DAT caption{
  position: sticky;
  top: 0;
  z-index: 3;
  height: 28px;
  box-sizing: border-box;
  background: var(--bg-darker);
}
#DAT thead td{
  position: sticky;
  top: 28px;
  z-index: 2;
  background: #DDDDDD;
  color: var(--bg-darker);
}
#_page:has(~ #DAT){
  display: none;
}
#messaggi:empty{
  display: none !important;
}
#messaggi{
  color: var(--bg-darker);
  margin:20px!important;
}

/* ── Comparison page (CONFRONTO STAZIONI) ───────────── */
#mS-0{
  padding: 8px 0;
  text-align: center;
  vertical-align: top;
  height: auto !important;
}
#mS-0 .mSon{
  margin: 4px;
  cursor: pointer;
}
#mS-0 .mSon:first-child{
  filter: brightness(0) saturate(100%) invert(20%) sepia(96%) saturate(1845%) hue-rotate(194deg) brightness(91%) contrast(102%);
  
}
#mS-1{
  width: min(360px, 30vw);
  min-width: 265px;
  max-width: min(360px, 30vw);
  max-height: calc(100vh - 160px);
  height: auto !important;
  overflow-y: auto;
  overflow-x: hidden;
  vertical-align: top;
  font-family: TitilliumWebRegular;
}
#mS-1 .comparison-body{
  padding: 16px 18px 24px;
}
#mS-1 #mSoff.list-title{
  margin: 0!important;
  width: 100%!important;
  box-sizing: border-box;
}
#mS-1 .confronto{
  margin: 0 0 16px;
  width: 100%;
}
#mS-1 .confronto caption{
  font-size: 11px;
  font-weight: 600;
  color: #7A7175;
  text-align: left;
  white-space: normal;
  padding-bottom: 6px;
}
#mS-1 .confronto td{
  white-space: normal;
  font-size: 12px;
  color: #453E42;
  padding: 3px 8px 3px 0;
}
#mS-1 .confronto td b{
  color: #1B1719;
}
#mS-1 .compare-hint{
  font-size: 11px;
  color: #7A7175;
  margin: 8px 0 0;
}
#mS-1 .compare-hint .compare-warning{
  color: #C0392B;
  font-weight: 600;
}
#mS-1 .compare-available{
  margin-bottom: 12px;
}
#mS-1 .compare-available .compare-available-row{
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: #453E42;
  padding: 3px 0;
  border-bottom: 1px solid #DAD4D7;
}
#mS-1 .compare-available .compare-available-row b{
  color: #1B1719;
  font-weight: 600;
}
/* neutralizza float legacy di #OK2 (A4I.css) */
#mS-1 .filter-cta-wrapper#OK2{
  float: none;
  margin: 0;
  width: 100%;
}
#mS-1 .filter-cta-wrapper#OK1{
  width: 100%;
}
/* quando ci sono i grafici (#area) la sidebar diventa assoluta,
   resta sopra i risultati e non ne ridimensiona il layout */
._t0:has(#mS-1):has(#area){
  position: relative;
}
._t0:has(#mS-1):has(#area) #mS-1{
  position: absolute;
  display: block;
  top: 0;
  left: 0;
  z-index: 990;
  border-left: none;
  box-shadow: 10px 0 18px rgba(27, 23, 25, .15);
  background:#F3F3F3;
}
/* l'area dei grafici si dimensiona sul contenuto (niente bianco da altezze legacy) */
._t0:has(#mS-1):has(#area) #area{ height: auto !important;}
/* trigger: con i grafici presenti resta SEMPRE nel flusso (mai display:none),
   cosi' l'apertura in overlay della sidebar non ridimensiona #area;
   quando la sidebar e' aperta lo ricopre (z-index 990 + background opaco) */
._t0:has(#area) #mS-0{
  display: table-cell !important;
}

/* ── News page: grid container & cards ──────── */
.news-body .news-header,
.news-body .news-grid{
  max-width: 75%;
}
@media screen and (max-width: 1223.98px){
  .news-body .news-header,
  .news-body .news-grid{
    max-width: 95%;
  }
}
.news-body .news-header{
  margin: 24px auto 13px;
}
.news-body .news-header .news-pre-title{
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--bg-darker);
}
.news-body .news-header .news-title{
  font-size: 28px;
  font-weight: 600;
  color: #1B1719;
  text-align: left;
  margin:0;
}
.news-body .news-grid{
  display: flex;
  flex-direction: column;
  gap:12px;
  margin:13px auto 0;
}
.news-body .news-grid .news-card-wrapper{
  width: 100%;
}
.news-body .news-grid .news-card-wrapper .news-card{
  display: flex;
  height: 100% !important;
  align-items: stretch;
  gap: 16px;
  background: #fff;
  padding: 17px 19px;
  border-radius: 5px;
  border: 1px solid #DAD4D7;
  margin-bottom:0!important;
}
.news-body .news-grid .news-card-wrapper .news-card > div{
  display: block;
  line-height: normal;
}
.news-body .news-grid .news-card-wrapper .news-card > div{
  flex: 0 0 15%;
}
.news-body .news-grid .news-card-wrapper .news-card > div > iframe,
.news-body .news-grid .news-card-wrapper .news-card > div > img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.news-body .news-grid .news-card-wrapper .news-card .news-card-content{
  display: flex;
  flex-direction: column;
  flex: 1;
}
.news-body .news-grid .news-card-wrapper .news-card .news-card-content .news-card-title-wrapper h3{
  text-align: left;
  font-size: 18px;
  font-weight: 600;
  color: #1B1719;
  margin:0 0 8px;
}
.news-body .news-grid .news-card-wrapper .news-card .news-card-content .news-card-title-wrapper h4{
  display:flex;
  gap: 6px;
}
.news-body .news-grid .news-card-wrapper .news-card .news-card-content .news-card-title-wrapper h4{
  margin:0 0 8px;
}
.news-body .news-grid .news-card-wrapper .news-card .news-card-content .news-card-title-wrapper h4 > span{
  color: var(--bg-darker);
  background: color-mix(in srgb, var(--bg-lighter, transparent) 7%, transparent);
  border-radius: 3px;
  border: 1px solid var(--bg-lighter);
  padding:2px 9px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}
.news-body .news-grid .news-card-wrapper .news-card .news-card-content a span,
.news-body .news-grid .news-card-wrapper .news-card .news-card-content a {
  color: var(--bg-darker)!important;
}
.news-body .news-grid .news-card-wrapper .news-card .news-card-content p{
  margin-bottom: 8px;
}
.news-body .news-grid .news-card-wrapper .news-card .news-card-content p:has( > span){
  margin-bottom: 2px;
}
