/* ============================================================
   RNE · 插件化剧情引擎 官网样式
   设计语言:「稿纸与墨」—— 纸色、墨字、朱红批注
   无毛玻璃 / 无渐变 / 无光晕,信息密度优先
   ============================================================ */

:root {
  --paper: #fafaf8;        /* 暖白纸底 */
  --paper-raise: #ffffff;  /* 白色卡片 */
  --paper-deep: #f2f4f7;   /* 冷灰交替区 */
  --ink: #16181d;          /* 近黑墨色 */
  --ink-2: #4e5560;        /* 次级冷灰 */
  --ink-3: #67707d;        /* 弱文字 */
  --red: #2742d6;          /* 克莱因蓝(主强调,变量名沿用) */
  --red-deep: #1b32a0;
  --blue: #0e7c66;         /* 深青绿(次强调,链接,变量名沿用) */
  --pink-soft: #edf1fb;    /* 极浅蓝灰底 */
  --pink-line: #c7d2f0;    /* 蓝灰边线 */
  --yellow: #f2b705;       /* 琥珀点缀 */
  --line: #e4e7ec;         /* 细线 */
  --line-strong: #cfd4dc;
  --code-bg: #101319;      /* 代码:墨黑 */
  --code-text: #e7ecf4;
  --display: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --serif: var(--display); /* 兼容旧引用:标题统一无衬线 display 栈 */
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, "JetBrains Mono", Menlo, monospace;
  --nav-h: 60px;
  --maxw: 1080px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.85;
  font-size: 15.5px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(39, 66, 214, 0.16); }

/* 圆点纹理(极淡粉,可爱手账底纹) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26'%3E%3Ccircle cx='4' cy='4' r='2' fill='%232742d6' fill-opacity='0.10'/%3E%3Ccircle cx='17' cy='17' r='2' fill='%232742d6' fill-opacity='0.07'/%3E%3C/svg%3E");
}

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

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- 导航 ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 26px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-shrink: 0;
}
.brand-mark {
  align-self: center;
  padding: 3px 7px;
  background: var(--red);
  color: var(--paper-raise);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  border-radius: 2px;
}
.brand-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 1px;
}
.brand-name small {
  color: var(--ink-3);
  font-family: var(--mono);
  font-weight: 400;
  font-size: 11px;
  margin-left: 8px;
  letter-spacing: 0;
}
.nav-links { display: flex; gap: 2px; margin-left: auto; }
.nav-links a {
  padding: 6px 12px;
  color: var(--ink-2);
  font-size: 14px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); border-bottom-color: var(--red); }
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 3px;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}
.nav-cta:hover { background: var(--ink); color: var(--paper-raise); }
.nav-cta svg { width: 15px; height: 15px; }

/* ---------- Hero ---------- */
.hero { padding: calc(var(--nav-h) + 72px) 0 64px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero-meta {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: 26px;
}
.hero-meta b { color: var(--red); font-weight: 700; }
.hero-meta i { font-style: normal; color: var(--line-strong); padding: 0 8px; }

.hero h1 {
  font-family: var(--display);
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.28;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin-bottom: 22px;
}
.hero h1 em {
  font-style: normal;
  color: var(--red);
}
.hero .sub {
  font-size: 16.5px;
  color: var(--ink-2);
  max-width: 540px;
  margin-bottom: 34px;
}
.hero .sub b { color: var(--ink); font-weight: 600; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 24px;
  border-radius: 3px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn-primary { background: var(--ink); color: var(--paper-raise); }
.btn-primary:hover { background: var(--red); border-color: var(--red); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { border-color: var(--red); color: var(--red); }
.btn svg { width: 16px; height: 16px; }

.hero-note {
  margin-top: 28px;
  font-size: 13px;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-note svg { width: 15px; height: 15px; color: var(--red); flex-shrink: 0; }

/* ---------- 终端窗口(夜灯下的墨) ---------- */
.term {
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--code-bg);
  box-shadow: 6px 6px 0 rgba(22, 24, 29, 0.12);
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(199, 210, 240, 0.14);
}
.term-bar .t-chip {
  width: 9px; height: 9px;
  background: var(--red);
  border-radius: 1px;
}
.term-bar .t-title {
  font-family: var(--mono);
  font-size: 12px;
  color: #8b93a2;
}
.term-body {
  padding: 22px 24px 26px;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.9;
  min-height: 210px;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--code-text);
}
.term-body .c-cm { color: #99a3b5; }
.term-body .c-kw { color: #8fa6ff; }
.term-body .c-fn { color: #6fd3c7; }
.term-body .c-str { color: #ffd866; }
.term-body .c-pr { color: #c0a8ff; }
.term-body .c-key { color: #9ed2f0; }
.term-body .c-pl { color: var(--code-text); }
.term-cursor {
  display: inline-block;
  width: 8px; height: 17px;
  background: #8fa6ff;
  vertical-align: -3px;
  margin-left: 2px;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- 数字条 ---------- */
.stats { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  padding: 30px 0;
}
.stat {
  text-align: center;
  padding: 4px 10px;
  border-left: 1px solid var(--line);
}
.stat:first-child { border-left: none; }
.stat b {
  display: block;
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}
.stat span { font-size: 12.5px; color: var(--ink-3); letter-spacing: 1px; }

/* ---------- 区块通用 ---------- */
.section { padding: 84px 0; }
.section-alt { background: var(--paper-deep); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-head { max-width: 700px; margin-bottom: 46px; }
.sec-tag {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--red);
  letter-spacing: 2px;
  margin-bottom: 14px;
}
.sec-tag::before { content: ""; }
.sec-head h2 {
  font-family: var(--display);
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.35;
  margin-bottom: 12px;
}
.sec-head p { color: var(--ink-2); font-size: 15.5px; }
.sec-head p b { color: var(--ink); }

/* ---------- 特性:目录式列表 ---------- */
.feat-list {
  list-style: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 56px;
}
.feat-list li {
  display: flex;
  gap: 16px;
  padding: 19px 4px;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.feat-list li > div { min-width: 0; }
.feat-no {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--red);
  flex-shrink: 0;
  width: 26px;
  font-weight: 700;
}
.feat-list h3 {
  font-size: 15.5px;
  font-weight: 700;
  margin-bottom: 3px;
  color: var(--ink);
}
.feat-list p { font-size: 13.5px; color: var(--ink-2); line-height: 1.75; }
.feat-list p code, .inline-code {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--red-deep);
  background: rgba(39, 66, 214, 0.07);
  border: 1px solid rgba(39, 66, 214, 0.16);
  border-radius: 3px;
  padding: 0 5px;
  overflow-wrap: anywhere;
}

/* ---------- 架构图 ---------- */
.arch { display: flex; flex-direction: column; }
.arch-layer {
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--paper-raise);
  padding: 22px 26px;
}
.arch-mid { border-width: 2px; }
.arch-label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 1.5px;
  color: var(--ink-3);
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.arch-label b { color: var(--ink); font-weight: 700; font-size: 13px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 13px;
  padding: 5px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--paper);
  color: var(--ink-2);
}
.chip small { color: var(--ink-3); font-size: 11.5px; }
.chip.hl { border-color: var(--red); color: var(--red-deep); background: rgba(39, 66, 214, 0.05); }
.arch-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--ink-3);
  padding: 8px 0;
}
.arch-flow span { font-size: 12px; font-family: var(--mono); }
.arch-flow svg { width: 16px; height: 20px; }
.arch-note {
  text-align: center;
  margin-top: 20px;
  font-size: 13.5px;
  color: var(--ink-3);
}
.arch-note b { color: var(--ink-2); }

/* ---------- 快速开始 ---------- */
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.code-card {
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--code-bg);
  overflow: hidden;
  box-shadow: 6px 6px 0 rgba(22, 24, 29, 0.12);
}
.code-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 18px;
  border-bottom: 1px solid rgba(199, 210, 240, 0.14);
}
.code-card-head h3 {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: #a39c8b;
  display: flex;
  align-items: center;
  gap: 9px;
}
.code-card-head h3 svg { width: 15px; height: 15px; color: #8fa6ff; }
.copy-btn {
  font-family: var(--mono);
  font-size: 11.5px;
  color: #8b93a2;
  background: none;
  border: 1px solid rgba(199, 210, 240, 0.25);
  border-radius: 3px;
  padding: 4px 10px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.copy-btn:hover { color: var(--code-text); border-color: rgba(199, 210, 240, 0.5); }
.copy-btn.ok { color: #ffd866; border-color: #ffd866; }
.code-card pre {
  padding: 19px 22px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.9;
  overflow-x: auto;
  color: var(--code-text);
}
.code-card pre .c-cm { color: #99a3b5; }
.code-card pre .c-kw { color: #8fa6ff; }
.code-card pre .c-fn { color: #6fd3c7; }
.code-card pre .c-str { color: #ffd866; }
.code-card pre .c-pr { color: #c0a8ff; }
.code-card pre .c-key { color: #9ed2f0; }
.quick-list { list-style: none; padding: 14px 22px 18px !important; display: grid; gap: 8px; border-top: 1px dashed rgba(199, 210, 240, 0.2); }
.quick-list li { display: flex; gap: 9px; font-size: 13px; color: #a39c8b; line-height: 1.7; }
.quick-list svg { width: 15px; height: 15px; color: #ffd866; flex-shrink: 0; margin-top: 4px; }

/* ---------- 代码 Tabs ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 0; margin-bottom: 18px; border-bottom: 1px solid var(--line-strong); }
.tab-btn {
  font-family: var(--mono);
  font-size: 13px;
  padding: 9px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  color: var(--ink-3);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.tab-btn:hover { color: var(--ink); }
.tab-btn.active { color: var(--red); border-bottom-color: var(--red); font-weight: 700; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.3s ease; }
.tab-desc { font-size: 14px; color: var(--ink-2); margin-bottom: 16px; max-width: 760px; }
.tab-desc b { color: var(--ink); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

/* ---------- 给编剧 ---------- */
.writer-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 48px;
  align-items: center;
}
.writer-title {
  font-family: var(--display);
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}
.writer-lead { color: var(--ink-2); font-size: 15.5px; }
.writer-points { list-style: none; display: grid; gap: 0; margin-top: 26px; border-top: 1px solid var(--line); }
.writer-points li {
  display: flex;
  gap: 14px;
  padding: 15px 2px;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.writer-points .wp-no {
  font-family: var(--serif);
  font-size: 13.5px;
  color: var(--red);
  flex-shrink: 0;
  width: 24px;
  font-weight: 700;
}
.writer-points b { display: block; font-size: 15px; margin-bottom: 2px; }
.writer-points p { font-size: 13.5px; color: var(--ink-2); line-height: 1.75; }

/* 剧本纸 */
.script-paper {
  border: 1px solid var(--ink);
  border-radius: 3px;
  background: var(--paper-raise);
  box-shadow: 8px 8px 0 rgba(22, 24, 29, 0.1);
  overflow: hidden;
}
.script-paper-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-3);
  background: var(--paper);
}
.script-paper-body {
  padding: 26px 32px 30px;
  font-size: 14.5px;
  line-height: 2.1;
  color: var(--ink-2);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent calc(2.1em - 1px),
    #e7e1d0 calc(2.1em - 1px),
    #e7e1d0 2.1em
  );
}
.sp-title { font-family: var(--serif); font-size: 20px; font-weight: 700; color: var(--ink); letter-spacing: 3px; }
.sp-author { font-size: 12px; color: var(--ink-3); margin-top: 2px; margin-bottom: 12px; }
.sp-act { font-family: var(--serif); color: var(--red); font-weight: 700; letter-spacing: 2px; margin-top: 6px; }
.sp-scene { color: var(--ink); font-weight: 700; }
.sp-action { padding-left: 1.2em; color: var(--ink-3); }
.sp-action::before { content: "("; opacity: 0.6; }
.sp-action::after { content: ")"; opacity: 0.6; }
.sp-dialog .sp-name { color: var(--blue); font-weight: 700; }
.sp-dialog .sp-hint { color: var(--ink-3); font-size: 12.5px; }
.sp-dialog .sp-line { color: var(--ink); }
.sp-choice { margin: 2px 0 2px 1em; color: var(--ink-2); }
.sp-choice::before { content: "— "; color: var(--red); }
.sp-choice .sp-cond { color: var(--ink-3); font-size: 12.5px; }
.sp-goto { margin-left: 0.6em; font-family: var(--mono); font-size: 12px; color: var(--red); }
.sp-end { font-family: var(--serif); color: var(--red); font-weight: 700; }

/* ---------- 示例故事:条目式 ---------- */
.stories-list { border-top: 1px solid var(--line-strong); }
.story-row {
  display: grid;
  grid-template-columns: 92px 1fr 1.2fr 200px;
  gap: 20px;
  padding: 20px 4px;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
  transition: background 0.2s;
}
.story-row:hover { background: rgba(242, 244, 247, 0.7); }
.story-form {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 1px;
  color: var(--red);
  align-self: baseline;
}
.story-form::before { content: "["; color: var(--line-strong); }
.story-form::after { content: "]"; color: var(--line-strong); }
.story-row h3 {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}
.story-row p { font-size: 13.5px; color: var(--ink-2); line-height: 1.75; }
.story-row p code, .inline-code {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--red-deep);
  background: rgba(39, 66, 214, 0.07);
  border: 1px solid rgba(39, 66, 214, 0.16);
  border-radius: 3px;
  padding: 0 5px;
  overflow-wrap: anywhere;
}
.story-meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  text-align: right;
}

/* ---------- 文档:两栏清单 ---------- */
.docs-list {
  list-style: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 56px;
  border-top: 1px solid var(--line-strong);
}
.doc-item {
  display: flex;
  gap: 14px;
  padding: 13px 4px;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
  transition: background 0.15s;
}
.doc-item > * { min-width: 0; }
.doc-item:hover { background: rgba(242, 244, 247, 0.7); }
.doc-item code {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--blue);
  flex-shrink: 0;
  width: 172px;
  font-weight: 600;
}
.doc-item:hover code { color: var(--red); text-decoration: underline; }
.doc-item span { font-size: 13px; color: var(--ink-2); line-height: 1.7; }
.docs-more {
  margin-top: 22px;
  font-size: 13.5px;
  color: var(--ink-2);
  border-left: 3px solid var(--red);
  padding: 6px 0 6px 16px;
}
.docs-more b { color: var(--ink); }
.docs-more a { color: var(--red-deep); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 0; max-width: 860px; border-top: 1px solid var(--line-strong); }
.faq-item { border-bottom: 1px solid var(--line); background: transparent; }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 4px;
  font-size: 15.5px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  user-select: none;
  transition: color 0.2s;
}
.faq-item summary:hover { color: var(--red); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .faq-arrow {
  width: 16px; height: 16px;
  color: var(--ink-3);
  transition: transform 0.3s;
  flex-shrink: 0;
}
.faq-item[open] summary .faq-arrow { transform: rotate(180deg); color: var(--red); }
.faq-item[open] summary { color: var(--red); }
.faq-item .faq-body {
  padding: 0 4px 20px;
  font-size: 14.5px;
  color: var(--ink-2);
  max-width: 780px;
}
.faq-item .faq-body b { color: var(--ink); }
.faq-item .faq-body code {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--red-deep);
  background: rgba(39, 66, 214, 0.07);
  border: 1px solid rgba(39, 66, 214, 0.16);
  border-radius: 3px;
  padding: 0 5px;
}
.faq-item .faq-body a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- CTA ---------- */
.final-cta {
  border: 2px solid var(--ink);
  border-radius: 4px;
  padding: 56px 40px;
  text-align: center;
  background: var(--paper-raise);
  box-shadow: 8px 8px 0 rgba(22, 24, 29, 0.1);
}
.final-cta h2 {
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: 1px;
}
.final-cta h2 em { font-style: normal; color: var(--red); }
.final-cta p { color: var(--ink-2); max-width: 540px; margin: 0 auto 28px; font-size: 15px; }
.final-cta .hero-actions { justify-content: center; }

/* ---------- Footer ---------- */
footer { border-top: 2px solid var(--ink); padding: 40px 0 48px; margin-top: 88px; }
.foot-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 28px;
  align-items: flex-start;
}
.foot-brand p { font-size: 13px; color: var(--ink-3); margin-top: 10px; max-width: 380px; line-height: 1.8; }
.foot-cols { display: flex; gap: 52px; flex-wrap: wrap; }
.foot-col b { display: block; font-size: 13px; color: var(--ink); margin-bottom: 10px; letter-spacing: 1px; }
.foot-col a { display: block; font-size: 13px; color: var(--ink-3); padding: 3px 0; transition: color 0.2s; }
.foot-col a:hover { color: var(--red); }
.foot-bottom {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: var(--ink-3);
}

/* ---------- 滚动渐入(克制) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.07s; }
.reveal-d2 { transition-delay: 0.14s; }
.reveal-d3 { transition-delay: 0.21s; }
.reveal-d4 { transition-delay: 0.28s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .term-cursor { animation: none; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .feat-list { grid-template-columns: minmax(0, 1fr); column-gap: 0; }
  .docs-list { grid-template-columns: minmax(0, 1fr); column-gap: 0; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); row-gap: 22px; }
  .stat:nth-child(4) { border-left: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .story-row { grid-template-columns: 92px 1fr 200px; }
  .story-row p { grid-column: 2 / -1; }
  .writer-grid { grid-template-columns: 1fr; gap: 36px; }
  .quick-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-inner { gap: 12px; padding: 0 24px; }
  .brand-name small { display: none; }
  .nav-cta { margin-left: auto; padding: 6px 12px; font-size: 13px; }
  .section { padding: 60px 0; }
  .hero { padding-top: calc(var(--nav-h) + 44px); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat { border-left: none; }
  .story-row { grid-template-columns: 1fr; gap: 6px; }
  .story-meta { text-align: left; }
  .final-cta { padding: 40px 20px; }
  .term-body { min-height: 0; }
  .foot-cols { gap: 32px; }
}
@media (max-width: 460px) {
  .hero-actions .btn { width: 100%; justify-content: center; }
}

/* ============================================================
   v3 增补:丰富度 —— 迷你演示 / 节点词表 / 时间线 / hero 细节
   ============================================================ */

/* ---------- hero 适用场景行 ---------- */
.hero-scene {
  margin-top: 16px;
  font-size: 13px;
  color: var(--ink-3);
}
.hero-scene b {
  color: var(--ink-2);
  font-weight: 600;
  margin-right: 6px;
}
.hero-scene i { font-style: normal; color: var(--line-strong); padding: 0 7px; }

/* ---------- 终端运行结果条 ---------- */
.term-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 16px;
  border-top: 1px solid rgba(199, 210, 240, 0.14);
  font-family: var(--mono);
  font-size: 11px;
  color: #8b93a2;
}
.term-status .ok { color: #ffd866; }

/* ---------- 迷你互动演示 ---------- */
.demo-wrap {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 44px;
  align-items: center;
}
.demo-lead { color: var(--ink-2); font-size: 15.5px; }
.demo-lead b { color: var(--ink); }
.demo-steps { list-style: none; margin-top: 22px; border-top: 1px solid var(--line); }
.demo-steps li {
  display: flex;
  gap: 12px;
  padding: 11px 2px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--ink-2);
  align-items: baseline;
}
.demo-steps code {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--red-deep);
  background: rgba(39, 66, 214, 0.07);
  border: 1px solid rgba(39, 66, 214, 0.16);
  border-radius: 3px;
  padding: 0 6px;
  flex-shrink: 0;
}
.md-stage {
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--paper-raise);
  box-shadow: 8px 8px 0 rgba(22, 24, 29, 0.1);
  overflow: hidden;
}
.md-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 16px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-3);
}
.md-state {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--blue);
}
.md-body {
  padding: 24px 26px 20px;
  min-height: 112px;
  cursor: pointer;
}
.md-speaker {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 6px;
}
.md-speaker.is-narrator { color: var(--ink-3); }
.md-text {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.9;
  color: var(--ink);
  min-height: 2em;
}
.md-options {
  display: grid;
  gap: 8px;
  padding: 0 26px 20px;
}
.md-opt {
  font-family: var(--sans);
  font-size: 14px;
  text-align: left;
  padding: 10px 15px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.md-opt::before { content: "— "; color: var(--red); }
.md-opt:hover { border-color: var(--red); color: var(--red-deep); background: rgba(39, 66, 214, 0.04); }
.md-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-top: 1px dashed var(--line);
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-3);
  min-height: 40px;
}
.md-node { color: var(--ink-3); }
.md-node b { color: var(--red); font-weight: 600; }
.md-end-tag { color: var(--red); font-weight: 700; }
.md-replay {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
  background: none;
  border: 1px solid var(--ink);
  border-radius: 3px;
  padding: 4px 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.md-replay:hover { background: var(--ink); color: var(--paper-raise); }

/* ---------- 节点词表(墨底反白) ---------- */
.nodes-band {
  background: var(--code-bg);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  color: var(--code-text);
}
.nodes-band .sec-tag { color: #8fa6ff; }
.nodes-band .sec-head h2 { color: var(--paper-raise); }
.nodes-band .sec-head p { color: #a39c8b; }
.nodes-band .sec-head p b { color: var(--code-text); }
.nodes-grid {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 48px;
}
.nodes-grid li {
  display: flex;
  gap: 14px;
  padding: 12px 2px;
  border-bottom: 1px solid rgba(199, 210, 240, 0.14);
  align-items: baseline;
}
.nodes-grid code {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: #8fa6ff;
  flex-shrink: 0;
  width: 84px;
}
.nodes-grid span { font-size: 13.5px; color: #b3ac9c; line-height: 1.75; }
.nodes-expr {
  margin-top: 24px;
  padding: 16px 20px;
  border: 1px dashed rgba(199, 210, 240, 0.3);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 13px;
  color: #ffd866;
  overflow-x: auto;
  white-space: nowrap;
}
.nodes-expr b { color: #6fd3c7; font-weight: 600; }

/* ---------- 版本时间线(git 风格) ---------- */
.timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  position: relative;
  padding-top: 30px;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 2%;
  right: 2%;
  height: 2px;
  background: var(--line-strong);
}
.tl-item { position: relative; }
.tl-item::before {
  content: "";
  position: absolute;
  top: -30px;
  left: 2px;
  width: 12px;
  height: 12px;
  background: var(--red);
  border: 2px solid var(--paper);
  outline: 2px solid var(--red);
  box-sizing: content-box;
  transform: translateY(-7px);
}
.tl-ver {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--red);
}
.tl-date { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); margin-left: 8px; }
.tl-item h3 {
  font-family: var(--serif);
  font-size: 17.5px;
  font-weight: 700;
  margin: 6px 0 6px;
}
.tl-item p { font-size: 13.5px; color: var(--ink-2); line-height: 1.8; }
.tl-item p code {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--red-deep);
  background: rgba(39, 66, 214, 0.07);
  border: 1px solid rgba(39, 66, 214, 0.16);
  border-radius: 3px;
  padding: 0 5px;
}

@media (max-width: 960px) {
  .demo-wrap { grid-template-columns: 1fr; gap: 32px; }
  .nodes-grid { grid-template-columns: 1fr; column-gap: 0; }
  .timeline { grid-template-columns: 1fr; gap: 26px; padding-top: 0; padding-left: 26px; }
  .timeline::before { top: 8px; bottom: 8px; left: 5px; right: auto; width: 2px; height: auto; }
  .tl-item::before { top: 4px; left: -26px; transform: none; }
}
@media (max-width: 720px) {
  .md-body { padding: 18px 18px 14px; min-height: 110px; }
  .md-options { padding: 0 18px 16px; }
  .term-status { flex-wrap: wrap; }
}

/* ---------- 仓库文档链接行 ---------- */
.repo-docs {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-2);
  line-height: 2.2;
}
.repo-docs a { color: var(--blue); border-bottom: 1px dashed rgba(53, 89, 126, 0.5); margin-right: 14px; white-space: nowrap; }
.repo-docs a:hover { color: var(--red); border-bottom-color: var(--red); }
@media (max-width: 720px) {
  .repo-docs { word-break: break-all; }
  .repo-docs a { white-space: normal; display: inline-block; margin-right: 10px; }
}

/* ============================================================
   v4/v5 · 编辑风增强 —— 大编号水印 / 明暗节奏 / 双细线
   ============================================================ */

/* ---------- 阅读进度条 ---------- */
.readbar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: var(--red);
  z-index: 300;
  pointer-events: none;
}

/* ---------- 区块大字水印(编号/品牌字,瑞士海报式) ---------- */
.hero, .section, .nodes-band { position: relative; overflow: hidden; }
.hero[data-wm]::before, .section[data-wm]::before {
  content: attr(data-wm);
  position: absolute;
  top: 0;
  right: 0.5%;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(130px, 17vw, 230px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: rgba(22, 24, 29, 0.05);
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.hero > .wrap, .section > .wrap { position: relative; z-index: 1; }

/* ---------- 数字条:双细线 ---------- */
.stats { position: relative; }
.stats::before, .stats::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: var(--ink);
}
.stats::before { top: 3px; }
.stats::after { bottom: 3px; }

/* ---------- sec-tag:印章方块 ---------- */
.sec-tag::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--red);
  margin-right: 9px;
}

/* ---------- 按钮:纸上挪动 ---------- */
.btn { transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.16s, box-shadow 0.16s; }
.btn:hover { transform: translate(-2px, -2px); }
.btn-primary:hover { box-shadow: 4px 4px 0 rgba(22, 24, 29, 0.28); }
.btn-ghost:hover { box-shadow: 4px 4px 0 rgba(22, 24, 29, 0.14); }
.btn:active { transform: translate(0, 0); box-shadow: none; }

/* ---------- 特性列表:hover 呼吸 ---------- */
.feat-list li { transition: background 0.16s; }
.feat-list li:hover { background: rgba(253, 251, 244, 0.85); }
.feat-no { font-size: 19px; opacity: 0.85; transition: color 0.16s, opacity 0.16s; }
.feat-list li:hover .feat-no { opacity: 1; }

/* ---------- 文档卡:箭头引路 ---------- */
.doc-item { position: relative; padding-right: 30px; }
.doc-item::after {
  content: "→";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%) translateX(-7px);
  opacity: 0;
  color: var(--red);
  font-family: var(--mono);
  font-size: 14px;
  transition: opacity 0.2s, transform 0.2s;
}
.doc-item:hover::after { opacity: 1; transform: translateY(-50%) translateX(0); }

/* ---------- 代码示例区:整段墨底 ---------- */
.section-ink {
  background: var(--ink);
  border-top: none;
  border-bottom: none;
}
.section-ink .sec-head h2 { color: var(--paper); }
.section-ink .sec-head p { color: #b3ab9a; }
.section-ink .sec-head p b { color: var(--paper); }
.section-ink[data-wm]::before { color: rgba(231, 236, 244, 0.06); }
.section-ink .tabs { border-bottom-color: rgba(231, 236, 244, 0.22); }
.section-ink .tab-btn { color: #99a3b5; }
.section-ink .tab-btn:hover { color: #c6ccd8; }
.section-ink .tab-desc { color: #b3ab9a; }
.section-ink .tab-desc b { color: var(--paper); }
.section-ink .tab-desc code {
  color: #e0a08a;
  background: rgba(231, 236, 244, 0.07);
  border-color: rgba(231, 236, 244, 0.18);
}
.section-ink .code-card { border-color: #14120e; box-shadow: 7px 7px 0 rgba(0, 0, 0, 0.4); }
.section-ink .inline-code {
  color: #e0a08a;
  background: rgba(231, 236, 244, 0.07);
  border-color: rgba(231, 236, 244, 0.18);
}

/* ---------- 结尾 CTA:双线框封底 ---------- */
.final-cta {
  border: 1px solid var(--ink);
  outline: 1px solid var(--line-strong);
  outline-offset: 6px;
  background: var(--paper-raise);
  padding: 58px 40px;
  text-align: center;
}
.final-cta h2 { font-family: var(--serif); font-size: clamp(26px, 3.4vw, 36px); margin-bottom: 12px; }
.final-cta p { color: var(--ink-2); max-width: 560px; margin: 0 auto 26px; }
.final-cta .hero-actions { justify-content: center; }

/* ---------- footer:墨底反白 ---------- */
footer, .site-footer {
  background: var(--ink);
  color: #b3ab9a;
  border-top: 3px double rgba(231, 236, 244, 0.25);
}
footer .brand-name { color: var(--paper); }
footer .foot-brand p { color: #8b93a2; }
footer .foot-col b { color: var(--paper); }
footer .foot-col a { color: #8b93a2; }
footer .foot-col a:hover { color: #2742d6; }
footer .foot-bottom { border-top-color: rgba(231, 236, 244, 0.13); color: #6b7280; }
.site-footer .footer-inner { color: #8b93a2; }
.site-footer .footer-inner a { color: #a39c8b; }
.site-footer .footer-inner a:hover { color: #2742d6; }

/* ============================================================
   v6 · 图形增强 —— 特性线性图标 / 节点流程图 / 数字条墨底
   ============================================================ */

/* ---------- 特性标题线性图标 ---------- */
.feat-list h3 .fic {
  width: 17px; height: 17px;
  color: var(--red);
  vertical-align: -3px;
  margin-right: 9px;
  flex-shrink: 0;
}

/* ---------- 数字条改墨底反白 ---------- */
.stats {
  background: var(--ink);
}
.stats::before, .stats::after { background: rgba(231, 236, 244, 0.28); }
.stats .stat b { color: var(--paper); }
.stats .stat span { color: #8b93a2; }
.stats .stat { border-left-color: rgba(231, 236, 244, 0.12); }

/* ---------- 节点流程图 ---------- */
.nodeflow { margin: 6px 0 34px; }
.nodeflow svg { display: block; width: 100%; height: auto; }
.nodeflow .nf-box {
  fill: none;
  stroke: #a39c8b;
  stroke-width: 1.2;
}
.nodeflow .nf-box-red { stroke: #2742d6; }
.nodeflow .nf-txt {
  font-family: var(--mono);
  font-size: 14px;
  fill: #c6ccd8;
  text-anchor: middle;
  dominant-baseline: central;
  letter-spacing: 0.5px;
}
.nodeflow .nf-txt-red { fill: #2742d6; font-weight: 700; }
.nodeflow .nf-txt-dim { fill: #99a3b5; font-size: 12px; }
.nodeflow .nf-line {
  stroke: #6b7280;
  stroke-width: 1.2;
  fill: none;
}
.nodeflow .nf-line-red { stroke: #2742d6; }
.nodeflow .nf-dot { fill: #2742d6; }
.nodeflow .nf-cap {
  font-family: var(--mono);
  font-size: 12px;
  fill: #99a3b5;
}
@media (max-width: 720px) {
  .nodeflow { display: none; }
}

/* ============================================================
   v8 · 二次元可爱风 —— 淡粉×白 / 圆角 / 贴纸影 / 虚线 / 圆点
   ============================================================ */

/* ---------- 全局形状 ---------- */
.btn { border-radius: 999px; }
.btn:hover { box-shadow: 4px 4px 0 var(--pink-line); }
.btn-primary:hover { box-shadow: 4px 4px 0 rgba(39, 66, 214, 0.3); }
.nav-cta { border-radius: 999px; border-color: var(--pink-line); }
.brand-mark { border-radius: 10px; }
.term, .code-card { border-radius: 16px; border-color: var(--pink-line); box-shadow: 8px 8px 0 rgba(39, 66, 214, 0.18); }
.term-bar, .code-card-head { border-radius: 15px 15px 0 0; }
.term-bar { border-bottom-color: rgba(245, 233, 239, 0.14); }
.copy-btn { border-radius: 999px; }
.inline-code, .feat-list p code { border-radius: 999px; padding: 1px 9px; }
.chip { border-radius: 999px; }
.doc-item code { border-radius: 8px; }
.final-cta {
  border: 2px dashed var(--pink-line);
  outline: none;
  border-radius: 24px;
  background: var(--paper-raise);
}
.final-cta h2 em { color: var(--red); }

/* ---------- 星形标签 ---------- */
.sec-tag::before {
  content: "✦ ";
  width: auto; height: auto;
  background: none;
  margin-right: 2px;
  color: var(--yellow);
}

/* ---------- 水印:淡粉 ---------- */
.hero[data-wm]::before, .section[data-wm]::before { color: rgba(39, 66, 214, 0.07); }

/* ---------- 数字条:浅粉底 ---------- */
.stats {
  background: var(--pink-soft);
  border-top: 2px dashed var(--pink-line);
  border-bottom: 2px dashed var(--pink-line);
}
.stats::before, .stats::after { display: none; }
.stats .stat b { color: var(--red-deep); }
.stats .stat span { color: var(--ink-2); }
.stats .stat { border-left-color: var(--pink-line); }

/* ---------- 节点区:墨底 → 浅粉底 ---------- */
.nodes-band {
  background: var(--pink-soft);
  border-top: 2px dashed var(--pink-line);
  border-bottom: 2px dashed var(--pink-line);
  color: var(--ink);
}
.nodes-band .sec-tag { color: var(--red-deep); }
.nodes-band .sec-head h2 { color: var(--ink); }
.nodes-band .sec-head p { color: var(--ink-2); }
.nodes-band .sec-head p b { color: var(--red-deep); }
.nodes-band .nodes-grid code { color: var(--red-deep); }
.nodes-band .nodes-grid span { color: var(--ink-2); }
.nodes-band .nodes-grid li { border-bottom-color: var(--pink-line); }
.nodes-band .nodes-expr {
  background: var(--paper-raise);
  border: 1px dashed var(--pink-line);
  color: var(--ink);
  border-radius: 14px;
}
.nodes-band .nodes-expr b { color: var(--red-deep); }

/* ---------- 流程图:粉调翻转 ---------- */
.nodeflow .nf-box { fill: var(--paper-raise); stroke: #d98aa8; }
.nodeflow .nf-box-red { stroke: var(--red); stroke-width: 1.6; }
.nodeflow .nf-txt { fill: var(--ink); }
.nodeflow .nf-txt-red { fill: var(--red-deep); }
.nodeflow .nf-txt-dim { fill: var(--ink-3); }
.nodeflow .nf-line { stroke: #d98aa8; }
.nodeflow .nf-line-red { stroke: var(--red); }
.nodeflow .nf-cap { fill: var(--ink-3); }

/* ---------- 代码示例区:墨底 → 浅粉底 ---------- */
.section-ink { background: var(--pink-soft); }
.section-ink .sec-tag { color: var(--red-deep); }
.section-ink[data-wm]::before { color: rgba(39, 66, 214, 0.08); }
.section-ink .tabs { border-bottom-color: var(--pink-line); }
.section-ink .tab-btn { color: var(--ink-3); }
.section-ink .tab-btn:hover { color: var(--ink); }
.section-ink .tab-desc { color: var(--ink-2); }
.section-ink .tab-desc b { color: var(--ink); }
.section-ink .code-card { border-color: var(--pink-line); box-shadow: 8px 8px 0 rgba(39, 66, 214, 0.14); }

/* ---------- 页脚:浅粉底 ---------- */
footer, .site-footer {
  background: var(--pink-soft);
  color: var(--ink-2);
  border-top: 2px dashed var(--pink-line);
}
footer .brand-name { color: var(--ink); }
footer .foot-brand p { color: var(--ink-3); }
footer .foot-col b { color: var(--ink); }
footer .foot-col a { color: var(--ink-2); }
footer .foot-col a:hover { color: var(--red); }
footer .foot-bottom { border-top-color: var(--pink-line); color: var(--ink-3); }
.site-footer .footer-inner { color: var(--ink-2); }
.site-footer .footer-inner a { color: var(--ink-2); }
.site-footer .footer-inner a:hover { color: var(--red); }
.site-footer .footer-inner span a { color: var(--blue); }

/* ---------- 导航 ---------- */
.nav { background: rgba(255, 253, 253, 0.94); }
.nav.scrolled { border-bottom-color: var(--pink-line); }
.nav-links a.active { border-bottom-color: var(--red); }
.brand-mark { background: var(--red); }

/* ---------- demo 区 / 组件微调 ---------- */
.md-opt { border-radius: 999px; }
.md-speaker { border-radius: 999px; }
.faq-item { border-radius: 14px; border-color: var(--pink-line); }
.faq-item summary { border-radius: 14px; }
.feat-list li:hover { background: rgba(237, 241, 251, 0.9); }
.doc-item:hover { background: rgba(237, 241, 251, 0.9); }
.story-row code, .story-row .inline-code { border-radius: 999px; }

/* ---------- 波浪分隔 ---------- */
.wave { display: block; width: 100%; height: 42px; margin-bottom: -1px; }
.wave svg { display: block; width: 100%; height: 100%; }

/* ============================================================
   v9 交互动效层 —— 全部由 hover / active / click / 滚动触发
   （背景层保持完全静态，无循环动画）
   ============================================================ */

/* 键盘焦点可见性（无障碍） */
:focus-visible { outline: 2.5px dashed var(--red); outline-offset: 3px; border-radius: 8px; }

/* ---------- 按钮：歪头上浮 / 按下回弹 ---------- */
.btn { will-change: transform; }
.btn:hover { transform: translate(-2px, -3px) rotate(-1deg); }
.btn:active { transform: translate(0, 0) scale(0.96); transition-duration: 0.08s; }
.btn-primary:hover { box-shadow: 6px 6px 0 rgba(39, 66, 214, 0.32); }
.btn-ghost:hover { background: var(--pink-soft); box-shadow: 6px 6px 0 rgba(39, 66, 214, 0.16); }

/* ---------- 导航链接：下划线从左滑入 / CTA 起浮 ---------- */
.nav-links a { position: relative; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -5px;
  height: 2.5px; border-radius: 2px; background: var(--red);
  transform: scaleX(0); transform-origin: left center;
  transition: transform 0.22s ease;
}
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links a:hover { color: var(--red); }
.nav-cta { transition: background 0.2s, color 0.2s, transform 0.16s ease, box-shadow 0.16s ease; }
.nav-cta:hover { transform: translateY(-2px); box-shadow: 3px 3px 0 rgba(39, 66, 214, 0.28); }
.nav-cta:active { transform: translateY(0) scale(0.95); box-shadow: none; }

/* ---------- 数字条：hover 起浮 ---------- */
.stat { transition: transform 0.22s ease; }
.stat:hover { transform: translateY(-4px); }
.stat b { transition: color 0.2s; }
.stat:hover b { color: var(--red-deep); }

/* ---------- 特性列表：整行联动（位移 + 编号弹大 + 图标摇摆 + 标题变色） ---------- */
.feat-list li { transition: background 0.18s ease, transform 0.18s ease; }
.feat-list li:hover { background: rgba(237, 241, 251, 0.9); transform: translateX(5px); }
.feat-no { display: inline-block; transition: color 0.18s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); }
.feat-list li:hover .feat-no { color: var(--red); transform: scale(1.18) rotate(-4deg); }
.fic { transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1); transform-origin: 12px 12px; }
.feat-list li:hover .fic { transform: rotate(-10deg) scale(1.22); }
.feat-list li h3 { transition: color 0.18s ease; }
.feat-list li:hover h3 { color: var(--red-deep); }

/* ---------- Tabs：hover 预显底边 + 微浮 ---------- */
.tab-btn:hover { color: var(--red); border-bottom-color: rgba(39, 66, 214, 0.35); transform: translateY(-1px); }
.tab-btn { transition: color 0.2s, border-color 0.2s, transform 0.16s ease; }

/* ---------- 终端 / 代码卡：hover 抬起贴纸影 ---------- */
.term, .code-card { transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease; }
.term:hover, .code-card:hover { transform: translate(-3px, -3px); box-shadow: 11px 11px 0 rgba(39, 66, 214, 0.24); border-color: var(--red); }

/* ---------- 复制按钮：成功弹跳 ---------- */
@keyframes copiedPop {
  0% { transform: scale(0.8); }
  55% { transform: scale(1.12); }
  100% { transform: scale(1); }
}
.copy-btn.ok { background: var(--red); border-color: var(--red); color: #fff; animation: copiedPop 0.38s cubic-bezier(0.34, 1.56, 0.64, 1); }
.copy-btn { transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.14s ease; }
.copy-btn:hover { transform: translateY(-1px); }
.copy-btn:active { transform: scale(0.94); }

/* ---------- 示例故事行：左侧粉条滑入 ---------- */
.story-row { position: relative; }
.story-row::before {
  content: ""; position: absolute; left: -2px; top: 16%; bottom: 16%;
  width: 3.5px; border-radius: 3px; background: var(--red);
  transform: scaleY(0); transform-origin: center;
  transition: transform 0.22s ease;
}
.story-row:hover::before { transform: scaleY(1); }

/* ---------- 节点流程图：节点 hover 描边加深 ---------- */
.nf-box { transition: stroke 0.2s ease, stroke-width 0.2s ease; }
.nf-box:hover { stroke: var(--red); stroke-width: 2.5; cursor: default; }

/* ---------- 迷你演示：选项按下反馈 ---------- */
.md-opt { transition: border-color 0.15s, color 0.15s, background 0.15s, transform 0.14s ease; }
.md-opt:active { transform: scale(0.97); }
.md-replay { transition: background 0.15s, color 0.15s, transform 0.14s ease; }
.md-replay:active { transform: scale(0.95); }

/* ---------- FAQ 问题行：hover 缩进微移 ---------- */
.faq-item summary { transition: color 0.2s, padding-left 0.2s ease; }
.faq-item summary:hover { padding-left: 10px; }

/* ---------- Footer 链接：右滑箭头感 ---------- */
.foot-col a { transition: color 0.2s, transform 0.2s ease; }
.foot-col a:hover { transform: translateX(4px); }

/* ---------- 文档卡与仓库链接：hover 已有变色，补位移 ---------- */
.repo-docs a { transition: color 0.2s, border-bottom-color 0.2s; }
.md-speaker { transition: background 0.2s, color 0.2s; }

/* ============================================================
   v10 手作感层 —— 打破公式化：错位旋转 / 手写批注 / 涂鸦箭头 /
   胶带贴纸 / 不规则手绘圆角（全部静态装饰 + 交互触发动效）
   ============================================================ */

/* ---------- 手写批注 + 涂鸦箭头（hero 标题旁） ---------- */
.scribble-note {
  display: inline-flex; align-items: flex-end; gap: 2px;
  font-family: "YuanTi SC", "YouYuan", "幼圆", "Kaiti SC", "STKaiti", "KaiTi", var(--display);
  font-style: normal; font-size: 17px; font-weight: 700;
  color: var(--red); white-space: nowrap;
  transform: rotate(-2.5deg) translateY(-14px);
  margin-left: 14px; opacity: 0.9;
}
.doodle-arrow { width: 44px; height: 30px; color: var(--red); flex-shrink: 0; transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); }
.hero-actions:hover ~ * .doodle-arrow, .scribble-note:hover .doodle-arrow { transform: translateX(5px) rotate(6deg); }

/* ---------- 终端顶部胶带 ---------- */
.term-taped { position: relative; }
.term-taped::before {
  content: ""; position: absolute; top: -11px; left: 50%;
  width: 96px; height: 24px; margin-left: -48px;
  background: rgba(39, 66, 214, 0.5);
  transform: rotate(-3deg);
  clip-path: polygon(4% 0, 96% 6%, 100% 100%, 0 94%);
  border-radius: 2px; backdrop-filter: none;
  box-shadow: 0 1px 2px rgba(74, 61, 68, 0.08);
  z-index: 2; pointer-events: none;
}

/* ---------- 数字条：贴纸串交错旋转，hover 摆正浮起 ---------- */
.stats-grid .stat:nth-child(1) { transform: rotate(-1.6deg); }
.stats-grid .stat:nth-child(2) { transform: rotate(1.1deg) translateY(3px); }
.stats-grid .stat:nth-child(3) { transform: rotate(-0.8deg); }
.stats-grid .stat:nth-child(4) { transform: rotate(1.4deg) translateY(2px); }
.stats-grid .stat:nth-child(5) { transform: rotate(-1.2deg); }
.stats-grid .stat:nth-child(6) { transform: rotate(0.9deg) translateY(3px); }
.stats-grid .stat { transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); }
.stats-grid .stat:hover { transform: rotate(0deg) translateY(-5px) scale(1.04); }

/* ---------- 特性行：交错微旋，hover 摆正 ---------- */
.feat-list li:nth-child(odd) { transform: rotate(-0.35deg); }
.feat-list li:nth-child(even) { transform: rotate(0.35deg); }
.feat-list li:hover { transform: translateX(5px) rotate(0deg); }

/* ---------- 快速开始代码卡：左右微旋，hover 摆正 ---------- */
.quick-grid .code-card:nth-child(odd) { transform: rotate(-0.5deg); }
.quick-grid .code-card:nth-child(even) { transform: rotate(0.5deg); }
.quick-grid .code-card:hover { transform: translate(-3px, -3px) rotate(0deg); }

/* ---------- 区块标签 → 胶带贴纸化 ---------- */
.sec-tag {
  display: inline-block;
  background: rgba(39, 66, 214, 0.22);
  padding: 5px 18px;
  transform: rotate(-1.8deg);
  clip-path: polygon(3% 0, 97% 8%, 100% 100%, 0 92%);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s;
}
.sec-head:hover .sec-tag { transform: rotate(0.5deg) scale(1.05); background: rgba(39, 66, 214, 0.34); }

/* ---------- hero 版本号 → 小贴纸 ---------- */
.hero-meta b {
  display: inline-block;
  background: var(--red); color: #fff;
  font-family: var(--mono);
  padding: 2px 12px; border-radius: 999px;
  transform: rotate(-2deg);
  box-shadow: 2px 2px 0 rgba(39, 66, 214, 0.25);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.hero-meta b:hover { transform: rotate(0deg) scale(1.08); }

/* ---------- CTA 手写批注 ---------- */
.final-cta { position: relative; }
.final-note {
  position: absolute; top: -16px; right: 26px;
  font-family: "YuanTi SC", "YouYuan", "幼圆", "Kaiti SC", "STKaiti", "KaiTi", var(--display);
  font-size: 15.5px; font-weight: 700; color: var(--red);
  transform: rotate(2.2deg);
  display: inline-flex; align-items: center; gap: 5px;
  opacity: 0.92; pointer-events: none;
}
.final-note svg { width: 17px; height: 17px; color: var(--yellow); filter: drop-shadow(0 1px 0 rgba(27, 50, 160, 0.25)); }

/* ---------- 迷你演示舞台：手绘不规则圆角 ---------- */
.md-stage {
  border: 1.5px solid var(--pink-line);
  border-radius: 22px 255px 20px 225px / 225px 20px 255px 22px;
  transition: border-radius 0.35s ease, border-color 0.2s;
}
.md-stage:hover {
  border-radius: 255px 22px 225px 20px / 20px 255px 22px 225px;
  border-color: var(--red);
}

/* ---------- final-cta 手绘圆角 ---------- */
.final-cta {
  border-radius: 28px 225px 28px 255px / 255px 28px 225px 28px;
}
.final-cta:hover { transform: rotate(-0.3deg); }

/* ---------- 响应式：小屏收敛手作元素 ---------- */
@media (max-width: 960px) {
  .scribble-note { display: none; }
  .final-note { position: static; display: flex; justify-content: center; transform: rotate(-1.5deg); margin-bottom: 10px; }
  .stats-grid .stat:nth-child(n) { transform: none; }
  .stats-grid .stat:hover { transform: translateY(-4px); }
  .feat-list li:nth-child(n) { transform: none; }
  .quick-grid .code-card:nth-child(n) { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .stats-grid .stat, .feat-list li, .sec-tag, .hero-meta b, .md-stage, .final-cta { transition: none; }
}

/* ============================================================
   v11 国际化层 —— 黑白骨架 + 克莱因蓝；去除幼稚元素：
   手写批注 / 胶带 / 星标 / 交错旋转 / 波浪 / 贴纸影 / 圆点纹理
   动效保留但收敛为位移与阴影，无旋转
   ============================================================ */

/* 背景：圆点纹理 → 极淡制图网格（静态） */
body::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cpath d='M48 0H0v48' fill='none' stroke='%2316181d' stroke-opacity='0.035'/%3E%3C/svg%3E");
  opacity: 1;
}

/* 隐藏幼稚装饰 */
.wave { display: none; }
.scribble-note, .doodle-arrow, .final-note { display: none !important; }
.term-taped::before { display: none; }
.sec-tag::before { content: none; }

/* 按钮：直角利落化 + hover 去旋转 */
.btn { border-radius: 8px; }
.btn:hover { transform: translate(0, -2px) rotate(0deg); }
.btn:active { transform: translate(0, 0) scale(0.98); }
.btn-primary { background: var(--ink); border-color: var(--ink); }
.btn-primary:hover { background: var(--red); border-color: var(--red); box-shadow: 0 6px 16px rgba(39, 66, 214, 0.24); }
.btn-ghost:hover { box-shadow: 0 6px 16px rgba(22, 24, 29, 0.08); }

/* 终端与代码卡：规则圆角 + 成熟阴影 */
.term, .code-card { border-radius: 10px; border-color: #23262e; box-shadow: 0 10px 28px rgba(22, 24, 29, 0.10); }
.term:hover, .code-card:hover { transform: translate(0, -3px); box-shadow: 0 16px 34px rgba(22, 24, 29, 0.14); border-color: #23262e; }

/* 区块标签：直角小标签（国际主义 caption） */
.sec-tag {
  background: none; padding: 0;
  transform: none; clip-path: none;
  color: var(--red);
  font-weight: 700;
}
.sec-head:hover .sec-tag { transform: none; background: none; }
.section-ink .sec-tag { color: #8fa6ff; }

/* 版本号：mono 描边标签 */
.hero-meta b {
  background: none; color: var(--red);
  border: 1px solid var(--red);
  padding: 1px 10px; border-radius: 4px;
  transform: none; box-shadow: none;
}
.hero-meta b:hover { transform: none; }

/* 数字条：旋转归零 + 实线双细线 + 冷灰底 */
.stats { background: var(--paper-deep); }
.stats .wrap { border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }
.stats-grid .stat:nth-child(1), .stats-grid .stat:nth-child(2), .stats-grid .stat:nth-child(3),
.stats-grid .stat:nth-child(4), .stats-grid .stat:nth-child(5), .stats-grid .stat:nth-child(6) { transform: none; }
.stats-grid .stat:hover { transform: translateY(-4px); }
.stats-grid .stat b { color: var(--ink); }
.stats-grid .stat:hover b { color: var(--red); }
.stats-grid .stat span { color: var(--ink-2); }

/* 特性行 / 快速开始卡：旋转归零 */
.feat-list li:nth-child(odd), .feat-list li:nth-child(even) { transform: none; }
.feat-list li:hover { transform: translateX(5px); }
.feat-list li:hover .feat-no { transform: scale(1.1); color: var(--red); }
.feat-list li:hover .fic { transform: scale(1.14); }
.quick-grid .code-card:nth-child(odd), .quick-grid .code-card:nth-child(even) { transform: none; }
.quick-grid .code-card:hover { transform: translate(0, -3px); }

/* 手绘圆角 → 规则圆角 */
.md-stage { border-radius: 14px; border-color: var(--pink-line); }
.md-stage:hover { border-radius: 14px; border-color: var(--red); }
.final-cta { border-radius: 16px; }
.final-cta:hover { transform: none; }

/* 代码高亮区底色 */
.section-ink { background: var(--code-bg); }
.section-ink .sec-tag { color: #8fa6ff; }
.nodes-band { background: var(--paper-deep); }

/* 节点流程图：蓝墨调 */
.nf-box { fill: var(--paper-raise); stroke: #8d97b8; }
.nf-box:hover { stroke: var(--red); }

/* footer：墨黑底（国际主义收尾） */
.site-footer { background: #14161a; border-top: none; }
.site-footer .footer-inner, footer .foot-brand p { color: #9aa2af; }
footer .foot-col a { color: #8b93a2; }
footer .foot-col a:hover { color: #ffffff; transform: translateX(4px); }
footer .foot-bottom { border-top: 1px solid rgba(255, 255, 255, 0.08); color: #6b7280; }
.foot-col h4, .site-footer .foot-col h4 { color: #e7ecf4; }

/* 迷你演示：成熟化（.md-end-tag 背景规则已删——蓝底蓝字会让 STORY_END 隐形） */
.md-node { color: var(--ink-2); }

/* FAQ / 文档卡 hover 冷灰 */
.faq-item summary:hover { padding-left: 8px; }

/* footer 深色化修正：裸 <footer> 元素选择器 */
footer { background: #14161a; border-top: none; }
footer .footer-inner { color: #9aa2af; }
footer .foot-brand p { color: #9aa2af; }
footer .foot-col h4 { color: #e7ecf4; }
footer .brand-name { color: #e7ecf4; }
footer .brand-mark { color: #fff; }

/* ============================================================
   v11b 对比度修复 —— 深底区文字翻转、footer 链接提亮
   ============================================================ */

/* 分隔点提亮 */
.hero-meta i, .hero-scene i { color: var(--ink-3); }

/* 深底示例区（section-ink）文字全面翻转 */
.section-ink .sec-head h2, .section-ink h2 { color: #e7ecf4; }
.section-ink h2 em { color: #8fa6ff; }
.section-ink .sec-head p, .section-ink p { color: #9aa3b2; }
.section-ink .sec-head p b, .section-ink p b { color: #e7ecf4; }
.section-ink .tab-btn { color: #8b93a2; }
.section-ink .tab-btn:hover { color: #c6ccd8; }
.section-ink .tab-btn.active { color: #8fa6ff; border-bottom-color: #8fa6ff; }
.section-ink .tab-desc { color: #9aa3b2; }
.section-ink .tab-desc b { color: #e7ecf4; }
.section-ink .code-card-head h3 { color: #e7ecf4; }
.section-ink .sec-tag { color: #8fa6ff; }

/* footer 深底：列标题与链接行提亮 */
footer .foot-col b { color: #e7ecf4; }
footer .footer-inner, footer .foot-bottom { color: #9aa3b2; }
.site-footer .footer-inner a, footer .footer-inner a, footer .foot-bottom a { color: #9aa3b2; }
footer .footer-inner a:hover, footer .foot-bottom a:hover { color: #ffffff; }

/* ============================================================
   v12 叙事图谱层 —— 首屏视觉概念化：
   剧情分支图谱 / 大字错位排版 / 描线生长 / 双文字按钮
   （全部为一次性触发动画，无背景循环动画）
   ============================================================ */

/* 选中文本：蓝底反白（细节记忆点） */
::selection { background: #2742d6; color: #ffffff; }

/* ---------- hero：分支图谱背景 ---------- */
.hero { position: relative; overflow: hidden; }
.hero-grid { position: relative; z-index: 1; }
/* 描线生长：加载即播（首屏），一次性 */
@keyframes hbDraw { to { stroke-dashoffset: 0; } }
@keyframes hbPop { from { opacity: 0; transform: scale(0.5); transform-origin: center; transform-box: fill-box; } to { opacity: 1; transform: scale(1); } }
@keyframes hbFade { to { opacity: 0.85; } }

/* ---------- hero 标题：大字 + 第二行错位 + 逐行升起 ---------- */
.hero h1 {
  font-size: clamp(42px, 5.2vw, 68px);
  line-height: 1.1;
  letter-spacing: -0.028em;
  margin-bottom: 24px;
}
.hero h1 em { margin-left: 0.35em; }
.rise { display: inline-block; vertical-align: bottom; }
.rise-i { display: inline-block; opacity: 0; transform: translateY(0.35em); animation: riseUp 0.9s cubic-bezier(0.19, 0.7, 0.22, 1) forwards; }
.rise:nth-of-type(2) .rise-i { animation-delay: 0.14s; }
@keyframes riseUp { from { opacity: 0; transform: translateY(0.35em); } to { opacity: 1; transform: translateY(0); } }
.hero-meta { animation: heroIn 0.7s ease both; }
.hero .sub { animation: heroIn 0.7s ease both; animation-delay: 0.3s; }
.hero-actions { animation: heroIn 0.7s ease both; animation-delay: 0.45s; }
.hero-note, .hero-scene { animation: heroIn 0.7s ease both; animation-delay: 0.6s; }
@keyframes heroIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* 主按钮：hover 变蓝（v11 规则回归） */

/* ---------- 节点流程图：进入视口描线生长 ---------- */
.nodeflow .nf-line { stroke-dasharray: 1; stroke-dashoffset: 1; }
.nodeflow.in .nf-line { animation: hbDraw 1.3s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.nodeflow.in .nf-line:nth-of-type(1) { animation-delay: 0.1s; }
.nodeflow.in .nf-line:nth-of-type(2) { animation-delay: 0.3s; }
.nodeflow.in .nf-line:nth-of-type(3) { animation-delay: 0.5s; }
.nodeflow.in .nf-line:nth-of-type(4) { animation-delay: 0.7s; }
.nodeflow.in .nf-line:nth-of-type(5) { animation-delay: 0.9s; }
.nodeflow.in .nf-line:nth-of-type(6) { animation-delay: 1.1s; }
.nodeflow.in .nf-line:nth-of-type(7) { animation-delay: 1.3s; }
.nodeflow.in .nf-line:nth-of-type(8) { animation-delay: 1.5s; }

/* ---------- 大编号水印：出血放大 ---------- */
.hero[data-wm]::before, .section[data-wm]::before {
  font-size: clamp(170px, 23vw, 330px);
  top: -0.12em;
  right: -1%;
}

/* ---------- 数字条：图纸式竖分隔 ---------- */
.stats-grid { column-gap: 0; }
.stats-grid .stat { padding: 6px 22px; }
.stats-grid .stat + .stat { border-left: 1px solid var(--line); }
@media (max-width: 960px) {
  .stats-grid { column-gap: 18px; }
  .stats-grid .stat { padding: 6px 0; }
  .stats-grid .stat + .stat { border-left: none; }
}

/* ---------- 响应式与动效偏好 ---------- */

@media (prefers-reduced-motion: reduce) {
  .hb-l, .hb-n, .hb-labels, .rise-i, .hero-meta, .hero .sub, .hero-actions, .hero-note, .hero-scene, .nodeflow .nf-line { animation: none !important; }
  .hb-l, .nodeflow .nf-line { stroke-dashoffset: 0; }
  .hb-n, .hb-labels { opacity: 1; }
  .rise-i, .hero-meta, .hero .sub, .hero-actions { transform: none; opacity: 1; }
}

/* ============================================================
   v12b —— 分支图谱（NODE TYPES 区）、EXAMPLES 深底补强、
   移动端标题规则补回
   ============================================================ */

/* ---------- hero 大字（移动端补回） ---------- */
@media (max-width: 960px) {
  .hero h1 { font-size: clamp(36px, 9vw, 52px); }
  .hero h1 em { margin-left: 0.35em; }
}

/* ---------- 分支图谱 ---------- */
.branchmap { margin: 6px 0 36px; }
.branchmap svg { display: block; width: 100%; height: auto; }
.bp-l { fill: none; stroke: #9aa2af; stroke-width: 1.6; }
.bp-blue { stroke: #2742d6; stroke-width: 2.2; }
.bp-n { fill: #ffffff; stroke: #b7bfcc; stroke-width: 1.5; }
.bp-choice { stroke: #2742d6; stroke-width: 2; }
.bp-start { fill: #2742d6; }
.bp-endA { fill: #2742d6; stroke: #2742d6; }
.bp-txt text { font-family: var(--mono); font-size: 13px; fill: #4e5560; text-anchor: middle; }
.bp-txt .w { fill: #ffffff; font-size: 14px; }
.bp-note text { font-family: var(--mono); font-size: 11.5px; fill: #67707d; }
.bp-note text:last-child { fill: #9aa2af; letter-spacing: 0.6px; }

/* 描线生长（进入视口一次性触发，与 nodeflow 同机制） */
.bp-l { stroke-dasharray: 1; stroke-dashoffset: 1; }
.branchmap.in .bp-l { animation: hbDraw 1s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.branchmap.in .bp-lines .bp-l:nth-child(1) { animation-delay: 0.05s; }
.branchmap.in .bp-lines .bp-l:nth-child(2) { animation-delay: 0.2s; }
.branchmap.in .bp-lines .bp-l:nth-child(3) { animation-delay: 0.4s; }
.branchmap.in .bp-lines .bp-l:nth-child(4) { animation-delay: 0.75s; }
.branchmap.in .bp-lines .bp-l:nth-child(5) { animation-delay: 0.5s; }
.branchmap.in .bp-lines .bp-l:nth-child(6) { animation-delay: 0.7s; }
.branchmap.in .bp-lines .bp-l:nth-child(7) { animation-delay: 0.6s; }
.branchmap.in .bp-lines .bp-l:nth-child(8) { animation-delay: 0.85s; }
.bp-n, .bp-start { opacity: 0; transform-box: fill-box; transform-origin: center; }
.branchmap.in .bp-n, .branchmap.in .bp-start { animation: hbPop 0.45s cubic-bezier(0.34, 1.4, 0.64, 1) forwards; }
.branchmap.in .bp-start { animation-delay: 0.02s; }
.branchmap.in .bp-nodes .bp-n:nth-child(1) { animation-delay: 0.3s; }
.branchmap.in .bp-nodes .bp-n:nth-child(2) { animation-delay: 0.45s; }
.branchmap.in .bp-nodes .bp-n:nth-child(3) { animation-delay: 0.6s; }
.branchmap.in .bp-nodes .bp-n:nth-child(4) { animation-delay: 0.75s; }
.branchmap.in .bp-nodes .bp-n:nth-child(5) { animation-delay: 0.9s; }
.branchmap.in .bp-nodes .bp-n:nth-child(6) { animation-delay: 1.05s; }
.branchmap.in .bp-nodes .bp-n:nth-child(7) { animation-delay: 1.2s; }
.branchmap.in .bp-nodes .bp-n:nth-child(8) { animation-delay: 1.35s; }
.branchmap.in .bp-txt, .branchmap.in .bp-note { animation: hbFade 0.7s ease forwards; animation-delay: 1.1s; }
.bp-txt, .bp-note { opacity: 0.92; }
.branchmap .bp-txt, .branchmap .bp-note { opacity: 0; }

/* ---------- EXAMPLES 深底区文字全面翻白（加固，高特异性） ---------- */
.section-ink .sec-head h2, .section-ink .sec-head h2 em { color: #e7ecf4; }
.section-ink .sec-head h2 em { color: #8fa6ff; }
.section-ink .sec-head p, .section-ink .sec-head p b { color: #9aa3b2; }
.section-ink .sec-head p b { color: #e7ecf4; }
.section-ink .sec-tag { color: #8fa6ff; }
.section-ink .tab-btn { color: #99a3b5; }
.section-ink .tab-btn.active { color: #8fa6ff; border-bottom-color: #8fa6ff; }
.section-ink .tab-desc, .section-ink .tab-panel p { color: #9aa3b2; }
.section-ink .tab-desc b, .section-ink .tab-panel p b { color: #e7ecf4; }
.section-ink .code-card-head h3 { color: #e7ecf4; }

@media (max-width: 720px) {
  .branchmap { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .bp-l { stroke-dashoffset: 0 !important; animation: none !important; }
  .bp-n, .bp-start { opacity: 1 !important; animation: none !important; }
  .branchmap .bp-txt, .branchmap .bp-note { opacity: 0.92 !important; animation: none !important; }
}

/* ============================================================
   v13 顶栏刊头化 —— 编辑刊物式导航：
   纯白底 + 1.5px 近黑底线 / mono 编号链接 / 实心 GitCode 按钮
   ============================================================ */

/* 顶栏：纯白 + 始终可见的刊头线 */
.nav { background: #ffffff; }
.nav, .nav.scrolled { border-bottom: 1.5px solid var(--ink); }

/* 品牌区微调 */
.brand-mark { border-radius: 4px; }

/* 导航链接：mono 编号 + 大写节奏 */
.nav-links a { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.02em; }
.nav-links a i {
  font-style: normal; font-family: var(--mono);
  font-size: 9px; font-weight: 700;
  color: var(--ink-3); margin-right: 5px;
  vertical-align: 1.5px;
  transition: color 0.2s;
  letter-spacing: 0.5px;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover i { color: var(--red); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active i { color: var(--red); }

/* GitCode 按钮：实心墨黑小方按钮 */
.nav-cta {
  background: var(--ink); color: #ffffff;
  border: 1px solid var(--ink);
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  letter-spacing: 0.4px;
  padding: 8px 16px; border-radius: 6px;
  box-shadow: none;
}
.nav-cta svg { width: 15px; height: 15px; }
.nav-cta:hover {
  background: var(--red); border-color: var(--red); color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(39, 66, 214, 0.22);
}
.nav-cta:active { transform: translateY(0) scale(0.97); box-shadow: none; }

@media (max-width: 960px) {
  .nav-links a i { display: none; }
}

/* 顶栏空间修正：禁止折行 + 压缩间距
   注意:不得覆盖 padding —— 侧边距必须与 .wrap(0 24px)一致,否则导航与正文错位 */
.nav-inner { gap: 16px; }
.nav-links a { white-space: nowrap; padding: 6px 8px; font-size: 12px; }
.brand-name small { display: none; }
@media (min-width: 1200px) {
  .brand-name small { display: inline; }
}

/* ============================================================
   v14 层：hero「先玩再读」—— 克莱因蓝海报分屏 + 可玩剧情白卡
   ============================================================ */

/* 蓝色海报色块：右侧分屏（::after，与水印 ::before 互不干扰） */
.hero::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 47%;
  background: var(--red);
  z-index: 0;
}

/* 提示语：白色 mono，作为剧情卡下方的脚注行 */
.hero-right { display: flex; flex-direction: column; }
.demo-hint {
  order: 2;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.95);
  margin: 14px 0 0 4px;
  animation: heroIn 0.7s ease both;
  animation-delay: 0.55s;
}

/* hero 右列建立层叠上下文，保证压在色块上；沉底让位给横穿的标题大字 */
.hero-right { position: relative; z-index: 1; align-self: end; }
/* 左列底部留白撑高 hero，使沉底的剧情卡与第二行大字带彻底错开 */
.hero .hero-scene { margin-bottom: 96px; }
@media (max-width: 960px) { .hero .hero-scene { margin-bottom: 0; } }

/* 剧情白卡压在蓝块上：深投影 + 白描边，海报卡构图 */
.md-stage.md-hero {
  position: relative;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 30px 60px rgba(9, 14, 55, 0.38), 0 8px 20px rgba(9, 14, 55, 0.2);
  animation: heroIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 0.65s;
}
/* 蓝底上 hover 不能用 var(--red)（同为克莱因蓝会隐形），改白 */
.md-stage.md-hero:hover { border-color: #ffffff; }
.md-hero .md-head { background: var(--paper-raise); }


/* ---------- 移动端：色块退场，卡片回归纸面 ---------- */
@media (max-width: 960px) {
  .hero::after { display: none; }
  .demo-hint {
    order: 0;
    color: var(--ink-3);
    text-align: center;
    font-size: 12px;
    margin: 0 auto 14px;
  }
  .md-stage.md-hero {
    border: 1.5px solid var(--pink-line);
    box-shadow: 8px 8px 0 rgba(22, 24, 29, 0.1);
  }
  .md-stage.md-hero:hover { border-color: var(--red); }
}

/* ============================================================
   v15 层：v18 海报化 —— 字比栏大 / 跨线翻色 / 描边水印
   （linear-gradient 双 stop 同位 = 硬切双色，非渐变观感）
   ============================================================ */

/* hero 标题脱离栅格：两行双字号，第二行整体压上蓝色海报块 */
.hero h1 {
  width: max-content;
  max-width: none;
  font-size: clamp(42px, 8.2vw, 112px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin-bottom: 26px;
}
.hero-grid > div:first-child { min-width: 0; }
.hero h1 .rise:nth-of-type(1) { font-size: 0.62em; letter-spacing: -0.01em; }
.hero h1 .rise:nth-of-type(2) { margin-left: 0.28em; }

/* 跨线翻色分界点：JS 将蓝块实际左缘校准值写入 em 的 --split-x（像素级），
   calc 仅为 JS 失效时的近似回退 */
.hero {
  --hero-left: max(24px, calc((100vw - var(--maxw)) / 2 + 24px));
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  @media (min-width: 961px) {
    /* 翻色只作用于 em（第二行整体）：clip 背景须挂在直接包裹文字的元素上，
       挂在 h1 上时对嵌套 inline-block 后代失效（Chromium 行为） */
    .hero h1 em {
      --split: var(--split-x, calc(53vw - var(--hero-left) - 0.28em + 0.5px));
      color: transparent;
      background-image: linear-gradient(90deg, var(--red) 0 var(--split), #ffffff var(--split));
      -webkit-background-clip: text;
      background-clip: text;
    }
  }
}

/* 手写批注随第二行进入蓝区：翻白 */
.hero h1 .scribble-note { color: rgba(255, 255, 255, 0.92); }
.hero h1 .scribble-note .doodle-arrow { color: rgba(255, 255, 255, 0.85); }

/* 描边水印：白色空心大字只显形于蓝色块上，压在白卡之下 */
.hero[data-wm]::before {
  color: transparent;
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.16);
  z-index: 1;
}

/* 数字条：display 粗体大数字，年报海报感 */
.stats-grid .stat b {
  font-family: var(--display);
  font-size: clamp(30px, 3.6vw, 52px);
  letter-spacing: -0.02em;
}

/* ---------- 移动端：翻色与描边水印退场，恢复纸面配色 ---------- */
@media (max-width: 960px) {
  .hero h1 .scribble-note { color: var(--red); }
  .hero h1 .scribble-note .doodle-arrow { color: var(--red); }
  .hero[data-wm]::before { color: rgba(39, 66, 214, 0.07); -webkit-text-stroke: 0; }
}

/* 迷你演示 foot 右侧：结局标签与再来一次按钮的间距 */
.md-foot > span:last-child { display: inline-flex; align-items: center; gap: 12px; }

/* ============================================================
   v25 层:hero 节点轨迹 / 选项反馈 / Konami 导览彩蛋
   ============================================================ */

/* ---------- 微缩演示:节点轨迹条 ---------- */
.md-trail {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 9px 16px 3px;
  min-height: 24px;
}
.md-trail .t-node {
  font-family: var(--mono);
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: 0.02em;
  color: var(--ink-3);
  background: rgba(9, 14, 55, 0.05);
  border: 1px solid rgba(9, 14, 55, 0.12);
  border-radius: 5px;
  padding: 1.5px 7px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.md-trail .t-node.cur {
  color: var(--blue);
  border-color: var(--blue);
  background: rgba(39, 66, 214, 0.08);
  font-weight: 700;
}
.md-trail em { font-style: normal; color: rgba(9, 14, 55, 0.25); font-size: 10px; }

/* ---------- 选项点击反馈 ---------- */
.md-opt.picked {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
  transform: translateX(4px);
}
.md-opt.fadeout { opacity: 0.28; }

/* ---------- Konami 导览彩蛋 ---------- */
.egg-hint {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.22);
  margin-top: 14px;
  user-select: none;
  cursor: default;
}
.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(9, 14, 55, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  padding: 24px;
}
.tour-overlay.on { opacity: 1; pointer-events: auto; }
.tour-box {
  width: min(560px, 100%);
  background: var(--paper-raise, #fff);
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 22px 255px 20px 225px / 225px 20px 255px 22px;
  box-shadow: 0 34px 70px rgba(9, 14, 55, 0.45);
  padding: 24px 28px 20px;
  transform: rotate(-1deg) translateY(12px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.tour-overlay.on .tour-box { transform: rotate(-1deg) translateY(0) scale(1); }
.tour-head { display: flex; align-items: center; justify-content: space-between; }
.tour-sp {
  font-family: var(--serif);
  font-weight: 700;
  color: var(--blue);
  font-size: 16px;
}
.tour-x {
  border: none;
  background: none;
  font-size: 22px;
  line-height: 1;
  color: var(--ink-3);
  cursor: pointer;
  padding: 2px 6px;
}
.tour-x:hover { color: var(--red); }
.tour-text {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 2;
  color: var(--ink);
  margin: 10px 0 18px;
}
.tour-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tour-idx {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 1px;
}
.tour-link { text-decoration: none; }

/* 触摸端:暗号可点(连点三次触发彩蛋) */
.egg-hint.tappable { cursor: pointer; transition: color 0.2s; }
.egg-hint.tappable:hover, .egg-hint.tappable:active { color: rgba(255, 255, 255, 0.55); }

/* ---------- 文档区「动手区」双卡 ---------- */
.try-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 34px 0 30px;
}
.try-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  background: var(--paper-raise, #fff);
  border: 2px solid var(--ink);
  border-radius: 14px;
  box-shadow: 0 5px 0 rgba(9, 14, 55, 0.13);
  padding: 20px 24px 18px;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.try-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 9px 0 rgba(9, 14, 55, 0.16);
  border-color: var(--blue);
}
.try-card b {
  font-family: var(--display);
  font-size: 19px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.try-card:hover b { color: var(--blue); }
.try-card span {
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink-2);
}
.try-card i {
  font-family: var(--mono);
  font-style: normal;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--red);
  margin-top: 4px;
}
@media (max-width: 960px) {
  .try-cards { grid-template-columns: 1fr; margin: 26px 0 22px; }
}

/* ============================================================
   v28 层:首页区块折叠手风琴
   ============================================================ */
.acc-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 1.5px;
  color: var(--ink-2);
  background: none;
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 7px 18px;
  cursor: pointer;
  margin-top: 6px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.acc-btn:hover { color: var(--blue); border-color: var(--blue); background: rgba(39, 66, 214, 0.05); }
.acc-btn svg { width: 14px; height: 14px; transition: transform 0.35s; }
.section.acc-closed .acc-btn svg { transform: rotate(-180deg); }
.acc-body {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.5s cubic-bezier(0.3, 0.8, 0.3, 1);
}
.acc-inner { min-height: 0; overflow: hidden; }
.section.acc-closed .acc-body { grid-template-rows: 0fr; }
.section.acc-closed { padding-bottom: 48px; }
.section.acc-closed .sec-head { margin-bottom: 0; }
/* 深色区块(EXAMPLES)按钮适配 */
.section-ink .acc-btn { color: rgba(255, 255, 255, 0.72); border-color: rgba(255, 255, 255, 0.28); }
.section-ink .acc-btn:hover { color: #fff; border-color: rgba(255, 255, 255, 0.7); background: rgba(255, 255, 255, 0.06); }
@media (prefers-reduced-motion: reduce) {
  .acc-body { transition: none; }
}

/* ============================================================
   v30 焦点环策略 —— 鼠标点击不显示焦点框,键盘 Tab 显示虚线环
   （:focus-visible 不被支持的老浏览器整条忽略,保留 UA 默认环兜底）
   ============================================================ */
:focus:not(:focus-visible) { outline: none; }
/* 文本输入类靠自身 border 高亮 + 光标指示焦点,点击/Tab 均不画环 */
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: none; }
/* 触屏:去掉 Android 点击闪烁的半透明蓝色块(tap highlight 不可继承,用通配) */
* { -webkit-tap-highlight-color: transparent; }

/* ============================================================
   v33 彩蛋升级 —— 隐藏剧情:头像 / 节点标签 / 打字机 / choice / 结局卡
   ============================================================ */
.tour-head { gap: 10px; }
.tour-ava { width: 34px; height: 34px; flex: none; image-rendering: pixelated; filter: drop-shadow(0 2px 0 rgba(9, 14, 55, 0.25)); }
.tour-tag {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--red);
  border: 1.5px dashed var(--red);
  border-radius: 6px;
  padding: 2px 8px;
  white-space: nowrap;
}
.tour-text {
  cursor: pointer;
  min-height: 6.5em;   /* 打字机逐字时不跳动 */
}
.tour-choice { border-style: dashed; }
.tour-overlay.tour-endcard .tour-box {
  border-color: var(--red);
}
.tour-overlay.tour-endcard .tour-tag {
  background: var(--red);
  border-style: solid;
  border-color: var(--red);
  color: #fff;
}
.tour-overlay.tour-endcard .tour-idx { color: var(--red); font-weight: 700; }
@media (prefers-reduced-motion: reduce) {
  .tour-text { min-height: 0; }
}

/* ---------- 无障碍:跳到正文(v39) ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--red); color: #fff; padding: 8px 16px;
  border-radius: 0 0 8px 0; font-family: var(--mono); font-size: 13px;
}
.skip-link:focus { left: 0; }
