/* ============================================================
   AIPicks 2.0 —— 主样式表

   组织顺序：
     1. 主题变量（浅色 / 深色）
     2. 基础重置与排版
     3. 布局骨架（头部 / 主区 / 页脚）
     4. 组件（按钮、卡片、评分条、标签、开关…）
     5. 视图专属（首页 / 工具库 / 对比 / 排行 / 方法论）
     6. 浮层（抽屉 / 弹窗 / 对比托盘）
     7. 响应式断点

   约定：
     - 颜色一律走 CSS 变量，不写死色值，方便换主题
     - 尺寸用 rem / 百分比，少用 px 硬编码
     - 需要新增主题只改 :root 与 [data-theme="light"] 两处
   ============================================================ */

/* ---------- 1. 主题变量 ---------- */
:root {
  /* 深色（默认） */
  --bg: #0b0e1a;
  --bg-soft: #10141f;
  --surface: #141928;
  --surface-2: #1a2033;
  --border: #242b40;
  --border-soft: #1e2436;
  --text: #e9ecf5;
  --text-dim: #98a0bd;
  --text-faint: #6b7391;
  --accent: #8b5cf6;
  --accent-soft: rgba(139, 92, 246, 0.14);
  --accent-text: #a78bfa;
  --good: #34d399;
  --good-soft: rgba(52, 211, 153, 0.13);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, 0.13);
  --bad: #f87171;
  --bad-soft: rgba(248, 113, 113, 0.13);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.25);
  --radius: 14px;
  --radius-sm: 9px;
  --header-h: 62px;
}

[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-soft: #eef0f7;
  --surface: #ffffff;
  --surface-2: #f2f4fa;
  --border: #e0e4f0;
  --border-soft: #eaeef7;
  --text: #131727;
  --text-dim: #5b6480;
  --text-faint: #8b93ad;
  --accent: #7c3aed;
  --accent-soft: rgba(124, 58, 237, 0.10);
  --accent-text: #6d28d9;
  --good: #059669;
  --good-soft: rgba(5, 150, 105, 0.10);
  --warn: #d97706;
  --warn-soft: rgba(217, 119, 6, 0.10);
  --bad: #dc2626;
  --bad-soft: rgba(220, 38, 38, 0.10);
  --shadow: 0 10px 30px rgba(20, 24, 40, 0.08);
  --shadow-sm: 0 2px 10px rgba(20, 24, 40, 0.06);
}

/* ---------- 2. 基础重置与排版 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont,
               "Segoe UI", Inter, Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 700; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }

/* 键盘可达性：Tab 焦点必须有可见轮廓 */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ⚠️ 兜底：HTML hidden 属性默认是 display:none，但下面的浮层元素都设了
   display: flex/block 等显式规则，会覆盖 hidden。强制 !important 兜底 */
[hidden] { display: none !important; }

/* 跳转到主内容：默认隐藏，聚焦时滑出 */
.skip-link {
  position: fixed;
  top: -60px; left: 12px;
  z-index: 200;
  background: var(--accent);
  color: #fff;
  padding: 8px 14px;
  border-radius: 0 0 8px 8px;
  transition: top .2s;
}
.skip-link:focus { top: 0; }

/* ---------- 3. 布局骨架 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: var(--header-h);
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -.2px;
  flex-shrink: 0;
}
.brand-mark { font-size: 19px; }
.brand-text {
  background: linear-gradient(92deg, var(--accent-text), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.main-nav { display: flex; gap: 4px; flex-shrink: 0; }
.nav-link {
  padding: 7px 12px;
  border-radius: 9px;
  font-size: 14px;
  color: var(--text-dim);
  transition: background .18s, color .18s;
  white-space: nowrap;
}
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.active { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }

/* 对比数量角标 */
.nav-badge {
  display: inline-block;
  min-width: 17px;
  margin-left: 5px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  text-align: center;
  line-height: 17px;
}

/* 搜索框 */
.search-box {
  flex: 1;
  max-width: 360px;
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 12px;
  font-size: 13px;
  opacity: .55;
  pointer-events: none;
}
.search-input {
  width: 100%;
  height: 38px;
  padding: 0 34px 0 34px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  transition: border-color .18s, background .18s;
}
.search-input::placeholder { color: var(--text-faint); }
.search-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface-2);
}
/* 去掉 Chrome 搜索框自带的清除按钮，用自己的 */
.search-input::-webkit-search-cancel-button { display: none; }
.search-clear {
  position: absolute;
  right: 8px;
  border: none;
  background: none;
  color: var(--text-faint);
  cursor: pointer;
  font-size: 13px;
  padding: 4px;
  line-height: 1;
}
.search-clear:hover { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }

.icon-btn {
  position: relative;
  height: 34px;
  min-width: 34px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  cursor: pointer;
  font-size: 14px;
  transition: background .18s, border-color .18s;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--accent); }

.icon-badge {
  position: absolute;
  top: -5px; right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
}

.menu-toggle { display: none; }

/* 移动端下拉菜单 */
.mobile-nav {
  border-top: 1px solid var(--border-soft);
  padding: 8px 16px 14px;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.mobile-nav-link {
  padding: 11px 8px;
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 15px;
}
.mobile-nav-link:hover, .mobile-nav-link.active { background: var(--accent-soft); color: var(--accent-text); }

/* 主区 */
main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 20px 120px;
  min-height: 60vh;
}

/* 页脚 */
.site-footer {
  border-top: 1px solid var(--border-soft);
  background: var(--bg-soft);
  padding: 30px 20px;
}
.footer-inner { max-width: 1280px; margin: 0 auto; }
.footer-brand { font-weight: 700; margin-bottom: 6px; }
.footer-note { color: var(--text-dim); font-size: 13.5px; max-width: 640px; }
.footer-meta { color: var(--text-faint); font-size: 12.5px; margin-top: 10px; }

/* ---------- 4. 组件 ---------- */

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s, opacity .18s, background .18s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { opacity: .9; }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-sm { height: 32px; padding: 0 13px; font-size: 13.5px; }
.btn-block { width: 100%; }

/* Hero */
.hero { text-align: center; padding: 36px 0 30px; }
.hero-eyebrow {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 16px;
}
.hero-title {
  font-size: clamp(26px, 4.4vw, 42px);
  letter-spacing: -.6px;
  margin-bottom: 14px;
  background: linear-gradient(180deg, var(--text), var(--text-dim));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub {
  max-width: 620px;
  margin: 0 auto 22px;
  color: var(--text-dim);
  font-size: 15.5px;
}
.hero-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* 统计条 */
.stat-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  max-width: 760px;
  margin: 30px auto 0;
}
.stat-item {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 14px 10px;
}
.stat-value { font-size: 24px; font-weight: 800; color: var(--accent-text); line-height: 1.2; }
.stat-label { font-size: 12.5px; color: var(--text-dim); margin-top: 2px; }

/* 区块 */
.section { margin-top: 42px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.section-title { font-size: 20px; }
.section-more { font-size: 13.5px; color: var(--accent-text); }
.section-more:hover { text-decoration: underline; }
.section-note { font-size: 13px; color: var(--text-faint); }

/* 分类入口 */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.category-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 13px 14px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  transition: border-color .18s, transform .15s;
}
.category-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.category-name { font-weight: 600; font-size: 14px; }
.category-count { font-size: 12.5px; color: var(--text-faint); }

/* 工具卡片网格 */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 14px;
}

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .18s, transform .15s, box-shadow .18s;
}
.tool-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.tool-card-head { display: flex; align-items: flex-start; gap: 10px; }
.tool-avatar {
  width: 38px; height: 38px;
  flex-shrink: 0;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-weight: 700;
  font-size: 16px;
}
.tool-name-wrap { min-width: 0; flex: 1; }
.tool-name { font-size: 15.5px; font-weight: 700; }
.tool-cat { font-size: 12px; color: var(--text-faint); }

.tool-oneline {
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.55;
  /* 最多两行，超出省略，保持卡片高度一致 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 评分条 */
.score-row { display: flex; align-items: center; gap: 8px; }
.score-bar {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--surface-2);
  overflow: hidden;
}
.score-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-text));
  transition: width .4s ease;
}
.score-num { font-size: 13px; font-weight: 700; color: var(--accent-text); min-width: 28px; text-align: right; }

/* 标签 */
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.tag-good { background: var(--good-soft); color: var(--good); }
.tag-warn { background: var(--warn-soft); color: var(--warn); }
.tag-bad  { background: var(--bad-soft);  color: var(--bad); }
.tag-soft { background: var(--surface-2); color: var(--text-dim); }

/* 卡片底部操作 */
.tool-card-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}
.tool-price {
  flex: 1;
  font-size: 12px;
  color: var(--text-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mini-btn {
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color .18s, background .18s;
  white-space: nowrap;
}
.mini-btn:hover { border-color: var(--accent); }
.mini-btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); }
.mini-btn.icon { width: 30px; padding: 0; display: grid; place-items: center; }

/* 视图头 */
.view-head { margin-bottom: 20px; }
.view-title { font-size: 26px; }
.view-sub { color: var(--text-dim); font-size: 14px; margin-top: 5px; }

/* 筛选栏 */
.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 18px;
}
.filter-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-2);
  font-size: 13px;
  cursor: pointer;
  transition: all .18s;
}
.chip:hover { border-color: var(--accent); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

.filter-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

/* 开关 */
.switch { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; cursor: pointer; color: var(--text-dim); }
.switch input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

.select-wrap { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; }
.select-label { font-size: 13.5px; color: var(--text-dim); }
.select-wrap select {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 13.5px;
  cursor: pointer;
}

/* 空状态 */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-dim); }
.empty-icon { font-size: 34px; margin-bottom: 10px; }
.empty-state .btn { margin-top: 14px; }

/* 排行榜 */
.rank-list { display: flex; flex-direction: column; gap: 9px; }
.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 15px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  transition: border-color .18s, transform .15s;
}
.rank-item:hover { border-color: var(--accent); transform: translateX(3px); }
.rank-no {
  width: 30px;
  text-align: center;
  font-size: 17px;
  font-weight: 800;
  color: var(--text-faint);
  flex-shrink: 0;
}
/* 前三名给点颜色，制造「榜单感」 */
.rank-item:nth-child(1) .rank-no { color: #f5c542; }
.rank-item:nth-child(2) .rank-no { color: #c3cad9; }
.rank-item:nth-child(3) .rank-no { color: #cd8b52; }
.rank-main { flex: 1; min-width: 0; }
.rank-name { font-weight: 700; }
.rank-meta { font-size: 12.5px; color: var(--text-faint); display: flex; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.rank-score-wrap { width: 130px; flex-shrink: 0; }

/* 正文排版（方法论页） */
.prose {
  max-width: 760px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 26px 28px;
}
.prose h3 { font-size: 17px; margin: 22px 0 8px; }
.prose h3:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--text-dim); font-size: 14.5px; }
.prose ul { margin: 8px 0; padding-left: 20px; }
.prose li { margin-bottom: 5px; }
.prose strong { color: var(--text); }

/* ---------- 5. 对比视图 ---------- */
.compare-empty {
  text-align: center;
  padding: 70px 20px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-dim);
}
.compare-empty-icon { font-size: 38px; margin-bottom: 12px; }

.compare-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.compare-table {
  width: 100%;
  min-width: 620px;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
}
.compare-table th, .compare-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13.5px;
  vertical-align: top;
}
.compare-table thead th { background: var(--surface-2); font-weight: 700; }
.compare-table tbody tr:last-child td { border-bottom: none; }
.compare-table .row-label {
  width: 110px;
  color: var(--text-faint);
  font-size: 12.5px;
  font-weight: 600;
  background: var(--bg-soft);
}
.compare-table ul { margin: 0; padding-left: 16px; }
.compare-table li { margin-bottom: 3px; }
/* 最高分单元格高亮，一眼看出谁赢 */
.compare-table .winner { background: var(--good-soft); }

/* ---------- 6. 浮层 ---------- */

/* 收藏抽屉 */
.drawer {
  position: fixed;
  top: 0; right: 0;
  z-index: 90;
  width: min(360px, 90vw);
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  animation: slideIn .22s ease;
}
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border-soft);
}
.drawer-head h2 { font-size: 17px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 14px 16px; }
.drawer-foot { padding: 14px 16px; border-top: 1px solid var(--border-soft); }
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, .5);
}

.fav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  margin-bottom: 8px;
}
.fav-item .fav-name { flex: 1; font-weight: 600; font-size: 14px; }

/* 详情弹窗 */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); }
.modal-panel {
  position: relative;
  width: min(720px, 100%);
  max-height: 86vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: popIn .2s ease;
}
@keyframes popIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: scale(1); } }
.modal-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 30px; height: 30px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  cursor: pointer;
  z-index: 2;
}
.modal-body { padding: 24px; }
.modal-title { font-size: 21px; margin-bottom: 4px; padding-right: 34px; }
.modal-sub { color: var(--text-faint); font-size: 13px; margin-bottom: 16px; }

.detail-block { margin-top: 18px; }
.detail-block h4 { font-size: 14.5px; margin-bottom: 7px; color: var(--text); }
.detail-list { margin: 0; padding-left: 18px; }
.detail-list li { font-size: 13.5px; color: var(--text-dim); margin-bottom: 4px; }
.detail-kv { display: flex; gap: 10px; font-size: 13.5px; margin-bottom: 6px; }
.detail-kv .k { color: var(--text-faint); min-width: 62px; flex-shrink: 0; }
.detail-kv .v { color: var(--text); }
.modal-actions { display: flex; gap: 9px; margin-top: 20px; flex-wrap: wrap; }

/* 对比托盘 */
.compare-tray {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 20px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -6px 24px rgba(0, 0, 0, .2);
  /* 适配 iPhone 底部横条 */
  padding-bottom: calc(11px + env(safe-area-inset-bottom));
}
.tray-items { flex: 1; display: flex; gap: 8px; overflow-x: auto; }
.tray-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px 5px 11px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-2);
  font-size: 13px;
  white-space: nowrap;
}
.tray-chip button {
  border: none;
  background: none;
  color: var(--text-faint);
  cursor: pointer;
  padding: 0 3px;
  font-size: 12px;
}
.tray-chip button:hover { color: var(--bad); }
.tray-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ---------- 6.5 静态页专用 ---------- */
/* 静态页（tool-{id}.html）由 gen-static.js 生成，供搜索引擎与 AI 抓取器读取。
   它复用本站主题，但布局更朴素：单栏、无 JS 依赖、首屏即完整内容。 */

.static-page { min-height: 100vh; display: flex; flex-direction: column; }

.static-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  padding: 16px 20px;
}

.static-article {
  flex: 1;
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  padding: 8px 20px 60px;
}

/* 面包屑 */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-faint);
  margin-bottom: 14px;
}
.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--accent-text); }

/* 导语 */
.lead {
  font-size: 15.5px;
  color: var(--text-dim);
  margin: 10px 0 16px;
  line-height: 1.7;
}

.static-article h1 { font-size: clamp(23px, 3.4vw, 31px); letter-spacing: -.3px; }
.static-article h2 { font-size: 16.5px; margin-bottom: 8px; }

/* 静态页的问答默认展开（没有 JS 做折叠，就直接全展开） */
.static-article .faq-item { margin-bottom: 8px; }
.static-article .faq-q { font-weight: 600; color: var(--text); }
.static-article .faq-a { color: var(--text-dim); }

/* ---------- 7. 响应式断点 ---------- */

/* 平板：收起主导航文字，保留图标导航 */
@media (max-width: 980px) {
  .main-nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .search-box { max-width: none; }
}

/* 桌面尺寸下，无论 hidden 属性如何，强制不显示移动端菜单（兜底） */
@media (min-width: 981px) {
  .mobile-nav { display: none !important; }
}

/* 手机：进一步压缩间距，卡片单列 */
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .header-inner { padding: 0 14px; gap: 10px; }
  .brand-text { display: none; }
  main { padding: 20px 14px 140px; }

  .hero { padding: 22px 0 18px; }
  .hero-sub { font-size: 14.5px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }

  .stat-bar { grid-template-columns: repeat(2, 1fr); }

  .tool-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }

  .filter-row { gap: 12px; }
  .select-wrap { margin-left: 0; width: 100%; }
  .select-wrap select { flex: 1; }

  .rank-score-wrap { width: 84px; }
  .rank-meta { font-size: 12px; }

  .modal-panel { max-height: 90vh; }
  .modal-body { padding: 20px 16px; }
  .prose { padding: 20px 16px; }

  /* 托盘在手机上改为纵向堆叠，避免按钮被挤出屏幕 */
  .compare-tray { flex-wrap: wrap; gap: 9px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); }
  .tray-items { width: 100%; order: 1; }
  .tray-actions { width: 100%; order: 2; }
  .tray-actions .btn { flex: 1; }
}

/* 尊重「减少动态效果」的系统设置 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* 打印时去掉导航与浮层 */
@media print {
  .site-header, .site-footer, .compare-tray, .drawer, .modal, .header-actions { display: none !important; }
  body { background: #fff; color: #000; }
}
