.site-nav {
  display: flex;
  justify-content: center;
  padding: 6px 12px 7px;
}

.site-nav > ul {
  display: flex;
  width: min(100%, 820px);
  margin: 0;
  padding: 3px 4px;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #b5c6c8 transparent;
}

.site-nav li {
  position: relative;
  flex: 1 0 auto;
}

.site-nav li + li::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 1px;
  height: 24px;
  background-color: #b5c6c8;
  content: "";
  transform: translateY(-50%) rotate(19deg);
  pointer-events: none;
}

.site-nav a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 clamp(3px, calc(3vw - 9px), 18px);
  border-radius: 4px;
  color: #51777b;
  font-size: clamp(13px, 1.8vw, 17px);
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a::before {
  position: absolute;
  inset: 4px;
  border-radius: 4px;
  background-color: rgba(81, 119, 123, 0.12);
  box-shadow: 0 3px 8px rgba(49, 89, 92, 0.14);
  content: "";
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease-out, transform 160ms ease-out;
}

.site-nav a > span {
  position: relative;
  transition: transform 160ms ease-out;
}

.site-nav a[aria-current] {
  color: #31595c;
  font-weight: 600;
}

.site-nav a:focus-visible {
  color: #31595c;
  outline: 2px solid #51777b;
  outline-offset: -3px;
}

.site-nav a:focus-visible::before,
.site-nav a:active::before {
  opacity: 1;
}

@media (hover: hover) {
  .site-nav a:hover {
    color: #31595c;
  }

  .site-nav a:hover::before {
    opacity: 1;
  }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .site-nav a:hover::before,
  .site-nav a:hover > span {
    transform: translateY(-2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-nav a::before,
  .site-nav a > span {
    transition: none;
  }
}

@media (max-width: 600px) {
  .site-nav {
    padding: 4px 10px 5px;
  }

  .site-nav > ul {
    flex-wrap: wrap;
    padding: 0;
    overflow: visible;
  }

  .site-nav li {
    flex: 1 1 25%;
    min-width: 0;
  }

  .site-nav li + li::before {
    height: 18px;
  }

  .site-nav li:nth-child(5)::before {
    content: none;
  }

  .site-nav a {
    padding: 0 4px;
    font-size: 14px;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .site-nav[aria-label="Main navigation"] a {
    font-size: clamp(12px, 3.2vw, 14px);
  }
}
