:root {
  --nav-blue: #2e78f7;
  --nav-text: #5d6f87;
  --nav-surface: rgba(255, 255, 255, .88);
}

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 100;
  width: min(1740px, calc(100% - 110px));
  height: 114px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  opacity: 1;
}

.brand-mark {
  display: inline-flex;
  height: 62px;
  align-items: center;
  justify-content: flex-start;
  flex: 0 0 auto;
}

.jianliu-page .brand-mark {
  height: 68px;
}

.brand-mark img {
  width: 68px;
  height: 62px;
  object-fit: contain;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.main-nav a {
  display: inline-flex;
  min-width: 0;
  height: 34px;
  padding: 0 14px;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  color: var(--nav-text);
  font-size: 14px;
  line-height: normal;
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  background: var(--nav-surface);
  transition: color .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.main-nav a:nth-child(1) { width: 80px; }
.main-nav a:nth-child(2) { width: 130px; }
.main-nav a:nth-child(3) { width: 96px; }
.main-nav a:nth-child(4) { width: 94px; }
.main-nav a:nth-child(5) { width: 110px; }

.main-nav a:hover,
.main-nav a.active {
  color: #fff;
  background: var(--nav-blue);
  box-shadow: 0 4px 10px #4d83e94d;
}

.main-nav a:focus-visible {
  outline: 3px solid #ffbd42;
  outline-offset: 3px;
}

@media (max-width: 1200px) {
  .site-header,
  .jianliu-page .site-header {
    width: calc(100% - 50px);
  }
}

@media (max-width: 760px) {
  .site-header,
  .jianliu-page .site-header {
    position: fixed;
    width: 100%;
    height: 68px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    background: #ffffffed;
    box-shadow: 0 2px 12px #5071a31c;
  }

  .brand-mark,
  .jianliu-page .brand-mark {
    width: 50px;
    height: 46px;
  }

  .brand-mark img {
    width: 50px;
    height: 46px;
  }

  .main-nav {
    min-width: 0;
    position: absolute;
    top: 12px;
    right: 5px;
    left: auto;
    width: auto;
    margin-left: 0;
    display: flex;
    justify-content: flex-end;
    gap: 0;
    overflow: visible;
    scrollbar-width: none;
  }

  .main-nav::-webkit-scrollbar {
    display: none;
  }

  .main-nav a {
    min-height: 44px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
    font-size: 10px;
    white-space: nowrap;
  }

  .main-nav a:nth-child(n) {
    width: 44px !important;
    min-width: 44px;
    padding: 0;
    flex: 0 0 auto;
  }
}
