/* Site-wide header and second row. Markup comes from tools/lib/site-header.mjs. */
:root {
  /* Fixed heights (border included) so full-viewport layouts can subtract them. */
  --site-header-h: 61px;
  --site-subbar-h: 45px;
}

.site-header,
.site-subbar {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.4;
  -webkit-text-size-adjust: 100%;
}

.site-header *,
.site-subbar * {
  box-sizing: border-box;
}

.site-header {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid #dfe7e3;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.4) blur(8px);
}

.site-header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas: "brand nav account";
  align-items: center;
  gap: 24px;
  max-width: 1228px;
  height: 60px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-brand {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  color: #1d302e;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
}

.site-brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #087f79;
  color: #fff;
  font-size: 18px;
  letter-spacing: 0;
}

.site-nav {
  grid-area: nav;
  display: flex;
  gap: 36px;
  height: 100%;
}

.site-nav a {
  position: relative;
  display: flex;
  align-items: center;
  color: #687a75;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s;
}

.site-nav a:hover,
.site-nav a[aria-current] {
  color: #1d302e;
}

.site-nav a[aria-current] {
  font-weight: 650;
}

.site-nav a[aria-current]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 12px;
  width: 24px;
  height: 2px;
  border-radius: 1px;
  background: #087f79;
  transform: translateX(-50%);
}

.site-header-account {
  grid-area: account;
  display: flex;
  align-items: center;
  justify-self: end;
}

.site-header-account > .sss-account {
  margin-left: 0;
  padding-left: 0;
}

.site-header a:focus-visible,
.site-subbar a:focus-visible {
  outline: 3px solid #82cfc7;
  outline-offset: 2px;
  border-radius: 4px;
}

.site-subbar {
  border-bottom: 1px solid #e6ece9;
  background: #fbfcfb;
  color: #687a75;
  font-size: 13px;
}

.site-subbar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: var(--site-subbar-width, 1228px);
  height: 44px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-crumbs {
  min-width: 0;
}

.site-crumbs ol {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
  white-space: nowrap;
}

.site-crumbs li {
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-crumbs li + li::before {
  content: "/";
  margin: 0 8px;
  color: #c0cac5;
}

.site-crumbs a {
  color: #08655f;
  text-decoration: underline;
  text-decoration-color: #b9dcd3;
  text-underline-offset: 4px;
  transition: color 0.15s, text-decoration-color 0.15s;
}

.site-crumbs a:hover {
  color: #087f79;
  text-decoration-color: currentColor;
}

.site-crumbs [aria-current] {
  color: #1d302e;
}

.site-tabs {
  display: flex;
  gap: 28px;
  height: 100%;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-tabs::-webkit-scrollbar {
  display: none;
}

.site-tabs a {
  position: relative;
  display: flex;
  align-items: center;
  color: #687a75;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s;
}

.site-tabs a:hover,
.site-tabs a[aria-current] {
  color: #1d302e;
}

.site-tabs a[aria-current] {
  font-weight: 650;
}

.site-tabs a[aria-current]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: #087f79;
}

.site-subbar-tools {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

@media (max-width: 640px) {
  :root {
    --site-header-h: 89px;
    --site-subbar-h: 41px;
  }

  .site-header-inner {
    grid-template-columns: 1fr auto;
    grid-template-areas: "brand account" "nav nav";
    gap: 0 12px;
    height: 88px;
    padding: 0 16px;
  }

  .site-brand {
    height: 48px;
    font-size: 18px;
  }

  .site-brand-mark {
    width: 30px;
    height: 30px;
    font-size: 17px;
  }

  .site-nav {
    gap: 26px;
    height: 40px;
    margin: 0 -16px;
    padding: 0 16px;
    overflow-x: auto;
    scrollbar-width: none;
  }

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

  .site-nav a[aria-current]::after {
    bottom: 6px;
  }

  .site-subbar-inner {
    gap: 12px;
    height: 40px;
    padding: 0 16px;
  }

  .site-tabs {
    gap: 22px;
  }
}
