/* =========================================================
   /demo/ 页级样式 · 在线体验（两个模拟演示组件）
   ---------------------------------------------------------
   设计约束：只写 .demo-* 组件样式 + 少量组合；基础排版/容器
   复用 core.css（--line/--ink/--blue/--ease 变量）与 p4.css（pf-*）。
   无 JS 时组件仍完整可读（pane 默认第一个可见）。
   ========================================================= */

/* —— 演示舞台 —— */
.demo-stage {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #fff;
  overflow: hidden;
  box-shadow: var(--sh-soft);
}

.demo-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #fbfdff 0%, #f4f8ff 60%, #eef5ff 100%);
}

.demo-tab {
  appearance: none;
  border: 1px solid #dbe7f5;
  background: #fff;
  color: #3f5a76;
  font: inherit;
  font-size: 13px;
  line-height: 1;
  padding: 9px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: color .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}

.demo-tab:hover { color: var(--ink); border-color: #b9d2ef; }

.demo-tab.is-on {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.demo-pane { display: none; padding: 26px 26px 30px; }
.demo-pane.is-on { display: block; }

/* —— 步骤流 —— */
.demo-flow {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: none;
}

.demo-step {
  position: relative;
  padding: 0 0 22px 26px;
  border-left: 1px solid var(--line);
}

.demo-step:last-child { padding-bottom: 0; border-left-color: transparent; }

.demo-step::before {
  content: "";
  position: absolute;
  left: -4.5px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--blue);
}

.demo-no {
  display: block;
  font-size: 11px;
  letter-spacing: .08em;
  font-weight: 650;
  color: #3f5a76;
  margin-bottom: 8px;
}

/* 原始消息 */
.demo-msg {
  border: 1px solid #dfe8f3;
  background: #f7fbff;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink);
}

.demo-msg b {
  display: block;
  font-size: 11px;
  letter-spacing: .04em;
  color: #7c90a8;
  font-weight: 600;
  margin-bottom: 4px;
}

/* 字段卡 */
.demo-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.demo-fields > div {
  border: 1px solid #dfe8f3;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}

.demo-fields span {
  display: block;
  font-size: 11px;
  color: #7c90a8;
  margin-bottom: 3px;
}

.demo-fields b { font-size: 14px; color: var(--ink); }

/* 校验结果 */
.demo-checks { display: grid; gap: 6px; }

.demo-checks p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  padding-left: 22px;
  position: relative;
}

.demo-checks p::before {
  position: absolute;
  left: 0;
  top: 0;
}

.demo-checks .ok::before { content: "✓"; color: #178a50; font-weight: 700; }
.demo-checks .warn::before { content: "!"; color: #c47b18; font-weight: 800; }

/* 人工确认 / 完成 */
.demo-ask {
  border: 1px dashed #b9d2ef;
  background: #f4f8ff;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
}

.demo-ask b { color: var(--blue); }

.demo-done {
  border: 1px solid #cde8d8;
  background: #f3faf6;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.7;
  color: #136b41;
}

/* —— 对话演示 —— */
.demo-chat {
  display: grid;
  gap: 12px;
  max-width: 640px;
}

.demo-bubble {
  border: 1px solid #dfe8f3;
  border-radius: 16px 16px 16px 4px;
  background: #fff;
  padding: 12px 15px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
  justify-self: start;
  max-width: 92%;
}

.demo-bubble span {
  display: block;
  font-size: 11px;
  letter-spacing: .04em;
  color: #7c90a8;
  margin-bottom: 4px;
}

.demo-bubble.is-me {
  border-radius: 16px 16px 4px 16px;
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  justify-self: end;
}

.demo-bubble.is-me span { color: #9db4d0; }

.demo-lead-card {
  border: 1px solid #b9d2ef;
  background: linear-gradient(135deg, #fbfdff, #f0f7ff);
  border-radius: 16px;
  padding: 16px 18px;
  max-width: 640px;
}

.demo-lead-card b {
  display: block;
  font-size: 13px;
  color: var(--blue);
  margin-bottom: 10px;
  letter-spacing: .02em;
}

.demo-lead-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.demo-lead-card li {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink);
}

.demo-lead-card li span { color: #7c90a8; margin-right: 8px; font-size: 12px; }

/* —— 演示区块内的免责小字 —— */
.demo-disc {
  margin: 16px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: #7c90a8;
}

@media (max-width: 720px) {
  .demo-pane { padding: 20px 16px 24px; }
  .demo-step { padding-left: 20px; }
}
