/* 全站导航（适用于自定义主题文章：三角函数、CNN 等） */
nav.site-nav {
  position: fixed; top: 0; left: 0; right: 0;
  background: rgba(248,250,252,.92); backdrop-filter: blur(16px);
  border-bottom: 1.5px solid rgba(0,0,0,.06); z-index: 1000;
  min-height: 60px; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 24px; overflow: visible;
}
.site-nav .logo {
  font-family: 'Baloo 2', cursive; font-size: 1.25rem; font-weight: 800; color: #2563EB;
  display: flex; align-items: center; gap: 8px; text-decoration: none;
  flex-shrink: 0; white-space: nowrap; line-height: 1.25;
}
.site-nav .logo svg { width: 28px; height: 28px; flex-shrink: 0; }
.site-nav .nav-links { list-style: none; display: flex; gap: 6px; flex-wrap: wrap; margin: 0; padding: 0; flex-shrink: 1; min-width: 0; justify-content: flex-end; }
.site-nav .nav-links a { text-decoration: none; color: #64748B; font-size: .9rem; font-weight: 500; padding: 6px 14px; border-radius: 999px; transition: background .2s, color .2s; }
.site-nav .nav-links a:hover { background: rgba(37,99,235,.08); color: #2563EB; }
.site-nav .nav-home { margin-left: auto; margin-right: 8px; }

.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: none; border-radius: 10px;
  background: rgba(37,99,235,.08); color: #2563EB; cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  body > nav:not(.category-nav) .nav-links,
  nav.site-nav .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; background: rgba(248,250,252,.98);
    padding: 12px 16px 16px; border-bottom: 1px solid rgba(0,0,0,.06);
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
  }
  body > nav:not(.category-nav) .nav-links.open,
  nav.site-nav .nav-links.open { display: flex; }
}

.article-nav {
  display: flex; justify-content: center; align-items: center; gap: 16px;
  max-width: 860px; margin: 0 auto; padding: 0 24px 40px;
}
.article-nav a { color: #2563EB; text-decoration: none; font-weight: 600; font-size: .95rem; }
.article-nav a:hover { text-decoration: underline; }
.article-nav .nav-home { color: #64748B; font-weight: 500; font-size: .88rem; }

.page-with-nav { padding-top: 60px; }
