/* WhyNext 全站页头页脚（唯一一份样式）。
   HTML 由 scripts/build_site_index.py 的 sitebar() / site_footer() 生成；报告页的导航由 atlas-report.js 注入，
   链接列表也由 build_site_index.py 写进去。atlas-research.css 在开头 @import 本文件；
   不加载 atlas-research.css 的页面（/top-risk/）直接 <link> 本文件。
   字号用 px，不受各页根字号影响。 */
body { padding-top: 52px; position: relative; }
.sitebar { position: absolute; top: 0; left: 0; right: 0; height: 52px; background: var(--navy, #0b2545); font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif; z-index: 20; line-height: normal; }
.sitebar-in { max-width: 1240px; height: 100%; margin: 0 auto; padding: 0 48px; display: flex; align-items: center; gap: 22px; box-sizing: border-box; }
.sitebar a { color: rgba(255,255,255,.75); text-decoration: none; font-size: 16.5px; white-space: nowrap; }
.sitebar a:hover, .sitebar a[aria-current] { color: #fff; }
.sitebar a:focus-visible { outline: 2px solid #e8c76a; outline-offset: 2px; }
.sitebar .sb-brand { color: #fff; font-weight: 800; font-size: 16px; letter-spacing: .18em; }
.sitebar .sb-brand i { font-style: normal; color: #e8c76a; margin: 0; }
.sitebar .sb-brand::before { content: ""; display: inline-block; width: 20px; height: 20px; margin-right: 8px; vertical-align: -4px; background: url(/assets/logo.svg) center/contain no-repeat; }
.sitebar nav { display: flex; gap: 20px; flex: 1; min-width: 0; }
.sitebar .sb-lang { padding: 3px 10px; border: 1px solid rgba(255,255,255,.35); font-size: 14.5px; font-weight: 600; letter-spacing: .08em; }
.sitebar .sb-lang:hover { border-color: #fff; }
.sitebar .sb-give { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; font-size: 15px; }
.sitebar .sb-give span { color: #f472a6; font-size: 18px; }
.sitebar .sb-give:hover { border-color: #f472a6; }
@media (max-width: 760px) { .sitebar .sb-give b { display: none; } }
@media (max-width: 640px) {
  .sitebar-in { padding: 0 16px; gap: 14px; }
  .sitebar nav { gap: 14px; overflow-x: auto; scrollbar-width: none; }
  .sitebar nav::-webkit-scrollbar { display: none; }
  .sitebar .sb-opt { display: none; }
  .sitebar .sb-brand { font-size: 14.8px; letter-spacing: .12em; }
}
@media (max-width: 440px) { .sitebar .sb-brand::before { display: none; } }
@media print { body { padding-top: 0; } .sitebar { display: none; } }

/* 页脚：站点页用 build_site_index.foot()（放在正文容器里）；独立版式的页面（/top-risk/）用 .site-foot */
.site-foot { max-width: 1240px; margin: 0 auto; padding: 18px 48px 40px; box-sizing: border-box; font: 15px/1.7 "Inter", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; color: #4b5563; }
.site-foot p { margin: 0 0 6px; }
.site-foot a { color: #0b2545; }
@media (max-width: 640px) { .site-foot { padding: 14px 16px 32px; } }
