/* ==========================================================================
   worldyjm.com · 全站样式表
   v3.1 深色科技风：深蓝黑底 + 青绿主色 + 琥珀强调。
   铁律：0 text-shadow、0 filter；装饰性元素仅限 hero 网格/辉光与主 CTA 的青晕。
   ========================================================================== */

/* --------------------------------------------------------------------------
   §3.9 色板（全站唯一色值来源，禁止组件内写死颜色）
   -------------------------------------------------------------------------- */
:root {
  /* 中性（浅色清新风：淡薄荷底 + 白卡） */
  --paper:        #F1FAF5;   /* 页面底，全站 78% 面积 */
  --surface:      #FFFFFF;   /* 卡片面 */
  --surface-tint: #EAF6F0;   /* 浅面：hover 底 / 占位底 / 输入框底 */
  --ink:          #17241F;   /* 标题近黑绿 15.1:1 AAA */
  --ink-2:        #56655F;   /* 正文 5.7:1 AA */
  --ink-3:        #7C8B85;   /* 弱化 3.35:1 —— 仅纯图形 / ≥24px 文字 */
  --rule:         #DFEBE4;   /* 分割线（装饰） */
  --rule-2:       #ECF4EF;   /* 更浅线（装饰） */
  --field-border: #B9D2C6;   /* 强边框（承载信息） */
  --line-chip:    #D8E8E0;   /* chip 行胶囊描边 */

  /* 主色鲜橙系：鲜橙只作图形/装饰（3.0:1），文字一律走亮档 */
  --primary:        #E86A17; /* 鲜橙：色块 / 图标 / 描边 */
  --primary-900:    #C9550D; /* hover / 按下 */
  --primary-bright: #B4520A; /* 正文链接 / hover / focus 环 4.8:1 AA */
  --primary-tint:   #FFF1E4; /* 选中 chip 底 / hover 底 */
  --primary-tint-2: #F8D9BC; /* 分区交替底 / 侧栏卡底 */
  --on-deep:        #1C2A25; /* 橙底上的文字 4.9:1 AAA */
  --on-deep-2:      #FFE6D3; /* 橙底上的链接 */
  --on-deep-3:      #FBD9BC; /* 橙底上的版权行 */
  --on-deep-line:   #F5C9A6; /* 橙块内 1px 内框（装饰） */

  /* 强调绿系：只给置顶徽标与区块级重点标记（每屏 ≤3 处） */
  --accent:      #12795A; /* 5.4:1 AA */
  --accent-deep: #0C5A43; /* 绿浅底上的字 7.2:1 AAA */
  --accent-tint: #E4F4ED; /* 绿浅底 */

  /* 地区标签专用靛蓝：仅「地区」，与橙永不相邻 */
  --region:      #2D5FA8; /* 6.5:1 AA */
  --region-tint: #E9F0FA;

  /* 语义色：只允许出现在提示框 / 表单错误 / 状态徽标 */
  --success:      #1F7A4D; --success-tint: #E4F4EA;
  --warning:      #9A6200; --warning-tint: #FCF1DC;
  --danger:       #C0392B; --danger-tint:  #FCEBE9;
  /* info 独立成变量以免提示框语义被主题色绑死 */
  --info:         #1E6FB0; --info-tint:    #E7F1F9;

  /* 非颜色 token */
  --font-serif: "Iowan Old Style", "Charter", Georgia, "Songti SC", "STSong",
                "Source Han Serif SC", "Noto Serif SC", "Microsoft YaHei", serif;
  --font-sans:  -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
                "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", sans-serif;
  --font-mono:  ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
                "Liberation Mono", "Courier New", monospace;

  /* 边框宽度：按前端交付要求统一 0.5px（1x 屏渲染为 1px，2x 屏为真发丝线） */
  --bw: 0.5px;
  /* 圆角：胶囊 999px / 卡片 10px / 控件 8px（浅色清新风，圆角比深色版放大） */
  --r-pill: 999px;
  --r-card: 10px;
  --r-field: 8px;
  /* 柔和投影：浅底上用极淡的绿灰投影拉开卡片层次 */
  --shadow-card: 0 1px 2px rgba(23, 36, 31, 0.04), 0 8px 24px rgba(23, 36, 31, 0.05);
  --shadow-soft: 0 1px 2px rgba(23, 36, 31, 0.05);
  /* 顶部彩虹带：薄荷 → 天蓝 → 淡紫 → 蜜桃 → 落日橙（浅底上需足够饱和才可见） */
  --band: linear-gradient(90deg, #4FBE8C, #6FBFE6, #A79BE0, #F0A47C, #EE8F45);
  /* 版心 */
  --container: 1200px;
  --measure: 720px;          /* 45 字/行 */
  /* 间距刻度仅这 13 个值：4 8 12 16 20 24 32 40 48 64 80 96 128 */
}

/* --------------------------------------------------------------------------
   基础重置
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

/* hidden 属性必须压过组件自身的 display（否则 .pin-toggle 的 inline-flex 会覆盖它） */
[hidden] { display: none !important; }

html {
  -webkit-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.8;
  /* 验收项 4：375px 下不横向溢出 */
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, ul, ol, figure, blockquote, pre, table { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
table { border-collapse: collapse; width: 100%; }

/* §10.4 焦点态：全局可见，禁止 outline:none */
:focus-visible {
  outline: 2px solid var(--primary-bright);
  outline-offset: 2px;
}
/* 科技氛围：青绿文本选择 + 细滚动条 */
::selection { background: var(--primary); color: var(--on-deep); }
html {
  scrollbar-width: thin;
  scrollbar-color: var(--line-chip) var(--paper);
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb {
  background: var(--line-chip);
  border: 2px solid var(--paper);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: var(--field-border); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
/* 通用排版类 */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px; line-height: 1.40; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--primary-bright);
}
.meta { font-size: 13px; line-height: 1.55; color: var(--ink-2); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
/* 小字文字链接触区用 padding-block 撑到 44px（§10.3），不影响版式 */
.txt-link {
  display: inline-block;
  padding-block: 11px;
  color: var(--primary-bright);
}
.txt-link:hover { text-decoration: underline; text-underline-offset: 4px; }
/* 区块头右侧的「全部 → / 进入 →」文字链接 */
.more-link { font-size: 13px; }
.crumbs a, .side-tag {
  display: inline-block;
  padding-block: 12px;
}
.lede { font-size: 17px; line-height: 1.75; color: var(--ink-2); }

/* --------------------------------------------------------------------------
   §5.2 栅格与容器
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 32px;
}
.section { padding-block: 96px; }
.section + .section { border-top: 1px solid var(--rule); }
.section--tight { padding-block: 64px; }

/* 桌面 8+4 栅格（聚合页 / 文章页） */
.split {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: 24px;
  align-items: start;
}
.split--toc-first { grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); }

/* --------------------------------------------------------------------------
   ① 字标区 / ② 工具栏行（三个页面共用）
   -------------------------------------------------------------------------- */
.site-header { padding-top: 24px; position: relative; }
/* 顶部彩虹带：薄荷 → 天蓝 → 淡紫 → 蜜桃 → 落日橙 */
.site-header::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: var(--band);
}
.wordmark {
  font-family: var(--font-serif);
  font-size: 28px; line-height: 1.00; font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
}
/* 字标链接命中区撑到 44px（内页字标 24px 时视觉高仅 27px，§10.3） */
.wordmark a { display: inline-block; padding-block: 9px; margin-block: -9px; }
.wordmark a:hover { color: var(--primary-bright); }
.wordmark-sub {
  margin-top: 5px;
  font-size: 12px; line-height: 1.40; color: var(--ink-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: calc(100% - 60px);
}

.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  border-bottom: 1px solid var(--rule);
}
.toolbar__nav { display: flex; align-items: center; }
.toolbar__link {
  display: inline-flex; align-items: center;
  /* 视觉行高 32px，命中区用 padding-block 撑到 44px（§7.2 / §10.3） */
  padding-block: 12px;
  font-size: 14px; line-height: 1.40; font-weight: 600; color: var(--ink);
}
.toolbar__link:hover { color: var(--primary-bright); text-decoration: underline; text-underline-offset: 4px; }
.toolbar__divider {
  display: inline-block; width: 1px; height: 14px;
  background: var(--line-chip); margin-inline: 10px; align-self: center;
}
/* 顶栏右侧工具入口：站内链接，做成轻量胶囊，与左侧主导航区分层 */
.toolbar__tool {
  position: relative;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px;
  border: 1px solid var(--primary-tint-2);
  border-radius: 999px;
  background: var(--primary-tint);
  font-size: 13px; line-height: 1.40; font-weight: 600;
  color: var(--primary-bright);
  white-space: nowrap;
  transition: background-color .18s ease, border-color .18s ease;
}
/* 视觉高度 28px，命中区用负向伪元素补到 44px（§10.3） */
.toolbar__tool::after {
  content: ''; position: absolute; inset: -9px -6px;
  border-radius: inherit;
}
.toolbar__tool:hover {
  background: #FFE6D2;
  border-color: var(--primary);
  color: var(--primary-bright);
  text-decoration: none;
}
.toolbar__tool svg { width: 15px; height: 15px; flex: 0 0 auto; }

/* --------------------------------------------------------------------------
   ③ chip 行（§7.3 / §9.4）—— 三种胶囊形态
   -------------------------------------------------------------------------- */
.chip-row { position: relative; margin-top: 18px; }
.chip-row__scroll {
  display: flex; flex-wrap: nowrap; gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  padding-right: 24px;
}
.chip-row__scroll::-webkit-scrollbar { display: none; }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  flex: 0 0 auto;
  min-height: 32px; padding: 6px 14px;
  border-radius: var(--r-pill);
  border: var(--bw) solid var(--line-chip);
  background: var(--surface);
  color: var(--ink);
  font-size: 12px; line-height: 1.40; font-weight: 600;
  scroll-snap-align: start;
  white-space: nowrap;
}
.chip:hover { border-color: var(--primary); color: var(--primary-bright); }
.chip[aria-current="page"] {
  border-color: var(--primary);
  background: var(--primary-tint);
  color: var(--primary-bright);
  font-weight: 700;
}
/* 「全部分类 →」：主色描边 + 主色文字，永远是最后一位 */
.chip--more { border-color: var(--primary); color: var(--primary-bright); }
.chip--more:hover { background: var(--primary-tint); }
.chip__arrow { font-size: 12px; line-height: 1; }

/* 移动端右侧 24px 渐隐遮罩 —— D1 唯一的渐变豁免（功能性，非装饰，§9.4） */
@media (max-width: 719px) {
  .chip-row::after {
    content: "";
    position: absolute; right: 0; top: 0; bottom: 0; width: 24px;
    pointer-events: none;
    background: linear-gradient(to right, rgba(241, 250, 245, 0), var(--paper));
  }
}

/* 行内分类 chip（时间流 / 置顶卡 / 列表）—— 靛蓝描边胶囊 */
.chip--inline {
  position: relative;
  min-height: 24px; padding: 3px 10px;
  border-color: var(--primary-tint-2);
  background: var(--primary-tint);
  color: var(--primary-bright);
  font-size: 12px;
}
/* 命中区用 ::after 补到 32px（§8.2），不撑高 chip 本身 */
.chip--inline::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 32px; transform: translateY(-50%);
}
.chip--inline:hover { background: var(--primary-tint); }
/* 地区标签：暖褐描边胶囊，与朱砂/靛不同形不同色 */
.chip--region {
  position: relative;
  border-color: var(--region); color: var(--region); background: transparent;
  min-height: 24px; padding: 3px 10px; font-size: 12px;
  display: inline-flex; align-items: center;
}
.chip--region::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 32px; transform: translateY(-50%);
}
.chip--region:hover { background: var(--region-tint); }

/* --------------------------------------------------------------------------
   首页「按主题浏览」区块头：中文主标题 + 英文眉标（窄屏收起眉标）
   -------------------------------------------------------------------------- */
.topic-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  margin-bottom: 24px;
}
.topic-head__cn { font-size: 13px; color: var(--ink); }
/* --------------------------------------------------------------------------
   ② 首页 hero —— 站点定位与行动入口（深色科技氛围：细网格 + 顶部青辉）
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: 80px 64px;
  border-bottom: var(--bw) solid var(--rule);
  overflow: hidden;
}
/* 柔和彩晕：薄荷 / 天蓝 / 蜜桃三团极淡光斑，浅底上的空气感 */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(closest-side, rgba(127, 216, 176, 0.20), transparent 70%),
    radial-gradient(closest-side, rgba(155, 220, 240, 0.16), transparent 70%),
    radial-gradient(closest-side, rgba(247, 198, 160, 0.22), transparent 70%);
  background-position: 8% 14%, 92% 4%, 78% 92%;
  background-repeat: no-repeat;
}
/* 顶部暖光 */
.hero::after {
  content: ""; position: absolute; left: 50%; top: -200px;
  width: 820px; height: 360px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(246, 169, 107, 0.16), transparent 70%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero__eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.16em;
  color: var(--primary-bright); margin-bottom: 20px;
}
.hero__title {
  font-family: var(--font-serif);
  font-size: clamp(30px, 4.4vw, 44px);
  line-height: 1.30; font-weight: 600; color: var(--ink);
  max-width: 20em; text-wrap: balance;
}
.hero__mark {
  color: var(--primary);
  box-shadow: inset 0 -0.16em 0 var(--primary-tint);
}
.hero__desc {
  margin-top: 20px; max-width: 36em;
  font-size: 15.5px; line-height: 1.85; color: var(--ink-2);
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero__meta { margin-top: 28px; font-size: 12px; color: var(--ink-2); }
/* 状态点：橙色呼吸点 */
.hero__meta::before {
  content: ""; display: inline-block;
  width: 7px; height: 7px; margin-right: 8px;
  border-radius: 999px; background: var(--primary);
  box-shadow: 0 0 0 3px rgba(232, 106, 23, 0.14);
  vertical-align: 1px;
  animation: led-pulse 2.4s ease-in-out infinite;
}
@keyframes led-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* 通用按钮（前台） */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-height: 44px; padding: 0 22px;
  font-family: var(--font-sans);
  font-size: 14px; font-weight: 500; line-height: 1;
  border-radius: var(--r-pill);
  border: var(--bw) solid transparent;
  transition: background-color 120ms linear, border-color 120ms linear, color 120ms linear, box-shadow 120ms linear;
}
.btn--primary {
  background: var(--primary); color: var(--on-deep);
  font-weight: 600;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--primary) 24%, transparent);
}
.btn--primary:hover { background: var(--primary-900); box-shadow: 0 8px 22px color-mix(in srgb, var(--primary) 30%, transparent); }
.btn--quiet { background: var(--surface); color: var(--primary-bright); border-color: var(--line-chip); }
.btn--quiet:hover { border-color: var(--primary); background: var(--primary-tint); }

/* --------------------------------------------------------------------------
   ③ 编号网格 —— 轻量卡片化：淡底细边，hover 边框加深
   -------------------------------------------------------------------------- */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
  gap: 24px;
}
.topic-cell {
  display: block;
  padding: 20px;
  background: var(--surface);
  border: var(--bw) solid var(--rule);
  border-left: 3px solid var(--primary);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  transition: border-color 120ms linear, transform 140ms ease, box-shadow 140ms ease;
}
.topic-cell:hover {
  border-color: var(--field-border); border-left-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(23, 36, 31, 0.08);
}
.topic-cell__top {
  display: flex; align-items: flex-start; justify-content: flex-start; gap: 8px;
  margin-bottom: 12px;
}
.topic-cell__icon { width: 20px; height: 20px; color: var(--ink); flex: 0 0 auto; }
.topic-cell:hover .topic-cell__icon { color: var(--primary); }
.topic-cell__name {
  display: block;
  font-family: var(--font-serif);
  font-size: 17px; line-height: 1.52; font-weight: 600; color: var(--ink);
  text-wrap: balance;
}
.topic-cell:hover .topic-cell__name { color: var(--primary-bright); }
.topic-cell__sub {
  display: block;
  margin-top: 4px;
  font-size: 13px; line-height: 1.55; color: var(--ink-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topic-cell:hover .topic-cell__sub { color: var(--ink); }
.topic-cell__count {
  display: block;
  margin-top: 12px;
  font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums;
}

/* 编号网格下的「全部分类 →」：chip 行删除后首页唯一的分类入口（§6.2 入口不丢） */
.topic-more { margin-top: 24px; }
.topic-more__link {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 44px;                      /* 命中区 §10.3 */
  font-size: 13px;
  color: var(--primary-bright);         /* 正文链接 4.8:1 AA */
}
.topic-more__link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* --------------------------------------------------------------------------
   ⑤ 置顶区（§7.5 / §8.3）—— 白底 1px 描边，无阴影
   -------------------------------------------------------------------------- */
.pin-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  margin-bottom: 16px;
}
.pin-head__title {
  font-family: var(--font-serif);
  font-size: 18px; line-height: 1.45; font-weight: 600;
  color: var(--accent);             /* 朱砂语境 ②：区块级重点标记（每屏 1 处） */
}
.pin-card {
  display: block;
  background: var(--surface);
  border: var(--bw) solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-card);
  padding: 20px 24px;
  box-shadow: var(--shadow-card);
}
.pin-card + .pin-card { margin-top: 12px; }
.pin-card:hover { border-color: var(--field-border); border-left-color: var(--accent); }
.pin-card:hover .pin-card__title { color: var(--primary-bright); }
.pin-card__body { display: block; min-width: 0; flex: 1 1 auto; }
.pin-card__chip { display: flex; width: fit-content; margin-bottom: 10px; }
.pin-card__title {
  display: block;
  font-family: var(--font-serif);
  font-size: 17px; line-height: 1.52; font-weight: 600; color: var(--ink);
  text-wrap: pretty;
}
.pin-card__title--lead { font-size: 19px; line-height: 1.45; }
.pin-card__excerpt {
  display: block;
  margin-top: 8px;
  font-size: 14.5px; line-height: 1.70; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.pin-card__meta {
  margin-top: 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-size: 13px; line-height: 1.55; color: var(--ink-2);
}
.pin-card--lead { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.pin-card__figure { flex: 0 0 auto; }
.pin-thumb {
  width: 120px; height: 80px;
  border: var(--bw) solid var(--rule);
  border-radius: var(--r-card);
  background: var(--surface-tint);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-3);               /* 弱化灰：仅图形，非文字 */
}
.pin-thumb svg { width: 20px; height: 20px; }
/* 移动端折叠：默认只显示第 1 席 */
.pin-more { display: none; }
.pin-toggle {
  margin-top: 12px;
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 44px; padding: 0 2px;
  font-size: 13px; color: var(--primary-bright);
}
.pin-toggle:hover { text-decoration: underline; text-underline-offset: 4px; }
.pin-toggle__caret { transition: transform 120ms linear; }
.pin-toggle[aria-expanded="true"] .pin-toggle__caret { transform: rotate(180deg); }

/* --------------------------------------------------------------------------
   ⑨ 页脚（§8.8）—— 纸底单行轻量版
   -------------------------------------------------------------------------- */
.site-footer {
  position: relative;
  background: none;
  color: var(--ink-2);
  padding: 48px 0 24px;
}
/* 页脚顶部彩虹带，与页头呼应 */
.site-footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: var(--band);
}
.footer-top {
  display: flex; align-items: flex-start;
  gap: 24px 48px; flex-wrap: wrap;
}
.footer-brand { flex: 1 1 320px; max-width: 52ch; }
.footer-brand__name {
  font-family: var(--font-serif); font-size: 15px; font-weight: 600;
  color: var(--ink); margin: 0; white-space: nowrap;
}
.footer-brand__tag {
  font-family: var(--font-sans); font-size: 12px; font-weight: 400;
  color: var(--ink-2); margin-left: 10px; white-space: nowrap;
}
.footer-brand__desc {
  font-size: 12px; line-height: 1.75; color: var(--ink-2);
  margin: 8px 0 0;
}
.footer-nav {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 20px; flex-wrap: wrap;
  flex: 0 0 auto; margin-left: auto;
}
.footer-nav__cats { display: inline-flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-nav__link {
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 44px;
  font-size: 13px; color: var(--ink-2);
}
.footer-nav__link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.footer-nav__icon { flex-shrink: 0; color: var(--ink-2); }
.footer-rule { margin-top: 28px; border-top: 1px solid var(--rule); }
.footer-bottom {
  padding-top: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px 24px;
  font-size: 12px; color: var(--ink-2);
}
.footer-bottom p { margin: 0; }
.footer-bottom__links {
  display: inline-flex; align-items: center; gap: 8px;
}
.footer-bottom a { color: var(--ink-2); }
.footer-bottom a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.to-top {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; margin: -6px -6px -6px 4px; padding: 6px;
  border: var(--bw) solid var(--rule);
  border-radius: var(--r-card);
  color: var(--ink-2);
}
.to-top:hover { background: var(--surface-tint); color: var(--ink); }

/* --------------------------------------------------------------------------
   面包屑 / 页头（内页共用）
   -------------------------------------------------------------------------- */
.crumbs {
  padding-top: 24px;
  font-size: 13px; color: var(--ink-2);
}
.crumbs a:hover { color: var(--primary-bright); text-decoration: underline; text-underline-offset: 4px; }
.crumbs__sep { margin-inline: 8px; color: var(--ink-2); }
.page-head { padding-top: 64px; padding-bottom: 40px; }
.page-head h1 {
  margin-top: 12px;
  font-family: var(--font-serif);
  font-size: 36px; line-height: 1.28; font-weight: 700; color: var(--ink);
}
.page-head__lede { margin-top: 16px; max-width: var(--measure); }
.page-head__count { margin-top: 12px; font-size: 13px; color: var(--ink-2); }

/* --------------------------------------------------------------------------
   筛选 chips（§6.4）—— 三种形态必须互不相同
   -------------------------------------------------------------------------- */
.filters { padding-block: 24px; border-top: 1px solid var(--rule); }
.filter-row {
  display: flex; align-items: center; gap: 12px 10px;
  flex-wrap: wrap;
}
.filter-row + .filter-row { margin-top: 12px; }
.filter-row__label {
  flex: 0 0 48px;
  font-size: 13px; color: var(--ink-2);
}
.filter-row__items { display: flex; flex-wrap: wrap; gap: 8px; }

/* 搜索行：标签 + 输入框同一行，输入框吃掉剩余宽度 */
.filter-row--search { flex-wrap: nowrap; }
.filter-row--search .filter-row__items { flex: 1 1 auto; flex-wrap: nowrap; min-width: 0; gap: 8px; }
.filter-row--search .field__input { flex: 1 1 auto; width: auto; min-width: 0; max-width: 420px; }
.filter-row--search .btn { flex: 0 0 auto; }

/* --------------------------------------------------------------------------
   表单控件 —— 深色底上必须显式声明底色与文字色。
   UA 默认给 input 白色底，配上全局 color:inherit 会变成白底浅字，完全不可读。
   -------------------------------------------------------------------------- */
.field__input {
  width: 100%; max-width: 420px; min-height: 44px;
  padding: 10px 14px;
  font-family: var(--font-sans); font-size: 14.5px; line-height: 1.5;
  color: var(--ink);
  caret-color: var(--primary);
  background: var(--surface);
  border: 1px solid var(--ink-3);   /* 控件边界 3.5:1，满足 WCAG 1.4.11 */
  border-radius: var(--r-field);
  box-shadow: var(--shadow-soft);
  -webkit-appearance: none; appearance: none;
  transition: border-color 120ms linear, background-color 120ms linear;
}
.field__input::placeholder { color: var(--ink-2); opacity: 0.82; }
.field__input:hover { border-color: var(--ink); }
.field__input:focus { outline: none; border-color: var(--primary); background: var(--primary-tint); }
.field__input:focus-visible { outline: 2px solid var(--primary-bright); outline-offset: 1px; }
/* WebKit 自带的放大镜/清除叉号是黑色图标，深色底上看不见，去掉 */
.field__input[type="search"]::-webkit-search-decoration,
.field__input[type="search"]::-webkit-search-cancel-button,
.field__input[type="search"]::-webkit-search-results-button {
  -webkit-appearance: none; appearance: none; display: none;
}
/* 自动填充会把输入框刷回白底，强制回写主题底色 */
.field__input:-webkit-autofill,
.field__input:-webkit-autofill:hover,
.field__input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 100px var(--surface-tint) inset;
  caret-color: var(--ink);
}

/* ① 品类：靛蓝实心方角（未选 = 浅靛底） */
.f-cat {
  min-height: 32px; padding: 6px 14px;
  border-radius: var(--r-card);
  font-size: 12px; line-height: 1.40; font-weight: 600;
  color: var(--primary-bright);
  background: var(--primary-tint);
}
.f-cat:hover { border-color: var(--primary); }
.f-cat[aria-pressed="true"] { background: var(--primary); color: var(--on-deep); }

/* --------------------------------------------------------------------------
   聚合页文章列表行 + 侧栏
   -------------------------------------------------------------------------- */
.post-row {
  padding-block: 20px;
  border-top: var(--bw) solid var(--rule-2);
}
.post-row__top {
  display: flex; align-items: center; justify-content: flex-start; gap: 12px;
  margin-bottom: 8px;
}
.post-row__pin {
  flex: 0 0 auto;
  font-size: 11px; line-height: 1; font-weight: 600;
  color: var(--on-deep); background: var(--accent);
  padding: 4px 8px; border-radius: 999px;
}
.post-row__title {
  position: relative;
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 17px; line-height: 1.52; font-weight: 600; color: var(--ink);
  text-wrap: pretty;
}
.post-row__title::after { content: ""; position: absolute; inset: -10px -6px; }
.post-row__title:hover { color: var(--primary-bright); }
.post-row__excerpt {
  margin-top: 8px;
  font-size: 14.5px; line-height: 1.70; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* 首页「最新文章」：聚成一张轻量卡片，行间发丝线分隔（与主题卡片同一视觉语言） */
.latest-list {
  background: var(--surface);
  border: var(--bw) solid var(--rule);
  border-radius: var(--r-card);
  padding: 4px 24px;
  box-shadow: var(--shadow-card);
}
.latest-list .post-row { padding-block: 18px; }
.latest-list .post-row:first-child { border-top: 0; }

.side { position: sticky; top: 24px; display: grid; gap: 24px; }
.side-card {
  background: var(--surface);
  border: var(--bw) solid var(--rule);
  border-radius: var(--r-card);
  padding: 20px 24px;
  box-shadow: var(--shadow-card);
}
.side-card__title { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 12px; }
.side-list li { border-top: var(--bw) solid var(--rule-2); }
.side-list li:first-child { border-top: 0; }
.side-list a { display: flex; justify-content: space-between; gap: 12px; min-height: 40px; align-items: center; font-size: 13px; color: var(--ink-2); }
.side-list a:hover { color: var(--primary-bright); }
.side-list__count { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.side-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.side-tag { font-size: 12px; color: var(--ink-2); min-height: 24px; display: inline-flex; align-items: center; }
.side-tag:hover { color: var(--primary-bright); text-decoration: underline; text-underline-offset: 3px; }
.side-stat { font-size: 13px; color: var(--ink-2); line-height: 1.9; }
.side-stat b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

/* 分页（真实 <a>，非 JS 按钮，§11.3） */
.pager {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding-top: 32px; border-top: 1px solid var(--rule);
}
.pager a, .pager span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding: 0 12px;
  border: var(--bw) solid var(--rule);
  border-radius: var(--r-card);
  font-size: 13px; color: var(--ink-2);
}
.pager a:hover { border-color: var(--primary); color: var(--primary-bright); }
.pager [aria-current="page"] { background: var(--primary); border-color: var(--primary); color: var(--on-deep); }
.pager .is-disabled { color: var(--ink-3); border-color: var(--rule-2); } /* 仅图形色语境：非文字语义禁用态配合 border 表达 */

/* --------------------------------------------------------------------------
   文章页（article.html）
   -------------------------------------------------------------------------- */
.article-head { padding-top: 48px; padding-bottom: 32px; }
/* 文章页单栏（目录/同类文章已移除）：限制阅读宽度 */
.article-body {
  max-width: 780px;
  background: var(--surface);
  border: var(--bw) solid var(--rule);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: 36px 44px 40px;
}
.article-head h1 {
  margin-top: 16px;
  font-family: var(--font-serif);
  font-size: 34px; line-height: 1.32; font-weight: 700; color: var(--ink);
  text-wrap: balance;
}
.article-head__meta {
  margin-top: 20px; padding-top: 20px;
  border-top: 1px solid var(--rule);
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px;
  font-size: 13px; color: var(--ink-2);
}
.article-head__meta a:hover { color: var(--primary-bright); text-decoration: underline; text-underline-offset: 3px; }
.article-head__lede {
  margin-top: 24px;
  font-size: 17px; line-height: 1.75; color: var(--ink-2);
  max-width: var(--measure);
}

/* 目录：桌面左侧 sticky 3 级；移动端折叠为顶部横滚锚点条 */
.toc {
  position: sticky; top: 24px;
  font-size: 13px;
}
.toc__title {
  font-size: 13px; font-weight: 600; color: var(--ink);
  padding-bottom: 12px; border-bottom: 1px solid var(--rule);
}
.toc ol { margin-top: 12px; }
.toc li { border-top: var(--bw) solid var(--rule-2); }
.toc li:first-child { border-top: 0; }
.toc a {
  display: block; padding-block: 10px;
  color: var(--ink-2); line-height: 1.5;
}
.toc a:hover { color: var(--primary-bright); }
.toc__lv2 a { padding-left: 14px; font-size: 12.5px; }
.toc__lv3 a { padding-left: 28px; font-size: 12.5px; }
.toc__anchor { display: none; }

/* 正文 */
.prose { font-size: 16px; line-height: 1.8; color: var(--ink); max-width: var(--measure); }
.prose > * + * { margin-top: 20px; }
.prose h2 {
  margin-top: 64px;
  font-family: var(--font-serif);
  font-size: 21px; line-height: 1.42; font-weight: 600; color: var(--ink);
  padding-bottom: 12px; border-bottom: 1px solid var(--rule);
  scroll-margin-top: 24px;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  margin-top: 40px;
  font-family: var(--font-serif);
  font-size: 17px; line-height: 1.52; font-weight: 600; color: var(--ink);
  scroll-margin-top: 24px;
}
.prose h4 {
  margin-top: 32px;
  font-size: 16px; line-height: 1.60; font-weight: 600; color: var(--ink);
  scroll-margin-top: 24px;
}
.prose p { text-wrap: pretty; }
.prose a { color: var(--primary-bright); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--primary-bright); }
.prose strong { font-weight: 600; }
.prose ul.bullets li {
  position: relative; padding-left: 20px;
}
.prose ul.bullets li + li { margin-top: 8px; }
.prose ul.bullets li::before {
  content: ""; position: absolute; left: 4px; top: 13px;
  width: 4px; height: 4px; border-radius: 50%; background: var(--primary);
}
.prose code {
  font-family: var(--font-mono); font-size: 13px;
  background: var(--surface-tint); padding: 2px 6px; border-radius: 6px;
}
/* 正文配图：SVG 自身透明，容器统一给浅底 + 细边框，图注居中 */
.prose figure { margin-top: 28px; }
.prose figure img {
  display: block; width: 100%; height: auto;
  background: var(--surface-tint);
  border: var(--bw) solid var(--rule);
  border-radius: var(--r-card);
  padding: 18px;
}
.prose figcaption {
  margin-top: 10px;
  font-size: 12.5px; line-height: 1.60;
  color: var(--ink-2);
  text-align: center;
}

/* 步骤有序列表（§8.9）：20×20 序号方框 + 等宽靛蓝序号 */
.steps { counter-reset: step; }
.steps > li {
  counter-increment: step;
  display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px;
  padding-block: 20px;
  border-top: var(--bw) solid var(--rule-2);
}
.steps > li:first-child { border-top: 0; padding-top: 0; }
.steps__no {
  width: 20px; height: 20px; margin-top: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  border: var(--bw) solid var(--primary);
  border-radius: var(--r-card);
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--primary-bright);
}
.steps__no::before { content: counter(step, decimal-leading-zero); }
.steps__title { font-size: 16px; font-weight: 600; line-height: 1.6; color: var(--ink); }
.steps__desc { margin-top: 6px; font-size: 15px; line-height: 1.7; color: var(--ink-2); }

/* 8 列对比表格（§8.9：无竖线，表头下 1px 强线） */
.table-wrap {
  margin-top: 24px;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
/* 正文内容区最宽 692px，min-width 超过它会让三列表格也常驻横向滚动条 */
.data-table { min-width: 560px; font-size: 14px; line-height: 1.6; }
.data-table caption {
  text-align: left; font-size: 13px; color: var(--ink-2);
  padding-bottom: 12px;
}
.data-table th, .data-table td {
  padding: 12px 12px 12px 0;
  text-align: left; vertical-align: top;
  border-bottom: var(--bw) solid var(--rule-2);
}
.data-table thead th {
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  border-bottom: var(--bw) solid var(--field-border);
  white-space: nowrap;
}
.data-table tbody th {
  font-weight: 600; color: var(--ink); white-space: nowrap;
  font-family: var(--font-sans);
}
.data-table td { color: var(--ink); }
.data-table .num { font-variant-numeric: tabular-nums; }
.data-table tbody tr:first-child th, .data-table tbody tr:first-child td { border-top: 0; }
.table-note { margin-top: 12px; font-size: 13px; color: var(--ink-2); }

/* 提示框 Callout（§8.9）：4 语义色 + 左侧 3px 竖线 + 浅底 + 图标 */
.callout {
  display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 12px;
  padding: 16px 20px;
  border-radius: var(--r-card);
  border-left: 3px solid var(--info);
  background: var(--info-tint);
}
.callout--warning { border-left-color: var(--warning); background: var(--warning-tint); }
.callout__icon { width: 16px; height: 16px; margin-top: 4px; color: var(--info); }
.callout--warning .callout__icon { color: var(--warning); }
.callout__title { font-size: 13px; font-weight: 600; color: var(--ink); }
.callout__body { margin-top: 4px; font-size: 15px; line-height: 1.7; color: var(--ink); }

/* 代码 / 要点块 */
.codeblock {
  position: relative;
  background: var(--surface-tint);
  border: var(--bw) solid var(--rule);
  border-radius: var(--r-card);
  padding: 16px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.codeblock pre { font-family: var(--font-mono); font-size: 13px; line-height: 1.7; white-space: pre; }
.codeblock__cap {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 12px;
  font-size: 13px; font-weight: 600; color: var(--ink);
}
.copy-btn {
  display: inline-flex; align-items: center; gap: 6px;
  min-width: 32px; height: 32px; padding: 0 12px;
  border: var(--bw) solid var(--primary);
  border-radius: var(--r-card);
  font-size: 12px; color: var(--primary-bright);
}
.copy-btn:hover { background: var(--primary-tint); }

blockquote {
  border-left: 2px solid var(--primary);
  padding-left: 20px;
  font-size: 15px; line-height: 1.8; color: var(--ink-2);
}

/* 文末：元信息卡 / 上一篇下一篇 / 相关阅读 */
.post-meta-card {
  margin-top: 56px; padding: 20px 0 0;
  background: transparent;
  border: none;
  border-top: 1px solid var(--rule);
  border-radius: 0;
  font-size: 13px; color: var(--ink-2);
}
.post-meta-card dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; }
.post-meta-card dt { color: var(--ink-2); }
.post-meta-card dd { margin: 0; color: var(--ink); }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 32px; }
.post-nav a { padding: 16px 20px; border: var(--bw) solid var(--rule); border-radius: var(--r-field); background: var(--surface-tint); }
.post-nav a:hover { border-color: var(--primary); }
.post-nav__label { font-size: 13px; color: var(--ink-2); }
.post-nav__title { margin-top: 8px; font-family: var(--font-serif); font-size: 17px; line-height: 1.52; font-weight: 600; color: var(--ink); }
.post-nav a:hover .post-nav__title { color: var(--primary-bright); }

.related { margin-top: 64px; padding-top: 48px; border-top: 1px solid var(--rule); }
.related__title { font-family: var(--font-serif); font-size: 21px; line-height: 1.42; font-weight: 600; margin-bottom: 16px; }
.related__list li { border-top: var(--bw) solid var(--rule-2); }
.related__list li:first-child { border-top: 0; }
.related__list a { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding-block: 12px; }
.related__name { font-family: var(--font-serif); font-size: 17px; line-height: 1.52; font-weight: 600; }
.related__list a:hover .related__name { color: var(--primary-bright); }
.form-msg {
  margin-top: 12px;
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 13px; line-height: 1.55;
}
.form-msg:empty { display: none; }
.form-msg--error { color: var(--danger); }
.form-msg--ok { color: var(--success); }
.form-msg svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 3px; }

/* --------------------------------------------------------------------------
   §8.6 工具页（/tools/ip）—— 第三方站点选择页
   -------------------------------------------------------------------------- */

.tool-note {
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 28px;
  padding: 12px 16px;
  border: var(--bw) solid var(--primary-tint-2);
  border-radius: var(--r-field);
  background: var(--primary-tint);
  font-size: 13px; line-height: 1.60; color: var(--ink-2);
}
.tool-note__dot {
  flex: 0 0 auto;
  width: 7px; height: 7px; margin-top: 8px;
  border-radius: 50%;
  background: var(--primary);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
/* 同一行的卡片等高：li 撑满，a 再撑满 li */
.tool-grid > li { display: flex; }

.tool-card {
  position: relative;
  display: flex; flex-direction: column; gap: 7px;
  flex: 1 1 auto;
  padding: 22px 22px 24px;
  border: var(--bw) solid var(--rule);
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
/* 左侧强调条：hover 才出现，四张卡同时带色条会太吵 */
.tool-card::before {
  content: ''; position: absolute; left: -0.5px; top: 16px; bottom: 16px;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--primary);
  opacity: 0;
  transition: opacity .18s ease;
}
.tool-card:hover {
  border-color: var(--primary-tint-2);
  box-shadow: 0 2px 4px rgba(23, 36, 31, 0.05), 0 12px 28px rgba(23, 36, 31, 0.07);
  transform: translateY(-2px);
}
.tool-card:hover::before { opacity: 1; }

.tool-card__top { display: flex; align-items: baseline; gap: 10px; }
.tool-card__index {
  flex: 0 0 auto;
  font-size: 10px; line-height: 1.40; letter-spacing: .10em;
  color: var(--ink-3);
}
.tool-card__name {
  font-size: 18px; line-height: 1.40; font-weight: 600; color: var(--ink);
  transition: color .18s ease;
}
.tool-card__host { font-weight: 400; color: var(--ink-3); }
.tool-card__go {
  margin-left: auto; flex: 0 0 auto;
  font-family: var(--font-mono); font-size: 14px; line-height: 1.40;
  color: var(--ink-3);
  transition: transform .18s ease, color .18s ease;
}
.tool-card:hover .tool-card__name { color: var(--primary-bright); }
.tool-card:hover .tool-card__go { transform: translate(2px, -2px); color: var(--primary-bright); }

.tool-card__role {
  font-size: 12.5px; line-height: 1.50; font-weight: 600; letter-spacing: .02em;
  color: var(--primary-bright);
}
.tool-card__desc {
  margin-top: 2px;
  font-size: 13.5px; line-height: 1.72; color: var(--ink-2);
}

.tool-foot {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-size: 13.5px; line-height: 1.70; color: var(--ink-2);
}
.tool-foot a { color: var(--primary-bright); text-decoration: underline; text-underline-offset: 3px; }

/* --------------------------------------------------------------------------
   §9.1 断点：仅 720 / 1024 / 1280（禁止新增）
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
  .container { padding-inline: 24px; }
  .section { padding-block: 72px; }
  .split, .split--toc-first { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  /* 编号网格：1024px 以下 4 列太挤（实测 875px 视口下每格仅 192px，
     第 4 格的编号会正好压在容器右边缘被切掉），改 2×2 */
  .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  /* 工具页：两列在 1024px 以下会把描述压成 4 行，改单列通读 */
  .tool-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .side { position: static; }
  .toc {
    position: static;
    border: var(--bw) solid var(--rule);
    border-radius: var(--r-card);
    background: var(--surface);
    padding: 12px 16px;
  }
  .toc__title { padding-bottom: 8px; }
  .toc ol { display: none; }
  /* 移动/平板：目录折叠成一行可横滚的锚点条 */
  .toc__anchor {
    display: flex; gap: 16px; overflow-x: auto;
    scrollbar-width: none; -ms-overflow-style: none;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }
  .toc__anchor::-webkit-scrollbar { display: none; }
  .toc__anchor a {
    flex: 0 0 auto; white-space: nowrap;
    min-height: 32px; display: inline-flex; align-items: center;
    padding: 0 2px;
    font-size: 13px; color: var(--ink-2);
    scroll-snap-align: start;
  }
  .toc__anchor a:hover { color: var(--primary-bright); }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  .container { max-width: 100%; }
}

@media (max-width: 719px) {
  body { line-height: 1.8; }
  .container { padding-inline: 20px; }
  .section { padding-block: 56px; }
  .section--tight { padding-block: 48px; }

  /* hero 收紧：CTA 撑满一行，触控区不塌 */
  .hero { padding-block: 56px 48px; }
  .hero__eyebrow { margin-bottom: 16px; }
  .hero__desc { margin-top: 16px; }
  .hero__cta { margin-top: 28px; }
  .hero__cta .btn { flex: 1 1 auto; }
  .hero__meta { margin-top: 24px; }

  /* 顶栏收窄：字标 24px / 副题 1 行省略 */
  .site-header { padding-top: 16px; }
  .wordmark { font-size: 24px; }
  .toolbar { margin-top: 10px; }
  .toolbar__tool { padding: 4px 10px; font-size: 12.5px; gap: 6px; }
  .toolbar__tool svg { width: 14px; height: 14px; }

  /* 工具页：卡片内边距收紧，描述保持 13.5px 可读 */
  .tool-card { padding: 18px 18px 20px; gap: 6px; }
  .tool-card__name { font-size: 16.5px; }
  .tool-card__desc { font-size: 13px; line-height: 1.70; }
  .tool-note { margin-bottom: 20px; padding: 12px 14px; }
  .tool-foot { margin-top: 32px; }

  /* 编号网格 2×2 */
  .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .topic-cell { padding: 16px; }
  .topic-head { margin-bottom: 20px; }
  .topic-head .eyebrow { display: none; }   /* 英文眉标在窄屏收起，避免与中文眉标同块 */

  /* 最新文章卡片：内边距随容器收窄 */
  .latest-list { padding: 4px 16px; }
  .latest-list .post-row { padding-block: 16px; }

  /* 置顶区：只显示第 1 席 + 展开其余 2 篇（§7.5.4） */
  .pin-card { padding: 16px; }
  /* 第 2、3 席在移动端移入折叠容器，主流程中隐藏 */
  .pin-card:not(.pin-card--lead) { display: none; }
  /* 折叠容器内的克隆席要重新显示（上面的 display:none 会一并命中克隆节点） */
  .pin-more .pin-card { display: block; }
  .pin-card__title { font-size: 16px; line-height: 1.55; }
  .pin-card__title--lead { font-size: 17px; line-height: 1.50; }
  .pin-thumb { width: 88px; height: 56px; }
  .pin-more { display: none; }
  .pin-more.is-open { display: block; }
  .pin-toggle { display: inline-flex; }
  .pin-head__title { font-size: 17px; }
  .more-link { display: none; }

  /* 页脚 */
  .site-footer { padding: 40px 0 20px; }
  .footer-top { flex-direction: column; gap: 20px; }
  .footer-brand { max-width: none; }
  .footer-nav { justify-content: flex-start; gap: 16px; margin-left: 0; }
  .footer-nav__cats { gap: 16px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 12px; }

  /* 内页 */
  .crumbs { padding-top: 16px; }
  .page-head { padding-top: 40px; padding-bottom: 32px; }
  .page-head h1 { font-size: 26px; line-height: 1.34; }
  .page-head__lede { font-size: 16px; line-height: 1.80; }

  /* 筛选 chips 横向滚动，不折行 */
  .filter-row { flex-wrap: nowrap; align-items: center; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .filter-row::-webkit-scrollbar { display: none; }
  .filter-row__label { flex: 0 0 auto; }
  .filter-row__items { flex-wrap: nowrap; }
  /* 搜索行不横滚：输入框独占剩余宽度 */
  .filter-row--search { overflow: visible; padding-bottom: 0; }
  .filter-row--search .filter-row__items { flex: 1 1 auto; min-width: 0; }
  /* 16px 起步，避免 iOS Safari 聚焦时自动放大页面 */
  .field__input { max-width: none; font-size: 16px; }

  /* 文章页 */
  .article-head { padding-top: 32px; padding-bottom: 24px; }
  .article-head h1 { font-size: 27px; line-height: 1.36; }
  .article-head__lede { font-size: 16px; line-height: 1.80; }
  .article-body { padding: 22px 20px 28px; border-radius: 8px; }
  .prose h2 { margin-top: 48px; font-size: 19px; line-height: 1.48; }
  .prose h3 { margin-top: 32px; font-size: 17px; }
  .prose h4 { margin-top: 24px; }
  .prose > * + * { margin-top: 16px; }
  .post-nav { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .related__title { font-size: 19px; }
  .post-meta-card { margin-top: 48px; padding: 16px; }
  .post-meta-card dl { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .post-meta-card dd { margin-bottom: 8px; }
  .callout { padding: 16px; }
}

/* 极窄屏（≤400px）再收一档，保证 375px 无横向溢出 */
@media (max-width: 400px) {
  .pin-card--lead { flex-direction: column-reverse; }
  .pin-thumb { width: 100%; height: 96px; }
  .pager { gap: 4px; }
}

/* --------------------------------------------------------------------------
   §10.9 动效降级
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* 打印：原型不投流，打印时去掉深底 */
@media print {
  .to-top { display: none; }
}