/* =============================================================
   260704-subscription-vs-api
   定制 showcase 页 · 仿 260703 设计语言
   订阅号与官方 API / CLI 通道关系说明
   ============================================================= */

: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 / verdict 用） ---- */
  --green: #3a8a5e;
  --green-bg: #e6f1ea;
  --amber: #b8791f;
  --amber-bg: #f7ecd8;
  --red: #c2482f;
  --red-bg: #fbe7e2;
}

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

/* ---- 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); }

/* ---- 正文排版 ---- */
.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; }

/* ---- 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--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); }

/* =============================================================
   页面专属组件（本篇）
   结论牌 verdict / 出处列表 sources
   ============================================================= */

/* ---- 结论牌（yes / no 语义色） ---- */
.verdicts { display: flex; flex-direction: column; gap: 14px; margin: 24px 0 10px; }
.verdict {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 18px 22px; border-radius: var(--radius);
  border: 1px solid var(--line); border-left-width: 4px;
  background: var(--bg-card);
  transition: transform 0.22s var(--ease), box-shadow 0.22s;
}
.verdict:hover { transform: translateX(3px); box-shadow: var(--shadow-sm); }
.verdict--yes { border-left-color: var(--green); background: var(--green-bg); }
.verdict--no { border-left-color: var(--red); background: var(--red-bg); }
.verdict__tag {
  flex-shrink: 0; margin-top: 2px;
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.02em;
  padding: 4px 12px; border-radius: 7px; color: #fff;
}
.verdict--yes .verdict__tag { background: var(--green); }
.verdict--no .verdict__tag { background: var(--red); }
.verdict p { margin: 0; font-size: 15px; color: var(--ink-soft); line-height: 1.72; }
.verdict strong { color: var(--ink); }

/* ---- 上标引用角标 ---- */
sup.ref { font-size: 11px; font-weight: 700; margin-left: 1px; white-space: nowrap; }
sup.ref a { color: var(--accent-deep); text-decoration: none; padding: 0 1px; transition: color 0.2s; }
sup.ref a:hover { color: var(--accent); text-decoration: underline; }

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

/* =============================================================
   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 22px; position: relative; color: #F5F4EE; }
.final__title em { font-style: italic; color: var(--accent); }
.final .final__lead { font-size: 16px; color: #EDE9DE; margin: 0 0 26px; position: relative; line-height: 1.7; font-weight: 400; }
.final .final__lead strong { color: #fff; font-weight: 600; }

.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 · 跨整屏宽度 · 仿 260703
   ============================================================= */
.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; }
  .final { padding: 40px 24px; }
}
@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 table { font-size: 13px; }
  .content table th, .content table td { padding: 10px 12px; }
  .verdict { flex-direction: column; gap: 10px; padding: 16px 18px; }
}
