/* ===== 本质安全 (inhsafe) ===== */
/* 设计风格：设计源头 / 本质安全化设计诊断，报告体简洁一目了然 */
.inh-safe-page { --content-max-local: 960px; }
.inh-safe-page .content-wrap { max-width: var(--content-max-local); margin: 0 auto; }
.tool-hero.is-inhsafe { --tool-hero: linear-gradient(118deg, #0f172a 0%, #4f46e5 50%, #7c3aed 100%); --tool-shadow: rgba(79, 70, 229, .25); }

/* ===== 输入表单卡 ===== */
.inh-safe-form-card .field textarea#inhsafe-text {
  display: block; width: 100%; box-sizing: border-box; resize: vertical; min-height: 108px;
  line-height: 1.7; padding: 11px 13px; border: 1px solid #e6eaf0; border-radius: 14px;
  font-size: 14px; background: #fff; font-family: inherit; color: #1a1f2e;
}
.inh-safe-form-card .field textarea#inhsafe-text:focus { outline: none; border-color: #7c3aed; }
.inh-safe-form-card .field textarea::placeholder { color: #9aa5b5; }

.inh-safe-count { font-weight: 600; color: #8b95a5; font-size: 12px; margin-left: 6px; }

.inh-safe-hint {
  display: flex; align-items: flex-start; gap: 6px; margin-top: 8px;
  font-size: 12px; color: #6b7482; line-height: 1.55; background: #f6f4fd;
  border: 1px solid #e9e4fb; border-radius: 10px; padding: 8px 10px;
}
.inh-safe-hint svg { flex: none; width: 15px; height: 15px; margin-top: 1px; color: #7c3aed; }

/* ===== 语音区 ===== */
.inh-safe-voice-row { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.inh-safe-mic-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; flex: 0 0 56px; border: none; border-radius: 50%; color: #fff;
  cursor: pointer; background: radial-gradient(circle at 30% 28%, #8b5cf6, #7c3aed 62%, #6d28d9);
  box-shadow: 0 10px 22px -8px rgba(124,58,237,.6), inset 0 1px 0 rgba(255,255,255,.35);
  transition: transform .18s, box-shadow .18s, background .18s;
}
.inh-safe-mic-btn:hover:not(:disabled) { transform: translateY(-2px) scale(1.04); box-shadow: 0 14px 26px -8px rgba(124,58,237,.72), inset 0 1px 0 rgba(255,255,255,.45); }
.inh-safe-mic-btn:active:not(:disabled) { transform: scale(.94); }
.inh-safe-mic-btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.inh-safe-mic-ico { display: inline-flex; }
.inh-safe-mic-ico svg { width: 22px; height: 22px; display: block; }
.inh-safe-mic-btn.is-live {
  background: radial-gradient(circle at 30% 28%, #ff8a7a, #e5484d 62%, #d63844);
  box-shadow: 0 0 0 6px rgba(229,72,77,.14), 0 10px 22px -8px rgba(229,72,77,.6);
  animation: inhMicPulse 1.15s infinite;
}
.inh-safe-mic-btn.is-live .inh-safe-mic-ico { display: none; }
.inh-safe-mic-btn.is-live i { display: block; width: 3px; border-radius: 2px; background: #fff; margin-left: 2px; animation: inhWave .9s ease-in-out infinite; }
.inh-safe-mic-btn.is-live i:nth-child(1) { height: 8px; }
.inh-safe-mic-btn.is-live i:nth-child(2) { height: 14px; animation-delay: .12s; }
.inh-safe-mic-btn.is-live i:nth-child(3) { height: 10px; animation-delay: .24s; }
@keyframes inhWave { 0%,100% { transform: scaleY(.5); opacity: .6; } 50% { transform: scaleY(1.15); opacity: 1; } }
@keyframes inhMicPulse { 0% { box-shadow: 0 0 0 0 rgba(229,72,77,.32), 0 10px 22px -8px rgba(229,72,77,.6); } 70% { box-shadow: 0 0 0 12px rgba(229,72,77,0), 0 10px 22px -8px rgba(229,72,77,.6); } 100% { box-shadow: 0 0 0 0 rgba(229,72,77,0), 0 10px 22px -8px rgba(229,72,77,.6); } }
.inh-safe-voice-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.inh-safe-voice-txt b { font-size: 13px; color: #1a1f2e; font-weight: 600; }
.inh-safe-voice-txt span { font-size: 12px; color: #8b95a5; line-height: 1.5; word-break: break-all; }

/* ===== 补充信息 ===== */
.inh-safe-extra-toggle {
  margin-top: 14px; width: 100%; display: inline-flex; align-items: center; gap: 5px;
  background: none; border: none; color: #7c3aed; font-size: 13px; font-weight: 600; cursor: pointer; padding: 4px 0;
}
.inh-safe-extra-toggle svg { width: 14px; height: 14px; transition: transform .2s; }
.inh-safe-extra-grid, .inh-safe-extra { margin-top: 12px; }
.inh-safe-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.inh-safe-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid #e3e7f0; background: #fff; color: #3a4152; font-size: 13px; font-weight: 500; cursor: pointer;
  transition: border-color .16s, background .16s, color .16s;
}
.inh-safe-chip:hover:not(:disabled) { border-color: #c9b8f3; }
.inh-safe-chip.is-active { border-color: #7c3aed; background: #f3eeff; color: #6d28d9; font-weight: 600; }

/* ===== 操作按钮 ===== */
.inh-safe-actions { display: flex; gap: 10px; margin-top: 18px; }

/* ===== 生成中加载态：仅一个圈（紫色单环，贴合本质安全主题） ===== */
.inh-safe-page .nm-loading {
  display: flex; align-items: center; gap: 10px; margin-top: 14px;
  padding: 12px 14px; border-radius: 12px;
  background: #f7f3ff; border: 1px solid #ece5fd;
  color: #6d28d9; font-size: 13px; font-weight: 600;
}
.inh-safe-page .nm-loading i {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid #ddd3fb; border-top-color: #7c3aed; flex: none;
  animation: inhSpin .8s linear infinite;
}
@keyframes inhSpin { to { transform: rotate(360deg); } }

/* ===== 报告区 ===== */
.inh-safe-report-block { margin-top: 24px; }
.inh-safe-report-head h3 { font-size: 18px; font-weight: 700; color: #111827; margin: 0 0 4px; }
.inh-safe-report-head .edit-hint { font-size: 12px; color: #8b95a5; font-weight: 400; margin-left: 6px; }
.inh-safe-ops { display: flex; gap: 8px; margin-top: 6px; }
.inh-safe-ops-mobile { display: flex; gap: 10px; margin-top: 16px; }
.inh-safe-reinput { margin-top: 16px; }

/* ===== 通用可编辑文字 ===== */
.inh-safe-edit {
  outline: none; border-bottom: 1px dashed transparent; border-radius: 4px;
  transition: border-color .16s, background .16s; min-width: 1em;
}
.inh-safe-edit:hover { background: rgba(124,58,237,.06); }
.inh-safe-edit:focus { border-bottom-color: #7c3aed; background: rgba(124,58,237,.07); }
.inh-safe-edit.placeholder { color: #b6bcc9; }

/* ===== 编辑删除按钮 ===== */
.inh-safe-def-del {
  background: none; border: none; color: transparent; cursor: pointer; transition: color .16s, background .16s;
  padding: 2px 6px; border-radius: 6px; font-size: 12px; flex: none; white-space: nowrap;
}
.inh-safe-def-del:hover { color: #dc2626; background: #fff1f1; }
.inh-safe-def-card:hover .inh-safe-def-del,
.inh-safe-sugg-card:hover .inh-safe-def-del,
.inh-safe-trans-card:hover .inh-safe-def-del { color: #cbd2df; }
.inh-safe-def-card:hover .inh-safe-def-del:hover,
.inh-safe-sugg-card:hover .inh-safe-def-del:hover,
.inh-safe-trans-card:hover .inh-safe-def-del:hover { color: #dc2626; background: #fff1f1; }

/* ===== 报告：单卡容器（整份报告合一，内部细分隔线） ===== */
.inh-safe-report {
  background: #fff; border: 1px solid #e9edf5; border-radius: 18px;
  box-shadow: 0 12px 32px rgba(24,39,75,.05);
  padding: 22px 20px 10px;
}
.inh-safe-head { display: flex; flex-direction: column; padding: 0 0 4px; }
.inh-safe-title-row { display: flex; align-items: center; padding: 0 0 14px; }
.inh-safe-title { font-size: 20px; font-weight: 700; color: #141a2b; line-height: 1.4; letter-spacing: .01em; }

/* 分区：不各自成卡，用极轻隔线与留白分层，去边框密度 */
.inh-safe-block {
  padding: 18px 0;
  border-top: 1px solid #eef1f6;
  background: transparent; box-shadow: none;
}
.inh-safe-head .inh-safe-block { padding-top: 16px; background: transparent; box-shadow: none; }
.inh-safe-report > .inh-safe-ops { margin-top: 4px; padding-top: 16px; border-top: 1px solid #eef1f6; }

.inh-safe-label {
  display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: #5b21b6;
  margin-bottom: 12px; letter-spacing: .01em;
}
.inh-safe-label::before {
  content: ""; width: 4px; height: 14px; border-radius: 3px; background: #7c3aed; flex: none;
}

/* 场景识别 */
.inh-safe-scene {
  background: #f5f2ff; border: 1px solid #ece5fd; border-radius: 12px;
  padding: 13px 14px; line-height: 1.7; font-size: 14px; color: #2a3040;
}
.inh-safe-scene .inh-safe-edit { font-weight: 500; }

/* 固有危险源 */
.inh-safe-haz-list { display: flex; flex-direction: column; gap: 10px; }
.inh-safe-haz { display: flex; gap: 10px; line-height: 1.6; }
.inh-safe-haz-name {
  flex: none; min-width: 76px; font-size: 13px; font-weight: 600; color: #6d28d9;
  padding-top: 1px;
}
.inh-safe-haz-desc { flex: 1; min-width: 0; font-size: 13px; color: #4a5568; }

/* 控制层级（两项卡） */
.inh-safe-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 560px) {
  .inh-safe-grid { grid-template-columns: 1fr 1fr; }
}
.inh-safe-item {
  background: #fff; border: 1px solid #eef1f6; border-radius: 12px; padding: 11px 13px;
  display: flex; flex-direction: column; gap: 4px;
}
.inh-safe-item span { font-size: 12px; color: #8b95a5; }
.inh-safe-item b { font-size: 14px; font-weight: 600; color: #1a1f2e; line-height: 1.5; }
.inh-safe-note { margin-top: 12px; font-size: 13px; color: #6b7482; line-height: 1.65; background: #f7f8fb; border-radius: 10px; padding: 10px 12px; }

/* ===== 不合格项 ===== */
.inh-safe-def-list { display: flex; flex-direction: column; gap: 12px; }
.inh-safe-def-card {
  background: #fff; border: 1px solid #e9edf5; border-radius: 14px;
  padding: 14px 15px; transition: border-color .16s, box-shadow .16s;
}
.inh-safe-def-card:hover { border-color: #ddd3fb; box-shadow: 0 6px 16px rgba(24,39,75,.05); }
.inh-safe-def-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.inh-safe-def-no {
  flex: none; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center;
  background: #f3eeff; color: #6d28d9; font-size: 12px; font-weight: 700;
}
.inh-safe-sev {
  flex: none; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
  color: #fff; white-space: nowrap;
}
.inh-safe-def-badge {
  flex: none; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600;
  background: #0d9488; color: #fff;
}
.inh-safe-def-badge-gray { background: #eef1f6; color: #6b7482; }
.inh-safe-def-del { margin-left: auto; }
.inh-safe-def-line {
  display: flex; gap: 10px; margin-top: 7px; line-height: 1.6; font-size: 13px;
}
.inh-safe-def-line b { flex: none; width: 70px; font-weight: 500; color: #8b95a5; }
.inh-safe-def-line span { flex: 1; min-width: 0; color: #3a4152; word-break: break-word; }

/* ===== 本质安全设计建议 ===== */
.inh-safe-sugg-list { display: flex; flex-direction: column; gap: 12px; }
.inh-safe-sugg-card {
  background: #fff; border: 1px solid #e9edf5; border-radius: 14px;
  padding: 14px 15px; transition: border-color .16s, box-shadow .16s;
}
.inh-safe-sugg-card:hover { border-color: #ddd3fb; box-shadow: 0 6px 16px rgba(24,39,75,.05); }
.inh-safe-sugg-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.inh-safe-strat {
  flex: none; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  color: #fff; white-space: nowrap;
}
.inh-safe-sugg-action { font-size: 15px; font-weight: 600; color: #1a1f2e; line-height: 1.55; }
.inh-safe-sugg-why, .inh-safe-sugg-target { display: flex; gap: 10px; margin-top: 7px; line-height: 1.6; font-size: 13px; }
.inh-safe-sugg-why b, .inh-safe-sugg-target b { flex: none; width: 70px; font-weight: 500; color: #8b95a5; }
.inh-safe-sugg-why span, .inh-safe-sugg-target span { flex: 1; min-width: 0; color: #4a5568; word-break: break-word; }

/* ===== 过渡措施 ===== */
.inh-safe-trans-list { display: flex; flex-direction: column; gap: 8px; }
.inh-safe-trans-card {
  display: flex; align-items: center; gap: 10px; background: #fff;
  border: 1px solid #eef1f6; border-radius: 12px; padding: 9px 12px; font-size: 13px; line-height: 1.5;
}
.inh-safe-trans-cat {
  flex: none; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700;
  background: #eef1f6; color: #5b6473; white-space: nowrap;
}
.inh-safe-trans-measure { flex: 1; min-width: 0; color: #1a1f2e; font-weight: 500; word-break: break-word; }
.inh-safe-trans-note { flex: none; color: #9aa5b5; font-size: 12px; max-width: 40%; word-break: break-word; }

/* ===== 适用标准 chips ===== */
.inh-safe-chip-list { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.inh-safe-chip-list .inh-safe-chip {
  border-color: #e5e9f2; background: #f7f8fb; color: #4a5568; cursor: default; padding: 5px 11px;
}
.inh-safe-chip-list .inh-safe-chip.placeholder { color: #b6bcc9; font-style: normal; }
.inh-safe-chip-add {
  border: 1px dashed #cfc6f6; background: #faf9ff; color: #7c3aed; border-radius: 999px;
  width: 26px; height: 26px; display: grid; place-items: center; font-size: 16px; font-weight: 600;
  cursor: pointer; transition: border-color .16s, background .16s;
}
.inh-safe-chip-add:hover { border-color: #7c3aed; background: #f3eeff; }

/* ===== 结论 ===== */
.inh-safe-conclusion {
  background: linear-gradient(135deg, #f3efff, #faf8ff);
  border: 1px solid #ece5fd; border-radius: 14px; padding: 14px 16px;
  font-size: 14px; font-weight: 600; color: #5b21b6; line-height: 1.7;
}

/* ===== 历史卡片 ===== */
.inh-safe-histcard {
  background: #fff; border: 1px solid #e8ebf2; border-radius: 14px; padding: 13px 14px; margin-bottom: 10px;
}
.inh-safe-histcard-title { font-size: 14px; font-weight: 600; color: #1a1f2e; }
.inh-safe-histcard-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; font-size: 12px; color: #8b95a5; }
.inh-safe-histcard-ops { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* photo slot 与近失保持一致（无 .nm-page 前缀可用，直接补上） */
.inh-safe-page .nm-photo-slot.is-empty:hover { background: #f6f4fd; border-color: #7c3aed; }