/* ========== 统一顶部导航栏（居中布局 + 悬停下划线） ========== */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
  scrollbar-width: none;
}
html::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* 二级页蓝色首图与「团队介绍」同高。 */
@media (min-width: 769px) {
  .hero:not(.home-hero) > .hero-inner,
  .library-hero > .hero-inner,
  .resource-hero > .hero-inner {
    box-sizing: border-box;
    min-height: 355px !important;
    height: 355px;
    align-items: center;
    overflow: hidden;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    width: min(1200px, 92%) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .hero:not(.home-hero) > .shell.hero-inner {
    display: flex !important;
    align-items: flex-start !important;
    padding-top: 78px !important;
  }
  .hero:not(.home-hero) > .hero-inner:not(.shell) > div:first-child,
  .hero:not(.home-hero) .hero-copy,
  .library-hero .hero-copy,
  .resource-hero .hero-copy {
    align-self: start;
    padding-top: 78px;
  }
  .hero:not(.home-hero) h1,
  .library-hero h1,
  .resource-hero h1 {
    font-size: 42px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    letter-spacing: -0.4px !important;
    margin: 0 0 12px !important;
    color: #fff !important;
  }
  .hero:not(.home-hero) .hero-copy > p,
  .hero:not(.home-hero) .hero-description,
  .library-hero .hero-copy > p,
  .library-hero .hero-description,
  .resource-hero .hero-copy > p,
  .hero:not(.home-hero) > .hero-inner > div:first-child > p {
    font-size: 16px !important;
    font-weight: 400 !important;
    line-height: 1.75 !important;
    margin: 0 !important;
    color: rgba(236, 246, 252, 0.9) !important;
  }
  .hero-actions {
    margin-top: 22px !important;
  }
}

/* 全站标题层级。页面自己的字号不能把某一级标题单独放大或缩小。 */
@media (min-width: 769px) {
  h1 {
    font-size: 42px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
  }
  .home-hero > .hero-inner {
    box-sizing: border-box;
    min-height: 560px !important;
    height: auto !important;
    align-items: center !important;
    padding-top: 64px !important;
    padding-bottom: 64px !important;
    overflow: visible;
  }
  .home-hero h1 {
    font-size: 56px !important;
    font-weight: 800 !important;
    line-height: 1.16 !important;
    letter-spacing: -0.6px !important;
    margin: 0 0 18px !important;
  }
  .home-hero .hero-inner > div:first-child > p,
  .home-hero .hero-copy > p {
    font-size: 18px !important;
    line-height: 1.8 !important;
  }
  h2 {
    font-size: 28px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
  }
  h3 {
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1.45 !important;
  }
  h4 {
    font-size: 15px !important;
    font-weight: 650 !important;
    line-height: 1.5 !important;
  }
}
@media (max-width: 768px) {
  h1 {
    font-size: 30px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
  }
  .home-hero h1 {
    font-size: 36px !important;
    line-height: 1.2 !important;
  }
  .home-hero > .hero-inner {
    padding-top: 48px !important;
    padding-bottom: 48px !important;
  }
  h2 {
    font-size: 24px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
  }
  h3 {
    font-size: 17px !important;
    font-weight: 700 !important;
    line-height: 1.45 !important;
  }
  h4 {
    font-size: 15px !important;
    font-weight: 650 !important;
    line-height: 1.5 !important;
  }
}

.site-navbar {
  position: sticky;
  top: 0;
  z-index: 300;
  background: #fff;
  border-bottom: 1px solid #E6ECF1;
}
.site-navbar .bar {
  width: min(1200px, 92%);
  margin: 0 auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 24px;
}

/* 各页模板会写 .brand / img / nav a。这里用更高优先级把共享导航锁死，
   新页面沿用这些类名时也不会把菜单挤偏。 */
.site-navbar .brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex: 0 0 auto;
  flex-shrink: 0;
  width: auto;
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 0;
  gap: 0;
  letter-spacing: normal;
}
.site-navbar .brand img {
  display: block;
  height: 36px;
  width: auto;
  min-width: 0;
  max-width: none;
  margin: 0;
  object-fit: contain;
}
.site-navbar .brand-fallback {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 18px;
  font-weight: 700;
  color: #022145;
}
.site-navbar .brand.brand-fallback > .brand-fallback {
  display: flex;
}
.site-navbar .brand-fallback .brand-symbol {
  width: 36px;
  height: 36px;
  background: #022145;
  color: #fff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.site-navbar nav {
  display: flex;
  flex: 1;
  justify-content: flex-end;
  gap: 32px;
  font-size: 16px;
}
.site-navbar nav a {
  color: #334451;
  text-decoration: none;
  margin: 0;
  padding: 8px 0 20px;
  position: relative;
  min-width: 0;
  max-width: none;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: normal;
  transition: color 0.2s;
}
.site-navbar nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: #022145;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s ease;
}
.site-navbar nav a:hover {
  color: #022145;
}
.site-navbar nav a:hover::after,
.site-navbar nav a[aria-current="page"]::after {
  transform: scaleX(1);
}
.site-navbar nav a[aria-current="page"] {
  color: #022145;
  font-weight: 600;
}

.site-navbar .nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.site-navbar .nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #F5F8FA;
  border-radius: 20px;
  padding: 8px 16px;
  width: 260px;
}
.site-navbar .nav-search svg {
  width: 16px;
  height: 16px;
  color: #7B8E9D;
  flex-shrink: 0;
}
.site-navbar .nav-search input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  padding: 2px 0;
}
.site-navbar .nav-search input::placeholder {
  color: #9AABBC;
}

.site-navbar .hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.site-navbar .hamburger span {
  width: 24px;
  height: 2px;
  background: #334451;
  border-radius: 2px;
}

@media (max-width: 768px) {
  .site-navbar nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid #E6ECF1;
    flex-direction: column;
    padding: 16px 5%;
    gap: 16px;
  }
  .site-navbar nav.open {
    display: flex;
  }
  .site-navbar nav a {
    padding: 8px 0;
  }
  .site-navbar nav a::after {
    display: none;
  }
  .site-navbar .hamburger {
    display: flex;
  }
  .site-navbar .bar {
    gap: 10px;
  }
  .site-navbar .nav-actions {
    margin-left: auto;
    gap: 8px;
  }
  .site-navbar .nav-search {
    width: 132px;
    padding: 6px 10px;
  }
  .site-navbar .hamburger {
    display: flex;
    flex-shrink: 0;
  }
}

/* 各页原来的页脚。统一页脚插入后再删掉，这里先藏住，避免闪一下。 */
footer:not(.site-footer) {
  display: none !important;
}

.site-footer {
  padding: 64px 0 26px;
  background: #022145;
  color: #8FA6BC;
  font-size: 13px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}
.site-footer .inner {
  width: min(1200px, 92%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 36px 30px;
}
.site-footer .col { min-width: 0; }
.site-footer h3 { margin: 0; }
.site-footer .toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  margin: 0 0 16px;
  padding: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.6px;
  color: #fff;
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
}
.site-footer .chevron { display: none; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer a {
  display: inline-block;
  padding: 5px 0;
  font-size: 13px;
  color: #8FA6BC;
  text-decoration: none;
  transition: color 0.2s ease, padding-left 0.2s ease;
}
.site-footer a:hover { color: #8FB4D6; padding-left: 4px; }
.site-footer .stack {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.site-footer .contact { display: flex; flex-direction: column; gap: 14px; }
.site-footer .qr-row { display: flex; gap: 12px; }
.site-footer .qr {
  width: 82px;
  height: 82px;
  padding: 4px;
  background: #fff;
  border-radius: 2px;
}
.site-footer .qr img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.site-footer .contact-note { font-size: 12px; color: #5C7A99; }
.site-footer .footer-simple {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.1fr) auto;
  align-items: start;
  gap: 36px 48px;
}
.site-footer .footer-brand p {
  max-width: 240px;
  margin: 14px 0 0;
  color: #8FA6BC;
  font-size: 13px;
  line-height: 1.8;
}
.site-footer .footer-brand img { height: 36px; width: auto; }
.site-footer .footer-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 28px;
  padding-top: 6px;
}
.site-footer .footer-nav a {
  padding: 0;
  font-size: 14px;
  font-weight: 600;
  color: #E7EEF4;
}
.site-footer .footer-nav a:hover { padding-left: 0; color: #8FB4D6; }
.site-footer .contact-title {
  margin-bottom: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.site-footer .qr span {
  display: block;
  margin-top: 6px;
  color: #8FA6BC;
  font-size: 12px;
  text-align: center;
}
.site-footer .footer-mail {
  display: inline-block;
  margin-top: 10px;
  padding: 0;
  color: #D5E4EE;
  font-size: 13px;
}
.site-footer .footer-mail:hover { padding-left: 0; color: #8FB4D6; }
.site-footer .bottom { display: none !important; }
@media (max-width: 768px) {
  .site-footer .footer-simple { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 1100px) {
  .site-footer .inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .site-footer { padding: 36px 0 22px; }
  .site-footer .inner,
  .site-footer .stack { display: block; }
  .site-footer .col { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
  .site-footer .inner > .col:last-child,
  .site-footer .col:last-child { border-bottom: 0; }
  .site-footer .toggle { margin: 0; padding: 16px 0; }
  .site-footer .chevron {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-right: 1.5px solid #8FA6BC;
    border-bottom: 1.5px solid #8FA6BC;
    transform: rotate(-45deg);
    transition: transform 0.3s ease;
  }
  .site-footer .col.is-open .chevron { transform: rotate(45deg); }
  .site-footer .collapse {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
  }
  .site-footer .col.is-open .collapse {
    max-height: 900px;
    opacity: 1;
    padding-bottom: 16px;
  }
}

/* 参考 cmcroanoke：海军蓝、白底、标题偏轻、字距略开、行距宽松 */
body {
  line-height: 1.75;
  letter-spacing: 0.01em;
}
.site-navbar nav a {
  font-size: 15px !important;
  font-weight: 400 !important;
  letter-spacing: 0.08em !important;
}
@media (min-width: 769px) {
  h1 {
    font-weight: 500 !important;
    letter-spacing: 0.03em !important;
    line-height: 1.35 !important;
  }
  .home-hero h1 {
    font-size: 52px !important;
    font-weight: 500 !important;
    letter-spacing: 0.06em !important;
    line-height: 1.3 !important;
  }
  h2 {
    font-size: 25px !important;
    font-weight: 500 !important;
    line-height: 1.5 !important;
    letter-spacing: 0.06em !important;
    color: #022145;
  }
  h3 {
    font-size: 18px !important;
    font-weight: 500 !important;
    line-height: 1.6 !important;
    letter-spacing: 0.03em !important;
  }
  p {
    line-height: 1.85;
    letter-spacing: 0.02em;
  }
}
@media (max-width: 768px) {
  h2 {
    font-size: 22px !important;
    font-weight: 500 !important;
    letter-spacing: 0.04em !important;
    line-height: 1.45 !important;
  }
  p { line-height: 1.8; }
}

/* 各页底部同一块：栏目介绍、团队入口、联系方式和版权说明 */
.home-team{
  display:grid !important;
  grid-template-columns:minmax(0,1.45fr) minmax(280px,420px);
  background:#022145 !important;
  color:#fff !important;
  overflow:hidden;
}
.home-team-main{
  display:flex;
  align-items:center;
  min-width:0;
  padding:48px 40px 48px max(32px,calc((100vw - 1200px) / 2));
}
.home-team-copy h2{
  margin:0 0 12px !important;
  color:#fff !important;
}
.home-team-copy p{
  margin:0;
  max-width:460px;
  color:rgba(255,255,255,.82) !important;
  font-size:15px;
  line-height:1.85;
}
.home-team-link{
  display:inline-flex;
  margin-top:18px;
  padding:10px 18px;
  border:1px solid rgba(255,255,255,.75);
  border-radius:4px;
  background:transparent !important;
  color:#fff !important;
  font-weight:700;
  text-decoration:none;
}
.home-team-link:hover{background:rgba(255,255,255,.12) !important}
.home-team-side{
  padding:48px 28px 48px 32px;
  background:transparent !important;
  color:#D5E2EC;
}
.home-team-side h2{
  margin:0 0 16px !important;
  color:#fff !important;
  font-size:22px !important;
}
.home-team-qrs{display:flex;gap:16px}
.home-team-qrs figure{margin:0}
.home-team-qrs img{
  width:84px !important;
  height:84px !important;
  object-fit:cover;
  background:#fff;
  border-radius:4px;
}
.home-team-qrs figcaption{
  margin-top:6px;
  font-size:12px;
  text-align:center;
  color:rgba(255,255,255,.78) !important;
}
.home-team-mail{
  display:inline-block;
  margin-top:16px;
  color:rgba(255,255,255,.78) !important;
  font-size:14px;
  text-decoration:none;
}
.home-team-copyline{
  margin:16px 0 0;
  font-size:12.5px;
  line-height:1.7;
  color:rgba(255,255,255,.78) !important;
}
.home-team-copyline a{
  color:rgba(255,255,255,.78) !important;
  font-size:12.5px;
  font-weight:400;
  text-decoration:underline;
  text-underline-offset:3px;
}
.home-team-copyline a:hover{color:#fff !important}
@media (max-width: 768px) {
  .home-team{grid-template-columns:1fr}
  .home-team-main,.home-team-side{padding:32px 6%}
  .home-team-side{padding-bottom:36px}
}

/* 顶部导航：白底、海军蓝字；搜索框用较小圆角 */
.site-navbar {
  background: #fff;
  border-bottom: 1px solid #E6ECF1;
}
.site-navbar nav a,
.site-navbar nav a:hover,
.site-navbar nav a[aria-current="page"] {
  color: #022145 !important;
}
.site-navbar nav a::after {
  background: #022145;
}
.site-navbar .hamburger span {
  background: #022145;
}
.site-navbar .nav-search {
  border-radius: 4px;
  background: #F5F8FA;
}
@media (max-width: 768px) {
  .site-navbar nav {
    background: #fff;
    border-bottom: 1px solid #E6ECF1;
  }
}
