.sn-header {
  --sn-bg: rgba(10, 12, 17, .9);
  --sn-bg-strong: #0b0e14;
  --sn-text: rgba(244, 248, 252, .94);
  --sn-muted: rgba(214, 222, 232, .72);
  --sn-faint: rgba(168, 180, 194, .58);
  --sn-line: rgba(255, 255, 255, .10);
  --sn-line-strong: rgba(35, 121, 198, .4);
  --sn-accent: #2379c6;
  --sn-accent-soft: #6db0f2;
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  border-bottom: 1px solid var(--sn-line);
  background: var(--sn-bg);
  color: var(--sn-text);
  backdrop-filter: blur(16px);
  font-family: "Avenir Next", "Segoe UI Variable Text", "SF Pro Text", "Noto Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.2;
}

.home-shell .sn-header.sn-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--sn-line);
  background: var(--sn-bg);
  backdrop-filter: blur(16px);
}

.sn-header,
.sn-header *,
.sn-header *::before,
.sn-header *::after {
  box-sizing: border-box;
}

.sn-inner {
  position: relative;
  width: min(1248px, calc(100% - 32px));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sn-header .sn-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
  color: var(--sn-text);
  text-decoration: none;
  white-space: nowrap;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.03em;
}

.sn-brand img {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  transition: transform 300ms ease;
}

.sn-header .sn-brand:hover img {
  transform: scale(1.05);
}

.sn-brand em {
  color: var(--sn-accent-soft);
  font-style: normal;
  font-weight: 650;
}

.sn-nav {
  margin-left: auto;
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

.sn-header .sn-link {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  /* Required: the Tools parent renders as a <button>, which would
     otherwise keep the light default button-face background. */
  background: transparent;
  color: var(--sn-muted);
  text-decoration: none;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 620;
  letter-spacing: -.005em;
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease;
}

.sn-header .sn-link:not(.sn-link-current):hover {
  color: var(--sn-text);
  background: rgba(255, 255, 255, .055);
}

.sn-header .sn-link-current {
  border-color: var(--sn-line-strong);
  background: rgba(35, 121, 198, .12);
  color: var(--sn-accent-soft);
  cursor: default;
}

.sn-item {
  position: relative;
  display: inline-flex;
}

.sn-header .sn-link-parent {
  font: inherit;
  cursor: pointer;
}

.sn-caret {
  font-size: 9px;
  margin-left: 3px;
  transition: transform 160ms ease;
}

.sn-item.is-open .sn-caret {
  transform: rotate(180deg);
}

.sn-sub {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 120;
  display: grid;
  min-width: 212px;
  gap: 2px;
  padding: 6px;
  border: 1px solid var(--sn-line);
  border-radius: 12px;
  background: rgba(11, 14, 20, .97);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition:
    opacity 140ms ease,
    transform 140ms ease,
    visibility 140ms;
}

.sn-item:hover .sn-sub,
.sn-item.is-open .sn-sub {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.sn-sub-link {
  display: flex;
  min-height: 36px;
  align-items: center;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--sn-muted);
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  transition:
    color 140ms ease,
    background-color 140ms ease;
}

.sn-sub-link:hover {
  color: var(--sn-text);
  background: rgba(255, 255, 255, .055);
}

.sn-sub-current {
  color: var(--sn-accent-soft);
  background: rgba(35, 121, 198, .12);
  cursor: default;
}

.sn-header .sn-cta {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--sn-accent);
  box-shadow: 0 0 22px rgba(35, 121, 198, .35);
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  transition:
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.sn-header .sn-cta:hover {
  background: #2b87d8;
  box-shadow: 0 0 30px rgba(35, 121, 198, .48);
  transform: translateY(-1px);
}

.sn-lang {
  position: relative;
  flex: 0 0 auto;
  margin-left: 4px;
}

.sn-header .sn-lang-btn {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--sn-muted);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .01em;
  white-space: nowrap;
  transition:
    color 160ms ease,
    background-color 160ms ease;
}

.sn-header .sn-lang-btn:hover {
  color: var(--sn-text);
  background: rgba(255, 255, 255, .055);
}

.sn-lang-caret {
  font-size: 9px;
  transition: transform 160ms ease;
}

.sn-lang.is-open .sn-lang-caret {
  transform: rotate(180deg);
}

.sn-lang-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 120;
  display: grid;
  min-width: 152px;
  gap: 2px;
  padding: 6px;
  border: 1px solid var(--sn-line);
  border-radius: 12px;
  background: rgba(11, 14, 20, .97);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .4);
}

.sn-lang-panel a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--sn-muted);
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  transition:
    color 150ms ease,
    background-color 150ms ease;
}

.sn-lang-panel a:hover {
  color: var(--sn-text);
  background: rgba(255, 255, 255, .055);
}

.sn-lang-panel a[aria-current='true'] {
  color: var(--sn-accent-soft);
}

.sn-lang-group {
  display: none;
}

.sn-mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--sn-accent);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 20px;
}

.sn-mobile-toggle:hover {
  border-color: transparent;
  background: #2b87d8;
}

.sn-header .sn-brand:focus-visible,
.sn-header .sn-link:focus-visible,
.sn-header .sn-cta:focus-visible,
.sn-header .sn-lang-btn:focus-visible,
.sn-lang-panel a:focus-visible,
.sn-sub-link:focus-visible,
.sn-mobile-toggle:focus-visible,
.sn-home-subnav a:focus-visible {
  outline: 2px solid var(--sn-accent);
  outline-offset: 3px;
}

.sn-home-subnav {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  background: rgba(13, 17, 23, .76);
  font-family: "Avenir Next", "Segoe UI Variable Text", "SF Pro Text", "Noto Sans", sans-serif;
}

.sn-home-subnav a {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 999px;
  color: rgba(214, 222, 232, .7);
  text-decoration: none;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
}

.sn-home-subnav a:hover {
  color: #6db0f2;
  background: rgba(35, 121, 198, .08);
}

@media (max-width: 980px) and (min-width: 861px) {
  .sn-inner {
    gap: 8px;
  }

  .sn-header .sn-link {
    padding-inline: 5px;
    font-size: 11px;
  }

  .sn-header .sn-cta {
    padding-inline: 12px;
    font-size: 11px;
  }

  .sn-header .sn-lang-btn {
    padding: 0 7px;
    font-size: 11px;
  }
}

@media (max-width: 860px) {
  .sn-inner {
    width: min(100% - 24px, 1248px);
    min-height: 64px;
  }

  .sn-header .sn-cta {
    display: none;
  }

  .sn-mobile-toggle {
    display: inline-flex;
  }

  .sn-nav {
    position: absolute;
    top: 100%;
    left: -12px;
    right: -12px;
    display: none;
    margin-left: 0;
    padding: 10px 12px 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    border-top: 1px solid var(--sn-line);
    border-bottom: 1px solid var(--sn-line);
    background: rgba(11, 14, 20, .985);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .36);
  }

  .sn-nav.is-open {
    display: grid;
  }

  .sn-header .sn-link {
    width: 100%;
    min-height: 42px;
    justify-content: flex-start;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 13px;
  }

  .sn-header a.sn-link:hover {
    color: var(--sn-text);
    background: rgba(255, 255, 255, .055);
  }

  .sn-item--tools {
    grid-column: 1 / -1;
    display: block;
  }

  .sn-header .sn-link-parent {
    width: 100%;
    min-height: 42px;
    justify-content: flex-start;
    cursor: default;
  }

  .sn-sub {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    min-width: 0;
    margin: 6px 0;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .sn-sub-link {
    min-height: 40px;
  }

  .sn-lang {
    display: none;
  }

  .sn-lang-group {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--sn-line);
  }

  .sn-lang-group a {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    padding: 0 12px;
    border-radius: 8px;
    color: var(--sn-muted);
    font-size: 13px;
    text-decoration: none;
  }

  .sn-lang-group a:hover {
    color: var(--sn-text);
    background: rgba(255, 255, 255, .055);
  }
}

@media (max-width: 480px) {
  .sn-inner {
    width: calc(100% - 20px);
  }

  .sn-brand {
    gap: 8px;
  }

  .sn-header .sn-brand {
    font-size: 18px;
  }

  .sn-brand img {
    width: 30px;
    height: 30px;
  }

  .sn-nav {
    left: -10px;
    right: -10px;
    grid-template-columns: 1fr;
  }

  .sn-lang-group {
    grid-template-columns: 1fr;
  }

  .sn-sub {
    grid-template-columns: 1fr;
  }

  .sn-home-subnav {
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .sn-home-subnav::-webkit-scrollbar {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sn-header .sn-link,
  .sn-header .sn-cta,
  .sn-header .sn-lang-btn,
  .sn-lang-panel a,
  .sn-sub,
  .sn-sub-link,
  .sn-brand img {
    transition: none;
  }

  .sn-lang-caret,
  .sn-caret {
    transition: none;
  }
}
