/* lesson1 本地排版：打破同页重复块，不改 common/course.css */

/* 示意图略放宽，避免压到 280px 后字过小；与正文字号配套 */
.diagram-fig img {
  max-height: min(50vh, 400px);
}

/* 仅第18课「五问诊决策图」单独放大 */
.diagram-fig.diagram-fig-fiveq img {
  max-height: min(78vh, 640px);
}

.dlg-note {
  margin: 0.2em 0 0.6em 62px;
  padding: 8px 12px;
  background: #f0f5f2;
  border-radius: 10px;
  font-size: 0.92rem;
  color: var(--muted, #5a6b63);
  line-height: 1.65;
}
.dlg-note + .dlg-note {
  margin-top: 0.15em;
}
.dlg-text {
  line-height: 1.7;
}

/* 封面：用示意图代替缺失主图，避免空白破图 */
.cover-hero.cover-hero-svg {
  background: #f7fbf8;
  border: 1px solid var(--line, #d5e4dc);
}
.cover-hero.cover-hero-svg img {
  object-fit: contain;
  max-height: min(38vw, 340px);
  background: #f7fbf8;
}

/* 任务目标：琥珀条，区别于普通列表 */
.chapter-body > h3 + p.task-line {
  margin-top: 0.35em;
}

/* 人机分工双栏，避免再套同一套列表 */
.divide-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0.7em 0 1.15em;
}
.divide-me,
.divide-ai {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  min-width: 0;
}
.divide-me {
  background: #eef8f3;
  border: 1px solid #b9d5ca;
}
.divide-ai {
  background: #fff8eb;
  border: 1px solid #e0c08a;
}
.divide-me h4,
.divide-ai h4 {
  margin: 0 0 6px;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
}
.divide-me h4 { color: var(--teal-deep, #1f5c4a); }
.divide-ai h4 { color: #8a5a12; }
.divide-me p,
.divide-ai p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.65;
}

/* 四种用法卡片 */
.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0.7em 0 1.2em;
}
.mode-card {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line, #d5e4dc);
  background: linear-gradient(180deg, #f7fbf8, #fff);
}
.mode-card[data-mode="1"] { border-color: #b9d5ca; }
.mode-card[data-mode="2"] { border-color: #c5d4e8; background: linear-gradient(180deg, #f4f7fb, #fff); }
.mode-card[data-mode="3"] { border-color: #e0c08a; background: linear-gradient(180deg, #fff8eb, #fff); }
.mode-card[data-mode="4"] { border-color: #c9c0d8; background: linear-gradient(180deg, #f7f4fb, #fff); }
.mode-kicker {
  display: inline-block;
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--amber, #c47b2d);
}
.mode-card h4 {
  margin: 0 0 6px;
  font-size: 1.02rem;
  color: var(--teal-deep, #1f5c4a);
}
.mode-card p {
  margin: 0.25em 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #3d534b;
}
.mode-card .mode-fit { color: #5a6b63; }
.mode-card .mode-human {
  margin-top: 0.4em;
  padding-top: 0.4em;
  border-top: 1px dashed var(--line, #d5e4dc);
  color: #1f5c4a;
}

/* 原则 / 五问诊 竖条卡片 */
.principle-list,
.ask-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0.7em 0 1.2em;
}
.principle-item,
.ask-item {
  margin: 0;
  padding: 10px 14px 10px 16px;
  border-radius: 0 12px 12px 0;
  background: #f7fbf8;
  border-left: 4px solid var(--leaf, #3d8b6e);
}
.ask-item {
  background: #fff;
  border: 1px solid #e2ece6;
  border-left: 4px solid var(--teal, #2a7a62);
  border-radius: 12px;
}
.principle-item h4,
.ask-item h4 {
  margin: 0 0 4px;
  font-size: 0.98rem;
  color: var(--teal-deep, #1f5c4a);
}
.principle-item p,
.ask-item p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
}
.ask-item .ask-yes {
  margin-top: 6px;
  color: #1f5c4a;
  font-weight: 600;
}

/* 提问模板 */
.prompt-box {
  margin: 0.5em 0 1.2em;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f3f7f4;
  border: 1px dashed #b9d5ca;
}
.prompt-box p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #1a2e26;
}

/* 工具 / 习惯 / 病例卡片 */
.tool-grid,
.habit-grid,
.case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0.7em 0 1.2em;
}
.tool-card,
.habit-card,
.case-card {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #d5e4dc;
  background: #fff;
  min-width: 0;
}
.habit-card {
  background: linear-gradient(180deg, #f7fbf8, #fff);
}
.tool-card h4,
.habit-card h4,
.case-card h4 {
  margin: 0 0 6px;
  font-size: 0.98rem;
  color: var(--teal-deep, #1f5c4a);
}
.habit-card .habit-n,
.tool-card .tool-n {
  display: inline-block;
  margin-right: 6px;
  width: 1.5em;
  height: 1.5em;
  line-height: 1.5em;
  text-align: center;
  border-radius: 999px;
  background: var(--teal, #2a7a62);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
}
.tool-card p,
.habit-card p,
.case-card p {
  margin: 0.3em 0 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #3d534b;
}
.tool-card .tool-note {
  color: #8a5a12;
}

/* 速配表 */
.match-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 0.6em 0 1.1em;
}
.match-table th,
.match-table td {
  border: 1px solid var(--line, #d5e4dc);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
  line-height: 1.55;
}
.match-table th {
  background: #e7f5ef;
  color: var(--teal-deep, #1f5c4a);
  white-space: nowrap;
}

/* 情景 / 承诺 */
.scene-box {
  margin: 0.7em 0 1.1em;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fffdf8;
  border: 1px solid #e4d9b8;
}
.scene-box p { margin: 0.35em 0; font-size: 0.95rem; line-height: 1.65; }
.pledge-box {
  margin: 0.7em 0 1.1em;
  padding: 14px 16px;
  border-radius: 14px;
  background: #eef8f3;
  border: 1px solid #b9d5ca;
}
.pledge-box p { margin: 0.4em 0; line-height: 1.7; }

@media (max-width: 720px) {
  .divide-pair,
  .mode-grid,
  .tool-grid,
  .habit-grid,
  .case-grid {
    grid-template-columns: 1fr;
  }
}
