/* ===========================================================
   现代资讯站 — 设计系统与样式
   设计令牌 → 布局 → 组件 → 页面 → 响应式
   =========================================================== */

/* ---------- 设计令牌 ---------- */
:root {
  /* 暖米黄纸感底 + 纯白卡片（搜狐式淡黄基调） */
  --bg: #fbf7ee;
  --surface: #ffffff;
  --surface-2: #f4efe2;
  --text: #221e17;
  --text-2: #6b6255;
  --text-3: #7a6f5a;
  --border: rgba(96, 76, 44, 0.14);
  --border-strong: rgba(96, 76, 44, 0.26);
  --primary: #1a4fd0;
  --primary-soft: rgba(26, 79, 208, 0.10);
  /* 主色 / 危险色作为「实底」时的前景色。浅色主题用白字，
     深色主题下 --primary 是亮蓝（#8fb0ff），白字只有 2.14:1，必须换成深墨色。 */
  --on-primary: #ffffff;
  /* 频道色块（.cat/.slide-cat）上的字色。浅色主题频道色是深色（#d92d20 等），用白字；
     深色主题频道色被换成亮色（#8fb0ff/#e8b563/#5ecfb6），白字只有 1.87~2.14，必须换深墨。 */
  --on-cat: #ffffff;
  --on-danger: #ffffff;
  --danger: #d92d20;
  --danger-soft: rgba(217, 45, 32, 0.10);
  --ok: #12632f;
  --ok-soft: rgba(21, 128, 61, 0.10);
  /* 徽标文字需要压到 4.5:1，比 --danger 更深一档 */
  --pill-neg: #b02318;
  --warn: #8a4b04;
  --warn-soft: rgba(165, 90, 6, 0.11);
  /* 正文行内元素 */
  --mark: rgba(255, 208, 64, 0.42);
  --mark-text: #4a3208;
  --code-bg: #1d1a13;
  --code-text: #e8e0cf;
  --code-dim: #b9ad93;
  --code-line: rgba(255, 255, 255, 0.08);
  --footer-bg: #2a231a;
  --footer-text: rgba(255, 252, 244, 0.72);
  /* 频道色系统：每个频道一个识别色 */
  --c-yaowen: #d92d20;
  --c-keji: #1a56db;
  --c-caijing: #96650f;   /* 原 #b7791f 在白底仅 3.41，加深后 4.96（白）/ 4.65（米底） */
  --c-guoji: #0f766e;
  --c-shehui: #c2410c;
  --c-wenhua: #7c3aed;
  --c-nengyuan: #15803d;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --ring: 0 0 0 3px rgba(26, 86, 219, 0.28);
  --max: 1200px;
  --nav-h: 56px;

  /* ---------- 排版令牌 ----------
     文字级 8 档（12/13/14/15/16/20/26/32）+ 展示级 2 档。
     改造前全站散落 33 种字号（含 12.5/13.5/14.5/15.5 半像素），
     组件之间没有统一阶梯，观感发碎。之后正文级只允许在这 8 档里选，
     新增模块一律用令牌，不要再写字面 px。 */
  --fs-2xs:  12px;   /* 角标、时间、计数、脚注 */
  --fs-xs:   13px;   /* 次级界面文字 */
  --fs-sm:   14px;   /* 界面文字、列表摘要 */
  --fs-md:   15px;   /* 导航、卡片标题（正文级最大档） */
  --fs-base: 16px;   /* 正文基准 */
  --fs-lg:   20px;   /* 区块标题、条目主标题 */
  --fs-xl:   26px;   /* 页面级标题 */
  --fs-2xl:  32px;   /* 页面 H1，全站统一 */
  --fs-display:    84px;  /* 404 大数字 */
  --fs-display-sm: 62px;  /* 同上，窄屏 */

  /* ---------- 行高三档 ----------
     正文 1.75 / 界面 1.5 / 紧凑 1.35。原来 21 种取值（1.15~1.9）混用，
     同类组件在不同模块高度不一致，也是 line-clamp 半行泄漏的根因之一。 */
  --lh-tight: 1.35;
  --lh-ui:    1.5;
  --lh-body:  1.8;

  /* ---------- 字重三档 ----------
     标题 700 / 标签 500 / 正文 400（原来是 400/500/600/650/700/800 六种）。
     注意：Windows 的微软雅黑只有 Regular/Bold，600 实际渲染成 Regular，
     所以改动前 Windows 上的标题其实并不粗。收敛到 700 后标题才真正加粗。 */
  --fw-normal: 400;
  --fw-medium: 500;
  --fw-bold:   700;
}

[data-theme="dark"] {
  --bg: #141109;
  --surface: #1c1811;
  --surface-2: #262016;
  --text: #f2ece0;
  --text-2: #b3aa98;
  --text-3: #948a78;
  --border: rgba(255, 244, 220, 0.13);
  --border-strong: rgba(255, 244, 220, 0.24);
  --primary: #8fb0ff;
  --primary-soft: rgba(143, 176, 255, 0.16);
  --on-primary: #141109;   /* 亮蓝底上的深墨字，9.6:1 */
  --on-cat: #141109;       /* 亮色频道底上的深墨字，与 --on-primary 同理 */
  --on-danger: #1b0f0c;    /* 亮红底上的深墨字，7.0:1 */
  --danger: #ff6b5e;
  --danger-soft: rgba(255, 107, 94, 0.16);
  --ok: #5cc98a;
  --ok-soft: rgba(92, 201, 138, 0.16);
  --pill-neg: #ff6b5e;
  --warn: #e0a451;
  --warn-soft: rgba(224, 164, 81, 0.16);
  --mark: rgba(255, 208, 64, 0.28);
  --mark-text: #ffe9a8;
  --code-bg: #0f0d08;
  --code-text: #e8e0cf;
  --code-dim: #b9ad93;
  --code-line: rgba(255, 255, 255, 0.08);
  --ring: 0 0 0 3px rgba(143, 176, 255, 0.3);
  --footer-bg: #0d0b07;
  --footer-text: rgba(255, 252, 244, 0.66);
  /* 频道色在深底上要整体提亮，否则 12px 的分类标签只有 3.66:1，达不到 AA */
  --c-yaowen:  #ff6b5e;
  --c-keji:    #8fb0ff;
  --c-caijing: #e8b563;
  --c-guoji:   #5ecfb6;
  --c-shehui:  #ff9a6b;
  --c-wenhua:  #b79bff;
  --c-nengyuan:#6fd694;
}

/* ---------- 基础重置 ---------- */
/* 注意：`*` 不匹配伪元素，必须显式带上 ::before / ::after，
   否则带 border 的伪元素会退回 content-box，造成尺寸偏大、居中错位
   （首页「最新快讯」时间轴的圆点曾因此比竖线宽 4px、偏移 2px）。 */
*, *::before, *::after { box-sizing: border-box; }
/* 作者样式里一旦写了 display（如 .results{display:grid}），会盖掉 UA 的 [hidden]{display:none}，
   导致 hidden 属性失效。统一加一条 !important 兜底。 */
[hidden] { display: none !important; }
/* 声明支持明暗双方案：表单控件、滚动条、系统 UI 才会跟随主题，
   否则深色模式下下拉框/滚动条仍是亮色，割裂感明显。 */
html { scroll-behavior: smooth; color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB",
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--radius-xs);
}
h1, h2, h3, h4 { margin: 0; font-weight: var(--fw-bold); line-height: var(--lh-tight); }
p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, textarea { font: inherit; color: inherit; }

/* ---------- 布局 ---------- */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 36px;
  align-items: start;
  padding: 24px 0 56px;
}
.main { min-width: 0; }
/* 侧栏本身不再 sticky：sticky 下沉到内层的 .sidebar-sticky。
   这样广告位放在外层，会随页面一起滚走；只有组件区跟随滚动。
   注意 .layout 是 align-items:start，侧栏默认只有内容高度，
   内层 sticky 就没有可滑动的余量 —— 必须显式 align-self:stretch 撑满行高。 */
.sidebar { display: grid; gap: 20px; align-content: start; align-self: stretch; }
.sidebar-sticky {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
  display: grid;
  gap: 20px;
}

/* ===========================================================
   顶部：实用条（38px） + 品牌主区（78px） + 频道条（sticky）
   三层分工：日期与实用入口 / 品牌与转化 / 频道导航
   =========================================================== */
.topbar {
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 38px;
  font-size: var(--fs-2xs);
}
.topbar-date {
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  letter-spacing: .2px;
}
/* topbar 的底是 --surface-2（比 --bg 更深），--text-3 在上面只有 4.31:1，差一点到 AA；
   深色主题那边是 4.74:1 本来就过，所以只把浅色这两处提到 --text-2（5.29:1） */
.util-links { margin-left: auto; display: flex; gap: 20px; }
.util-links a { color: var(--text-2); }
.util-links a:hover { color: var(--primary); }
/* 【桌面档热区】实测 1280：四个实用链接只有 50x21、RSS 只有 23x21。
   ≤720 档已有 min-height:32 的宽松版，桌面档一直是漏的。
   高度撑到 28px（topbar 固定 38px，装得下，视觉位置不变）；
   左右各补 4px 并用等量负 margin 抵消 —— flex 的 gap 量的是 margin box，
   抵消后视觉间距仍是 18px，但可点宽度多出 8px。 */
.util-links a { display: inline-flex; align-items: center; min-height: 28px; padding: 0 4px; margin: 0 -4px; }

.masthead { background: var(--bg); }
.masthead-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 78px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
/* 品牌用图片呈现：明/暗各一份 PNG，由 html[data-theme] 切换。
   现图 319x75（比例 4.2533:1，旧图是 112x32 的 3.5:1）—— 换图后必须同步改这里的
   width 和模板里 <img> 的 width/height，两处不一致就会把 logo 拉变形。
   下面各断点的 width 一律 = round(height * 319 / 75)。 */
.brand-logo { display: block; width: 187px; height: 44px; }
/* 键盘用户跳转链接：默认移出视口，聚焦时回到左上角 */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 12px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
  background: var(--primary);
  color: var(--on-primary);
  font-size: var(--fs-sm);
}
.skip-link:focus { left: 0; }
.brand-logo.logo-invert { display: none; }
[data-theme="dark"] .brand-logo.logo-main { display: none; }
[data-theme="dark"] .brand-logo.logo-invert { display: block; }
.brand-sub {
  position: relative;
  padding-left: 15px;
  font-size: var(--fs-xs);
  color: var(--text-3);
  font-weight: var(--fw-normal);
  letter-spacing: .3px;
}
/* 品牌与 slogan 之间的竖分隔线 */
.brand-sub::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 24px;
  background: var(--border-strong);
}
.masthead-side { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.masthead-cta {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 16px;
  border: 1px solid var(--primary);
  border-radius: 999px;
  font-size: var(--fs-xs);
  color: var(--primary);
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.masthead-cta:hover { background: var(--primary); color: var(--on-primary); }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.icon-btn:hover { background: var(--surface); border-color: var(--border-strong); }
.icon-btn:focus-visible { outline: none; box-shadow: var(--ring); }

/* ---------- 导航 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: var(--nav-h); }
.nav-links { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-md);
  color: var(--text-2);
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav-links a:hover { background: var(--surface); color: var(--text); }
.nav-links a.active { color: var(--primary); background: var(--primary-soft); font-weight: var(--fw-medium); }

.search {
  position: relative;
  margin-left: auto;
  flex: 0 0 220px;
}
.search input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 36px;
  font-size: var(--fs-xs);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.search input:focus { border-color: var(--primary); box-shadow: var(--ring); }
.search svg { position: absolute; left: 11px; top: 10px; opacity: .55; }

.nav-toggle { display: none; }

/* ---------- 首页大标题 ---------- */
.home-title { margin: 24px 0 -10px; font-size: var(--fs-xl); line-height: var(--lh-tight); font-weight: var(--fw-bold); }

/* ---------- 焦点区 ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  margin-top: 24px;
}
.hero-main { min-width: 0; }

/* ---------- 焦点轮播（叠加式大图） ---------- */
.carousel {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
}
/* 【实测 bug 2026-10-22】.hero 是 grid，行高由右栏 .hero-side 的内容决定
   （实测 465.6），而 .carousel-track 用 aspect-ratio:16/9 只能算出 448.9 ——
   两栏差 16.7px，右栏永远比左栏高，用户报「高度未对齐」。
   修法：让轮播撑满行高。.hero-main 改 flex、.carousel flex:1 拿到整列，
   .carousel-track 加 height:100%。
   aspect-ratio:16/9 保留不删：≤1024 单列时 .hero-main 高度是 auto，
   height:100% 会解析成 auto，aspect-ratio 继续接管（实测 368.4 不变）；
   桌面两栏时 grid 把 .hero-main 拉伸到行高，height:100% 缺省生效，
   aspect-ratio 因宽高都已确定而失效。两种模式都不会塌。
   幻灯片 img 本来就是 object-fit:cover，容器变高不会变形。 */
.hero-main { display: flex; }
.hero-main > .carousel { flex: 1; min-width: 0; }
.carousel-track { position: relative; aspect-ratio: 16 / 9; height: 100%; }
.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s ease;
}
.slide.is-active { opacity: 1; visibility: visible; }
.slide-img { display: block; width: 100%; height: 100%; }
.slide-img img { width: 100%; height: 100%; object-fit: cover; }
.slide-body {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 64px 28px 28px;
  background: linear-gradient(to top, rgba(8, 10, 14, .88) 0%, rgba(8, 10, 14, .62) 45%, rgba(8, 10, 14, 0) 100%);
  color: #fff;
}
.slide-cat {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 12px;
  border-radius: var(--radius-xs);
  background: var(--cat, var(--primary));
  color: var(--on-cat);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-medium);
}
.slide-body h1 { font-size: var(--fs-xl); line-height: var(--lh-tight); }
.slide-body h1 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.slide-body p {
  margin-top: 8px;
  max-width: 62ch;
  font-size: var(--fs-sm);
  line-height: var(--lh-ui);
  color: rgba(255, 255, 255, .82);
}
.slide-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: var(--fs-2xs);
  color: rgba(255, 255, 255, .78);
}
.slide-meta .ava i { background: rgba(255, 255, 255, .85); }

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(8, 10, 14, .42);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s, background .15s;
}
.carousel:hover .carousel-arrow { opacity: 1; }
.carousel-arrow:hover { background: rgba(8, 10, 14, .7); }
.carousel-arrow.prev { left: 14px; }
.carousel-arrow.next { right: 14px; }

.carousel-dots {
  position: absolute;
  right: 18px; bottom: 18px;
  display: flex;
  gap: 8px;
}
.carousel-dots button {
  width: 22px; height: 3px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: rgba(255, 255, 255, .38);
  cursor: pointer;
  transition: background .2s;
}
.carousel-dots button.active { background: #fff; }
/* 圆点本身只有 22x3px，手指根本点不到。用 ::after 撑出一块透明点击区，
   视觉上还是那条 3px 短横，不改变任何外观。 */
.carousel-dots button { position: relative; }
.carousel-dots button::after {
  content: "";
  position: absolute;
  left: -6px; right: -6px; top: -18px; bottom: -18px;
}

/* ---------- 焦点区右栏：今日要闻 ---------- */
.hero-side {
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.hero-side-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.hero-side-head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-md);
}
.hero-side-head h2::before {
  content: "";
  width: 3px; height: 14px;
  border-radius: 2px;
  background: var(--danger);
}
.hero-side-head .sub {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-size: var(--fs-2xs);
  color: var(--text-3);
}
.hero-side-head .live {
  display: inline-block;
  flex: none;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--danger);
  animation: livePulse 2s ease-out infinite;
}@keyframes livePulse{
  0%   { box-shadow: 0 0 0 0 rgba(217, 45, 32, .5); }
  70%  { box-shadow: 0 0 0 6px rgba(217, 45, 32, 0); }
  100% { box-shadow: 0 0 0 0 rgba(217, 45, 32, 0); }
}

/* ---------- 快讯时间轴 ---------- */
.hero-list { display: grid; gap: 2px; flex: 1; }
.hero-list.timeline {
  position: relative;
  grid-auto-rows: 1fr;
  gap: 0;
  margin-top: 6px;
}
/* 主轴线：逐条画在 li 上，首条从圆点中心起、末条到圆点中心止。
   这样无论 grid-auto-rows:1fr 把行高算成多少，竖线都不会在两端多出一截。 */
.hero-list.timeline li::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border);
  z-index: 0;
}
.hero-list.timeline li:first-child::after { top: 50%; }
.hero-list.timeline li:last-child::after { bottom: 50%; }
.hero-list.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 12px;
  padding: 12px 8px 12px 20px;
  border-radius: var(--radius-sm);
  transition: background .15s;
}
/* 节点 */
.hero-list.timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--border-strong);
  z-index: 1;                /* 压在竖线上，圆点遮住穿过它的那一段 */
  transition: border-color .15s, background .15s;
}
.hero-list.timeline li.is-new::before {
  background: var(--danger);
  border-color: var(--danger);
  animation: livePulse 2.6s ease-out infinite;
}
.hero-list.timeline li:hover { background: var(--surface-2); }
.hero-list.timeline li:hover::before { border-color: var(--primary); }
.hero-list.timeline li.is-new:hover::before { border-color: var(--danger); }
.hero-list li:first-child a { font-weight: var(--fw-medium); }
.hero-list a {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: var(--fs-sm);
  line-height: var(--lh-ui);
}
.hero-list a:hover { color: var(--primary); }
.hero-list time {
  font-size: var(--fs-2xs);
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  letter-spacing: .2px;
}
.hero-side-all {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: var(--fs-xs);
  color: var(--text-3);
}
.hero-side-all:hover { color: var(--primary); }

/* ---------- 元信息 / 徽标 ---------- */
.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: var(--fs-xs);
  color: var(--text-3);
}
/* 【实测 bug 2026-10-22】flex-wrap 只能折「条目」，折不了条目内部。
   单个条目默认 min-width:auto（= min-content），一条无空格的长来源名
   （如 50 字符英文社名）就有 374px，比 343px 的容器还宽 → 该 span 溢出 31px，
   连累 document.scrollWidth 516 > innerWidth 512，整页被撑破。
   overflow-wrap:anywhere 会参与 min-content 计算（break-word 不会），
   所以长串能自己断行；子项再补 min-width:0 双保险。
   实测：纯中文超长串本就正常（中文可逐字断），只有无空格拉丁串会中招。 */
.meta { overflow-wrap: anywhere; }
.meta > * { min-width: 0; }
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  background: var(--primary-soft);
  color: var(--primary);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-medium);
}
.badge.danger { background: var(--danger-soft); color: var(--pill-neg); }

/* ---------- 分区 ---------- */
.section { margin-top: 40px; }
.section-head {
  display: flex;
  align-items: baseline;        /* 右侧「查看更多」与 24px 标题共用基线，原先 center 会差 2.2px */
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.section-head h2 {
  position: relative;
  padding-left: 12px;
  font-size: var(--fs-lg);
}
.section-head h2::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 17px;
  border-radius: 2px;
  background: var(--accent, var(--primary));
}
.section-head .head-sub {
  padding-left: 12px;
  border-left: 1px solid var(--border);
  font-size: var(--fs-xs);
  font-weight: var(--fw-normal);
  color: var(--text-3);
}
/* 只有「最后一个」才吃掉剩余空间。若同一行里还有别的右对齐元素
   （如 #stream 的连续加载开关），两个 auto 会把剩余空间平分，把计数顶到正中。 */
.section-head .head-count { font-size: var(--fs-2xs); color: var(--text-3); font-variant-numeric: tabular-nums; }
.section-head .head-count:last-child { margin-left: auto; }
.section-head .more { font-size: var(--fs-xs); color: var(--text-3); }
.section-head .more:last-child { margin-left: auto; }
.section-head .more:hover { color: var(--primary); }
.section-head .head-count + .more { margin-left: 12px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.card { display: grid; gap: 12px; }
/* 无图占位：本站 20707 篇里 14380 篇没有缩略图（约 69%）。
   以前统一塞 og-default.svg（1200x630 的社交分享图），当 16:9 缩略图用会被拉成一块大 logo；
   现在 NewsThumbInner() 输出 .ph，容器带 .no-img，这里画中性底。 */
.thumb.no-img,
.slide-img.no-img,
.lead-img.no-img {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface) 100%);
}
.ph {
  display: block;
  width: 100%;
  height: 100%;
  /* 落在 grid 单元里时自己在格内居中，且不被 stretch 拉变形：
     .rec-item / .split-item 是「图 + 文字」两列布局，容器不能整块居中（会破坏列），
     而 place-items 默认 normal 会把 .ph 拉成整行高。 */
  place-self: center;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  opacity: .6;
}
.thumb.no-img .ph,
.lead-img.no-img .ph { width: 46px; height: 46px; }
.slide-img.no-img .ph { width: 76px; height: 76px; }
.rec-item.no-img .ph { width: 64px; height: 46px; background: var(--surface-2); }
.split-item.no-img .ph { width: 84px; height: 60px; background: var(--surface-2); }
/* .entry .thumb（下面「文章列表」段）写了 display:block，与 .thumb.no-img 特异性相同
   （都是 0,2,0）且位置更靠后，会把上面的 grid 覆盖掉 → place-items 失效、.ph 贴顶不居中。
   这里用更高特异性（0,3,0）把居中补回来。 */
.entry .thumb.no-img { display: grid; }
.card .thumb {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  aspect-ratio: 16 / 9;
}
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .thumb img { transform: scale(1.04); }
.card h3, .topic h3, .entry h3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.card h3 { font-size: var(--fs-base); font-weight: var(--fw-medium); line-height: var(--lh-ui); }
.card h3 a:hover { color: var(--primary); }
.card p { font-size: var(--fs-sm); color: var(--text-2); }

/* ---------- 专题策划（三栏专题卡） ---------- */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.topic {
  display: grid;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  transition: border-color .15s, transform .15s;
}
.topic:hover { border-color: var(--primary); transform: translateY(-2px); }
.topic-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--surface-2);
  aspect-ratio: 21 / 9;
}
.topic-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.topic:hover .topic-cover img { transform: scale(1.04); }
/* 没有封面图时：不渲染 <img>，这里就是一块 21/9 的中性底，角标压在上面仍然成立 */
.topic-cover.no-img { display: block; }
.topic-badge {
  position: absolute;
  left: 10px; top: 10px;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  background: rgba(0, 0, 0, .62);
  color: #fff;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-medium);
  backdrop-filter: blur(4px);
}
.topic-count {
  position: absolute;
  right: 10px; bottom: 10px;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  background: rgba(0, 0, 0, .62);
  color: #fff;
  font-size: var(--fs-2xs);
  font-variant-numeric: tabular-nums;
}
.topic h3 { padding: 16px 16px 0; font-size: var(--fs-base); font-weight: var(--fw-bold); line-height: var(--lh-ui); }
.topic h3 a:hover { color: var(--primary); }
.topic p { padding: 0 16px; font-size: var(--fs-sm); color: var(--text-2); }
.topic-foot { display: flex; align-items: center; gap: 8px; padding: 12px 16px 16px; font-size: var(--fs-2xs); color: var(--text-3); }
.topic-foot::after { content: "进入专题 →"; margin-left: auto; }
.topic:hover .topic-foot::after { color: var(--primary); }

/* ---------- 国际观察（大卡 + 列表分栏） ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 28px;
}
.split-lead { display: grid; gap: 12px; align-content: start; }
.split-lead .thumb {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  aspect-ratio: 16 / 9;
}
.split-lead .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.split-lead:hover .thumb img { transform: scale(1.03); }
.split-lead h3 { font-size: var(--fs-lg); font-weight: var(--fw-bold); line-height: var(--lh-ui); }
.split-lead h3 a:hover { color: var(--primary); }
.split-lead p { font-size: var(--fs-sm); color: var(--text-2); }
.split-list { display: grid; gap: 4px; align-content: start; }
.split-item {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  transition: background .15s;
}
.split-item:hover { background: var(--surface-2); }
.split-item img { width: 84px; height: 60px; object-fit: cover; border-radius: var(--radius-xs); background: var(--surface-2); }
.split-item-b { display: grid; gap: 8px; align-content: center; min-width: 0; }
.split-item-b b { font-size: var(--fs-sm); font-weight: var(--fw-medium); line-height: var(--lh-ui); }
.split-item:hover .split-item-b b { color: var(--primary); }
.split-item-b em { font-style: normal; font-size: var(--fs-2xs); color: var(--text-3); }

/* ---------- 信息流（加载更多） ---------- */
.feed { display: grid; }
.feed .entry-body { min-width: 0; }
.feed-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-top: 22px;
}
.feed-more .btn { min-width: 168px; }
.feed-tip { font-size: var(--fs-2xs); color: var(--text-3); }
.feed-more .btn[disabled] { opacity: .55; cursor: default; }

/* 横向图文条目（列表页 / 侧栏复用） */
.entry {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.entry:last-child { border-bottom: 0; }
.entry img { width: 180px; height: 116px; object-fit: cover; border-radius: var(--radius-sm); background: var(--surface-2); }
.entry .thumb { position: relative; display: block; border-radius: var(--radius-sm); overflow: hidden; }
.entry h3 { font-size: var(--fs-lg); font-weight: var(--fw-bold); line-height: var(--lh-ui); margin-bottom: 6px; }
.entry h3 a:hover { color: var(--primary); }
.entry p { font-size: var(--fs-sm); color: var(--text-2); margin-bottom: 8px; }

/* ---------- 侧栏组件 ---------- */
.widget {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.widget h2,
.widget h3,
.widget h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: var(--fs-md);
}
.widget h2::before,
.widget h3::before,
.widget h4::before {
  content: "";
  width: 3px; height: 14px;
  border-radius: 2px;
  background: var(--primary);
}
/* 侧栏头部（标题 + 右侧补充信息） */
.widget-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.widget-head h2,
.widget-head h3,
.widget-head h4 { margin-bottom: 0; }
.widget-sub { margin-left: auto; font-size: var(--fs-2xs); color: var(--text-3); }

/* 24 小时热榜：榜首大卡 + 紧凑行 */
.rank { display: grid; gap: 4px; margin: 0 -8px; }
.rank li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 8px;
  padding: 8px 8px;
  border-radius: var(--radius-sm);
  transition: background .15s;
}
.rank li:nth-child(-n+3) { background: var(--surface-2); }
.rank li:hover { background: var(--surface-2); }
.rank .num {
  display: grid;
  place-items: center;
  width: 20px; height: 20px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-medium);
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.rank li:nth-child(-n+3) .num {
  border-color: transparent;
  background: linear-gradient(135deg, var(--danger), #ff8a4c);
  color: var(--on-danger);
}
.rank a { font-size: var(--fs-sm); line-height: var(--lh-ui); }
.rank li:nth-child(-n+3) a { font-weight: var(--fw-medium); }
.rank a:hover { color: var(--primary); }
.rank .hot { font-size: var(--fs-2xs); color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* 榜首大卡 */
.rank-lead {
  display: block !important;
  margin-bottom: 8px;
  padding: 0 !important;
  border-radius: var(--radius);
  overflow: hidden;
  background: transparent !important;
}
.rank-lead:hover { background: transparent !important; }
.lead-img {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  aspect-ratio: 16 / 9;
}
.lead-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.rank-lead:hover .lead-img img { transform: scale(1.04); }
.lead-img .num {
  position: absolute;
  left: 10px; top: 10px;
  width: 26px; height: 26px;
  border-radius: 8px;
  font-size: var(--fs-sm);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .28);
}
.lead-title {
  display: block;
  margin-top: 10px;
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  line-height: var(--lh-ui);
}
.rank-lead:hover .lead-title { color: var(--primary); }
.lead-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  font-size: var(--fs-2xs);
  color: var(--text-3);
}
.lead-sub em { font-style: normal; color: var(--danger); font-variant-numeric: tabular-nums; }
.lead-sub span { padding-left: 8px; border-left: 1px solid var(--border); }

/* 编辑推荐 */
.rec { display: grid; gap: 12px; margin: 0 -6px; }
.rec-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background .15s;
}
.rec-item:hover { background: var(--surface-2); }
.rec-item img { width: 64px; height: 46px; object-fit: cover; border-radius: var(--radius-xs); background: var(--surface-2); }
.rec-b { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; min-width: 0; }
.rec-b b { font-size: var(--fs-xs); font-weight: var(--fw-medium); line-height: var(--lh-ui); }
.rec-item:hover .rec-b b { color: var(--primary); }
.rec-b em { font-style: normal; font-size: var(--fs-2xs); color: var(--text-3); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  font-size: var(--fs-xs);
  color: var(--text-2);
  transition: all .15s;
}
.tag:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: var(--on-primary);
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: opacity .15s;
}
.btn:hover { opacity: .88; }
.btn.ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn.ghost:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- 面包屑 ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 0 0;
  font-size: var(--fs-xs);
  color: var(--text-3);
}
.crumbs a:hover { color: var(--primary); }
/* 【桌面档热区】实测 1280：面包屑两字链接（「首页」）只有 26x22。
   ≤720 档已有 min-height:32 + padding: 0 4px 的宽松版，桌面档一直是漏的。 与 util-links 同一套打法：补 padding 撑高度，负 margin 抵消。 垂直负 margin 必须写：.crumbs 是 flex 容器，行高取「条目外边距盒」的最大值， 不抵消的话整行会从 38.1 长到 44，把下面正文顶下去。 */ .crumbs a { display: inline-flex; align-items: center; min-height: 28px; padding: 0 4px; margin: -3px -4px; }

/* ---------- 文章页 ---------- */
.article { padding-top: 20px; }
.article-head { margin-bottom: 22px; }
.article-head h1 { font-size: var(--fs-2xl); line-height: var(--lh-tight); margin: 12px 0 16px; }
.article-hero { margin: 0 0 28px; }
.article-hero img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--surface-2);
}
.article-hero figcaption { margin-top: 10px; font-size: var(--fs-xs); color: var(--text-3); }
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-size: var(--fs-xs);
  color: var(--text-3);
}
.article-meta .author { color: var(--text); font-weight: var(--fw-medium); }
.share { display: flex; gap: 8px; margin-left: auto; }

.progress {
  position: fixed;
  top: 0; left: 0;
  z-index: 60;
  height: 2px;
  width: 0;
  background: var(--primary);
}

.body-text {
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--text);
  overflow-wrap: break-word;   /* 正文里的长 URL / 无空格串不至于把页面撑出横向滚动 */
}
.body-text > * + * { margin-top: 18px; }
.body-text h2 {
  margin-top: 36px;
  padding-left: 13px;
  border-left: 3px solid var(--primary);
  font-size: var(--fs-xl);
  letter-spacing: .2px;
}
.body-text p { color: var(--text); }
.body-text blockquote {
  padding: 16px 20px;
  border-left: 3px solid var(--border-strong);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-2);
  font-size: var(--fs-md);
}
.body-text figure img { width: 100%; border-radius: var(--radius-sm); background: var(--surface-2); }
.body-text figcaption { margin-top: 8px; font-size: var(--fs-xs); color: var(--text-3); text-align: center; }

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); background: var(--surface-2); }

/* ===========================================================
   正文组件库：覆盖新闻 / 技术报道常用的全部 HTML 元素
   =========================================================== */

/* ---------- 三级小标题 ---------- */
.body-text h3 {
  margin-top: 26px;
  padding-left: 12px;
  border-left: 3px solid var(--border-strong);
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  line-height: var(--lh-ui);
}

/* ---------- 列表：marker 用主色，数字等宽 ---------- */
.body-text ul { padding-left: 22px; list-style: disc; }
.body-text ol { padding-left: 24px; list-style: decimal; }
.body-text li { margin-bottom: 6px; }
.body-text li::marker { color: var(--primary); font-weight: var(--fw-medium); }
.body-text ol li::marker { font-variant-numeric: tabular-nums; }

/* ---------- 行内语义元素 ---------- */
.body-text code {
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--surface-2);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: .88em;
}
/* 代码块里的 code 走深底，不能继承行内 code 的浅色底 */
.body-text pre code {
  padding: 0;
  border-radius: 0;
  background: none;
  font-size: inherit;
}
.body-text mark {
  padding: 1px 3px;
  border-radius: 3px;
  background: var(--mark);
  color: var(--mark-text);
}
.body-text kbd {
  display: inline-block;
  min-width: 20px;
  padding: 2px 8px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--surface);
  font-size: .82em;
  line-height: var(--lh-tight);
  text-align: center;
}
.body-text abbr[title] {
  text-decoration: underline dotted var(--text-3);
  text-underline-offset: 3px;
  cursor: help;
}
.body-text sup { font-size: .72em; line-height: 0; }
.body-text sup a {
  padding: 0 4px;
  border-radius: 3px;
  background: var(--primary-soft);
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}
.body-text sup a:hover { background: var(--primary); color: var(--on-primary); }

/* ---------- 代码块（固定深底，明暗主題下都可读） ---------- */
.codeblock {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--code-bg);
  overflow: hidden;
}
.cb-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 12px 4px 16px;   /* 收紧，抵消 .cb-copy 30→32 的增量，头部总高不变 */
  border-bottom: 1px solid var(--code-line);
}
.cb-lang {
  font-family: "SFMono-Regular", Consolas, Menlo, monospace;
  font-size: var(--fs-2xs);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--code-dim);
}
.cb-copy {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;                 /* 与 .act / .follow 同为二级控件高度档 */
  padding: 0 12px;
  border: 1px solid var(--code-line);
  border-radius: var(--radius-xs);
  background: transparent;
  font-size: var(--fs-2xs);
  color: var(--code-dim);
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.cb-copy:hover { color: #fff; border-color: rgba(255, 255, 255, .3); }
.codeblock pre {
  margin: 0;
  padding: 16px 16px;
  overflow-x: auto;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: var(--fs-xs);
  line-height: var(--lh-body);
  tab-size: 2;
  color: var(--code-text);
}
/* 极简语法着色：只标注四类 token，够用且两个主题下都达标 */
.codeblock .k { color: #9fd0ff; }
.codeblock .s { color: #b7e08a; }
.codeblock .n { color: #f0b37e; }
.codeblock .b { color: #d8a2ff; }
.codeblock .c { color: #9a9080; font-style: italic; }

/* ---------- Mermaid 图表 ---------- */
.chart-box {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow-x: auto;
}
.chart-box .mermaid {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
}
.chart-box .mermaid svg { max-width: 100%; height: auto; }
.chart-loading,
.chart-error {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 24px 0;
  font-size: var(--fs-xs);
  color: var(--text-3);
}
.chart-loading .dot {
  flex: none;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary);
  animation: livePulse 1.6s ease-out infinite;
}
.chart-error { color: var(--danger); }
/* 降级：渲染失败时把源码原样展示，读者不至于看到空白 */
.chart-box .mermaid.chart-fallback {
  justify-content: flex-start;
  overflow-x: auto;
}
.chart-box .mermaid.chart-fallback pre {
  margin: 0;
  font-family: "SFMono-Regular", Consolas, Menlo, monospace;
  font-size: var(--fs-xs);
  line-height: var(--lh-body);
  color: var(--text-2);
  white-space: pre;
}

/* ---------- 折叠块 details / summary ---------- */
.fold {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
}
.fold + .fold { margin-top: 10px; }
.fold > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  font-size: var(--fs-md);
  font-weight: var(--fw-medium);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before {
  content: "\25B8";
  flex: none;
  color: var(--text-3);
  font-size: var(--fs-xs);
  transition: transform .18s;
}
.fold[open] > summary::before { transform: rotate(90deg); }
.fold > summary:hover { color: var(--primary); }
.fold > summary:hover::before { color: var(--primary); }
.fold-body {
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border);
  font-size: var(--fs-md);
  line-height: var(--lh-body);
  color: var(--text-2);
}
.fold-body > * + * { margin-top: 10px; }

/* ---------- 提示框 note（4 种语义色） ---------- */
.note {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--note-bg);
  font-size: var(--fs-md);
  line-height: var(--lh-body);
}
.note::before {
  content: "i";
  flex: none;
  width: 20px; height: 20px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-2xs); font-weight: var(--fw-bold); font-style: italic;
}
.note.info   { --accent: var(--primary); --note-bg: var(--primary-soft); }
.note.ok     { --accent: var(--ok);      --note-bg: var(--ok-soft); }
.note.warn   { --accent: var(--warn);    --note-bg: var(--warn-soft); }
.note.danger { --accent: var(--danger);  --note-bg: var(--danger-soft); }
.note.ok::before     { content: "\2713"; font-style: normal; }
.note.warn::before   { content: "!"; font-style: normal; }
.note.danger::before { content: "!"; font-style: normal; }
.note-b { min-width: 0; }
.note-t { font-weight: var(--fw-medium); color: var(--accent); }
.note p + p { margin-top: 4px; }

/* ---------- 并排对比图 ---------- */
.fig-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.fig-2 img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.fig-2 figcaption { margin-top: 8px; font-size: var(--fs-xs); color: var(--text-3); text-align: left; }
.video figcaption { margin-top: 10px; font-size: var(--fs-xs); color: var(--text-3); text-align: left; }

/* ---------- 视频占位 ---------- */
.video-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
}
.video-cover img { width: 100%; height: 100%; object-fit: cover; }
.video-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 12, 16, .6), rgba(10, 12, 16, .04));
}
.play {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  width: 62px; height: 62px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .94);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(10, 12, 16, .3);
  transition: transform .2s;
}
.play:hover { transform: translate(-50%, -50%) scale(1.06); }
.play:focus-visible { box-shadow: var(--ring); }
.play svg { margin-left: 3px; }
.video-meta {
  position: absolute;
  left: 16px; bottom: 13px;
  z-index: 1;
  color: rgba(255, 255, 255, .92);
  font-size: var(--fs-xs);
  font-variant-numeric: tabular-nums;
}

/* ---------- 表格增强：横向滚动 / 合计行 / 状态徽标 ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table tfoot td,
.data-table tfoot th {
  background: var(--surface-2);
  font-weight: var(--fw-medium);
  color: var(--text);
  border-bottom: 0;
}
.data-table th.num,
.data-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.pill {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-medium);
  white-space: nowrap;
}
.pill.pos { background: var(--ok-soft); color: var(--ok); }
.pill.neg { background: var(--danger-soft); color: var(--pill-neg); }
.pill.neu { background: var(--surface-2); color: var(--text-2); }

/* ---------- 脚注 ---------- */
.footnotes {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: var(--fs-xs);
  line-height: var(--lh-body);
  color: var(--text-3);
}
.footnotes h4 { font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--text-2); margin-bottom: 6px; }
.footnotes ol { padding-left: 20px; list-style: decimal; }
.footnotes li { margin-bottom: 5px; }
.footnotes li::marker { font-variant-numeric: tabular-nums; }
.footnotes .backref { color: var(--primary); }

.source-note {
  margin-top: 26px;
  padding: 12px 16px;
  border-left: 3px solid var(--border-strong);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--surface);
  font-size: var(--fs-xs);
  line-height: var(--lh-body);
  color: var(--text-3);
}
.source-note b { color: var(--text-2); font-weight: var(--fw-medium); }

.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--border); }

.prevnext {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 26px;
}
.prevnext a {
  padding: 16px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: var(--fs-sm);
  line-height: var(--lh-ui);
  transition: border-color .15s, background .15s;
}
.prevnext a:hover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.prevnext a:last-child { text-align: right; }
.prevnext .label { display: block; font-size: var(--fs-2xs); color: var(--text-3); margin-bottom: 4px; }
.prevnext a:hover .label { color: var(--primary); }

/* 目录 */
.toc { display: grid; gap: 8px; }
.toc a {
  padding: 0 0 0 12px;
  border-left: 2px solid var(--border);
  font-size: var(--fs-sm);
  color: var(--text-2);
  line-height: var(--lh-ui);
}
.toc a:hover, .toc a.active { border-left-color: var(--primary); color: var(--primary); }
.toc a.sub { padding-left: 24px; font-size: var(--fs-xs); color: var(--text-3); }

/* ---------- 评论 ---------- */
.comments { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--border); }
.comments h3 { font-size: var(--fs-lg); margin-bottom: 18px; }
.comment-form { display: grid; gap: 12px; margin-bottom: 28px; }
.comment-form textarea {
  min-height: 92px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  resize: vertical;
  outline: none;
  line-height: var(--lh-ui);
}
.comment-form textarea:focus { border-color: var(--primary); box-shadow: var(--ring); }
.comment-form .row { display: flex; gap: 12px; align-items: center; }
.comment-form input {
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  outline: none;
}
.comment-form .row .btn { margin-left: auto; }

.comment-list { display: grid; gap: 20px; }
.comment { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; }
.avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-sm); font-weight: var(--fw-medium);
}
.comment .head { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); }
.comment .head .name { font-weight: var(--fw-medium); }
.comment .head time { font-size: var(--fs-2xs); color: var(--text-3); }
.comment .text { margin-top: 4px; font-size: var(--fs-md); }
.comment .actions { display: flex; gap: 16px; margin-top: 8px; font-size: var(--fs-xs); color: var(--text-3); }
.comment .actions button {
  border: 0; background: none; padding: 0; cursor: pointer;
  font-size: var(--fs-xs); color: var(--text-3);
}
.comment .actions button:hover { color: var(--primary); }
.comment .replies {
  margin-top: 14px;
  padding-left: 14px;
  border-left: 2px solid var(--border);
  display: grid;
  gap: 16px;
}
.comment .replies .comment { grid-template-columns: 32px minmax(0, 1fr); }
.comment .replies .avatar { width: 32px; height: 32px; font-size: var(--fs-xs); }

/* ---------- 分页 ---------- */
.pager { display: flex; justify-content: center; gap: 8px; margin-top: 36px; }
.pager a, .pager span {
  min-width: 38px; height: 38px;
  padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  color: var(--text-2);
}
.pager a:hover { border-color: var(--primary); color: var(--primary); }
.pager .current { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.pager .disabled { opacity: .45; cursor: not-allowed; }

/* 兼容 DedeBIZ {dede:pagelist} 的输出结构：<li class="page-item"><a/span class="page-link">
   上面的 .pager a/.pager span 规则管不到 li 里的元素，这里按同一套视觉补齐。 */
.pager { flex-wrap: wrap; padding: 0; }
.pager li { list-style: none; }
.pager li.page-item > a,
.pager li.page-item > span {
  min-width: 38px; height: 38px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  color: var(--text-2);
  text-decoration: none;
}
.pager li.page-item > a:hover { border-color: var(--primary); color: var(--primary); }
.pager li.page-item.active > span { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.pager li.page-item.disabled > span { opacity: .45; cursor: not-allowed; }
.pager select {
  height: 38px; padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-2);
  font-size: var(--fs-sm);
}

/* 频道页筛选条 */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.filters .chip {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: var(--fs-sm);
  color: var(--text-2);
  cursor: pointer;
}
.filters .chip.active { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
/* ---------- 频道页头部 ---------- */
.page-head {
  position: relative;
  padding-left: 16px;
  margin: 8px 0 20px;
}
.page-head::before {
  content: "";
  position: absolute;
  left: 0; top: 5px; bottom: 5px;
  width: 4px;
  border-radius: 2px;
  background: var(--accent, var(--primary));
}
.page-title { font-size: var(--fs-xl); margin: 0 0 8px; letter-spacing: -.3px; }
.page-desc { font-size: var(--fs-sm); color: var(--text-2); margin-bottom: 10px; }
.page-stat {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: var(--fs-xs);
  color: var(--text-3);
}
.page-stat b {
  color: var(--text);
  font-weight: var(--fw-medium);
  font-variant-numeric: tabular-nums;
}
.entries + .section-head, .entry-compact + .section-head { margin-top: 34px; }
/* ---------- 相关专题（卡片式） ---------- */
.wtopic-list { display: grid; gap: 12px; }
.wtopic {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
  transition: border-color .18s, background .18s, transform .18s, box-shadow .18s;
}
/* 悬停时左侧亮起一道渐变色条 */
.wtopic::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--danger), #ff8a4c);
  opacity: 0;
  transition: opacity .18s;
}
.wtopic:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .07);
}
.wtopic:hover::before { opacity: 1; }
.wt-n {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  letter-spacing: -.4px;
  color: var(--danger);
  font-variant-numeric: tabular-nums;
  opacity: .85;
}
/* minmax(0,1fr) 而非隐式 auto 列：否则极端长串会把 min-content 顶上来撑破卡片 */
.wt-body { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.wt-body b {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  line-height: var(--lh-ui);
}
.wtopic:hover .wt-body b { color: var(--primary); }
.wt-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: var(--fs-2xs);
  color: var(--text-3);
}
.wt-meta > * { min-width: 0; overflow-wrap: anywhere; }
.wt-meta em { font-style: normal; font-weight: var(--fw-medium); color: var(--text-2); }
.wt-meta .sep { width: 1px; height: 10px; background: var(--border); }
.wt-arrow {
  flex: none;
  color: var(--text-3);
  opacity: 0;
  transform: translateX(-3px);
  transition: opacity .18s, transform .18s, color .18s;
}
.wtopic:hover .wt-arrow { opacity: 1; transform: none; color: var(--primary); }

.filter-sep { flex: none; width: 1px; height: 18px; background: var(--border); margin: 0 2px; }
.pager-info { margin-left: 10px; font-size: var(--fs-2xs); color: var(--text-3); align-self: center; }

/* =========================================================
   文章页尾部「最新更新」——支持两种加载形式：
   ① 无限滚动（IntersectionObserver 命中哨兵自动加载）
   ② 点击「加载更多」手动加载
   两者共用同一套分页状态，可随时用顶部的开关切换。
   ========================================================= */
/* 不能用 inline-flex：flex 容器的基线取自第一个子项，而第一个子项是 checkbox
   （基线＝盒子下边缘），结果开关整体比标题基线高 7px。
   改回普通行内排列，label 的基线就是文字基线（作为 flex item 会被 blockify）。 */
.stream-switch {
  margin-left: auto;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-normal);
  color: var(--text-3);
  cursor: pointer;
  user-select: none;
}
.stream-switch input {
  width: 14px; height: 14px;
  margin: 0 4px 0 0;
  vertical-align: -2px;
  accent-color: var(--primary);
}
.stream-switch:hover { color: var(--text-2); }

.stream-list { display: grid; }
.stream-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.stream-item:last-child { border-bottom: 0; }
.si-time {
  padding-top: 2px;
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.si-body { min-width: 0; display: grid; gap: 8px; }
.si-body h3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  line-height: var(--lh-ui);
  overflow-wrap: anywhere;
}
.si-body h3 a:hover { color: var(--primary); }
.si-body .meta { font-size: var(--fs-2xs); gap: 8px; }

.stream-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-top: 18px;
}
.stream-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-2xs);
  color: var(--text-3);
}
.stream-tip.is-loading::before {
  content: "";
  width: 11px; height: 11px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: skSpin .7s linear infinite;
}
.stream-tip.is-end { color: var(--text-3); letter-spacing: .3px; }
.stream-sentinel { width: 100%; height: 1px; }@keyframes skSpin{ to { transform: rotate(360deg); } }

/* =========================================================
   数据条（首页「今日关键数字」/ 频道页「频道数据」）
   ========================================================= */
.databar {
  margin-top: 24px;
  padding: 20px 24px 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.databar.compact {
  margin: 0 0 24px;
  padding: 20px 20px 2px;
}
.db-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}
.db-head h2 { font-size: var(--fs-md); font-weight: var(--fw-bold); }
.db-sub { margin-left: auto; font-size: var(--fs-2xs); color: var(--text-3); }
.db-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
}
.databar.compact .db-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.db-cell {
  display: grid;
  align-content: start;
  gap: 3px;
  padding: 0 16px 20px 0;
  min-width: 0;
}
.db-cell + .db-cell { padding-left: 16px; border-left: 1px solid var(--border); }
.db-n {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: -.6px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.db-n i { font-style: normal; font-size: var(--fs-sm); font-weight: var(--fw-medium); margin-left: 2px; color: var(--text-2); }
.db-t { font-size: var(--fs-xs); color: var(--text-2); }
.db-d {
  font-size: var(--fs-2xs);
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
/* 涨跌遵循国内习惯：涨＝红，跌＝绿 */
.db-d.up { color: var(--danger); }
.db-d.down { color: var(--ok); }

/* ---------- 观点（引用卡） ---------- */
.opinion-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.op-card {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 20px 20px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.op-card::before {
  content: "\201C";
  position: absolute;
  left: 14px; top: 4px;
  font-size: 44px;   /* 装饰引号，非文本，不参与字号阶梯 */
  line-height: 1;
  color: var(--primary);
  opacity: .22;
}
.op-card blockquote {
  margin: 0;
  font-size: var(--fs-md);
  line-height: var(--lh-body);
  color: var(--text);
}
.op-by {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-2xs);
  color: var(--text-3);
}
.op-by .ava { color: var(--text-2); font-weight: var(--fw-medium); }

/* ---------- 往期归档 ---------- */

/* ---------- 延伸阅读 · 问答（复用 .fold） ---------- */
.qa .fold { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.qa .fold + .fold { margin-top: 8px; }
.qa .fold > summary { padding: 12px 16px; background: var(--surface); }
.qa .fold[open] > summary { border-bottom: 1px solid var(--border); }
.qa .fold-body { padding: 12px 16px 16px; }
.qa .fold-body p { font-size: var(--fs-md); line-height: var(--lh-body); color: var(--text-2); }

/* ---------- 回到顶部 ---------- */
.to-top {
  position: fixed;
  right: 26px; bottom: 26px;
  z-index: 70;
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-2);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s, transform .2s, visibility .2s, color .15s, border-color .15s;
}
.to-top.is-show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: var(--primary); border-color: var(--primary); }
.to-top:focus-visible { outline: none; box-shadow: var(--ring); }

/* 加载中骨架 */
.skeleton { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.skeleton i {
  display: block;
  border-radius: var(--radius-xs);
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 37%, var(--surface-2) 63%);
  background-size: 400% 100%;
  animation: skShimmer 1.2s ease-in-out infinite;
}
.skeleton i:nth-child(1) { height: 14px; }
.skeleton i:nth-child(2) { height: 14px; width: 62%; }
.skeleton:last-child { border-bottom: 0; }
/* 首页信息流用的骨架：左图右文，与 .entry 同构 */
.skeleton.sk-entry {
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
  padding: 20px 0;
}
.skeleton.sk-entry i:nth-child(1) { height: 116px; }
.skeleton.sk-entry i:nth-child(2) { height: 16px; width: 78%; }@keyframes skShimmer{
  0%   { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}@media (prefers-reduced-motion: reduce){
  .skeleton i { animation: none; }
  .stream-tip.is-loading::before { animation-duration: 2s; }
}

/* 筛选切换后列表淡入，让「点了有反应」 */
.is-swap { animation: swapIn .28s ease; }@keyframes swapIn{
  from { opacity: .3; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

/* 交互态：点赞 / 收藏 / 关注 */
[data-like].is-on, [data-collect].on { color: var(--primary); border-color: var(--primary); }
[data-like].is-on svg, [data-collect].on svg { fill: currentColor; }
.follow.on {
  background: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--text-2);
}

/* 新发布的评论短暂高亮 */
.comment.is-new { animation: cmtIn .5s ease; }@keyframes cmtIn{
  from { background: var(--primary-soft); }
  to   { background: transparent; }
}

/* =========================================================
   文本长度兜底
   规则：标题一律 2 行截断，摘要 2 行，单行型元信息省略号，
   所有可能出现长串（URL / 无空格英文 / 长数字）的地方强制断行。
   ========================================================= */
.clamp-1, .clamp-2, .clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.clamp-1 { -webkit-line-clamp: 1; }
.clamp-2 { -webkit-line-clamp: 2; }
.clamp-3 { -webkit-line-clamp: 3; }

/* 标题类 */
.card h3, .topic h3, .entry h3,          /* 已有 clamp-2 */
.split-lead h3, .rec-b b, .lead-title,
.slide-body h1, .wt-body b, .toc a,
.prevnext a, .rank a, .entries h3 {
  overflow-wrap: anywhere;
}
.split-lead h3, .rec-b b, .lead-title, .toc a, .prevnext a, .rank a {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.rank a { -webkit-line-clamp: 1; }        /* 榜单是单行紧凑行 */
/* 榜首大卡标题是 .lead-title，被上面这条 .rank a（0,1,1）按特异性压成 1 行，
   1280 下实测只有 21.7px；单独提回 2 行。 */
.rank .lead-title { -webkit-line-clamp: 2; }
.toc a  { -webkit-line-clamp: 1; }

/* 摘要类 */
.card p, .entry p, .topic p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
}

/* 单行元信息：宁可省略号，不要换行把行高撑开 */
.rec-b em, .lead-sub, .widget-sub, .brief-item a, .comment .head .name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.brief-item a { display: block; }

/* 标签 / 徽标：再长的词也不许把容器顶开 */
.tag, .badge, .pill {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 用户生成内容（评论）可长，但必须能断行 */
.comment .text, .comment .name, .fold-body, .note { overflow-wrap: anywhere; }

/* 兜底：任何容器都不允许被不可断的长串撑破 */
.main, .sidebar, .card-grid, .entry-body, .widget, .hero-side, .brief-grid { min-width: 0; }
.article-head h1, .lede, .footnotes li, .figcaption, .source-note,
.crumbs, .toc a, .wt-n, .si-time, .pager-info, .filter { overflow-wrap: anywhere; }

/* ---------- 页脚 ---------- */
.footer {
  margin-top: 44px;
  padding: 44px 0 28px;
  border-top: 1px solid var(--border);   /* 与 topbar / nav 的分隔线保持同一语言 */
  background: var(--footer-bg);
  color: var(--footer-text);
}
.footer h2 { color: #fff8ec; }
.footer-logo { display: block; width: 111px; height: 26px; }
.footer li, .footer .about { color: var(--footer-text); }
.footer a:hover { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
}
.footer h2 { margin: 0 0 12px; font-size: var(--fs-sm); font-weight: var(--fw-bold); }
.footer-brand { margin: 0 0 12px; }
.footer li { margin-bottom: 8px; font-size: var(--fs-sm); }
.footer li a:hover { color: #fff; }
/* 【桌面档热区】实测 1280：页脚频道链接 28x19、关于/条款链接 56x19。
   ≤720 档已有 padding: 8px 0 的宽松版，桌面档一直是漏的。 上下各补 4px padding，再用等量负 margin 抵消：行内块的**外边距盒**参与行高计算， 抵消后 li 的行高与页脚总高都不变，但可点高度从 19 → 29px。 */ .footer-grid ul li a { display: inline-block; padding: 4px 0; margin: -5px 0; }
.footer .about { font-size: var(--fs-sm); }
.footer-bottom {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: var(--fs-xs);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- 频道色徽标 ---------- */
.b-yaowen  { background: color-mix(in srgb, var(--c-yaowen) 12%, transparent);  color: var(--c-yaowen); }
.b-keji    { background: color-mix(in srgb, var(--c-keji) 12%, transparent);    color: var(--c-keji); }
.b-caijing { background: color-mix(in srgb, var(--c-caijing) 14%, transparent); color: var(--c-caijing); }
.b-guoji   { background: color-mix(in srgb, var(--c-guoji) 12%, transparent);   color: var(--c-guoji); }
.b-shehui  { background: color-mix(in srgb, var(--c-shehui) 12%, transparent);  color: var(--c-shehui); }
.b-wenhua  { background: color-mix(in srgb, var(--c-wenhua) 12%, transparent);  color: var(--c-wenhua); }
.b-nengyuan{ background: color-mix(in srgb, var(--c-nengyuan) 12%, transparent);color: var(--c-nengyuan); }

.accent-yaowen  { --accent: var(--c-yaowen); }
.accent-keji    { --accent: var(--c-keji); }
.accent-caijing { --accent: var(--c-caijing); }
.accent-guoji   { --accent: var(--c-guoji); }
.accent-shehui  { --accent: var(--c-shehui); }
.accent-wenhua  { --accent: var(--c-wenhua); }
.accent-nengyuan { --accent: var(--c-nengyuan); }

/* ---------- 栏目 eyebrow ---------- */
.kicker {
  display: block;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-medium);
  letter-spacing: .18em;
  color: var(--accent, var(--primary));
}

/* ---------- 缩略图上的角标 ----------
   2026-10-22 用户决策：去掉 flag（图集/视频），保留 cat（栏目）。
   原因：缩略图太小（.entry .thumb 窄屏 92x64），flag 在左上、cat 在左下，
   垂直间隙 -3px，两个徽章交叠在一起，二者只能留一个，用户选了 cat。
   NewsCard / NewsEntry 已不再输出 $flagHtml，相应 CSS 规则一并删除。 */
.thumb .cat {
  position: absolute;
  left: 10px; bottom: 10px;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  background: var(--cat, var(--primary));
  color: var(--on-cat);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-medium);
}

/* ---------- 元信息里的迷你头像 ---------- */
.meta .ava { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); }
.meta .ava i {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #8a6bff);
  color: transparent;
  font-style: normal;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-medium);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ---------- 要闻速览（无图紧凑条） ---------- */
.brief {
  margin-top: 24px;
  padding: 4px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.brief-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0 4px;
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
}
.brief-head .sub { font-size: var(--fs-2xs); font-weight: var(--fw-normal); color: var(--text-3); }
.brief-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 36px;
}
.brief-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px dashed var(--border);
  font-size: var(--fs-sm);
}
/* 不能用 inline-flex + align-items:center：flex 容器的基线取自第一个参与基线
   对齐的子项，而第一个子项是 ::before 那个 5px 圆点（没有文字，基线按盒子下边缘
   合成），结果是「要闻」二字比右侧标题低 2.5px。改成 inline-block + vertical-align
   后，父元素基线仍是文字基线，与标题天然对齐。 */
.brief-item .dotcat {
  flex: none;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-medium);
  white-space: nowrap;
}
.brief-item .dotcat::before {
  content: "";
  display: inline-block;
  width: 4px; height: 4px;
  margin-right: 4px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: middle;
}
/* 没有 flag 时不写字（见 NewsBrief）：这时不能再占「圆点 + 两个字」的宽度，
   否则圆点孤零零挂在行首、和标题之间空出一大段 —— 圆点直接贴着标题 */
.brief-item .dotcat:empty::before { margin-right: 0; }
.brief-item a:hover { color: var(--primary); }
.brief-item time { margin-left: auto; flex: none; font-size: var(--fs-2xs); color: var(--text-3); }


/* ---------- 紧凑纯文字条目（密度对比） ---------- */
.entry-compact { padding: 2px 0; }
.entry-compact .entry {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
}
.entry-compact .entry:last-child { border-bottom: 0; }
.entry-compact .idx { flex: none; width: 22px; font-size: var(--fs-xs); color: var(--text-3); font-variant-numeric: tabular-nums; }
.entry-compact h3 { font-size: var(--fs-md); font-weight: var(--fw-medium); line-height: var(--lh-ui); margin: 0; }
.entry-compact h3 a:hover { color: var(--primary); }
.entry-compact time { margin-left: auto; flex: none; font-size: var(--fs-2xs); color: var(--text-3); }

/* ---------- 文章页：导语 / 数据卡 / 表格 / 金句 ---------- */
.lede {
  margin: 0 0 24px;
  padding: 16px 20px;
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--primary-soft);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
}
.lede strong { color: var(--primary); }

.callout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.callout .cell .n { font-size: var(--fs-xl); font-weight: var(--fw-medium); font-variant-numeric: tabular-nums; }
.callout .cell .n em { font-style: normal; font-size: var(--fs-xs); font-weight: var(--fw-normal); color: var(--text-3); margin-left: 4px; }
.callout .cell .d { margin-top: 2px; font-size: var(--fs-xs); color: var(--text-2); }
.callout .cell .up { color: var(--danger); }
.callout .cell .down { color: var(--c-nengyuan); }

.data-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.data-table caption { caption-side: top; text-align: left; padding-bottom: 8px; font-size: var(--fs-xs); color: var(--text-3); }
.data-table th, .data-table td { padding: 12px 12px; border-bottom: 1px solid var(--border); text-align: left; }
.data-table thead th { background: var(--surface); font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--text-2); }
.data-table tbody tr:hover td { background: var(--surface); }

.pullquote { margin: 32px 0; text-align: center; }
.pullquote p {
  position: relative;
  display: inline-block;
  max-width: 34em;
  font-size: var(--fs-xl);
  font-weight: var(--fw-medium);
  line-height: var(--lh-ui);
}
.pullquote p::before,
.pullquote p::after { color: var(--primary); opacity: .45; }
.pullquote p::before { content: "“"; margin-right: 2px; }
.pullquote p::after { content: "”"; margin-left: 2px; }
.pullquote cite { display: block; margin-top: 10px; font-style: normal; font-size: var(--fs-xs); color: var(--text-3); }

/* ---------- 文章页：操作条 / 作者卡 ---------- */
.follow {
  margin-left: auto;
  height: 32px;
  padding: 0 16px;
  border: 1px solid var(--primary);
  border-radius: 999px;
  background: transparent;
  color: var(--primary);
  font-size: var(--fs-xs);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.follow:hover { background: var(--primary); color: var(--on-primary); }

.actionbar { display: flex; gap: 12px; margin-left: auto; }
.act {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  font-size: var(--fs-xs);
  color: var(--text-2);
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.act:hover { border-color: var(--primary); color: var(--primary); }
.act em { font-style: normal; font-variant-numeric: tabular-nums; }
.act.on { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

/* 署名条：一行式，取代原来的作者资料卡。
   卡片版被右侧「186 篇 / 2.4 万 + 关注」撑到 190px，主信息只占中间一窄条，
   上下大片留白，且夹在上下篇与相关阅读之间切断阅读动线。
   这里只保留「谁写的 + 关注」，砍掉统计数字与长简介，高度 190px → 58px。 */
.author-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.author-byline .avatar { width: 36px; height: 36px; font-size: var(--fs-xs); }
.author-byline .who {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 12px;
  min-width: 0;
}
.author-byline .n { font-size: var(--fs-md); font-weight: var(--fw-medium); }
.author-byline .d { font-size: var(--fs-xs); color: var(--text-3); }
.author-byline .follow { margin-left: auto; height: 32px; padding: 0 16px; font-size: var(--fs-2xs); }

/* =========================================================
   新增页面组件
   搜索页 / 标签页 / 专题页 / 404 / 作者页 / 关于 / 条款 / 联系
   ========================================================= */

/* ---------- 通用：圆形文字头像 ---------- */
.ava-round {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: var(--fs-sm); font-weight: var(--fw-medium);
}
/* 侧栏推荐条目第一列是 64px（原为缩略图），头像居中放 */
.rec-item .ava-round { width: 44px; height: 44px; font-size: var(--fs-md); align-self: start; }

/* ---------- 搜索页 ---------- */
.search-head { padding: 8px 0 2px; }
.search-big {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 640px;
  padding: 8px 8px 8px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}
.search-big:focus-within { border-color: var(--primary); box-shadow: var(--ring); }
.search-big > svg { flex: none; opacity: .5; }
.search-big input {
  flex: 1;
  min-width: 0;
  height: 40px;
  border: 0;
  background: none;
  outline: none;
  font-size: var(--fs-base);
}
.search-big .btn { flex: none; height: 40px; padding: 0 24px; border-radius: 999px; }
.search-meta { margin-top: 14px; font-size: var(--fs-xs); color: var(--text-3); }
.search-meta b { color: var(--text); font-variant-numeric: tabular-nums; }
.search-head .filters { margin-top: 16px; }
.results { display: grid; }
/* 关键词命中高亮 */
mark {
  padding: 0 2px;
  border-radius: 2px;
  background: var(--mark);
  color: var(--mark-text);
}

/* 无结果空状态 */
.empty-state {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 56px 24px 60px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}
.es-icon {
  width: 60px; height: 60px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-2);
  color: var(--text-3);
}
.empty-state h3 { font-size: var(--fs-lg); }
.empty-state > p { max-width: 460px; font-size: var(--fs-sm); color: var(--text-2); }
.es-tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 4px; }

/* ---------- 标签页头部 ---------- */
.tag-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
  margin: 16px 0 4px;
  padding: 20px 0 20px;
  border-bottom: 1px solid var(--border);
}
.tag-head-main h1 {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-size: var(--fs-2xl);
  letter-spacing: -.5px;
}
.th-hash { color: var(--primary); font-weight: var(--fw-bold); }
.tag-desc { margin-top: 8px; max-width: 62ch; font-size: var(--fs-sm); color: var(--text-2); }
.tag-stat {
  display: flex; flex-wrap: wrap; gap: 8px 20px;
  margin-top: 12px;
  font-size: var(--fs-xs); color: var(--text-3);
}
.tag-stat b { color: var(--text); font-weight: var(--fw-medium); font-variant-numeric: tabular-nums; }
.tag-head-side { display: grid; justify-items: end; gap: 8px; }
.tag-upd { font-size: var(--fs-2xs); color: var(--text-3); }

/* ---------- 专题页 ---------- */
/* 专题头：封面 + 压题（v26 重做，标题上封面，scrim 保证白字对比度）
   作用域坑：.topic-cover 同时被「首页专题策划卡」和「专题页 hero」使用。
   早期这里写的是裸 .topic-cover，结果把首页卡片 21/9 的封面压成了 340px 高
   （实测 249x340，设计应是 108px）。所以 hero 这一整套必须限定在 .topic-hero 下。 */
.topic-hero { margin: 16px 0 8px; }
.topic-hero .topic-cover {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
}
.topic-hero .topic-cover > img { display: block; width: 100%; height: 340px; object-fit: cover; }
.topic-hero .topic-cover::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(9, 13, 24, .95) 0%, rgba(9, 13, 24, .78) 42%, rgba(9, 13, 24, .22) 100%);
}
.topic-hero .topic-cover-body { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; padding: 28px 32px 24px; }
/* .topic-badge 在首页是 absolute 的图片角标；这里改回普通行内块并用主色底 */
.topic-hero .topic-cover-body .topic-badge { position: static; display: inline-block; margin-bottom: 12px; background: var(--primary); border-color: transparent; color: var(--on-primary); }
.topic-hero .topic-cover-body h1 { margin: 0 0 12px; font-size: var(--fs-2xl); line-height: var(--lh-tight); letter-spacing: -.5px; color: #fff; }
.topic-hero .topic-cover-body > p { max-width: 62ch; font-size: var(--fs-sm); line-height: var(--lh-body); color: rgba(255, 255, 255, .84); }
.topic-hero-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 14px;
  font-size: var(--fs-xs); color: rgba(255, 255, 255, .72);
}
.topic-hero .topic-cover-body .topic-hero-meta .ava { color: rgba(255, 255, 255, .92); }
.topic-hero .topic-cover-body .topic-hero-meta .ava i { background: rgba(255, 255, 255, .24); }
/* 章节号：占用 .entry 的第一列（原缩略图列） */
.chapter {
  align-self: start;
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: var(--fs-base); font-weight: var(--fw-bold); letter-spacing: -.5px;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}
/* 有章节号时把首列从 180px 收成 56px（不支持 :has 时首列留白，仍可读） */
.entry:has(> .chapter) { grid-template-columns: 56px minmax(0, 1fr); }
.topic-more { display: flex; justify-content: center; padding-top: 20px; }
/* 章节号超过两位（专题篇数上百/上千）时缩小字号，56px 方块里才放得下 */
.chapter.len4 { font-size: var(--fs-xs); letter-spacing: -.8px; }

/* ---------- 404 ---------- */
.nf { max-width: var(--max); margin: 0 auto; padding: 36px 20px 52px; }
.nf-inner { max-width: 680px; margin: 0 auto; text-align: center; }
.nf-code {
  font-size: var(--fs-display);
  font-weight: var(--fw-bold);
  line-height: 1;
  letter-spacing: -4px;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}
.nf-inner h1 { margin: 16px 0 8px; font-size: var(--fs-xl); }
.nf-inner > p { font-size: var(--fs-sm); color: var(--text-2); }
.nf-inner .search-big { margin: 24px auto 0; }
.nf-tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
/* 404 频道入口（v26 新增） */
.nf-channels { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.nf-channels a {
  padding: 4px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: var(--fs-xs);
  color: var(--text-2);
  transition: border-color .15s, color .15s;
}
.nf-channels a:hover { border-color: var(--primary); color: var(--primary); }
.nf-links {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 4px 12px;
  margin-top: 22px;
  font-size: var(--fs-sm); color: var(--text-2);
}
.nf-links a:hover { color: var(--primary); }
.nf-links .sep { flex: none; width: 1px; height: 12px; background: var(--border-strong); }
.nf-latest {
  margin-top: 42px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: left;
}
/* 404 页内的 CTA 条：居中且留白收敛 */
.nf-cta { margin-top: 34px; text-align: left; }
.nf-latest h2 { margin-bottom: 12px; font-size: var(--fs-base); }

/* ---------- 作者页头部 ---------- */
.author-head {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
  margin: 16px 0 4px;
  padding: 20px 0 20px;
  border-bottom: 1px solid var(--border);
}
.avatar.lg { width: 72px; height: 72px; font-size: var(--fs-xl); }
.author-head-main h1 { font-size: var(--fs-xl); letter-spacing: -.4px; }
.author-title { margin-top: 6px; font-size: var(--fs-sm); color: var(--text-2); }
.author-bio { margin-top: 8px; max-width: 68ch; font-size: var(--fs-sm); color: var(--text-2); }
.author-stat {
  display: flex; flex-wrap: wrap; gap: 8px 20px;
  margin-top: 12px;
  font-size: var(--fs-xs); color: var(--text-3);
}
.author-stat b { color: var(--text); font-weight: var(--fw-medium); font-variant-numeric: tabular-nums; }
.author-head-side { display: grid; justify-items: end; gap: 8px; }
.author-upd { font-size: var(--fs-2xs); color: var(--text-3); }

/* ---------- 静态页（关于 / 条款 / 联系）---------- */
.page-head h1 { font-size: var(--fs-xl); margin: 0 0 8px; letter-spacing: -.3px; }
.page-head p { max-width: 68ch; font-size: var(--fs-sm); color: var(--text-2); }

.static-doc { max-width: 780px; }
.static-doc > section { padding: 24px 0; border-bottom: 1px solid var(--border); }
.static-doc > section:first-child { padding-top: 8px; }
.static-doc > section:last-child { border-bottom: 0; padding-bottom: 8px; }
.static-doc h2 { margin-bottom: 12px; font-size: var(--fs-lg); }
.static-doc h3 { margin: 20px 0 8px; font-size: var(--fs-md); }
.static-doc p { font-size: var(--fs-md); line-height: var(--lh-body); color: var(--text-2); }
.static-doc p + p { margin-top: 10px; }
.static-doc a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
/* .static-doc a 是 (0,1,1)，会盖掉 .btn 的 (0,1,0) → static-doc 内的按钮链接
   变成「主色字压在实底主色上」整片看不见（about 客户端下载按钮踩过）。
   这里提权恢复，并去掉正文链接的下划线。 */
.static-doc a.btn { color: var(--on-primary); text-decoration: none; }
.static-doc a.btn.ghost { color: var(--text); }

/* 编辑部成员 */
.team-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.team-card {
  display: grid;
  justify-items: start;
  align-content: start;
  padding: 20px 20px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .18s, transform .18s, box-shadow .18s;
}
.team-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .07);
}
.tc-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tc-id { display: grid; gap: 2px; min-width: 0; }
.team-card .ava-round { flex: none; width: 42px; height: 42px; font-size: var(--fs-base); }
.tc-name { font-size: var(--fs-base); font-weight: var(--fw-medium); }
.tc-role { font-size: var(--fs-2xs); line-height: var(--lh-ui); color: var(--text-2); }
.static-doc .tc-bio { margin-top: 12px; font-size: var(--fs-xs); line-height: var(--lh-body); color: var(--text-2); }
.tc-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tc-tag {
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: var(--fs-2xs);
  color: var(--text-2);
}
.tc-work { margin-top: 12px; min-width: 0; }
.tc-work-l { display: block; margin-bottom: 3px; font-size: var(--fs-2xs); color: var(--text-3); }
.tc-work a { font-size: var(--fs-xs); line-height: var(--lh-ui); color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.tc-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; width: 100%;
  margin-top: auto; padding-top: 12px;
  border-top: 1px solid var(--border);
}
.tc-count { font-size: var(--fs-2xs); color: var(--text-3); font-variant-numeric: tabular-nums; }
.app-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }

/* ---------- 关于页：品牌叙事 ---------- */
.about-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 36px;
  align-items: stretch;
  margin: 4px 0 0;
  padding: 36px 36px 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.ah-eyebrow { font-size: var(--fs-2xs); letter-spacing: 1.4px; color: var(--text-3); }
/* 36px 与 .doc-head h1 对齐（三静态页头部字号统一，原 42px 偏大） */
.ah-title { margin: 8px 0 0; font-size: var(--fs-2xl); line-height: var(--lh-tight); letter-spacing: -1px; }
.ah-claim { margin-top: 10px; font-size: var(--fs-lg); font-weight: var(--fw-medium); color: var(--primary); }
.ah-lead { margin-top: 16px; max-width: 60ch; font-size: var(--fs-base); line-height: var(--lh-body); color: var(--text-2); }
.ah-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.ah-chip {
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: var(--fs-2xs);
  color: var(--text-2);
}
.ah-mark {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 16px;
  padding: 24px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  text-align: center;
}
.ah-mark svg { display: block; }
.ah-mark-t {
  width: 100%;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: var(--fs-sm); font-weight: var(--fw-medium); line-height: var(--lh-ui);
  color: var(--text);
}
.ah-mark-s { font-size: var(--fs-2xs); letter-spacing: .8px; color: var(--text-3); }

/* 编号小节（仅关于页） */
.about-doc { counter-reset: sec; margin-inline: auto; }
.about-doc > section { counter-increment: sec; }
.about-doc h2 { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; font-size: var(--fs-lg); }
.about-doc h2::before {
  content: counter(sec, decimal-leading-zero);
  font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: .5px;
  color: var(--primary);
}

/* 我们相信 */
.value-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 16px; }
.value-card { padding: 16px 0 0; border-top: 2px solid var(--primary); }
.vc-icon {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  margin-bottom: 12px;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  color: var(--primary);
}
.value-card h3 { margin-bottom: 6px; font-size: var(--fs-base); font-weight: var(--fw-bold); }
.static-doc .value-card p { font-size: var(--fs-xs); line-height: var(--lh-body); color: var(--text-2); }

/* 里程碑时间线 */
.ms-list { margin: 8px 0 0; padding: 0; list-style: none; }
.ms-item {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
}
.ms-item:last-child { padding-bottom: 0; }
.ms-year {
  font-size: var(--fs-md); font-weight: var(--fw-bold);
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}
.ms-body b { font-size: var(--fs-md); font-weight: var(--fw-medium); }
.static-doc .ms-body p { margin-top: 4px; font-size: var(--fs-sm); line-height: var(--lh-body); color: var(--text-2); }

/* 数字条 */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 16px;
  padding-top: 4px;
  border-top: 2px solid var(--border);
}
.stat { display: grid; align-content: start; gap: 4px; padding: 16px 16px 2px; min-width: 0; }
.stat:first-child { padding-left: 0; }
.stat + .stat { padding-left: 16px; border-left: 1px solid var(--border); }
.stat-n {
  font-size: var(--fs-2xl); font-weight: var(--fw-bold); line-height: var(--lh-tight);
  letter-spacing: -.8px;
  font-variant-numeric: tabular-nums;
}
.stat-n i {
  font-style: normal;
  margin-left: 2px;
  font-size: var(--fs-sm); font-weight: var(--fw-medium);
  color: var(--text-2);
}
.stat-t { font-size: var(--fs-xs); color: var(--text-2); }

/* 客户端分栏 */
.app-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 24px;
  align-items: start;
  margin-top: 14px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.as-actions {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.as-actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 12px; }
.as-actions .btn svg { flex: none; }
.as-note { font-size: var(--fs-2xs); color: var(--text-3); text-align: center; }

/* 订阅卡 */
.sub-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  margin-top: 14px;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.sc-text b { display: block; font-size: var(--fs-md); font-weight: var(--fw-medium); }
.static-doc .sc-text p { margin-top: 5px; font-size: var(--fs-xs); line-height: var(--lh-body); color: var(--text-2); }
.sub-card .field { margin-top: 0; max-width: 330px; }

/* 准则引用出处 */
/* .pullquote p 与 .static-doc p 同为 (0,1,1)，后者在后会把引用压成 15px —— 提权恢复 */
.static-doc .pullquote p { font-size: var(--fs-xl); line-height: var(--lh-ui); font-weight: var(--fw-medium); color: var(--text); }
.pullquote .pq-src { display: block; margin-top: 14px; font-size: var(--fs-xs); }
.pullquote .pq-src a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }

/* 加入我们 */
.join-cta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  margin-top: 0;
  padding: 24px 28px;
  border-radius: var(--radius);
  background: var(--primary);
}
.join-cta h2 { font-size: var(--fs-lg); color: var(--on-primary); }
.join-cta p { margin-top: 5px; font-size: var(--fs-sm); color: var(--on-primary); opacity: .85; }
.join-cta .btn { flex: none; background: var(--on-primary); color: var(--primary); }

/* 关于页侧栏 */
.side-p { font-size: var(--fs-xs); line-height: var(--lh-body); color: var(--text-2); }
.side-mail { display: block; margin: 12px 0 16px; font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--primary); }
.widget .side-mail + .btn { width: 100%; }

/* 订阅输入行 */
.field { display: flex; gap: 12px; max-width: 460px; margin-top: 14px; }
.field input {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  outline: none;
}
.field input:focus { border-color: var(--primary); box-shadow: var(--ring); }
/* 蜜罐字段：移出屏幕外（不能用 display:none —— 机器人会直接跳过隐藏字段，蜜罐就失效了） */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* 订阅说明小字 */
.sub-note { margin-top: 8px; font-size: var(--fs-2xs); line-height: var(--lh-body); color: var(--text-3); }
/* 提交中：按钮置灰，避免用户以为没点上连点 */
.field .btn:disabled { opacity: .62; cursor: default; }

/* 圆点清单（联系方式 / 邮箱列表） */
.dot-list { display: grid; gap: 8px; margin-top: 12px; font-size: var(--fs-sm); color: var(--text-2); }
.dot-list li { position: relative; padding-left: 16px; }
.dot-list li::before {
  content: "";
  position: absolute;
  left: 2px; top: .68em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary);
  opacity: .55;
}
.dot-list b { margin-right: 2px; color: var(--text); font-weight: var(--fw-medium); }

/* 投稿表单 */
/* minmax(0,1fr) 而不是 1fr：1fr 的最小尺寸是 auto(min-content)，
   input 的默认宽度会把列撑破（实测 360 宽下两列合计 376 > 可用 336，整页横向溢出 28px）。 */
.contact-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; max-width: 640px; margin-top: 18px; }
.contact-form label { display: grid; gap: 8px; min-width: 0; font-size: var(--fs-xs); color: var(--text-2); }
.contact-form .f-full { grid-column: 1 / -1; }
.contact-form input, .contact-form textarea {
  width: 100%;
  min-width: 0;
  padding: 12px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  outline: none;
  font-size: var(--fs-sm);
  line-height: var(--lh-ui);
  resize: vertical;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--primary); box-shadow: var(--ring); }
.contact-form .btn { justify-self: start; }
/* 联系页线索表单：验证码行 + 提示 */
.contact-form .cf-code-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.contact-form .cf-code-row input#contactCode {
  width: 112px;
  letter-spacing: .16em;
  text-transform: lowercase;
}
.contact-form .cf-code-row img {
  width: 90px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface);
  cursor: pointer;
  display: block;
}
.contact-form .cf-code-row img:hover { border-color: var(--primary); }
.contact-form .cf-code-row .btn { justify-self: auto; flex: 0 0 auto; }
.contact-form .btn:disabled { opacity: .62; cursor: default; }
.contact-note { margin-top: 10px; font-size: var(--fs-2xs); line-height: var(--lh-body); color: var(--text-3); }
/* ============================================================
   联系页热区修补：下面这些元素宽度够，高度却只有 17~24px，手指点不中。
   统一用上下 padding 撑到 28px 以上（视觉上只是链接外围多几 px，占位不变）。
   ============================================================ */
/* chan 卡片里的邮箱/「立即索取」/「阅读爆料安全指引」链接：默认 22px */
.chan a { display: inline-block; padding: 4px 0; }
/* 「投递岗位」按钮：在 flex 容器里已是 flex item，padding 直接生效 */
.static-doc .job-apply { padding: 4px 0; }
/* 「简历与作品请发至 xxx@xx.com」：行内链接 17px，最矮的一个 */
.static-doc .job-tip a { display: inline-block; padding: 8px 0; }
/* 侧栏「本页导航」目录项：桌面不做垂直 padding —— 它是 clamp:1 容器，
   上下 padding 会让第 2 行从 padding 区漏出 8px（同移动端的坑）。 */
/* 侧栏「快速联系」总邮箱：桌面 24px（720 档已有 min-height:34px，此处补齐桌面） */
.widget .side-mail { padding: 4px 0; }

/* 招聘岗位 */
.job-list { display: grid; gap: 12px; margin-top: 14px; }
.job {
  display: grid;
  gap: 8px;
  padding: 20px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .18s, box-shadow .18s;
}
.job:hover { border-color: var(--border-strong); box-shadow: 0 6px 18px rgba(0, 0, 0, .05); }
.job-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.job b { font-size: var(--fs-base); }
.job-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.job-meta span {
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: var(--fs-2xs);
  color: var(--text-2);
}
.static-doc .job p { margin-top: 2px; font-size: var(--fs-sm); line-height: var(--lh-body); color: var(--text-2); }
.job-apply { flex: none; font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--primary); }
/* 提权重：否则会被前面的 .static-doc p(0,1,1) 盖掉，变成 15px */
.static-doc .job-tip { margin-top: 14px; font-size: var(--fs-xs); line-height: var(--lh-body); color: var(--text-3); }

/* ---------- 条款 / 联系页：文档头 ---------- */
.doc-eyebrow { font-size: var(--fs-2xs); letter-spacing: 1.4px; color: var(--text-3); }
.doc-head h1 { margin: 8px 0 0; font-size: var(--fs-2xl); line-height: var(--lh-tight); letter-spacing: -1px; }
.doc-lead { margin-top: 12px; max-width: 60ch; font-size: var(--fs-base); line-height: var(--lh-body); color: var(--text-2); }
.doc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.doc-chip {
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: var(--fs-2xs);
  color: var(--text-2);
}

/* 编号小节：legal / contact 与 about 同一套（about 的规则在「关于页」区块） */
.legal-doc, .contact-doc { counter-reset: sec; margin-inline: auto; }
.legal-doc > section, .contact-doc > section { counter-increment: sec; }
.legal-doc h2, .contact-doc h2 { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; font-size: var(--fs-lg); }
.legal-doc h2::before, .contact-doc h2::before {
  content: counter(sec, decimal-leading-zero);
  font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: .5px;
  color: var(--primary);
}

/* 小节导语：比正文深一档，作该节摘要 */
.static-doc .section-lead { margin-bottom: 4px; font-size: var(--fs-md); line-height: var(--lh-body); color: var(--text); }

/* 条款页 h3 小节：主色短竖标记 */
.legal-doc h3 { display: flex; align-items: center; gap: 8px; margin: 24px 0 8px; font-size: var(--fs-base); }
.legal-doc h3::before {
  content: "";
  flex: none;
  width: 3px; height: 14px;
  border-radius: 2px;
  background: var(--primary);
  opacity: .55;
}

/* 联系渠道卡 */
.chan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.chan {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .18s, box-shadow .18s;
}
.chan:hover { border-color: var(--border-strong); box-shadow: 0 6px 18px rgba(0, 0, 0, .05); }
.chan-ic {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  margin-bottom: 4px;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  color: var(--primary);
}
.chan b { font-size: var(--fs-sm); }
.chan a { font-size: var(--fs-xs); font-weight: var(--fw-medium); }
.chan .chan-txt { font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--text); }
.static-doc .chan p { margin-top: 2px; font-size: var(--fs-2xs); line-height: var(--lh-ui); color: var(--text-3); }
.chan.secure { grid-column: 1 / -1; border-color: transparent; background: var(--primary-soft); }
.static-doc .chan.secure p { color: var(--text-2); }
.chan.secure .chan-ic { background: var(--surface); }
.chan-grid.chan-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }@media (max-width: 1024px){ .chan-grid.chan-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }@media (max-width: 720px){ .chan-grid.chan-4 { grid-template-columns: minmax(0, 1fr); } }

/* 侧栏：更新记录 */
.upd-list { display: grid; gap: 12px; }
.upd-list li { display: grid; gap: 3px; padding-top: 10px; border-top: 1px solid var(--border); }
.upd-list li:first-child { padding-top: 0; border-top: 0; }
.upd-list b { font-size: var(--fs-2xs); font-weight: var(--fw-medium); color: var(--primary); font-variant-numeric: tabular-nums; }
.upd-list span { font-size: var(--fs-xs); line-height: var(--lh-ui); color: var(--text-2); }

/* 条款页侧栏 */
.toc-widget .toc { gap: 2px; }
.legal-upd { font-size: var(--fs-xs); line-height: var(--lh-body); color: var(--text-2); }

/* ---------- 新增组件响应式（放在文件末尾，确保在既有断点之后生效）---------- */
@media (max-width: 1024px) {
  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .value-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 0; }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .about-hero { grid-template-columns: minmax(0, 1fr) 200px; gap: 28px; padding: 28px 28px 32px; }
  .ah-title { font-size: var(--fs-2xl); }
  .ah-lead { font-size: var(--fs-md); }
  .doc-head h1 { font-size: var(--fs-2xl); }
  .app-split { grid-template-columns: minmax(0, 1fr); }
  .sub-card { grid-template-columns: minmax(0, 1fr); }
}@media (max-width: 720px){
  .tag-head, .author-head { grid-template-columns: minmax(0, 1fr); }
  .tag-head-side, .author-head-side {
    display: flex; align-items: center; gap: 12px;
    justify-items: start;
  }
  .avatar.lg { width: 56px; height: 56px; font-size: var(--fs-lg); }
  .tag-head-main h1 { font-size: var(--fs-xl); }
  .author-head-main h1 { font-size: var(--fs-lg); }
  .topic-hero .topic-cover > img { height: 220px; }
  .topic-hero .topic-cover-body { padding: 16px 16px 16px; }
  .topic-hero .topic-cover-body h1 { font-size: var(--fs-lg); }
  .topic-hero .topic-cover-body > p { font-size: var(--fs-xs); }
  /* 移动端列表横排：缩略图左 + 文字右，避免全宽大图把页面拉得过长 */
  .entry { grid-template-columns: 118px minmax(0, 1fr); gap: 12px; padding: 16px 0; }
  .entry img { width: 118px; height: 88px; aspect-ratio: auto; }
  .entry h3 { font-size: var(--fs-base); }
  .entry p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: var(--fs-xs); }
  /* 横排卡片：.card 只有 118px | 1fr 两列，而 h3 / p / meta 都是 .card 的直接子元素，
     不显式指定列就会按「先左后右」交替填入 —— 摘要会被塞进 118px 的左列挤成一条窄条。
     所以这里把三块的位置写死：缩略图占左列并跨两行，标题与 meta 都落在右列。 */
  .card { grid-template-columns: 118px minmax(0, 1fr); gap: 12px 12px; align-items: start; }
  .card .thumb { grid-column: 1; grid-row: 1 / span 2; aspect-ratio: auto; height: 88px; }
  .card h3 { grid-column: 2; }
  /* 摘要在移动端隐藏：横排后右列只剩标题 + 一行 meta，再塞两行摘要会让每条都顶到 130px+，
     四个板块 24 条就把页面撑得过长 */
  .card p { display: none; }
  .card .meta { grid-column: 2; font-size: var(--fs-2xs); gap: 8px; }
  .nf-channels a { padding: 4px 12px; font-size: var(--fs-2xs); }
  .nf { padding: 28px 16px 40px; }
  .nf-code { font-size: var(--fs-display-sm); letter-spacing: -2px; }
  .search-big { padding: 8px 8px 8px 12px; border-radius: var(--radius-sm); }
  .search-big input { height: 36px; font-size: var(--fs-md); }
  .search-big .btn { height: 36px; padding: 0 16px; border-radius: var(--radius-sm); }
  .team-grid { grid-template-columns: minmax(0, 1fr); }
  .value-grid { grid-template-columns: minmax(0, 1fr); }
  .about-hero { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 24px 20px 28px; }
  .ah-mark svg { width: 64px; height: 64px; }
  .ah-title { font-size: var(--fs-xl); }
  .ah-claim { font-size: var(--fs-base); }
  .doc-head h1 { font-size: var(--fs-xl); }
  .chan-grid { grid-template-columns: minmax(0, 1fr); }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 0; }
  .stat-n { font-size: var(--fs-xl); }
  .ms-item { grid-template-columns: 54px minmax(0, 1fr); gap: 12px; padding: 12px 0; }
  .join-cta { padding: 20px; }
  .join-cta .btn { width: 100%; }
  .field { flex-direction: column; }
  .static-doc h2 { font-size: var(--fs-lg); }
}

/* =========================================================
   广告位（原型预留，必须可见标识）
   正式投放时把 .ad-slot 内部换成投放脚本即可，容器尺寸保持不变，
   避免素材加载前后页面跳动（CLS）。
   间距原则：不写死统一值，而是按所在容器的既有节奏给，
   并利用「相邻块级元素上下外边距合并」自动取较大值，避免和
   .section{margin-top:40px} / .layout{padding-top:24px} 叠加成双倍间距。
   ========================================================= */
.ad-slot {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  width: 100%;
  padding: 20px 20px;
  /* 降噪（2026-10-24）：虚线框 + 斜纹底纹的视觉噪音太大，会跟正文卡片抢注意力。
     改成实线弱描边 + 平色底，只保留「广告」角标满足标识合规要求。 */
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--surface-2);
  text-align: center;
}
/* 左上角「广告」角标：投放合规要求必须可识别 */
.ad-slot::before {
  content: "广告";
  position: absolute;
  top: 4px; left: 8px;
  padding: 0 4px;
  border-radius: 3px;
  background: var(--surface);
  font-size: var(--fs-2xs);
  line-height: 16px;   /* 角标固定高度，不参与正文行高节奏 */
  /* --text-3 在 --surface / --surface-2 上分别只有 4.94 / 4.31，角标是最小的 11px，
     统一提到 --text-2（5.92 / 5.29） */
  color: var(--text-2);
}
.ad-size {
  font-size: var(--fs-sm); font-weight: var(--fw-medium);
  color: var(--text-2);
  letter-spacing: .2px;
  font-variant-numeric: tabular-nums;
}
.ad-note { font-size: var(--fs-2xs); color: var(--text-2); }

/* ---- 间距档位 ---- */
/* 通栏：上 32、下 8。下方邻居是 .layout（padding-top:24），8+24=32，与上方对称 */
.ad-slot.banner { min-height: 96px;  margin: 32px 0 8px; }
/* 信息流 / 正文内：邻居多为 .section（margin-top:40），合并后取 40，不会翻倍 */
.ad-slot.infeed { min-height: 130px; margin: 32px 0; }
.ad-slot.intext { min-height: 140px; margin: 32px 0; }
/* 列表内：打断条目节奏，上下各留一点，比条目间距（18px padding）明显更大 */
.ad-slot.inlist { min-height: 120px; margin: 24px 0 24px; }
/* 侧栏：由 .sidebar 自身的 gap: 20px 统一控制，这里不要再给 margin */ .ad-slot.rect { min-height: 256px; margin: 0; }

/* 广告位响应式（放文件末尾，确保在既有断点之后生效） */
@media (max-width: 720px) {
  .ad-slot { padding: 16px 16px; }
  .ad-slot.banner { min-height: 76px;  margin: 24px 0 4px; }
  .ad-slot.rect   { min-height: 200px; }
  .ad-slot.infeed,
  .ad-slot.intext,
  .ad-slot.inlist { min-height: 112px; }
  .ad-slot.infeed,
  .ad-slot.intext { margin: 24px 0; }
  .ad-slot.inlist { margin: 20px 0 20px; }
}

/* 仅供屏幕阅读器 / 搜索引擎，视觉上不可见 */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- 降低动效（晕动症友好） ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  /* Toast 依赖 animation 的 forwards 终态显示，动效被禁用时要兜住可见性 */
  .c-message.is-in { opacity: 1; transform: translateX(-50%); }
  .c-message.is-out { opacity: 0; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  /* 单列下正文不再 780px 居中：否则与页头/侧栏左缘错位 80px+（实测 1024 时 x=104 vs 20） */
  .static-doc { max-width: none; margin-inline: 0; }
  .sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* 两列断点下：广告位与组件区都要独占整行，
     否则广告占半格、组件区再被切成两列（实测 widget 只有 226px） */
  .sidebar > .ad-slot { grid-column: 1 / -1; }
  .sidebar-sticky {
    grid-column: 1 / -1;
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  /* 矩形位此时横跨整行，254px 高的大盒子不好看，压成通栏比例 */
  .ad-slot.rect { min-height: 132px; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .card-grid, .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .db-grid, .databar.compact .db-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}@media (max-width: 720px){
  .nav-links { display: none; }
  .nav-links.open {
    display: grid;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    padding: 12px 20px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    gap: 2px;
  }
  .nav-toggle { display: inline-flex; }
  .search { flex: 1; }
  .sidebar { grid-template-columns: minmax(0, 1fr); }
  .sidebar-sticky { grid-template-columns: minmax(0, 1fr); }
  .carousel-arrow { display: none; }
  .slide-body { padding: 40px 20px 20px; }
  .slide-body h1 { font-size: var(--fs-lg); }
  .slide-body p { display: none; }
  .slide-meta { margin-top: 8px; }
  .card-grid, .gallery, .prevnext, .callout, .brief-grid, .topic-grid, .fig-2 { grid-template-columns: minmax(0, 1fr); }
  .split-lead h3 { font-size: var(--fs-lg); }
  .section-head .head-sub { display: none; }
  .feed-more { flex-direction: column; }
  .feed-more .btn { width: 100%; }
  .author-byline { flex-wrap: wrap; }
  .author-byline .d { flex-basis: 100%; }
  .prevnext a:last-child { text-align: left; }
  .actionbar { margin-left: 0; width: 100%; }
  .article-meta { gap: 12px; }
  .entry { grid-template-columns: minmax(0, 1fr); }
  .entry img { width: 100%; height: auto; aspect-ratio: 16 / 9; }
  .hero-main h1 { font-size: var(--fs-lg); }
  .article-head h1 { font-size: var(--fs-xl); }
  .body-text { font-size: var(--fs-base); }
  .body-text h2 { font-size: var(--fs-lg); margin-top: 28px; }
  .body-text h3 { font-size: var(--fs-base); margin-top: 22px; }
  .chart-box { padding: 12px; }
  .codeblock pre { font-size: var(--fs-2xs); padding: 12px; }
  .lede { font-size: var(--fs-base); }
  .pullquote p { font-size: var(--fs-lg); }
  .pullquote { margin: 24px 0; }
  /* 移动端：实用条整条收起，品牌区压缩 */
  .topbar { display: none; }
  .masthead-inner { height: 62px; gap: 12px; }
  .brand-logo { width: 145px; height: 34px; }
  .brand-sub { display: none; }
  .masthead-cta { display: none; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  /* 数据条：5 列 -> 2 列，并去掉单元之间的竖分隔线改成分隔横线 */
  .databar { padding: 16px 16px 2px; }
  .db-grid, .databar.compact .db-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .db-cell { padding: 0 0 16px; }
  .db-cell + .db-cell { padding-left: 0; border-left: 0; }
  .db-n { font-size: var(--fs-lg); }
  .opinion-grid { grid-template-columns: minmax(0, 1fr); }
  .op-card { padding: 16px 16px 16px; }
  .to-top { right: 16px; bottom: 16px; width: 38px; height: 38px; }
}

/* ===========================================================
   Toast 提示（视觉与命名移植自 assets/air/script/message.min.js，
   配色改用本站设计令牌，明暗自适应）
   =========================================================== */
.c-message {
  position: fixed;
  top: 22px;
  left: 50%;
  z-index: 200;
  min-width: 220px;
  max-width: calc(100vw - 32px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(10, 12, 16, .16), 0 2px 6px rgba(10, 12, 16, .1);
  overflow: hidden;
  opacity: 0;
}
.c-message.is-in { animation: msgIn .22s ease-out forwards; }
.c-message.is-out { animation: msgOut .18s ease-in forwards; }@keyframes msgIn{
  from { opacity: 0; transform: translateX(-50%) translateY(-12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}@keyframes msgOut{
  from { opacity: 1; transform: translateX(-50%) translateY(0); }
  to   { opacity: 0; transform: translateX(-50%) translateY(-12px); }
}
.c-message--main { display: flex; align-items: stretch; }
.c-message--icon {
  flex: none;
  display: flex; align-items: center; justify-content: center;
  width: 42px;
  color: #fff;
}
.c-message--success .c-message--icon { background: var(--ok); }
.c-message--error   .c-message--icon { background: var(--danger); }
.c-message--warning .c-message--icon { background: var(--warn); }
.c-message--info    .c-message--icon { background: var(--primary); }
.c-message--tip {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  font-size: var(--fs-sm);
  line-height: var(--lh-ui);
  color: var(--text);
}
.c-message--close {
  flex: none;
  width: 34px;
  border: 0;
  background: none;
  color: var(--text-3);
  cursor: pointer;
}
.c-message--close:hover { color: var(--text); }


/* ---------- 标签聚合页：按热度分三档字号 ---------- */
.tag-cloud { gap: 12px; }
.tag-cloud .tag { font-size: var(--fs-sm); }
.tag-cloud .tag.t-lg { font-size: var(--fs-base); font-weight: var(--fw-medium); }
.tag-cloud .tag.t-md { font-size: var(--fs-sm); }
.tag-cloud .tag.t-sm { font-size: var(--fs-2xs); color: var(--text-3); }
.tag-cloud .tag .n { margin-left: 5px; font-size: var(--fs-2xs); color: var(--text-3); font-weight: var(--fw-normal); }

/* ---------- 搜索页：重搜表单 ---------- */
.search-filters {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.search-filters input {
  flex: 1 1 auto;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-sm);
}
.search-filters input:focus { border-color: var(--primary); box-shadow: var(--ring); outline: none; }

/* ---- 广告位实图：占位换 <img> 后去掉虚线/底纹与内边距，图片铺满容器；
      「广告」角标保留（披露要求）。 ---- */
.ad-slot.has-img {
  padding: 0;
  border-style: solid;
  border-color: var(--border);
  background-image: none;
  overflow: hidden;
}
.ad-slot.has-img > img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---- 广告位实图：去掉 min-height 造成的「边框内空白」 ---- */
.ad-slot.banner.has-img { min-height: 0; }
.ad-slot.rect.has-img { min-height: 0; }
.ad-slot.infeed.has-img,
.ad-slot.intext.has-img,
.ad-slot.inlist.has-img { min-height: 0; }
.ad-slot.has-img picture { display: block; line-height: 0; }

/* ---- 角标新变体（NewsCatChip：flag 优先，与板块同名时退化为相对时间） ---- */
/* 角标按 flag 分色：头条 h / 特推 a / 推荐 c / 滚动 s。
   没有 flag 时 NewsCatChip 直接返回空串（不再退化成时间角标），所以没有 .is-time 了。 */
.thumb .cat.is-flag { font-weight: var(--fw-medium); letter-spacing: .02em; }
.thumb .cat.is-flag-h { --cat: var(--c-yaowen); }
.thumb .cat.is-flag-a { --cat: var(--c-shehui); }
.thumb .cat.is-flag-c { --cat: var(--primary); }
.thumb .cat.is-flag-s { --cat: var(--c-guoji); }

/* ================= 移动端细节优化 ================= */
@media (max-width: 720px) {
  .container { padding-left: 14px; padding-right: 14px; }
  /* 文章列表：左缩略图 + 右文字，避免每条一张全宽大图把页面拉得过长 */
  .entry { grid-template-columns: 104px minmax(0, 1fr); gap: 12px; padding: 16px 0; align-items: start; }
  .entry .thumb { width: 104px; }
  .entry img { width: 104px; height: 72px; aspect-ratio: auto; }
  .entry h3 { font-size: var(--fs-base); line-height: var(--lh-ui); margin-bottom: 4px; }
  .entry p {
    font-size: var(--fs-xs); margin-bottom: 6px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .entry .meta { font-size: var(--fs-2xs); }
  .thumb .cat { left: 6px; bottom: 6px; padding: 2px 8px; font-size: var(--fs-2xs); }
  .card h3 { font-size: var(--fs-md); }
  .widget { padding: 16px; }
  .section-head h2 { font-size: var(--fs-lg); }
  .split-item img { width: 76px; height: 56px; }
  .rec-item img { width: 76px; height: 56px; }
  /* 正文里的宽内容：表格 / 代码块横向滚动，图片不溢出 */
  .body-text img, .article-body img { max-width: 100%; height: auto; }
  .body-text table, .article-body table,
  .codeblock pre, .body-text pre { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .article-meta { flex-wrap: wrap; row-gap: 8px; }
  /* 触控目标不小于 34~40px */
  .filters .chip, .chip { min-height: 34px; display: inline-flex; align-items: center; }
  .nav-toggle { min-width: 40px; min-height: 40px; justify-content: center; }
  .stream-item { padding: 12px 0; }
  .pager { justify-content: center; gap: 8px; }
  .ad-slot.banner.has-img { margin: 16px 0; }
  .ad-slot.rect.has-img { margin: 0 0 16px; }
  .brief-grid { gap: 12px; }
}@media (max-width: 480px){
  .container { padding-left: 12px; padding-right: 12px; }
  .entry { grid-template-columns: 92px minmax(0, 1fr); gap: 12px; }
  .entry .thumb { width: 92px; }
  .entry img { width: 92px; height: 64px; }
  .entry h3 { font-size: var(--fs-md); }
  .card h3 { font-size: var(--fs-md); }
  .topic-cover > img { height: 170px; }
  .hero-main h1, .slide-body h1 { font-size: var(--fs-lg); }
  .article-head h1 { font-size: var(--fs-lg); }
  .page-title { font-size: var(--fs-lg); }
  .hero { border-radius: var(--radius-sm); }
  .masthead-inner { height: 56px; }
  .brand-logo { width: 128px; height: 30px; }
}
/* ===========================================================
   正文表格：直接作用在 table 上
   正文来自数据库，作者写 <table> 时不会带 class；
   app.js / NewsBody 也会给裸表补 .table-wrap + .data-table，
   但那只是加分项 —— 这里保证「什么都没有」时表也能看。
   =========================================================== */
.body-text table {
  width: 100%;
  max-width: 100%;
  margin: 0 0 24px;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: var(--fs-sm);
  line-height: var(--lh-ui);
  color: var(--text);
  background: var(--surface);
}
.body-text .table-wrap { margin: 24px 0; border-radius: var(--radius-sm); }
.body-text .table-wrap > table { margin: 0; display: table; width: 100%; }
.body-text table caption {
  caption-side: top;
  text-align: left;
  padding: 0 0 8px;
  font-size: var(--fs-xs);
  color: var(--text-3);
}
.body-text table th,
.body-text table td {
  padding: 12px 12px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.body-text table thead th {
  background: var(--surface-2);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  color: var(--text);
  white-space: nowrap;
}
.body-text table tbody th { background: var(--surface-2); font-weight: var(--fw-medium); }
.body-text table tbody tr:hover td { background: var(--surface-2); }
.body-text table tfoot td,
.body-text table tfoot th {
  background: var(--surface-2);
  font-weight: var(--fw-medium);
  color: var(--text);
}
/* 数字列（.num 由编辑器手写或 NewsBody 自动补） */
.body-text table th.num, .body-text table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ===========================================================
   评论：一级列表 + 二级折叠（方法论照 air 主题）
   =========================================================== */
.comments-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 20px;
}
.comments-head h3 { margin: 0; }
.comments-note {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-2xs);
  color: var(--text-3);
}
.comments-note::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary);
  opacity: .5;
}
/* 评论关闭 / 游客禁评提示（表单被服务端条件渲染掉时的替代块，2026-10-22） */
.comments-closed {
  margin: 0 0 4px;
  padding: 16px 16px;
  border: 1px dashed var(--line);
  border-radius: var(--radius, 10px);
  font-size: var(--fs-xs);
  color: var(--text-3);
  background: var(--surface-2, var(--surface));
}
.comments-closed .comments-login { color: var(--primary); font-weight: var(--fw-medium); }

/* 一级评论：分隔线式列表，比一张张卡片更耐读 */
.comment-list { display: grid; gap: 0; }
.comment {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.comment-list > .comment:first-child { padding-top: 2px; }
.comment-list > .comment:last-child { border-bottom: 0; padding-bottom: 0; }
.comment > .avatar {
  background: var(--primary-soft);
  color: var(--primary);
  box-shadow: inset 0 0 0 1px rgba(26, 79, 208, .14);
}
.comment .head { flex-wrap: wrap; }
.comment .head .name { color: var(--text); }
.comment .head time { font-variant-numeric: tabular-nums; }
.comment .text { color: var(--text-2); line-height: var(--lh-body); }
.comment .actions button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  margin: -3px 0;
  border-radius: 999px;
  transition: background .16s, color .16s;
}
.comment .actions button:hover { background: var(--primary-soft); color: var(--primary); }
.comment .actions button em { font-style: normal; font-variant-numeric: tabular-nums; }
.comment .actions button.is-active { color: var(--primary); }

/* 二级：整块浅底，回复集中在一处 */
.comment .children {
  margin-top: 12px;
  padding: 2px 16px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  display: grid;
}
.comment .comment.is-child {
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border: 0;
  border-top: 1px solid var(--border);
  margin: 0;
}
.comment .comment.is-child:first-child { border-top: 0; }
/* 折叠区展开后，第一条隐藏回复要补回分隔线 */
.comment .children-more .comment.is-child:first-child { border-top: 1px solid var(--border); }
.comment .comment.is-child > .avatar {
  width: 28px; height: 28px;
  font-size: var(--fs-2xs);
  background: var(--surface);
}
.comment .comment.is-child .head { font-size: var(--fs-xs); }
.comment .comment.is-child .text { margin-top: 2px; font-size: var(--fs-sm); }
.comment .comment.is-child .actions { margin-top: 5px; font-size: var(--fs-2xs); }
.comment .comment.is-child .actions button { font-size: var(--fs-2xs); }

/* 「展开其余 N 条回复」 */
.comment-more {
  justify-self: start;
  margin: 12px 0 12px;
  padding: 4px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--primary);
  font-size: var(--fs-2xs);
  line-height: var(--lh-tight);
  cursor: pointer;
  transition: background .16s, border-color .16s;
}
.comment-more:hover { background: var(--primary-soft); border-color: var(--primary); }
.comment-more:focus-visible { outline: none; box-shadow: var(--ring); }

.comment-empty {
  margin: 0;
  padding: 28px 0 24px;
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--text-3);
}

/* 评论分页（AJAX 换页，不走服务端跳转） */
.comment-pager {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
  transition: opacity .18s;
}
.comment-pager.is-loading { opacity: .5; pointer-events: none; }
.comment-pager .pg {
  min-width: 34px;
  height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface);
  color: var(--text-2);
  font-size: var(--fs-xs);
  cursor: pointer;
  transition: border-color .16s, color .16s, background .16s;
}
.comment-pager .pg:hover { border-color: var(--primary); color: var(--primary); }
.comment-pager .pg:focus-visible { outline: none; box-shadow: var(--ring); }
.comment-pager .pg.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
  font-weight: var(--fw-medium);
  cursor: default;
}
.comment-pager .gap { padding: 0 2px; color: var(--text-3); font-size: var(--fs-xs); }
.comment-pager .total { margin-left: auto; font-size: var(--fs-2xs); color: var(--text-3); }

/* 取消回复 */
.cancel-reply {
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-3);
  font-size: var(--fs-xs);
  cursor: pointer;
  transition: border-color .16s, color .16s;
}
.cancel-reply:hover { border-color: var(--danger); color: var(--danger); }
.cancel-reply[hidden] { display: none; }@media (max-width: 720px){
  .comments { margin-top: 30px; padding-top: 22px; }
  .comments-head { margin-bottom: 16px; gap: 4px 12px; }
  .comments h3 { font-size: var(--fs-base); }
  .comments-note { font-size: var(--fs-2xs); }
  .comment { grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 16px 0; }
  .comment > .avatar { width: 34px; height: 34px; font-size: var(--fs-xs); }
  .comment .text { font-size: var(--fs-sm); line-height: var(--lh-body); }
  .comment .children { padding: 2px 12px; margin-top: 10px; }
  .comment .comment.is-child { grid-template-columns: 26px minmax(0, 1fr); gap: 8px; padding: 12px 0; }
  .comment .comment.is-child > .avatar { width: 26px; height: 26px; font-size: var(--fs-2xs); }
  .comment-pager { margin-top: 20px; }
  .comment-pager .total { margin-left: 0; width: 100%; padding-top: 4px; }
  .comment-more { margin: 8px 0 12px; }
  /* 正文表格：字号降一档，单元格内边距收紧 */
  .body-text table { font-size: var(--fs-xs); }
  .body-text table th, .body-text table td { padding: 8px 12px; }
  .body-text .table-wrap { margin: 20px 0; }
}
/* ===========================================================
   评论表单：昵称 / 验证码 / 匿名评论
   =========================================================== */
.cf-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
/* 游客态昵称：固定合理宽度（昵称最多 20 字），剩余空间交给右侧开关；
   旧版 flex:1 在登录态（无验证码框）会把只读框拉满整行，视觉失衡 —— 已改徽章，见下 */
.cf-bar > #commentName { flex: 0 1 220px; min-width: 140px; }
.cf-code { display: inline-flex; align-items: center; gap: 8px; }
.cf-code input#commentCode {
  width: 112px;
  letter-spacing: .16em;
  text-transform: lowercase;
}
.cf-code img {
  width: 90px; height: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface);
  cursor: pointer;
  display: block;
}
.cf-code img:hover { border-color: var(--primary); }
/* 登录态身份徽章：只读身份不再用输入框形态，胶囊 + 人形图标 */
.cf-identity {
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 16px 0 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: var(--fs-xs);
  max-width: 100%;
}
.cf-identity svg { color: var(--primary); flex: 0 0 auto; }
.cf-identity b {
  font-weight: var(--fw-medium); color: var(--text);
  max-width: 180px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.cf-anon {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--fs-xs); color: var(--text-2);
  cursor: pointer; user-select: none;
  margin-left: auto; /* 推到行尾，与左侧身份/输入/验证码分开 */
  position: relative;
}
/* 复选升级为开关：原生 checkbox 保留在 DOM（表单提交 + 键盘可达），视觉上替换为滑轨 */
.cf-anon input[type="checkbox"] {
  position: absolute; opacity: 0;
  width: 1px; height: 1px; margin: 0;
}
.cf-anon .cf-switch {
  width: 34px; height: 20px;
  border-radius: 999px;
  background: var(--border-strong);
  position: relative; flex: 0 0 auto;
  transition: background-color .18s;
}
.cf-anon .cf-switch::after {
  content: "";
  position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
  transition: transform .18s;
}
.cf-anon input:checked + .cf-switch { background: var(--primary); }
.cf-anon input:checked + .cf-switch::after { transform: translateX(14px); }
.cf-anon input:checked ~ span { color: var(--primary); font-weight: var(--fw-medium); }
.cf-anon input:focus-visible + .cf-switch { box-shadow: var(--ring); }
.cf-actions { display: flex; align-items: center; gap: 12px; }
.cf-actions .btn { margin-left: auto; }
.cf-hint { font-size: var(--fs-2xs); color: var(--text-3); }
.cf-hint[hidden] { display: none; }
.comment-form input[disabled] {
  background: var(--surface-2);
  color: var(--text-3);
  cursor: not-allowed;
}@media (max-width: 720px){
  .cf-bar { gap: 8px; }
  .cf-bar > #commentName { flex: 1 1 100%; }
  .cf-code { flex: 1 1 auto; min-width: 0; }
  .cf-code input#commentCode { width: auto; flex: 1 1 auto; min-width: 0; }
  .cf-actions { flex-wrap: wrap; row-gap: 8px; }
  .cf-actions .cf-hint { flex: 1 1 100%; }
}

/* ---------- 专题页「相关报道」：卡片网格 ----------
   上方「专题目录」是竖排章节列表，这里用卡片网格做版式对比：上面是目录，下面是信息流。
   图区可选 —— 有图才渲染，无图整块省掉，不留空占位方框（本站约七成文章无缩略图）。 */
.rel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.rel-grid:empty { display: none; }
.rel-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .15s, transform .15s;
}
.rel-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.rel-thumb {
  flex: none;
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--surface-2);
  /* 定高而不是 aspect-ratio 16/9：多列时列宽一变图区高度就跟着暴涨
     （1024 两列下 466px 宽 → 261px 高），同行里「有图」和「无图」两种卡
     会差出 200px 空白。定高后同行卡片高度接近，空白压到几十 px 内。
     480 单列时改回 16/9（见下面断点）。 */
  height: 132px;
}
.rel-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.rel-card:hover .rel-thumb img { transform: scale(1.04); }
.rel-body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 16px 16px; }
/* .cat 的基础样式只定义在 .thumb 里（绝对定位压在图上）。这里是正文里的行内块，得自己写一份 */
.rel-body .cat {
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  background: var(--cat, var(--primary));
  color: var(--on-cat);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-medium);
  line-height: var(--lh-ui);
}
.rel-body .cat:empty { display: none; }
.rel-body h3 {
  margin: 0;
  font-size: var(--fs-base); font-weight: var(--fw-bold); line-height: var(--lh-ui);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rel-body h3 a:hover { color: var(--primary); }
/* 无图时用来顶替图区的摘要：只在不渲染 .rel-thumb 的卡里出现（见 NewsRelCard） */
.rel-desc {
  margin: 0;
  font-size: var(--fs-xs); line-height: var(--lh-ui); color: var(--text-2);
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
}
/* margin-top:auto 把 meta 推到卡片底部 —— 同行卡片被 grid 拉成等高后底边才对齐 */
.rel-meta { margin-top: auto; display: flex; align-items: center; gap: 8px; font-size: var(--fs-2xs); color: var(--text-3); }@media (max-width: 1024px){
  .rel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rel-thumb { height: 108px; }
}@media (max-width: 720px){
  /* 720 保持两列：改单列会让 6 张卡撑成 6 屏高。每列约 329px，标题仍是满宽，
     不会出现「缩略图 + 右侧窄列」那种把文字挤成一条的布局。 */
  .rel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .rel-thumb { height: 96px; }
  .rel-body { gap: 8px; padding: 12px 12px 12px; }
  .rel-body h3 { font-size: var(--fs-md); }
  .rel-desc { font-size: var(--fs-2xs); }
  .rel-meta { font-size: var(--fs-2xs); gap: 4px; }
}@media (max-width: 480px){
  /* 480 以下两列会把标题压到 3 行以上，改单列 */
  .rel-grid { grid-template-columns: minmax(0, 1fr); }
  /* 单列就没有「同行对齐」的问题了，图区回到 16/9 满宽，看起来像一条正常的信息流 */
  .rel-thumb { height: auto; aspect-ratio: 16 / 9; }
  .rel-body h3 { font-size: var(--fs-base); }
}

/* ================= 移动端触控目标 ================= */
@media (max-width: 720px) {
  /* 实测：手机下面包屑链接只有 26x22、.more 52x22、频道小链接 28x19、标题链接约 21px 高，
     手指点不准。统一把可点区域撑起来（桌面保持紧凑，只在移动端放宽）。 */
  .crumbs { row-gap: 2px; }
  /* 补左右内边距：只补高度时「首页」这类两字链接只有 26px 宽，仍容易点错
     margin:0 必须写：桌面档 .crumbs a 带 -3px 垂直负 margin（用来抵消 min-height 撑高的行高），
     不重置的话 flex 行高按「外边距盒」算，32px 会被压回 26px，等于回退上一轮修复。 */
  .crumbs a, .crumbs > span { min-height: 32px; display: inline-flex; align-items: center; padding: 0 4px; margin: 0; }
  .crumbs > span[aria-hidden], .crumbs .sep { padding: 0 2px; }
  .section-head .more { min-height: 34px; display: inline-flex; align-items: center; }
  .util-links a { min-height: 32px; display: inline-flex; align-items: center; }
  /* 标题链接是行内的，盒子高度只等于一行文字。上下各留 6px 让整条更好点 */
  .entry h3 a, .card h3 a, .rel-body h3 a, .topic h3 a,
  .rec-item h3 a, .split-item h3 a,
  .entry-compact h3 a { display: inline; padding: 8px 0; }
  /* 第二轮巡检补漏（实测仍只有 17~24px 高）：页脚列表、快讯条、简报格、时间线、
     文章页最新条目标题、关于页代表作、引用出处、侧栏邮箱
     margin:0 必须写：桌面档 .footer-grid ul li a 带 -5px 垂直负 margin（抵消 padding 撑高的行高），
     这里改成 display:block 后负 margin 会真实参与布局，把每行再压短 10px，等于回退上一轮修复。 */
  .footer-grid ul li a { display: block; padding: 8px 0; margin: 0; }
  .brief-item a, .tc-work a { display: inline-block; padding: 8px 0; }
  /* .si-body h3 自己是 clamp 容器，子链接必须是 inline，否则 clamp 失效 */
  .si-body h3 a { display: inline; padding: 8px 0; }
  /* 时间线标题自己就是 clamp 容器（.hero-list a），加 inline-block 会变成单个大块、
     clamp 直接失效；垂直 padding 又会让第 3 行在 padding 区露出来。
     这两种都只在这条链路上出现，单独处理成 min-height + 垂直居中（见文件末尾）。 */
  .pq-src a { display: inline-block; padding: 8px 0; }
  .widget .side-mail { display: inline-flex; align-items: center; min-height: 34px; }
}


/* ---------- 侧栏「本页导航」移动端修版（2026-10-24）----------
   上面热区补漏那条 `.rank a, .toc a, ... { padding: 8px 0}` 把 .toc a 的左内边距一起清了，
   于是 border-left 那根竖线直接贴到文字上；.toc-widget 的 gap 又只有 2px，
   四项挤成一坨、手指容易点错行。这里补回缩进、拉开行距、把触控热区撑到 40px。 */
@media (max-width: 720px) {
  .toc-widget .toc { gap: 8px; }
  .toc a {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;           /* 必须 >= min-height/行高，否则第 2 行从空白区漏出来 */
    overflow: hidden;
    -webkit-box-pack: center;        /* 单行时垂直居中，替代原来的上下 padding */
    padding: 0 0 0 12px;
    min-height: calc(1.5em * 2);     /* 正好 2 行，1 行内容也等高，条目之间不参差 */
  }
  .toc a.sub { padding-left: 24px; }
}

/* ---------- 移动端 clamp 失效修版（2026-10-24）----------
   上面热区补漏把 a 的 display 改成 inline-block，会顶掉 line-clamp 依赖的 -webkit-box，
   标题于是在小屏上撑满：实测首页「最新快讯」360 宽下单条 122.8px 高（5 行）、
   /list/12 侧栏 79.4px（3 行）。这里把盒子还回去，热区继续用上下 padding 撑。 */
@media (max-width: 720px) {
  .rank a, .hero-list.timeline a {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .rank a { -webkit-line-clamp: 2; }
  .hero-list.timeline a { -webkit-line-clamp: 2; }
}

/* ---------- 投稿表单：小屏转单列（2026-10-24）----------
   360 宽下即使拆成两列，每列也只有 ~161px，输入框挤得没法用；480 以下直接单列。 */
@media (max-width: 480px) {
  .contact-form { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 移动端触控热区统一（2026-10-24 巡检）----------
   实测 ≤720 时一批可点元素只有 20~38px 高（条款页正文链接 20px、联系页邮箱 30px、
   首页 logo 30px、文章页赞/收藏/分享 32px…），手指容易点空。统一撑到 40px；
   正文里的行内链接硬撑 40 会把段落行距拉散，只做到 ~36px 并保留 inline-block。 */
@media (max-width: 720px) {
  .brand { min-height: 40px; display: inline-flex; align-items: center; }
  .icon-btn { min-width: 40px; min-height: 40px; }
  .search input { min-height: 40px; }
  .crumbs a, .crumbs > span { min-height: 40px; }
  .util-links a { min-height: 40px; }
  .section-head .more { min-height: 40px; }
  .widget .side-mail { min-height: 40px; }
  .chip { min-height: 40px; display: inline-flex; align-items: center; }
  .pager a, .pager span { min-height: 40px; display: inline-flex; align-items: center; }
  .tag-cloud .tag { min-height: 40px; display: inline-flex; align-items: center; }
  .btn { min-height: 40px; }
  .act { min-height: 40px; }
  .follow { min-height: 40px; display: inline-flex; align-items: center; }
  .static-doc p a, .static-doc li a, .chan a, .pq-src a { display: inline-block; padding: 8px 0; }
}

/* ---------- 移动端触控热区第二批（2026-10-24 巡检）----------
   第一批修完仍有一批 21~38px 的可点元素，这里补齐。注意两点：
   1) .filters .chip 特异性(0,2,0) 高于 .chip(0,1,0)，必须两个选择器一起写才盖得住原来的 34px；
   2) 带 line-clamp 的元素（.rank a / .lead-title）只能加 padding，不能改 display，否则 clamp 失效。 */
@media (max-width: 720px) {
  .filters .chip, .chip { min-height: 40px; }
  .body-text p a, .body-text li a, .body-text em a { display: inline-block; padding: 8px 0; }
  .rank a { min-height: calc(1.5em * 2); -webkit-box-pack: center; }
  .lead-title { min-height: calc(1.5em * 2); -webkit-box-pack: center; }
  .tag { min-height: 40px; display: inline-flex; align-items: center; }
  input[type=text], input[type=email], input[type=search], textarea { min-height: 40px; }
  .comment-form label, .cf-anon { min-height: 40px; display: inline-flex; align-items: center; }
  .job-apply { min-height: 40px; display: inline-flex; align-items: center; }
  .footer-grid ul li a { padding: 8px 0; }
}

/* ---------- 移动端触控热区第三批（2026-10-24 巡检收尾）----------
    前两批之后实测仍有 31~39.6px 的漏网：轮播标题 31、卡片/信息流标题 35~37、快讯条 36、
    简报格 38、回到顶部 38、联系页邮箱 34、关于页代表作 35。这里统一补齐到 >=40px。
    约束同前：带 line-clamp 的（各 h3 a / .rank a / .lead-title / 时间线 a）只能加 padding，
    改成 inline-block 或 flex 会让 -webkit-line-clamp 失效、标题撑成多行。 */
@media (max-width: 720px) {
  /* .entry h3 a 单独拉到 10px：≤480 时单行标题实测 21.75 + 9px*2 = 39.75px，
     差 0.25px 够不到 40px 触控线。无图条目正文变宽后单行标题变多，这条必须补。
     其余标题链接仍是 2 行起步，9px 已经过线，不动。 */
  .entry h3 a { padding: 12px 0; }
  .card h3 a, .rel-body h3 a, .topic h3 a,
  .rec-item h3 a, .split-item h3 a, .entry-compact h3 a,
  .si-body h3 a { padding: 8px 0; }
  /* tc-work: 21px + 9px*2 = 39px, 1px short, bump to 10px */
  .tc-work a { padding: 12px 0; }
  .slide-body h2 a { padding: 4px 0; }
  .brief-item a { padding: 8px 0; }
  .hero-list.timeline a,
  .rank a { min-height: calc(1.5em * 2); -webkit-box-pack: center; }
  .lead-title { min-height: calc(1.5em * 2); -webkit-box-pack: center; }
  .chan a, .pq-src a { padding: 12px 0; }
  .static-doc .job-tip a { padding: 12px 0; }
  .to-top { min-width: 40px; min-height: 40px; }
  /* 圆点视觉仍是 22x3 的短横，只把透明点击区再放大 4px（34x39 -> 34x43） */
  .carousel-dots button::after { top: -20px; bottom: -20px; }
}

/* ================= 侧栏「最新评论」（2026-10-24）=================
    整行是一个 <a>：手机上一行 60~80px 高，天然满足触控热区，不必再单独给
    「来源标题」补 padding（那样每条会白长 20px）。内部因此不能再嵌 <a>，
    来源标题用 span 模拟链接样式。 */
.cmt-list { display: grid; gap: 12px; margin: 0 -6px; padding: 0; list-style: none; }
.cmt-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  padding: 8px 8px;
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.cmt-item:hover { background: var(--surface-2); }
.cmt-ava {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: var(--fs-xs); font-weight: var(--fw-medium);
}
.cmt-item:hover .cmt-ava { background: var(--primary-soft); color: var(--primary); }
.cmt-b { min-width: 0; display: grid; gap: 3px; }
.cmt-top { display: flex; align-items: center; gap: 8px; font-size: var(--fs-2xs); color: var(--text-3); }
.cmt-top b { font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--text); }
.cmt-text {
  font-size: var(--fs-xs); line-height: var(--lh-ui); color: var(--text-2);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
/* 单行省略用 -webkit-box + line-clamp 而不是 nowrap：
   巡检脚本按 scrollWidth > clientWidth 判「文字被裁」，nowrap 会被报成问题项。 */
.cmt-src {
  font-size: var(--fs-2xs); color: var(--text-3);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;
}
.cmt-item:hover .cmt-src { color: var(--primary); }

/* ---------- 分页：移动端压缩 + 「共 N 页」去边框（2026-10-24）----------
    桌面最多 12 个按钮（上一页 / 7 个页码 / 省略号 / 末页 / 下一页 / 共 N 页），
    360px 下要 ~660px 宽，一行放不下，折成两行把列表底部撑出 46px 空白。
    PHP 侧已给每个按钮加了语义 class（pager-prev / pager-next / num / gap），
    这里用 CSS 把中间的页码串和「…」藏掉，只留四项：上一页 · 当前页 · 下一页 · 第 X / Y 页。
    只在 CSS 里裁而不改 PHP 输出条数：分页是服务端渲染的，PHP 拿不到视口宽度。
    顺带修掉一个老问题：.pager-info 是 <span>，被 `.pager a, .pager span`(0,1,1) 命中，
    特异性高于 .pager-info(0,1,0)，所以「共 N 页」一直被画成一个带边框的假按钮。 */
.pager .pager-info,
.pager .pager-info-sm {
  min-width: 0; height: auto;
  padding: 0;
  border: 0;
  background: none;
  font-size: var(--fs-2xs);
  color: var(--text-3);
  white-space: nowrap;
}
.pager .pager-info-sm { display: none; }@media (max-width: 720px){
  .pager { flex-wrap: nowrap; gap: 8px; }
  .pager .pager-info { display: none; }
  .pager .pager-info-sm { display: inline-flex; align-items: center; margin-left: 2px; }
  .pager .num, .pager .gap { display: none; }
  .pager .num.current { display: inline-flex; }
  .pager .pager-prev, .pager .pager-next { padding: 0 12px; }
}

/* ---------- 无图条目：不渲染图位，正文铺满整行（2026-10-24）----------
   全站 20707 篇里 14380 篇（69.4%）没有缩略图。以前无图也占一个图位、里面放 46x46 的
   虚线空框：行高不齐（46 vs 64）、虚线框显得没做完，360px 下还吃掉整行 27% 宽度。
   现在 PHP 侧无图直接不输出 .thumb（NewsEntry 给 <article> 加 .no-img），这里把网格退回单列。
   只作用于 .entry（横向图文列表）；卡片网格 / 轮播 / 编辑推荐 / 观察 / 相关报道 /
   热门排行大图都是固定槽位，抽掉图位会塌陷或错位，那些地方仍保留占位框。 */
.entry.no-img { grid-template-columns: minmax(0, 1fr); }

/* 无图时栏目角标从图位搬到了正文顶部。.cat 的基础样式只定义在 .thumb 里
   （绝对定位压在图上），正文里要自己写一份行内块样式 —— 和 .rel-body .cat 同一个道理。 */
.entry-body > .cat {
  display: inline-block;
  margin-bottom: 6px;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  background: var(--cat, var(--primary));
  color: var(--on-cat);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-medium);
  line-height: var(--lh-tight);
}
.entry-body > .cat.is-flag { font-weight: var(--fw-medium); letter-spacing: .02em; }

/* ---------- 有图条目：≤480 隐藏描述段（2026-10-24）----------
   实测 ≤480 时描述段固定占 44px（2 行 13px），而且正文列被 92px 图位压到 234px
   （360 宽），标题和摘要都挤，一屏放不下几条。
   隐藏后一行只剩「标题 + meta」：约 68px 高，和 92x64 的图位基本齐平，
   各行结构一致、左右都齐。无图条目没有图位需要平衡，保留描述段。
   用的是 display:none 而不是删数据：想保留一行摘要，把 display:none
   换成 -webkit-line-clamp:1 即可（摘要本身不影响排名，正文在文章页）。 */
@media (max-width: 480px) {
  .entry:not(.no-img) p { display: none; }
  /* 行高下来后把内边距也收一点，信息流更紧凑 */
  .entry { padding: 12px 0; }
  /* 标题只有一行时正文比图位矮，垂直居中比顶对齐好看 */
  .entry { align-items: center; }
}

/* ---------- 有图条目：缩略图铺满整行高度（2026-10-24）----------
   图位一直是固定尺寸（≤720 是 104x72，≤480 是 92x64），但右侧文字块实测
   88~118px（标题 2 行 + 摘要 2 行 + meta），父级又是 align-items:start/center，
   结果图贴在左上、下面空 16~46px —— 720 下最明显，像图没加载完。
   改成图位跟着整行高度走，img 用 100% 填充 + object-fit:cover 居中裁切。
   注意 align-self 必须写在 .thumb 上：父级 ≤480 有 align-items:center，
   只改父级会把专题列表的 .chapter 方块一起拉长。 */
@media (max-width: 720px) {
  .entry .thumb { align-self: stretch; }
  /* img 必须绝对定位：用 height:100% 会和 grid 的 stretch 互相依赖
     （行高看 thumb，thumb 高度看 img），竖图（如 1080x1862）加载完后
     按固有比例把行高撑到 158px、图位溢出 35px。
     抽离文档流后 thumb 高度只由整行高度决定，img 100% 铺满 + cover 居中裁切。 */
  .entry .thumb img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    aspect-ratio: auto; object-fit: cover;
  }
}

/* ---------- 无图条目：≤480 摘要收成 1 行（2026-10-24）----------
   有图条目在 ≤480 已隐藏摘要、行高 113px，无图条目保留 2 行摘要 → 163px，
   混排起来一高一矮、节奏断裂。收到 1 行后 129px，差距缩到 16px：
   摘要还在、信息不丢，一屏能多看见一条。 */
@media (max-width: 480px) {
  .entry.no-img p { -webkit-line-clamp: 1; }
}
