/* ==========================================================================
   AiNews · 产业新闻 前台全站样式
   --------------------------------------------------------------------------
   设计说明
   - 底色：纸白（暖向浅底），文字：墨黑，强调：朱红（克制的深红，只用于
     栏目小标、规则线、链接与当前项，不铺大面积色块）。
   - 刊头居中偏左、双细线（2px 墨线 + 1px 灰线）、编号与日期用等宽字，
     标题用宋体（系统字体栈，无外链），形成"编辑部 / 研究刊物"的气质。
   - 无外链字体、无 CSS import 指令、无框架；全部系统字体。
   - 预算：本文件压缩前 <= 100KB（宪法 8.4，Owner 2026-12-06 由 60KB 上调；
     正文排版兜底在 .article-doc 作用域内；组件词汇契约见 docs/08-正文组件规范.md）。
   ========================================================================== */

/* ---------- 1. 设计令牌 ---------- */
:root {
  /* 纸张与墨色 */
  --paper: #f7f5f0;
  --paper-deep: #f0ece3;
  --surface: #ffffff;
  --ink: #1a1a1a;
  --ink-2: #4a4744;
  --ink-3: #7c776f;
  --ink-4: #a29b90;
  --line: #e2ddd3;
  --line-strong: #c9c2b5;

  /* 强调色（朱红，克制的深色） */
  --accent: #9c2e24;
  --accent-deep: #7c1f17;
  --accent-soft: #f4e7e3;

  /* 语义色（仅正文兜底与提示使用） */
  --good: #2f5d4e;
  --warn: #8a5b22;

  /* 正文局部底色（随皮肤切换） */
  --mark-bg: #f6e2b8;
  --pre-bg: #f6f4ef;
  --callout-warn-bg: #faf1ec;
  --callout-good-bg: #eef5f0;
  --card-cover-tint: #eceae4;
  --scrollbar-track: rgba(0, 0, 0, 0.06);

  /* 主题切换控件 */
  --swatch-light: #f7f5f0;
  --swatch-dark: #17181a;
  --swatch-green: #cfe6cf;
  --swatch-low: #ece9e2;

  /* 字体栈（全部为系统字体，无外链） */
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Source Han Sans SC", "Noto Sans CJK SC", system-ui, -apple-system,
    "Segoe UI", sans-serif;
  --font-display: "Songti SC", "Source Han Serif SC", "Noto Serif CJK SC",
    "STSong", "SimSun", serif;
  --font-mono: "SF Mono", Menlo, Consolas, "Liberation Mono", "Courier New",
    monospace;

  /* 版心 */
  --wrap: 1180px;
  --gutter: clamp(18px, 4vw, 40px);
  /* 内容页统一上下留白：所有页面（含面包屑页）都以此为准 */
  --page-top: clamp(24px, 4vw, 40px);
  --page-bottom: clamp(40px, 6vw, 72px);

  /* 动效 */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 1.1 皮肤（皮肤 = 设计令牌覆盖，见 docs/01 宪法 8.6） ----------
   浅色（默认，无属性）；深色 dark / 护眼 green / 低对比度 low。
   切换由 site.js 写 <html data-theme="…"> 并持久化到 localStorage。 */

/* 深色皮肤 */
:root[data-theme='dark'] {
  --paper: #141519;
  --paper-deep: #1d1f24;
  --surface: #1d1f24;
  --ink: #e8e6e1;
  --ink-2: #b9b5ad;
  --ink-3: #8f8b83;
  --ink-4: #6d6961;
  --line: #31343a;
  --line-strong: #43464d;
  --accent: #d4584b;
  --accent-deep: #e0705f;
  --accent-soft: #33211f;
  --good: #5aa389;
  --warn: #cfa05e;
  --mark-bg: #4d3f22;
  --pre-bg: #232529;
  --callout-warn-bg: #2a231d;
  --callout-good-bg: #1e2a25;
  --card-cover-tint: #26282d;
  --scrollbar-track: rgba(255, 255, 255, 0.08);
  color-scheme: dark;
}

/* 护眼皮肤（豆沙绿） */
:root[data-theme='green'] {
  --paper: #cfe6cf;
  --paper-deep: #c2dcc1;
  --surface: #ddeddb;
  --ink: #24312a;
  --ink-2: #40513f;
  --ink-3: #5f7261;
  --ink-4: #8a9a8b;
  --line: #adc7ac;
  --line-strong: #96b296;
  --accent: #7c1f17;
  --accent-deep: #5e150f;
  --accent-soft: #c4d9c2;
  --good: #24523f;
  --warn: #7a4d10;
  --mark-bg: #e3d9a8;
  --pre-bg: #d8e9d6;
  --callout-warn-bg: #d6e2cc;
  --callout-good-bg: #cfe4cb;
  --card-cover-tint: #c6dcc5;
  --scrollbar-track: rgba(0, 60, 0, 0.08);
  color-scheme: light;
}

/* 低对比度皮肤 */
:root[data-theme='low'] {
  --paper: #ece9e2;
  --paper-deep: #e3dfd6;
  --surface: #f6f4ef;
  --ink: #57544e;
  --ink-2: #6d6a63;
  --ink-3: #8b877e;
  --ink-4: #a6a299;
  --line: #dcd8cf;
  --line-strong: #c8c3b8;
  --accent: #a2605a;
  --accent-deep: #8f504b;
  --accent-soft: #eae4e0;
  --good: #587a6d;
  --warn: #97795a;
  --mark-bg: #e9e2cd;
  --pre-bg: #f1efe8;
  --callout-warn-bg: #efe9e2;
  --callout-good-bg: #e9eee6;
  --card-cover-tint: #e6e2da;
  --scrollbar-track: rgba(0, 0, 0, 0.05);
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* 页面顶部的一道朱红细线，作为站点识别 */
body::before {
  content: "";
  display: block;
  height: 3px;
  background: var(--accent);
}

img,
svg,
video,
iframe {
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

a {
  color: inherit;
}

button {
  font-family: inherit;
}

::selection {
  background: var(--accent);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- 3. 通用工具 ---------- */
/* 版心：左右内边距恢复（Owner 指令撤销），窄屏不再贴边；宽屏留白仍主要由居中与 max-width 决定 */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--narrow {
  max-width: 960px;
}

/* ---------- 内容页统一骨架 ----------
   文章 / 关键词 / 搜索 / 关键词索引 / 404 共用同一套版心与上下留白：
   - 版心左右内边距随 .wrap（--gutter）；
   - 上留白一律 --page-top、下留白一律 --page-bottom；
   - 面包屑作为第一个子元素时，其左上角坐标在所有页面完全一致。 */
.wrap.article-main,
.wrap.wrap--narrow,
.wrap.page-main {
  max-width: var(--wrap);
  padding-top: var(--page-top);
  padding-bottom: var(--page-bottom);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  font-size: 13px;
  text-decoration: none;
  transition: top 0.18s var(--ease);
}

.skip-link:focus {
  top: 12px;
}

.main {
  display: block;
  min-height: 55vh;
}

/* 小标签：栏目 / 篇章序号 */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: var(--accent);
}

.eyebrow::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  background: var(--accent);
}

/* 带横线的小节标题（"最新发布"、"相关文章"） */
.sec-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 0 0 10px;
}

.sec-head__title {
  flex: 0 0 auto;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.22em;
  color: var(--ink);
}

.sec-head__title::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 10px;
  vertical-align: 2px;
  background: var(--accent);
}

.sec-head__rule {
  flex: 1 1 auto;
  height: 1px;
  background: var(--line-strong);
}

/* 面包屑（后端输出 nav/ol/a 的任意组合均可用） */
.breadcrumb,
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 20px;
  font-size: 12.5px;
  line-height: 1.7;
  letter-spacing: 0.03em;
  color: var(--ink-3);
}

.breadcrumb :is(ol, ul),
.breadcrumbs :is(ol, ul) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb a,
.breadcrumbs a {
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.breadcrumb a:hover,
.breadcrumbs a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------- 4. 刊头 masthead ----------
   两行均为「通栏行 + 版心行」结构：分隔线画在通栏行（.mast-row）上，
   视觉上贯穿 100vw；.wrap 版心只负责内容对齐，左右留白与正文页骨架一致
   （宽屏时 gutter 被外边距吸收，文字左边缘与正文同在 130px @1440）。 */
.mast {
  background: var(--paper);
}

.mast-row--main {
  /* 品牌行不再画线（视觉与正文通栏白底自然衔接） */
}

.mast-row--bar {
  background: var(--paper-deep);
}

.mast__main {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 28px;
  padding-block: clamp(18px, 3vw, 30px) 16px;
}

.mast__brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

/* 刊头品牌：AI·NEWS 点阵 logo（内联 SVG，颜色随皮肤 --accent） */
.brand__logo {
  flex: 0 0 auto;
  align-self: flex-start;
  display: block;
  height: clamp(25px, 2.9vw, 33px);
  width: auto;
  max-width: 100%;
  color: var(--accent);
}

/* 刊头自定义 logo 图（站点设置 Site:LogoUrl 时替代点阵 SVG，比点阵版更大更醒目） */
.brand__logo-img {
  flex: 0 0 auto;
  align-self: flex-start;
  display: block;
  height: clamp(36px, 4vw, 56px);
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
}

.brand__tag {
  font-size: 12.5px;
  line-height: 1.5;
  letter-spacing: 0.18em;
  color: var(--ink-3);
}

/* 刊头搜索 */
.hsearch {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  width: min(240px, 34vw);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line-strong);
  transition: border-color 0.18s var(--ease);
}

.hsearch:focus-within {
  border-bottom-color: var(--accent);
}

.hsearch__input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.6;
  outline: none;
  appearance: none;
}

.hsearch__input::placeholder {
  color: var(--ink-4);
}

.hsearch__input::-webkit-search-cancel-button {
  display: none;
}

.hsearch__btn {
  flex: 0 0 auto;
  padding: 0 0 0 4px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  cursor: pointer;
}

.hsearch__btn:hover {
  color: var(--accent-deep);
}

/* 导航条（分隔线由 .mast-row--bar 承担，通栏 100vw） */
.mast__bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  padding-block: 9px;
}

/* 刊头两行的版心：左右内边距随 .wrap（--gutter） */
.mast-row .wrap {
  max-width: var(--wrap);
}

.site-nav {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: clamp(18px, 2.6vw, 34px);
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.site-nav a {
  flex: 0 0 auto;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.site-nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--line-strong);
}

/* 当前栏目：由 partials/nav.html 注入一条按 {{current}} 生成的选择器规则 */
.site-nav a.is-current {
  color: var(--accent);
}

/* 右侧 RSS / 索引入口 */
.mast__aside {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 18px;
}

.mast__aside a {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-decoration: none;
  transition: color 0.16s var(--ease);
}

.mast__aside a:hover {
  color: var(--accent);
}

/* 皮肤切换（色点按钮；色板固定，任何皮肤下都可辨识） */
.theme-switch {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: 16px;
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.site-footer .theme-switch {
  margin-left: 0;
  padding-left: 0;
  border-left: 0;
}

.theme-dot {
  width: 16px;
  height: 16px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.theme-dot:hover {
  transform: scale(1.15);
}

.theme-dot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.theme-dot--light { background: var(--swatch-light); }
.theme-dot--dark { background: var(--swatch-dark); }
.theme-dot--green { background: var(--swatch-green); }
.theme-dot--low { background: var(--swatch-low); }

.theme-dot[aria-pressed="true"] {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--accent);
}

/* 移动端"栏目"按钮：默认隐藏，脚本挂上 .js 后才出现 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1;
  cursor: pointer;
}

.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  width: 14px;
}

.nav-toggle__bars i {
  display: block;
  height: 1.5px;
  background: currentColor;
}

/* ---------- 5. 页脚 ---------- */
.foot {
  margin-top: clamp(48px, 7vw, 88px);
  border-top: 2px solid var(--ink);
  background: var(--paper-deep);
}

.foot__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 26px 56px;
  padding-block: clamp(28px, 4.5vw, 44px) 26px;
}

.foot__brand {
  min-width: 0;
}

.foot__logo {
  display: inline-block;
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
}

.foot__logo::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 9px;
  vertical-align: 2px;
  background: var(--accent);
}

/* 页脚自定义 logo 图（站点设置 Site:FooterLogoUrl / LogoUrl 时替代站名文本，无点阵前缀） */
a.foot__logo:has(.foot__logo-img)::before {
  display: none;
}

.foot__logo-img {
  display: inline-block;
  height: 76px;
  width: auto;
  max-width: 320px;
  object-fit: contain;
  object-position: left center;
  vertical-align: middle;
}

/* logo 深浅色变体：浅色背景主题显示 --light 版，深色主题（dark）显示 --dark 版；
   未配置变体时后端输出单张无修饰类图片，全主题可见（不受以下规则影响） */
.brand__logo-img--dark,
.foot__logo-img--dark {
  display: none;
}

:root[data-theme='dark'] .brand__logo-img--light {
  display: none;
}

:root[data-theme='dark'] .foot__logo-img--light {
  display: none;
}

:root[data-theme='dark'] .brand__logo-img--dark {
  display: block;
}

:root[data-theme='dark'] .foot__logo-img--dark {
  display: inline-block;
}

.foot__tag {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.7;
  letter-spacing: 0.12em;
  color: var(--ink-3);
}

.foot__nav {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  justify-content: flex-end;
  gap: 10px 24px;
  min-width: 0;
  font-size: 13.5px;
  line-height: 1.7;
}

.foot__nav a {
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.foot__nav a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* 注入式页脚块（{{footerHtml}}，落在 .foot__nav 列内）：
   全局 p reset 清零了段落间距，这里补回行距与块间距，避免四行内容挤成一团 */
.site-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding-top: 4px;
  min-width: 0;
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--ink-2);
}

.site-footer p {
  margin: 0;
  line-height: 1.9;
}

.site-footer a {
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.site-footer a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.site-footer .disclaimer {
  color: var(--ink-3);
}

.foot__legal {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid var(--line-strong);
  font-size: 12px;
  line-height: 1.8;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}

/* ---------- 6. 首页：导语 ---------- */
/* 首页横向与其它内容页对齐到同一版心（顶部 hero 保留自身留白，不叠加 --page-top） */
.wrap.home-main {
  max-width: var(--wrap);
  padding-top: 0;
  padding-bottom: var(--page-bottom);
}

.lead {
  padding: clamp(32px, 5vw, 56px) 0 clamp(26px, 4vw, 40px);
  border-bottom: 2px solid var(--ink);
}

.lead__title {
  max-width: 19em;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(32px, 5.2vw, 54px);
  font-weight: 700;
  line-height: 1.26;
  letter-spacing: 0.005em;
  color: var(--ink);
  text-wrap: balance;
}

.lead__dek {
  max-width: 40em;
  margin: 22px 0 0;
  font-size: clamp(15.5px, 1.5vw, 17px);
  line-height: 1.9;
  color: var(--ink-2);
}

.lead__action {
  margin: 26px 0 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.lead__action a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: color 0.16s var(--ease);
}

.lead__action a::after {
  content: " →";
  font-family: var(--font-mono);
}

.lead__action a:hover {
  color: var(--accent-deep);
}

/* ---------- 7. 首页：文章流 + 侧栏 ---------- */
.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 296px;
  gap: clamp(30px, 4.6vw, 60px);
  align-items: start;
  padding-top: clamp(26px, 3.6vw, 40px);
}

.feed {
  min-width: 0;
}

.card-list {
  min-width: 0;
}

/* ---------- 8. 卡片（partials/card.html） ---------- */
.card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 196px;
  gap: clamp(16px, 2.2vw, 28px);
  align-items: start;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}

.card:first-child {
  border-top: 0;
  padding-top: 4px;
}

.card__cover {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

.card__cover:empty {
  display: none;
}

.card__cover a {
  display: block;
}

.card__cover img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--paper-deep);
  border-radius: 1px;
}

.card:has(> .card__cover:empty) {
  grid-template-columns: minmax(0, 1fr);
}

/* 无封面：后端输出 .card-cover--placeholder 占位元素，应折叠图位而不是留出 196px 空列
  （否则在窄容器如侧栏里，正文会被挤成一条窄缝） */
.card-cover--placeholder {
  display: none;
}

.card:has(.card-cover--placeholder) {
  grid-template-columns: minmax(0, 1fr);
}

.card__body {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.6;
}

.card__cat {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.16em;
}

/* 分类标签可点（栏目页链接）：保持标签观感，仅悬停提示可点 */
a.card__cat { text-decoration: none; }
a.card__cat:hover { text-decoration: underline; text-underline-offset: 3px; }

/* 置顶 / 推荐角标（到期自动失效；仅令牌配色，遵守宪法 8.6） */
.card-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.6;
  vertical-align: middle;
}

.card-badge--pin {
  color: #fff;
  background: var(--accent);
}

.card-badge--rec {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.card__cat:empty {
  display: none;
}

.card__date {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--ink-3);
}

.card__title {
  margin: 0;
  font-size: clamp(19px, 1.9vw, 22px);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.005em;
  color: var(--ink);
  text-wrap: balance;
}

.card__title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.16s var(--ease);
}

.card__title a:hover {
  color: var(--accent);
}

.card__summary {
  display: -webkit-box;
  overflow: hidden;
  margin: 10px 0 0;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--ink-2);
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
}

.card__summary:empty {
  display: none;
}

.card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-3);
}

/* ---------- 9. 关键词标签（公共外观，三容器共用：卡片 chips / 关键词云 / 文章页标签） ----------
   共有规则统一写在这里；各容器只保留差异（尺寸、间距、圆角）。避免重复造轮子。 */
.card__chips :is(a, span, li),
.cloud :is(a, span),
.article__tags :is(a, span) {
  display: inline-block;
  padding: 3px 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.6;
  text-decoration: none;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease),
    background-color 0.16s var(--ease);
}

.card__chips :is(a, span, li):hover,
.cloud :is(a, span):hover,
.article__tags :is(a, span):hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* 各容器差异：关键词云（圆角 + 软底 + ink-2 字色） */
.cloud :is(a, span) {
  border-radius: 3px;
  padding: 3px 8px;
  color: var(--ink-2);
}

.cloud :is(a, span):hover {
  background: var(--accent-soft);
}

/* 各容器差异：文章页标签（稍大的内边距与字号） */
.article__tags :is(a, span) {
  padding: 5px 11px;
  color: var(--ink-2);
  font-size: 12.5px;
}

.card__chips :is(ul, ol) {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card__chips:empty {
  display: none;
}

/* 首页首条：通栏大图 + 大标题 */
.feed--home .card:first-child {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  padding: 0 0 34px;
}

.feed--home .card:first-child .card__cover {
  grid-column: 1;
  grid-row: 1;
  margin-bottom: 22px;
}

.feed--home .card:first-child .card__cover img {
  aspect-ratio: 16 / 8;
}

.feed--home .card:first-child .card__body {
  grid-column: 1;
  grid-row: 2;
}

.feed--home .card:first-child .card__title {
  max-width: 22em;
  font-size: clamp(25px, 3.1vw, 33px);
  line-height: 1.38;
}

.feed--home .card:first-child .card__summary {
  max-width: 34em;
  font-size: 15.5px;
  -webkit-line-clamp: 4;
}

/* ---------- 9. 侧栏 ---------- */
.rail {
  min-width: 0;
  padding-top: 6px;
}

.rail__block {
  padding-bottom: 26px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.rail__block:last-child {
  margin-bottom: 0;
  border-bottom: 0;
}

.rail__title {
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.24em;
  line-height: 1.5;
  color: var(--ink);
}

.rail__title::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 9px;
  vertical-align: 2px;
  background: var(--accent);
}

.rail__more {
  display: inline-block;
  margin-top: 18px;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.16s var(--ease);
}

.rail__more:hover {
  border-bottom-color: var(--accent);
}

.rail__note {
  margin: 0;
  font-size: 13px;
  line-height: 1.95;
  color: var(--ink-3);
}

.rail__note li {
  position: relative;
  margin-bottom: 6px;
  padding-left: 14px;
  list-style: none;
}

.rail__note li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85em;
  width: 5px;
  height: 5px;
  background: var(--line-strong);
}

.rail__note ul {
  margin: 0;
  padding: 0;
}

/* 关键词云（keywordCloud 输出任意 a/span 组合；标签外观由公共 .kw-chip 规则承担） */
.cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  line-height: 1.6;
}

/* 关键词计数：小圆形徽标（不继承关键词标签的方形观感） */
.cloud .kw-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  min-width: 16px;
  padding: 0;
  margin-left: 4px;
  border: 0;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  vertical-align: middle;
}

.cloud .kw-count:hover {
  border: 0;
  background: var(--accent-soft);
  color: var(--accent);
}

.cloud :is(ul, ol) {
  display: contents;
}

.cloud li {
  list-style: none;
}

/* ---------- 10. SEO 说明区 ---------- */
.seo-intro {
  margin-top: clamp(38px, 5.5vw, 64px);
  padding-top: 24px;
  border-top: 1px solid var(--line-strong);
}

.seo-intro h2,
.seo-intro h3 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--ink);
}

.seo-intro p {
  max-width: 62em;
  margin: 0 0 10px;
  font-size: 13.5px;
  line-height: 1.95;
  color: var(--ink-3);
}

/* ---------- 11. 分页 ---------- */
.pager,
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 36px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.pager a,
.pager span,
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1;
  text-decoration: none;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.pager a:hover,
.pagination a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pager :is(.is-current, .current, [aria-current]),
.pagination :is(.is-current, .current, [aria-current]) {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

/* ---------- 12. 文章页 ---------- */
/* 版心、上下留白与面包屑位置见「内容页统一骨架」（.wrap.article-main） */

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 288px;
  gap: clamp(28px, 4.6vw, 64px);
  align-items: start;
}

.article {
  min-width: 0;
  max-width: 780px;
}

.article__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(29px, 4.2vw, 45px);
  font-weight: 700;
  line-height: 1.34;
  letter-spacing: 0.005em;
  color: var(--ink);
  text-wrap: balance;
}

.article__subtitle {
  margin: 16px 0 0;
  font-size: 15.5px;
  line-height: 1.8;
  color: var(--ink-3);
}

.article__subtitle:empty {
  display: none;
}

.article__summary {
  margin: 24px 0 0;
  padding-left: 16px;
  border-left: 2px solid var(--accent);
  font-size: 15.5px;
  line-height: 1.95;
  color: var(--ink-2);
}

.article__summary:empty {
  display: none;
}

.article__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  margin: 22px 0 0;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--ink-3);
}

.article__meta > * + * {
  position: relative;
  padding-left: 16px;
}

.article__meta > * + *::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 3px;
  height: 3px;
  background: var(--line-strong);
}

.article__author {
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.article__time {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.article__updated {
  font-size: 12px;
  color: var(--ink-3);
}

.article__updated:empty {
  display: none;
}

.article__source:empty {
  display: none;
}

.article__source a {
  color: var(--ink-3);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
}

.article__source a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.article__cover {
  margin: 30px 0 0;
}

.article__cover:empty {
  display: none;
}

.article__cover img {
  display: block;
  width: 100%;
  max-height: 520px;
  height: auto;
  object-fit: cover;
  border-radius: 1px;
  background: var(--paper-deep);
}

.article__cover figcaption {
  margin-top: 10px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-3);
}

.article__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px 24px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line-strong);
}

/* 正文关键词 / 标签 */
.article__tags {
  display: flex;
  flex: 1 1 320px;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  font-size: 12.5px;
  line-height: 1.7;
}

.article__tags :is(ul, ol) {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.article__rights {
  flex: 1 1 100%;
  margin: 0;
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--ink-3);
}

.article__rights:empty {
  display: none;
}

.article__tools {
  flex: 0 0 auto;
}

.copybtn {
  display: none;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.4;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.js .copybtn {
  display: inline-flex;
}

.copybtn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.copybtn.is-done {
  border-color: var(--good);
  color: var(--good);
}

/* 自定义 CSS 注入位：后端如以 <style> 形式传入，隐藏容器不影响其生效 */
.article-custom-css {
  display: none;
}

/* 相关阅读（文章页侧栏）：紧凑文字列表——「分类 · 日期」meta 行 + 两行标题，
   分隔线分条、整卡可点；封面/摘要/关键词标签一律不显示（1.0.19 Owner 定案，
   1.0.93 重排：修复旧 .related a 全局规则污染卡片链接、条目节奏与悬停反馈缺失） */
.related {
  min-width: 0;
}

.cards--related .card {
  position: relative;
  display: block;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.cards--related .card:first-child {
  padding-top: 2px;
  border-top: 0;
}

.cards--related .card__cover,
.cards--related .card__summary,
.cards--related .card__chips {
  display: none;
}

.cards--related .card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  margin: 0 0 4px;
  padding: 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-3);
}

.cards--related .card__cat {
  color: var(--ink-3);
  font-weight: 400;
  letter-spacing: 0.08em;
}

.cards--related a.card__cat {
  color: var(--ink-3);
  text-decoration: none;
}

.cards--related a.card__cat:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cards--related .card__title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cards--related .card__title a {
  display: block;
  padding: 0;
  border: 0;
  color: var(--ink);
  font-size: inherit;
  line-height: inherit;
  text-decoration: none;
  transition: color 0.16s var(--ease);
}

/* 整卡可点：标题链接拉伸铺满卡片热区 */
.cards--related .card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.cards--related .card:hover .card__title a,
.cards--related .card__title a:hover {
  color: var(--accent);
}

/* ==========================================================================
   13. 正文排序兜底 .article-doc
   --------------------------------------------------------------------------
   这里的规则全部用 :where() 降低优先级（等价于 .article-doc 单类），
   以便后端注入的、作用域化后的 {{customCss}}（同样以 .article-doc 开头、
   且在 <head> 中位于本文件之后）可以自然覆盖它。
   目标：无论正文来自哪份外来 HTML，排版都不塌、移动端不溢出。
   ========================================================================== */
.article-doc {
  margin-top: 30px;
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.9;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* 文章阅读页整体归白：去掉全页纸张底色（刊头/页脚保持站点纸色带） */
body:has(main > .article-main) {
  background: var(--surface);
}

.article-doc :where(h1, h2, h3, h4, h5, h6) {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.008em;
}

.article-doc :where(h1) {
  margin: 2em 0 0.8em;
  font-size: clamp(22px, 2.3vw, 26px);
  line-height: 1.4;
}

.article-doc :where(h2) {
  margin: 2.1em 0 0.8em;
  font-size: clamp(19px, 2vw, 22.5px);
}

.article-doc :where(h3) {
  margin: 1.8em 0 0.6em;
  font-size: clamp(17px, 1.75vw, 19px);
}

.article-doc :where(h4) {
  margin: 1.6em 0 0.5em;
  font-size: 16.5px;
}

.article-doc :where(h5, h6) {
  margin: 1.4em 0 0.4em;
  font-size: 15px;
  color: var(--ink-2);
}

.article-doc :where(p) {
  margin: 0 0 1.1em;
}

.article-doc :where(a) {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.article-doc :where(a:hover) {
  color: var(--accent-deep);
}

.article-doc :where(strong, b) {
  color: var(--ink);
  font-weight: 700;
}

.article-doc :where(em, i, cite) {
  font-style: normal;
  color: var(--ink);
}

.article-doc :where(mark) {
  padding: 0 0.15em;
  background: var(--mark-bg);
  color: var(--ink);
}

.article-doc :where(u) {
  text-underline-offset: 3px;
}

.article-doc :where(small) {
  font-size: 0.82em;
  color: var(--ink-3);
}

.article-doc :where(:is(ul, ol)) {
  margin: 0 0 1.15em;
  padding-left: 1.5em;
}

.article-doc :where(li) {
  margin: 0.35em 0;
}

.article-doc :where(li > :is(ul, ol)) {
  margin: 0.35em 0 0.5em;
}

.article-doc :where(li::marker) {
  color: var(--ink-3);
}

.article-doc :where(blockquote) {
  margin: 1.6em 0;
  padding: 2px 0 2px 18px;
  border-left: 3px solid var(--accent);
  color: var(--ink-2);
  font-size: 16.5px;
}

.article-doc :where(blockquote :is(p, ul, ol):last-child) {
  margin-bottom: 0;
}

.article-doc :where(hr) {
  margin: 2.2em 0;
  border: 0;
  border-top: 1px solid var(--line);
}

/* 图片 / 图表 / SVG */
.article-doc :where(img) {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.6em auto;
  background: var(--paper-deep);
}

.article-doc :where(figure) {
  max-width: 100%;
  margin: 1.8em 0;
}

.article-doc :where(figure > :is(img, svg, table, picture)) {
  margin-block: 0;
}

.article-doc :where(figcaption) {
  margin-top: 10px;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
}

/* --- 归一化模式内容块（ADR-003）：原文档常见结构的本站化样式 ---
   仅在未注入原文 CSS 时生效（KeepOriginalDesign=true 时原文样式在 extraHead 后置注入并覆盖这里）。 */

/* 警示 / 优势条（.callout，.good 为正向） */
.article-doc .callout {
  margin: 1.6em 0;
  padding: 14px 18px;
  border-left: 4px solid var(--warn);
  background: color-mix(in srgb, var(--warn) 8%, var(--surface));
  border-radius: 0 8px 8px 0;
  font-size: 15.5px;
  line-height: 1.85;
}

.article-doc .callout.good {
  border-left-color: var(--good);
  background: color-mix(in srgb, var(--good) 8%, var(--surface));
}

.article-doc .callout b {
  color: var(--ink);
}

/* 占比条（.sharebars：label + track + fill，fill 宽度来自功能性内联样式） */
.article-doc .sharebars {
  margin: 1.6em 0;
}

.article-doc .sharebars .row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
}

.article-doc .sharebars .label {
  flex: 0 0 4.6em;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

.article-doc .sharebars .track {
  flex: 1;
  height: 22px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--ink-3) 16%, var(--surface));
  overflow: hidden;
}

.article-doc .sharebars .fill {
  height: 100%;
  border-radius: 3px 0 0 3px;
  background: var(--accent);
  display: flex;
  align-items: center;
}

.article-doc .sharebars .fill span {
  padding-left: 8px;
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
}

.article-doc .sharebars .fill.f-green {
  background: var(--good);
}

.article-doc .sharebars .fill.f-gray {
  background: var(--ink-3);
}

.article-doc .sharebars .note {
  margin-top: 4px;
  color: var(--ink-3);
  font-size: 13px;
}

/* 分组名单（.grouplist：左侧栏目标签 + 右侧名单） */
.article-doc .grouplist {
  margin-top: 6px;
  border-top: 1px solid var(--line);
}

.article-doc .grouplist .g {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.article-doc .grouplist .g-tag {
  flex: 0 0 7.2em;
  color: var(--good);
  font-size: 13.5px;
  font-weight: 600;
}

.article-doc .grouplist .g-names {
  flex: 1;
  font-size: 14.5px;
  color: var(--ink-2);
}

/* 时间线（.timeline：日期 + 事件） */
.article-doc .timeline {
  margin-top: 6px;
  border-top: 1px solid var(--line);
}

.article-doc .timeline .t {
  display: flex;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.article-doc .timeline .t-date {
  flex: 0 0 6.4em;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
}

.article-doc .timeline .t-body {
  flex: 1;
  font-size: 14.5px;
}

/* 左右对读卡（.duo：双栏小卡） */
.article-doc .duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 1.4em 0;
}

.article-doc .duo .col {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2, var(--surface));
}

.article-doc .duo .col h3 {
  margin: 0 0 6px;
  font-size: 14.5px;
}

.article-doc .duo .col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.article-doc .duo .col li {
  position: relative;
  padding: 3px 0 3px 14px;
  font-size: 14px;
}

.article-doc .duo .col li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line);
}

/* 术语表（.terms dl） */
.article-doc .terms dt {
  margin-top: 10px;
  color: var(--ink);
  font-weight: 600;
}

.article-doc .terms dd {
  margin: 0;
  color: var(--ink-3);
  font-size: 14px;
}

/* 来源区（.sources） */
.article-doc .sources {
  margin-top: 30px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 13px;
}

.article-doc .sources ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

/* 编号模块（.mod-num：栏目标号） */
.article-doc .mod-num {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  padding-bottom: 2px;
  border-bottom: 3px solid var(--accent);
}

.article-doc :where(svg) {
  display: block;
  max-width: 100%;
  height: auto;
}

.article-doc :where(iframe, video) {
  display: block;
  max-width: 100%;
  border: 0;
}

/* 表格：自身横向滚动，避免正文宽度被撑破（移动端也可读） */
.article-doc :where(table) {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 1.8em 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-collapse: collapse;
  font-size: 14.5px;
  line-height: 1.65;
  -webkit-overflow-scrolling: touch;
}

.article-doc :where(th, td) {
  min-width: 5.5em;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.article-doc :where(thead th) {
  border-bottom: 1px solid var(--line-strong);
  background: var(--paper-deep);
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}

.article-doc :where(tbody tr:last-child td) {
  border-bottom: 0;
}

.article-doc :where(caption) {
  padding: 8px 0;
  color: var(--ink-3);
  font-size: 13px;
  text-align: left;
}

/* 代码 */
.article-doc :where(pre) {
  max-width: 100%;
  margin: 1.6em 0;
  padding: 14px 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--pre-bg);
  font-size: 13px;
  line-height: 1.7;
  -webkit-overflow-scrolling: touch;
}

.article-doc :where(pre code) {
  padding: 0;
  background: none;
  font-size: inherit;
}

.article-doc :where(code, kbd, samp) {
  padding: 0.1em 0.35em;
  border-radius: 2px;
  background: var(--paper-deep);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.88em;
}

/* 定义列表（"几个关键词"这类术语块） */
.article-doc :where(dl) {
  margin: 1.4em 0;
}

.article-doc :where(dt) {
  margin-top: 0.9em;
  color: var(--ink);
  font-weight: 700;
}

.article-doc :where(dd) {
  margin: 0.25em 0 0;
}

/* 提示条 / 注意条（正文若自带 .callout 类时也有兜底） */
.article-doc :where(.callout) {
  margin: 1.5em 0;
  padding: 13px 16px;
  border-left: 3px solid var(--warn);
  background: var(--callout-warn-bg);
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.85;
}

.article-doc :where(.callout.good, .callout--good) {
  border-left-color: var(--good);
  background: var(--callout-good-bg);
}

.article-doc :where(.callout :is(p, ul, ol):last-child) {
  margin-bottom: 0;
}

/* 通用组件兜底：分组名单、对读栏、时间线（若原文档类名未带自定义 CSS） */
.article-doc :where(.grouplist) {
  margin: 1.2em 0;
  border-top: 1px solid var(--line);
}

.article-doc :where(.duo) {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 1.2em 0;
}

/* 正文首尾元素去掉多余外边距 */
.article-doc > :where(:first-child) {
  margin-top: 0;
}

.article-doc > :where(:last-child) {
  margin-bottom: 0;
}

/* 正文内锚点定位时避开吸顶元素 */
.article-doc :where([id]) {
  scroll-margin-top: 24px;
}

/* ---------- 13.5 原稿结构兜底：归一化正文常见原稿类名 ----------
   原稿（编辑器导出 HTML）常用 .wrap / .kicker / .card / .ch / .hbar-* /
   .src / .tag / ul.plain / ul.refs / .disclaimer 等类名承载结构。
   归一化发布（KeepOriginalDesign=false）不注入原稿 CSS，这里给出本站化
   兜底；优先级高于全局 .card（两列列表卡），避免列表卡网格误伤正文分节。 */

.article-doc .wrap {
  max-width: 100%;
  margin: 0;
  padding: 0;
}

/* 眉题 / 导语 / 数据说明行 */
.article-doc .kicker {
  margin: 0 0 1.2em;
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.article-doc .standfirst {
  margin: 0 0 1em;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.95;
}

.article-doc .byline {
  margin: 0 0 1.6em;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 13px;
}

/* 分节卡片：覆盖全局 .card 的列表网格布局，还原为内容块 */
.article-doc .card {
  display: block;
  grid-template-columns: none;
  gap: 0;
  margin: 1.9em 0;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-top: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.article-doc .card:first-child {
  margin-top: 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

/* 栏目编号（01 / 02 …） */
.article-doc .sec-num {
  margin-bottom: 4px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.article-doc .card > :where(h2):first-child {
  margin-top: 0;
}

/* 图表容器（.ch）：内联 SVG 自适应缩放 */
.article-doc .ch {
  margin: 1.6em 0;
}

.article-doc .ch svg {
  width: 100%;
  max-width: 560px;
  height: auto;
  margin: 0 auto;
}

/* 图注（.src） */
.article-doc .src {
  margin: -0.6em 0 1.4em;
  color: var(--ink-3);
  font-size: 12.5px;
  line-height: 1.7;
  text-align: center;
}

/* 横向占比条（.hbar-*） */
.article-doc .hbar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.article-doc .hbar-row:last-child {
  margin-bottom: 0;
}

/* 标签过长放不进固定列时（site.js 检测到内部折行）整行改为上下两行，同 ≤960px 堆叠布局 */
.article-doc .hbar-row--stack {
  display: block;
}

.article-doc .hbar-row--stack .hbar-label {
  flex: none;
  margin-bottom: 5px;
}

.article-doc .hbar-label {
  display: flex;
  flex: 0 0 11em;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
}

.article-doc .hbar-label .val {
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.article-doc .hbar-track {
  flex: 1;
  height: 20px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--ink-3) 14%, var(--surface));
  overflow: hidden;
}

.article-doc .hbar-fill {
  height: 100%;
  border-radius: 3px 0 0 3px;
  background: var(--accent);
}

/* 无序列表变体（ul.plain）：标签 + 加粗小标题的条目式排版 */
.article-doc :where(ul.plain) {
  margin: 1.2em 0 1.4em;
  padding: 0;
  list-style: none;
}

.article-doc :where(ul.plain > li) {
  position: relative;
  margin: 0;
  padding: 12px 2px 12px 20px;
  border-bottom: 1px dashed var(--line);
}

.article-doc :where(ul.plain > li:last-child) {
  border-bottom: 0;
}

.article-doc :where(ul.plain > li)::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 1.35em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

/* 门槛标签（.tag ok / mid / no） */
.article-doc .tag {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 9px 2px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  vertical-align: 0.08em;
  white-space: nowrap;
}

.article-doc .tag.ok {
  border-color: color-mix(in srgb, var(--good) 45%, transparent);
  color: var(--good);
  background: color-mix(in srgb, var(--good) 8%, transparent);
}

.article-doc .tag.mid {
  border-color: color-mix(in srgb, var(--warn) 45%, transparent);
  color: var(--warn);
  background: color-mix(in srgb, var(--warn) 8%, transparent);
}

.article-doc .tag.no {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

/* 分隔线变体与参考来源列表 */
.article-doc :where(hr.divider) {
  margin: 2.4em 0;
  border-top: 1px dashed var(--line-strong);
}

.article-doc :where(ul.refs) {
  margin: 0.8em 0 0;
  padding-left: 0;
  list-style: none;
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink-3);
}

.article-doc :where(ul.refs > li) {
  margin: 0;
  padding: 7px 2px;
  border-bottom: 1px solid var(--line);
}

.article-doc :where(ul.refs > li:last-child) {
  border-bottom: 0;
}

.article-doc :where(ul.refs > li:target) {
  background: var(--mark-bg);
}

/* 免责声明块 */
.article-doc .disclaimer {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 6px;
  background: var(--paper-deep);
  color: var(--ink-3);
  font-size: 12.5px;
  line-height: 1.8;
}

/* 尾注引用上标：不放大、不加下划线，保持行内节奏 */
.article-doc :where(sup) {
  font-size: 0.72em;
  line-height: 0;
}

.article-doc :where(sup a) {
  margin: 0 1px;
  text-decoration: none;
}

.article-doc :where(sup a:hover) {
  text-decoration: underline;
}

/* reveal 动画类在无脚本环境下退化为直接可见 */
.article-doc .reveal {
  opacity: 1;
}

/* ---------- 13A. 生成器组件兜底（多方言正文统一可读排版，:where 零特异性，可被逐篇 CSS 覆盖） ---------- */
/* 关键词内链：正文中大量出现，压低视觉权重 */
.article-doc :where(a.kw-link) { color: var(--ink); font-weight: 500; text-decoration: underline dotted; text-decoration-color: color-mix(in srgb, var(--accent) 60%, transparent); text-underline-offset: 3px; }
.article-doc :where(a.kw-link:hover) { color: var(--accent); text-decoration-style: solid; text-decoration-color: var(--accent); }
/* 导语 / 引言 / 眉题 / 元信息 / 小节编号 */
.article-doc :where(.lede, .lead-in) { margin: 0 0 1.15em; color: var(--ink-2); font-size: 1.06em; line-height: 1.8; }
.article-doc :where(.eyebrow) { margin: 0 0 0.5em; color: var(--accent); font-family: var(--font-mono); font-size: 13px; font-weight: 700; letter-spacing: 0.14em; }
.article-doc :where(.meta) { margin: 1.1em 0; padding-bottom: 10px; border-bottom: 1px solid var(--line); color: var(--ink-3); font-size: 13px; }
.article-doc :where(.secno, h2 .num, h3 .num) { margin-right: 10px; color: var(--accent); font-family: var(--font-mono); font-size: 0.85em; font-weight: 700; }
.article-doc :where(.h2-sub) { display: block; margin: 3px 0 0; color: var(--ink-3); font-size: 13.5px; font-weight: 400; letter-spacing: 0; }
.article-doc :where(.idx) { display: inline-block; min-width: 1.6em; margin-right: 6px; color: var(--accent); font-family: var(--font-mono); font-weight: 700; }
.article-doc :where(span.strong) { color: var(--ink); font-weight: 700; }
/* 图表容器与图题（chart / figure-block 同构） */
.article-doc :where(.chart, .figure-block) { margin: 1.6em 0; padding: 14px 14px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.article-doc :where(.chart-title, .fig-title) { margin: 0 0 2px; color: var(--ink); font-size: 14.5px; font-weight: 700; text-align: center; }
.article-doc :where(.chart-sub) { margin: 0 0 10px; color: var(--ink-3); font-size: 12.5px; text-align: center; }
.article-doc :where(.chart svg) { display: block; width: 100%; max-width: 640px; height: auto; margin: 0 auto; }
.article-doc :where(.cap, .chart-cap, .fig-note, .chart-note) { margin: 8px 0 2px; color: var(--ink-3); font-size: 12.5px; line-height: 1.7; text-align: center; }
/* 数据台账（ledger-row 与 ledger .row 两种写法同构） */
.article-doc :where(.ledger) { margin: 1.4em 0; padding: 4px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.article-doc :where(.ledger-row, .ledger .row, .pair-row) { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.article-doc :where(.ledger-row:last-child, .ledger .row:last-child, .pair-row:last-child) { border-bottom: 0; }
.article-doc :where(.ledger .label) { flex: 1 1 auto; min-width: 0; color: var(--ink-2); font-size: 13.5px; }
.article-doc :where(.ledger .value, .ledger .num) { flex: 0 0 auto; color: var(--ink); font-family: var(--font-mono); font-size: 13.5px; font-weight: 600; }
.article-doc :where(.ledger-note, .ledger .src, .src-title) { margin: 6px 0 2px; color: var(--ink-3); font-size: 12.5px; line-height: 1.7; }
/* 时间线 / 要点列表（rail 与 fact-list 同构） */
.article-doc :where(ol.rail, ul.rail) { margin: 1.15em 0; padding: 0; list-style: none; }
.article-doc :where(.rail-item) { position: relative; padding: 12px 2px 12px 20px; border-bottom: 1px dashed var(--line); }
.article-doc :where(.rail-item:last-child) { border-bottom: 0; }
.article-doc :where(.rail-item)::before { content: ""; position: absolute; left: 2px; top: 1.6em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.article-doc :where(.rail-body :is(h3, h4)) { margin: 0 0 6px; font-size: 16.5px; line-height: 1.5; }
.article-doc :where(.rail-body p) { margin: 0; }
.article-doc :where(.fact-list) { margin: 1.15em 0; padding: 0; list-style: none; }
.article-doc :where(.fact-list > li) { padding: 9px 2px; border-bottom: 1px dashed var(--line); }
.article-doc :where(.fact-list > li:last-child) { border-bottom: 0; }
/* 强调块 / 侧注 / 人物行 / 建议列表 / 引语 / 备注 */
.article-doc :where(.band, .band-inner) { margin: 1.4em 0; padding: 12px 14px; border-radius: 10px; background: var(--paper-deep); }
.article-doc :where(.side) { margin: 1.2em 0; padding-left: 14px; border-left: 3px solid var(--line-strong); color: var(--ink-2); font-size: 0.95em; }
.article-doc :where(.who) { margin: 0 0 0.8em; color: var(--ink-3); font-size: 13px; }
.article-doc :where(.advices) { margin: 1.15em 0; padding: 0; list-style: none; }
.article-doc :where(.advices li, .advices > p) { padding: 9px 2px; border-bottom: 1px dashed var(--line); }
.article-doc :where(.advices li:last-child, .advices > p:last-child) { border-bottom: 0; }
.article-doc :where(.quote) { margin: 1.4em 0; padding: 12px 16px; border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; background: var(--accent-soft); color: var(--ink); }
.article-doc :where(.quote-by) { margin: 6px 0 0; color: var(--ink-3); font-size: 13px; text-align: right; }
.article-doc :where(.note, .disclaim) { margin: 1.2em 0; padding: 10px 12px; border-radius: 8px; background: var(--paper-deep); color: var(--ink-3); font-size: 12.5px; line-height: 1.75; }
/* 正文内多卡片网格（覆盖列表卡片的分隔线样式） */
.article-doc .cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin: 1.3em 0; }
.article-doc .cards .card { margin: 0; }
/* 占比条变体色（主题令牌，深浅色自适应） */
.article-doc :where(.hbar-fill.up-fill) { background: var(--good); }
.article-doc :where(.hbar-fill.gold-fill) { background: var(--warn); }
.article-doc :where(.hbar-fill.data-fill, .hbar-fill.fc-fill, .hbar-fill.fc2-fill) { background: var(--ink-4); }
.article-doc :where(.hbar-fill.down-fill) { background: var(--accent); }

/* ---------- 14. 关键词聚合页 ---------- */
.term-head {
  /* 顶部留白交给页面骨架（--page-top），面包屑下方的间距与文章页保持一致 */
  padding: 0 0 clamp(20px, 3vw, 30px);
  border-bottom: 2px solid var(--ink);
}

.term-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(32px, 4.8vw, 50px);
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-wrap: balance;
}

.term-desc {
  max-width: 44em;
  margin: 18px 0 0;
  font-size: 15.5px;
  line-height: 1.95;
  color: var(--ink-2);
}

.term-desc:empty {
  display: none;
}

.term-feed {
  padding-top: clamp(24px, 3.6vw, 38px);
}

.term-related {
  margin-top: clamp(32px, 5vw, 52px);
  padding-top: 22px;
  border-top: 1px solid var(--line-strong);
}

.term-related__links {
  margin-top: 16px;
}

.backhome {
  margin: clamp(28px, 4vw, 40px) 0 0;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}

.backhome a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.16s var(--ease);
}

.backhome a:hover {
  border-bottom-color: var(--accent);
}

/* ---------- 15. 关键词索引页 ---------- */
.page-head {
  padding: clamp(28px, 4.6vw, 48px) 0 clamp(22px, 3vw, 32px);
  border-bottom: 2px solid var(--ink);
  margin-bottom: clamp(24px, 3vw, 36px);
}

.page-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-wrap: balance;
}

.page-desc {
  max-width: 46em;
  margin: 14px 0 0;
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--ink-2);
}

.kw-index {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(292px, 1fr));
  column-gap: clamp(28px, 4vw, 56px);
  border-top: 1px solid var(--ink);
}

.kw-index > * {
  min-width: 0;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.kw-index > * :is(h2, h3, .kw-card__term) {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.kw-index > * a {
  color: inherit;
  text-decoration: none;
  transition: color 0.16s var(--ease);
}

.kw-index > * a:hover {
  color: var(--accent);
}

.kw-index > * :is(p, .kw-card__meta) {
  margin: 6px 0 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-3);
}

.kw-index > * :is(code, .kw-card__snippet) {
  display: block;
  max-width: 100%;
  margin-top: 10px;
  padding: 7px 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.6;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- 16. 搜索页 ---------- */
.page-search {
  display: flex;
  align-items: stretch;
  max-width: 580px;
  margin-top: 24px;
  border-bottom: 2px solid var(--ink);
}

.page-search input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 11px 2px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.6;
  outline: none;
  appearance: none;
}

.page-search input::placeholder {
  color: var(--ink-4);
}

.page-search input::-webkit-search-cancel-button {
  display: none;
}

.page-search button {
  flex: 0 0 auto;
  padding: 11px 22px;
  border: 0;
  background: var(--ink);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.16s var(--ease);
}

.page-search button:hover {
  background: var(--accent);
}

.result-summary {
  margin: 18px 0 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.8;
  letter-spacing: 0.02em;
  color: var(--ink-3);
}

.search-results {
  padding-top: clamp(20px, 3vw, 32px);
}

.search-results :is(ul, ol) {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------- 17. 404 ---------- */
.notfound {
  padding: clamp(36px, 7vw, 76px) 0 clamp(28px, 4vw, 44px);
  border-bottom: 2px solid var(--ink);
}

.notfound__code {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(56px, 10vw, 104px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--line-strong);
}

.notfound__msg {
  max-width: 40em;
  margin: 16px 0 0;
  font-size: 15.5px;
  line-height: 1.9;
  color: var(--ink-2);
}

.nf-popular {
  padding-top: clamp(24px, 3.6vw, 38px);
}

/* ---------- 18. 响应式：1280 / 1024 / 960 / 768 / 560 / 360 ---------- */
@media (max-width: 1100px) {
  .home-grid {
    grid-template-columns: minmax(0, 1fr) 268px;
  }

  .article-layout {
    grid-template-columns: minmax(0, 1fr) 256px;
  }
}

@media (max-width: 980px) {
  .home-grid,
  .article-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .rail {
    padding-top: 26px;
    border-top: 1px solid var(--line-strong);
  }

  .rail__block:last-child {
    padding-bottom: 0;
  }

  .article-rail .rail__title {
    margin-bottom: 12px;
  }

  .related {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    column-gap: 36px;
  }
}

@media (max-width: 820px) {
  .mast__main {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .hsearch {
    width: 100%;
    max-width: none;
  }

  .foot__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .foot__nav {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 15.5px;
  }

  .site-nav a {
    font-size: 13.5px;
  }

  /* 平板段导航行只剩「栏目」按钮，行高压紧 */
  .mast__bar {
    padding-block: 6px;
  }

  .mast__aside {
    display: none;
  }

  /* 有 JS 时：移动端导航收进"栏目"按钮；无 JS 时为横向可滚动列表 */
  .js .nav-toggle {
    display: inline-flex;
  }

  .js .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 30;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 18px;
    overflow: visible;
    border-bottom: 1px solid var(--line-strong);
    background: var(--surface);
    box-shadow: 0 20px 32px rgba(26, 26, 26, 0.08);
  }

  .js .site-nav.is-open {
    display: flex;
  }

  .js .site-nav a {
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
  }

  .js .site-nav a:last-child {
    border-bottom: 0;
  }

  .lead__title {
    font-size: clamp(29px, 7vw, 38px);
  }

  .card {
    grid-template-columns: minmax(0, 1fr) 132px;
    gap: 16px;
    padding: 22px 0;
  }

  .card__title {
    font-size: 18px;
  }

  .card__summary {
    font-size: 13.5px;
    -webkit-line-clamp: 2;
  }

  .card__chips {
    margin-top: 10px;
  }

  .card__chips :is(a, span, li) {
    font-size: 11.5px;
    padding: 2px 8px;
  }

  .feed--home .card:first-child .card__cover img {
    aspect-ratio: 16 / 9;
  }

  .feed--home .card:first-child .card__title {
    font-size: clamp(22px, 6vw, 27px);
  }

  .article__meta {
    gap: 5px 14px;
  }

  /* 手机/平板：行高整体压紧（桌面保持宽松的杂志行距） */
  .article__title {
    font-size: clamp(26px, 7vw, 32px);
    line-height: 1.3;
  }

  .article__subtitle {
    line-height: 1.7;
  }

  .article__summary {
    font-size: 14.5px;
    line-height: 1.75;
  }

  .article__meta {
    line-height: 1.6;
  }

  /* 版心左右已无内边距，正文块不再做负边距出血（否则会横向溢出） */
  .article-doc {
    border-left: 0;
    border-right: 0;
    font-size: 15px;
    line-height: 1.75;
  }

  .article-doc :where(table) {
    font-size: 13.5px;
  }

  .article-doc :where(th, td) {
    padding: 8px 12px;
  }

  /* 窄屏：占比条标签换行到条上方，卡片内边距收紧 */
  .article-doc .card {
    padding: 16px 14px;
    border-radius: 8px;
  }

  .article-doc .hbar-row {
    display: block;
  }

  .article-doc .hbar-label {
    margin-bottom: 5px;
  }

  .article-doc .hbar-track {
    height: 16px;
  }

  .article-doc .hbar-label {
    flex: none;
  }

  .kw-index {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .brand__logo {
    height: 24px;
  }

  .brand__tag {
    font-size: 11.5px;
    letter-spacing: 0.12em;
  }

  .lead {
    padding-top: 26px;
  }

  .card {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 20px 0;
  }

  .card__cover {
    grid-column: 1;
    grid-row: 1;
    margin-bottom: 14px;
  }

  .card__cover img {
    aspect-ratio: 2 / 1;
  }

  .card__body {
    grid-column: 1;
    grid-row: 2;
  }

  .card__summary {
    -webkit-line-clamp: 3;
  }

  .feed--home .card:first-child {
    padding-top: 0;
  }

  .feed--home .card:first-child .card__cover {
    margin-bottom: 16px;
  }

  .article__summary {
    padding-left: 12px;
    font-size: 14.5px;
  }

  .foot__legal {
    flex-direction: column;
    justify-content: flex-start;
    gap: 4px;
  }

  .related {
    grid-template-columns: minmax(0, 1fr);
  }

  .notfound__code {
    font-size: 64px;
  }
}

@media (max-width: 400px) {
  :root {
    --gutter: 15px;
  }

  .lead__title {
    font-size: 27px;
  }

  .card__title {
    font-size: 17px;
  }

  .hsearch__btn {
    display: none;
  }
}

/* ---------- 18.5 移动端首屏（≤560px）：参考今日头条信息流 ----------
   版式基线（源自参考图实测，420×948 逻辑像素）：
   · 工具栏/刊头压扁，导语区隐藏
   · 分类导航改横向可滚动标签条（去掉「栏目」折叠按钮，省一行）
   · 首条为大图卡：16:9 图在上、标题在图下方（非叠加）
   · 有图条目：右缩略图 + 标题两行，行高约 90px
   · 无图条目：标题一行 + 元信息一行，行高约 45px（信息流主体）
*/
@media (max-width: 560px) {
  /* --- 刊头压扁：logo 与搜索框同行，标语省略 --- */
  .mast__main {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding-block: 10px 8px;
  }

  .brand__tag {
    display: none;
  }

  .hsearch {
    flex: 1 1 auto;
    width: auto;
    padding-bottom: 4px;
  }

  /* --- 分类导航改横向标签条（等同参考图 tab 条） --- */
  .mast__bar {
    padding-block: 0;
  }

  .js .nav-toggle {
    display: none;
  }

  .js .site-nav,
  .site-nav {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 18px;
    padding: 4px 0;
    overflow-x: auto;
    border-bottom: 0;
    background: transparent;
    box-shadow: none;
  }

  /* div.site-nav 内还嵌着一层 nav.site-nav：上下内边距只保留外层一份，导航条不再偏高 */
  .site-nav .site-nav {
    padding: 0;
    overflow-x: visible;
  }

  .site-nav a {
    padding: 3px 0;
    font-size: 13px;
  }

  .js .site-nav a,
  .site-nav a {
    padding: 3px 0;
    border-bottom: 2px solid transparent;
    font-size: 14px;
  }

  /* --- 导语区与「最新发布」小节头：内容与首条重复，移动端省略 --- */
  .lead,
  .feed--home .sec-head {
    display: none;
  }

  /* 列表区上留白收紧（桌面由 --page-top 控制，移动端此页无需） */
  .home-grid {
    padding-top: 8px;
  }

  /* --- 首条：大图卡（横幅图在上，标题在图下方） --- */
  .feed--home .card:first-child {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 0 0 6px;
    border-top: 0;
  }

  .feed--home .card:first-child .card__cover {
    grid-column: 1;
    grid-row: 1;
    margin-bottom: 6px;
  }

  .feed--home .card:first-child .card__cover img {
    aspect-ratio: 2.2 / 1;
  }

  .feed--home .card:first-child .card__body {
    display: flex;
    flex-direction: column;
    grid-column: 1;
    grid-row: 2;
    position: static;
    padding: 0;
    background: none;
  }

  .feed--home .card:first-child .card__title {
    order: 1;
    margin: 0;
    font-size: 16px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .feed--home .card:first-child .card__title a {
    color: var(--ink);
  }

  .feed--home .card:first-child .card__meta {
    order: 2;
    margin: 4px 0 0;
    font-size: 10.5px;
    color: var(--ink-3);
  }

  .feed--home .card:first-child .card__summary,
  .feed--home .card:first-child .card__chips {
    display: none;
  }

  /* 卡片列表内一律不加粗（Owner 指令）：标题、分类、元信息全部常规字重 */
  .card-list .card :where(*) {
    font-weight: 400 !important;
  }

  /* --- 列表条目 --- */
  .card {
    align-items: start;
    gap: 10px;
    padding: 2px 0;
    border-top: 1px solid var(--line);
  }

  .card__body {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .card__title {
    order: 1;
    font-size: 14px;
    line-height: 1.32;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .card__meta {
    order: 2;
    margin: 2px 0 0;
    font-size: 10px;
    gap: 3px 8px;
  }

  .card__summary,
  .card__chips {
    display: none;
  }

  /* 有图条目：右侧缩略图（约内容宽 27%），标题两行（仅信息流列表；1.0.93 收拢作用域，
     防止 :has 规则同特异性覆盖文章侧栏 .cards--related 的节奏） */
  .card-list .card:not(:has(.card-cover--placeholder)) {
    grid-template-columns: minmax(0, 1fr) 92px;
    padding: 5px 0;
  }

  .card-list .card:not(:has(.card-cover--placeholder)) .card__cover {
    grid-column: 2;
    grid-row: 1;
    margin-bottom: 0;
  }

  .card-list .card:not(:has(.card-cover--placeholder)) .card__cover img {
    aspect-ratio: 4 / 3;
    border-radius: 2px;
  }

  /* 无图条目：单列纯文字，标题收为一行（信息流主体，最省高度） */
  .card-list .card:has(.card-cover--placeholder) {
    grid-template-columns: minmax(0, 1fr);
  }

  .card-cover--placeholder {
    display: none;
  }

  .card:has(.card-cover--placeholder) .card__title {
    -webkit-line-clamp: 1;
  }

  /* --- 信息流卡片：去边框隔离、条目间距、分类去焦点色、整卡可点（Owner 指令） --- */
  .card-list .card {
    position: relative;
    border-top: 0;
    padding: 4px 0;
  }

  /* 相邻卡片之间加一点距离（取代原来的 1px 分隔线） */
  .card-list .card + .card {
    margin-top: 10px;
  }

  /* 分类标签不用焦点色（朱红），降为次级灰 */
  .card-list .card__cat {
    color: var(--ink-3);
  }

  /* 整卡可点：标题链接伪元素铺满整卡；卡内其他真实链接（封面、关键词）抬高保持可点 */
  .card-list .card__title a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
  }

  /* 标题链接自身必须保持非定位（否则上面伪元素的定位祖先变成标题，只盖住标题文本）；
     封面 / 关键词等卡内真实链接抬高一层，保持独立可点 */
  .card-list .card__cover a,
  .card-list .card__chips a {
    position: relative;
    z-index: 2;
  }

  .card-list .card {
    cursor: pointer;
  }
}

/* ---------- 19. 动效与可访问性偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}

/* 打印：去掉装饰、保证正文墨色可读 */
@media print {
  body {
    background: #fff;
  }

  .mast-row {
    border: 0;
  }

  body::before,
  .mast__bar,
  .hsearch,
  .nav-toggle,
  .rail,
  .foot__nav,
  .article__tools,
  .pager {
    display: none !important;
  }

  .article-doc {
    border: 0;
    padding: 0;
  }

  a {
    text-decoration: none;
    color: #000;
  }
}
