@font-face {
  font-family: "Outfit";
  src: url("../fonts/Outfit-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Outfit";
  src: url("../fonts/Outfit-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Outfit";
  src: url("../fonts/Outfit-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Outfit";
  src: url("../fonts/Outfit-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "OrbitronLocal";
  src: url("../fonts/orbitron-bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* 设计稿多处用到 Outfit Black（900）：PCBA 段2 副标题、段4 左列标题等。
   字体文件一直在 assets/fonts/Outfit-Black.woff2，但此前没有 @font-face 声明，
   浏览器只能把 700 合成加粗，笔画与设计稿不一致。 */
@font-face {
  font-family: "Outfit";
  src: url("../fonts/Outfit-Black.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* 设计稿的展示标题区分 Bold（行1）与 Black（行2）。
   此前只声明了 700，`font-weight: 900` 会被降级渲染，
   导致标题行2 明显偏窄（实测 531px，设计稿 399px）。
   字体文件取自设计交接稿 docs/设计稿/html-17-.../static/fonts/Orbitron Black.otf。 */
@font-face {
  font-family: "OrbitronLocal";
  src: url("../fonts/orbitron-black.otf") format("opentype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --green: #008c11;
  --soft-green: #d3ead4;
  --nav-gray: #8c9892;
  --text-dark: #272323;
}

html,
body {
  margin: 0;
  font-family: "Outfit", Arial, sans-serif;
  color: var(--text-dark);
  background: #fff;
  overflow-x: clip;
}

body {
  min-width: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  box-shadow: 0 8px 24px rgba(20, 54, 63, 0.08);
}

body.admin-bar .site-header {
  top: 32px;
}

.top-bar {
  background: var(--green);
  color: #fff;
}

.top-shell,
.nav-shell {
  width: min(100% - 130px, 1790px);
  margin: 0 auto;
}

.top-shell {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top-contact,
.top-social,
.top-link,
.top-social a,
.language {
  display: flex;
  align-items: center;
}

.top-contact {
  gap: 91px;
}

.top-link {
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
}

.top-link .iconfont {
  font-size: 22px;
  color: #cbe8cf;
}

.top-link.mail .iconfont {
  font-size: 25px;
}

.top-social {
  gap: 11px;
  font-size: 16px;
  font-weight: 600;
}

.top-social a {
  justify-content: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: #fff;
  /* Lock header social green; page templates redefine :root --green after header.css. */
  color: #008c11;
}

.top-social a .iconfont {
  font-size: 15px;
  line-height: 1;
  color: #008c11;
}

.top-social__custom-icon {
  display: block;
  width: 15px;
  height: 15px;
  object-fit: contain;
}

.top-social a[aria-label="YouTube"] .iconfont,
.top-social a[aria-label="YouTube"] .icon-Youtube-fill {
  font-size: 13px;
  color: #008c11;
}

.follow-label {
  margin-right: 4px;
}

.language {
  gap: 8px;
  margin-left: 79px;
  color: inherit;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}

.language__flag {
  display: block;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.flag-us {
  position: relative;
  width: 29px;
  height: 29px;
  overflow: hidden;
  border-radius: 50%;
  background:
    linear-gradient(#b22234 0 7.7%, #fff 7.7% 15.4%, #b22234 15.4% 23.1%, #fff 23.1% 30.8%, #b22234 30.8% 38.5%, #fff 38.5% 46.2%, #b22234 46.2% 53.9%, #fff 53.9% 61.6%, #b22234 61.6% 69.3%, #fff 69.3% 76.9%, #b22234 76.9% 84.6%, #fff 84.6% 92.3%, #b22234 92.3% 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.flag-us::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 15px;
  height: 15px;
  background: #3c3b6e;
}

.flag-us::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 5px 0 #fff, 10px 0 #fff, 0 5px #fff, 5px 5px #fff, 10px 5px #fff, 0 10px #fff, 5px 10px #fff, 10px 10px #fff;
}

.chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translateY(-2px) rotate(45deg);
}

.main-nav {
  height: 80px;
  background: #fff;
}

.nav-shell {
  height: 80px;
  display: flex;
  align-items: center;
  gap: clamp(28px, 3vw, 72px);
}

.brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  /* 设计稿页头 logo 为 275×62（节点 1:1089），在 80 高的导航条内垂直居中（上下各 9）。 */
  width: min(275px, 100%);
}

.site-header .brand img {
  display: block;
  /* 设计稿页头 logo 为 275×62（节点 1:1089），素材 550×124 按 2× 导出，
     容器 275 宽时按原比例渲染即 275×62。
     此前这里是「按旧素材的 46 高设了高度上限」，会把设计稿素材继续压扁，
     故改为按容器宽度等比缩放。 */
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.menu {
  display: flex;
  align-items: stretch;
  gap: clamp(24px, 2.4vw, 46px);
  height: 80px;
  padding: 0;
  margin: 0 0 0 auto;
  list-style: none;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: stretch;
  z-index: 1;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  height: 80px;
  color: var(--nav-gray);
  font-size: 18px;
  font-weight: 400;
  white-space: nowrap;
  transition: color 0.2s ease;
}

/* 全局兜底:.nav-link / .nav-link-sub 的所有非交互伪类字色锁住 var(--nav-gray),
   防止 12 个页面里 a, a:hover, a:focus, a:focus-visible, a:active, a:visited { color:inherit }
   串改 nav 颜色成 body 的深蓝(各 page 的 --ink / --page-text / --dark / --pcba-dark
   / --mc-dark / #17353d 等都是深色)。

   特异性 (0,2,0) 高于 a:visited (0,1,1) / a:focus / a:focus-visible / a:active
   而 .nav-link.active、.nav-item:hover .nav-link 的 :hover 特异性 (0,2,0)-(0,2,1) 更高,
   所以 active 绿色高亮 + hover 变绿不受这条约束影响。*/
.nav-link:visited,
.nav-link:focus,
.nav-link:focus-visible,
.nav-link:active,
.nav-link-sub:visited,
.nav-link-sub:focus,
.nav-link-sub:focus-visible,
.nav-link-sub:active {
  color: var(--nav-gray);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 42px;
  height: 2px;
  background: var(--green);
  opacity: 0;
  transform: translateX(-50%);
}

.nav-link.active {
  color: var(--green);
  font-weight: 700;
}

/* 「无首页，下拉」的一级项：只负责展开面板，不产生跳转。
   行为在 assets/js/header.js，这里是可点击的光标提示。 */
.nav-link--toggle {
  cursor: pointer;
}

.nav-link.active::after {
  opacity: 1;
}

.nav-item:hover .nav-link,
.nav-item:focus-within .nav-link {
  color: var(--green);
}

.nav-item:hover,
.nav-item:focus-within {
  z-index: 20;
}

.dropdown {
  position: absolute;
  left: 50%;
  top: 80px;
  min-width: 190px;
  padding: 13px 0;
  border-top: 3px solid var(--green);
  background: #fff;
  color: #6f7a74;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 10px);
  z-index: 30;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.dropdown::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
}

.nav-item:hover .dropdown,
.nav-item:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.dropdown a {
  display: block;
  padding: 9px 22px;
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
}

.dropdown a:hover {
  color: var(--green);
  background: #f2fbf3;
}

/* === 三级菜单(level 3)支持 ===
   二级项被包在 .nav-sub 里(由 walker 输出),position:relative 让 .dropdown-sub
   能以它为锚定位到右侧。.dropdown-sub 默认 opacity/visibility 隐藏,
   .nav-sub:hover 或 :focus-within 时弹开。*/
.nav-sub {
  position: relative;
}

.nav-link-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 22px;
  font-size: 15px;
  line-height: 1.2;
  color: #6f7a74;
  white-space: nowrap;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.nav-link-sub:hover,
.nav-link-sub.active {
  color: var(--green);
  background: #f2fbf3;
}

.dropdown-sub {
  position: absolute;
  top: 0;
  left: 100%;
  min-width: 190px;
  padding: 13px 0;
  border-top: 3px solid var(--green);
  background: #fff;
  color: #6f7a74;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateX(8px);
  z-index: 31;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.nav-sub:hover .dropdown-sub,
.nav-sub:focus-within .dropdown-sub,
.nav-link-sub:focus + .dropdown-sub {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.dropdown-sub a {
  display: block;
  padding: 9px 22px;
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
  color: inherit;
}

.dropdown-sub a:hover {
  color: var(--green);
  background: #f2fbf3;
}

.search-link {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 34px;
  height: 80px;
  margin-left: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #97a09b;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.search-link .iconfont {
  font-size: 24px;
}

.search-link:hover,
.search-link:focus-visible {
  color: var(--green);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
}

@media (max-width: 1500px) {
  .top-shell,
  .nav-shell {
    width: min(100% - 48px, 1320px);
  }

  .brand {
    width: min(275px, 100%);
  }

  /* 一级菜单的字号与间距由 responsive-base.css 按视口宽度流体收敛，
     这里只负责把菜单推到右侧（见该文件 "keep horizontal nav from overflowing"）。 */
  .menu {
    margin-left: auto;
  }
}

@media (max-width: 1200px) {
  .top-shell,
  .nav-shell {
    width: min(100% - 32px, 100%);
  }

  .top-shell {
    height: auto;
    min-height: 40px;
    flex-wrap: wrap;
    gap: 8px 20px;
    padding: 8px 0;
  }

  .top-contact,
  .top-social {
    flex-wrap: wrap;
  }

  .top-contact {
    gap: 18px;
  }

  .language {
    margin-left: 8px;
  }

  .main-nav,
  .nav-shell {
    height: auto;
  }

  .nav-shell {
    position: relative;
    display: grid;
    grid-template-columns: auto 44px 44px;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
    width: min(275px, 100%);
  }

  .menu-toggle {
    position: relative;
    display: grid;
    grid-column: 2;
    grid-row: 1;
    place-items: center;
    width: 44px;
    height: 44px;
    justify-self: end;
    border: 1px solid rgba(0, 140, 17, 0.22);
    border-radius: 8px;
    background: #f5fbf6;
    color: var(--green);
    cursor: pointer;
    overflow: hidden;
    transition: background-color 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
  }

  .menu-toggle::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 140, 17, 0.14), rgba(211, 234, 212, 0.2));
    opacity: 0;
    transition: opacity 0.24s ease;
  }

  .menu-toggle span {
    position: absolute;
    left: 12px;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 0.28s ease, opacity 0.2s ease, top 0.28s ease;
  }

  .menu-toggle span:nth-child(1) {
    top: 14px;
  }

  .menu-toggle span:nth-child(2) {
    top: 21px;
  }

  .menu-toggle span:nth-child(3) {
    top: 28px;
  }

  .site-header.is-menu-open .menu-toggle,
  .menu-toggle:hover,
  .menu-toggle:focus-visible {
    border-color: rgba(0, 140, 17, 0.42);
    background: #fff;
    box-shadow: 0 10px 24px rgba(0, 140, 17, 0.12);
  }

  .site-header.is-menu-open .menu-toggle::before {
    opacity: 1;
  }

  .site-header.is-menu-open .menu-toggle span:nth-child(1) {
    top: 21px;
    transform: rotate(45deg);
  }

  .site-header.is-menu-open .menu-toggle span:nth-child(2) {
    opacity: 0;
    transform: translateX(10px);
  }

  .site-header.is-menu-open .menu-toggle span:nth-child(3) {
    top: 21px;
    transform: rotate(-45deg);
  }

  .menu {
    grid-column: 1 / -1;
    display: grid;
    align-items: stretch;
    gap: 8px;
    height: auto;
    width: 100%;
    max-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0 solid rgba(0, 140, 17, 0.12);
    border-radius: 8px;
    background:
      linear-gradient(180deg, rgba(245, 251, 246, 0.98), rgba(255, 255, 255, 0.98)),
      #fff;
    box-shadow: 0 24px 44px rgba(11, 53, 23, 0);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition:
      max-height 0.36s ease,
      margin-top 0.28s ease,
      padding 0.28s ease,
      border-width 0.28s ease,
      box-shadow 0.28s ease,
      opacity 0.24s ease,
      transform 0.28s ease;
  }

  .site-header.is-menu-open .menu {
    max-height: calc(100vh - 96px);
    margin-top: 10px;
    padding: 8px;
    overflow-y: auto;
    border-width: 1px;
    box-shadow: 0 24px 44px rgba(11, 53, 23, 0.14);
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-item {
    display: block;
    border-radius: 8px;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(22, 52, 58, 0.06);
    overflow: hidden;
  }

  .nav-link {
    justify-content: space-between;
    height: 42px;
    padding: 0 14px;
    color: var(--nav-gray);   /* 跟桌面端统一用 CSS 变量,不再写死 #14363f */
    font-size: 16px;
    font-weight: 600;
  }

  .nav-link::after {
    position: static;
    width: 7px;
    height: 7px;
    margin-left: 16px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    background: transparent;
    opacity: 0.55;
    transform: rotate(45deg);
    transition: transform 0.24s ease, opacity 0.24s ease;
  }

  .nav-link.active::after {
    opacity: 0.9;
  }

  .nav-item.is-submenu-open .nav-link::after {
    opacity: 1;
    transform: rotate(225deg);
  }

  .dropdown {
    position: static;
    max-height: 0;
    min-width: 0;
    padding: 0;
    border: 0;
    background: #f6faf7;
    color: #6f7a74;
    box-shadow: none;
    opacity: 0;
    visibility: hidden;
    transform: none;
    overflow: hidden;
    z-index: 3;
    transition: max-height 0.3s ease, opacity 0.24s ease, padding 0.24s ease, visibility 0.24s ease;
  }

  .dropdown::before {
    display: none;
  }

  .nav-item:hover .dropdown,
  .nav-item:focus-within .dropdown {
    max-height: 0;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transform: none;
  }

  .nav-item.is-submenu-open .dropdown,
  .nav-item.is-submenu-open:hover .dropdown,
  .nav-item.is-submenu-open:focus-within .dropdown {
    max-height: min(80vh, 2000px);
    padding: 4px 0 10px;
    opacity: 1;
    visibility: visible;
    overflow-y: auto;
  }

  @media (hover: hover) and (pointer: fine) {
    .site-header.is-menu-open .nav-item:hover .dropdown,
    .site-header.is-menu-open .nav-item:focus-within .dropdown {
      max-height: min(80vh, 2000px);
      padding: 4px 0 10px;
      opacity: 1;
      visibility: visible;
      overflow-y: auto;
    }
  }

  .dropdown a {
    margin: 0 8px;
    padding: 9px 14px;
    border-radius: 6px;
    font-size: 14px;
    white-space: normal;
  }

  .dropdown a:hover,
  .dropdown a:focus-visible {
    color: var(--green);
    background: #fff;
  }

  .search-link {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    width: 44px;
    height: 44px;
    justify-content: center;
    border: 1px solid rgba(22, 52, 58, 0.08);
    border-radius: 8px;
    background: #fff;
  }

  /* 移动端三级菜单(level 3)—— 在 .nav-sub 内联展开,不走 right popover */
  .nav-sub {
    position: static;
  }

  .dropdown-sub {
    position: static;
    max-height: 0;
    min-width: 0;
    padding: 0;
    border: 0;
    background: #f6faf7;
    color: #6f7a74;
    box-shadow: none;
    opacity: 0;
    visibility: hidden;
    transform: none;
    overflow: hidden;
    z-index: 3;
    transition: max-height 0.3s ease, opacity 0.24s ease, padding 0.24s ease, visibility 0.24s ease;
  }

  .nav-sub.is-submenu-open .dropdown-sub,
  .nav-sub.is-submenu-open:hover .dropdown-sub {
    max-height: min(60vh, 1200px);
    padding: 4px 0 10px;
    padding-inline-start: 16px;
    opacity: 1;
    visibility: visible;
    overflow-y: auto;
  }

  .nav-sub .nav-link-sub {
    padding: 9px 14px 9px 28px;
  }
}

@media (max-width: 640px) {
  .top-shell {
    gap: 10px;
  }

  .top-contact,
  .top-social {
    width: 100%;
    justify-content: center;
  }

  .top-link,
  .top-social,
  .language {
    font-size: 14px;
  }

  .top-contact {
    gap: 12px;
  }

  .follow-label {
    display: none;
  }

  .brand {
    width: 180px;
  }
}

@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}

@media (max-width: 390px) {
  .top-shell,
  .nav-shell {
    width: min(100% - 24px, 100%);
  }

  .nav-shell {
    grid-template-columns: minmax(0, 1fr) 44px 44px;
    gap: 8px;
  }

  .brand {
    width: min(172px, 100%);
  }

  .menu-toggle {
    width: 44px;
    height: 44px;
  }

  .search-link {
    width: 44px;
    height: 44px;
  }

  .nav-link {
    height: 40px;
    font-size: 15px;
  }
}
@font-face {
  font-family: "Outfit";
  src: url("../fonts/Outfit-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Outfit";
  src: url("../fonts/Outfit-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Outfit";
  src: url("../fonts/Outfit-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Outfit";
  src: url("../fonts/Outfit-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "OrbitronLocal";
  src: url("../fonts/orbitron-bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* 设计稿多处用到 Outfit Black（900）：PCBA 段2 副标题、段4 左列标题等。
   字体文件一直在 assets/fonts/Outfit-Black.woff2，但此前没有 @font-face 声明，
   浏览器只能把 700 合成加粗，笔画与设计稿不一致。 */
@font-face {
  font-family: "Outfit";
  src: url("../fonts/Outfit-Black.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* 设计稿的展示标题区分 Bold（行1）与 Black（行2）。
   此前只声明了 700，`font-weight: 900` 会被降级渲染，
   导致标题行2 明显偏窄（实测 531px，设计稿 399px）。
   字体文件取自设计交接稿 docs/设计稿/html-17-.../static/fonts/Orbitron Black.otf。 */
@font-face {
  font-family: "OrbitronLocal";
  src: url("../fonts/orbitron-black.otf") format("opentype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
