/* ============================================================
   Aishing 项目展示站 — Claude 风格（暖纸底 + 衬线标题 + 珊瑚橙）
   ============================================================ */

@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-italic-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrainsmono-latin.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Serif SC";
  src: url("../fonts/notoserifsc-subset.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans SC";
  src: url("../fonts/notosanssc-subset.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #FAF8F3;
  --bg-alt: #F3EFE6;
  --card: #FFFEFB;
  --ink: #211F1B;
  --ink-2: #5D574C;
  --ink-3: #8A8272;
  --line: #E4DECF;
  --line-soft: #EDE8DA;
  --accent: #D97757;
  --accent-dark: #C15F3C;
  --accent-soft: rgba(217, 119, 87, 0.13);
  --accent-faint: rgba(217, 119, 87, 0.07);
  --olive: #7A8B5C;
  --teal: #4E8B84;
  --gold: #B98A2F;
  --danger: #B5482F;
  --ok: #5B8C5A;
  --warn: #B98A2F;
  --term-bg: #242119;
  --term-ink: #EAE4D3;
  --font-serif: "Newsreader", "Noto Serif SC", "Songti SC", serif;
  --font-sans: "Inter", "Noto Sans SC", "PingFang SC", sans-serif;
  --font-mono: "JetBrains Mono", "Noto Sans SC", "SF Mono", monospace;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(60, 50, 30, 0.05), 0 8px 28px rgba(60, 50, 30, 0.07);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.78;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 28px; }
.mono, code { font-family: var(--font-mono); font-size: 0.86em; }
code {
  background: var(--accent-faint);
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  padding: 0.1em 0.38em;
  color: var(--accent-dark);
  word-break: break-all;
}
strong { font-weight: 600; }
sup { font-size: 0.72em; color: var(--accent-dark); }

/* ---------- 导航 ---------- */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(250, 248, 243, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  max-width: 1040px; margin: 0 auto; padding: 0 28px;
  height: 60px; display: flex; align-items: center; justify-content: space-between;
}
.nav-brand {
  font-family: var(--font-serif); font-weight: 600; font-size: 21px;
  color: var(--ink); text-decoration: none; letter-spacing: 0.01em;
}
.nav-brand-sub {
  font-family: var(--font-sans); font-size: 11.5px; color: var(--ink-3);
  margin-left: 10px; font-weight: 500; letter-spacing: 0.08em;
}
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  font-size: 13.5px; color: var(--ink-2); text-decoration: none;
  padding: 6px 11px; border-radius: 8px; transition: color .18s, background .18s;
}
.nav-links a:hover { color: var(--accent-dark); background: var(--accent-soft); }
@media (max-width: 820px) { .nav-links { display: none; } }

/* ---------- Hero ---------- */
.hero { padding: 158px 0 30px; }
.eyebrow {
  font-size: 13px; letter-spacing: 0.14em; color: var(--accent-dark);
  font-weight: 600; margin-bottom: 22px;
}
.hero-title {
  font-family: var(--font-serif); font-weight: 560;
  font-size: clamp(38px, 5.6vw, 60px);
  line-height: 1.18; letter-spacing: 0.005em;
  margin-bottom: 26px; max-width: 880px;
}
.hero-lede { font-size: 18px; color: var(--ink-2); max-width: 760px; margin-bottom: 46px; }
.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 56px;
}
.stat {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow);
}
.stat-num {
  display: block; font-family: var(--font-serif); font-weight: 600;
  font-size: 36px; line-height: 1.1; color: var(--accent-dark); margin-bottom: 6px;
}
.stat-label { font-size: 12.5px; color: var(--ink-3); line-height: 1.55; display: block; }
@media (max-width: 820px) { .hero-stats { grid-template-columns: repeat(2, 1fr); } }

/* hero 动画 */
.hero-anim-wrap {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; box-shadow: var(--shadow); padding: 26px 18px 14px;
  max-width: 984px; margin: 0 auto;
}
@media (max-width: 1040px) { .hero-anim-wrap { margin: 0 20px; } }
.hero-anim { width: 100%; height: auto; display: block; }
.hero-anim .lane { stroke: var(--line); stroke-width: 2; }
.hero-anim .lane-back { stroke-dasharray: 5 6; }
.hero-anim .hnode rect { fill: var(--bg-alt); stroke: var(--line); }
.hero-anim .hnode-evil rect { fill: var(--accent-soft); stroke: var(--accent); }
.hero-anim .hnode-title {
  font-family: var(--font-sans); font-size: 14.5px; font-weight: 600;
  fill: var(--ink); text-anchor: middle;
}
.hero-anim .hnode-sub { font-size: 11px; fill: var(--ink-3); text-anchor: middle; }
.hero-anim .flow-label { font-size: 12px; fill: var(--ink-3); text-anchor: middle; }
.hero-anim .flow-label-evil { fill: var(--accent-dark); }
.hero-anim .pkt { opacity: 0; }
.hero-anim .pkt rect { fill: var(--ink); }
.hero-anim .pkt text { font-size: 10.5px; fill: #FAF8F3; text-anchor: middle; font-family: var(--font-mono); }
.hero-anim .pkt-req rect { fill: #55503F; }
.hero-anim .pkt-res rect { fill: var(--teal); }
.hero-anim .pkt-poison rect { fill: var(--accent-dark); }
.hero-anim .pkt-out rect { fill: var(--gold); }
.hero-anim .extract rect {
  fill: var(--term-bg); stroke: var(--gold); stroke-width: 1;
  opacity: 0.25; transition: opacity .3s;
}
.hero-anim .extract text {
  font-size: 11.5px; fill: var(--gold); text-anchor: middle; font-family: var(--font-mono);
}
.hero-anim .extract.flash rect { opacity: 1; }

@keyframes pkt-req {
  0%   { opacity: 0; transform: translate(150px, 120px); }
  3%   { opacity: 1; }
  24%  { opacity: 1; transform: translate(810px, 120px); }
  26%  { opacity: 0; transform: translate(810px, 120px); }
  100% { opacity: 0; transform: translate(150px, 120px); }
}
@keyframes pkt-res {
  0%, 26% { opacity: 0; transform: translate(810px, 200px); }
  29%  { opacity: 1; }
  44%  { opacity: 1; transform: translate(552px, 200px); }
  46%  { opacity: 0; transform: translate(552px, 200px); }
  100% { opacity: 0; transform: translate(810px, 200px); }
}
@keyframes pkt-poison {
  0%, 46% { opacity: 0; transform: translate(425px, 200px); }
  49%  { opacity: 1; }
  64%  { opacity: 1; transform: translate(150px, 200px); }
  66%  { opacity: 0; transform: translate(150px, 200px); }
  100% { opacity: 0; transform: translate(425px, 200px); }
}
@keyframes pkt-out {
  0%, 67% { opacity: 0; transform: translate(150px, 120px); }
  70%  { opacity: 1; }
  84%  { opacity: 1; transform: translate(480px, 120px); }
  86%  { opacity: 0; transform: translate(480px, 120px); }
  100% { opacity: 0; transform: translate(150px, 120px); }
}
.pkt-req    { animation: pkt-req    9s linear infinite; }
.pkt-res    { animation: pkt-res    9s linear infinite; }
.pkt-poison { animation: pkt-poison 9s linear infinite; }
.pkt-out    { animation: pkt-out    9s linear infinite; }
@keyframes extract-flash {
  0%, 84% { opacity: 0.25; }
  88%, 96% { opacity: 1; }
  100% { opacity: 0.25; }
}
.hero-anim .extract rect { animation: extract-flash 9s linear infinite; }

/* ---------- 边界声明 ---------- */
.boundary { padding: 40px 0 10px; }
.boundary-card {
  background: var(--accent-faint);
  border: 1px solid rgba(217, 119, 87, 0.35);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 24px 30px;
}
.boundary-title {
  font-family: var(--font-serif); font-size: 20px; font-weight: 600;
  color: var(--accent-dark); margin-bottom: 8px;
}
.boundary-card p { font-size: 14.5px; color: var(--ink-2); }

/* ---------- 章节骨架 ---------- */
.section { padding: 96px 0 30px; }
.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 60px;
}
.sec-eyebrow {
  font-size: 13px; letter-spacing: 0.14em; font-weight: 600;
  color: var(--accent-dark); margin-bottom: 14px;
}
.sec-title {
  font-family: var(--font-serif); font-weight: 560;
  font-size: clamp(30px, 3.8vw, 42px); line-height: 1.25;
  margin-bottom: 30px; max-width: 800px;
}
.prose { max-width: 780px; }
.prose p { margin-bottom: 18px; color: var(--ink-2); }
.prose p:last-child { margin-bottom: 0; }
.sub { margin-top: 64px; }
.sub-title {
  font-family: var(--font-serif); font-weight: 600; font-size: 26px;
  margin-bottom: 18px; display: flex; align-items: baseline; gap: 14px;
}
.sub-no {
  font-family: var(--font-mono); font-size: 14px; color: var(--accent-dark);
  font-weight: 500; background: var(--accent-soft); border-radius: 7px;
  padding: 3px 9px; transform: translateY(-2px);
}
.figure { margin: 34px 0 8px; }
.fig-cap {
  font-size: 13px; color: var(--ink-3); margin-top: 14px; max-width: 780px; line-height: 1.65;
}
.fig-cap code { font-size: 0.92em; }

/* ---------- 图 1: 前提卡片 ---------- */
.prem-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 720px) { .prem-grid { grid-template-columns: 1fr; } }
.prem-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow);
}
.prem-k {
  display: block; font-family: var(--font-serif); font-size: 30px; font-weight: 600;
  color: var(--accent-dark); margin-bottom: 6px;
}
.prem-v { font-size: 13.5px; color: var(--ink-2); line-height: 1.6; display: block; }

/* ---------- 表格 ---------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.cmp-table { border-collapse: collapse; width: 100%; font-size: 13px; min-width: 760px; }
.cmp-table th {
  font-family: var(--font-sans); font-weight: 600; text-align: left;
  padding: 13px 14px; background: var(--bg-alt); color: var(--ink);
  border-bottom: 1px solid var(--line); white-space: nowrap; font-size: 12.5px;
}
.cmp-table td {
  padding: 12px 14px; border-bottom: 1px solid var(--line-soft);
  color: var(--ink-2); vertical-align: top; line-height: 1.55;
}
.cmp-table tr:last-child td { border-bottom: none; }
.cmp-table .row-hl td { background: var(--accent-faint); color: var(--ink); font-weight: 500; }
.cmp-table .row-hl td:first-child { color: var(--accent-dark); font-weight: 600; }
.def-table .def-bad { color: var(--danger); font-weight: 600; white-space: nowrap; }
.def-table .def-mid { color: var(--warn); font-weight: 600; white-space: nowrap; }
.def-table .def-good { color: var(--ok); font-weight: 600; white-space: nowrap; }

/* ---------- 参考文献 ---------- */
.refs { margin-top: 26px; max-width: 780px; }
.refs-title { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.refs-list { padding-left: 0; list-style: none; font-size: 13px; color: var(--ink-3); line-height: 1.8; }
.refs-list em { color: var(--ink-2); }

/* ---------- 图 2: 注入 demo ---------- */
.inject-demo {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px 28px;
}
.inject-row { margin-bottom: 6px; }
.inject-label { font-size: 12.5px; color: var(--ink-3); margin-bottom: 8px; font-weight: 500; }
.inject-arrow {
  font-size: 12.5px; color: var(--accent-dark); margin: 14px 0 16px 6px; font-weight: 500;
}
.code-chip {
  background: var(--term-bg); border-radius: 10px; padding: 13px 18px;
  font-family: var(--font-mono); font-size: 13.5px; color: var(--term-ink);
  overflow-x: auto; white-space: nowrap;
}
.code-chip-long { min-height: 48px; }
.caret {
  display: inline-block; width: 8px; height: 16px; background: var(--accent);
  vertical-align: -3px; margin-left: 2px; animation: caret-blink 0.9s steps(1) infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }
.tk-marker { color: #E0A458; }
.tk-recon { color: #D97757; }
.tk-guard { color: #8FB996; }
.tk-orig { color: #A8C6DF; }
.inject-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.lg {
  font-size: 12px; padding: 4px 12px; border-radius: 999px; font-weight: 500;
  border: 1px solid var(--line);
}
.lg-marker { background: rgba(224, 164, 88, 0.15); color: #96690F; }
.lg-recon { background: var(--accent-soft); color: var(--accent-dark); }
.lg-guard { background: rgba(143, 185, 150, 0.18); color: #4C7A54; }
.lg-orig { background: rgba(168, 198, 223, 0.2); color: #3D6E9E; }

/* ---------- 终端框 ---------- */
.term {
  background: var(--term-bg); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid #39352A;
}
.term-bar {
  display: flex; align-items: center; gap: 7px; padding: 11px 16px;
  background: #2E2A20; border-bottom: 1px solid #39352A;
}
.term-dot { width: 11px; height: 11px; border-radius: 50%; background: #57513F; }
.term-dot:nth-child(1) { background: #C15F3C; }
.term-dot:nth-child(2) { background: #B98A2F; }
.term-dot:nth-child(3) { background: #7A8B5C; }
.term-title { margin-left: 10px; font-size: 12px; color: #8A8272; font-family: var(--font-mono); }
.term-body {
  padding: 18px 20px; font-family: var(--font-mono); font-size: 12.8px;
  line-height: 1.85; color: var(--term-ink); min-height: 150px;
  white-space: pre-wrap; word-break: break-all;
}
.term-static { min-height: 0; }
.term-body .t-dim { color: #8A8272; }
.term-body .t-key { color: #A8C6DF; }
.term-body .t-node { color: #E0A458; }
.term-body .t-out { color: #D3CCB8; }
.term-body .t-goto { color: #8FB996; }

/* ---------- 决策树 ---------- */
.tree-svg { width: 100%; height: auto; display: block; }
.tnode rect {
  fill: var(--card); stroke: var(--line); stroke-width: 1.5;
  transition: fill .35s, stroke .35s;
}
.tnode text {
  font-family: var(--font-mono); font-size: 13px; fill: var(--ink-2);
  text-anchor: middle; transition: fill .35s;
}
.tnode.active rect { fill: var(--accent); stroke: var(--accent-dark); }
.tnode.active text { fill: #FFF8F2; font-weight: 600; }
.tnode.done rect { fill: var(--accent-soft); stroke: var(--accent); }
.tnode.done text { fill: var(--accent-dark); }
.tnode-end rect { fill: var(--bg-alt); }
.tedge line, .tedge path { stroke: var(--line); stroke-width: 1.5; transition: stroke .35s; }
.tedge.active line, .tedge.active path { stroke: var(--accent); stroke-width: 2.5; }
section[id] { scroll-margin-top: 72px; }
.tcond { font-size: 10.5px; fill: var(--ink-3); font-family: var(--font-sans); }
.tree-status {
  margin-top: 10px; font-family: var(--font-mono); font-size: 13px;
  color: var(--accent-dark); background: var(--accent-faint);
  border: 1px solid rgba(217, 119, 87, 0.3); border-radius: 9px;
  padding: 10px 16px; min-height: 42px; display: flex; align-items: center;
}

/* ---------- 分裂视图 ---------- */
.split-view {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.split-head { display: flex; border-bottom: 1px solid var(--line); }
.split-btn {
  flex: 1; padding: 14px 10px; background: var(--bg-alt); border: none;
  font-family: var(--font-sans); font-size: 14px; font-weight: 500; color: var(--ink-3);
  cursor: pointer; transition: background .2s, color .2s;
}
.split-btn:first-child { border-right: 1px solid var(--line); }
.split-btn.active { background: var(--card); color: var(--accent-dark); font-weight: 600; }
.split-pane { padding: 22px 24px; }
.split-pane.hidden { display: none; }
.split-pre {
  font-family: var(--font-mono); font-size: 12.6px; line-height: 1.9;
  white-space: pre-wrap; word-break: break-all;
  background: var(--term-bg); color: var(--term-ink);
  border-radius: 10px; padding: 16px 18px; margin-bottom: 14px;
}
.sp-dim { color: #8A8272; }
.sp-cmd { color: #EAE4D3; }
.sp-mark { color: #E0A458; }
.sp-out { color: #B3AC97; }
.split-note { font-size: 13.5px; color: var(--ink-2); }

/* ---------- 流式改写 demo ---------- */
.stream-demo {
  display: grid; grid-template-columns: 1fr 90px 1fr; gap: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px;
}
.stream-col-title { font-size: 12.5px; color: var(--ink-3); font-weight: 600; margin-bottom: 12px; text-align: center; }
.stream-lane { display: flex; flex-direction: column; gap: 8px; min-height: 240px; }
.chunk {
  font-family: var(--font-mono); font-size: 11.5px; padding: 7px 10px;
  border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg-alt); color: var(--ink-2);
  opacity: 0; transform: translateY(6px);
  transition: opacity .3s, transform .3s;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chunk.show { opacity: 1; transform: none; }
.chunk-reason { border-left: 3px solid var(--teal); }
.chunk-text { border-left: 3px solid var(--olive); }
.chunk-tool { border-left: 3px solid var(--accent); }
.chunk-hold { border-style: dashed; border-left: 3px solid var(--gold); color: var(--gold); }
.chunk-rewritten { border-left: 3px solid var(--accent-dark); background: var(--accent-soft); color: var(--accent-dark); font-weight: 600; }
.chunk-fin { border-left: 3px solid var(--ink-3); }
.stream-mid {
  display: flex; align-items: center; justify-content: center;
}
.stream-mid-label {
  font-size: 11px; color: var(--accent-dark); font-weight: 600;
  background: var(--accent-soft); padding: 5px 10px; border-radius: 999px;
  white-space: nowrap;
}
@media (max-width: 720px) { .stream-demo { grid-template-columns: 1fr; } .stream-mid { padding: 12px 0; } }

/* ---------- M1 接力 ---------- */
.relay-demo {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px 28px;
}
.relay-lanes { display: flex; flex-direction: column; gap: 20px; }
.relay-lane-title { font-size: 13.5px; font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.relay-lane-title .mono { color: var(--ink-3); font-size: 12px; font-weight: 400; margin-left: 6px; }
.relay-nodes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rnode {
  font-family: var(--font-mono); font-size: 12px; padding: 7px 13px;
  border-radius: 8px; border: 1px solid var(--line); background: var(--bg-alt);
  color: var(--ink-3); transition: all .4s;
}
.rnode.active { background: var(--accent); border-color: var(--accent-dark); color: #FFF8F2; font-weight: 600; }
.rnode.done { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-dark); }
.rnode-skip { text-decoration: line-through; opacity: 0.55; }
.rnode-skip.done { text-decoration: line-through; background: var(--bg-alt); border-color: var(--line); color: var(--ink-3); }
.relay-note { margin-top: 20px; font-size: 13.5px; color: var(--ink-2); }
.accept-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 720px) { .accept-grid { grid-template-columns: 1fr; } }
.accept-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; box-shadow: var(--shadow);
}
.accept-k {
  display: inline-block; font-size: 12px; font-weight: 600; color: var(--accent-dark);
  background: var(--accent-soft); border-radius: 6px; padding: 2px 10px; margin-bottom: 10px;
}
.accept-card p { font-size: 13.5px; color: var(--ink-2); }

/* ---------- M2 时序 ---------- */
.m2-demo {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px 28px;
  display: flex; flex-direction: column; gap: 18px;
}
.m2-lane { display: flex; align-items: flex-start; gap: 18px; }
.m2-who {
  flex: 0 0 92px; font-size: 13px; font-weight: 600; color: var(--ink);
  padding-top: 8px;
}
.m2-cells { display: flex; flex-wrap: wrap; gap: 10px; }
.m2-cell {
  font-size: 12.5px; padding: 8px 14px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--bg-alt); color: var(--ink-3);
  opacity: 0.35; transform: translateY(4px); transition: all .45s;
}
.m2-cell.active { opacity: 1; transform: none; border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); }
.m2-cell-evil.active { background: var(--accent-dark); color: #FFF8F2; border-color: var(--accent-dark); font-weight: 600; }
.m2-cell-clean.active { border-color: var(--ok); background: rgba(91, 140, 90, 0.12); color: var(--ok); }

/* ---------- 受害端卡片 ---------- */
.victim-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1100px) { .victim-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .victim-grid { grid-template-columns: 1fr; } }
.victim-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 26px; box-shadow: var(--shadow);
}
.victim-name { font-family: var(--font-serif); font-size: 22px; font-weight: 600; margin-bottom: 2px; }
.victim-ver { font-size: 12px; color: var(--ink-3); font-family: var(--font-mono); margin-bottom: 14px; }
.victim-card ul { padding-left: 18px; font-size: 13.5px; color: var(--ink-2); line-height: 1.75; }
.victim-card li { margin-bottom: 8px; }

/* ---------- 图表 ---------- */
.chart-head { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.chart-toggle { display: inline-flex; background: var(--bg-alt); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.tg-btn {
  border: none; background: transparent; font-family: var(--font-sans);
  font-size: 12.5px; font-weight: 500; color: var(--ink-3);
  padding: 6px 14px; border-radius: 8px; cursor: pointer; transition: all .2s;
}
.tg-btn.active { background: var(--card); color: var(--accent-dark); box-shadow: 0 1px 3px rgba(60,50,30,.12); font-weight: 600; }
.chart {
  width: 100%; height: auto; display: block;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.chart .axis { stroke: var(--line); stroke-width: 1; }
.chart .axis-label { font-size: 11px; fill: var(--ink-3); font-family: var(--font-sans); }
.chart .axis-title { font-size: 12px; fill: var(--ink-2); font-family: var(--font-sans); font-weight: 500; }
.chart .grid-line { stroke: var(--line-soft); stroke-width: 1; stroke-dasharray: 3 4; }
.chart .legend-text { font-size: 12px; fill: var(--ink-2); font-family: var(--font-sans); }
.chart .bar-label { font-size: 11.5px; fill: var(--ink); font-family: var(--font-mono); font-weight: 600; }
.chart .bar-cat { font-size: 12px; fill: var(--ink-2); font-family: var(--font-sans); }
.chart .bar-round { font-size: 11px; fill: var(--ink-3); font-family: var(--font-mono); }
.chart rect.bar { transition: width 1s cubic-bezier(.22,.8,.36,1), height 1s cubic-bezier(.22,.8,.36,1), y 1s cubic-bezier(.22,.8,.36,1); }
.chart .dot { transition: opacity .5s; }
.chart .ci-line { stroke: var(--ink-3); stroke-width: 1.5; }
.chart .budget-line { stroke: var(--danger); stroke-width: 1.5; stroke-dasharray: 6 5; }
.chart .budget-label { font-size: 11px; fill: var(--danger); font-family: var(--font-sans); }

/* ---------- 时间线 ---------- */
.tl { max-width: 780px; margin-top: 10px; }
.tl-item {
  display: flex; gap: 22px; padding: 22px 0;
  border-bottom: 1px solid var(--line-soft);
}
.tl-item:last-child { border-bottom: none; }
.tl-tag {
  flex: 0 0 92px; font-family: var(--font-mono); font-size: 12px;
  color: var(--accent-dark); font-weight: 600; padding-top: 4px;
}
.tl-body h3 { font-family: var(--font-serif); font-size: 19px; font-weight: 600; margin-bottom: 6px; }
.tl-body p { font-size: 14px; color: var(--ink-2); }

/* ---------- 页脚 ---------- */
.site-footer {
  margin-top: 90px; border-top: 1px solid var(--line);
  padding: 40px 0 56px; background: var(--bg-alt);
}
.foot-line { font-size: 14px; color: var(--ink-2); margin-bottom: 8px; }
.foot-dim { font-size: 12.5px; color: var(--ink-3); }

/* ---------- 进场动画 ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.22,.8,.36,1); }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .pkt-req, .pkt-res, .pkt-poison, .pkt-out, .hero-anim .extract rect { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- 概念卡 / 口径说明 / 变换图例 ---------- */
.concept-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 36px 0 40px; }
@media (max-width: 860px) { .concept-grid { grid-template-columns: 1fr; } }
.concept-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow);
}
.concept-k { font-family: var(--font-serif); font-size: 18px; font-weight: 600; color: var(--accent-dark); margin-bottom: 8px; }
.concept-card p:not(.concept-k) { font-size: 13.5px; color: var(--ink-2); line-height: 1.72; }

.note {
  background: var(--accent-faint); border: 1px solid rgba(217,119,87,.3);
  border-left: 4px solid var(--accent); border-radius: var(--radius);
  padding: 18px 24px; max-width: 780px; margin: 6px 0 10px;
}
.note-title { font-weight: 600; font-size: 14.5px; color: var(--accent-dark); margin-bottom: 6px; }
.note p:last-child { font-size: 14px; color: var(--ink-2); line-height: 1.75; }

.wave-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 24px 0 26px; max-width: 920px; }
@media (max-width: 720px) { .wave-grid { grid-template-columns: 1fr; } }
.wave-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 18px; box-shadow: var(--shadow);
}
.wave-name { font-weight: 600; font-size: 13.5px; color: var(--ink); margin-bottom: 9px; }
.wave-card code {
  display: block; background: var(--term-bg); color: var(--term-ink); border: none;
  border-radius: 8px; padding: 9px 12px; font-size: 12px; margin-bottom: 9px;
  word-break: break-all; white-space: normal; line-height: 1.6;
}
.wave-desc { font-size: 12.5px; color: var(--ink-3); line-height: 1.6; }

.victim-intro { font-size: 15px; color: var(--ink-2); max-width: 760px; margin: -8px 0 26px; }
.def-gloss { display: block; font-size: 11.5px; color: var(--ink-3); font-weight: 400; margin-top: 3px; line-height: 1.5; }

/* ---------- 指标定义卡 ---------- */
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; max-width: 920px; margin: 14px 0 12px; }
@media (max-width: 960px) { .metric-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .metric-grid { grid-template-columns: 1fr; } }
.metric-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 15px 18px; box-shadow: var(--shadow);
}
.metric-k { font-family: var(--font-serif); font-size: 16.5px; font-weight: 600; color: var(--accent-dark); margin-bottom: 6px; }
.metric-card p:not(.metric-k) { font-size: 12.5px; color: var(--ink-2); line-height: 1.65; }
