/* ==========================================================================
   新生命官网 · 设计系统 site.css
   浅色简洁·开发者风 | 品牌主色：新生命绿
   目录结构：设计令牌 → 基础 → 布局 → 组件 → 页面区块 → 响应式
   ========================================================================== */

/* ===== 设计令牌 ===== */
:root {
  /* 品牌色 · 新生命绿 */
  --nl-primary: #0E9F6E;
  --nl-primary-dark: #0A7A54;
  --nl-primary-darker: #075E41;
  --nl-primary-light: #E6F6EF;
  --nl-primary-lighter: #F2FBF7;
  --nl-gradient: linear-gradient(135deg, #0B6E4F 0%, #0E9F6E 48%, #34D399 100%);

  /* 中性色 */
  --nl-bg: #FFFFFF;
  --nl-bg-gray: #F7F8FA;
  --nl-bg-dark: #0F172A;
  --nl-text: #1A1D21;
  --nl-text-secondary: #5C6370;
  --nl-muted: #9AA0AB;
  --nl-border: #E5E7EB;
  --nl-border-light: #F0F1F3;

  /* 功能色 */
  --nl-danger: #E5484D;
  --nl-warning: #F5A623;
  --nl-info: #3B82F6;

  /* 圆角与阴影 */
  --nl-radius-sm: 6px;
  --nl-radius: 10px;
  --nl-radius-lg: 16px;
  --nl-shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --nl-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 12px rgba(16, 24, 40, .08);
  --nl-shadow-lg: 0 8px 30px rgba(16, 24, 40, .12);

  /* 字体 */
  --nl-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
             "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --nl-font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  /* 布局 */
  --nl-header-h: 60px;
  --nl-container: 1200px;
}

/* ===== 基础 ===== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--nl-font);
  font-size: 15px;
  line-height: 1.7;
  color: var(--nl-text);
  background: var(--nl-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--nl-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--nl-primary-dark); }

h1, h2, h3, h4, h5 { margin: 0; line-height: 1.35; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
img { max-width: 100%; display: block; }

.container { max-width: var(--nl-container); margin: 0 auto; padding: 0 24px; }

mark { background: #FEF3C7; color: inherit; border-radius: 3px; padding: 0 2px; }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 22px; border-radius: 8px; font-size: 14.5px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; line-height: 1.4;
  transition: all .2s; white-space: nowrap; font-family: var(--nl-font);
}
.btn-primary { background: var(--nl-primary); color: #fff; }
.btn-primary:hover { background: var(--nl-primary-dark); color: #fff; transform: translateY(-1px); box-shadow: var(--nl-shadow); }
.btn-outline { border-color: var(--nl-border); color: var(--nl-text); background: #fff; }
.btn-outline:hover { border-color: var(--nl-primary); color: var(--nl-primary); }
.btn-white { background: #fff; color: var(--nl-primary); }
.btn-white:hover { background: var(--nl-primary-light); color: var(--nl-primary); }
.btn-lg { padding: 12px 30px; font-size: 15.5px; border-radius: 10px; }
.btn-sm { padding: 6px 14px; font-size: 13px; border-radius: 6px; }

/* ===== 顶部导航 ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--nl-border-light);
  transition: box-shadow .25s;
}
.site-header.scrolled { box-shadow: var(--nl-shadow-sm); }
.site-header .container { display: flex; align-items: center; height: var(--nl-header-h); gap: 28px; }

.brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; color: var(--nl-text); flex-shrink: 0; }
.brand:hover { color: var(--nl-text); }
.brand .logo {
  width: 34px; height: 34px; border-radius: 8px; object-fit: cover; flex-shrink: 0;
  box-shadow: var(--nl-shadow-sm);
}

.main-nav { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; }
.main-nav > a, .nav-dropdown > a {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 12px; border-radius: 8px; font-size: 14.5px; color: var(--nl-text-secondary);
  white-space: nowrap;
}
.main-nav > a:hover, .nav-dropdown > a:hover, .main-nav > a.active, .nav-dropdown > a.active { color: var(--nl-primary); background: var(--nl-primary-light); }

.nav-dropdown { position: relative; }
.nav-dropdown .caret { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; margin-left: 2px; }
.nav-dropdown .dd-menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 220px;
  background: #fff; border: 1px solid var(--nl-border-light); border-radius: var(--nl-radius);
  box-shadow: var(--nl-shadow-lg); padding: 6px; display: none; z-index: 101;
}
/* 透明桥：填补触发项与菜单间的 6px 视觉间隙，鼠标下移穿过间隙时 :hover 不中断，菜单不消失。
   top 取 -7px 而非 -6px：菜单有 1px 边框，绝对定位相对内边距盒，需多上移 1px 才能贴到触发项底边 */
.nav-dropdown .dd-menu::before {
  content: ""; position: absolute; top: -7px; left: 0; right: 0; height: 7px;
}
.nav-dropdown:hover .dd-menu, .nav-dropdown.open .dd-menu { display: block; }
.nav-dropdown .dd-menu a {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 6px;
  color: var(--nl-text-secondary); font-size: 14px;
}
.nav-dropdown .dd-menu a:hover { background: var(--nl-bg-gray); color: var(--nl-text); }
.nav-dropdown .dd-menu .dd-desc { font-size: 12px; color: var(--nl-muted); margin-left: auto; }

.nav-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

/* 搜索框 */
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--nl-bg-gray); border: 1px solid var(--nl-border);
  border-radius: 20px; padding: 0 14px; height: 36px; width: 200px;
  transition: all .2s;
}
.search-box:focus-within { border-color: var(--nl-primary); background: #fff; box-shadow: 0 0 0 3px var(--nl-primary-light); }
.search-box .icon { color: var(--nl-muted); display: flex; flex-shrink: 0; }
.search-box input { border: none; outline: none; background: transparent; flex: 1; font-size: 13.5px; min-width: 0; color: var(--nl-text); font-family: var(--nl-font); }
.search-box input::placeholder { color: var(--nl-muted); }

/* 汉堡菜单（移动端） */
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; padding: 0 8px; background: none; border: none; cursor: pointer; border-radius: 8px;
}
.nav-toggle:hover { background: var(--nl-bg-gray); }
.nav-toggle span { display: block; height: 2px; background: var(--nl-text); border-radius: 2px; transition: all .25s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== 巨幕横幅（首页） ===== */
.hero {
  background: var(--nl-gradient); color: #fff; text-align: center;
  padding: 92px 24px 100px; position: relative; overflow: hidden;
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .07); pointer-events: none;
}
.hero::before { width: 420px; height: 420px; top: -160px; right: -80px; }
.hero::after { width: 300px; height: 300px; bottom: -140px; left: -60px; }
.hero .hero-inner { position: relative; z-index: 1; }
.hero .hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 20px; padding: 5px 16px; font-size: 13px; margin-bottom: 22px;
}
.hero h1 { font-size: 52px; font-weight: 800; letter-spacing: 3px; line-height: 1.25; text-shadow: 0 2px 12px rgba(0, 0, 0, .12); }
.hero .sub { font-size: 17px; opacity: .92; max-width: 720px; margin: 20px auto 0; line-height: 1.8; }
.hero .cta { margin-top: 34px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .hero-stats { display: flex; justify-content: center; gap: 44px; margin-top: 52px; flex-wrap: wrap; }
.hero .stat { text-align: center; }
.hero .stat .num { font-size: 26px; font-weight: 700; }
.hero .stat .label { font-size: 13px; opacity: .8; margin-top: 2px; }

/* ===== 区块 ===== */
.section { padding: 56px 0; }
.section-gray { background: var(--nl-bg-gray); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; gap: 16px; }
.section-head .sh-left { display: flex; align-items: center; gap: 12px; }
.section-head .sh-tag { width: 6px; height: 24px; border-radius: 3px; background: var(--nl-primary); }
.section-head h2 { font-size: 24px; font-weight: 700; }
.section-head .sh-sub { color: var(--nl-text-secondary); font-size: 14px; margin-top: 4px; }
.section-head .more { font-size: 14px; color: var(--nl-muted); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.section-head .more:hover { color: var(--nl-primary); }

/* ===== 核心项目卡片（首页） ===== */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 20px; }
.project-card {
  background: #fff; border: 1px solid var(--nl-border-light); border-radius: var(--nl-radius-lg);
  padding: 26px; transition: all .25s; position: relative; overflow: hidden; display: flex; flex-direction: column;
}
.project-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--nl-gradient); opacity: 0; transition: opacity .25s;
}
.project-card:hover { transform: translateY(-4px); box-shadow: var(--nl-shadow); border-color: var(--nl-primary-light); }
.project-card:hover::before { opacity: 1; }
.project-card .p-icon {
  width: 50px; height: 50px; border-radius: 13px; background: var(--nl-primary-light);
  color: var(--nl-primary); display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 16px; font-weight: 800;
}
.project-card h3 { font-size: 17px; }
.project-card .p-en { font-size: 12.5px; color: var(--nl-muted); margin-top: 2px; }
.project-card p { color: var(--nl-text-secondary); font-size: 13.5px; margin-top: 10px; line-height: 1.7; flex: 1; }
.project-card .p-link { margin-top: 16px; font-size: 13.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.project-card .p-badge {
  position: absolute; top: 20px; right: 20px; font-size: 11px; padding: 2px 10px;
  border-radius: 12px; background: var(--nl-primary-lighter); color: var(--nl-primary); font-weight: 600;
}

/* ===== 分类卡片（首页知识库网格） ===== */
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.book-card {
  background: #fff; border: 1px solid var(--nl-border-light); border-radius: var(--nl-radius-lg);
  padding: 24px; transition: all .25s; display: flex; flex-direction: column;
}
.book-card:hover { transform: translateY(-3px); box-shadow: var(--nl-shadow); border-color: var(--nl-primary-light); }
.book-card .b-head { display: flex; align-items: center; gap: 13px; }
.book-card .b-icon {
  width: 44px; height: 44px; border-radius: 11px; display: flex; align-items: center;
  justify-content: center; font-size: 19px; flex-shrink: 0;
}
.book-card h3 { font-size: 16px; }
.book-card .b-desc { color: var(--nl-text-secondary); font-size: 13.5px; margin-top: 12px; line-height: 1.7; flex: 1; }
.book-card .b-meta { display: flex; gap: 18px; color: var(--nl-muted); font-size: 12.5px; margin-top: 16px; }
.book-card .b-meta .num { color: var(--nl-primary); font-weight: 600; margin-left: 2px; }

/* 分类图标配色 */
.ic-green  { background: #E6F6EF; color: #0E9F6E; }
.ic-blue   { background: #E8F1FE; color: #3B82F6; }
.ic-orange { background: #FEF3E2; color: #F59E0B; }
.ic-purple { background: #F0EBFE; color: #8B5CF6; }
.ic-red    { background: #FDECEC; color: #E5484D; }
.ic-cyan   { background: #E0F7FA; color: #06B6D4; }

/* ===== 最新文章（首页） ===== */
.latest-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.latest-item {
  display: flex; gap: 14px; background: #fff; border: 1px solid var(--nl-border-light);
  border-radius: var(--nl-radius); padding: 16px 18px; transition: all .2s; align-items: flex-start;
}
.latest-item:hover { box-shadow: var(--nl-shadow); border-color: var(--nl-primary-light); transform: translateY(-2px); }
.latest-item .l-badge {
  font-size: 11px; padding: 2px 8px; border-radius: 5px; background: var(--nl-primary-light);
  color: var(--nl-primary); font-weight: 600; flex-shrink: 0; margin-top: 3px;
}
.latest-item .l-title { font-size: 14.5px; font-weight: 600; color: var(--nl-text); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.latest-item:hover .l-title { color: var(--nl-primary); }
.latest-item .l-meta { font-size: 12px; color: var(--nl-muted); margin-top: 6px; }

/* ===== 面包屑 ===== */
.crumb { font-size: 13px; color: var(--nl-muted); padding: 16px 0 0; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.crumb a { color: var(--nl-muted); }
.crumb a:hover { color: var(--nl-primary); }
.crumb .sep { margin: 0 7px; color: #D1D5DB; }
.crumb .cur { color: var(--nl-text-secondary); }

/* ===== 页面头（列表页/搜索页） ===== */
.page-head { padding: 36px 0 26px; border-bottom: 1px solid var(--nl-border-light); margin-bottom: 30px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 28px; font-weight: 700; display: flex; align-items: center; gap: 12px; }
.page-head .desc { color: var(--nl-text-secondary); margin-top: 10px; max-width: 700px; }
.page-head .stat { margin-top: 12px; color: var(--nl-muted); font-size: 13.5px; }
.page-head .stat .dot { margin: 0 8px; }
.page-head .head-search { width: 320px; margin-bottom: 4px; }

/* ===== 文章列表（列表页） ===== */
.article-list { display: flex; flex-direction: column; gap: 14px; }
.article-card {
  display: flex; gap: 22px; background: #fff; border: 1px solid var(--nl-border-light);
  border-radius: var(--nl-radius); padding: 20px 24px; transition: all .2s;
}
.article-card:hover { box-shadow: var(--nl-shadow); border-color: var(--nl-primary-light); transform: translateY(-2px); }
.article-card .a-body { flex: 1; min-width: 0; }
.article-card .a-title { font-size: 16.5px; font-weight: 600; color: var(--nl-text); display: flex; align-items: center; gap: 8px; line-height: 1.5; }
.article-card:hover .a-title { color: var(--nl-primary); }
.article-card .a-title .ttrunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.article-card .a-desc {
  color: var(--nl-text-secondary); font-size: 13.5px; margin-top: 7px; line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.article-card .a-meta { display: flex; align-items: center; gap: 18px; color: var(--nl-muted); font-size: 12.5px; margin-top: 11px; flex-wrap: wrap; }
.article-card .a-meta .sep { color: #E5E7EB; }
.article-card .a-cover {
  width: 170px; height: 100px; border-radius: 8px; flex-shrink: 0; background-size: cover; background-position: center; position: relative;
}
.article-card .a-cover::after { content: ""; position: absolute; inset: 0; border-radius: 8px; border: 1px solid rgba(0, 0, 0, .04); }

/* 置顶徽标 */
.badge-top {
  display: inline-flex; align-items: center; gap: 4px; background: var(--nl-primary); color: #fff;
  font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 5px; flex-shrink: 0;
}

/* ===== 分页 ===== */
.pagination { display: flex; gap: 6px; justify-content: center; margin: 44px 0 8px; flex-wrap: wrap; }
.pagination a, .pagination .page-item {
  min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--nl-border); border-radius: 8px; font-size: 13.5px; color: var(--nl-text-secondary);
  padding: 0 6px; background: #fff; transition: all .15s;
}
.pagination a:hover { border-color: var(--nl-primary); color: var(--nl-primary); }
.pagination .cur { background: var(--nl-primary); border-color: var(--nl-primary); color: #fff; font-weight: 600; }
.pagination .disabled { opacity: .4; pointer-events: none; }
.pagination .ellipsis { border: none; color: var(--nl-muted); pointer-events: none; }

/* ===== 详情页 ===== */
.doc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 44px; align-items: start; padding-bottom: 48px; }
.doc-main { min-width: 0; }

.article-header { padding: 26px 0 22px; border-bottom: 1px solid var(--nl-border-light); }
.article-header h1 { font-size: 30px; font-weight: 700; line-height: 1.45; }
.article-meta { display: flex; align-items: center; gap: 20px; color: var(--nl-muted); font-size: 13px; margin-top: 16px; flex-wrap: wrap; }
.article-meta .sep { color: #E5E7EB; }
.article-meta .meta-strong { color: var(--nl-text-secondary); }

/* 正文（自有样式，为脱离语雀做准备） */
.article-content { padding: 30px 0 42px; font-size: 15.5px; line-height: 1.9; color: var(--nl-text); word-break: break-word; }
.article-content > *:first-child { margin-top: 0; }
.article-content h2 { font-size: 22px; margin: 34px 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--nl-border-light); }
.article-content h3 { font-size: 18px; margin: 28px 0 10px; }
.article-content h4 { font-size: 16px; margin: 22px 0 8px; }
.article-content p { margin: 14px 0; }
.article-content ul, .article-content ol { margin: 14px 0; padding-left: 26px; }
.article-content li { margin: 6px 0; }
.article-content a { color: var(--nl-primary); text-decoration: underline; text-underline-offset: 3px; }
.article-content blockquote {
  margin: 18px 0; padding: 12px 18px; border-left: 3px solid var(--nl-primary);
  background: var(--nl-primary-lighter); border-radius: 0 var(--nl-radius-sm) var(--nl-radius-sm) 0;
  color: var(--nl-text-secondary);
}
.article-content code {
  font-family: var(--nl-font-mono); font-size: .9em; background: var(--nl-bg-gray);
  border: 1px solid var(--nl-border-light); border-radius: 4px; padding: 2px 6px; color: var(--nl-primary-dark);
}
.article-content pre {
  background: #0F172A; color: #E2E8F0; border-radius: var(--nl-radius);
  padding: 18px 20px; overflow-x: auto; margin: 18px 0; line-height: 1.65; font-size: 13.5px;
}
.article-content pre code { background: none; border: none; padding: 0; color: inherit; font-size: inherit; }
.article-content table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14px; }
.article-content th, .article-content td { border: 1px solid var(--nl-border); padding: 9px 14px; text-align: left; }
.article-content th { background: var(--nl-bg-gray); font-weight: 600; }
.article-content img { border-radius: var(--nl-radius); margin: 18px 0; box-shadow: var(--nl-shadow-sm); }
.article-content hr { border: none; border-top: 1px solid var(--nl-border-light); margin: 28px 0; }

/* 目录树 */
.toc {
  position: sticky; top: calc(var(--nl-header-h) + 20px);
  background: #fff; border: 1px solid var(--nl-border-light); border-radius: var(--nl-radius);
  padding: 16px 12px; max-height: calc(100vh - 110px); overflow-y: auto;
}
.toc .toc-title { font-size: 12.5px; color: var(--nl-muted); font-weight: 600; margin-bottom: 12px; padding: 0 8px; display: flex; align-items: center; gap: 6px; }
.toc ul { list-style: none; }
.toc ul ul { padding-left: 14px; }
.toc a {
  display: block; padding: 5px 10px; border-radius: 6px; font-size: 13px;
  color: var(--nl-text-secondary); border-left: 2px solid transparent; line-height: 1.6;
}
.toc a:hover { color: var(--nl-primary); background: var(--nl-bg-gray); }
.toc a.active { color: var(--nl-primary); background: var(--nl-primary-light); border-left-color: var(--nl-primary); font-weight: 600; }
.toc .toc-level-3 { font-size: 12.5px; }

/* 上一篇/下一篇 */
.article-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; border-top: 1px solid var(--nl-border-light); padding-top: 26px; margin-bottom: 10px; }
.article-nav .nav-item { background: var(--nl-bg-gray); border: 1px solid var(--nl-border-light); border-radius: var(--nl-radius); padding: 14px 18px; color: var(--nl-text-secondary); transition: all .2s; min-width: 0; }
.article-nav .nav-item:hover { color: var(--nl-primary); border-color: var(--nl-primary-light); box-shadow: var(--nl-shadow-sm); }
.article-nav .nav-item.next { text-align: right; }
.article-nav .nav-label { font-size: 12px; color: var(--nl-muted); }
.article-nav .nav-title { font-size: 14px; font-weight: 600; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== 搜索页 ===== */
.search-hero { background: var(--nl-bg-gray); border-bottom: 1px solid var(--nl-border-light); padding: 44px 0 40px; }
.search-hero .container { max-width: 760px; }
.search-box-lg {
  display: flex; align-items: center; gap: 12px; background: #fff;
  border: 1px solid var(--nl-border); border-radius: 12px; padding: 0 20px; height: 54px;
  box-shadow: var(--nl-shadow); transition: all .2s;
}
.search-box-lg:focus-within { border-color: var(--nl-primary); box-shadow: 0 0 0 4px var(--nl-primary-light); }
.search-box-lg .icon { color: var(--nl-muted); display: flex; }
.search-box-lg input { border: none; outline: none; background: transparent; flex: 1; font-size: 16px; color: var(--nl-text); font-family: var(--nl-font); }
.search-box-lg .btn { flex-shrink: 0; }

.search-result { max-width: 860px; margin: 0 auto; }
.search-result-count { color: var(--nl-text-secondary); font-size: 14px; margin: 30px 0 6px; }
.search-result-count strong { color: var(--nl-primary); }
.search-result-item { border-bottom: 1px solid var(--nl-border-light); padding: 20px 0; transition: padding-left .2s; }
.search-result-item:hover { padding-left: 8px; }
.search-result-item .sr-title { font-size: 16.5px; font-weight: 600; color: var(--nl-text); }
.search-result-item:hover .sr-title { color: var(--nl-primary); }
.search-result-item .sr-desc { color: var(--nl-text-secondary); font-size: 13.5px; margin-top: 6px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.search-result-item .sr-meta { color: var(--nl-muted); font-size: 12.5px; margin-top: 8px; }

.search-empty { text-align: center; padding: 72px 0 56px; color: var(--nl-muted); }
.search-empty .se-icon { font-size: 44px; margin-bottom: 16px; opacity: .5; }
.search-empty h3 { color: var(--nl-text-secondary); font-size: 17px; }
.search-empty p { font-size: 13.5px; margin-top: 8px; }

/* ===== 产品宣传页（HTML 文章内容区） ===== */
.product-page { padding: 8px 0 20px; }
.product-page .pp-note {
  display: flex; align-items: center; gap: 8px; background: #FEF9E7; border: 1px dashed #F0D488;
  color: #92600A; border-radius: 8px; padding: 10px 16px; font-size: 13px; margin-bottom: 24px;
}

/* ===== 页尾 ===== */
.site-footer { background: var(--nl-bg-dark); color: #9CA3AF; padding: 52px 0 30px; margin-top: 64px; }
.f-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; }
.f-brand .f-logo { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; color: #fff; }
.f-brand .f-logo .logo { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.f-brand p { font-size: 13px; line-height: 1.9; margin-top: 14px; color: #8A93A6; max-width: 320px; }
.f-col h4 { color: #fff; font-size: 14.5px; margin-bottom: 16px; font-weight: 600; }
.f-col a { display: block; color: #9CA3AF; font-size: 13.5px; padding: 5px 0; transition: color .2s; }
.f-col a:hover { color: #fff; }
.f-bottom { border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 40px; padding-top: 22px; display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; flex-wrap: wrap; gap: 8px; }
.f-bottom a { color: #8A93A6; }
.f-bottom a:hover { color: #fff; }

/* ===== 预览入口页（仅设计稿阶段使用） ===== */
.preview-hero { background: var(--nl-bg-dark); color: #fff; padding: 72px 24px; text-align: center; }
.preview-hero h1 { font-size: 34px; }
.preview-hero p { color: #8A93A6; margin-top: 12px; }
.preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; padding: 48px 0 80px; }
.preview-card {
  background: #fff; border: 1px solid var(--nl-border-light); border-radius: var(--nl-radius-lg);
  overflow: hidden; transition: all .25s; display: block; color: inherit;
}
.preview-card:hover { transform: translateY(-4px); box-shadow: var(--nl-shadow-lg); color: inherit; }
.preview-card .pv-thumb { height: 150px; background: var(--nl-gradient); display: flex; align-items: center; justify-content: center; font-size: 40px; }
.preview-card .pv-thumb.alt { background: linear-gradient(135deg, #1E293B, #334155); }
.preview-card .pv-body { padding: 18px 20px; }
.preview-card h3 { font-size: 16px; }
.preview-card p { color: var(--nl-text-secondary); font-size: 13px; margin-top: 6px; }
.preview-card .pv-tag { display: inline-block; font-size: 11px; background: var(--nl-primary-light); color: var(--nl-primary); border-radius: 4px; padding: 2px 8px; margin-top: 12px; font-weight: 600; }

/* ===== 响应式 ===== */
@media (max-width: 1100px) {
  .doc-layout { grid-template-columns: minmax(0, 1fr) 240px; gap: 28px; }
  .f-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-actions .search-box { display: none; }
  .main-nav {
    position: fixed; top: var(--nl-header-h); left: 0; right: 0; bottom: 0;
    background: #fff; flex-direction: column; align-items: stretch; gap: 4px;
    padding: 16px 24px 40px; overflow-y: auto; display: none; box-shadow: var(--nl-shadow-lg);
    border-top: 1px solid var(--nl-border-light);
  }
  .main-nav.open { display: flex; }
  .main-nav > a, .nav-dropdown > a { padding: 13px 14px; font-size: 15px; border-radius: 10px; }
  .nav-dropdown .dd-menu { position: static; display: none; box-shadow: none; border: none; padding: 0 0 0 16px; min-width: 0; }
  .nav-dropdown .dd-menu::before { display: none; }
  .nav-dropdown.open .dd-menu { display: block; }
  .nav-actions { gap: 8px; }
  .nav-actions .btn-sm { padding: 6px 12px; }
  .hero h1 { font-size: 38px; letter-spacing: 2px; }
  .hero { padding: 72px 20px 80px; }
  .hero .hero-stats { gap: 32px; }
  .doc-layout { grid-template-columns: 1fr; }
  .toc { display: none; }
  .article-header h1 { font-size: 24px; }
  .page-head .head-search { width: 100%; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .section { padding: 40px 0; }
  .hero h1 { font-size: 30px; }
  .hero .sub { font-size: 15px; }
  .hero .cta { flex-direction: column; align-items: center; }
  .article-card { flex-direction: column; padding: 18px; gap: 14px; }
  .article-card .a-cover { width: 100%; height: 150px; }
  .article-nav { grid-template-columns: 1fr; }
  .f-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .pagination a, .pagination .page-item { min-width: 34px; height: 34px; font-size: 13px; }
  .search-box-lg { height: 48px; padding: 0 16px; }
  .search-box-lg input { font-size: 14.5px; }
  .section-head h2 { font-size: 20px; }
}
