/* ═══════════════════════════════════════════════════════════════════════════
   网络协会官网 · 艺术方向 v3「SPECIMEN SHEET / 图纸标本」

   决策来源（ui-ux-pro-max 检索）：
     · e-ink-paper      → 暖纸白为绝对主背景、噪点、明确 no gradients
     · bauhaus          → 直角(radius 0)、硬投影 6px 6px 0、点阵纸、900 字重、机械按压
     · editorial-grid-magazine → 非对称栅格、编辑式排版、印刷感
   动效来源（ui-animation）：
     · 只动 transform / opacity / color；:active 0ms 即时反馈
     · enter cubic-bezier(.22,1,.36,1)、expo 用于揭示、move 用于滑动
     · 循环动画滚出视口暂停；JS 动画单独判断 reduced-motion
     · 不引入 GSAP/Motion：这是一致性更好的零依赖实现

   三条纪律：
     1. 暖纸白是主背景。墨黑只用于一条沉浸带和文字。橙红只做实心色块。
     2. 没有渐变、没有泛光、没有毛玻璃。色彩靠**面积对比**说话。
     3. 直角、硬投影、刻度尺、字符注记——这是本设计的识别特征，不要改成圆角卡片。

   严格 CSP：本文件不含内联样式，页面里也不允许 style="…"；JS 只用 CSSOM。
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────  1. 字体（自托管）  ───────────────────────── */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("/assets/fonts/jetbrains-mono-latin.woff2") format("woff2");
}

/* ─────────────────────────  2. 令牌  ───────────────────────── */
:root {
  /* 主色：暖纸白承载一切 */
  --paper: #f5f3ed;
  --paper-2: #edeadf; /* 纸灰：次级区块 */
  --paper-3: #e3dfd2;
  --ink: #17191b; /* 墨黑：文字 + 唯一沉浸带 */
  --ink-2: #22262a; /* 墨黑抬高面 */
  --grey: #d9d6cd; /* 辅助灰 */
  --flame: #fa593d; /* 活力橙红：只做实心色块 */
  --flame-2: #e64a2e;

  --on-ink: #f5f3ed;
  --on-ink-muted: #a8a49a;

  /* 文字（纸面上） */
  --text: var(--ink);
  --text-muted: #54585b; /* 6.1:1 */
  --text-faint: #6e7276; /* 4.6:1，最小的元信息 */
  /* 文字（墨黑上） */
  --text-ink-muted: #a8a49a; /* 7.5:1 */
  /* 橙红在纸面上只有 2.9:1，所以文字用的橙红要更深 */
  --flame-text: #be3618; /* 5.1:1 */

  --rule: rgba(23, 25, 27, 0.16);
  --rule-soft: rgba(23, 25, 27, 0.09);
  --rule-ink: rgba(245, 243, 237, 0.2);

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
    "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei UI", "Helvetica Neue", Arial,
    sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", SFMono-Regular, "Cascadia Mono", Consolas,
    "Liberation Mono", Menlo, monospace;

  /* ── v2 兼容别名：其余页面在第二阶段重做前仍用这些名字 ── */
  --dark: var(--ink);
  --dark-elevated: var(--ink-2);
  --dark-3: #2c3134;
  --on-dark: var(--on-ink);
  --on-dark-muted: var(--on-ink-muted);
  --border-dark: var(--rule-ink);
  --paper-muted: var(--paper-2);
  --on-paper: var(--ink);
  --on-paper-muted: var(--text-muted);
  --border-light: var(--rule);
  --accent: var(--flame);
  --accent-hover: var(--flame-2);
  --accent-ink: var(--on-ink);
  --accent-on-light: var(--flame-text);
  --text-on-dark: var(--on-ink);
  --text-on-light: var(--ink);

  /* 动效 */
  --motion: 1;
  --ease-enter: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-move: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur-press: 0.1s;
  --dur-hover: calc(0.15s * var(--motion));
  --dur-color: 0.2s;
  --dur-enter: calc(0.4s * var(--motion));
  --dur-stagger: calc(0.5s * var(--motion));
  --dur-reveal: calc(0.6s * var(--motion));
  --dur-display: calc(0.9s * var(--motion));
  --dur-panel: calc(0.28s * var(--motion));

  /* 布局 */
  --wrap: 1320px;
  --gutter: clamp(20px, 4vw, 56px);
  --measure: 66ch;
  --nav-h: 64px;
  --sec-pad: clamp(64px, 8vw, 132px);
  --shadow: 6px 6px 0 0 var(--ink);
  --shadow-lg: 10px 10px 0 0 var(--ink);
  --shadow-flame: 6px 6px 0 0 var(--flame);
}

/* ─────────────────────────  3. 基础  ───────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem; /* 17px */
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 点阵纸：整站的底纹，也是「图纸」身份的来源（bauhaus 的 dot grid） */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(23, 25, 27, 0.13) 1px, transparent 1px);
  background-size: 26px 26px;
  background-position: -1px -1px;
  opacity: 0.55;
}

body > * {
  position: relative;
  z-index: 1;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

ul,
ol,
dl,
dd,
figure,
blockquote,
details {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

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

svg {
  display: block;
}

img {
  border-style: none;
}

code,
kbd,
samp,
time {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

::selection {
  background: var(--flame);
  color: var(--ink);
}

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

/* ─────────────────────────  4. 图纸元件  ───────────────────────── */

/* 刻度尺：短刻度 12px 一档，长刻度 60px 一档 */
.ruler {
  height: 10px;
  color: var(--rule);
  background-image: repeating-linear-gradient(
      90deg,
      currentColor 0 1.5px,
      transparent 1.5px 60px
    ),
    repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 12px);
  background-size: 100% 10px, 100% 5px;
  background-repeat: repeat-x;
  background-position: bottom left, bottom left;
}

.ruler--ink {
  color: var(--rule-ink);
}

/* 图纸抬头：编号牌 + 元信息 */
.sheet-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px clamp(16px, 3vw, 40px);
  padding-bottom: 14px;
}

.plate-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.plate-tag--flame {
  background: var(--flame);
  border-color: var(--flame);
  color: var(--ink);
}

.plate-tag--ink {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

/* 墨黑沉浸带里的编号牌 */
.plate-tag--on-ink {
  border-color: var(--rule-ink);
  color: var(--on-ink);
}

.lead {
  max-width: var(--measure);
}

.sheet-meta {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

.sheet-meta--ink {
  color: var(--text-ink-muted);
}

.spacer {
  margin-left: auto;
}

/* 噪点：极细颗粒，纸的手感 */
.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='150' height='150' filter='url(%23n)'/%3E%3C/svg%3E");
}

.grain--ink {
  opacity: 0.07;
}

/* ─────────────────────────  5. 布局  ───────────────────────── */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--sec-pad);
}

.grid12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 26px;
}

.col--wide {
  grid-column: 1 / span 7;
}
.col--half {
  grid-column: 1 / span 6;
}
.col--side {
  grid-column: 8 / span 5;
}
.col--side4 {
  grid-column: 9 / span 4;
}

/* v2 页面仍在用的表面类 */
.section--paper {
  background: var(--paper);
  color: var(--ink);
}
.section--muted {
  background: var(--paper-2);
  color: var(--ink);
}
.section--dark {
  background: var(--ink);
  color: var(--on-ink);
}
.section--elevated {
  background: var(--ink-2);
  color: var(--on-ink);
}

/* ─────────────────────────  6. 排版  ───────────────────────── */
.prose {
  max-width: var(--measure);
  color: var(--text-muted);
  font-size: 1.0625rem;
  line-height: 1.8;
}

.section--dark .prose,
.section--elevated .prose,
.band .prose {
  color: var(--text-ink-muted);
}

.prose strong {
  color: inherit;
  font-weight: 700;
}

.prose p + p {
  margin-top: 1em;
}

.prose a {
  color: var(--flame-text);
  border-bottom: 1px solid currentColor;
}

.section--dark .prose a,
.band .prose a {
  color: var(--flame);
}

.h2 {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.lead {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-muted);
}

.mono {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.section--dark .mono,
.band .mono {
  color: var(--text-ink-muted);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 10px 16px;
  background: var(--flame);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.8125rem;
}

.skip:focus {
  left: 10px;
  top: 10px;
}

.ico {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: square;
  transition: transform var(--dur-hover) var(--ease-enter);
}

/* ─────────────────────────  7. 导航  ───────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--nav-h);
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
}

.nav__bar {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 100%;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.nav__logo {
  display: block;
  width: 30px;
  height: 30px;
  border-radius: 0; /* 直角：与本设计的几何语言一致 */
}

.nav__name {
  font-size: 0.9375rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.nav__links {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
  margin-left: auto;
}

.nav__links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 13px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
  touch-action: manipulation;
  transition: color var(--dur-color) ease;
}

.nav__links a[aria-current="page"] {
  color: var(--ink);
}

/* 当前页：底部一条实心橙红短线（不做圆角药丸） */
.nav__marker {
  position: absolute;
  left: 0;
  bottom: 12px;
  width: var(--w, 0px);
  height: 3px;
  background: var(--flame);
  transform: translate3d(var(--x, 0px), 0, 0);
  transition: transform var(--dur-panel) var(--ease-move), opacity var(--dur-color) ease;
  opacity: 0;
}

.nav__marker.is-active {
  opacity: 1;
}

.nav__cta {
  flex: 0 0 auto;
  margin-left: 16px;
}

.progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: var(--flame);
}

.burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  touch-action: manipulation;
}

.burger span:first-child {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  transition: background-color var(--dur-panel) var(--ease-enter);
}

.burger span:first-child::before,
.burger span:first-child::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: currentColor;
  transition: transform var(--dur-panel) var(--ease-enter);
}

.burger span:first-child::before {
  top: -5px;
}
.burger span:first-child::after {
  top: 5px;
}
.burger[aria-expanded="true"] span:first-child {
  background: transparent;
}
.burger[aria-expanded="true"] span:first-child::before {
  transform: translateY(5px) rotate(45deg);
}
.burger[aria-expanded="true"] span:first-child::after {
  transform: translateY(-5px) rotate(-45deg);
}

/* ─────────────────────────  8. 按钮：直角 + 硬投影 + 机械按压  ───────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 0 24px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: var(--shadow);
  transition: transform var(--dur-hover) var(--ease-enter),
    box-shadow var(--dur-hover) var(--ease-enter), background-color var(--dur-color) ease,
    color var(--dur-color) ease;
}

/* 橙红填充上必须用墨黑字：纸白对橙红只有 2.87:1，不达标。
   墨黑对橙红是 5.5:1 —— 顺带也是包豪斯式的"实色块 + 黑字"观感。 */
.btn--flame {
  background: var(--flame);
  border-color: var(--ink);
  color: var(--ink);
  font-weight: 700;
}

.btn--ink {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-ink);
  box-shadow: 6px 6px 0 0 var(--flame);
}

.btn--sm {
  min-height: 40px;
  padding: 0 16px;
  font-size: 0.875rem;
  box-shadow: 4px 4px 0 0 var(--ink);
}

.btn--lg {
  min-height: 58px;
  padding: 0 30px;
  font-size: 1rem;
}

.btn--bare {
  box-shadow: none;
  border-color: var(--rule);
}

/* 机械按压：位移 3px 并撤掉投影（bauhaus 的 press）*/
.btn:active {
  transform: translate(3px, 3px);
  box-shadow: none;
}

.section--dark .btn,
.band .btn {
  border-color: var(--on-ink);
}

.section--dark .btn:not(.btn--flame, .btn--ink),
.band .btn:not(.btn--flame, .btn--ink) {
  background: transparent;
  color: var(--on-ink);
  box-shadow: 6px 6px 0 0 rgba(245, 243, 237, 0.28);
}

/* ─────────────────────────  9. 链接  ───────────────────────── */
.link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 500;
}

.link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 2px;
  background: var(--flame);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform var(--dur-hover) var(--ease-enter);
}

.link--flame {
  color: var(--flame-text);
}

.section--dark .link--flame,
.band .link--flame {
  color: var(--flame);
}

/* ─────────────────────────  10. 首屏：图纸标本  ───────────────────────── */
.hero {
  position: relative;
  padding-top: clamp(26px, 3.4vw, 44px);
  padding-bottom: clamp(34px, 4.4vw, 60px);
}

/* 首屏抬头 */
.hero__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ink);
}

/* 超大标题：每个字是一栏，字下面带刻度与注记 */
.display {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(18px, 2.6vw, 40px);
  border-bottom: 1px solid var(--ink);
}

.display__char {
  position: relative;
  display: flex;
  flex-direction: column;
  padding-bottom: 12px;
  border-right: 1px solid var(--rule);
}

.display__char:last-child {
  border-right: 0;
}

.display__glyph {
  display: block;
  font-size: clamp(3.4rem, 19.5vw, 15.5rem);
  font-weight: 900;
  /* 行高必须 ≥ 1：CJK 字形占满 em 框，0.8x 会被 overflow:hidden 削掉上下缘 */
  line-height: 1;
  letter-spacing: -0.06em;
  /* 首屏逐字遮罩揭示：每字一个 overflow 容器 */
  overflow: hidden;
}

.display__glyph > span {
  display: block;
}

.display__rule {
  margin-top: 10px;
  height: 8px;
  color: var(--rule);
  background-image: repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 8px);
  background-size: 100% 8px;
  background-position: bottom left;
}

.display__label {
  display: block;
  margin-top: 8px;
  padding-right: 8px;
  font-family: var(--mono);
  font-size: clamp(0.625rem, 2.4vw, 0.75rem);
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.display__no {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 0.625rem;
  color: var(--text-faint);
}

/* 首屏下半：主张 + 入口色块 */
.hero__foot {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(22px, 2.6vw, 36px);
  align-items: start;
  margin-top: clamp(22px, 3vw, 36px);
}

/* hello world 装饰模块占三分之二 */
.hero__lab {
  grid-column: 1 / span 8;
  min-width: 0;
}

/* 站内入口与主 CTA 占三分之一 */
.hero__side {
  grid-column: 9 / span 4;
  display: grid;
  gap: 18px;
  align-content: start;
  min-width: 0;
}


.hero__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero__actions .btn {
  width: 100%;
}

/* 橙红色块：站内入口。整块实心，靠面积说话 */
.hero__plate {
  background: var(--flame);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}

.hero__plate-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(23, 25, 27, 0.28);
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.07em;
}

.entries {
  display: grid;
}

.entries a,
.entries li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid rgba(23, 25, 27, 0.18);
  font-size: 0.9375rem;
  color: var(--ink);
  transition: background-color var(--dur-color) ease;
}

.entries > *:last-child {
  border-bottom: 0;
}

.entries b {
  font-weight: 600;
}

.entries em {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-style: normal;
  color: rgba(23, 25, 27, 0.62);
}

/* ─────────────────────────  11. 沉浸带：Network Playground  ───────────────────────── */
.band {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--on-ink);
  padding-block: clamp(40px, 5vw, 72px);
}

.band__head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 26px;
  align-items: end;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule-ink);
}

.band__title {
  grid-column: 1 / span 6;
  font-size: clamp(1.9rem, 4.4vw, 3.2rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
}

.band__title em {
  font-style: normal;
  color: var(--flame);
}

.band__sub {
  grid-column: 8 / span 5;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-ink-muted);
}

.pg {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 26px;
  margin-top: clamp(22px, 3vw, 36px);
}

.pg__stage {
  grid-column: 1 / span 12;
  overflow-x: auto;
  scrollbar-width: thin;
}

.pg__svg {
  width: 100%;
  min-width: 620px;
  height: auto;
  overflow: visible;
}

/* 拓扑元件 */
.pg__bus {
  stroke: var(--rule-ink);
  stroke-width: 1;
}

.pg__drop {
  stroke: var(--rule-ink);
  stroke-width: 1;
  transition: stroke var(--dur-color) ease;
}

.pg__node {
  cursor: pointer;
  touch-action: manipulation;
}

.pg__node rect {
  fill: var(--ink);
  stroke: var(--rule-ink);
  stroke-width: 1;
  transition: stroke var(--dur-color) ease, fill var(--dur-color) ease;
}

.pg__node--wide rect {
  fill: transparent;
}

.pg__node text {
  font-family: var(--mono);
  font-size: 15px;
  fill: var(--on-ink);
  transition: fill var(--dur-color) ease;
}

.pg__node .pg__sub {
  font-size: 12px;
  fill: var(--text-ink-muted);
}

.pg__node:hover rect,
.pg__node:focus-visible rect,
.pg__node.is-active rect {
  stroke: var(--flame);
}

.pg__node.is-hot rect {
  fill: var(--flame);
  stroke: var(--flame);
}

.pg__node.is-hot text {
  fill: var(--ink);
}

.pg__node.is-hot .pg__sub {
  fill: rgba(23, 25, 27, 0.66);
}

/* 未参与当前场景的节点：整体压暗，形成"这次不走这里"的信息 */
.pg__node.is-idle rect {
  stroke: var(--rule-soft);
}

.pg__node.is-idle text {
  fill: #6f6c64;
}

.pg__node.is-idle .pg__sub {
  fill: #5d5a54;
}

.pg__route {
  fill: none;
  stroke: var(--flame);
  stroke-width: 2;
  stroke-linecap: square;
}

.pg__packet {
  fill: var(--flame);
}

/* 面板：读数 + 转录 */
.pg__panel {
  grid-column: 1 / span 12;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 26px;
  align-items: start;
}

.pg__ctrl {
  grid-column: 1 / span 4;
}

.pg__scenarios {
  display: grid;
  gap: 8px;
}

.pg__scenario {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--rule-ink);
  border-radius: 0;
  background: transparent;
  color: var(--on-ink);
  font-family: inherit;
  font-size: 0.9375rem;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 4px 4px 0 0 rgba(245, 243, 237, 0.22);
  transition: transform var(--dur-hover) var(--ease-enter),
    box-shadow var(--dur-hover) var(--ease-enter), background-color var(--dur-color) ease,
    color var(--dur-color) ease, border-color var(--dur-color) ease;
}

.pg__scenario b {
  font-weight: 600;
}

.pg__scenario em {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-style: normal;
  color: var(--text-ink-muted);
}

.pg__scenario[aria-selected="true"] {
  background: var(--flame);
  border-color: var(--flame);
  color: var(--ink);
}

.pg__scenario[aria-selected="true"] em {
  color: rgba(23, 25, 27, 0.66);
}

.pg__scenario:active {
  transform: translate(3px, 3px);
  box-shadow: none;
}

/* 当前步骤读数，用橙红左边线强调 */
.pg__readout {
  grid-column: 5 / span 8;
  border-left: 3px solid var(--flame);
  padding-left: clamp(14px, 1.6vw, 22px);
}

.pg__step {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.pg__step-no {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--flame);
}

.pg__cmd {
  font-family: var(--mono);
  font-size: clamp(0.875rem, 1.5vw, 1.0625rem);
  line-height: 1.5;
  color: var(--on-ink);
  word-break: break-word;
}

.pg__note {
  margin-top: 8px;
  font-size: 0.9375rem;
  color: var(--text-ink-muted);
}

.pg__log {
  display: grid;
  gap: 4px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--rule-ink);
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.7;
  color: var(--text-ink-muted);
  min-height: 7em;
}

.pg__log b {
  font-weight: 400;
  color: var(--flame);
}

/* ─────────────────────────  12. 作品：编辑式跨栏  ───────────────────────── */
.work {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 26px;
  align-items: end;
  padding-block: clamp(34px, 4.4vw, 64px);
  border-bottom: 1px solid var(--ink);
}

.work__idx {
  grid-column: 1 / span 2;
  align-self: start;
  font-family: var(--mono);
  font-size: clamp(2.6rem, 6.4vw, 5.2rem);
  font-weight: 400;
  line-height: 0.8;
  letter-spacing: -0.05em;
  color: var(--ink);
}

.work__body {
  grid-column: 3 / span 5;
}

.work__kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.07em;
  color: var(--flame-text);
}

.work__title {
  margin-top: 12px;
  font-size: clamp(1.5rem, 3.1vw, 2.4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.work__desc {
  margin-top: 14px;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text-muted);
}

.work__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
}

.tag {
  padding: 4px 9px;
  border: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

.work__plate {
  grid-column: 9 / span 4;
  position: relative;
  border: 1px solid var(--ink);
  background: var(--paper-2);
  box-shadow: var(--shadow);
  transition: transform var(--dur-hover) var(--ease-enter),
    box-shadow var(--dur-hover) var(--ease-enter);
}

/* 跨满整行的墨黑图版 */
.work--bleed {
  border-bottom: 0;
}

.work--bleed .work__idx {
  grid-column: 1 / span 2;
}

.work--bleed .work__body {
  grid-column: 3 / span 6;
  align-self: end;
}

.work__bleedplate {
  grid-column: 1 / span 12;
  position: relative;
  margin-top: 26px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--on-ink);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* 工程制图：正交数据流 */
.flow {
  padding: clamp(18px, 2.2vw, 26px);
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 2;
  color: var(--text-muted);
  overflow-x: auto;
}

.work__bleedplate .flow {
  color: var(--text-ink-muted);
}

.flow > div {
  white-space: nowrap;
}

.flow b {
  font-weight: 400;
  color: var(--ink);
}

.work__bleedplate .flow b {
  color: var(--on-ink);
}

.flow__arrow {
  color: var(--rule);
}

.flow__arrow span {
  color: var(--flame-text);
}

.work__bleedplate .flow__arrow span {
  color: var(--flame);
}

/* 界面示意（设计过的占位，不是空白灰块） */
.mock {
  border: 1px solid var(--ink);
  background: var(--paper);
}

.work__bleedplate .mock {
  border-color: var(--rule-ink);
  background: transparent;
}

.mock__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.work__bleedplate .mock__bar {
  border-bottom-color: var(--rule-ink);
  color: var(--text-ink-muted);
}

.mock__bar em {
  font-style: normal;
  color: var(--flame-text);
}

.work__bleedplate .mock__bar em {
  color: var(--flame);
}

.mock__body {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.mock__row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  font-size: 0.875rem;
}

.work__bleedplate .mock__row {
  border-color: var(--rule-ink);
}

.mock__idx {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--flame-text);
}

.work__bleedplate .mock__idx {
  color: var(--flame);
}

.mock__meta {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.work__bleedplate .mock__meta {
  color: var(--text-ink-muted);
}

.mock__title {
  font-size: 0.9375rem;
  color: inherit;
}

.mock__field {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--rule);
}

.mock__label {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.05em;
  color: var(--text-faint);
}

.mock__value {
  font-size: 0.875rem;
}

/* 窄屏提示：图是横向可滚的，得让人知道 */
.pg__hint {
  display: none;
  margin-top: 6px;
  color: var(--text-ink-muted);
}

@media (max-width: 1080px) {
  .pg__hint {
    display: block;
  }
}

/* 作品：镜像排布，让三件作品不是同一个模子 */
.work--mirror .work__plate {
  grid-column: 1 / span 4;
}

.work--mirror .work__body {
  grid-column: 6 / span 5;
}

.work--mirror .work__idx {
  grid-column: 11 / span 2;
  text-align: right;
}

/* ─────────────────────────  12.5 代码标本：首屏的装饰件  ───────────────────────── */
/* 一块墨黑编辑器图版，落在超大标题下面当装饰。
   没有标题、没有说明、没有课程口径——它就是一块会自己打字的图版。 */
.code-strip {
  margin-top: 0;
}

.code-strip .code-spec__body {
  min-height: 15rem;
}

.code-spec__plate {
  position: relative;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--on-ink);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.code-spec__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule-ink);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--text-ink-muted);
}

.code-spec__file {
  color: var(--on-ink);
}

.code-spec__lang {
  margin-left: auto;
  color: var(--flame);
}

.code-spec__body {
  padding: 18px 18px 20px;
  font-family: var(--mono);
  font-size: 0.875rem; /* 等宽只用 12/14/16 三档 */
  line-height: 1.6;
  font-weight: 400;
  overflow-x: auto;
  transition: opacity var(--dur-panel) var(--ease-out);
}

.code-spec__body.is-switching {
  opacity: 0;
}

.code-line {
  display: flex;
  gap: 18px;
  min-height: 1.6em;
  white-space: pre;
}

.code-ln {
  flex: 0 0 2em;
  text-align: right;
  color: #4c5852;
  user-select: none;
}

.code-line--ghost .code-ln {
  color: #2b3430;
}

.code-src {
  flex: 1 1 auto;
  color: var(--on-ink);
}

.tok-kw {
  color: var(--flame);
}

.tok-num {
  color: var(--flame);
}

.tok-str {
  color: #e3b87a;
}

.tok-com {
  color: #8a8e90;
}

.code-caret {
  display: inline-block;
  width: 0.5em;
  height: 1.1em;
  margin-left: 1px;
  vertical-align: text-bottom;
  background: var(--flame);
  animation: caret 1.05s steps(1) infinite;
}

@keyframes caret {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

.code-spec__out {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  padding: 13px 18px;
  border-top: 1px solid var(--rule-ink);
  background: rgba(0, 0, 0, 0.28);
  font-family: var(--mono);
  font-size: 0.875rem;
  opacity: 0;
  transition: opacity var(--dur-panel) var(--ease-out);
}

.code-spec__out.is-on {
  opacity: 1;
}

.code-spec__prompt {
  color: var(--flame);
}

.code-spec__cmd {
  color: var(--text-ink-muted);
}

.code-spec__result {
  color: var(--on-ink);
}

/* ─────────────────────────  12.6 作品：真实登记与比过的赛  ───────────────────────── */
.works {
  margin-top: clamp(30px, 3.8vw, 52px);
}

.works__title {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ink);
  font-size: clamp(1.1rem, 1.9vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.works__title em {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--flame-text);
}

.work-row {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) minmax(0, 15rem);
  gap: clamp(14px, 2.4vw, 32px);
  align-items: baseline;
  padding: clamp(14px, 1.8vw, 20px) 2px;
  border-bottom: 1px solid var(--rule);
  transition: background-color var(--dur-color) ease, box-shadow var(--dur-color) ease;
}

.work-row__no {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--flame-text);
}

.work-row__name {
  font-size: clamp(1.05rem, 2vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

/* 仓库条目：名字下面跟一句真实说明 */
.work-row__body {
  display: grid;
  gap: 7px;
}

.work-row__desc {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.work-row__type {
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--text-muted);
  text-align: right;
}

.works__note {
  margin-top: 14px;
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--text-muted);
}

@media (hover: hover) and (pointer: fine) {
  .work-row:hover {
    background: rgba(250, 89, 61, 0.07);
    box-shadow: inset 3px 0 0 0 var(--flame);
  }
}

@media (max-width: 880px) {
  .code-strip .code-spec__body {
    min-height: 11rem;
    font-size: 0.8125rem;
  }

  .work-row {
    grid-template-columns: 3.5rem minmax(0, 1fr);
    gap: 6px 14px;
  }

  .work-row__type {
    grid-column: 2;
    text-align: left;
  }
}

/* ─────────────────────────  12.7 深浅上下文修正  ─────────────────────────
   第二阶段待重做的页面，仍在浅色区块里复用为墨黑区块写的组件
   （.closing__steps / .flow / .mock / .board__tag），那些组件写死了浅色文字，
   落在纸面上就成了浅字浅底。这里按容器补齐上下文。
   全站文字对比度用 CDP 审计验证：node .tools/cdp-shot.mjs <url> <w> <h> out.png audit=contrast */

/* 步骤列表：纸面与纸灰面上必须用墨黑字 */
.section--paper .closing__steps,
.section--muted .closing__steps {
  border-top-color: var(--rule);
}

.section--paper .closing__steps li,
.section--muted .closing__steps li {
  border-bottom-color: var(--rule);
}

.section--paper .closing__steps b,
.section--muted .closing__steps b {
  color: var(--flame-text);
}

.section--paper .closing__steps span,
.section--muted .closing__steps span {
  color: var(--text-muted);
}

.section--paper .closing__steps strong,
.section--muted .closing__steps strong {
  color: var(--ink);
}

/* 界面示意：纸面底就必须是墨黑字（原来 color: inherit 会继承墨黑区块的浅色） */
.mock__title {
  color: var(--ink);
}

.work__bleedplate .mock__title {
  color: var(--on-ink);
}

.mock__label {
  color: var(--text-muted);
}

/* 数据流：落在墨黑区块上时改浅色 */
.section--dark .flow,
.section--elevated .flow {
  color: var(--text-ink-muted);
}

.section--dark .flow b,
.section--elevated .flow b {
  color: var(--on-ink);
}

.section--dark .flow__arrow,
.section--elevated .flow__arrow {
  color: var(--rule-ink);
}

.section--dark .flow__arrow span,
.section--elevated .flow__arrow span {
  color: var(--flame);
}

/* 状态板标签：深色区块上要提亮 */
.section--dark .board__tag,
.section--elevated .board__tag {
  color: var(--text-ink-muted);
}

/* 章节编号：抬高面也算深色上下文 */
.section--elevated .sec-head__num {
  color: var(--flame);
}

/* 首屏注记编号：4.37:1 不够，提到 6.4:1 */
.display__no {
  color: var(--text-muted);
}

/* 行号槽：2.37:1 太暗，提到 4.87:1（空行槽一样处理，避免疏密不均） */
.code-ln,
.code-line--ghost .code-ln {
  color: #7b8a82;
}

/* ─────────────────────────  13. 其余区块（第二阶段重做前沿用）  ───────────────────────── */
.sec-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 26px;
  align-items: end;
  margin-bottom: clamp(28px, 3.6vw, 52px);
}

.sec-head__num {
  grid-column: 1 / span 2;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--flame-text);
}

.sec-head__title {
  grid-column: 3 / span 7;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  letter-spacing: -0.035em;
}

.sec-head__lead {
  grid-column: 10 / span 3;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.section--dark .sec-head__num,
.band .sec-head__num {
  color: var(--flame);
}

.section--dark .sec-head__lead,
.band .sec-head__lead {
  color: var(--text-ink-muted);
}

.page-head {
  position: relative;
  overflow: hidden;
  padding-top: clamp(40px, 5vw, 76px);
  padding-bottom: clamp(26px, 3.4vw, 46px);
  border-bottom: 1px solid var(--ink);
}

.page-head__idx {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--flame-text);
}

.section--dark .page-head__idx,
.band .page-head__idx {
  color: var(--flame);
}

.page-head__title {
  margin-top: 16px;
  font-size: clamp(2.2rem, 6vw, 4.6rem);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.page-head__lead {
  margin-top: 18px;
  max-width: 58ch;
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-muted);
}

.section--dark .page-head__lead,
.band .page-head__lead {
  color: var(--text-ink-muted);
}

/* 状态板 */
.board {
  border-top: 1px solid var(--ink);
}

.section--dark .board,
.section--elevated .board {
  border-top-color: var(--rule-ink);
}

.board__row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.7fr) minmax(0, 1.1fr) auto;
  gap: clamp(14px, 2.4vw, 34px);
  align-items: baseline;
  padding: 16px 2px;
  border-bottom: 1px solid var(--rule);
  transition: background-color var(--dur-color) ease, box-shadow var(--dur-color) ease;
}

.section--dark .board__row,
.section--elevated .board__row {
  border-bottom-color: var(--rule-ink);
}

.board__name {
  font-size: 1.0625rem;
  font-weight: 700;
}

.board__addr {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
  word-break: break-all;
}

.board__note {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.section--dark .board__addr,
.section--dark .board__note,
.section--elevated .board__addr,
.section--elevated .board__note {
  color: var(--text-ink-muted);
}

.board__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  white-space: nowrap;
}

.board__tag i {
  width: 7px;
  height: 7px;
  background: var(--flame);
}

/* 技术目录 */
.tech {
  border-top: 1px solid var(--ink);
}

.tech__item {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 4fr) minmax(0, 4.4fr);
  gap: clamp(16px, 2.6vw, 40px);
  align-items: baseline;
  padding: clamp(20px, 2.4vw, 30px) 2px;
  border-bottom: 1px solid var(--rule);
  transition: background-color var(--dur-color) ease;
}

.tech__num {
  font-family: var(--mono);
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--flame-text);
}

.tech__name {
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.tech__name small {
  display: block;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.tech__desc {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-muted);
}

.tech__cmd {
  display: inline-block;
  margin-top: 10px;
  padding: 3px 8px;
  border: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--ink);
}

/* 拓扑（v2 组件，第二阶段重做） */
.topo {
  position: relative;
  overflow-x: auto;
  scrollbar-width: thin;
}

/* 纸面上的拓扑：连线与描边改用深色，节点仍是墨黑小块（技术物件落在纸上） */
.section--paper .topo__link,
.section--muted .topo__link {
  stroke: var(--rule);
}

.section--paper .topo__node rect,
.section--muted .topo__node rect {
  stroke: var(--rule);
}

.section--paper .topo__legend,
.section--muted .topo__legend {
  border-top-color: var(--rule);
}

.section--paper .topo__legend a,
.section--muted .topo__legend a {
  border-bottom-color: var(--rule);
  color: var(--text-muted);
}

.section--paper .topo__legend b,
.section--muted .topo__legend b {
  color: var(--ink);
}

.topo__svg {
  width: 100%;
  min-width: 470px;
  height: auto;
  overflow: visible;
}

.topo__link {
  stroke: var(--rule-ink);
  stroke-width: 1;
  fill: none;
  transition: stroke var(--dur-color) ease;
}

.topo__link.is-active {
  stroke: var(--flame);
}

.topo__node rect {
  fill: var(--ink-2);
  stroke: var(--rule-ink);
  stroke-width: 1;
  transition: stroke var(--dur-color) ease;
}

.topo__node text {
  font-family: var(--mono);
  font-size: 16px;
  fill: var(--on-ink);
}

.topo__node .topo__sub {
  font-size: 13px;
  fill: var(--text-ink-muted);
}

.topo__node:hover rect,
.topo__node:focus-visible rect,
.topo__node.is-active rect {
  stroke: var(--flame);
}

.topo__packet {
  fill: var(--flame);
}

.topo__legend {
  display: grid;
  margin-top: 20px;
  border-top: 1px solid var(--rule-ink);
}

.topo__legend a {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--rule-ink);
  font-size: 0.9375rem;
  color: var(--text-ink-muted);
  transition: color var(--dur-color) ease;
}

.topo__legend b {
  color: var(--on-ink);
  font-weight: 600;
  min-width: 9em;
}

.topo__legend em {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-style: normal;
}

/* 收束 */
.closing {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--on-ink);
  padding-block: clamp(64px, 8vw, 120px);
}

.closing__title {
  font-size: clamp(2.4rem, 7.4vw, 6.2rem);
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.closing__title em {
  font-style: normal;
  color: var(--flame);
}

.closing__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 26px;
  align-items: end;
  margin-top: clamp(26px, 3.4vw, 44px);
}

.closing__lede {
  grid-column: 1 / span 5;
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-ink-muted);
}

.closing__actions {
  grid-column: 1 / span 5;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 22px;
}

.closing__steps {
  grid-column: 7 / span 6;
  display: grid;
  border-top: 1px solid var(--rule-ink);
}

.closing__steps li {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
  padding: 14px 2px;
  border-bottom: 1px solid var(--rule-ink);
}

.closing__steps b {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--flame);
}

.closing__steps span {
  font-size: 1rem;
  color: var(--text-ink-muted);
}

.closing__steps strong {
  display: block;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--on-ink);
}

/* FAQ / 数据表 / 拉引文 / 提示 / 图注 */
.faq__item {
  border-bottom: 1px solid var(--rule);
}

.faq__item summary {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 16px 2px;
  font-size: 1.0625rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__item summary::before {
  content: "+";
  font-family: var(--mono);
  font-size: 0.875rem;
  color: var(--flame-text);
}

.faq__item[open] summary::before {
  content: "−";
}

.faq__item p {
  padding: 0 0 18px 26px;
  max-width: var(--measure);
  font-size: 1rem;
  line-height: 1.78;
  color: var(--text-muted);
}

.spec {
  border-top: 1px solid var(--ink);
}

.section--dark .spec,
.section--elevated .spec,
.band .spec,
.work__bleedplate .spec {
  border-top-color: var(--rule-ink);
}

.spec > div {
  display: grid;
  grid-template-columns: minmax(110px, 0.7fr) minmax(0, 2.3fr);
  gap: 18px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--rule);
}

.section--dark .spec > div,
.section--elevated .spec > div,
.band .spec > div {
  border-bottom-color: var(--rule-ink);
}

.spec dt {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.spec dd {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.section--dark .spec dt,
.section--dark .spec dd,
.section--elevated .spec dt,
.section--elevated .spec dd,
.band .spec dt,
.band .spec dd {
  color: var(--text-ink-muted);
}

.pullquote {
  border-left: 3px solid var(--flame);
  padding-left: clamp(18px, 2.2vw, 30px);
  max-width: 20ch;
  font-size: clamp(1.4rem, 2.8vw, 2.1rem);
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: -0.03em;
}

.pullquote cite {
  display: block;
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-style: normal;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.note {
  padding: clamp(16px, 2vw, 22px);
  border: 1px solid var(--ink);
  border-left: 6px solid var(--flame);
  font-size: 0.9375rem;
  line-height: 1.78;
  color: var(--text-muted);
  background: var(--paper-2);
}

.section--dark .note,
.band .note {
  border-color: var(--rule-ink);
  border-left-color: var(--flame);
  background: transparent;
  color: var(--text-ink-muted);
}

.note strong {
  color: var(--ink);
}

.section--dark .note strong,
.band .note strong {
  color: var(--on-ink);
}

.media__frame {
  aspect-ratio: 16 / 10;
  border: 1px dashed var(--rule);
  display: grid;
  place-items: center;
  padding: 22px;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.9;
  color: var(--text-muted);
}

.media__figcaption {
  margin-top: 10px;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.section--dark .media__figcaption,
.band .media__figcaption {
  color: var(--text-ink-muted);
}

.space-top {
  margin-top: 28px;
}

.contact__mail {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.contact__mail a {
  font-family: var(--mono);
  word-break: break-all;
}

/* ─────────────────────────  13.5 v2 类名兼容  ─────────────────────────
   其余 6 个内页与 404 在第二阶段重做前仍用 v2 的类名。
   这里只补旧名字，不碰 v3 自己的名字，避免同一个规则写两遍。
   第二阶段重做那些页面时应当整块删掉。 */
.btn--accent {
  background: var(--flame);
  border-color: var(--ink);
  color: var(--ink);
  font-weight: 700;
}

.btn--accent:hover {
  background: var(--flame-2);
}

.btn--outline {
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.section--dark .btn--outline,
.band .btn--outline {
  background: transparent;
  color: var(--on-ink);
}

.btn--quiet {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: var(--text-muted);
}

.noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='150' height='150' filter='url(%23n)'/%3E%3C/svg%3E");
}

.noise--light {
  opacity: 0.07;
}

.link--accent {
  color: var(--flame-text);
}

/* ─────────────────────────  14. 页脚  ───────────────────────── */
.site-footer {
  position: relative;
  overflow: hidden;
  padding-top: clamp(40px, 5vw, 72px);
  background: var(--ink);
  color: var(--on-ink);
}

.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(0, 1fr));
  gap: clamp(22px, 3vw, 48px);
  padding-bottom: clamp(26px, 3.4vw, 46px);
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.footer__brand img {
  width: 40px;
  height: 40px;
  border-radius: 0;
}

.footer__brand p {
  font-size: 1.0625rem;
  font-weight: 800;
}

.footer__note {
  margin-top: 14px;
  max-width: 34ch;
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--text-ink-muted);
}

.footer__col h2 {
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--text-ink-muted);
}

.footer__col a {
  display: block;
  padding: 5px 0;
  font-size: 0.9375rem;
  color: var(--text-ink-muted);
  transition: color var(--dur-color) ease;
}

.footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-block: 20px;
  border-top: 1px solid var(--rule-ink);
  font-size: 0.875rem;
  color: var(--text-ink-muted);
}

.footer__base a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-ink-muted);
  transition: color var(--dur-color) ease;
}

/* ─────────────────────────  15. Hover（仅真指针设备）  ───────────────────────── */
@media (hover: hover) and (pointer: fine) {
  .nav__links a:hover {
    color: var(--ink);
  }

  .btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-lg);
  }

  .btn:active {
    transform: translate(3px, 3px);
    box-shadow: none;
  }

  .btn--flame:hover {
    background: var(--flame-2);
  }

  .link:hover::after {
    transform: scaleX(1);
  }

  .link:hover .ico {
    transform: translateX(4px);
  }

  .burger:hover {
    background: var(--grey);
  }

  .entries a:hover,
  .entries li:hover {
    background: rgba(23, 25, 27, 0.1);
  }

  .board__row:hover {
    background: rgba(23, 25, 27, 0.05);
    box-shadow: inset 3px 0 0 0 var(--flame);
  }

  .section--dark .board__row:hover,
  .section--elevated .board__row:hover {
    background: rgba(245, 243, 237, 0.05);
  }

  .tech__item:hover {
    background: rgba(250, 89, 61, 0.07);
  }

  /* 作品图版：抬起 + 硬投影加深，标题转橙红 */
  .work:hover .work__plate,
  .work:focus-within .work__plate {
    transform: translate(-4px, -4px);
    box-shadow: var(--shadow-lg);
  }

  .work:hover .work__title,
  .work:focus-within .work__title {
    color: var(--flame-text);
  }

  .topo__legend a:hover,
  .footer__col a:hover,
  .footer__base a:hover {
    color: var(--on-ink);
  }

  .pg__scenario:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 0 rgba(245, 243, 237, 0.32);
  }

  .pg__scenario:active {
    transform: translate(3px, 3px);
    box-shadow: none;
  }
}

/* ─────────────────────────  16. 首屏编排与滚动揭示  ───────────────────────── */
/* 首屏：抬头 → 标题四字逐字 → 主张 → 按钮 → 色块 → 装置 */
.js .hero-anim [data-anim] {
  opacity: 0;
  transition: opacity 420ms var(--ease-enter), transform 520ms var(--ease-enter);
}

.js .hero-anim .display__glyph > span {
  display: block;
  transform: translateY(102%);
  transition: transform var(--dur-display) var(--ease-expo);
}

.js .hero-anim .display__char:nth-child(1) .display__glyph > span {
  transition-delay: 60ms;
}
.js .hero-anim .display__char:nth-child(2) .display__glyph > span {
  transition-delay: 150ms;
}
.js .hero-anim .display__char:nth-child(3) .display__glyph > span {
  transition-delay: 240ms;
}
.js .hero-anim .display__char:nth-child(4) .display__glyph > span {
  transition-delay: 330ms;
}

.js .hero-anim [data-anim="claim"] {
  transform: translateY(12px);
  transition-delay: 520ms;
}

.js .hero-anim [data-anim="cta"] {
  transform: translateY(12px);
  transition-delay: 620ms;
}

.js .hero-anim [data-anim="plate"] {
  transform: translateY(16px);
  transition-delay: 720ms;
}

.js .hero-anim.is-ready [data-anim] {
  opacity: 1;
  transform: none;
}

.js .hero-anim.is-ready .display__glyph > span {
  transform: translateY(0);
}

/* 滚动揭示：只给少数标题与图版，进 84% 触发一次 */
.js [data-reveal].pending {
  opacity: 0;
}

.js [data-reveal="mask"].pending {
  clip-path: inset(0 0 100% 0);
}

.js [data-reveal="up"].pending {
  transform: translateY(16px);
}

.js [data-reveal].is-in {
  opacity: 1;
  clip-path: inset(0 0 -6% 0);
  transform: none;
  transition: opacity var(--dur-reveal) var(--ease-expo),
    clip-path var(--dur-reveal) var(--ease-expo), transform var(--dur-reveal) var(--ease-expo);
}

.js [data-stagger].pending > * {
  opacity: 0;
  transform: translateY(10px);
}

.js [data-stagger].is-in > * {
  opacity: 1;
  transform: none;
  transition: opacity var(--dur-stagger) var(--ease-enter),
    transform var(--dur-stagger) var(--ease-enter);
  transition-delay: calc(var(--i, 0) * 60ms);
}

/* ─────────────────────────  17. 响应式  ───────────────────────── */
@media (max-width: 1080px) {
  .hero__lab,
  .hero__side {
    grid-column: 1 / span 12;
  }

  .hero__side {
    margin-top: 24px;
  }

  .band__title,
  .band__sub {
    grid-column: 1 / span 12;
  }

  .band__sub {
    margin-top: 10px;
  }

  .pg__ctrl,
  .pg__readout {
    grid-column: 1 / span 12;
  }

  .pg__readout {
    margin-top: 18px;
  }

  .work__idx {
    grid-column: 1 / span 12;
  }

  .work__body {
    grid-column: 1 / span 12;
    margin-top: 14px;
  }

  .work__plate {
    grid-column: 1 / span 12;
    margin-top: 20px;
  }

  .work--bleed .work__body {
    grid-column: 1 / span 12;
  }

  .sec-head__num,
  .sec-head__title,
  .sec-head__lead {
    grid-column: 1 / span 12;
  }

  .sec-head__lead {
    margin-top: 8px;
  }

  .col--wide,
  .col--half,
  .col--side,
  .col--side4 {
    grid-column: 1 / span 12;
  }

  .closing__lede,
  .closing__actions,
  .closing__steps {
    grid-column: 1 / span 12;
  }

  .closing__steps {
    margin-top: 28px;
  }

  .board__row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 18px;
  }

  .board__addr,
  .board__note {
    grid-column: 1 / span 2;
  }

  .tech__item,
  .lab__item {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

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

@media (max-width: 880px) {
  .nav__marker {
    display: none;
  }

  .nav__links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    z-index: 55;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: calc(100svh - var(--nav-h));
    overflow-y: auto;
    margin-left: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--paper);
    border-bottom: 1px solid var(--ink);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity var(--dur-panel) var(--ease-drawer),
      transform var(--dur-panel) var(--ease-drawer), visibility var(--dur-panel) var(--ease-drawer);
  }

  html.js .nav__links.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }

  .nav__links a {
    min-height: 52px;
    padding: 14px 2px;
    border-bottom: 1px solid var(--rule);
    font-size: 1.0625rem;
  }

  .nav__links a:last-child {
    border-bottom: 0;
  }

  html:not(.js) .nav__links {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }

  html:not(.js) .burger {
    display: none;
  }

  .burger {
    display: inline-flex;
  }

  .nav__cta {
    margin-left: auto;
  }
}

@media (max-width: 640px) {
  .display {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .display__label {
    font-size: 0.5625rem;
    letter-spacing: 0;
  }

  .display__no {
    display: none;
  }

  .display__glyph {
    font-size: clamp(3rem, 20vw, 5.4rem);
  }

  .hero__actions .btn,
  .closing__actions .btn {
    width: 100%;
  }

  .wrap {
    padding-inline: 18px;
  }

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

  .footer__base {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ─────────────────────────  18. reduced-motion  ───────────────────────── */
@media (prefers-reduced-motion: reduce) {
  :root {
    --motion: 0;
  }

  html {
    scroll-behavior: auto;
  }

  .js .hero-anim [data-anim],
  .js .hero-anim .display__glyph > span,
  .js [data-reveal].pending,
  .js [data-stagger].pending > * {
    opacity: 1;
    clip-path: none;
    transform: none;
    transition: none;
  }

  /* 按压反馈保留（是即时状态反馈，不是空间运动） */
  .btn:active {
    transform: none;
  }
}

/* ─────────────────────────  19. 打印  ───────────────────────── */
@media print {
  .site-nav,
  .progress,
  .pg,
  .band,
  .hero__actions,
  .closing__actions,
  body::before {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .section,
  .closing {
    padding-block: 16px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   20. 核心成员页（/team/）· 图纸标本语言
       成员图版（直角 + 硬投影照片）、部门注记版（本页重点，大字号 + 刻度尺）、
       证书墙（实线框缩略图 + 灯箱）、照片轮播。
       遵守三条纪律：无渐变、无泛光、无圆角；橙红只做实心块与文字色 --flame-text。
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 成员区：头像图版 + 简介表 ── */
.team-member {
  align-items: start;
  margin-top: 6px;
}
.team-ava {
  grid-column: 1 / span 4;
  margin: 0;
}
.team-member__body {
  grid-column: 5 / span 8;
  min-width: 0;
}
.team-ava__ph {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--ink);
  background: var(--paper-2);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.team-ava__ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.team-ava figcaption {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.team-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.team-spec dd strong {
  color: var(--ink);
  font-weight: 700;
}

/* ── 荣誉年表（孟东浩 31 项） ── */
.team-honors {
  margin-top: clamp(34px, 4vw, 54px);
  border-top: 1px solid var(--ink);
}
.team-honors__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
  padding: 12px 0 10px;
  border-bottom: 1px solid var(--rule);
}
.team-honors__head h4 {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.team-honors__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 0 clamp(22px, 3vw, 44px);
  margin-top: 6px;
}
.team-honors__list li {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.team-honors__list b {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
  color: var(--flame-text);
  padding-top: 4px;
  white-space: nowrap;
}
.team-honors__list span {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-muted);
}
.team-honors__list em {
  display: block;
  margin-top: 2px;
  font-style: normal;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}

/* 荣誉年表抽屉：默认露 6 项（手机 4 项），与证书墙同一套按钮 */
.team-honors__list.is-collapsed li {
  display: none;
}
.team-honors__list.is-collapsed li:nth-child(-n + 6) {
  display: grid;
}
@media (max-width: 640px) {
  .team-honors__list.is-collapsed li:nth-child(n + 5) {
    display: none;
  }
  .team-honors__list li {
    padding: 7px 0;
  }
}

/* ── 部门注记版：本页的视觉重点 ── */
.team-dept {
  margin-top: clamp(34px, 4vw, 54px);
  padding: clamp(22px, 3vw, 34px) clamp(20px, 3vw, 34px) clamp(24px, 3vw, 36px);
  border: 1px solid var(--ink);
  border-left: 8px solid var(--flame);
  background: var(--paper);
  box-shadow: var(--shadow-lg);
}
.section--muted .team-dept {
  background: var(--paper);
}
.team-dept__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px clamp(14px, 2.4vw, 26px);
}
.team-dept__head .plate-tag--flame {
  background: var(--flame);
  border-color: var(--flame);
  color: var(--ink);
}
.team-dept__name {
  font-size: clamp(1.9rem, 4.2vw, 3.1rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
}
.team-dept__sub {
  width: 100%;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--flame-text);
  font-weight: 600;
}
.team-dept .ruler {
  margin: 16px 0 4px;
}
.team-dept__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(24px, 3vw, 44px);
}
.team-dept__cell {
  padding: 14px 0 16px;
  border-bottom: 1px solid var(--rule);
}
.team-dept__cell--wide {
  grid-column: 1 / -1;
}
.team-dept__cell dt {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  color: var(--text-faint);
}
.team-dept__cell dt::before {
  content: "■ ";
  color: var(--flame);
  font-size: 0.55rem;
  vertical-align: 2px;
}
.team-dept__cell dd {
  margin-top: 6px;
  font-size: 0.9688rem;
  line-height: 1.8;
  color: var(--text-muted);
  max-width: 62ch;
}

/* ── 证书墙 ── */
.team-certs {
  margin-top: clamp(34px, 4vw, 54px);
}
.team-certs__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ink);
}
.team-certs__head h4 {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.team-cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
  margin-top: 20px;
}
.team-cert {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow);
  cursor: zoom-in;
  text-align: left;
  transition: transform var(--dur-hover) var(--ease-enter),
    box-shadow var(--dur-hover) var(--ease-enter);
}
.team-cert:hover,
.team-cert:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 0 var(--ink);
}
.team-cert:active {
  transform: translate(3px, 3px);
  box-shadow: none;
}
.team-cert img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  padding: 10px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--rule);
}
.team-cert__cap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 7px 10px;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--text-muted);
  text-align: center;
}

/* 抽屉：默认只露出第一行，按钮展开（JS 可用才折叠，见 team.js） */
.team-cert-grid.is-collapsed li {
  display: none;
}
.team-cert-grid.is-collapsed li:nth-child(-n + 5) {
  display: block;
}
.team-certs__toggle {
  margin-top: 18px;
  padding: 10px 20px;
  border: 1px solid var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--ink);
  cursor: pointer;
  transition: transform var(--dur-hover) var(--ease-enter),
    box-shadow var(--dur-hover) var(--ease-enter), background var(--dur-color);
}
.team-certs__toggle:hover {
  background: var(--flame);
}
.team-certs__toggle:active {
  transform: translate(3px, 3px);
  box-shadow: none;
}
.team-certs__toggle[hidden] {
  display: none;
}

/* GitHub 主页截图图版（郭京昊） */
.team-shot {
  margin: clamp(30px, 4vw, 48px) 0 0;
  padding: 10px;
  border: 1px solid var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow-lg);
}
.team-shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
}
.team-shot figcaption {
  margin-top: 10px;
  font-size: 0.6875rem;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

/* ── 照片轮播 ── */
.team-car__stage {
  /* 叠放所有幻灯，用透明度切换 */
  display: grid;
}
.team-car__slide {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity calc(0.5s * var(--motion)) var(--ease-enter);
}
.team-car__slide.is-on {
  opacity: 1;
}
.team-car__dots {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.team-car__dot {
  width: 14px;
  height: 14px;
  padding: 0;
  border: 1px solid var(--ink);
  background: var(--paper);
  cursor: pointer;
}
.team-car__dot.is-on {
  background: var(--flame);
  border-color: var(--ink);
}
.team-car__dot:hover {
  background: var(--flame-2);
}
@media (hover: hover) and (pointer: fine) {
  .team-cert:hover img {
    background: var(--paper-3);
  }
}

/* ── 灯箱 ── */
.team-lb {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 48px);
  background: rgba(23, 25, 27, 0.94);
}
.team-lb[hidden] {
  display: none;
}
.team-lb__img {
  max-width: min(100%, 1080px);
  max-height: 76vh;
  border: 1px solid var(--rule-ink);
  background: var(--paper);
  box-shadow: 10px 10px 0 0 rgba(250, 89, 61, 0.9);
}
.team-lb__meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(14px, 3vh, 30px);
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 0 clamp(56px, 8vw, 96px);
  text-align: center;
}
.team-lb__cap {
  color: var(--on-ink);
  font-size: 0.9375rem;
  line-height: 1.6;
}
.team-lb__cnt {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  color: var(--text-ink-muted);
}
.team-lb__btn {
  position: absolute;
  width: 46px;
  height: 46px;
  border: 1px solid var(--rule-ink);
  background: var(--ink-2);
  color: var(--on-ink);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.team-lb__btn:hover {
  background: var(--flame);
  border-color: var(--flame);
  color: var(--ink);
}
.team-lb__btn--close {
  top: 18px;
  right: 18px;
}
.team-lb__btn--prev {
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
}
.team-lb__btn--next {
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
}
/* 灯箱打开时锁住页面滚动（开在 <html> 上，避免布局跳动） */
html.has-lb {
  overflow: hidden;
}

/* ── 响应式 ── */
@media (max-width: 1080px) {
  .team-cert-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
  }
  /* 折叠态在窄屏只露一行（4 件）：显式隐藏多余项，n+4 的显示规则管不住 n+5 */
  .team-cert-grid.is-collapsed li:nth-child(n + 5) {
    display: none;
  }
}
@media (max-width: 880px) {
  .team-ava,
  .team-member__body {
    grid-column: 1 / -1;
  }
  .team-ava {
    max-width: 420px;
  }
  .team-dept__grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .team-lb__btn--prev {
    left: 8px;
  }
  .team-lb__btn--next {
    right: 8px;
  }
  .team-lb__meta {
    bottom: 10px;
  }
}
@media (max-width: 640px) {
  .team-cert-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  /* 折叠态在手机上只露一行（2 件） */
  .team-cert-grid.is-collapsed li:nth-child(n + 3) {
    display: none;
  }
  .team-cert__cap {
    font-size: 0.7rem;
    min-height: 40px;
  }
  .team-lb__btn {
    width: 40px;
    height: 40px;
  }
}

/* ── 减少动态效果 ── */
@media (prefers-reduced-motion: reduce) {
  .team-car__slide,
  .team-cert {
    transition: none;
  }
  .team-cert:hover,
  .team-cert:focus-visible {
    transform: none;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   书藏 · 电子书（/books/ 书架 + /books/diary-1/ 翻页阅读器）
   说明：阅读器里的纸张光影用极窄的灰阶渐变模拟实物书的书脊 / 翻页折影，
   属于对扫描原件的物理仿真，不是装饰性渐变色块——站面 UI 仍然只用实色。
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --flip-dur: calc(0.85s * var(--motion)); /* 摊开双页的一翻 */
  --flip-dur-1: calc(0.52s * var(--motion)); /* 单页卡翻的一翻 */
  --ease-flip: cubic-bezier(0.3, 0.08, 0.25, 1);
  --bface: #f8f6ef; /* 纸页底色：比纸白再暖半档 */
  --bface-rule: rgba(23, 25, 27, 0.28);
}

/* ── 书架页 ── */
.book-shelf {
  display: grid;
  gap: clamp(24px, 4vw, 48px);
}

.book-card {
  display: grid;
  grid-template-columns: minmax(220px, 330px) 1fr;
  gap: clamp(20px, 3.4vw, 48px);
  align-items: center;
  padding: clamp(18px, 2.6vw, 36px);
  background: #fbfaf5;
  border: 1px solid var(--ink);
  box-shadow: var(--shadow);
}

.book-card--pending {
  background: transparent;
  border-style: dashed;
  border-color: var(--text-faint);
  box-shadow: none;
}

.book-card__cover {
  position: relative;
  display: block;
  border: 1px solid var(--ink);
  box-shadow: 6px 6px 0 0 var(--ink);
  background: #fff;
  transition: transform var(--dur-hover) var(--ease-enter),
    box-shadow var(--dur-hover) var(--ease-enter);
}

.book-card__cover img {
  display: block;
  width: 100%;
  height: auto;
}

.book-card__cover:hover,
.book-card__cover:focus-visible {
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0 0 var(--ink);
}

.book-card__open {
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 8px 12px;
  background: var(--flame);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--dur-hover) var(--ease-enter),
    transform var(--dur-hover) var(--ease-enter);
}

.book-card__cover:hover .book-card__open,
.book-card__cover:focus-visible .book-card__open {
  opacity: 1;
  transform: none;
}

.book-card__cover--empty {
  aspect-ratio: 1000 / 1477;
  display: grid;
  place-items: center;
  background: var(--paper-2);
  border: 1px dashed var(--text-faint);
  box-shadow: none;
  cursor: default;
}

.book-card__pending-num {
  font-family: var(--mono);
  font-size: clamp(1rem, 2vw, 1.3rem);
  letter-spacing: 0.35em;
  color: var(--text-faint);
}

.book-card__title {
  margin: 14px 0 10px;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 800;
}

.book-card__note {
  max-width: 52ch;
  color: var(--text-muted);
}

.book-card__spec {
  margin: 18px 0 22px;
  max-width: 560px;
}

.book-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
}

.book-about {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(24px, 4vw, 60px);
  align-items: start;
}

.book-about__prose p {
  max-width: 62ch;
  color: var(--text-muted);
}

.book-about__prose p + p {
  margin-top: 1em;
}

@media (max-width: 860px) {
  .book-about {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .book-card {
    grid-template-columns: 1fr;
  }
  .book-card__cover {
    max-width: 280px;
    margin-inline: auto;
  }
}

/* ── 阅读器骨架 ── */
.reader {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--nav-h));
  min-height: 460px;
  background: var(--paper);
}

.reader__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--on-ink);
  border-bottom: 1px solid var(--rule-ink);
}

.reader__bar .btn,
.reader__dock .btn {
  border-color: var(--rule-ink);
  background: transparent;
  color: var(--on-ink);
}

.reader__bar .btn {
  min-height: 36px;
  padding: 0 12px;
  font-size: 0.8125rem;
  box-shadow: none;
}

.reader__bar .btn:hover,
.reader__bar .btn:focus-visible {
  background: rgba(245, 243, 237, 0.1);
}

.reader__bar .btn:active {
  transform: translate(1px, 1px);
}

.reader__bar .btn.is-on {
  background: var(--flame);
  border-color: var(--flame);
  color: var(--ink);
  font-weight: 700;
}

.reader__home {
  flex: none;
}

.reader__name {
  flex: 1;
  min-width: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
}

.reader__tools {
  display: flex;
  flex: none;
  align-items: center;
  gap: 6px;
}

.reader__zoomer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.reader__zoomval {
  min-width: 62px;
  font-variant-numeric: tabular-nums;
}

.reader__stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.reader__desk {
  position: absolute;
  inset: 0;
  display: flex;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.reader__desk::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.reader__desk::-webkit-scrollbar-thumb {
  background: var(--grey);
  border: 2px solid var(--paper);
}

.reader__sizer {
  position: relative;
  flex: none;
  margin: auto;
  perspective: 2400px;
}

/* ── 书体 ── */
.book {
  position: absolute;
  box-shadow: var(--shadow-lg);
  transition: transform var(--flip-dur) var(--ease-flip);
}

/* 书脊：摊开时中缝的凹影（对纸本的物理仿真） */
.book__spine {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 56px;
  transform: translateX(-50%);
  background: linear-gradient(
    90deg,
    rgba(23, 25, 27, 0) 0%,
    rgba(23, 25, 27, 0.15) 40%,
    rgba(23, 25, 27, 0.22) 50%,
    rgba(23, 25, 27, 0.15) 60%,
    rgba(23, 25, 27, 0) 100%
  );
  pointer-events: none;
}

/* 书口：纸页叠出来的侧沿细线 */
.book::before,
.book::after {
  content: '';
  position: absolute;
  top: 2px;
  bottom: 2px;
  width: 5px;
  background: repeating-linear-gradient(
    180deg,
    rgba(23, 25, 27, 0.2) 0 1px,
    rgba(23, 25, 27, 0) 1px 3px
  );
  z-index: calc(10 + 59 + 1);
  pointer-events: none;
  transition: opacity var(--flip-dur) var(--ease-flip);
}

/* 合书的一侧没有纸页叠，对应侧沿线随翻页淡出 */
.book.is-closed-start::after,
.book.is-closed-end::before {
  opacity: 0;
}

.book::before {
  right: -5px;
}

.book::after {
  left: -5px;
}

.leaf {
  position: absolute;
  top: 0;
  left: 50%;
  width: 50%;
  height: 100%;
  transform-origin: left center;
  transform-style: preserve-3d;
  transition: transform var(--flip-dur) var(--ease-flip);
}

.leaf.is-turning {
  will-change: transform;
}

.leaf.is-flipped {
  transform: rotateY(-180deg);
}

/* 单页版式：一张绕中轴翻的叶子 */
.leaf--sheet {
  left: 0;
  width: 100%;
  transform-origin: 50% 50%;
  transition-duration: var(--flip-dur-1);
}

.bface {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--bface);
  border: 1px solid var(--bface-rule);
  box-shadow: inset 0 0 22px rgba(23, 25, 27, 0.07);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.bface--back {
  transform: rotateY(180deg);
}

.bface img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.bface__num {
  position: absolute;
  bottom: 7px;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  color: rgba(23, 25, 27, 0.52);
  pointer-events: none;
}

.bface--front .bface__num {
  right: 13px;
}

.bface--back .bface__num {
  left: 13px;
}

/* 空白端页：横线纸 + 收尾注记 */
.bface--blank {
  display: grid;
  place-items: center;
  background: repeating-linear-gradient(
      180deg,
      rgba(23, 25, 27, 0) 0 27px,
      rgba(23, 25, 27, 0.055) 27px 28px
    ),
    var(--bface);
}

.bface__end {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  color: var(--text-faint);
}

/* 翻页折影：翻转中的叶子两缘随动画加深再淡出 */
.leaf.is-turning .bface::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(23, 25, 27, 0.4) 0%,
    rgba(23, 25, 27, 0) 26%,
    rgba(23, 25, 27, 0) 74%,
    rgba(23, 25, 27, 0.4) 100%
  );
  animation: bk-shade var(--flip-dur) var(--ease-flip) both;
  pointer-events: none;
}

.leaf--sheet.is-turning .bface::after {
  animation-duration: var(--flip-dur-1);
}

@keyframes bk-shade {
  0% {
    opacity: 0;
  }
  45% {
    opacity: 0.8;
  }
  100% {
    opacity: 0;
  }
}

/* JS 落位用的瞬时状态：跳页 / 版式切换不播过渡 */
.no-anim,
.no-anim .leaf,
.no-anim .bface {
  transition: none !important;
}

/* 翻页点击热区（覆盖在舞台两侧，缩放时收起） */
.book-hit {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 19%;
  z-index: 30;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.book-hit--prev {
  left: 0;
}

.book-hit--next {
  right: 0;
}

.book-hit:hover,
.book-hit:focus-visible {
  background: rgba(23, 25, 27, 0.05);
}

.reader.is-zoomed .book-hit {
  display: none;
}

/* ── 提示条 / 装载条 ── */
.reader__hint,
.reader__loading {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 32;
  margin: 0;
  padding: 7px 12px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  pointer-events: none;
}

.reader__hint {
  bottom: 14px;
  background: var(--ink);
  color: var(--on-ink);
  border: 1px solid var(--rule-ink);
  opacity: 0.94;
  transition: opacity 0.4s ease;
  white-space: nowrap;
}

.reader__hint.is-hidden {
  opacity: 0;
}

.reader__loading {
  top: 12px;
  background: var(--flame);
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}

.reader__hint[hidden],
.reader__loading[hidden],
.reader__tools [hidden],
.reader-toc[hidden] {
  display: none !important;
}

/* ── 底部操作条 ── */
.reader__dock {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: var(--ink);
  border-top: 1px solid var(--rule-ink);
}

.reader__dock .btn {
  flex: none;
  box-shadow: 4px 4px 0 0 rgba(245, 243, 237, 0.28);
}

.reader__dock .btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.reader__dock .btn:disabled:active {
  transform: none;
  box-shadow: 4px 4px 0 0 rgba(245, 243, 237, 0.28);
}

.reader__slider {
  flex: 1;
  min-width: 80px;
  height: 22px;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}

.reader__slider::-webkit-slider-runnable-track {
  height: 4px;
  background: rgba(245, 243, 237, 0.28);
}

.reader__slider::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -7px;
  background: var(--flame);
  border: 2px solid var(--ink);
  box-shadow: 0 0 0 1px var(--on-ink);
}

.reader__slider::-moz-range-track {
  height: 4px;
  background: rgba(245, 243, 237, 0.28);
}

.reader__slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 0;
  background: var(--flame);
  border: 2px solid var(--ink);
  box-shadow: 0 0 0 1px var(--on-ink);
}

.reader__count {
  flex: none;
  min-width: 8.5em;
  text-align: center;
  white-space: nowrap;
}

/* ── 目录网格 ── */
.reader-toc {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  padding: clamp(10px, 2.4vw, 26px);
  background: rgba(23, 25, 27, 0.62);
}

.reader-toc__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 10px 14px;
  background: var(--paper);
  border: 1px solid var(--ink);
  border-bottom: 0;
}

.reader-toc__head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.reader-toc__head .btn {
  margin-left: auto;
}

.reader-toc__grid {
  position: relative;
  flex: 1;
  overflow: auto;
  padding: 14px;
  background: var(--paper);
  border: 1px solid var(--ink);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 12px;
  align-content: start;
}

.bk-thumb {
  position: relative;
  padding: 0 0 2px;
  border: 1px solid var(--rule);
  background: #fff;
  cursor: pointer;
  transition: transform var(--dur-hover) var(--ease-enter),
    box-shadow var(--dur-hover) var(--ease-enter);
}

.bk-thumb img {
  display: block;
  width: 100%;
  height: auto;
}

.bk-thumb:hover,
.bk-thumb:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 3px 3px 0 0 var(--ink);
}

.bk-thumb.is-current {
  outline: 2px solid var(--flame);
  outline-offset: 1px;
}

.bk-thumb__num {
  display: block;
  padding-top: 3px;
  font-family: var(--mono);
  font-size: 0.625rem;
  text-align: center;
  color: var(--text-muted);
}

/* ── 多端微调 ── */
@media (max-width: 700px) {
  .reader__name {
    display: none;
  }
  .reader__bar {
    justify-content: space-between;
  }
}

@media (max-width: 520px) {
  .reader__count {
    display: none;
  }
  .reader__bar .btn,
  .reader__dock .btn {
    min-height: 38px;
    padding: 0 10px;
  }
  .reader__zoomval {
    min-width: 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .book,
  .leaf,
  .book-card__cover,
  .bk-thumb {
    transition: none;
  }
  .leaf.is-turning .bface::after {
    animation: none;
  }
}
.book-card__body {
  min-width: 0;
}

.book-about__spec {
  margin: 0;
}
