/* flow-map.css — 场景流程图页面样式 */

.flow-map-container {
  max-width: 980px;
  margin: 24px auto;
  padding: 0 16px;
}

/* ---- Hero ---- */
.fm-hero {
  text-align: center;
  padding: 30px 20px 24px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.10), rgba(124, 58, 237, 0.10));
  border: 1px solid var(--border-color, #e5e7eb);
  margin-bottom: 16px;
}

.fm-hero-title {
  font-size: 30px;
  font-weight: 800;
  color: var(--text, #111827);
  margin-bottom: 8px;
}

.fm-hero-sub {
  font-size: 15px;
  font-weight: 600;
  color: #2563eb;
  margin-bottom: 6px;
}

.fm-hero-sub2 {
  font-size: 13px;
  color: var(--muted, #6b7280);
  line-height: 1.6;
}

/* ---- 锚点导航 ---- */
.fm-nav {
  position: sticky;
  top: 56px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  margin-bottom: 20px;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.fm-nav-chip {
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #374151);
  padding: 5px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--border-color, #e5e7eb);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  text-decoration: none;
  display: inline-block;
}

.fm-nav-chip:hover {
  border-color: #2563eb;
  color: #2563eb;
}

/* ---- 分类区块 ---- */
.fm-cat {
  margin-bottom: 28px;
  scroll-margin-top: 120px;
}

.fm-cat-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
  padding: 14px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(124, 58, 237, 0.05));
  border-left: 4px solid #2563eb;
}

.fm-cat-icon {
  font-size: 24px;
  line-height: 1.2;
}

.fm-cat-name {
  margin: 0 0 4px;
  font-size: 19px;
  font-weight: 800;
  color: var(--text, #111827);
}

.fm-cat-intro {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted, #6b7280);
}

/* ---- 流程卡片 ---- */
.fm-flows {
  display: grid;
  gap: 14px;
}

.fm-flow {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 14px;
  padding: 18px 20px;
  scroll-margin-top: 120px;
}

.fm-flow-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.fm-flow-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text, #111827);
}

.fm-type {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.fm-type.tp-pred { background: rgba(37, 99, 235, 0.12); color: #2563eb; }
.fm-type.tp-agile { background: rgba(124, 58, 237, 0.12); color: #7c3aed; }
.fm-type.tp-both { background: rgba(22, 163, 74, 0.12); color: #16a34a; }

/* ---- 信号词 ---- */
.fm-trigger-row,
.fm-step-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.fm-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted, #9ca3af);
  padding: 4px 0;
  flex-shrink: 0;
  width: 42px;
}

.fm-trigger {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: #d97706;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 3px 10px;
  border-radius: 999px;
  margin: 0 6px 6px 0;
}

/* ---- 步骤链 ---- */
.fm-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.fm-step {
  display: inline-flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text, #111827);
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.2);
  padding: 6px 12px;
  border-radius: 10px;
}

.fm-step i {
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: #2563eb;
  border-radius: 999px;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.fm-arrow {
  color: #9ca3af;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}

/* ---- 陷阱 / 要点 ---- */
.fm-traps,
.fm-notes {
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 10px;
}

.fm-traps {
  background: rgba(220, 38, 38, 0.05);
  border: 1px solid rgba(220, 38, 38, 0.22);
}

.fm-notes {
  background: rgba(37, 99, 235, 0.05);
  border: 1px solid rgba(37, 99, 235, 0.18);
}

.fm-sub-title {
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text, #111827);
}

.fm-trap,
.fm-note {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text, #374151);
  padding-left: 4px;
  margin-bottom: 4px;
}

/* ---- 卡片底部 ---- */
.fm-flow-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.fm-sources {
  font-size: 11px;
  color: var(--muted, #9ca3af);
  cursor: help;
  line-height: 1.6;
}

.fm-drill {
  font-size: 12px;
  font-weight: 700;
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.1);
  padding: 5px 12px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.fm-drill:hover {
  background: rgba(124, 58, 237, 0.2);
}

/* ---- 决策表 ---- */
.fm-flow-decision {
  border-left: 4px solid #f59e0b;
}

.fm-table-wrap {
  overflow-x: auto;
}

.fm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.fm-table th {
  text-align: left;
  font-size: 12px;
  color: var(--muted, #6b7280);
  font-weight: 700;
  padding: 8px 10px;
  border-bottom: 2px solid var(--border-color, #e5e7eb);
  white-space: nowrap;
}

.fm-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
  vertical-align: top;
  line-height: 1.6;
  color: var(--text, #374151);
}

.fm-decision-who {
  font-weight: 700;
  color: #d97706;
  white-space: nowrap;
}

.fm-decision-src {
  font-size: 11px;
  color: var(--muted, #9ca3af);
  white-space: nowrap;
}

/* ---- 图例 ---- */
.fm-legend {
  margin-top: 8px;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--card-bg, #fff);
  border: 1px dashed var(--border-color, #d1d5db);
}

.fm-legend-title {
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text, #111827);
}

.fm-legend p {
  margin: 0;
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted, #6b7280);
}

/* ---- 响应式 ---- */
@media (max-width: 600px) {
  .fm-hero-title { font-size: 24px; }
  .fm-nav { top: 48px; }
  .fm-cat-head { padding: 12px 14px; }
  .fm-cat-name { font-size: 17px; }
  .fm-flow { padding: 14px 14px; }
  .fm-label { width: 36px; }
  .fm-table td:nth-child(3) { display: none; }
  .fm-table th:nth-child(3) { display: none; }
}
