.site-header {
  position: fixed;
  z-index: 50;
  top: 16px;
  left: 50%;
  width: min(calc(100% - 40px), 1240px);
  min-height: 68px;
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 16px;
  border: 1px solid transparent;
  border-radius: 22px;
  padding: 7px 9px 7px 14px;
  background:
    linear-gradient(rgba(11, 16, 27, .77), rgba(5, 9, 16, .86)) padding-box,
    linear-gradient(105deg, rgba(255, 255, 255, .35), rgba(99, 217, 243, .14), rgba(255, 107, 24, .18)) border-box;
  box-shadow: 0 24px 75px rgba(0, 0, 0, .42), inset 0 1px rgba(255, 255, 255, .06);
  backdrop-filter: blur(24px) saturate(135%);
  transform: translateX(-50%);
}

.site-header .brand-lockup {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
}

.site-header .brand {
  width: 190px;
  height: 52px;
  display: block;
  overflow: hidden;
  border-radius: 12px;
}

.site-header .brand picture,
.site-header .brand img {
  width: 100%;
  height: 100%;
  display: block;
}

.site-header .brand img {
  object-fit: contain;
  mix-blend-mode: screen;
}

.site-header .version-tag {
  position: relative;
  isolation: isolate;
  min-height: 34px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
  overflow: hidden;
  border: 1px solid rgba(155, 225, 239, .25);
  border-radius: 10px;
  padding: 7px 13px 7px 11px;
  color: #dcecf4;
  background: linear-gradient(135deg, rgba(33, 55, 70, .58), rgba(10, 18, 28, .76));
  box-shadow:
    inset 0 1px rgba(255, 255, 255, .12),
    inset 0 -1px rgba(255, 255, 255, .025),
    0 10px 28px rgba(0, 0, 0, .23),
    0 0 24px rgba(80, 202, 226, .055);
  -webkit-backdrop-filter: blur(16px) saturate(145%);
  backdrop-filter: blur(16px) saturate(145%);
  font-family: "Avenir Next", "Nunito Sans", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 10.5px;
  font-weight: 620;
  line-height: 1.35;
  letter-spacing: .035em;
  white-space: nowrap;
  cursor: default;
  pointer-events: none;
  -webkit-user-select: text;
  user-select: text;
}

.site-header .version-tag::before {
  content: "";
  position: relative;
  z-index: 1;
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: var(--orange-light, #ff762e);
  box-shadow: 0 0 0 4px rgba(255, 118, 46, .09), 0 0 13px rgba(255, 118, 46, .65);
  pointer-events: none;
}

.site-header .version-tag::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, .08), transparent 34%, rgba(155, 225, 239, .035) 72%, transparent);
  pointer-events: none;
}

.site-header .header-nav {
  display: flex;
  justify-content: center;
  gap: 28px;
}

.site-header .header-nav a {
  position: relative;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: #aab7c8;
  background: transparent;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.site-header .header-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, #63d9f3, #ff6b18);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 240ms cubic-bezier(.22, 1, .36, 1);
}

.site-header .header-nav a:hover { color: #fff; }
.site-header .header-nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.site-header .header-cta {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(255, 150, 90, .56);
  border-radius: 14px;
  padding: 0 18px;
  color: #fff;
  background: linear-gradient(180deg, #e75c15, #ad3708);
  box-shadow: 0 14px 34px rgba(255, 92, 18, .18), inset 0 1px rgba(255, 255, 255, .24);
  font-size: 13px;
  font-weight: 760;
  line-height: 1;
  text-decoration: none;
  transition: transform 200ms cubic-bezier(.22, 1, .36, 1), border-color 200ms ease, box-shadow 200ms ease;
}

.site-header .header-cta:hover {
  border-color: #ffbb8f;
  box-shadow: 0 18px 42px rgba(255, 92, 18, .3), 0 0 26px rgba(255, 126, 48, .11);
  transform: translateY(-2px);
}

.site-header .header-cta svg { width: 17px; height: 17px; }

.language-switch {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 154px;
  min-height: 42px;
  margin: 0;
  border: 1px solid rgba(205, 225, 242, .24);
  border-radius: 999px;
  padding: 3px;
  background: rgba(7, 12, 20, .78);
  box-shadow: inset 0 1px rgba(255, 255, 255, .07);
}

.language-switch::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  border: 1px solid rgba(255, 163, 103, .5);
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(225, 92, 26, .96), rgba(169, 57, 12, .96));
  box-shadow: 0 8px 22px rgba(230, 79, 14, .18), inset 0 1px rgba(255, 255, 255, .18);
  transform: translateX(var(--language-position, 0));
  transition: transform 220ms cubic-bezier(.22, 1, .36, 1);
}

.language-switch[data-language="en"] { --language-position: 100%; }

.language-switch a {
  min-width: 0;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 8px;
  color: #aebaca;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.language-switch a[aria-current="page"] { color: #fff; }
.language-switch a:hover { color: #fff; }
.language-switch a:focus-visible {
  outline: 3px solid #b9e8ff;
  outline-offset: 3px;
}

@media (max-width: 760px) {
  .site-header {
    top: 8px;
    width: calc(100% - 20px);
    min-height: 96px;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: 45px 28px;
    gap: 8px;
    border-radius: 18px;
    padding: 7px 9px;
  }
  .site-header .brand-lockup { display: contents; }
  .site-header .brand { width: 100px; height: 45px; }
  .site-header .brand { grid-column: 1; grid-row: 1; }
  .site-header .version-tag {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
    min-height: 28px;
    gap: 9px;
    border-radius: 8px;
    padding: 5px 10px 5px 9px;
    font-size: 9px;
    line-height: 1.35;
    letter-spacing: .025em;
  }
  .site-header .header-nav { display: none; }
  .site-header .header-cta { grid-column: 3; grid-row: 1; justify-self: end; min-width: 82px; width: auto; padding: 0 13px; }
  .site-header .header-cta span { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .language-switch { grid-column: 2; grid-row: 1; justify-self: center; width: 104px; min-height: 38px; }
  .language-switch a { min-height: 30px; padding-inline: 4px; font-size: 10px; }
}

@media (min-width: 761px) and (max-width: 1100px) {
  .site-header { grid-template-columns: auto 140px 1fr auto; gap: 12px; }
  .site-header .brand { width: 158px; }
  .site-header .header-nav { gap: 18px; }
}

@media (min-width: 761px) and (max-width: 1000px) {
  .site-header .brand-lockup { gap: 8px; }
  .site-header .brand { width: 100px; }
  .site-header .version-tag {
    min-height: 30px;
    gap: 6px;
    padding: 5px 8px;
    font-size: 8.5px;
    line-height: 1.35;
    letter-spacing: .015em;
  }
  .site-header .header-nav { display: none; }
}

@media (max-width: 360px) {
  .site-header .brand { width: 72px; }
  .site-header .header-cta { min-width: 65px; padding-inline: 8px; font-size: 11px; }
  .language-switch { width: 92px; }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header .version-tag {
    background: #0b111d;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .language-switch::before { transition: none; }
  .site-header .header-nav a::after,
  .site-header .header-cta { transition: none; }
}
