/* 公共导航和内容容器 */
.topbar {
  max-width: 1200px;
  margin: 8px auto;
  padding-inline: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: 'brand right' 'nav nav';
  row-gap: 16px;
  align-items: center;
}
.brand { grid-area: brand; justify-self: start; }
.nav { grid-area: nav; display: flex; gap: 24px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav a {
  flex: none;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  font-size: var(--fs-lg); font-weight: var(--fw-lg);
  line-height: 1.33334;
  color: var(--text-3);
  white-space: nowrap;
}
.nav a:is(:hover, :focus-visible, .active) { color: #fff; }
.nav a.active { border-bottom-color: var(--brand); }
.nav a:focus-visible { outline-offset: -2px; }
.nav-right { grid-area: right; display: flex; align-items: center; gap: var(--sp-2); }

/* 图标按钮（语言 / 登录）：36px、6px 圆角、soft 底 */
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.25rem; min-height: 2.25rem;
  border: 0; border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--text-3);
  cursor: pointer;
}
.icon-btn svg { width: 1.5rem; height: 1.5rem; fill: currentColor; }
.icon-btn:hover { color: var(--text); }

main { max-width: 1200px; margin: 0 auto; padding: var(--sp-6) 24px; }

/* 内容少的页面（联系我们等）把页脚压到视口底部。
   ⚠️ flex 下 header/main/footer 自带的 margin:auto 会阻止横向拉伸，必须显式给满宽，
   否则 .topbar 会缩成内容宽度、logo 跑到中间。 */
body { min-height: 100dvh; display: flex; flex-direction: column; }
body > :is(header, main, footer) { width: 100%; }
body > main { flex: 1 0 auto; }

@media (max-width: 599px) { .topbar, main { padding-inline: 16px; } }
.brand img { display: block; height: 36px; max-width: 100%; width: auto; padding: 2px; object-fit: contain; }

/* 全站页脚（原站同款：版权 + 6 个法律/价格/联系入口） */
.site-footer {
  max-width: 1200px;
  margin: var(--sp-6) auto 0;
  padding: var(--sp-4) 24px var(--sp-6);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  row-gap: var(--sp-2);
  column-gap: var(--sp-4);
}
.site-footer-copy { font-size: var(--fs-xs); color: var(--text-3); }
.site-footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  row-gap: var(--sp-2);
}
.site-footer-links li { display: flex; align-items: center; }
.site-footer-links li:not(:last-of-type) {
  padding-right: .8rem;
  margin-right: .8rem;
  border-right: 1px solid var(--line);
}
.site-footer-links a {
  font-size: var(--fs-xs);
  color: var(--text-3);
  text-decoration: none;
  white-space: nowrap;
}
.site-footer-links a:hover { color: var(--text); text-decoration: underline; }
@media (max-width: 599px) {
  .site-footer { padding-inline: 16px; align-items: flex-start; flex-direction: column; }
  /* 窄屏会折行，竖线分隔符留在行尾很难看，改成纯间距 */
  .site-footer-links { column-gap: var(--sp-3); row-gap: var(--sp-2); }
  .site-footer-links li:not(:last-of-type) { padding-right: 0; margin-right: 0; border-right: 0; }
}
