/* The site's top bar for pages under research/. These pages carry their own self-contained
   styles, so the header uses its own class names (mx-) and colours and does not touch theirs.
   Keep in step with .site-header and .nav in styles.css. */
.mx-header {
  box-sizing: border-box;
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.25rem;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  background: color-mix(in srgb, #eef3f6 82%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in srgb, #b7c5d0 55%, transparent);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
}

.mx-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.08rem;
  font-family: "Syne", "Arial Black", sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.04em;
  color: #0c1219;
  text-decoration: none;
}

.mx-logo img {
  display: block;
  width: auto;
  height: 1.05em;
  transform: translateY(0.02em);
}

.mx-logo span {
  line-height: 1;
}

.mx-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
}

.mx-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
  color: #2a3642;
  text-decoration: none;
}

.mx-nav a:hover {
  color: #0c1219;
}

.mx-nav a[aria-current="page"] {
  color: #0c1219;
  text-decoration: underline;
  text-decoration-color: #c09450;
  text-underline-offset: 0.45em;
}

.mx-nav a.mx-cta {
  padding: 0.45rem 0.85rem;
  border: 1px solid #0c1219;
  color: #0c1219;
}

.mx-nav a.mx-cta:hover {
  background: #0c1219;
  color: #eef3f6;
}

.mx-toggle {
  display: none;
  padding: 0.45rem 0.85rem;
  border: 1px solid #0c1219;
  background: transparent;
  color: #0c1219;
  font: 500 0.9rem "IBM Plex Sans", system-ui, sans-serif;
  cursor: pointer;
}

@media (max-width: 900px) {
  .mx-toggle {
    display: inline-flex;
  }

  .mx-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem clamp(1.25rem, 4vw, 3rem) 1rem;
    background: #eef3f6;
    border-bottom: 1px solid #b7c5d0;
  }

  .mx-header.is-open .mx-nav {
    display: flex;
  }

  .mx-nav a {
    padding: 0.8rem 0;
    font-size: 1rem;
    border-bottom: 1px solid color-mix(in srgb, #b7c5d0 60%, transparent);
  }

  .mx-nav a.mx-cta {
    margin-top: 0.75rem;
    text-align: center;
  }
}
