/* =========================================================
   前端基础设施建设方案 · Claude 官方暖米风格
   style.css —— 主题变量 / 全局 / 布局 / 侧边栏 / Hero / 认知区
   ========================================================= */

: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;

  /* —— 珊瑚橙强调（Claude 品牌色）—— */
  --accent:        #D97757;
  --accent-deep:   #C15F3C;
  --accent-soft:   #F0C9B6;
  --accent-wash:   #F8E9E0;

  /* —— 分层语义色（5 层架构）—— */
  --l1: #C2683E;  /* 研发入口 */
  --l2: #B08534;  /* 工程构建 */
  --l3: #5E8A52;  /* 质量保障 */
  --l4: #45828C;  /* 运行治理 */
  --l5: #7A6BA8;  /* 业务赋能 */

  --serif: "Newsreader", "Noto Serif SC", Georgia, serif;
  --sans:  "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --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; }

.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;
  transition: background .3s, box-shadow .3s;
}
.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: 64ch;
  margin: 0 0 30px;
}

/* ========================= 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(40px, 6.4vw, 76px); line-height: 1.08;
  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.78; color: var(--ink-soft);
  max-width: 62ch; margin: 0 0 36px;
}
.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);} }

/* —— 痛点网格 —— */
.pain-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin: 8px 0 36px;
}
.pain-card {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px; background: var(--bg-card);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 14.5px; color: var(--ink-soft); font-weight: 500;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.pain-card:hover {
  transform: translateY(-4px); box-shadow: var(--shadow-md);
  border-color: var(--accent-soft);
}
.pain-card__icon { font-size: 22px; line-height: 1; filter: saturate(.85); }

/* —— 引用块 —— */
.pullquote {
  margin: 40px 0; padding: 28px 34px;
  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: 20px; line-height: 1.6;
  color: var(--ink);
}
.pullquote strong { color: var(--accent-deep); font-weight: 600; }

/* ===================== 进入动画 ===================== */
.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 启用时隐藏待入场元素，避免禁用 JS / IO 异常导致内容空白 */
.js .reveal-up { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal-up.in { opacity: 1; transform: none; }
/* 网格子项错峰 */
.pain-grid .reveal-up:nth-child(1){transition-delay:.02s}
.pain-grid .reveal-up:nth-child(2){transition-delay:.06s}
.pain-grid .reveal-up:nth-child(3){transition-delay:.10s}
.pain-grid .reveal-up:nth-child(4){transition-delay:.14s}
.pain-grid .reveal-up:nth-child(5){transition-delay:.18s}
.pain-grid .reveal-up:nth-child(6){transition-delay:.22s}
.pain-grid .reveal-up:nth-child(7){transition-delay:.26s}
.pain-grid .reveal-up:nth-child(8){transition-delay:.30s}
.pain-grid .reveal-up:nth-child(9){transition-delay:.34s}

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

/* ===================== 5 层架构交互图 ===================== */
.arch { display: flex; flex-direction: column; gap: 12px; margin: 8px 0 30px; perspective: 1600px; }
.arch-layer {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--c);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow .4s var(--ease), transform .4s var(--ease), border-color .3s;
}
.arch-layer:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.arch-layer.is-open { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.arch-layer__head {
  display: flex; align-items: center; gap: 18px; width: 100%;
  padding: 20px 24px; background: none; border: 0; cursor: pointer;
  text-align: left; font-family: inherit; color: inherit;
}
.arch-layer__num {
  font-family: var(--serif); font-size: 26px; font-weight: 600;
  color: var(--c); opacity: .9; line-height: 1; flex-shrink: 0;
  width: 42px; transition: transform .4s var(--ease);
}
.arch-layer.is-open .arch-layer__num { transform: scale(1.12); }
.arch-layer__main { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.arch-layer__name { font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--ink); }
.arch-layer__desc { font-size: 14px; color: var(--ink-faint); line-height: 1.5; }
.arch-layer__chevron {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--c) 12%, transparent);
  color: var(--c); font-size: 22px; font-weight: 300; line-height: 1;
  transition: transform .4s var(--ease), background .3s;
}
.arch-layer.is-open .arch-layer__chevron { transform: rotate(135deg); background: var(--c); color: #fff; }

.arch-layer__body {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .45s var(--ease);
}
.arch-layer.is-open .arch-layer__body { grid-template-rows: 1fr; }
.arch-layer__inner {
  overflow: hidden;
  display: grid; grid-template-columns: 1fr 1.6fr 1.2fr; gap: 26px;
  padding: 0 24px 0 84px;
}
.arch-layer.is-open .arch-layer__inner { padding-bottom: 24px; padding-top: 4px; border-top: 1px dashed var(--line); margin-top: 0; }

.arch-block h4 {
  margin: 0 0 10px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--c); font-weight: 700;
}
.arch-block p { margin: 0; font-size: 14.5px; color: var(--ink-soft); line-height: 1.7; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span {
  font-size: 12.5px; padding: 4px 11px; border-radius: 7px;
  background: var(--bg-sunken); color: var(--ink-soft);
  border: 1px solid transparent; transition: .25s;
}
.arch-layer.is-open .chips span:hover {
  background: color-mix(in srgb, var(--c) 14%, var(--bg-sunken));
  color: var(--ink); border-color: color-mix(in srgb, var(--c) 30%, transparent);
}

.check-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.check-list li {
  position: relative; padding-left: 24px; font-size: 14px; color: var(--ink-soft); line-height: 1.5;
}
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 5px;
  width: 15px; height: 15px; border-radius: 50%;
  background: color-mix(in srgb, var(--c) 16%, transparent);
}
.check-list li::after {
  content: ""; position: absolute; left: 5px; top: 9px;
  width: 4px; height: 7px; border: solid var(--c); border-width: 0 2px 2px 0;
  transform: rotate(42deg);
}

.arch-hint {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  justify-content: center; font-size: 14px; color: var(--ink-faint);
  margin: 6px 0 0; font-family: var(--serif);
}
.arch-hint__flow {
  padding: 5px 14px; border-radius: 999px;
  background: var(--bg-card); border: 1px solid var(--line);
  color: var(--ink-soft); font-size: 13px;
}

/* ===================== 标准发布流程 ===================== */
.pipeline { position: relative; margin: 10px 0 20px; padding-left: 8px; }
.pipeline__line {
  position: absolute; left: 15px; top: 12px; bottom: 12px; width: 3px;
  background: var(--line-strong); border-radius: 3px; overflow: hidden;
}
.pipeline__fill {
  position: absolute; left: 0; top: 0; width: 100%; height: 0%;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  box-shadow: 0 0 12px rgba(217,119,87,.45);
  transition: height .15s linear;
}
.pipeline__steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pstep {
  position: relative; display: flex; align-items: center; gap: 16px;
  padding: 9px 16px 9px 0; padding-left: 40px; min-height: 30px;
}
.pstep__dot {
  position: absolute; left: 7px; top: 50%; transform: translateY(-50%);
  width: 19px; height: 19px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--line-strong);
  transition: border-color .4s var(--ease), background .4s, transform .3s, box-shadow .4s;
  z-index: 1;
}
.pstep__label {
  font-size: 15px; color: var(--ink-faint); font-weight: 500;
  transition: color .4s, transform .4s var(--ease);
}
.pstep.is-active .pstep__dot {
  border-color: var(--accent); background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-wash); transform: translateY(-50%) scale(1.08);
}
.pstep.is-active .pstep__label { color: var(--ink); transform: translateX(2px); }
.pstep--alert.is-active .pstep__dot { border-color: var(--accent-deep); background: var(--accent-deep); box-shadow: 0 0 0 5px rgba(193,95,60,.18); }
.pstep--alert .pstep__label { font-weight: 600; }

/* ===================== 质量门禁 ===================== */
.gates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 8px 0 24px; }
.gate {
  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;
}
.gate::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--accent-soft);
}
.gate--mid::before { background: color-mix(in srgb, var(--l3) 60%, white); }
.gate--last::before { background: color-mix(in srgb, var(--l4) 60%, white); }
.gate:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.gate__badge {
  display: inline-block; font-size: 11.5px; letter-spacing: .1em;
  padding: 4px 12px; border-radius: 999px; margin-bottom: 14px;
  background: var(--accent-wash); color: var(--accent-deep); font-weight: 600;
}
.gate--mid .gate__badge { background: color-mix(in srgb, var(--l3) 14%, white); color: var(--l3); }
.gate--last .gate__badge { background: color-mix(in srgb, var(--l4) 14%, white); color: var(--l4); }
.gate__title { font-family: var(--serif); font-size: 21px; font-weight: 600; margin: 0 0 6px; color: var(--ink); }
.gate__sub { font-size: 13.5px; color: var(--ink-faint); margin: 0 0 18px; line-height: 1.5; }
.gate__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.gate__list li {
  position: relative; padding-left: 22px; font-size: 14px; color: var(--ink-soft);
  font-family: var(--sans);
}
.gate__list li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 7px; height: 7px;
  border-radius: 2px; background: var(--accent); transform: rotate(45deg);
}
.gate--mid .gate__list li::before { background: var(--l3); }
.gate--last .gate__list li::before { background: var(--l4); }

/* ===================== 支撑体系 ===================== */
.support-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 8px 0 20px; }
.support-card {
  padding: 26px 26px 24px; background: var(--bg-card);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.support-card__title { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 19px; font-weight: 600; margin: 0 0 16px; color: var(--ink); }
.support-card__icon { font-size: 20px; }
.support-card__note { font-size: 13.5px; color: var(--ink-soft); line-height: 1.65; margin: 16px 0 0; }
.support-card__note strong { color: var(--accent-deep); }
.code {
  background: var(--bg-sunken); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 16px 18px; margin: 0;
  font-family: "SFMono-Regular", "JetBrains Mono", Consolas, monospace;
  font-size: 13px; line-height: 1.75; color: var(--ink-soft); overflow-x: auto;
}
.evolve { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.evolve i { color: var(--ink-faint); font-style: normal; }
.evolve__step {
  padding: 7px 14px; border-radius: 8px; font-size: 13.5px; font-weight: 500;
  background: var(--bg-sunken); color: var(--ink-soft); transition: .3s;
}
.evolve__step:hover { transform: translateY(-2px); }
.evolve__step--last { background: var(--accent-wash); color: var(--accent-deep); border: 1px dashed var(--accent-soft); }

/* ===================== 三阶段时间线 ===================== */
.timeline { position: relative; margin: 10px 0 20px; }
.timeline::before { content: ""; position: absolute; left: 19px; top: 14px; bottom: 14px; width: 2px; background: var(--line-strong); }
.tl-item { position: relative; padding-left: 60px; margin-bottom: 22px; }
.tl-marker {
  position: absolute; left: 0; top: 6px; width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-card); border: 2px solid var(--accent); color: var(--accent-deep);
  display: grid; place-items: center; font-family: var(--serif); font-weight: 600; font-size: 18px;
  box-shadow: 0 0 0 5px var(--bg); z-index: 1;
}
.tl-card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 26px; box-shadow: var(--shadow-sm); transition: transform .35s var(--ease), box-shadow .35s;
}
.tl-card:hover { transform: translateX(4px); box-shadow: var(--shadow-md); }
.tl-time { font-size: 12.5px; letter-spacing: .08em; color: var(--accent-deep); font-weight: 600; text-transform: uppercase; }
.tl-title { font-family: var(--serif); font-size: 23px; font-weight: 600; margin: 6px 0 4px; color: var(--ink); }
.tl-goal { font-size: 15px; color: var(--ink-soft); margin: 0 0 18px; }
.tl-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.tl-cols h5 { margin: 0 0 10px; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; }
.tl-cols ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 7px; }
.tl-cols li { position: relative; padding-left: 18px; font-size: 14px; color: var(--ink-soft); line-height: 1.5; }
.tl-cols li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-soft); }
.tl-value {
  margin-top: 18px; padding: 11px 16px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent-wash), var(--bg-soft));
  font-size: 13.5px; color: var(--accent-deep); font-weight: 500;
}

/* ===================== 优先级标签 ===================== */
.prio { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.prio__tabs { display: flex; border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.tab-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 18px 16px; background: none; border: 0; cursor: pointer;
  font-family: var(--sans); font-size: 15px; font-weight: 500; color: var(--ink-faint);
  border-bottom: 2px solid transparent; transition: .3s;
}
.tab-btn:hover { color: var(--ink); background: var(--bg-card); }
.tab-btn.is-active { color: var(--ink); background: var(--bg-card); border-bottom-color: var(--accent); }
.prio__tag { font-family: var(--serif); font-weight: 700; font-size: 14px; padding: 3px 10px; border-radius: 7px; }
.prio__tag--p0 { background: var(--accent-wash); color: var(--accent-deep); }
.prio__tag--p1 { background: color-mix(in srgb, var(--l3) 16%, white); color: var(--l3); }
.prio__tag--p2 { background: color-mix(in srgb, var(--l5) 16%, white); color: var(--l5); }
.prio__panel { display: none; padding: 28px 30px; animation: fade .4s var(--ease); }
.prio__panel.is-active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(8px);} to { opacity: 1; transform: none;} }
.prio__reason { font-size: 15px; color: var(--ink-soft); margin: 0 0 18px; font-style: italic; }
.chips--lg span { font-size: 14px; padding: 8px 16px; background: var(--bg-sunken); border-radius: 999px; }

/* ===================== 衡量指标 ===================== */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 8px 0 20px; }
.metric {
  padding: 22px 20px; background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm); text-align: left;
  transition: transform .35s var(--ease), box-shadow .35s, border-color .3s;
}
.metric:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--accent-soft); }
.metric__val { display: block; font-family: var(--serif); font-size: 30px; font-weight: 600; color: var(--accent); line-height: 1; margin-bottom: 12px; }
.metric__label { display: block; font-size: 14px; color: var(--ink); font-weight: 500; }
.metric__hint { display: block; font-size: 12.5px; color: var(--ink-faint); margin-top: 4px; }

/* ===================== 黄金路径 ===================== */
.golden { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 8px 0 20px; counter-reset: gold; }
.golden__step {
  position: relative; padding: 20px 18px 18px; 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;
}
.golden__step::before {
  counter-increment: gold; content: counter(gold);
  position: absolute; top: 14px; right: 16px; font-family: var(--serif);
  font-size: 14px; font-weight: 600; color: var(--accent-soft);
  width: 24px; height: 24px; border: 1px solid var(--accent-soft); border-radius: 50%;
  display: grid; place-items: center;
}
.golden__step:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.golden__k { display: block; font-family: var(--serif); font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.golden__v { display: block; font-size: 13.5px; color: var(--ink-soft); }

/* ===================== 终章 ===================== */
.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(26px, 3.4vw, 38px);
  line-height: 1.35; margin: 14px 0 26px; position: relative; }
.final__title em { font-style: italic; color: var(--accent); }
.final__lead { font-size: 17px; color: rgba(245,244,238,.7); margin: 0 0 22px; position: relative; }
.final__list { display: flex; flex-wrap: wrap; gap: 12px; position: relative; }
.final__list span {
  font-size: 14.5px; padding: 9px 18px; border-radius: 999px;
  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,.22); border-color: var(--accent); transform: translateY(-2px); }

.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); }

/* ======================== 响应式 ======================== */
@media (max-width: 1080px) {
  .pain-grid, .metrics, .golden { grid-template-columns: repeat(2, 1fr); }
  .gates, .support-grid { grid-template-columns: 1fr; }
  .arch-layer__inner { grid-template-columns: 1fr; gap: 18px; padding-left: 84px; }
  .tl-cols { grid-template-columns: 1fr; gap: 16px; }
}
@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; }
  .metrics, .golden { grid-template-columns: 1fr 1fr; }
  .pain-grid { grid-template-columns: 1fr 1fr; }
  .prio__tabs { flex-direction: column; }
  .final { padding: 40px 26px; }
  .arch-layer__inner { padding-left: 24px; }
}
@media (max-width: 520px) {
  .pain-grid, .metrics, .golden { grid-template-columns: 1fr; }
  .hero { padding-top: 64px; }
  .arch-layer__head { gap: 12px; padding: 16px; }
  .arch-layer__num { font-size: 20px; width: 32px; }
}

/* ===================== 文档切换器（侧边栏顶部互链） ===================== */
.doc-switch {
  display: flex; gap: 4px; padding: 4px;
  background: var(--bg-sunken); border: 1px solid var(--line);
  border-radius: 11px; margin-bottom: 26px;
}
.doc-switch__item {
  flex: 1; text-align: center; text-decoration: none;
  font-size: 12.5px; font-weight: 500; color: var(--ink-faint);
  padding: 8px 6px; border-radius: 8px; line-height: 1.3;
  transition: color .25s, background .25s, box-shadow .25s;
}
.doc-switch__item:hover { color: var(--ink); }
.doc-switch__item.is-current {
  color: var(--accent-deep); background: var(--bg-card);
  box-shadow: var(--shadow-sm); font-weight: 600;
}
.doc-switch__num {
  display: block; font-family: var(--serif); font-size: 11px;
  color: var(--accent); letter-spacing: .06em; margin-bottom: 2px;
}

/* ===================== 阶段卡（手风琴，0-5 阶段） ===================== */
.stages { display: flex; flex-direction: column; gap: 12px; margin: 8px 0 20px; }
.stage {
  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 .4s var(--ease), transform .4s var(--ease);
}
.stage:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stage.is-open { box-shadow: var(--shadow-lg); }
.stage__head {
  display: flex; align-items: center; gap: 18px; width: 100%;
  padding: 20px 24px; background: none; border: 0; cursor: pointer;
  text-align: left; font-family: inherit; color: inherit;
}
.stage__tag {
  flex-shrink: 0; font-family: var(--serif); font-size: 12px; font-weight: 600;
  color: #fff; background: var(--c, var(--accent)); padding: 4px 11px; border-radius: 7px;
  letter-spacing: .04em;
}
.stage__main { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stage__name { font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--ink); }
.stage__goal { font-size: 14px; color: var(--ink-faint); line-height: 1.5; }
.stage__chevron {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--c, var(--accent)) 12%, transparent);
  color: var(--c, var(--accent)); font-size: 20px; line-height: 1;
  transition: transform .4s var(--ease), background .3s;
}
.stage.is-open .stage__chevron { transform: rotate(135deg); background: var(--c, var(--accent)); color: #fff; }
.stage__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.stage.is-open .stage__body { grid-template-rows: 1fr; }
.stage__inner { overflow: hidden; padding: 0 24px 0 66px; }
.stage.is-open .stage__inner { padding-top: 6px; padding-bottom: 24px; border-top: 1px dashed var(--line); }
.stage__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 26px; }
.stage__grid h5 { margin: 0 0 11px; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--c, var(--accent)); font-weight: 700; }
.stage__grid ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.stage__grid li { position: relative; padding-left: 18px; font-size: 14px; color: var(--ink-soft); line-height: 1.55; }
.stage__grid li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: color-mix(in srgb, var(--c, var(--accent)) 50%, transparent); }
.stage__accept { grid-column: 1 / -1; margin-top: 4px; padding: 13px 18px; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--c, var(--accent)) 8%, var(--bg-soft)); }
.stage__accept h5 { color: var(--c, var(--accent)); }
.stage__accept ul { flex-direction: row; flex-wrap: wrap; gap: 6px 18px; }
.stage__accept li { font-size: 13.5px; }

/* ===================== MVP 可勾选清单 ===================== */
.mvp { margin: 8px 0 16px; }
.mvp__bar { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.mvp__track { flex: 1; height: 10px; background: var(--bg-sunken); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.mvp__fill { height: 100%; width: 0%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-deep)); transition: width .5s var(--ease); }
.mvp__count { font-family: var(--serif); font-size: 17px; font-weight: 600; color: var(--accent-deep); white-space: nowrap; }
.mvp__list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; list-style: none; margin: 0; padding: 0; }
.mvp__item {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px; cursor: pointer;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm); transition: border-color .25s, background .25s, transform .25s var(--ease);
  user-select: none;
}
.mvp__item:hover { border-color: var(--accent-soft); transform: translateX(3px); }
.mvp__box {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 6px;
  border: 2px solid var(--line-strong); background: var(--bg);
  display: grid; place-items: center; transition: .25s;
}
.mvp__box svg { width: 13px; height: 13px; opacity: 0; transform: scale(.4); transition: .25s var(--ease); stroke: #fff; }
.mvp__num { flex-shrink: 0; font-family: var(--serif); font-size: 14px; color: var(--ink-faint); width: 20px; }
.mvp__text { font-size: 14.5px; color: var(--ink); font-weight: 500; transition: color .25s; }
.mvp__item.is-done .mvp__box { background: var(--accent); border-color: var(--accent); }
.mvp__item.is-done .mvp__box svg { opacity: 1; transform: none; }
.mvp__item.is-done .mvp__text { color: var(--ink-faint); text-decoration: line-through; text-decoration-color: var(--accent-soft); }
.mvp__item.is-done { background: var(--bg-soft); }

/* ===================== 执行步骤流（18 步 / 时间表） ===================== */
.flow-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 8px 0 16px; counter-reset: fstep; }
.flow-step {
  position: relative; display: flex; align-items: center; gap: 13px;
  padding: 14px 16px; background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.flow-step:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--accent-soft); }
.flow-step__n {
  counter-increment: fstep; flex-shrink: 0;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent-wash); color: var(--accent-deep);
  font-family: var(--serif); font-size: 13px; font-weight: 600;
  display: grid; place-items: center;
}
.flow-step__n::before { content: counter(fstep); }
.flow-step__t { font-size: 13.5px; color: var(--ink-soft); line-height: 1.4; }
.flow-step--key { border-color: var(--accent-soft); background: linear-gradient(135deg, var(--accent-wash), var(--bg-card)); }
.flow-step--key .flow-step__n { background: var(--accent); color: #fff; }

/* 时间表卡片 */
.sched { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 8px 0 16px; }
@media (max-width: 1080px){ .sched { grid-template-columns: 1fr 1fr; } }
.sched__col { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 16px; box-shadow: var(--shadow-sm); }
.sched__when { font-size: 12px; letter-spacing: .06em; color: var(--accent-deep); font-weight: 700; text-transform: uppercase; }
.sched__col h4 { font-family: var(--serif); font-size: 16px; margin: 6px 0 12px; color: var(--ink); }
.sched__col ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.sched__col li { position: relative; padding-left: 14px; font-size: 13px; color: var(--ink-soft); line-height: 1.45; }
.sched__col li::before { content: ""; position: absolute; left: 0; top: 7px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent-soft); }

/* 话术卡 */
.speech { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 8px 0 16px; }
@media (max-width: 820px){ .speech { grid-template-columns: 1fr; } }
.speech__card { position: relative; padding: 28px 30px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent-wash), var(--bg-soft)); border: 1px solid var(--line); }
.speech__card--boss { background: linear-gradient(135deg, #ECF0EC, var(--bg-soft)); }
.speech__who { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-deep); font-weight: 700; margin-bottom: 12px; }
.speech__card--boss .speech__who { color: var(--l3); }
.speech__quote { font-family: var(--serif); font-size: 16px; line-height: 1.7; color: var(--ink); margin: 0; }
.speech__quote::before { content: "“"; font-size: 40px; color: var(--accent-soft); line-height: 0; vertical-align: -12px; margin-right: 4px; }

@media (max-width: 1080px) {
  .stage__grid { grid-template-columns: 1fr; gap: 16px; }
  .flow-steps { grid-template-columns: 1fr 1fr; }
  .mvp__list { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .stage__inner { padding-left: 24px; }
  .flow-steps { grid-template-columns: 1fr; }
}

/* ===================== 接入全站导航（nav.js）时的避让 =====================
   仅当 body 带 .has-qa-nav（由 nav.js 注入）时生效；
   页面独立打开时无此 class，样式完全不变。 */
body.has-qa-nav .sidebar {
  top: 56px;
  height: calc(100vh - 56px);
}
body.has-qa-nav .reading-progress { top: 56px; }
@media (max-width: 768px) {
  /* 移动端全站顶栏隐藏、改用底部 tab 栏（60px），侧栏抽屉与进度条回到顶部 */
  body.has-qa-nav .sidebar { top: 0; height: 100vh; }
  body.has-qa-nav .reading-progress { top: 0; }
}

/* ===================== 章节配图 figure + lightbox ===================== */
.section-figure {
  margin: 0 0 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  cursor: zoom-in;
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.section-figure:hover {
  border-color: var(--accent-soft);
  box-shadow: 0 10px 30px rgba(31,30,29,.10);
  transform: translateY(-2px);
}
.section-figure img { display: block; width: 100%; height: auto; }
.section-figure figcaption {
  padding: 9px 16px;
  font-size: 13px;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 7px;
}
.section-figure figcaption::before {
  content: "图"; font-size: 11px; font-weight: 600;
  color: var(--accent-deep); background: var(--accent-wash);
  padding: 1px 7px; border-radius: 6px; flex: none;
}

/* lightbox 遮罩 */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 4vmin;
  background: rgba(20,20,19,.82);
  backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden;
  transition: opacity .28s, visibility .28s;
  cursor: zoom-out;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: 100%; max-height: 100%;
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(0,0,0,.5);
  transform: scale(.96); transition: transform .28s;
}
.lightbox.is-open img { transform: scale(1); }
.lightbox__close {
  position: absolute; top: 18px; right: 22px;
  width: 40px; height: 40px; border-radius: 50%;
  border: none; cursor: pointer;
  background: rgba(255,255,255,.14); color: #fff;
  font-size: 22px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.lightbox__close:hover { background: rgba(255,255,255,.28); }
