:root {
  --wm-gold: #ffb000;
  --wm-topbar-bg: #031827;
  --wm-gold-height: 4px;
  --wm-topbar-height: 34px;
}

/* Barra dell'ecosistema, allineata all'header condiviso di WikiMilano. */
.sticky-header-stack {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.global-gold-line {
  display: block;
  width: 100%;
  height: var(--wm-gold-height);
  min-height: var(--wm-gold-height);
  margin: 0;
  padding: 0;
  background: var(--wm-gold);
}

.system-topbar {
  width: 100%;
  height: var(--wm-topbar-height);
  color: #fff;
  background: var(--wm-topbar-bg);
}

.system-topbar .container {
  width: min(calc(100% - 40px), 1180px);
  height: var(--wm-topbar-height);
  margin-inline: auto;
}

.system-topbar-inner {
  display: flex;
  align-items: center;
}

.system-topbar-nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.system-topbar-nav::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.system-topbar nav.system-topbar-nav a {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  height: 100%;
  padding: 0 12px;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.system-topbar nav.system-topbar-nav a:first-child {
  padding-left: 0;
}

.system-topbar nav.system-topbar-nav a + a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: rgba(255, 255, 255, .16);
}

.system-topbar nav.system-topbar-nav a:hover,
.system-topbar nav.system-topbar-nav a:focus-visible {
  color: #fff;
}

/* Il contenitore esterno gestisce lo sticky anche per l'header locale. */
.sticky-header-stack .site-header,
.sticky-header-stack .nav {
  position: static;
  top: auto;
}

@media (max-width: 760px) {
  :root {
    --wm-topbar-height: 38px;
  }

  .system-topbar .container {
    width: min(calc(100% - 32px), 1180px);
  }

  .system-topbar nav.system-topbar-nav a {
    padding: 0 10px;
    font-size: 10px;
  }

  .system-topbar nav.system-topbar-nav a:first-child {
    padding-left: 0;
  }
}
