/* =============================================================================
   暮光TV 创作资料库 · 全站样式
   =============================================================================
   设计方向：**Editorial Dark（暗色报刊编辑风）**
   ---------------------------------------------------------------------------
   受众是来找现成提示词与流程的创作者，他们要的是信息密度与可信度，不是炫技。
   所以走「数据即视觉」：大号衬线数字做锚点、发丝线围成数据栏、渐变网格与
   颗粒做氛围。**记忆点 = 每页顶部那组 44px 的衬线铜金数字**，读起来像统计年鉴。

   三条不可破坏的规矩（写最前面，免得后面自己拆掉）：
     1. 数字一律衬线 + tabular-nums + 铜金 —— 它是每页唯一的主角
     2. 强调色只出现在：数字、链接、CTA、当前项、焦点圈。其余一律不碰
     3. 不用「卡片雨」：列表用发丝线分隔，不给每个区块都套圆角 + 阴影

   字体决策：**刻意不引外部字体**。
     访客全在国内、走百度 SEO，一个外部字体请求（即便只有 20KB）在弱网下
     可能耗时 500ms+，直接拖累首屏体验。改用系统字体栈里的 **Georgia 衬线**
     承担数字展示（系统自带、老式数字形态，暗底大字号下质感很好），
     中文用黑体栈，靠字号 / 字重 / 字距的强烈反差造层次 ——
     这是「极简克制」路线里性能与观感平衡得最好的做法。

   主题固定暗色，**不跟随 prefers-color-scheme** —— 曾经跟随过，结果同一份代码
   在用户浅色系统显示白色、在编辑器暗色面板显示暗色，造成「你看到的和我看到的
   不是同一个页面」的沟通错位。
   ============================================================================= */

/* =============================================================================
   1. 设计令牌
   ============================================================================= */
:root {
  /* ── 表面：4 级，从深到浅 ───────────────────────────────── */
  --bg:        #0e0c0b;   /* 比旧版更深，让内容浮起来 */
  --surface:   #191614;
  --surface-2: #211d19;

  /* ── 文字：4 级 ─────────────────────────────────────────── */
  --text:      #f2ece3;
  --text-2:    #bdb3a7;
  --muted:     #8f8578;
  --faint:     #665e55;

  /* ── 发丝线：两级 ───────────────────────────────────────── */
  --line:      #2a2420;
  --line-2:    #3a322b;

  /* ── 铜金：唯一的强调色（暗底对比度 ≈ 8.9:1）────────────── */
  --accent:      #e8a052;
  --accent-hi:   #f8bd76;
  --accent-dim:  #a5702f;
  --accent-soft: #2a2016;

  /* ── 字阶：模块化比例 ≈1.28 ─────────────────────────────── */
  --fs-2xs:  11px;    /* 极小标签 */
  --fs-xs:   12.5px;  /* 元数据、备注 */
  --fs-sm:   14px;    /* 次要文字 */
  --fs-md:   15.5px;  /* 正文 */
  --fs-lg:   18px;    /* 导语 */
  --fs-xl:   22px;    /* h3 */
  --fs-2xl:  27px;    /* h2 */
  --fs-3xl:  36px;    /* h1 移动端 */
  --fs-4xl:  50px;    /* h1 桌面端 */
  --fs-data: 44px;    /* 数据条数字 */

  /* ── 间距梯度 ───────────────────────────────────────────── */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 22px; --sp-6: 32px; --sp-7: 44px; --sp-8: 64px; --sp-9: 88px;

  /* ── 圆角：编辑风用小圆角，圆角越大越"APP 感" ───────────── */
  --r-xs: 2px;
  --r-sm: 4px;
  --r-md: 6px;

  /* ── 阴影：带环境色，不用纯黑 ───────────────────────────── */
  --shadow-2: 0 8px 24px rgba(0, 0, 0, .45);
  --shadow-3: 0 24px 60px rgba(0, 0, 0, .55);

  /* ── 动效 ───────────────────────────────────────────────── */
  --ease-out:  cubic-bezier(.16, 1, .3, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);
  --dur-fast: 160ms;
  --dur-base: 320ms;
  --dur-slow: 640ms;

  /* ── 字体：见文件头「字体决策」 ─────────────────────────── */
  --font-sans: "PingFang SC", "HarmonyOS Sans SC", "Source Han Sans SC",
               "Noto Sans SC", "Microsoft YaHei", -apple-system, sans-serif;
  /* Georgia 承担数字展示：老式衬线数字，暗底大字号下比无衬线有质感得多 */
  --font-display: Georgia, "Times New Roman", "Songti SC", "Noto Serif SC", serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", "SF Mono", Consolas,
               "Liberation Mono", monospace;

  --wrap: 1140px;
  --head-h: 58px;
}

/* =============================================================================
   2. 重置与基础
   ============================================================================= */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--head-h) + 20px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: 1.78;
  letter-spacing: .012em;   /* 中文正文需要一点字距才透气 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-soft);
}
a:hover { color: var(--accent-hi); }

/* 焦点圈：2px 铜金 + 2px 偏移 —— 键盘用户必须看得见 */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

::selection { background: rgba(232, 160, 82, .3); color: #fff; }

/* 滚动条：暗色主题下默认滚动条太亮 */
* { scrollbar-color: var(--line-2) transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: 6px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: #4a4038; }

/* =============================================================================
   3. 氛围层 —— 用渐变网格与颗粒替代纯色平铺
   ============================================================================= */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    /* 左上暖橙：呼应"暮光"，也是品牌色的来源 */
    radial-gradient(58rem 38rem at 10% -8%,  rgba(232, 160, 82, .18), transparent 62%),
    /* 右下极淡冷色：给画面纵深，避免整片发黄 */
    radial-gradient(48rem 34rem at 100% 108%, rgba(112, 96, 148, .12), transparent 58%),
    /* 中上微光：让标题区域微微发亮 */
    radial-gradient(40rem 22rem at 50% -4%,   rgba(255, 255, 255, .05), transparent 60%);
}

/* 颗粒：SVG feTurbulence 生成，透明度压到 3.5% —— 再高就显脏 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* =============================================================================
   4. 排版
   ============================================================================= */

/* h1：全站最大一级；字距收紧是中文大标题的关键（中文默认字距太松会散） */
h1 {
  font-size: clamp(var(--fs-3xl), 4.2vw, var(--fs-4xl));
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.028em;
  margin: 0 0 var(--sp-4);
  color: var(--text);
  text-wrap: balance;
}

/* h2：上方发丝线 + 大留白 —— 编辑风的分段靠留白与规则线，不靠色块。
   线的前 48px 用铜金（用背景渐变实现，CSS 没有"部分边框染色"）——
   这是全站唯一的分节标记，克制但能立刻定位到每个小节的起点。 */
h2 {
  font-size: var(--fs-2xl);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.018em;
  color: var(--text);
  margin: var(--sp-8) 0 var(--sp-5);
  padding-top: var(--sp-5);
  background-image: linear-gradient(90deg, var(--accent) 0 48px, var(--line) 48px);
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: 0 0;
  text-wrap: balance;
}
h2:first-child { margin-top: 0; padding-top: 0; background-image: none; }

h3 {
  font-size: var(--fs-xl);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.012em;
  margin: var(--sp-7) 0 var(--sp-3);
  color: var(--text);
}

h4 { font-size: var(--fs-lg); font-weight: 600; margin: var(--sp-5) 0 var(--sp-2); }

p { margin: 0 0 var(--sp-4); }
p:last-child { margin-bottom: 0; }

/* 正文行宽：中文 28–40 字最舒适 */
.layout > div > p,
.sect > p { max-width: 42em; }

/* 导语：比正文大一号、颜色降一级 */
.lead {
  font-size: var(--fs-lg);
  line-height: 1.72;
  color: var(--text-2);
  margin: 0 0 var(--sp-5);
  max-width: 40em;
  letter-spacing: .01em;
}

strong, b { font-weight: 600; color: var(--text); }

/* 备注：编辑风的小字注解，用左侧细线标记 */
.note {
  font-size: var(--fs-xs);
  line-height: 1.78;
  color: var(--muted);
  margin: var(--sp-3) 0 var(--sp-5);
  padding-left: var(--sp-3);
  border-left: 1px solid var(--line-2);
}
.note a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.note a:hover { color: var(--accent); }

code, kbd, samp { font-family: var(--font-mono); font-size: .9em; }
.kbd {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  letter-spacing: .01em;
  color: var(--text);
}

/* 表格数据：等宽数字保证纵向对齐 */
.spec td, .spec th { font-variant-numeric: tabular-nums; }

/* =============================================================================
   5. 布局骨架
   ============================================================================= */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--sp-5); }

main { min-height: 60vh; padding: var(--sp-7) 0 var(--sp-9); }

/* 两栏：主内容 + 侧栏。侧栏 268px 是长目录的舒适宽度 */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  gap: var(--sp-8);
  align-items: start;
}
.layout > div { min-width: 0; }

.page-head { margin-bottom: var(--sp-7); }

/* 面包屑：小号等宽铜金，充当 h1 的 eyebrow */
.crumb {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  color: var(--faint);
  margin-bottom: var(--sp-4);
  font-family: var(--font-mono);
  letter-spacing: .04em;
}
.crumb a { color: var(--accent-dim); }
.crumb a:hover { color: var(--accent); }
.crumb span { color: var(--faint); opacity: .5; }

/* =============================================================================
   6. 站点头部与底部
   ============================================================================= */
.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--head-h);
  border-bottom: 1px solid var(--line);
  /* 毛玻璃：内容滚过时透出微光，比纯色条有层次 */
  background: rgba(14, 12, 11, .78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
}

.site-head__in { height: 100%; display: flex; align-items: center; gap: var(--sp-6); }

/* 品牌：TV 两字母用铜金衬线，形成小面积强调 */
.brand {
  display: inline-flex;
  align-items: center;
  font-size: var(--fs-md);
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--text);
  white-space: nowrap;
}
.brand em {
  font-style: normal;
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: .02em;
  padding: 0 .5px;
}
.brand:hover { color: var(--text); }

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  margin-left: auto;
  font-size: var(--fs-sm);
}

.site-nav > a {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 var(--sp-3);
  color: var(--muted);
  border-radius: var(--r-sm);
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease-soft);
}
.site-nav > a:hover { color: var(--text); }

/* 当前项：底部铜金短线滑入，不用背景块（更克制） */
.site-nav > a::after {
  content: "";
  position: absolute;
  left: var(--sp-3);
  right: var(--sp-3);
  bottom: 2px;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur-base) var(--ease-out);
}
.site-nav > a:hover::after { transform: scaleX(.35); }
.site-nav > a[aria-current] { color: var(--text); }
.site-nav > a[aria-current]::after { transform: scaleX(1); }

/* 导航里的 CTA：全站唯一的实心块 */
.nav-cta {
  margin-left: var(--sp-3);
  padding: 0 var(--sp-4) !important;
  background: var(--accent-soft);
  border: 1px solid var(--accent-dim);
  color: var(--accent) !important;
  font-weight: 500;
  transition: background-color var(--dur-fast) var(--ease-soft),
              border-color var(--dur-fast) var(--ease-soft),
              color var(--dur-fast) var(--ease-soft);
}
.nav-cta:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #17120c !important;
}
.nav-cta::after { display: none; }

.site-foot {
  border-top: 1px solid var(--line);
  padding: var(--sp-7) 0 var(--sp-8);
  font-size: var(--fs-xs);
  color: var(--faint);
}
.site-foot__links { display: flex; flex-wrap: wrap; gap: var(--sp-5); margin-bottom: var(--sp-4); }
.site-foot__links a { color: var(--muted); }
.site-foot__links a:hover { color: var(--accent); }

/* 底部署名 + 备案号：中间用一条竖线分隔，备案号链接到工信部 */
.site-foot__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-xs);
  color: var(--faint);
}
.site-foot__icp {
  color: var(--faint);
  padding-left: var(--sp-3);
  border-left: 1px solid var(--line);
  transition: color var(--dur-fast) var(--ease-soft);
}
.site-foot__icp:hover { color: var(--accent); }

/* =============================================================================
   7. 组件
   ============================================================================= */

/* ── 7.1 数据条 ★ 记忆点 ────────────────────────────────────
   每页唯一的主角。大号衬线数字 + 竖发丝线分隔，横排成一条数据栏，
   读起来像统计年鉴的页眉，而不是"六个彩色小方块"。 */
.stats {
  display: flex;
  flex-wrap: wrap;
  margin: var(--sp-6) 0 var(--sp-7);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stats__i {
  position: relative;
  flex: 1 1 0;
  min-width: 132px;
  padding: var(--sp-5) var(--sp-5) var(--sp-5) 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.stats__i + .stats__i { padding-left: var(--sp-5); }
.stats__i + .stats__i::before {
  content: "";
  position: absolute;
  left: 0;
  top: var(--sp-5);
  bottom: var(--sp-5);
  width: 1px;
  background: var(--line);
}

/* 衬线 + 等宽数字 + 铜金 —— 全站数据的统一面孔 */
.stats__n {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-data);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--accent);
}

.stats__l {
  font-size: var(--fs-xs);
  color: var(--muted);
  letter-spacing: .03em;
  line-height: 1.5;
}

/* ── 7.2 首页区块 ─────────────────────────────────────────── */
.sect { margin: var(--sp-9) 0 0; }
.sect:first-of-type { margin-top: var(--sp-7); }
.sect__h { margin: 0 0 var(--sp-5); }
.sect__h h2 { margin-top: 0; padding-top: 0; background-image: none; }
.sect__h h2 a { color: var(--text); }
.sect__h h2 a:hover { color: var(--accent); }
.sect__h p {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.75;
  max-width: 44em;
}
.sect h3 {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--muted);
  letter-spacing: .06em;
  margin: var(--sp-6) 0 var(--sp-4);
}

/* ── 7.3 分类标签条 ───────────────────────────────────────── */
.tagbar { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

.tagbar__a {
  display: inline-flex;
  align-items: baseline;
  gap: var(--sp-2);
  min-height: 32px;
  padding: 6px var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: var(--fs-xs);
  color: var(--muted);
  transition: border-color var(--dur-fast) var(--ease-soft),
              color var(--dur-fast) var(--ease-soft),
              background-color var(--dur-fast) var(--ease-soft);
}
.tagbar__a:hover {
  border-color: var(--accent-dim);
  background: var(--accent-soft);
  color: var(--accent);
}
.tagbar__a span {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-2xs);
  color: var(--faint);
}
.tagbar__a:hover span { color: var(--accent-dim); }

.tags { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: var(--sp-4) 0; }
/* 标签：颜色提到 text-2、边框提到 line-2 —— 原来用 muted + line 太暗，
   截图里看着像禁用状态 */
.tag {
  font-size: var(--fs-xs);
  font-family: var(--font-mono);
  color: var(--text-2);
  padding: 3px var(--sp-3);
  border: 1px solid var(--line-2);
  border-radius: 999px;
}

/* ── 7.4 卡片网格 ───────────────────────────────────────────
   刻意不用"圆角 + 阴影"的卡片雨：图片小圆角、无阴影，
   靠图片体量与标题层次立住。悬停只做两件事：图轻微放大 + 标题变色。 */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(198px, 1fr));
  gap: var(--sp-5) var(--sp-4);
}

.card { display: block; color: inherit; }

.card__img {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--line);
}
.card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out);
}
.card:hover .card__img { border-color: var(--line-2); }
.card:hover .card__img img { transform: scale(1.045); }

.card__badge {
  position: absolute;
  top: var(--sp-2);
  left: var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: .06em;
  padding: 2px 7px;
  border-radius: var(--r-xs);
  background: rgba(14, 12, 11, .82);
  color: var(--accent);
  backdrop-filter: blur(4px);
}

/* 标题：悬停时下划线从左侧扫入 */
.card__t {
  display: block;
  margin-top: var(--sp-3);
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--text-2);
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size var(--dur-base) var(--ease-out),
              color var(--dur-fast) var(--ease-soft);
}
.card:hover .card__t { color: var(--text); background-size: 100% 1px; }

.card__m {
  display: block;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-2xs);
  color: var(--faint);
}

/* ── 7.5 列表行 ─────────────────────────────────────────────
   编辑风的核心组件：没有卡片、没有斑马纹，只有发丝线 +
   悬停时左侧滑入的铜金竖线。信息密度高且不吵。 */
.rows { border-top: 1px solid var(--line); }

.row {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: var(--sp-5);
  padding: var(--sp-4) var(--sp-3) var(--sp-4) 0;
  border-bottom: 1px solid var(--line);
  transition: background-color var(--dur-fast) var(--ease-soft);
}
/* hover：左侧铜金竖线滑入 + 背景极轻微提亮 */
.row::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform var(--dur-base) var(--ease-out);
}
.row:hover { background: rgba(255, 255, 255, .018); }
.row:hover::before { transform: scaleY(1); }

.row__main { flex: 1; min-width: 0; }

.row__t {
  display: inline;
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--text);
  letter-spacing: -.005em;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size var(--dur-base) var(--ease-out),
              color var(--dur-fast) var(--ease-soft);
}
a.row__t:hover, .row:hover a.row__t { color: var(--accent); background-size: 100% 1px; }

.row__meta { margin-top: 5px; font-size: var(--fs-xs); line-height: 1.7; color: var(--muted); }

/* 右侧数值：等宽，纵向对齐成一列 */
.row__n {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-xs);
  color: var(--faint);
  white-space: nowrap;
}
.row__n.code { font-size: var(--fs-2xs); opacity: .75; }
.row__tail { flex: 0 0 auto; }

/* 行内小色块（节点类型图例） */
.row__t i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 1px;
  margin-right: var(--sp-2);
  vertical-align: 1px;
}

.cat-index .row { padding-top: var(--sp-3); padding-bottom: var(--sp-3); }
.flow-meta {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

/* ── 7.6 参数表 ───────────────────────────────────────────── */
.spec {
  width: 100%;
  border-collapse: collapse;
  margin: var(--sp-5) 0 var(--sp-6);
  font-size: var(--fs-sm);
}
.spec th, .spec td {
  text-align: left;
  padding: var(--sp-3) var(--sp-4) var(--sp-3) 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.spec th {
  width: 32%;
  min-width: 96px;
  font-weight: 400;
  color: var(--muted);
  font-size: var(--fs-xs);
  letter-spacing: .03em;
}
.spec td { color: var(--text-2); }
.spec td a { color: var(--accent); }

/* ── 7.7 折叠面板 ─────────────────────────────────────────── */
.tpl { border-bottom: 1px solid var(--line); padding: var(--sp-4) 0; }
.tpl > summary {
  cursor: pointer;
  font-size: var(--fs-sm);
  color: var(--text-2);
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 32px;
  transition: color var(--dur-fast) var(--ease-soft);
}
.tpl > summary::-webkit-details-marker { display: none; }
/* 自绘三角：展开时旋转 90° */
.tpl > summary::before {
  content: "";
  flex: 0 0 auto;
  width: 0;
  height: 0;
  border-left: 5px solid var(--muted);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform var(--dur-base) var(--ease-out),
              border-left-color var(--dur-fast) var(--ease-soft);
}
.tpl[open] > summary { color: var(--text); margin-bottom: var(--sp-4); }
.tpl[open] > summary::before { transform: rotate(90deg) translateX(1px); border-left-color: var(--accent); }
.tpl > summary:hover { color: var(--accent); }

/* ── 7.8 要点列表 ─────────────────────────────────────────── */
.points {
  list-style: none;
  padding: 0;
  margin: var(--sp-5) 0 var(--sp-6);
  counter-reset: pt;
}
.points > li {
  position: relative;
  padding: 0 0 var(--sp-5) var(--sp-6);
  font-size: var(--fs-sm);
  line-height: 1.85;
  color: var(--text-2);
  border-left: 1px solid var(--line);
  margin-left: 9px;
}
.points > li::before {
  counter-increment: pt;
  content: counter(pt);
  position: absolute;
  left: -10px;
  top: 1px;
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line-2);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--muted);
  transition: border-color var(--dur-fast) var(--ease-soft),
              color var(--dur-fast) var(--ease-soft);
}
.points > li:hover::before { border-color: var(--accent-dim); color: var(--accent); }
.points > li:last-child { padding-bottom: 0; border-left-color: transparent; }
.points > li strong { color: var(--text); font-weight: 600; }

.points__src {
  display: block;
  margin-top: var(--sp-2);
  font-size: var(--fs-xs);
  font-family: var(--font-mono);
  color: var(--faint);
}
.points__src a { color: var(--faint); text-decoration: underline; text-underline-offset: 3px; }
.points__src a:hover { color: var(--accent); }

/* 有序流程 */
.steps { list-style: none; padding: 0; margin: var(--sp-5) 0; counter-reset: st; }
.steps > li {
  position: relative;
  padding: 0 0 var(--sp-5) var(--sp-6);
  border-left: 1px solid var(--line);
  margin-left: 9px;
}
.steps > li::before {
  counter-increment: st;
  content: counter(st);
  position: absolute;
  left: -10px;
  top: 2px;
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line-2);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--muted);
}
.steps > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps h3 { margin: 0 0 var(--sp-2); font-size: var(--fs-md); font-weight: 600; }
.steps p { font-size: var(--fs-sm); color: var(--text-2); margin: 0; }

/* ── 7.9 问答 ─────────────────────────────────────────────── */
.faq { margin: var(--sp-5) 0 var(--sp-6); }
.faq > details { border-bottom: 1px solid var(--line); }
.faq > details > summary {
  cursor: pointer;
  list-style: none;
  padding: var(--sp-4) var(--sp-6) var(--sp-4) 0;
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--text-2);
  position: relative;
  min-height: 44px;
  transition: color var(--dur-fast) var(--ease-soft);
}
.faq > details > summary::-webkit-details-marker { display: none; }
/* 右侧 +/− 指示器，比三角更简洁 */
.faq > details > summary::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  width: 11px;
  height: 1.5px;
  margin-top: -1px;
  background: var(--muted);
  transition: background-color var(--dur-fast) var(--ease-soft);
}
.faq > details > summary::before {
  content: "";
  position: absolute;
  right: 9px;
  top: 50%;
  width: 1.5px;
  height: 11px;
  margin-top: -5.5px;
  background: var(--muted);
  transition: transform var(--dur-base) var(--ease-out),
              background-color var(--dur-fast) var(--ease-soft);
}
.faq > details[open] > summary::before { transform: scaleY(0); }
.faq > details[open] > summary,
.faq > details > summary:hover { color: var(--accent); }
.faq > details > summary:hover::after,
.faq > details > summary:hover::before { background: var(--accent); }
.faq > details > p {
  padding: 0 var(--sp-6) var(--sp-5) 0;
  font-size: var(--fs-sm);
  color: var(--text-2);
  line-height: 1.85;
}

/* ── 7.10 行动点 ──────────────────────────────────────────── */
.cta {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  flex-wrap: wrap;
  margin: var(--sp-7) 0 var(--sp-6);
  padding: var(--sp-6);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .022), transparent 60%),
    var(--surface);
}
/* 左侧铜金竖条：这里唯一的装饰 */
.cta::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-dim));
}
.cta__t {
  flex: 1 1 260px;
  margin: 0;
  font-size: var(--fs-md);
  line-height: 1.5;
  color: var(--text-2);
}
.cta__t strong {
  display: block;
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.01em;
  margin-bottom: 3px;
}
.cta__s { display: block; font-size: var(--fs-xs); color: var(--muted); }

.cta--top {
  margin-top: var(--sp-6);
  border-color: var(--accent-dim);
  background:
    linear-gradient(180deg, rgba(232, 160, 82, .07), transparent 70%),
    var(--surface);
}

/* 按钮：全站唯一的实心元素 */
.btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 var(--sp-6);
  border-radius: var(--r-sm);
  background: var(--accent);
  color: #17120c;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease-soft),
              transform var(--dur-fast) var(--ease-soft),
              box-shadow var(--dur-base) var(--ease-out);
}
.btn:hover {
  background: var(--accent-hi);
  color: #17120c;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(232, 160, 82, .22);
}
.btn:active { transform: translateY(0); }

/* ── 7.11 侧栏 ────────────────────────────────────────────── */
.side {
  position: sticky;
  top: calc(var(--head-h) + var(--sp-5));
  font-size: var(--fs-xs);
}
.side__sec { margin-bottom: var(--sp-6); }
.side__h {
  font-size: var(--fs-2xs);
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 var(--sp-3);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
}
.side nav { display: flex; flex-direction: column; }
.side nav a {
  display: block;
  padding: 7px var(--sp-3) 7px 0;
  color: var(--muted);
  line-height: 1.5;
  border-bottom: 1px solid var(--line);
  transition: color var(--dur-fast) var(--ease-soft),
              padding-left var(--dur-base) var(--ease-out);
}
.side nav a:last-child { border-bottom: 0; }
.side nav a:hover { color: var(--accent); padding-left: var(--sp-2); }
.side nav a[aria-current="page"] { color: var(--text); }
.side .row__n { font-size: var(--fs-2xs); }

/* ── 7.12 节点构成条 ──────────────────────────────────────── */
.nbar {
  display: flex;
  height: 26px;
  margin: var(--sp-4) 0;
  border-radius: var(--r-xs);
  overflow: hidden;
  border: 1px solid var(--line);
}
.nbar__seg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 500;
  color: #14110f;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.nbar__seg + .nbar__seg { border-left: 1px solid rgba(0, 0, 0, .2); }

/* 六类节点固定色：按语义分冷暖 */
.nt-image   { background: #e0964a; }   /* 铜金 —— 图片 */
.nt-video   { background: #d4795f; }   /* 陶红 —— 视频 */
.nt-text    { background: #7fa8c9; }   /* 雾蓝 —— 文本 */
.nt-audio   { background: #8fb98d; }   /* 苔绿 —— 音频 */
.nt-group   { background: #9a9188; }   /* 石灰 —— 编组 */
.nt-script  { background: #b9a2c9; }   /* 淡紫 —— 脚本 */
.nt-unknown { background: #6f6862; }

.nlegend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-5);
  font-size: var(--fs-xs);
  color: var(--muted);
}
.nlegend span { display: inline-flex; align-items: center; gap: var(--sp-2); }
.nlegend i { width: 8px; height: 8px; border-radius: 1px; display: inline-block; }

/* ── 7.13 提示词 / 产出正文 ─────────────────────────────────
   内容含 Markdown，由 Md 渲染成元素；纯文本行靠 pre-wrap 保留换行
   （分镜脚本的排版就是靠换行撑的，压平会很乱）。 */
.prompt-body {
  font-size: var(--fs-sm);
  line-height: 1.9;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-word;
  font-variant-numeric: tabular-nums;
}
.prompt-body--long {
  max-height: 420px;
  overflow-y: auto;
  padding-right: var(--sp-3);
}

.prompt-body p { margin: 0 0 var(--sp-3); }
.prompt-body p:last-child { margin-bottom: 0; }

.prompt-body .md-h1,
.prompt-body .md-h2,
.prompt-body .md-h3,
.prompt-body .md-h4 {
  margin: var(--sp-5) 0 var(--sp-3);
  line-height: 1.4;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.01em;
}
.prompt-body .md-h1 { font-size: var(--fs-lg); }
.prompt-body .md-h2 { font-size: var(--fs-md); }
.prompt-body .md-h3 { font-size: var(--fs-sm); }
.prompt-body .md-h4 { font-size: var(--fs-sm); color: var(--muted); }

.prompt-body strong { color: var(--accent); font-weight: 600; }
.prompt-body em { font-style: italic; color: var(--text); }

.prompt-body ul,
.prompt-body ol { margin: var(--sp-3) 0 var(--sp-4); padding-left: var(--sp-5); }
.prompt-body li { margin: 3px 0; }

.prompt-body blockquote {
  margin: var(--sp-4) 0;
  padding: var(--sp-3) var(--sp-4);
  border-left: 2px solid var(--accent-dim);
  background: rgba(232, 160, 82, .05);
  color: var(--muted);
}
.prompt-body blockquote p { margin: 0; }

.prompt-body hr { margin: var(--sp-5) 0; border: 0; border-top: 1px solid var(--line); }

.prompt-body .md-code {
  padding: 1px 5px;
  border-radius: var(--r-xs);
  background: rgba(255, 255, 255, .07);
  font-size: .9em;
  color: #e8c88f;
}
.prompt-body .md-pre {
  margin: var(--sp-4) 0;
  padding: var(--sp-4);
  white-space: pre-wrap;
  word-break: break-word;
  background: #0b0a09;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: var(--fs-xs);
  line-height: 1.75;
}
.prompt-body .md-pre code { background: none; padding: 0; color: var(--text-2); font-size: inherit; }
.prompt-body .md-code__lang {
  display: inline-block;
  margin-bottom: var(--sp-2);
  font-size: var(--fs-2xs);
  color: var(--faint);
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* 要点列表里的原文片段：行内渲染，不产生块级标题 */
.points > li .md-h1, .points > li .md-h2,
.points > li .md-h3, .points > li .md-h4 {
  display: inline;
  margin: 0;
  font-size: inherit;
  color: inherit;
}
.points strong { color: var(--accent); }

/* ── 7.14 工作流分类块（总览页）───────────────────────────── */
.wcat { margin: var(--sp-6) 0 0; }
.wcat__h {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin: 0 0 var(--sp-3);
  padding-top: 0;
  background-image: none;
  font-size: var(--fs-xl);
}
.wcat__n {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-md);
  color: var(--accent);
}
.wcat__meta { font-size: var(--fs-xs); color: var(--faint); font-family: var(--font-mono); }
/* 条形长度 = 该分类最复杂那条的节点数占全站最大值的比例 */
.wcat__bar { height: 1px; background: var(--line); margin: 0 0 var(--sp-4); }
.wcat__bar span {
  display: block;
  height: 1px;
  background: var(--accent-dim);
  transition: background-color var(--dur-base) var(--ease-soft);
}
.wcat:hover .wcat__bar span { background: var(--accent); }
.wcat__more { margin: var(--sp-3) 0 0; font-size: var(--fs-xs); }

/* ── 7.15 无限画布栏目（首页）─────────────────────────────── */
.canvas-brief { display: flex; gap: var(--sp-7); flex-wrap: wrap; align-items: flex-start; }
.canvas-brief__l { flex: 1 1 360px; min-width: 0; }
.canvas-brief__l .nbar { margin-top: 0; }
.canvas-brief__l .note { margin: var(--sp-3) 0 0; }
.canvas-brief__r { flex: 0 1 300px; }

.canvas-brief__link {
  display: block;
  padding: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: inherit;
  transition: border-color var(--dur-fast) var(--ease-soft),
              background-color var(--dur-fast) var(--ease-soft);
}
.canvas-brief__link:hover { border-color: var(--accent-dim); background: var(--accent-soft); }
.canvas-brief__t { display: block; color: var(--text); font-size: var(--fs-sm); font-weight: 500; }
.canvas-brief__link:hover .canvas-brief__t { color: var(--accent); }
.canvas-brief__d {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: var(--fs-xs);
  line-height: 1.7;
}

/* ── 7.16 上下条导航 ──────────────────────────────────────── */
.pager-nav {
  display: flex;
  gap: var(--sp-5);
  margin: var(--sp-7) 0 0;
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
}
.pager-nav__side { flex: 1 1 0; min-width: 0; }
.pager-nav__side--r { text-align: right; }
.pager-nav__a {
  display: block;
  font-size: var(--fs-sm);
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease-soft);
}
.pager-nav__a:hover { color: var(--accent); }
.pager-nav__a span {
  display: block;
  font-size: var(--fs-2xs);
  color: var(--faint);
  font-family: var(--font-mono);
  letter-spacing: .08em;
  margin-bottom: 3px;
}

.pager {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin: var(--sp-7) 0 0;
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
}
.pager a, .pager span {
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: var(--fs-xs);
  font-family: var(--font-mono);
  color: var(--muted);
}
.pager a:hover { border-color: var(--accent-dim); color: var(--accent); }
.pager [aria-current] {
  background: var(--accent-soft);
  border-color: var(--accent-dim);
  color: var(--accent);
}

/* ── 7.17 图片与主视觉 ────────────────────────────────────── */
.figure { margin: var(--sp-5) 0 0; }
.figure img { width: 100%; border: 1px solid var(--line); border-radius: var(--r-sm); }
.figure figcaption {
  margin-top: var(--sp-3);
  font-size: var(--fs-xs);
  color: var(--faint);
  line-height: 1.75;
}

/* 主视觉：固定高度当成一条横幅，而不是放任竖图撑满首屏。
   词页的配图常是 3:4 竖图，不裁的话一张图就吃掉整个首屏 ——
   编辑风里图片是「插图」，不是「海报」。object-position 偏上是因为
   人物/主体通常在中上部，居中裁容易切到脸。 */
.hero-img {
  margin: var(--sp-5) 0 var(--sp-6);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
  height: 320px;
}
.hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
}

/* ── 7.18 提示块与来源 ────────────────────────────────────── */
.pitfalls { display: grid; gap: var(--sp-3); margin: var(--sp-5) 0; }
.pitfall {
  padding: var(--sp-4);
  border-left: 2px solid var(--accent-dim);
  background: rgba(232, 160, 82, .045);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: var(--fs-sm);
  color: var(--text-2);
}

.credit {
  font-size: var(--fs-xs);
  color: var(--faint);
  margin: var(--sp-5) 0;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
}

.shots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--sp-4);
}

/* =============================================================================
   8. 动效 —— 一次编排好的入场，胜过一堆零散微交互
   ============================================================================= */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: no-preference) {
  /* 首屏五组错峰：面包屑 → 标题 → 导语 → 数据条 → 引导条 */
  .crumb, h1, .lead, .stats, .cta--top, .page-head > * {
    animation: rise var(--dur-slow) var(--ease-out) backwards;
  }
  .crumb      { animation-delay: 0ms; }
  h1          { animation-delay: 70ms; }
  .lead       { animation-delay: 150ms; }
  .stats      { animation-delay: 230ms; }
  .cta--top   { animation-delay: 310ms; }

  .page-head > *:nth-child(1) { animation-delay: 0ms; }
  .page-head > *:nth-child(2) { animation-delay: 100ms; }
  .page-head > *:nth-child(3) { animation-delay: 200ms; }
  .page-head > *:nth-child(4) { animation-delay: 300ms; }

  /* 卡片：只给前 12 个错峰，长列表滚动时不会闪成一片 */
  .cards > *:nth-child(-n+12) { animation: rise var(--dur-slow) var(--ease-out) backwards; }
  .cards > *:nth-child(1) { animation-delay: 40ms; }
  .cards > *:nth-child(2) { animation-delay: 80ms; }
  .cards > *:nth-child(3) { animation-delay: 120ms; }
  .cards > *:nth-child(4) { animation-delay: 160ms; }
  .cards > *:nth-child(5) { animation-delay: 200ms; }
  .cards > *:nth-child(6) { animation-delay: 240ms; }
  .cards > *:nth-child(7) { animation-delay: 280ms; }
  .cards > *:nth-child(8) { animation-delay: 320ms; }
  .cards > *:nth-child(n+9) { animation-delay: 360ms; }
}

/* 滚动驱动动画：渐进增强，不支持的浏览器直接静态显示（内容不受影响） */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .sect, .tpl, .figure {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 8% cover 30%;
    }
  }
}

/* 降级：系统关了动效就全关 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =============================================================================
   9. 响应式
   ============================================================================= */

/* ── ≤1024px：收起侧栏 ──────────────────────────────────── */
@media (max-width: 1024px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: var(--sp-7); }
  .side {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--sp-5);
  }
  .side__sec { margin-bottom: 0; }
}

/* ── ≤768px：导航换行、数据条两列 ───────────────────────── */
@media (max-width: 768px) {
  .site-head { position: static; height: auto; }
  .site-head__in {
    flex-wrap: wrap;
    gap: var(--sp-2);
    padding-top: var(--sp-3);
    padding-bottom: var(--sp-3);
  }
  .site-nav {
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;   /* 横向滚动导航隐藏滚动条 */
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .nav-cta { margin-left: 0; }

  main { padding: var(--sp-5) 0 var(--sp-8); }

  :root { --fs-data: 34px; }

  .stats__i {
    flex: 1 1 44%;
    min-width: 0;
    padding: var(--sp-4) var(--sp-4) var(--sp-4) 0;
  }
  .stats__i:nth-child(odd) { padding-left: 0; }
  .stats__i:nth-child(odd)::before { display: none; }
  .stats__i:nth-child(n+3) { border-top: 1px solid var(--line); padding-top: var(--sp-4); }

  .cards {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--sp-4) var(--sp-3);
  }
  .row { flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); }

  .cta { padding: var(--sp-5); gap: var(--sp-4); }
  .btn { width: 100%; }

  .pager-nav { flex-direction: column; gap: var(--sp-4); }
  .pager-nav__side--r { text-align: left; }

  h2 { font-size: var(--fs-xl); margin-top: var(--sp-7); }
  .layout > div > .stats { margin-bottom: var(--sp-6); }
}

/* ── ≤480px：数据条保持两列（之前堆成一列，6 项吃掉整个首屏）────── */
@media (max-width: 480px) {
  :root { --fs-data: 30px; }

  .wrap { padding: 0 var(--sp-4); }

  .stats__i {
    flex: 1 1 44%;
    min-width: 0;
    padding: var(--sp-4) var(--sp-3) var(--sp-4) 0;
  }
  .stats__i + .stats__i { padding-left: var(--sp-3); }

  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-img { height: 220px; }
}

/* ── 打印：暗色翻成可读的浅色 ─────────────────────────── */
@media print {
  body { background: #fff; color: #111; }
  body::before, body::after { display: none; }
  .site-head, .site-foot, .cta, .pager, .pager-nav, .side { display: none; }
  .prompt-body--long { max-height: none; overflow: visible; }
  a { color: #111; }
}
