/* =========================================================
   Claude Code 自动模式 · Sonnet 5 审查请求 · Claude 官方暖米风格
   style.css —— 沿用 260620-ai-coding-workflow 体系 + 本页专属组件
   ========================================================= */


:root {
  /* —— Claude 暖米色系 —— */
  --bg:            #FDFDFC;
  --bg-soft:       #FAF9F5;
  --bg-card:       #FFFFFF;
  --bg-sunken:     #EFEDE4;
  --ink:           #2B2A27;
  --ink-soft:      #595650;
  --ink-faint:     #8C887F;
  --line:          #E3E0D6;
  --line-strong:   #D6D2C6;

  /* —— 珊瑚橙强调 —— */
  --accent:        #D97757;
  --accent-deep:   #C15F3C;
  --accent-soft:   #F0C9B6;
  --accent-wash:   #F8E9E0;

  /* —— 三原则色 / 工具色 —— */
  --p1: #C2683E;   /* 拆分 */
  --p2: #B08534;   /* 节制 */
  --p3: #5E8A52;   /* 校准 */
  --t-claude: #D97757;  /* Claude Code */
  --t-codex:  #5E8A52;  /* Codex CLI */

  --serif: "Newsreader", "Noto Serif SC", Georgia, serif;
  --sans:  "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", "JetBrains Mono", "Cascadia Code", Consolas, monospace;

  --maxw: 1180px;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(43,42,39,.05), 0 2px 8px rgba(43,42,39,.04);
  --shadow-md: 0 4px 14px rgba(43,42,39,.07), 0 12px 34px rgba(43,42,39,.06);
  --shadow-lg: 0 10px 30px rgba(43,42,39,.10), 0 30px 60px rgba(43,42,39,.10);
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-wrap: break-word;
}
::selection { background: var(--accent-soft); color: var(--accent-deep); }

/* 噪点 */
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: .035; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* 顶部进度 */
.reading-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%; z-index: 100;
  background: linear-gradient(90deg, var(--accent), var(--accent-deep));
  box-shadow: 0 0 12px rgba(217,119,87,.5);
  transition: width .12s linear;
}

/* ========================= 布局 ========================= */
.layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  max-width: var(--maxw);
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* ====================== 侧边目录 ====================== */
.sidebar {
  position: sticky; top: 0; align-self: start;
  height: 100vh;
  padding: 38px 26px 28px 32px;
  display: flex; flex-direction: column;
  border-right: 1px solid var(--line);
}
.sidebar__brand { display: flex; align-items: center; gap: 10px; margin-bottom: 34px; }
.sidebar__dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-wash);
}
.sidebar__brand-text {
  font-family: var(--serif); font-size: 17px; font-weight: 600;
  letter-spacing: .01em; color: var(--ink);
}

.toc { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.toc__link {
  position: relative;
  font-size: 13.5px; color: var(--ink-faint);
  text-decoration: none; padding: 7px 12px;
  border-radius: 8px;
  transition: color .25s, background .25s, padding .25s var(--ease);
}
.toc__link::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 3px; height: 0; transform: translateY(-50%);
  background: var(--accent); border-radius: 3px;
  transition: height .25s var(--ease);
}
.toc__link:hover { color: var(--ink); background: var(--bg-soft); }
.toc__link.is-active {
  color: var(--accent-deep); font-weight: 500;
  background: var(--accent-wash); padding-left: 18px;
}
.toc__link.is-active::before { height: 18px; }
.toc__num {
  display: inline-block; width: 22px;
  font-family: var(--serif); font-size: 11px;
  color: var(--accent); letter-spacing: .06em;
}

.sidebar__foot {
  margin-top: 22px; padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--ink-faint); letter-spacing: .03em;
}

/* 移动端目录开关 */
.toc-toggle {
  display: none;
  position: fixed; top: 16px; right: 16px; z-index: 120;
  width: 46px; height: 46px; border-radius: 13px;
  background: var(--accent); border: 1px solid var(--accent-deep);
  box-shadow: 0 4px 14px rgba(217,119,87,.35), 0 2px 6px rgba(43,42,39,.12); cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.toc-toggle span { display: block; width: 19px; height: 2px; background: #fff; border-radius: 2px; transition: transform .3s var(--ease), opacity .3s; }
.toc-toggle.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.toc-toggle.is-open span:nth-child(2) { opacity: 0; }
.toc-toggle.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.toc-backdrop {
  display: none; position: fixed; inset: 0; z-index: 105;
  background: rgba(43,42,39,.32); backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none; transition: opacity .35s var(--ease);
}
.toc-backdrop.is-show { opacity: 1; pointer-events: auto; }

/* ======================= 内容区 ======================= */
.content { padding: 0 64px 140px; min-width: 0; }

.section { padding: 78px 0 8px; scroll-margin-top: 28px; }
.section__head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 24px; }
.section__index {
  font-family: var(--serif); font-size: 15px; font-weight: 500;
  color: var(--accent); letter-spacing: .08em;
  padding-top: 4px;
}
.section__title {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(26px, 3.4vw, 36px); line-height: 1.2;
  margin: 0; color: var(--ink); letter-spacing: -.01em;
}
.section__intro {
  font-size: 17px; color: var(--ink-soft); max-width: 78ch;
  margin: 0 0 32px; line-height: 1.85;
}
.section__intro strong { color: var(--ink); font-weight: 600; }
.section__intro code {
  background: var(--bg-sunken); padding: 1px 7px; border-radius: 5px;
  font-family: var(--mono); font-size: 14px; color: var(--accent-deep);
}

/* ========================= HERO ========================= */
.hero {
  position: relative; padding: 96px 0 70px; scroll-margin-top: 0; overflow: hidden;
}
.hero__glow {
  position: absolute; top: -10%; right: -20%; width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(217,119,87,.16), transparent 62%);
  filter: blur(20px); pointer-events: none; z-index: -1;
}
.hero__eyebrow {
  font-size: 13px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent-deep); font-weight: 500; margin: 0 0 22px;
}
.hero__title {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(38px, 5.8vw, 68px); line-height: 1.12;
  letter-spacing: -.02em; margin: 0 0 32px; color: var(--ink);
}
.hero__title span { display: block; }
.hero__title-accent { color: var(--ink-soft); font-weight: 400; }
.hero__title em { font-style: italic; color: var(--accent); }

.hero__lead {
  font-size: 19px; line-height: 1.85; color: var(--ink-soft);
  max-width: 70ch; margin: 0 0 24px;
}
.hero__lead strong { color: var(--ink); font-weight: 600; }
.hero__lead mark {
  background: linear-gradient(180deg, transparent 58%, var(--accent-soft) 58%);
  color: var(--ink); padding: 0 2px; font-weight: 500;
}

.hero__keywords { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 50px; }
.kw {
  font-size: 14px; padding: 7px 16px; border-radius: 999px;
  background: var(--bg-card); border: 1px solid var(--line-strong);
  color: var(--ink-soft); font-weight: 500;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), color .3s, border-color .3s;
}
.kw:hover { transform: translateY(-3px); color: var(--accent-deep); border-color: var(--accent-soft); }

.hero__scroll {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--ink-faint); text-decoration: none; font-size: 14px;
  transition: color .3s;
}
.hero__scroll:hover { color: var(--accent); }
.hero__scroll svg { animation: bob 1.8s var(--ease) infinite; }
@keyframes bob { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(5px);} }


/* —— 引用块 —— */
.pullquote {
  margin: 44px 0; padding: 30px 36px;
  background: linear-gradient(135deg, var(--accent-wash), var(--bg-soft));
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--serif); font-size: 19px; line-height: 1.85;
  color: var(--ink);
}
.pullquote strong { color: var(--accent-deep); font-weight: 600; }
.pullquote em { font-style: italic; color: var(--accent-deep); }

/* ===================== 进入动画 ===================== */
.reveal { opacity: 0; transform: translateY(22px); animation: rise .9s var(--ease) forwards; animation-delay: calc(var(--d,0) * .12s); }
@keyframes rise { to { opacity: 1; transform: none; } }

.js .reveal-up { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal-up.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal, .reveal-up { opacity: 1 !important; transform: none !important; }
}

/* ===================== 三原则卡片（gates 同款） ===================== */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 8px 0 30px; }
.principle {
  position: relative; padding: 26px 24px 24px;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s;
  overflow: hidden;
}
.principle::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--c, var(--accent));
}
.principle:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.principle__tag {
  display: inline-block; font-size: 11.5px; letter-spacing: .12em;
  padding: 4px 12px; border-radius: 999px; margin-bottom: 14px;
  background: color-mix(in srgb, var(--c, var(--accent)) 14%, white);
  color: var(--c, var(--accent)); font-weight: 600;
}
.principle__title { font-family: var(--serif); font-size: 22px; font-weight: 600; margin: 0 0 8px; color: var(--ink); }
.principle__core { font-size: 14.5px; color: var(--ink-faint); margin: 0 0 16px; line-height: 1.6; font-style: italic; }
.principle__desc { font-size: 15.5px; color: var(--ink-soft); margin: 0 0 18px; line-height: 1.85; }
.principle__do { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.principle__do li {
  position: relative; padding-left: 22px; font-size: 14.5px; color: var(--ink-soft); line-height: 1.7;
}
.principle__do li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 7px; height: 7px;
  border-radius: 2px; background: var(--c, var(--accent)); transform: rotate(45deg);
}

/* ===================== 双栏对照（应该 vs 不应该） ===================== */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 8px 0 20px; }
.compare-col {
  padding: 26px 26px 24px; background: var(--bg-card);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.compare-col--do { border-top: 4px solid var(--p3); }
.compare-col--dont { border-top: 4px solid var(--accent); }
.compare-col__title { font-family: var(--serif); font-size: 19px; font-weight: 600; margin: 0 0 18px; display: flex; align-items: center; gap: 10px; }
.compare-col__icon { font-size: 22px; }
.compare-col--do .compare-col__title { color: var(--p3); }
.compare-col--dont .compare-col__title { color: var(--accent-deep); }
.compare-col__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.compare-col__list li {
  position: relative; padding-left: 28px; font-size: 15.5px; color: var(--ink-soft); line-height: 1.8;
}
.compare-col__list li strong { color: var(--ink); font-weight: 600; display: block; margin-bottom: 4px; font-size: 15.5px; }
.compare-col__list li code { font-family: var(--mono); font-size: 13px; background: var(--bg-sunken); padding: 1px 6px; border-radius: 4px; color: var(--accent-deep); }
.compare-col--do .compare-col__list li::before {
  content: "✓"; position: absolute; left: 0; top: 2px; color: var(--p3); font-weight: 700; font-size: 18px;
}
.compare-col--dont .compare-col__list li::before {
  content: "✗"; position: absolute; left: 0; top: 2px; color: var(--accent); font-weight: 700; font-size: 18px;
}

/* ===================== 压缩三步流水线（pipeline 改造） ===================== */
.tri-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 8px 0 22px; counter-reset: tri; }
.tri-step {
  position: relative; padding: 24px 22px 22px;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.tri-step:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--accent-soft); }
.tri-step__num {
  counter-increment: tri;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 16px; font-weight: 600;
  margin-bottom: 12px;
}
.tri-step__num::before { content: "0" counter(tri); }
.tri-step__name { font-family: var(--serif); font-size: 19px; font-weight: 600; color: var(--ink); margin: 0 0 8px; }
.tri-step__sub { font-size: 14px; color: var(--accent-deep); margin: 0 0 16px; font-weight: 500; line-height: 1.6; }
.tri-step__why { font-size: 14.5px; color: var(--ink-soft); margin: 0; line-height: 1.85; }
.tri-step__why strong { color: var(--ink); font-weight: 600; }

/* ===================== 工具对照表 ===================== */
.tools-table {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  margin: 8px 0 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  /* 右侧渐隐提示有可滚动内容 */
  background-image:
    linear-gradient(to right, var(--bg-card) 30%, rgba(255,255,255,0)),
    linear-gradient(to right, rgba(255,255,255,0), var(--bg-card) 70%) 100% 0,
    linear-gradient(to right, rgba(43,42,39,.08), rgba(43,42,39,0)),
    linear-gradient(to right, rgba(43,42,39,0), rgba(43,42,39,.08)) 100% 0;
  background-repeat: no-repeat;
  background-size: 36px 100%, 36px 100%, 14px 100%, 14px 100%;
  background-attachment: local, local, scroll, scroll;
}
.tools-table table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  table-layout: fixed;
}
.tools-table colgroup col:nth-child(1) { width: 130px; }
.tools-table colgroup col:nth-child(2),
.tools-table colgroup col:nth-child(3),
.tools-table colgroup col:nth-child(4) { width: auto; }
.tools-table th, .tools-table td {
  padding: 18px 20px; text-align: left; border-bottom: 1px solid var(--line);
  font-size: 14.5px; line-height: 1.75; vertical-align: top;
  word-break: break-word; overflow-wrap: break-word;
}
.tools-table thead th {
  background: var(--bg-soft); color: var(--ink); font-weight: 600;
  font-size: 14.5px; border-bottom: 2px solid var(--line-strong);
  letter-spacing: .01em;
}
.tools-table thead th:first-child { color: var(--ink-faint); font-weight: 500; font-size: 13px; }
.tools-table thead th.is-claude { color: var(--t-claude); }
.tools-table thead th.is-codex { color: var(--t-codex); }
.tools-table td:first-child {
  color: var(--ink); font-weight: 600;
  background: var(--bg-soft);
  font-size: 13.5px;
  white-space: nowrap;
  letter-spacing: .02em;
}
.tools-table td { color: var(--ink-soft); }
.tools-table td strong { color: var(--ink); font-weight: 600; }
.tools-table tr:last-child td { border-bottom: 0; }
.tools-table code {
  background: var(--bg-sunken); padding: 2px 7px; border-radius: 5px;
  font-family: var(--mono); font-size: 12.5px; color: var(--accent-deep);
  white-space: nowrap;
  word-break: keep-all;
}
.tools-table sup { color: var(--accent-deep); font-weight: 600; font-size: 11px; padding-left: 2px; }
.tools-table sup a { color: inherit; text-decoration: none; }
.tools-table sup a:hover { text-decoration: underline; }

/* Section 07 的 2 列小表格不需要 920px 强制宽度 */
.tools-table--narrow table { min-width: 0; }

/* —— 警示框（Sonnet 1M 踩坑） —— */
.warn-box {
  margin: 20px 0 28px; padding: 24px 28px;
  background: linear-gradient(135deg, #FFF7EE, var(--bg-soft));
  border: 1px solid var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
}
.warn-box__title { font-family: var(--serif); font-size: 17px; font-weight: 600; color: var(--accent-deep); margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.warn-box__body { font-size: 15px; color: var(--ink-soft); line-height: 1.85; margin: 0; }
.warn-box__body strong { color: var(--ink); }
.warn-box__body code { font-family: var(--mono); font-size: 13px; background: var(--bg-sunken); padding: 1px 6px; border-radius: 4px; color: var(--accent-deep); }
.warn-box ul { margin: 10px 0 0; padding-left: 24px; }
.warn-box li { margin-bottom: 6px; font-size: 15px; color: var(--ink-soft); line-height: 1.8; }
.warn-box li strong { color: var(--ink); }
.warn-box li code { font-family: var(--mono); font-size: 13px; background: var(--bg-sunken); padding: 1px 6px; border-radius: 4px; color: var(--accent-deep); }

/* —— 出处脚注 —— */
.sources {
  margin: 20px 0 8px; padding: 18px 22px;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius-sm); font-size: 12.5px; color: var(--ink-soft);
}
.sources h4 { font-family: var(--serif); font-size: 13px; margin: 0 0 10px; color: var(--ink); letter-spacing: .04em; }
.sources ol { margin: 0; padding-left: 22px; }
.sources li { margin-bottom: 5px; line-height: 1.55; }
.sources a { color: var(--accent-deep); text-decoration: none; word-break: break-all; }
.sources a:hover { text-decoration: underline; }

/* ===================== Git 三层安全网（纵向竖叠 + 双栏） ===================== */
.layers { display: flex; flex-direction: column; gap: 20px; margin: 8px 0 28px; }

.git-layer {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--c, var(--accent));
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow .35s var(--ease), transform .35s var(--ease);
}
.git-layer:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.git-layer::before { content: none; }  /* 取消旧的顶部细线 */

/* 顶部 header */
.git-layer__head {
  display: grid;
  grid-template-columns: auto auto 1fr;
  grid-template-areas:
    "badge icon title"
    ".     .    lead";
  gap: 4px 14px;
  align-items: center;
  padding: 22px 28px 18px;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--c, var(--accent)) 10%, var(--bg-card)) 0%,
    var(--bg-card) 60%
  );
  border-bottom: 1px dashed var(--line);
}
.git-layer__badge {
  grid-area: badge;
  display: inline-block; font-size: 11.5px; letter-spacing: .1em;
  padding: 5px 14px; border-radius: 999px;
  background: color-mix(in srgb, var(--c, var(--accent)) 18%, white);
  color: var(--c, var(--accent)); font-weight: 700;
}
.git-layer__icon {
  grid-area: icon;
  font-size: 28px; line-height: 1; display: inline-block;
}
.git-layer__title {
  grid-area: title;
  font-family: var(--serif); font-size: 22px; font-weight: 600;
  margin: 0; color: var(--ink); letter-spacing: -.005em;
}
.git-layer__lead {
  grid-area: lead;
  font-size: 14.5px; color: var(--ink-soft); margin: 6px 0 0; line-height: 1.7;
}
.git-layer__lead code {
  font-family: var(--mono); font-size: 13px;
  background: var(--bg-sunken); padding: 1px 6px; border-radius: 4px;
  color: var(--accent-deep);
}

/* 双栏内容 */
.git-layer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 0;
}
.git-layer__text {
  padding: 22px 28px 26px;
  background: var(--bg-soft);
  border-right: 1px dashed var(--line);
}
.git-layer__code {
  padding: 22px 28px 26px;
  background: var(--bg-card);
  min-width: 0;
}
.git-layer__text h5,
.git-layer__code h5 {
  margin: 0 0 12px;
  font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--c, var(--accent)); font-weight: 700;
}
.git-layer__text p {
  margin: 0; font-size: 14.5px; color: var(--ink-soft); line-height: 1.85;
}
.git-layer__text p strong { color: var(--ink); font-weight: 600; }
.git-layer__text p code {
  font-family: var(--mono); font-size: 13px;
  background: var(--bg-sunken); padding: 1px 6px; border-radius: 4px;
  color: var(--accent-deep);
}
.git-layer__text p a {
  color: var(--c, var(--accent)); text-decoration: none;
  border-bottom: 1px dotted currentColor;
}
.git-layer__text p a:hover { border-bottom-style: solid; }

.git-layer__code pre {
  margin: 0;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.85;
  color: var(--ink-soft);
  /* 关键：允许长行自动换行而不是横向滚动 */
  white-space: pre-wrap;
  word-break: break-all;
  overflow-wrap: anywhere;
  overflow-x: hidden;
}

/* ===================== 终章 ===================== */
.section--final { padding-top: 90px; }
.final {
  position: relative; padding: 56px 50px; border-radius: 22px; overflow: hidden;
  background: linear-gradient(150deg, #2B2A27 0%, #3A352F 100%); color: #F5F4EE;
}
.final__glow { position: absolute; top: -40%; right: -10%; width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(217,119,87,.4), transparent 60%); filter: blur(18px); }
.final .section__index { color: var(--accent-soft); position: relative; }
.final__title {
  font-family: var(--serif); font-weight: 500; font-size: clamp(24px, 3.2vw, 34px);
  line-height: 1.4; margin: 14px 0 26px; position: relative;
}
.final__title em { font-style: italic; color: var(--accent); }
.final__lead { font-size: 16px; color: rgba(245,244,238,.7); margin: 0 0 22px; position: relative; line-height: 1.7; }
.final__list { display: flex; flex-direction: column; gap: 10px; position: relative; }
.final__list span {
  font-size: 15px; padding: 12px 20px; border-radius: 10px;
  background: rgba(245,244,238,.07); border: 1px solid rgba(245,244,238,.14);
  color: #F5F4EE; transition: .3s;
}
.final__list span:hover { background: rgba(217,119,87,.18); border-color: var(--accent); transform: translateX(4px); }

.doc-foot {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 60px; padding-top: 26px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--ink-faint);
}
.doc-foot__dot { color: var(--accent); }

/* ===================== 本页 · 正文段落与行内代码 ===================== */
.para { font-size: 16px; color: var(--ink-soft); line-height: 1.9; margin: 0 0 18px; }
.para strong { color: var(--ink); font-weight: 600; }
.content code {
  background: var(--bg-sunken); padding: 1px 7px; border-radius: 5px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  font-family: var(--mono); font-size: .86em; color: var(--accent-deep);
  overflow-wrap: anywhere;
}
.sub-title {
  font-family: var(--serif); font-size: 21px; font-weight: 600;
  color: var(--ink); margin: 40px 0 14px; letter-spacing: -.005em;
}
.note { font-size: 13.5px; color: var(--ink-faint); line-height: 1.75; margin: -6px 0 24px; }

/* ===================== 两类请求卡（principles 双列） ===================== */
.principles--two { grid-template-columns: repeat(2, 1fr); }
.principle__title code { font-size: .78em; background: none; padding: 0; color: var(--c, var(--accent)); }

/* ===================== 截图 · figure + lightbox ===================== */
figure {
  margin: 8px 0 26px; padding: 18px 18px 0;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 12px; text-align: center; box-shadow: var(--shadow-sm);
}
figure img {
  display: inline-block; max-width: 100%; max-height: 460px;
  width: auto; height: auto; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(43,42,39,.10), 0 0 0 1px rgba(43,42,39,.06);
  cursor: zoom-in;
}
figcaption { padding: 12px 4px 14px; font-size: 13px; color: var(--ink-faint); font-style: italic; line-height: 1.6; }

.lightbox-overlay {
  position: fixed; inset: 0; z-index: 9999; overflow: hidden;
  background: rgba(15, 14, 12, 0); cursor: zoom-out;
  transition: background .35s cubic-bezier(.22, 1, .36, 1);
}
.lightbox-overlay.is-open { background: rgba(15, 14, 12, .88); }
.lightbox-img {
  position: absolute; top: 0; left: 0; transform-origin: 0 0;
  border-radius: 8px; background: #fff; cursor: zoom-out; will-change: transform;
  box-shadow: 0 20px 80px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .06);
  transition: transform .42s cubic-bezier(.22, 1, .36, 1);
}
.lightbox-close {
  position: fixed; top: 20px; right: 24px; width: 40px; height: 40px;
  border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); color: #fff;
  opacity: 0; transition: opacity .35s cubic-bezier(.22, 1, .36, 1), background .2s, border-color .2s;
}
.lightbox-overlay.is-open .lightbox-close { opacity: 1; }
.lightbox-close:hover { background: rgba(255, 255, 255, .24); border-color: rgba(255, 255, 255, .4); }
.lightbox-close svg { width: 18px; height: 18px; }

/* ===================== 官方原文卡 ===================== */
.doc-quotes { display: flex; flex-direction: column; gap: 14px; margin: 8px 0 30px; counter-reset: dq; }
.doc-quote {
  position: relative; padding: 22px 26px 18px 72px;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  transition: box-shadow .3s, border-color .3s;
}
.doc-quote:hover { box-shadow: var(--shadow-md); border-color: var(--accent-soft); }
.doc-quote::before {
  counter-increment: dq; content: counter(dq, decimal-leading-zero);
  position: absolute; left: 24px; top: 20px;
  font-family: var(--serif); font-size: 22px; font-weight: 600; color: var(--accent);
}
.doc-quote__text { font-family: var(--serif); font-size: 18px; line-height: 1.8; color: var(--ink); margin: 0 0 6px; }
.doc-quote__text mark { background: linear-gradient(180deg, transparent 58%, var(--accent-soft) 58%); color: var(--ink); padding: 0 2px; }
.doc-quote__src {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 6px;
  font-size: 12.5px; color: var(--ink-faint); text-decoration: none; letter-spacing: .02em;
  transition: color .25s;
}
.doc-quote__src:hover { color: var(--accent-deep); }

/* ===================== 因果链 ===================== */
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 8px 0 28px; counter-reset: fl; }
.flow__step {
  position: relative; padding: 20px 18px 18px;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
}
.flow__step::before {
  counter-increment: fl; content: "0" counter(fl);
  display: block; margin-bottom: 8px;
  font-family: var(--serif); font-size: 13px; font-weight: 600; color: var(--accent); letter-spacing: .08em;
}
.flow__step:not(:last-child)::after {
  content: "→"; position: absolute; right: -13px; top: 50%; transform: translateY(-50%);
  width: 12px; text-align: center; color: var(--accent); font-weight: 700; z-index: 1;
}
.flow__name { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.55; }
.flow__desc { font-size: 13.5px; color: var(--ink-faint); line-height: 1.65; margin-top: 4px; }

/* ===================== 不审查 / 要审查 对照 ===================== */
.compare-col--skip { border-top: 4px solid var(--p3); }
.compare-col--review { border-top: 4px solid var(--accent); }
.compare-col--skip .compare-col__title { color: var(--p3); }
.compare-col--review .compare-col__title { color: var(--accent-deep); }
.compare-col--skip .compare-col__list li::before {
  content: "✓"; position: absolute; left: 0; top: 2px; color: var(--p3); font-weight: 700; font-size: 18px;
}
.compare-col--review .compare-col__list li::before {
  content: "+"; position: absolute; left: 1px; top: 0; color: var(--accent); font-weight: 700; font-size: 20px;
}
.compare-col__sub { font-size: 13px; color: var(--ink-faint); margin: -10px 0 16px; }

/* ===================== 实测条件 ===================== */
.spec { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; margin: 4px 0 22px; }
.spec__item { padding: 14px 16px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.spec__label { display: block; font-size: 11.5px; letter-spacing: .12em; color: var(--ink-faint); margin-bottom: 4px; }
.spec__value { font-size: 14px; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.spec__value code { font-size: 13px; background: none; padding: 0; color: var(--ink); }

/* 请求序列表 */
.tools-table--seq table { min-width: 640px; }
.tools-table--seq colgroup col:nth-child(1) { width: 52px; }
.tools-table--seq colgroup col:nth-child(2) { width: 170px; }
.tools-table--seq colgroup col:nth-child(3) { width: 82px; }
.tools-table--seq colgroup col:nth-child(4) { width: 84px; }
.tools-table--seq colgroup col:nth-child(5) { width: 108px; }
.tools-table--seq th { white-space: nowrap; }
.tools-table--seq th, .tools-table--seq td { padding: 12px 16px; }
.tools-table--seq td:first-child { font-family: var(--serif); color: var(--ink-faint); text-align: center; }
.tools-table--seq td:nth-child(2) { font-family: var(--mono); font-size: 13px; color: var(--ink); }
.tools-table tr.is-review td { background: var(--accent-wash); }
.tools-table tr.is-review td:first-child { background: color-mix(in srgb, var(--accent-wash) 70%, var(--accent-soft)); color: var(--accent-deep); }
.tools-table tr.is-review td:nth-child(2) { color: var(--accent-deep); font-weight: 600; }
.tools-table .num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ===================== 代码块 + 复制 ===================== */
.code-block {
  position: relative; margin: 6px 0 22px; padding: 18px 76px 18px 20px;
  background: var(--bg-sunken); border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: var(--mono); font-size: 13px; line-height: 1.8; color: var(--ink-soft);
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.code-block__copy {
  position: absolute; top: 10px; right: 10px;
  padding: 4px 10px; border-radius: 6px; cursor: pointer;
  background: var(--bg-card); border: 1px solid var(--line);
  font-size: 11.5px; color: var(--ink-faint); font-family: var(--sans);
  transition: .25s;
}
.code-block__copy:hover { background: var(--accent-wash); color: var(--accent-deep); border-color: var(--accent-soft); }
.code-block__copy.is-done { background: var(--p3); color: #fff; border-color: var(--p3); }
.code-block .hl { color: var(--accent-deep); font-weight: 600; }

/* ===================== 自行验证三步 ===================== */
.tri-step__why code { font-size: 12.5px; }

/* ===================== 费用卡 ===================== */
.cost-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 8px 0 14px; }
.cost-card {
  position: relative; padding: 26px 26px 22px; overflow: hidden;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.cost-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--c, var(--accent)); }
.cost-card__label { font-size: 12px; letter-spacing: .14em; color: var(--c, var(--accent)); font-weight: 700; }
.cost-card__value {
  font-family: var(--serif); font-size: 46px; font-weight: 600; line-height: 1.15;
  color: var(--ink); margin: 8px 0 2px; letter-spacing: -.01em;
}
.cost-card__value small { font-size: 16px; color: var(--ink-faint); font-weight: 400; margin-left: 4px; }
.cost-card__desc { font-size: 14.5px; color: var(--ink-soft); line-height: 1.75; margin: 6px 0 0; }

.facts { list-style: none; margin: 4px 0 24px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.facts li { position: relative; padding-left: 22px; font-size: 15.5px; color: var(--ink-soft); line-height: 1.8; }
.facts li::before {
  content: ""; position: absolute; left: 2px; top: 10px; width: 7px; height: 7px;
  border-radius: 2px; background: var(--accent); transform: rotate(45deg);
}
.facts li strong { color: var(--ink); font-weight: 600; }

.warn-box__quote {
  margin: 0 0 14px; padding: 14px 18px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,.7); border: 1px dashed var(--accent-soft);
  font-family: var(--serif); font-style: italic; font-size: 15.5px; line-height: 1.75; color: var(--ink);
}
.warn-box__body + .warn-box__body { margin-top: 10px; }
.warn-box .code-block { margin: 12px 0 0; background: rgba(255,255,255,.7); }

/* 做法卡：说明在上、配置在下，避免两栏挤压代码 */
.layers .git-layer__grid { grid-template-columns: 1fr; }
.layers .git-layer__text { border-right: 0; border-bottom: 1px dashed var(--line); }
.layers .git-layer__code h5 { text-transform: none; letter-spacing: .04em; font-family: var(--mono); font-size: 12px; }
.git-layer__text p + ul { margin-top: 12px; }
.nowrap { white-space: nowrap; }
.hero__title .nowrap { display: inline; }

/* 做法卡里的代码与列表 */
.git-layer__code .code-block { margin: 0; }
.git-layer__text ul { margin: 12px 0 0; padding-left: 20px; }
.git-layer__text li { font-size: 14.5px; color: var(--ink-soft); line-height: 1.8; margin-bottom: 6px; }
.git-layer__text li strong { color: var(--ink); }

.final__list span strong { color: #fff; font-weight: 600; }
.final .final__lead { color: #EDE9DE; }
.doc-foot { margin-top: 48px; }

/* ===================== 入场错峰 ===================== */
.principles .reveal-up:nth-child(2), .compare .reveal-up:nth-child(2), .cost-grid .reveal-up:nth-child(2) { transition-delay: .08s; }
.flow .reveal-up:nth-child(2) { transition-delay: .06s; }
.flow .reveal-up:nth-child(3) { transition-delay: .12s; }
.flow .reveal-up:nth-child(4) { transition-delay: .18s; }

/* ======================== 响应式 ======================== */
@media (max-width: 1080px) {
  .compare { grid-template-columns: 1fr; }
  .flow { grid-template-columns: repeat(2, 1fr); }
  .flow__step:nth-child(2)::after { content: none; }
  .git-layer__grid { grid-template-columns: 1fr; }
  .git-layer__text { border-right: 0; border-bottom: 1px dashed var(--line); }
}
@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  .toc-toggle { display: flex; }
  .toc-backdrop { display: block; }
  .sidebar {
    position: fixed; left: 0; top: 0; height: 100vh; width: 264px; z-index: 110;
    background: var(--bg-soft); transform: translateX(-100%); transition: transform .35s var(--ease);
    box-shadow: var(--shadow-lg); overflow-y: auto;
  }
  .sidebar.is-open { transform: none; }
  .content { padding: 0 22px 100px; }
  .principles--two, .cost-grid, .tri-steps { grid-template-columns: 1fr; }
  .final { padding: 40px 26px; }
  .tools-table th, .tools-table td { padding: 12px 12px; font-size: 14px; }
  .git-layer__head { padding: 18px 20px 14px; }
  .git-layer__text, .git-layer__code { padding: 18px 20px 20px; }
  .doc-quote { padding: 18px 18px 16px 56px; }
  .doc-quote::before { left: 18px; font-size: 19px; }
  .doc-quote__text { font-size: 16.5px; }
}
@media (max-width: 520px) {
  .hero { padding-top: 64px; }
  .section { padding: 56px 0 8px; }
  .pullquote { padding: 22px 22px; font-size: 17px; }
  .flow { grid-template-columns: 1fr; }
  .flow__step::after { content: none !important; }
  .spec { grid-template-columns: 1fr; }
  .cost-card__value { font-size: 40px; }
  .git-layer__head { grid-template-columns: auto 1fr; grid-template-areas: "badge title" "icon lead"; }
  .git-layer__icon { font-size: 22px; }
  .git-layer__title { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  .lightbox-overlay, .lightbox-img { transition: none; }
}

/* ===================== 接入全站导航（nav.js）时的避让 ===================== */
body.has-qa-nav .sidebar { top: 56px; height: calc(100vh - 56px); }
body.has-qa-nav .reading-progress { top: 56px; }
@media (max-width: 768px) {
  body.has-qa-nav .sidebar { top: 0; height: 100vh; }
  body.has-qa-nav .reading-progress { top: 0; }
}


.inline-link { color: var(--accent-deep); text-decoration: none; border-bottom: 1px dotted currentColor; }
.inline-link:hover { border-bottom-style: solid; }
/* ============================================================
   页面级 footer —— 突破 .layout 1180px 限制，跨整屏宽度
   主 CTA 引流到 vibeapi.cn
   ============================================================ */
.page-footer {
  position: relative;
  z-index: 2;
  margin-top: 24px;
  padding: 64px 0 36px;
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg-sunken) 100%);
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-family: var(--sans);
}
.page-footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 64px;
}
.page-footer__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

/* 品牌区 */
.page-footer__brand {
  display: flex; flex-direction: column; gap: 16px;
}
.page-footer__logo {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 22px;
  color: var(--ink);
  width: max-content;
  transition: opacity .25s;
}
.page-footer__logo:hover { opacity: .85; }
.page-footer__mark {
  width: 28px; height: 28px;
  display: grid; place-items: center; flex-shrink: 0;
}
.page-footer__mark svg { width: 28px; height: 28px; display: block; }
.page-footer__name { font-weight: 400; }
.page-footer__name em { font-style: italic; color: var(--accent); }
.page-footer__tagline {
  font-size: 14.5px;
  color: var(--ink-faint);
  line-height: 1.85;
  max-width: 380px;
  margin: 0;
}
.page-footer__keywords {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 4px;
}
.page-footer__keywords span {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: var(--ink-faint);
  font-weight: 500;
  transition: border-color .25s, color .25s;
}
.page-footer__keywords span:hover {
  border-color: var(--accent-soft); color: var(--accent-deep);
}

/* 主 CTA 区 */
.page-footer__cta {
  display: flex; flex-direction: column; gap: 12px;
  padding: 26px 28px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.page-footer__cta-title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  letter-spacing: -.005em;
}
.page-footer__cta-desc {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.75;
  margin: 0 0 4px;
}
.page-footer__cta-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(217,119,87,.22), 0 1px 3px rgba(193,95,60,.14);
  width: max-content;
  transition: transform .25s var(--ease), box-shadow .25s;
}
.page-footer__cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(217,119,87,.34), 0 2px 6px rgba(193,95,60,.20);
}
.page-footer__cta-btn svg { transition: transform .25s var(--ease); }
.page-footer__cta-btn:hover svg { transform: translateX(3px); }

/* 次要操作 */
.page-footer__minor {
  display: flex; gap: 18px;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.page-footer__minor-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px;
  color: var(--ink-faint);
  text-decoration: none;
  transition: color .25s;
}
.page-footer__minor-link:hover { color: var(--accent-deep); }
.page-footer__minor-link svg { opacity: .7; }

/* 底部版权 */
.page-footer__bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 24px;
  font-size: 13px;
  color: var(--ink-faint);
}
.page-footer__made-with {
  font-family: var(--serif);
  font-style: italic;
}

/* 响应式 */
@media (max-width: 1080px) {
  .page-footer__inner { padding: 0 40px; }
  .page-footer__grid { gap: 36px; }
}
@media (max-width: 820px) {
  .page-footer { padding: 48px 0 32px; }
  .page-footer__inner { padding: 0 22px; }
  .page-footer__grid {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-bottom: 28px;
  }
  .page-footer__cta { padding: 22px 22px; }
  .page-footer__cta-title { font-size: 17px; }
  .page-footer__cta-btn { padding: 11px 20px; font-size: 14.5px; width: 100%; }
  .page-footer__bottom {
    flex-direction: column; gap: 10px; align-items: flex-start;
    padding-top: 20px;
  }
}

/* 与全站底部 tabbar（nav.js 注入）避让 */
@media (max-width: 768px) {
  body.has-qa-nav .page-footer { padding-bottom: 92px; }
}
