/* =============================================================
   260703-claude-model-guide
   定制 showcase 页 · 仿 260630-max-output-tokens 设计语言
   Claude 模型使用最佳实践（sol 5 / terra 4.8 / luna 5 / Haiku 4.5）
   ============================================================= */

:root {
  /* ---- 排版 ---- */
  --serif: "Anthropic Serif", "Noto Serif SC", Georgia, serif;
  --sans: "Anthropic Sans", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* ---- 亮色 token ---- */
  --bg: #FDFDFC;
  --bg-soft: #f2efe4;
  --bg-card: #fffdf7;
  --bg-warm: #f5f1e3;
  --ink: #141413;
  --ink-soft: #3d3d3a;
  --ink-faint: #6f6e66;
  --line: rgba(31, 30, 29, 0.13);
  --line-strong: rgba(31, 30, 29, 0.22);
  --accent: #d97757;
  --accent-deep: #b85a3d;
  --accent-soft: #f1d8c8;
  --accent-wash: #fbe9dd;
  --shadow-sm: 0 1px 2px rgba(20, 20, 19, 0.04), 0 1px 3px rgba(20, 20, 19, 0.05);
  --shadow-md: 0 2px 6px rgba(20, 20, 19, 0.06), 0 10px 28px rgba(20, 20, 19, 0.08);
  --shadow-glow: 0 10px 40px rgba(217, 119, 87, 0.18);
  --radius: 14px;
  --radius-lg: 22px;

  /* ---- 语义色（callout / tag 用） ---- */
  --green: #3a8a5e;
  --green-bg: #e6f1ea;
  --amber: #b8791f;
  --amber-bg: #f7ecd8;
  --red: #c2482f;
  --red-bg: #fbe7e2;

  /* ---- 模型分层色（本篇专属） ---- */
  --tier-sol: #7c5cbf;
  --tier-sol-bg: #efe9f9;
  --tier-terra: #d97757;
  --tier-terra-bg: #fbe9dd;
  --tier-luna: #3a7bd5;
  --tier-luna-bg: #e3edfa;
  --tier-haiku: #3a8a5e;
  --tier-haiku-bg: #e6f1ea;
}

[data-theme="dark"] {
  --bg: #262624;
  --bg-soft: #1f1e1c;
  --bg-card: #30302e;
  --bg-warm: #2e2c28;
  --ink: #faf9f5;
  --ink-soft: #c2c0b6;
  --ink-faint: #93918a;
  --line: rgba(222, 220, 209, 0.13);
  --line-strong: rgba(222, 220, 209, 0.22);
  --accent: #e08b6b;
  --accent-deep: #f0a487;
  --accent-soft: rgba(217, 119, 87, 0.22);
  --accent-wash: rgba(217, 119, 87, 0.12);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.35), 0 10px 28px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 10px 40px rgba(217, 119, 87, 0.25);

  --green: #6fb890;
  --green-bg: rgba(58, 138, 94, 0.16);
  --amber: #e0af5a;
  --amber-bg: rgba(184, 121, 31, 0.16);
  --red: #e8836a;
  --red-bg: rgba(194, 72, 47, 0.18);

  --tier-sol: #b49ae0;
  --tier-sol-bg: rgba(124, 92, 191, 0.18);
  --tier-terra: #e08b6b;
  --tier-terra-bg: rgba(217, 119, 87, 0.16);
  --tier-luna: #7fb0ec;
  --tier-luna-bg: rgba(58, 123, 213, 0.18);
  --tier-haiku: #6fb890;
  --tier-haiku-bg: rgba(58, 138, 94, 0.16);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.75;
  transition: background 0.4s ease, color 0.4s ease;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }

/* ---- 全局滚动条美化（兜底） ---- */
* { scrollbar-width: thin; scrollbar-color: var(--accent-soft) transparent; }
*::-webkit-scrollbar { width: 8px; height: 6px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--accent-soft); border-radius: 999px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--accent); background-clip: content-box; border: 2px solid transparent; }
*::-webkit-scrollbar-corner { background: transparent; }

/* ---- 全局装饰：噪点纸张纹理 ---- */
.grain {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
  opacity: 0.4;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2'/><feColorMatrix values='0 0 0 0 0.08, 0 0 0 0 0.08, 0 0 0 0 0.08, 0 0 0 0.04 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
[data-theme="dark"] .grain { opacity: 0.5; mix-blend-mode: screen; }

/* ---- 顶部阅读进度条 ---- */
.reading-progress {
  position: fixed; top: 0; left: 0;
  height: 3px; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-deep));
  z-index: 1000;
  transition: width 0.15s ease-out;
  box-shadow: 0 0 12px var(--accent-soft);
}

/* =============================================================
   Layout · sidebar + content
   ============================================================= */
.layout {
  position: relative;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  max-width: 1320px;
  margin: 0 auto;
  z-index: 1;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  padding: 38px 26px 28px 32px;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

/* nav.js 注入固定顶栏（56px）时，桌面端侧栏吸顶位置与高度同步下移，避免顶部一行被顶栏遮住 */
@media (min-width: 769px) {
  body.has-qa-nav .sidebar { top: 56px; height: calc(100vh - 56px); }
}

.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); flex-shrink: 0; }
.sidebar__brand-text { font-family: var(--serif); font-size: 17px; font-weight: 600; letter-spacing: 0.01em; color: var(--ink); }

.toc { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.toc__link {
  position: relative;
  display: flex; align-items: center; gap: 0;
  font-size: 14px; color: var(--ink-faint);
  text-decoration: none;
  padding: 9px 12px; border-radius: 8px;
  transition: color 0.25s, background 0.25s, padding 0.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 0.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: 28px; font-family: var(--serif); font-size: 12px; color: var(--ink-faint); letter-spacing: 0.06em; }
.toc__link.is-active .toc__num { color: var(--accent); }

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

/* 移动端目录开关 */
.toc-toggle {
  display: none;
  position: fixed; top: 16px; right: 16px;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  z-index: 1100;
  align-items: center; justify-content: center;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}
.toc-toggle span { width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.3s, opacity 0.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; background: rgba(20, 20, 19, 0.4); z-index: 1050; opacity: 0; transition: opacity 0.3s; }
.toc-backdrop.is-open { opacity: 1; }

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

.section { padding: 88px 0 8px; scroll-margin-top: 28px; position: relative; }
.section__head { display: flex; align-items: flex-end; gap: 18px; margin-bottom: 30px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.section__index { font-family: var(--serif); font-size: 64px; line-height: 1; color: var(--accent); letter-spacing: -0.04em; font-weight: 500; font-style: italic; opacity: 0.85; }
.section__title { font-family: var(--serif); font-size: clamp(24px, 3.2vw, 32px); font-weight: 500; letter-spacing: -0.018em; line-height: 1.2; color: var(--ink); }
.section__intro { font-size: 17px; color: var(--ink-soft); margin-bottom: 24px; line-height: 1.75; }

/* ---- 正文排版 ---- */
.content p { font-size: 16px; color: var(--ink-soft); margin-bottom: 20px; line-height: 1.85; }
.content strong { color: var(--ink); font-weight: 600; }
.content ul { margin: 16px 0 26px; padding-left: 26px; }
.content li { font-size: 15.5px; color: var(--ink-soft); margin-bottom: 11px; line-height: 1.8; padding-left: 4px; }
.content li:last-child { margin-bottom: 0; }
.content li strong { color: var(--ink); }
.content h3 { font-family: var(--serif); font-size: 21px; font-weight: 500; letter-spacing: -0.012em; color: var(--ink); margin: 46px 0 18px; }

.content code { font-family: var(--mono); background: var(--bg-warm); color: var(--accent-deep); padding: 2px 6px; border-radius: 5px; font-size: 0.88em; }
.content pre {
  background: var(--bg-soft); color: var(--ink);
  padding: 20px 24px; border-radius: var(--radius);
  overflow-x: auto; font-size: 13px; line-height: 1.72;
  margin: 22px 0 28px; font-family: var(--mono);
  white-space: pre-wrap; word-break: break-word; overflow-wrap: break-word;
  scrollbar-width: thin; scrollbar-color: var(--accent-soft) transparent;
}
.content pre::-webkit-scrollbar { height: 6px; width: 6px; }
.content pre::-webkit-scrollbar-track { background: transparent; }
.content pre::-webkit-scrollbar-thumb { background: var(--accent-soft); border-radius: 999px; }
.content pre::-webkit-scrollbar-thumb:hover { background: var(--accent); }
.content pre code { background: none; padding: 0; font-size: inherit; color: inherit; }
.content pre .cm { color: var(--ink-faint); font-style: italic; }
.content pre .hl { color: var(--accent-deep); font-weight: 600; }
.content pre .ok { color: var(--green); }
.content pre .bad { color: var(--red); }
.content pre .str { color: var(--green); }
.content pre .key { color: var(--tier-luna); }

/* ---- Hero ---- */
.hero { position: relative; padding: 96px 0 56px; overflow: hidden; }
.hero__glow {
  position: absolute; top: -140px; right: -120px;
  width: 520px; height: 520px;
  background: radial-gradient(circle at center, var(--accent-soft) 0%, transparent 65%);
  pointer-events: none; filter: blur(8px); opacity: 0.85;
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-deep); margin-bottom: 22px;
  padding: 5px 14px 5px 10px;
  background: var(--accent-wash); border-radius: 999px;
}
.hero__eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hero__title { font-family: var(--serif); font-size: clamp(32px, 5vw, 52px); line-height: 1.2; letter-spacing: -0.02em; font-weight: 500; color: var(--ink); margin-bottom: 28px; max-width: 880px; }
.hero__title span { display: block; }
.hero__title-accent { color: var(--accent-deep); font-style: italic; }
.hero__lead { font-size: 18px; color: var(--ink-soft); line-height: 1.7; max-width: 720px; margin-bottom: 30px; }
.hero__lead mark { background: linear-gradient(180deg, transparent 55%, var(--accent-wash) 55%); color: var(--ink); padding: 0 2px; }
.hero__keywords { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.kw { font-size: 13px; padding: 6px 14px; background: var(--bg-card); border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); transition: color 0.2s, background 0.2s, border-color 0.2s; }
.kw:hover { color: var(--accent-deep); background: var(--accent-wash); border-color: var(--accent-soft); }
.hero__scroll { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; padding: 8px 18px; border-radius: 999px; background: var(--bg-card); border: 1px solid var(--line); font-size: 13px; color: var(--ink-soft); transition: background 0.2s, color 0.2s, border-color 0.2s; }
.hero__scroll:hover { background: var(--accent-wash); border-color: var(--accent-soft); color: var(--accent-deep); }
.hero__scroll svg { animation: bob 2s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(3px); } }

/* ---- 表格（仅行底线，无外框） ---- */
.content table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; margin: 22px 0 30px; background: transparent; }
.content table th { background: var(--bg-warm); color: var(--ink); font-weight: 600; text-align: left; padding: 13px 16px; font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; border-bottom: 1px solid var(--line-strong); }
.content table td { padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--ink-soft); vertical-align: top; line-height: 1.65; }
.content table tr:last-child td { border-bottom: none; }
.content table tr:hover td { background: var(--bg-warm); }
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); margin: 22px 0 30px; }
.table-wrap table { margin: 0; }

/* ---- callout（无边框，仅左 3px） ---- */
.callout { margin: 24px 0; padding: 20px 26px; border-radius: 12px; background: var(--bg-warm); font-size: 15px; color: var(--ink-soft); line-height: 1.78; }
.callout p { margin-bottom: 0; }
.callout p + p { margin-top: 12px; }
.callout strong { color: var(--ink); }
.callout ul { margin: 10px 0 0; }
.callout li { margin-bottom: 9px; }
.callout--warn { border-left: 3px solid var(--red); background: var(--red-bg); }
.callout--note { border-left: 3px solid var(--line-strong); }
.callout--fact { border-left: 3px solid var(--green); background: var(--green-bg); }
.callout--insight { border-left: 3px solid var(--amber); background: var(--amber-bg); }

/* ---- tag（表格内小标签） ---- */
.tag { display: inline-block; padding: 2px 10px; border-radius: 6px; font-size: 12px; font-weight: 500; }
.tag--ok { background: var(--green-bg); color: var(--green); }
.tag--no { background: var(--red-bg); color: var(--red); }
.tag--warn { background: var(--amber-bg); color: var(--amber); }

/* =============================================================
   页面专属组件（本篇）
   模型分层 pill / 定价卡 / 选型决策卡 / effort 档位阶梯 / 判断法
   ============================================================= */

/* ---- 模型 pill（贯穿全文的模型标识小胶囊） ---- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 11px 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600; font-family: var(--sans); letter-spacing: 0.01em; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.pill--sol { background: var(--tier-sol-bg); color: var(--tier-sol); }
.pill--sol::before { background: var(--tier-sol); }
.pill--terra { background: var(--tier-terra-bg); color: var(--accent-deep); }
.pill--terra::before { background: var(--accent); }
.pill--luna { background: var(--tier-luna-bg); color: var(--tier-luna); }
.pill--luna::before { background: var(--tier-luna); }
.pill--haiku { background: var(--tier-haiku-bg); color: var(--tier-haiku); }
.pill--haiku::before { background: var(--tier-haiku); }

/* 悬停联动：全文同模型 pill 呼应高亮，其余淡化（JS 在 body 上加 .pill-link-* 触发） */
.pill { transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), opacity 0.2s var(--ease); }
body[class*="pill-link-"] .pill { opacity: 0.32; }
body.pill-link-sol  .pill--sol,
body.pill-link-terra   .pill--terra,
body.pill-link-luna .pill--luna,
body.pill-link-haiku  .pill--haiku {
  opacity: 1; transform: translateY(-1px);
}
body.pill-link-sol  .pill--sol  { box-shadow: 0 0 0 2px var(--tier-sol); }
body.pill-link-terra   .pill--terra   { box-shadow: 0 0 0 2px var(--accent); }
body.pill-link-luna .pill--luna { box-shadow: 0 0 0 2px var(--tier-luna); }
body.pill-link-haiku  .pill--haiku  { box-shadow: 0 0 0 2px var(--tier-haiku); }
@media (prefers-reduced-motion: reduce) {
  .pill { transition: opacity 0.2s ease; }
  body[class*="pill-link-"] .pill--sol,
  body[class*="pill-link-"] .pill--terra,
  body[class*="pill-link-"] .pill--luna,
  body[class*="pill-link-"] .pill--haiku { transform: none; }
}

/* ---- 定价对比表：四模型同轴比价（$50 为满值刻度，跨行可直接比长度） ---- */
.pricetable {
  margin: 24px 0 10px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--bg-card);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.pricetable__head {
  display: grid; grid-template-columns: minmax(180px, 1.1fr) 1.4fr;
  gap: 24px; padding: 12px 26px;
  background: var(--bg-warm);
  border-bottom: 1px solid var(--line);
  font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600;
}
.pricetable__head span:last-child { display: flex; justify-content: space-between; }
.pricetable__head em { font-style: normal; }

.ptrow {
  display: grid; grid-template-columns: minmax(180px, 1.1fr) 1.4fr;
  gap: 24px; align-items: center;
  padding: 20px 26px;
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: background 0.25s;
}
.ptrow:last-child { border-bottom: none; }
.ptrow::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.ptrow--sol::before { background: var(--tier-sol); }
.ptrow--terra::before { background: var(--accent); }
.ptrow--luna::before { background: var(--tier-luna); }
.ptrow--haiku::before { background: var(--tier-haiku); }
.ptrow:hover { background: var(--bg-warm); }

/* terra 主推行高亮 */
.ptrow--hl { background: var(--accent-wash); }
.ptrow--hl:hover { background: var(--accent-wash); }

.ptrow__info { min-width: 0; }
.ptrow__top { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; flex-wrap: wrap; }
.ptrow__name { font-family: var(--serif); font-size: 19px; font-weight: 600; color: var(--ink); }
.ptrow__flag { font-size: 10px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--accent); color: #fff; }
.ptrow__id { font-family: var(--mono); font-size: 11.5px; color: var(--ink-faint); margin-bottom: 8px; }
.ptrow__desc { font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; }
.ptrow__desc strong { color: var(--ink); }
.ptrow__ctx { display: inline-block; margin-top: 8px; font-family: var(--mono); font-size: 11.5px; color: var(--ink-faint); }

/* 价格条区（输入 / 输出各一条，同一 $50 满值刻度） */
.ptrow__bars { display: flex; flex-direction: column; gap: 12px; }
.ptbar { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px; }
.ptbar__lab { font-size: 11px; letter-spacing: 0.03em; color: var(--ink-faint); }
.ptbar__track { position: relative; height: 10px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 9%, transparent); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; transition: background 0.25s; }
.ptbar__fill { position: absolute; left: 0; top: 0; height: 100%; width: 0; border-radius: 999px; transition: width 1.1s var(--ease); }
.ptbar__fill--in  { opacity: 0.55; }
.ptrow--sol  .ptbar__fill { background: var(--tier-sol); }
.ptrow--terra   .ptbar__fill { background: var(--accent); }
.ptrow--luna .ptbar__fill { background: var(--tier-luna); }
.ptrow--haiku  .ptbar__fill { background: var(--tier-haiku); }
/* hover / 高亮行下，轨道底色再压深一档，始终与行背景保持对比 */
.ptrow:hover .ptbar__track,
.ptrow--hl .ptbar__track { background: color-mix(in srgb, var(--ink) 14%, transparent); }
.ptbar__num { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--ink); min-width: 42px; text-align: right; font-variant-numeric: tabular-nums; }
.ptbar__num s { color: var(--ink-faint); text-decoration: none; font-size: 10.5px; display: block; line-height: 1; margin-top: 2px; }

/* 入场前：条为 0，由 JS 加 .is-lit 触发伸长 */
.pricetable:not(.is-lit) .ptbar__fill { width: 0 !important; }

@media (max-width: 720px) {
  .pricetable__head { display: none; }
  .ptrow { grid-template-columns: 1fr; gap: 14px; padding: 18px 20px 18px 22px; }
}

/* ---- 选型决策卡（一句话判断法 · 分支阶梯） ---- */
.decide { margin: 22px 0 8px; display: flex; flex-direction: column; gap: 0; }
.decide__step { position: relative; display: flex; gap: 18px; padding: 0 0 26px 0; }
.decide__step:last-child { padding-bottom: 0; }
.decide__rail { position: relative; flex-shrink: 0; width: 34px; display: flex; flex-direction: column; align-items: center; }
.decide__node { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-size: 15px; font-weight: 600; color: #fff; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-wash); z-index: 1; }
.decide__step:not(:last-child) .decide__rail::after { content: ""; position: absolute; top: 34px; bottom: -8px; width: 2px; background: var(--line-strong); }
.decide__body { flex: 1; padding-top: 3px; }
.decide__cond { font-family: var(--serif); font-size: 17px; font-weight: 500; color: var(--ink); margin-bottom: 6px; }
.decide__then { font-size: 14px; color: var(--ink-soft); line-height: 1.6; }
.decide__then .pill { vertical-align: middle; }

/* 入场动画：连线自上而下画出 + 节点依次弹入（JS 加 .is-lit 触发） */
.decide--anim .decide__node { transform: scale(0); transition: transform 0.42s var(--ease); }
.decide--anim.is-lit .decide__node { transform: scale(1); }
.decide--anim .decide__step:not(:last-child) .decide__rail::after {
  transform-origin: top; transform: scaleY(0); transition: transform 0.5s ease; transition-delay: var(--rail-delay, 0s);
}
.decide--anim.is-lit .decide__step:not(:last-child) .decide__rail::after { transform: scaleY(1); }
.decide--anim .decide__body { opacity: 0; transform: translateY(10px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.decide--anim.is-lit .decide__body { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .decide--anim .decide__node { transform: scale(1); }
  .decide--anim .decide__step:not(:last-child) .decide__rail::after { transform: scaleY(1); }
  .decide--anim .decide__body { opacity: 1; transform: none; }
}

/* ---- effort 档位阶梯 ---- */
.effort { display: flex; flex-direction: column; gap: 8px; margin: 20px 0 8px; }
.effort__row {
  display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: 16px;
  padding: 13px 18px; border-radius: 11px; background: var(--bg-card);
  border: 1px solid var(--line); transition: transform 0.22s var(--ease), border-color 0.22s;
}
.effort__row:hover { transform: translateX(4px); border-color: var(--accent-soft); }
.effort__row.is-default { border-color: var(--accent-soft); background: var(--accent-wash); }
.effort__tier { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--accent-deep); }
.new-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  vertical-align: middle;
}
.effort__desc { font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }
.effort__desc b { color: var(--ink); }
.effort__cost { font-size: 11.5px; font-weight: 600; letter-spacing: 0.03em; color: var(--ink-faint); white-space: nowrap; text-align: right; }
.effort__bars { display: inline-flex; gap: 3px; margin-left: 6px; vertical-align: middle; }
.effort__bars i { width: 4px; height: 12px; border-radius: 2px; background: var(--line-strong); display: inline-block; }
.effort__bars i.on { background: var(--accent); }

/* 入场动画：整条逐档浮入 + 条形逐格点亮（JS 加 .is-lit 触发） */
.effort--anim .effort__row { opacity: 0; transform: translateY(14px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), border-color 0.22s, background 0.22s; }
.effort--anim.is-lit .effort__row { opacity: 1; transform: none; }
.effort--anim.is-lit .effort__row:hover { transform: translateX(4px); }
.effort--anim .effort__bars i.on { background: var(--line-strong); transition: background 0.28s var(--ease); }
.effort--anim.is-lit .effort__bars i.on { background: var(--accent); }
/* high 档着地后的轻脉冲（有限次，克制） */
.effort--anim.is-lit .effort__row.is-default { animation: effortPulse 1.1s var(--ease) 0.9s 2; }
@keyframes effortPulse {
  0%, 100% { box-shadow: 0 0 0 0 transparent; }
  50% { box-shadow: 0 0 0 4px var(--accent-soft); }
}
@media (prefers-reduced-motion: reduce) {
  .effort--anim .effort__row { opacity: 1; transform: none; }
  .effort--anim .effort__bars i.on { background: var(--accent); }
  .effort--anim.is-lit .effort__row.is-default { animation: none; }
}

/* ---- 一句话判断法条 ---- */
.oneliner {
  position: relative; margin: 22px 0; padding: 24px 28px;
  border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--accent-wash), var(--bg-warm));
  border: 1px solid var(--accent-soft); overflow: hidden;
}
.oneliner__glow { position: absolute; top: -60%; right: -6%; width: 300px; height: 300px; background: radial-gradient(circle, var(--accent-soft), transparent 65%); filter: blur(14px); pointer-events: none; opacity: 0.7; }
.oneliner__label { position: relative; display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-deep); margin-bottom: 10px; }
.oneliner__text { position: relative; font-family: var(--serif); font-size: clamp(17px, 2.4vw, 21px); line-height: 1.6; color: var(--ink); font-weight: 500; }
.oneliner__text strong { color: var(--accent-deep); font-weight: 700; }

/* ---- 代码对照（正确 vs 错误 / 迁移前后） ---- */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0; }
.compare > div { border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; }
.compare__head { padding: 8px 16px; font-size: 12px; font-weight: 600; letter-spacing: 0.03em; }
.compare__head.ok { background: var(--green-bg); color: var(--green); }
.compare__head.bad { background: var(--red-bg); color: var(--red); }
.compare pre { margin: 0; border: none; border-radius: 0; }
@media (max-width: 620px) { .compare { grid-template-columns: 1fr; } }

/* ---- 分工阵型（角色卡） ---- */
.roster { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 22px 0 8px; }
.roster__card { padding: 18px 20px; border-radius: var(--radius); background: var(--bg-card); border: 1px solid var(--line); border-left-width: 4px; transition: transform 0.24s var(--ease), box-shadow 0.24s; }
.roster__card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.roster__card--sol { border-left-color: var(--tier-sol); }
.roster__card--terra { border-left-color: var(--accent); }
.roster__card--luna { border-left-color: var(--tier-luna); }
.roster__card--haiku { border-left-color: var(--tier-haiku); }
.roster__role { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.roster__tag { font-family: var(--serif); font-size: 13px; font-weight: 600; color: var(--ink-faint); }
.roster__duty { font-size: 14px; color: var(--ink-soft); line-height: 1.6; }
.roster__duty strong { color: var(--ink); }

/* ---- 使用场景对照卡（03 章·Claude Code vs 直调 API） ---- */
.scope {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin: 26px 0 8px;
}
.scope__card {
  position: relative;
  padding: 30px 30px 26px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease);
}
.scope__card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-deep) 100%);
  opacity: 0.9;
}
.scope__card--code::before { background: linear-gradient(90deg, var(--accent), var(--accent-deep)); }
.scope__card--api::before { background: linear-gradient(90deg, var(--tier-luna), #6b4fd1); }
.scope__card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.scope__head { display: flex; align-items: center; gap: 12px; margin: 2px 0 14px; }
.scope__badge {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-family: var(--sans);
}
.scope__card--code .scope__badge { background: var(--accent-wash); color: var(--accent-deep); }
.scope__card--api .scope__badge { background: var(--tier-luna-bg); color: var(--tier-luna); }
.scope__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  color: var(--ink);
  margin: 0;
  line-height: 1.3;
}
.scope__lead {
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.75;
  margin: 0 0 16px;
}
.scope__lead strong { color: var(--ink); }
.scope__list {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
}
.scope__list li {
  position: relative;
  padding: 10px 0 10px 22px;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.72;
  border-bottom: 1px dashed var(--line);
}
.scope__list li:last-child { border-bottom: none; }
.scope__list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 18px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.scope__card--api .scope__list li::before { background: var(--tier-luna); }
.scope__list li strong { color: var(--ink); }
.scope__list li code {
  font-family: var(--mono);
  font-size: 12.5px;
  background: var(--bg-warm);
  padding: 1px 6px;
  border-radius: 4px;
}
.scope__foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--bg-warm);
  border: 1px solid var(--line);
  font-size: 13.5px;
}
.scope__foot-label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  flex-shrink: 0;
}
.scope__foot-text { color: var(--ink); font-weight: 500; }
@media (max-width: 760px) {
  .scope { grid-template-columns: 1fr; gap: 16px; }
  .scope__card { padding: 24px 22px 22px; }
  .scope__title { font-size: 20px; }
}

/* ---- 章节顶部作用域标签（04-06 章顶部） ---- */
.scope-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 26px;
  padding: 9px 16px 9px 14px;
  border-radius: 999px;
  background: var(--tier-luna-bg);
  border: 1px solid rgba(58, 123, 213, 0.22);
  font-size: 13px;
  color: var(--tier-luna);
  line-height: 1.5;
  max-width: 100%;
}
.scope-tag strong { color: var(--tier-luna); font-weight: 700; }
.scope-tag code {
  font-family: var(--mono);
  font-size: 12px;
  background: rgba(255, 255, 255, 0.4);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--tier-luna);
}
[data-theme="dark"] .scope-tag code { background: rgba(255, 255, 255, 0.06); }
.scope-tag__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tier-luna);
  box-shadow: 0 0 0 3px rgba(58, 123, 213, 0.18);
  flex-shrink: 0;
}

/* =============================================================
   reveal 动画
   ============================================================= */
.reveal { opacity: 0; transform: translateY(20px); animation: rise 0.9s var(--ease) forwards; animation-delay: calc(var(--d, 0) * 0.12s); }
@keyframes rise { to { opacity: 1; transform: none; } }
.reveal-up { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal-up.is-visible { opacity: 1; transform: none; }

/* =============================================================
   终章 · final 深色总结块
   ============================================================= */
.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, 0.4), transparent 60%); filter: blur(18px); pointer-events: none; }
.final__index { display: inline-block; position: relative; font-family: var(--serif); font-size: 14px; font-weight: 500; color: var(--accent-soft); letter-spacing: 0.06em; margin-bottom: 14px; }
.final__title { font-family: var(--serif); font-weight: 500; font-size: clamp(22px, 3vw, 30px); line-height: 1.4; margin: 14px 0 26px; position: relative; color: #F5F4EE; }
.final__title em { font-style: italic; color: var(--accent); }
.final .final__lead { font-size: 16px; color: #EDE9DE; margin: 0 0 22px; position: relative; line-height: 1.7; font-weight: 400; }
.final .final__lead strong { color: #fff; font-weight: 600; }
.final__list { display: flex; flex-direction: column; gap: 10px; position: relative; }
.final .final__list span { display: block; font-size: 15px; padding: 14px 20px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.12); color: #d8d4c8; font-weight: 400; line-height: 1.6; transition: background 0.25s, border-color 0.25s, transform 0.25s; }
.final .final__list span strong { color: #ffffff; font-weight: 700; }
.final__list span:hover { background: rgba(217, 119, 87, 0.22); border-color: var(--accent); transform: translateX(4px); }

/* 资料出处列表（深色 final 块内） */
.final .sources { list-style: none; counter-reset: src; margin: 8px 0 0; padding: 0; position: relative; }
.final .sources li {
  counter-increment: src;
  display: flex; gap: 14px; align-items: baseline;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 14.5px;
  color: #EDE9DE;
}
.final .sources li:last-child { border-bottom: none; }
.final .sources li::before {
  content: "[" counter(src) "]";
  flex-shrink: 0;
  font-family: var(--mono); font-size: 12.5px; font-weight: 700;
  color: var(--accent);
}
.final .sources a { color: #EDE9DE; text-decoration: none; word-break: break-word; line-height: 1.5; transition: color 0.2s; }
.final .sources a:hover { color: var(--accent); }
.final .sources__who { display: block; font-size: 12.5px; color: #a8a599; margin-top: 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); }

/* =============================================================
   Page footer · 跨整屏宽度 · 仿 260630
   ============================================================= */
.page-footer { position: relative; z-index: 2; margin-top: 24px; padding: 64px 0 36px; background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg-warm) 100%); border-top: 1px solid var(--line); color: var(--ink-soft); font-family: var(--sans); }
.page-footer__inner { max-width: 1180px; 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 0.25s; }
.page-footer__logo:hover { opacity: 0.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: color 0.25s, background 0.25s, border-color 0.25s; }
.page-footer__keywords span:hover { background: var(--accent-wash); border-color: var(--accent-soft); color: var(--accent-deep); }
.page-footer__cta { display: flex; flex-direction: column; gap: 12px; padding: 26px 28px; background: var(--bg-card); border-radius: var(--radius); text-align: left; margin: 0; max-width: none; }
.page-footer__cta-title { font-family: var(--serif); font-size: 18px; font-weight: 600; color: var(--ink); margin: 0; letter-spacing: -0.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: var(--accent); color: #fff; font-size: 14.5px; font-weight: 600; border-radius: 9px; text-decoration: none; width: max-content; transition: background 0.2s; }
.page-footer__cta-btn:hover { background: var(--accent-deep); }
.page-footer__cta-btn svg { transition: transform 0.2s var(--ease); }
.page-footer__cta-btn:hover svg { transform: translateX(2px); }
.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 0.25s; }
.page-footer__minor-link:hover { color: var(--accent-deep); }
.page-footer__minor-link svg { opacity: 0.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__bottom { flex-direction: column; gap: 8px; padding-top: 18px; }
}

/* =============================================================
   Responsive · shell
   ============================================================= */
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; top: 0; left: 0;
    width: min(280px, 80vw); height: 100vh;
    z-index: 1080;
    transform: translateX(-100%);
    transition: transform 0.32s var(--ease);
    box-shadow: var(--shadow-md);
    border-right: 1px solid var(--line);
  }
  .sidebar.is-open { transform: none; }
  .toc-toggle { display: flex; }
  .toc-backdrop.is-open { display: block; }
  .content { padding: 0 22px 100px; }
  .hero { padding: 64px 0 36px; }
  .hero__title { font-size: clamp(26px, 7vw, 36px); }
  .section { padding: 56px 0 4px; }
  .section__index { font-size: 48px; }
  .roster { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .hero__keywords { gap: 8px; }
  .kw { font-size: 12px; padding: 5px 11px; }
  .section__head { gap: 12px; align-items: center; }
  .section__index { font-size: 40px; }
  .section__title { font-size: 22px; }
  .content pre { padding: 14px 16px; font-size: 12px; }
  .content table { font-size: 13px; }
  .content table th, .content table td { padding: 10px 12px; }
  .effort__row { grid-template-columns: 70px 1fr; }
  .effort__cost { display: none; }
}
