/* ============================================================
   prose.css —— 长文阅读版式（服务页）
   正文居中、两侧留白，每行字数锁在中文 38–42 字。
   宽屏时目录放在右侧页边里，不占正文宽度；窄屏时变成标题下方一行可横滑的胶囊。
   依赖 site.css 里的变量与 .kicker / .btn / .quiet。
   ============================================================ */

.prose-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 42em) minmax(0, 1fr);
  align-items: start;
}
.prose-head,
.prose-body { grid-column: 2; min-width: 0; }

.prose { font-size: 17px; line-height: 1.95; }
:root:lang(en) .prose { line-height: 1.8; }
:root:lang(en) .prose-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 38em) minmax(0, 1fr); }

/* ---------- 目录：宽屏贴在右侧页边，滚动时高亮当前小节 ---------- */

.prose-rail {
  grid-column: 3;
  grid-row: 1 / span 2;
  position: sticky;
  top: 108px;
  min-width: 0;
  padding-left: clamp(28px, 4vw, 60px);
}

.toc { display: grid; border-top: 1px solid var(--line); }
.toc a {
  display: flex;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.5;
  text-decoration: none;
  transition: color .25s ease;
}
.toc a span { flex: none; width: 20px; color: var(--blue); font-family: var(--mono); font-size: 12px; line-height: 1.8; }
.toc a:hover { color: var(--ink); }
.toc a[aria-current="true"] { color: var(--ink); font-weight: 600; }

/* ---------- 文章头 ---------- */

.prose-title {
  font-size: clamp(34px, 4.2vw, 60px);
  line-height: 1.16;
  letter-spacing: -.04em;
  text-wrap: balance;
}
:root:lang(en) .prose-title { line-height: 1.08; }

.prose-standfirst {
  margin-top: 1.1em;
  color: var(--ink-2);
  font-size: 20px;
  line-height: 1.7;
  text-wrap: pretty;
}
:root:lang(en) .prose-standfirst { font-size: 19px; }

.prose-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 2.2em;
  padding-bottom: 1.6em;
  border-bottom: 1px solid var(--line);
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
}
.prose-meta span + span::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-right: 14px;
  border-radius: 50%;
  background: var(--blue);
  vertical-align: middle;
}

/* ---------- 正文 ---------- */

.prose p { margin-bottom: 1.4em; }
.prose p:last-child { margin-bottom: 0; }
.prose strong, .prose b { font-weight: 700; }
.prose-lead { color: var(--ink-2); }

.prose a:not([class]) {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.prose a:not([class]):hover { text-decoration-color: var(--ink); }

.prose-section { padding-top: 3.2em; scroll-margin-top: 96px; }
.prose-section + .prose-section { margin-top: 3.2em; border-top: 1px solid var(--line); }

.prose-h2 { margin-bottom: .9em; font-size: clamp(26px, 2.6vw, 32px); line-height: 1.3; letter-spacing: -.035em; }
.prose-h3 { margin: 2.2em 0 .6em; font-size: 20px; line-height: 1.4; letter-spacing: -.02em; }

/* ---------- 对比：不做 / 做 ---------- */

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 1.6em;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
}
.compare-col { padding: 26px 26px 28px; }
.compare-col--no { background: var(--paper-2); }
.compare-col--yes { background: var(--paper-3); }
.compare-col h3 {
  margin-bottom: 1.1em;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.compare-col ul { display: grid; gap: .8em; margin: 0; padding: 0; list-style: none; }
.compare-col li { position: relative; padding-left: 1.3em; font-size: 15.5px; line-height: 1.75; }
.compare-col li::before { content: ""; position: absolute; top: .82em; left: 0; width: 9px; height: 1.5px; background: var(--ink-3); }
.compare-col--yes li::before { top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }

/* ---------- 适用情况：编号横条 ---------- */

.cases { margin: 1.4em 0 0; padding: 0; border-top: 1px solid var(--line-2); }
.cases > li {
  display: grid;
  grid-template-columns: 2.4em 1fr;
  gap: 1.2em;
  padding: 1.3em 0;
  border-bottom: 1px solid var(--line);
}
.cases-num { color: var(--blue); font-family: var(--mono); font-size: 13px; line-height: 2; }
.cases b { display: block; font-size: 19px; line-height: 1.5; letter-spacing: -.02em; }
.cases p { margin: .35em 0 0; color: var(--ink-2); font-size: 16px; line-height: 1.8; }

/* ---------- 四步流程：竖线 + 圆形节点 ---------- */

/* 步骤属于「怎么合作」这一节：整节作为一个锚点目标，读到步骤时目录仍保持高亮 */
.steps-wrap { margin-top: 2.4em; }

.steps { position: relative; margin: 0; padding: 0 0 0 44px; list-style: none; }
.step { position: relative; padding: 0 0 2.2em; }
.step:last-child { padding-bottom: 0; }
.step-dot {
  position: absolute;
  top: 2px;
  left: -44px;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  color: var(--on-ink);
  background: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
}
/* 竖线画到下一个节点，最后一步不画 */
.step::before { content: ""; position: absolute; top: 30px; bottom: 0; left: -32px; width: 1px; background: var(--line-2); }
.step:last-child::before { display: none; }
.step b { display: block; font-size: 22px; line-height: 1.3; letter-spacing: -.02em; }
.step p { margin: .5em 0 0; font-size: 16px; line-height: 1.85; }
.step-deliver { display: block; margin-top: 14px; padding-left: 12px; border-left: 2px solid var(--blue); color: var(--ink-3); font-size: 13.5px; line-height: 1.6; }
.step-deliver b { display: inline; font-size: inherit; color: var(--ink-2); }

/* ---------- 收尾 ---------- */

.outro {
  margin-top: 3.2em;
  padding: clamp(28px, 4vw, 40px);
  border-radius: 24px;
  color: var(--on-ink);
  background-color: var(--blue-deep);
  background-image: repeating-radial-gradient(circle at 100% 0, transparent 0 48px, rgba(243, 238, 228, .08) 48px 49px);
}
.outro h2 { font-size: clamp(26px, 3vw, 36px); line-height: 1.2; letter-spacing: -.035em; }
.outro p { max-width: 34em; margin: .7em 0 0; color: var(--on-ink-2); font-size: 16px; line-height: 1.8; }
.outro-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 1.8em; }

/* ---------- 响应式 ---------- */

/* 右侧页边放不下目录时，目录回到标题下方，变成一行胶囊 */
@media (max-width: 1379px) {
  .prose-head { grid-row: 1; }
  .prose-rail { grid-column: 2; grid-row: 2; position: static; padding: 0; }
  .prose-body { grid-row: 3; }

  .toc { display: flex; margin-top: 1.6em; overflow-x: auto; border-top: 0; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .toc::-webkit-scrollbar { display: none; }
  .toc a { flex: none; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 999px; }
  .toc a span { display: none; }
  .toc a[aria-current="true"] { border-color: var(--ink); color: var(--on-ink); background: var(--ink); }
}

@media (max-width: 640px) {
  .prose { font-size: 16px; line-height: 1.9; }
  .prose-title { font-size: clamp(30px, 9vw, 40px); }
  :root:lang(en) .prose-title { font-size: clamp(28px, 8.4vw, 36px); }
  .prose-standfirst { font-size: 18px; }
  .compare { grid-template-columns: 1fr; }
  .compare-col--no { border-bottom: 1px solid var(--line); }
  .steps { padding-left: 40px; }
  .step-dot { left: -40px; }
  .step::before { left: -28px; }
}
