/* ============================================================
   workbench-ui.css — Enhanced styles for workbench modules
   Depends on CSS variables defined in index.html:
     --bg, --bg2, --card, --ink, --muted, --line,
     --blue, --blue-soft, --blue-mid,
     --red, --red-bg, --yellow, --yellow-bg,
     --green, --green-bg, --purple,
     --shadow-sm, --shadow, --radius,
     --ease, --topbar-offset
   ============================================================ */

/* ─────────────────────────────────────────────
   Input and result provenance
   ───────────────────────────────────────────── */

.input-impact-legend,
.idea-impact-guide,
.field-label-line,
.input-impact-composite {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

/* ============================================================
 * 实战咨询分析版
 * ============================================================ */
.consult-inputs {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.58);
  padding: 0 18px 16px;
}
.consult-inputs > summary {
  cursor: pointer;
  padding: 15px 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}
.consult-inputs > .field-hint { margin: -6px 0 12px; }
.consult-input-divider {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 6px;
  padding: 11px 0 7px;
  border-top: 1px solid var(--line);
}
.consult-input-divider strong { flex: none; color: var(--ink); font-size: 14px; }
.consult-input-divider span { color: var(--muted); font-size: 12px; line-height: 1.55; }

.consulting-suite {
  margin: 22px 0;
  padding: 22px 0 4px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: var(--topbar-offset);
}
.print-report-cover { display: none; }
.consulting-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}
.consulting-heading h2 { margin: 2px 0 4px; font-size: 22px; }
.consulting-heading .blk-sub { margin: 0; max-width: 760px; }
.consulting-source {
  flex: none;
  padding: 6px 9px;
  border: 1px solid var(--blue-mid);
  background: var(--blue-soft);
  color: var(--blue);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
}
.consulting-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.consult-chart {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 8px 24px rgba(15,23,42,.045);
}
.consult-chart.consulting-wide { grid-column: 1 / -1; }
.consult-chart > header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  min-height: 42px;
  margin-bottom: 10px;
}
.consult-chart > header strong,
.consult-chart > header span { display: block; }
.consult-chart > header strong { font-size: 16px; color: var(--ink); }
.consult-chart > header span { margin-top: 3px; font-size: 13px; color: var(--muted); line-height: 1.45; }
.consult-chart > header em {
  flex: none;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}
.consult-svg { display: block; width: 100%; height: auto; aspect-ratio: 12 / 5; }
.consult-svg text { font-family: inherit; }
.comparable-svg { aspect-ratio: 72 / 35; }
.consult-svg-value { fill: var(--ink); font-size: 13px; font-weight: 800; }
.consult-svg-label { fill: var(--muted); font-size: 12px; }
.consult-svg-delta { fill: var(--muted); font-size: 11px; }
.waterfall-mobile { display: none; }
.waterfall-mobile-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.waterfall-mobile-row:last-child { border-bottom: 0; }
.waterfall-mobile-row > div:first-child { display: contents; }
.waterfall-mobile-row span { color: var(--ink); font-size: 14px; font-weight: 750; }
.waterfall-mobile-row strong { color: var(--ink); font-size: 14px; font-variant-numeric: tabular-nums; }
.waterfall-mobile-track {
  grid-column: 1 / -1;
  height: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--soft);
}
.waterfall-mobile-track i { display: block; height: 100%; border-radius: inherit; }
.waterfall-mobile-row small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; line-height: 1.45; }
.consult-caption,
.consult-method-note { margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.consult-method-note a,
.strategy-citation a { color: var(--blue); font-weight: 700; }
.consult-empty {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px;
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
  color: #64748b;
  text-align: center;
  font-size: 12px;
}
.consult-empty strong { color: #334155; font-size: 14px; }

.tornado-head,
.tornado-row {
  display: grid;
  grid-template-columns: 58px minmax(0,1fr) 82px minmax(0,1fr) 58px;
  align-items: center;
  gap: 7px;
}
.tornado-head { margin: 8px 0; color: var(--muted); font-size: 11px; text-align: center; }
.tornado-head b { color: var(--ink); }
.tornado-row { min-height: 31px; }
.tornado-row strong { color: var(--ink); font-size: 12px; text-align: center; }
.tornado-left,
.tornado-right { position: relative; height: 10px; background: #f1f5f9; overflow: hidden; }
.tornado-left { display: flex; justify-content: flex-end; border-radius: 4px 0 0 4px; }
.tornado-right { border-radius: 0 4px 4px 0; }
.tornado-left i,
.tornado-right i { display: block; height: 100%; }
.tornado-left i { background: #dc2626; }
.tornado-right i { background: #0f766e; }
.tornado-row.top-driver strong { color: #0f172a; font-weight: 900; }
.tornado-value { font-size: 11px; font-variant-numeric: tabular-nums; }
.tornado-value.bad { color: #b91c1c; text-align: right; }
.tornado-value.good { color: #047857; }

.consult-funnel { display: grid; justify-items: center; gap: 6px; padding: 4px 0; }
.funnel-step {
  width: var(--funnel-width);
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-left: 4px solid #2563eb;
  background: #eff6ff;
  color: #1e3a8a;
}
.funnel-step span { font-size: 12px; }
.funnel-step strong { font-size: 14px; text-align: right; }
.funnel-step.pending { border-color: #94a3b8; background: #f8fafc; color: #64748b; }
.funnel-step.danger { border-color: #dc2626; background: #fef2f2; color: #991b1b; }
.funnel-step.good { border-color: #059669; background: #ecfdf5; color: #065f46; }

.positioning-summary,
.positioning-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.positioning-summary {
  padding: 10px 12px;
  border-left: 4px solid var(--blue);
  background: var(--blue-soft);
}
.positioning-summary strong,
.positioning-summary span { display: block; }
.positioning-summary strong { color: var(--ink); font-size: 15px; }
.positioning-summary span { margin-top: 2px; color: var(--muted); font-size: 12px; }
.positioning-summary > b {
  flex: none;
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 12px;
}
.positioning-summary > b.pass { color: #065f46; background: #d1fae5; }
.positioning-summary > b.fail { color: #991b1b; background: #fee2e2; }
.positioning-summary > b.pending { color: #92400e; background: #fef3c7; }
.positioning-path { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.positioning-step {
  min-width: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  padding: 10px;
  border-bottom: 2px solid var(--line);
  background: var(--bg2);
}
.positioning-step > b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 11px;
}
.positioning-step span,
.positioning-step strong,
.positioning-step small { display: block; }
.positioning-step span { color: var(--muted); font-size: 12px; }
.positioning-step strong { margin-top: 3px; color: var(--ink); font-size: 14px; overflow-wrap: anywhere; }
.positioning-step small { margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.positioning-step.pending { border-bottom-color: #f59e0b; }
.positioning-step.known { border-bottom-color: #10b981; }
.positioning-price { margin-top: 8px; padding: 9px 11px; border: 1px solid var(--line); }
.positioning-price span { color: var(--muted); font-size: 12px; }
.positioning-price strong { color: var(--ink); font-size: 13px; text-align: right; }

.operating-reality-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.operating-check { min-width: 0; padding: 14px; border: 1px solid var(--line); border-top: 3px solid #94a3b8; background: var(--bg2); }
.operating-check.pass { border-top-color: #10b981; }
.operating-check.review,
.operating-check.pending { border-top-color: #f59e0b; }
.operating-check.fail { border-top-color: #dc2626; }
.operating-check > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.operating-check > header strong,
.operating-check > header span { display: block; }
.operating-check > header strong { color: var(--ink); font-size: 15px; }
.operating-check > header span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.operating-check > header > b { flex: none; color: var(--blue); font-size: 12px; }
.operating-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 13px; }
.operating-metrics > div { min-width: 0; padding: 8px; border-left: 2px solid #bfdbfe; background: #fff; }
.operating-metrics span,
.operating-metrics strong { display: block; }
.operating-metrics span { color: var(--muted); font-size: 11px; }
.operating-metrics strong { margin-top: 4px; color: var(--ink); font-size: 14px; overflow-wrap: anywhere; }
.operating-track { height: 8px; margin-top: 11px; overflow: hidden; border-radius: 4px; background: #e2e8f0; }
.operating-track i { display: block; height: 100%; border-radius: inherit; background: var(--blue); }
.operating-check.fail .operating-track i { background: #dc2626; }
.operating-check.review .operating-track i { background: #f59e0b; }
.operating-check > p { margin: 9px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

.evidence-heatmap { display: grid; gap: 4px; }
.evidence-heat-row {
  display: grid;
  grid-template-columns: 78px 76px minmax(0,1fr) 118px 86px 48px;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 7px;
  border-bottom: 1px solid #eef2f7;
  font-size: 11px;
}
.evidence-heat-row strong { color: var(--ink); }
.evidence-value { font-variant-numeric: tabular-nums; color: var(--ink); overflow-wrap: anywhere; }
.evidence-source { min-width: 0; color: var(--muted); overflow-wrap: anywhere; }
.evidence-grade { padding: 4px 6px; border-radius: 4px; font-weight: 800; text-align: center; }
.evidence-grade.verified { background: #d1fae5; color: #065f46; }
.evidence-grade.confirmed,
.evidence-grade.provided,
.evidence-grade.api { background: #dbeafe; color: #1e40af; }
.evidence-grade.default,
.evidence-grade.inferred { background: #fef3c7; color: #92400e; }
.evidence-grade.conflict,
.evidence-grade.unknown { background: #fee2e2; color: #991b1b; }
.epistemic-badge {
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}
.epistemic-badge.fact { color: #065f46; background: #ecfdf5; border-color: #a7f3d0; }
.epistemic-badge.estimate { color: #1d4ed8; background: #eff6ff; border-color: #bfdbfe; }
.epistemic-badge.assumption { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.epistemic-badge.unknown { color: #991b1b; background: #fef2f2; border-color: #fecaca; }
.evidence-heat-row small { color: var(--muted); text-align: right; font-size: 10px; }

.calibration-panel { border-top: 3px solid var(--blue); }
#consultDecisionCalibration { display: grid; gap: 12px; }
.calibration-block {
  padding: 14px;
  border: 1px solid #d8e1ed;
  border-radius: 8px;
  background: #f8fafc;
}
.stage-gate-flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.stage-gate-step {
  min-width: 0;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 8px;
  padding: 11px;
  border-top: 3px solid #94a3b8;
  background: #fff;
}
.stage-gate-step.pass { border-top-color: #10b981; }
.stage-gate-step.fail { border-top-color: #dc2626; }
.stage-gate-step.pending { border-top-color: #f59e0b; }
.stage-gate-step > b {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
}
.stage-gate-step header { display: block; }
.stage-gate-step header strong,
.stage-gate-step header span { display: block; }
.stage-gate-step header strong { color: var(--ink); font-size: 13px; }
.stage-gate-step header span { margin-top: 2px; color: var(--blue); font-size: 11px; font-weight: 700; }
.stage-gate-step p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.stage-gate-step small { display: block; margin-top: 5px; color: var(--ink); font-size: 12px; line-height: 1.5; }
.calibration-block > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.calibration-block > header > div { min-width: 0; }
.calibration-block > header strong { display: block; color: var(--ink); font-size: 15px; }
.calibration-block > header span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.calibration-state,
.review-date {
  flex: none;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.calibration-state.pass { color: #065f46; background: #ecfdf5; border-color: #a7f3d0; }
.calibration-state.review { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.calibration-state.fail { color: #991b1b; background: #fef2f2; border-color: #fecaca; }
.calibration-paths { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.calibration-path {
  position: relative;
  min-width: 0;
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #fff;
}
.calibration-path > span { display: block; color: var(--muted); font-size: 13px; }
.calibration-path > strong { display: block; margin-top: 5px; color: var(--ink); font-size: 24px; }
.calibration-path > strong small { margin-left: 4px; font-size: 12px; color: var(--muted); }
.calibration-path p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.calibration-path em {
  position: absolute;
  top: 10px;
  right: 10px;
  color: var(--blue);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}
.calibration-empty {
  grid-column: 1 / -1;
  padding: 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.calibration-cross-result {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #d8e1ed;
}
.calibration-cross-result strong { flex: none; color: var(--ink); font-size: 13px; }
.calibration-cross-result span { min-width: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.reality-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.reality-check {
  min-width: 0;
  padding: 11px;
  border: 1px solid #d8e1ed;
  border-left: 4px solid #94a3b8;
  border-radius: 7px;
  background: #fff;
}
.reality-check.pass { border-left-color: #059669; }
.reality-check.fail { border-left-color: #dc2626; }
.reality-check.review { border-left-color: #d97706; }
.reality-check header { display: flex; justify-content: space-between; gap: 8px; }
.reality-check header strong { color: var(--ink); font-size: 13px; }
.reality-check header b { flex: none; color: var(--muted); font-size: 11px; }
.reality-check.pass header b { color: #047857; }
.reality-check.fail header b { color: #b91c1c; }
.reality-check.review header b { color: #b45309; }
.reality-check p { margin: 6px 0; color: var(--ink-soft); font-size: 12px; line-height: 1.55; }
.reality-check small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.validation-priority-list { display: grid; gap: 7px; }
.validation-priority {
  display: grid;
  grid-template-columns: 30px minmax(0,1fr);
  gap: 10px;
  align-items: flex-start;
  padding: 10px;
  border: 1px solid #d8e1ed;
  border-radius: 7px;
  background: #fff;
}
.validation-priority > b {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
}
.validation-priority header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.validation-priority header strong { color: var(--ink); font-size: 13px; }
.validation-priority header span { color: var(--muted); font-size: 11px; text-align: right; }
.validation-priority p { margin: 4px 0; color: var(--ink-soft); font-size: 12px; line-height: 1.5; }
.validation-priority small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.decision-gates { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.decision-gate {
  min-width: 0;
  padding: 11px;
  border: 1px solid #d8e1ed;
  border-radius: 7px;
  background: #fff;
}
.decision-gate.active { box-shadow: inset 0 0 0 2px var(--blue); }
.decision-gate.active.stop { box-shadow: inset 0 0 0 2px #dc2626; }
.decision-gate.active.revise { box-shadow: inset 0 0 0 2px #d97706; }
.decision-gate header { display: flex; justify-content: space-between; gap: 8px; }
.decision-gate header strong { color: var(--ink); font-size: 13px; }
.decision-gate header span { color: var(--muted); font-size: 11px; }
.decision-gate ul { margin: 8px 0 0; padding: 0; list-style: none; }
.decision-gate li { display: flex; gap: 6px; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.decision-gate li b { flex: none; }
.decision-gate li.met { color: var(--ink-soft); }
.decision-gate li.met b { color: #059669; }
.calibration-summary-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.calibration-summary-list li {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255,255,255,.55);
  font-size: 13px;
}
.calibration-summary-list li > strong { color: var(--ink); }
.calibration-summary-list li > span { margin-left: 7px; color: var(--muted); font-size: 11px; }
.calibration-summary-list p { margin: 4px 0 2px; color: var(--ink-soft); font-size: 12px; line-height: 1.45; }
.calibration-summary-list small { color: var(--muted); font-size: 11px; line-height: 1.45; }

.comparable-list { display: grid; gap: 6px; margin-top: 8px; }
.comparable-item {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto 28px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-left: 3px solid #94a3b8;
  background: #f8fafc;
}
.comparable-item.eligible { border-color: #0f766e; background: #f0fdfa; }
.comparable-item strong,
.comparable-item span { display: block; }
.comparable-item strong { color: var(--ink); font-size: 13px; }
.comparable-item span { margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.comparable-item em { color: var(--muted); font-size: 11px; font-style: normal; font-weight: 800; }
.comparable-item.eligible em { color: #047857; }
.icon-remove {
  width: 28px; height: 28px; border: 0; background: transparent; color: #64748b;
  cursor: pointer; font-size: 18px;
}
.comparable-entry { margin-top: 10px; border-top: 1px solid #e2e8f0; padding-top: 10px; }
.comparable-entry > summary { cursor: pointer; color: var(--blue); font-size: 13px; font-weight: 800; }
.comparable-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 8px;
  margin: 10px 0;
}
.comparable-form label { color: var(--muted); font-size: 12px; font-weight: 700; }
.comparable-form input,
.comparable-form select {
  width: 100%; min-width: 0; margin-top: 4px; padding: 8px; border: 1px solid #cbd5e1;
  border-radius: 6px; background: #fff; color: #0f172a; font: inherit;
}
.comparable-form .comparable-wide { grid-column: span 2; }
.comparable-form .comparable-check {
  display: flex; align-items: center; gap: 7px; color: #334155; font-size: 10px;
}
.comparable-form .comparable-check input { width: 15px; margin: 0; }

.issue-root {
  width: 180px;
  margin: 0 auto 22px;
  padding: 10px 12px;
  border: 2px solid #0f172a;
  text-align: center;
  position: relative;
}
.issue-root::after {
  content: ""; position: absolute; left: 50%; bottom: -23px; width: 1px; height: 22px; background: #94a3b8;
}
.issue-root strong,
.issue-root span { display: block; }
.issue-root strong { font-size: 14px; color: var(--ink); }
.issue-root span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.issue-branches {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px;
  position: relative;
}
.issue-branches::before {
  content: ""; position: absolute; left: 16%; right: 16%; top: -12px; height: 1px; background: #94a3b8;
}
.issue-branch { min-width: 0; border-top: 3px solid var(--blue); background: var(--bg2); }
.issue-branch.execution { border-color: #0f766e; }
.issue-branch.personal { border-color: #9333ea; }
.issue-branch > header { padding: 9px 10px; border-bottom: 1px solid #e2e8f0; }
.issue-branch > header strong,
.issue-branch > header span { display: block; }
.issue-branch > header strong { color: var(--ink); font-size: 13px; }
.issue-branch > header span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.issue-node { padding: 9px 10px; border-bottom: 1px solid #e2e8f0; }
.issue-node:last-child { border-bottom: 0; }
.issue-node strong,
.issue-node span { display: block; }
.issue-node strong { color: var(--ink); font-size: 12px; }
.issue-node span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.issue-node p { margin: 6px 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.issue-node small { color: var(--blue); font-size: 11px; line-height: 1.45; }
.issue-node.muted { color: var(--muted); font-size: 11px; }
.consult-journey {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 8px;
  margin-top: 12px;
}
.journey-step { min-height: 76px; padding: 10px; border-top: 3px solid #94a3b8; background: #f8fafc; }
.journey-step.done { border-color: #0f766e; background: #f0fdfa; }
.journey-step.danger { border-color: #dc2626; background: #fef2f2; }
.journey-step b,
.journey-step strong,
.journey-step span { display: block; }
.journey-step b { color: var(--muted); font-size: 11px; }
.journey-step strong { margin: 3px 0; color: var(--ink); font-size: 13px; }
.journey-step span { color: var(--muted); font-size: 11px; line-height: 1.5; }

.consult-limits { margin-top: 14px; padding-top: 14px; border-top: 1px solid #d8e1ed; }
.consult-limits > header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px;
}
.consult-limits > header div { display: grid; gap: 2px; }
.consult-limits > header strong { color: var(--ink); font-size: 15px; }
.consult-limits > header span,
.consult-limits > header em { color: var(--muted); font-size: 12px; font-style: normal; }
.consult-limit-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid #d8e1ed; background: #fff;
}
.consult-limit-grid > div { min-width: 0; padding: 12px; border-right: 1px solid #d8e1ed; }
.consult-limit-grid > div:last-child { border-right: 0; }
.consult-limit-grid span,
.consult-limit-grid strong,
.consult-limit-grid small { display: block; }
.consult-limit-grid > div > span:first-child { color: var(--muted); font-size: 12px; }
.consult-limit-grid strong { margin: 5px 0; color: var(--ink); font-size: 17px; }
.consult-limit-grid strong.danger { color: #b91c1c; }
.consult-limit-grid strong.safe { color: #047857; }
.consult-limit-grid small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.consult-limit-pending { margin: 5px 0; color: #b45309 !important; font-size: 12px !important; font-weight: 700; }
.consult-limit-note { margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }

.strategy-appendix { margin: 18px 0 22px; border-top: 1px solid var(--line); padding-top: 16px; }
.strategy-appendix > summary { cursor: pointer; color: var(--blue); font-size: 15px; font-weight: 800; }
.strategy-analysis-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin: 12px 0; padding: 10px 12px; border-left: 3px solid var(--blue); background: var(--blue-soft);
}
.strategy-analysis-meta span { flex: none; color: var(--blue); font-size: 12px; font-weight: 800; }
.strategy-analysis-meta p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.strategy-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 14px; margin-top: 12px; }
.strategy-grid h3 { margin: 0 0 10px; color: var(--ink); font-size: 15px; }
.swot-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.swot-cell { min-height: 128px; padding: 12px; border: 1px solid var(--line); background: var(--card); }
.swot-cell > b { display: inline-grid; place-items: center; width: 26px; height: 26px; background: var(--blue); color: #fff; font-size: 12px; }
.swot-cell > strong { margin-left: 7px; color: var(--ink); font-size: 13px; }
.swot-cell ul { margin: 9px 0 0; padding-left: 18px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.swot-cell li + li { margin-top: 7px; }
.swot-cell li small { display: block; margin-top: 2px; color: var(--blue); font-size: 10px; font-weight: 700; }
.five-forces { display: grid; gap: 6px; }
.five-forces > div { padding: 11px 12px; border-left: 3px solid var(--blue); background: var(--bg2); }
.five-forces header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.five-forces strong,
.five-forces span,
.five-forces small { display: block; }
.five-forces strong { color: var(--ink); font-size: 13px; }
.five-forces header b { padding: 2px 6px; border: 1px solid var(--blue-mid); color: var(--blue); font-size: 10px; }
.five-forces span { margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.five-forces small { margin-top: 4px; color: var(--blue); font-size: 10px; line-height: 1.45; }
.strategy-citation { margin: 9px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.knowledge-sources { margin-top: 12px; }
.knowledge-sources > div {
  display: grid; grid-template-columns: 180px minmax(0,1fr) 100px; gap: 8px;
  padding: 8px 0; border-bottom: 1px solid #e2e8f0; align-items: start;
}
.knowledge-sources strong { color: #334155; font-size: 9px; }
.knowledge-sources p,
.knowledge-sources small { margin: 0; color: #64748b; font-size: 8px; line-height: 1.45; }
.knowledge-sources a,
.knowledge-sources > div > span { color: #1d4ed8; font-size: 8px; text-align: right; }
.knowledge-prohibited { margin-top: 12px; }
.knowledge-prohibited h3 { margin: 0 0 8px; color: #0f172a; font-size: 12px; }
.knowledge-prohibited p { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.knowledge-prohibited span {
  padding: 5px 7px; border: 1px solid #fecaca; background: #fff7f7; color: #991b1b; font-size: 9px;
}

.validation-5w2h { margin-top: 8px; }
.validation-5w2h summary { cursor: pointer; color: #1d4ed8; font-size: 11px; font-weight: 700; }
.validation-5w2h dl { display: grid; gap: 4px; margin: 8px 0 0; }
.validation-5w2h dl > div { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 8px; }
.validation-5w2h dt { color: #475569; font-size: 10px; font-weight: 800; }
.validation-5w2h dd { min-width: 0; margin: 0; color: #64748b; font-size: 10px; line-height: 1.45; }

@media (max-width: 900px) {
  .consulting-grid { grid-template-columns: 1fr; }
  .consult-chart.consulting-wide { grid-column: auto; }
  .issue-branches { grid-template-columns: 1fr; }
  .issue-branches::before,
  .issue-root::after { display: none; }
  .strategy-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .consult-input-divider { align-items: flex-start; flex-direction: column; gap: 3px; }
  .consulting-heading { flex-direction: column; }
  .consulting-source { align-self: flex-start; }
  .consult-chart { padding: 12px; }
  .consult-chart > header { min-height: 0; }
  .consult-svg { min-height: 240px; }
  .strategy-analysis-meta { align-items: flex-start; flex-direction: column; gap: 4px; }
  .tornado-head,
  .tornado-row { grid-template-columns: 46px minmax(0,1fr) 64px minmax(0,1fr) 46px; gap: 4px; }
  .evidence-heat-row { grid-template-columns: 64px minmax(0,1fr) 96px; font-size: 11px; }
  .evidence-heat-row > strong { grid-column: 1; grid-row: 1; }
  .evidence-heat-row .evidence-value { grid-column: 2; grid-row: 1; }
  .evidence-heat-row .evidence-grade { grid-column: 3; grid-row: 1; }
  .evidence-heat-row .evidence-source { grid-column: 1 / 3; grid-row: 2; display: block; }
  .evidence-heat-row .epistemic-badge { grid-column: 3; grid-row: 2; }
  .evidence-heat-row small { display: none; }
  .calibration-paths,
  .reality-grid,
  .decision-gates { grid-template-columns: 1fr; }
  .calibration-block { padding: 11px; }
  .calibration-block > header,
  .calibration-cross-result,
  .validation-priority header { flex-direction: column; gap: 5px; }
  .calibration-path > strong { font-size: 21px; }
  .validation-priority header span { text-align: left; }
  .comparable-form { grid-template-columns: 1fr; }
  .comparable-form .comparable-wide { grid-column: auto; }
  .positioning-path,
  .operating-reality-grid,
  .stage-gate-flow { grid-template-columns: 1fr; }
  .positioning-summary,
  .positioning-price { align-items: flex-start; flex-direction: column; }
  .positioning-price strong { text-align: left; }
  .operating-metrics { grid-template-columns: 1fr; }
  .operating-check > header { align-items: flex-start; }
  .consult-journey,
  .consult-limit-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .swot-grid { grid-template-columns: 1fr; }
  .knowledge-sources > div { grid-template-columns: 1fr; }
  .knowledge-sources a,
  .knowledge-sources > div > span { text-align: left; }
}

@media print {
  .consult-inputs,
  .comparable-entry,
  .icon-remove { display: none !important; }
  .consulting-suite { border: 0; margin: 0; padding: 0; }
  .consulting-heading { margin-bottom: 3mm; }
  .print-report-cover {
    display: block;
    margin: 0 0 7mm;
    padding: 8mm 7mm;
    border-top: 2mm solid #102a56;
    border-bottom: 1px solid #cbd5e1;
  }
  .print-report-cover p { margin: 0 0 5mm; color: #2563eb; font-size: 9pt; font-weight: 900; letter-spacing: 1px; }
  .print-report-cover h1 { margin: 0 0 5mm; color: #102a56; font-size: 25pt; letter-spacing: 0; }
  .print-report-cover > div { display: flex; justify-content: space-between; gap: 8mm; color: #334155; font-size: 11pt; }
  .print-report-cover small { display: block; margin-top: 3mm; color: #64748b; font-size: 8pt; }
  .consulting-grid { display: block !important; }
  .consult-chart {
    break-inside: avoid; page-break-inside: avoid; box-shadow: none; padding: 3mm; margin: 0 0 3mm;
  }
  .positioning-step,
  .operating-check,
  .stage-gate-step { break-inside: avoid; page-break-inside: avoid; }
  .positioning-path,
  .operating-reality-grid { gap: 2mm; }
  .stage-gate-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2mm; }
  .consult-empty { min-height: 0; padding: 5mm; }
  .consult-svg { max-height: 78mm; }
  .consult-caption { font-size: 7pt; }
  .calibration-block { break-inside: avoid; page-break-inside: avoid; padding: 2.5mm; }
  #consultCalibrationPanel,
  #consultIssuePanel { break-inside: auto; page-break-inside: auto; }
  #consultIssueTree { break-inside: auto; page-break-inside: auto; }
  #consultIssueTree .issue-branches { display: block; }
  #consultIssueTree .issue-branches::before,
  #consultIssueTree .issue-root::after { display: none; }
  #consultIssueTree .issue-branch {
    break-inside: auto;
    page-break-inside: auto;
    margin-top: 3mm;
  }
  #consultIssueTree .issue-branch > header,
  #consultIssueTree .issue-node {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .consult-journey,
  .consult-limits { break-inside: avoid; page-break-inside: avoid; }
  .calibration-paths,
  .reality-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .decision-gates { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .calibration-block > header span,
  .calibration-cross-result span,
  .reality-check p,
  .validation-priority p { font-size: 8pt; }
  .reality-check small,
  .validation-priority small,
  .decision-gate li { font-size: 7pt; }
  .consult-limit-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  #validationPlan .validation-row {
    display: grid !important;
    grid-template-columns: 24mm minmax(0,1fr) !important;
    gap: 3mm !important;
    break-inside: avoid;
    page-break-inside: avoid;
    padding: 3mm !important;
  }
  #validationPlan .validation-row > input,
  #validationPlan .validation-result,
  #validationPlan .validation-evidence,
  #validationPlan .validation-pass,
  #validationPlan .input-impact-badge { display: none !important; }
  #validationPlan .validation-5w2h { display: block !important; margin-top: 2mm; }
  #validationPlan .validation-5w2h summary { display: none !important; }
  #validationPlan .validation-5w2h dl {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 1.5mm 4mm;
    margin: 0;
  }
  #validationPlan .validation-5w2h dl > div {
    display: grid;
    grid-template-columns: 17mm minmax(0,1fr);
    gap: 1.5mm;
  }
  #validationPlan .validation-5w2h dt,
  #validationPlan .validation-5w2h dd { font-size: 7.5pt; line-height: 1.35; }
  .strategy-appendix { break-before: auto; }
  .strategy-appendix > summary { display: none; }
  .strategy-appendix[open] #consultStrategyContent { display: block; }
}

.input-impact-legend {
  margin: 10px 0 14px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg2);
  font-size: 11px;
  color: var(--muted);
}

.input-impact-legend strong,
.idea-impact-guide strong {
  color: var(--ink);
  font-size: 11px;
}

.idea-impact-guide {
  margin-bottom: 6px;
  color: var(--muted);
}

.field-label-line {
  justify-content: space-between;
  width: 100%;
}

.input-impact-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 18px;
  margin-left: 5px;
  padding: 1px 5px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0;
  white-space: nowrap;
  vertical-align: middle;
  cursor: help;
  outline: none;
}

.input-impact-badge.calculation {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.input-impact-badge.scoring {
  color: #92400e;
  background: #fffbeb;
  border-color: #fde68a;
}

.input-impact-badge.explanation {
  color: #475569;
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.input-impact-badge.evidence {
  color: #6d28d9;
  background: #f5f3ff;
  border-color: #ddd6fe;
}

.input-impact-badge:focus {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .16);
}

.input-impact-badge:hover::after,
.input-impact-badge:focus::after {
  content: attr(data-impact-tip);
  position: absolute;
  z-index: 90;
  left: 50%;
  bottom: calc(100% + 7px);
  width: max-content;
  max-width: min(280px, calc(100vw - 36px));
  padding: 7px 9px;
  border-radius: 5px;
  background: #111827;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.45;
  white-space: normal;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .2);
  transform: translateX(-50%);
  pointer-events: none;
}

.ev-impact {
  display: inline-flex;
  margin-left: 2px;
}

.evidence-row .ev-impact .input-impact-badge {
  margin-left: 4px;
}

.validation-impact-badge {
  display: inline-flex;
  align-self: start;
}

.result-source-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-left: 6px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg2);
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0;
  vertical-align: middle;
}

.result-source-badge.calculation {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.result-source-badge.scoring {
  color: #92400e;
  background: #fffbeb;
  border-color: #fde68a;
}

.result-source-badge.agent-source {
  color: #475569;
  background: #f8fafc;
  border-color: #cbd5e1;
}

.agent-card .nm {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.agent-summary-item h3 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.result-source-anchor {
  display: inline-flex;
}

.metric-row .met > span {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

/* ─────────────────────────────────────────────
   1. Interactive Evidence Row Enhancement
   ───────────────────────────────────────────── */

/* Clickable evidence row */
.evidence-row.interactive {
  cursor: pointer;
  border-radius: 10px;
  padding: 10px 12px;
  transition: background .2s var(--ease), box-shadow .2s var(--ease);
}
.evidence-row.interactive:hover {
  background: var(--bg2);
  box-shadow: var(--shadow-sm);
}

/* Status toggle select dropdown */
.evidence-row .ev-status-toggle {
  appearance: none;
  -webkit-appearance: none;
  padding: 4px 28px 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  background-color: var(--yellow-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236b7280'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  color: #92400e;
  cursor: pointer;
  outline: none;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
  width: 110px;
}
.evidence-row .ev-status-toggle:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.evidence-row .ev-status-toggle.provided,
.evidence-status.provided {
  background: var(--blue-soft);
  color: var(--blue);
}
.evidence-row .ev-status-toggle.verified,
.evidence-status.verified {
  background: var(--green-bg);
  color: var(--green);
}
.evidence-row .ev-status-toggle.inferred,
.evidence-status.inferred {
  background: #f5f3ff;
  color: var(--purple);
  border-style: dashed;
}

/* Status color variants for the toggle */
.evidence-row .ev-status-toggle[value="confirmed"],
.evidence-row .ev-status-toggle.confirmed {
  background-color: var(--green-bg);
  color: var(--green);
  border-color: rgba(22, 163, 74, .25);
}
.evidence-row .ev-status-toggle[value="default"],
.evidence-row .ev-status-toggle.default {
  background-color: var(--yellow-bg);
  color: #92400e;
  border-color: rgba(202, 138, 4, .2);
}
.evidence-row .ev-status-toggle[value="verify"],
.evidence-row .ev-status-toggle.verify {
  background-color: var(--blue-soft);
  color: var(--blue);
  border-color: rgba(37, 99, 235, .2);
}
.evidence-row .ev-status-toggle[value="conflict"],
.evidence-row .ev-status-toggle.conflict {
  background-color: var(--red-bg);
  color: var(--red);
  border-color: rgba(220, 38, 38, .2);
}
.evidence-row .ev-status-toggle[value="ai_inferred"],
.evidence-row .ev-status-toggle.ai_inferred {
  background-color: #f5f3ff;
  color: var(--purple);
  border: 1.5px dashed var(--purple);
  border-radius: 8px;
}

/* Inline editable source input */
.evidence-row .ev-source-edit {
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 12px;
  font-family: inherit;
  color: var(--ink);
  width: 100%;
  outline: none;
  transition: background .15s var(--ease), border-color .15s var(--ease);
}
.evidence-row .ev-source-edit:hover {
  background: var(--bg);
}
.evidence-row .ev-source-edit:focus {
  background: var(--card);
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .08);
}

/* AI-inferred row: left purple dashed border */
.evidence-row.ai-inferred {
  border-left: 3px dashed var(--purple);
  border-radius: 0 10px 10px 0;
  background: #faf5ff;
  position: relative;
}
.evidence-row.ai-inferred::before {
  content: "AI";
  position: absolute;
  top: 6px;
  left: -1px;
  font-size: 9px;
  font-weight: 900;
  color: var(--purple);
  background: #f5f3ff;
  padding: 1px 4px;
  border-radius: 0 4px 4px 0;
  line-height: 1;
  letter-spacing: .04em;
}

/* ─────────────────────────────────────────────
   2. Evidence Progress Bar
   ───────────────────────────────────────────── */

.evidence-progress {
  margin-top: 8px;
  margin-bottom: 4px;
}

.evidence-progress-track {
  height: 4px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
  position: relative;
}

.evidence-progress-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--blue);
  transition: width .5s var(--ease);
  position: relative;
}
/* Subtle shimmer on fill */
.evidence-progress-fill::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, .35) 50%,
    transparent 100%
  );
  animation: evidenceShimmer 2.4s ease infinite;
}

.ev-source-stack {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.ev-source-stack small {
  color: var(--muted);
  overflow-wrap: anywhere;
}
.ev-source-stack a {
  color: var(--blue);
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
}
.ev-edit-btn {
  justify-self: start;
  border: 0;
  background: transparent;
  color: var(--blue);
  padding: 2px 0;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.evidence-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.evidence-form {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.evidence-natural-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}
.evidence-natural-input label {
  grid-column: 1 / -1;
  font-size: 12px;
  font-weight: 800;
}
.evidence-natural-input textarea,
.evidence-form-grid input,
.evidence-form-grid select,
.evidence-form-grid textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  padding: 9px 10px;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}
.evidence-natural-input textarea {
  min-height: 72px;
  resize: vertical;
}
.evidence-natural-actions { display: grid; gap: 7px; align-self: stretch; }
.evidence-natural-actions .btn { justify-content: center; min-width: 118px; }
.evidence-voice-btn { display: inline-flex; align-items: center; gap: 6px; }
.evidence-voice-btn.is-listening {
  border-color: var(--red); background: var(--red-bg); color: var(--red);
  box-shadow: 0 0 0 3px rgba(220,38,38,.08);
}
.evidence-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.evidence-form-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.evidence-form-grid textarea {
  min-height: 64px;
  resize: vertical;
}
.evidence-form-wide {
  grid-column: span 2;
}
.evidence-form-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.evidence-direct-fields { margin: 0 0 16px; }
.evidence-direct-head,
.evidence-direct-complete {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--blue-mid); border-radius: 8px; background: var(--blue-soft);
}
.evidence-direct-head div,
.evidence-direct-complete { min-width: 0; }
.evidence-direct-head strong,
.evidence-direct-head span,
.evidence-direct-complete strong,
.evidence-direct-complete span { display: block; }
.evidence-direct-head strong,
.evidence-direct-complete strong { color: var(--ink); font-size: 15px; }
.evidence-direct-head span,
.evidence-direct-complete span { margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.evidence-direct-head em { flex: none; color: var(--blue); font-size: 12px; font-style: normal; font-weight: 800; }
.evidence-direct-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 10px; }
.evidence-direct-card {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(150px,.9fr); align-items: center; gap: 12px;
  padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card);
}
.evidence-direct-card span,
.evidence-direct-card strong,
.evidence-direct-card small { display: block; min-width: 0; }
.evidence-direct-card strong { color: var(--ink); font-size: 13px; line-height: 1.4; }
.evidence-direct-card small { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.evidence-direct-card input { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); padding: 9px 10px; color: var(--ink); font: inherit; font-size: 13px; }
.consult-fill-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.consult-fill-link {
  border: 1px solid var(--blue-mid); border-radius: 6px; background: var(--blue-soft); padding: 5px 8px;
  color: var(--blue); cursor: pointer; font-size: 12px; font-weight: 800;
}
.evidence-heat-row small .consult-fill-link { font-size: 11px; }

@media (max-width: 680px) {
  .evidence-direct-grid { grid-template-columns: 1fr; }
  .evidence-direct-card { grid-template-columns: 1fr; gap: 7px; }
  .evidence-direct-head,
  .evidence-direct-complete { align-items: flex-start; flex-direction: column; }
}

/* Decision change, special factors and Skill trace */
.decision-change-summary,
.special-factors-summary,
.skill-trace-block {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
}
.decision-change-summary {
  padding: 16px;
  border-color: rgba(37, 99, 235, .28);
}
.decision-change-head,
.special-factor-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.decision-change-head div,
.special-factor-title {
  min-width: 0;
}
.decision-change-head strong,
.special-factor-title strong {
  display: block;
  font-size: 15px;
}
.decision-change-head span,
.special-factor-title span {
  color: var(--muted);
  font-size: 11px;
}
.decision-change-head > b {
  color: var(--blue);
  font-size: 12px;
}
.decision-inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.decision-inputs span {
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--blue-soft);
  color: #315179;
  font-size: 11px;
}
.decision-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.decision-metrics > span {
  display: grid;
  gap: 2px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  font-size: 11px;
}
.decision-metrics b {
  color: var(--ink);
  font-size: 15px;
}
.decision-metrics small {
  color: var(--blue);
  font-weight: 800;
}
.decision-drivers {
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
}
.decision-drivers ol {
  display: grid;
  gap: 2px;
  margin: 5px 0 0;
  padding-left: 18px;
}
.special-factors-summary {
  padding: 14px 16px;
}
.special-factor-list {
  display: grid;
  gap: 7px;
  margin-top: 9px;
}
.special-factor-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding-top: 7px;
  border-top: 1px solid var(--line);
}
.special-factor-row strong,
.special-factor-row span {
  display: block;
}
.special-factor-row strong {
  font-size: 12px;
}
.special-factor-row span {
  color: var(--muted);
  font-size: 11px;
}
.skill-trace-block summary {
  cursor: pointer;
  padding: 11px 14px;
  font-size: 12px;
  font-weight: 800;
}
.skill-trace-list {
  display: grid;
  padding: 0 14px 12px;
}
.skill-trace-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.skill-trace-row strong,
.skill-trace-row span {
  display: block;
}
.skill-trace-row strong {
  font-size: 12px;
}
.skill-trace-row span {
  color: var(--muted);
  font-size: 11px;
}
.skill-trace-meta {
  display: flex;
  gap: 8px;
  align-items: center;
}
.skill-trace-meta b {
  font-size: 11px;
}
.skill-trace-meta b.success {
  color: var(--green);
}
.skill-trace-meta b.local {
  color: var(--blue);
}
.skill-trace-meta b.failed {
  color: var(--red);
}
@keyframes evidenceShimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ─────────────────────────────────────────────
   3. Scenario Comparison Visualization
   ───────────────────────────────────────────── */

/* Radar chart container */
.scenario-radar {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 16px auto;
  max-width: 400px;
  width: 100%;
}
.scenario-radar svg {
  width: 100%;
  height: auto;
}

/* Side-by-side comparison table */
.scenario-compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 14px;
  font-size: 12px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.compare-table th,
.scenario-compare-table th {
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  background: var(--bg2);
  border-bottom: 1px solid var(--line);
  text-align: center;
  white-space: nowrap;
}
.compare-table th:first-child,
.scenario-compare-table th:first-child {
  text-align: left;
}
.compare-table td,
.scenario-compare-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  font-weight: 600;
  color: var(--ink);
  transition: background .15s var(--ease);
}
.compare-table tr:last-child td,
.scenario-compare-table tr:last-child td {
  border-bottom: none;
}
.compare-table tbody tr:hover td,
.scenario-compare-table tbody tr:hover td {
  background: var(--blue-soft);
}
.compare-table td:first-child,
.scenario-compare-table td:first-child {
  text-align: left;
  font-weight: 700;
}

/* Delta highlights */
.compare-delta {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 800;
  font-size: 11px;
}
.compare-delta.positive {
  color: var(--green);
  background: var(--green-bg);
}
.compare-delta.negative {
  color: var(--red);
  background: var(--red-bg);
}

/* ─────────────────────────────────────────────
   4. 14-Day Plan Timeline
   ───────────────────────────────────────────── */

.plan-timeline {
  position: relative;
  margin-top: 16px;
  padding-left: 28px;
}

.plan-timeline-item {
  position: relative;
  display: flex;
  gap: 14px;
  padding-bottom: 20px;
}
.plan-timeline-item:last-child {
  padding-bottom: 0;
}

/* Vertical connector line between items */
.plan-timeline-connector {
  position: absolute;
  left: -21px;
  top: 14px;
  bottom: 0;
  width: 2px;
  background: var(--line);
  border-radius: 1px;
}
.plan-timeline-item:last-child .plan-timeline-connector {
  display: none;
}

/* Dot / circle on the timeline */
.plan-timeline-dot {
  position: absolute;
  left: -28px;
  top: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg2);
  border: 2.5px solid var(--line);
  flex-shrink: 0;
  z-index: 1;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
/* Done state */
.plan-timeline-dot.done {
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, .12);
}
/* Not-done state */
.plan-timeline-dot.not-done {
  background: var(--bg2);
  border-color: var(--muted);
}

/* Task content area */
.plan-timeline-content {
  flex: 1;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color .15s var(--ease), box-shadow .2s var(--ease);
}
.plan-timeline-content:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-sm);
}
.plan-timeline-content .tl-day {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.plan-timeline-content .tl-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}
.plan-timeline-content .tl-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

/* ─────────────────────────────────────────────
   5. Test Materials Enhancement
   ───────────────────────────────────────────── */

/* AI enhancement button */
.material-card .ai-enhance-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(124, 58, 237, .25);
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  color: var(--purple);
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s var(--ease);
  margin-top: 8px;
}
.material-card .ai-enhance-btn:hover {
  background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
  box-shadow: 0 2px 8px rgba(124, 58, 237, .15);
  transform: translateY(-1px);
}
.material-card .ai-enhance-btn:active {
  transform: translateY(0) scale(.97);
}
.material-card .ai-enhance-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none !important;
}

/* AI-enhanced material card glow border */
.material-card.enhanced {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, .08), var(--shadow);
  animation: enhancedGlow 2.4s ease infinite alternate;
}
@keyframes enhancedGlow {
  from {
    box-shadow: 0 0 0 3px rgba(124, 58, 237, .06), var(--shadow);
  }
  to {
    box-shadow: 0 0 0 5px rgba(124, 58, 237, .12), var(--shadow);
  }
}

/* Summary actions and Agent details */
.priority-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:12px}
.priority-action{display:grid;grid-template-columns:28px minmax(0,1fr);gap:10px;align-items:start;padding:12px;border:1px solid var(--line);border-radius:7px;background:var(--bg)}
.priority-action>b{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--blue);color:#fff;font-size:12px}
.priority-action strong,.priority-action span{display:block}
.priority-action strong{font-size:13px;line-height:1.5}
.priority-action span{margin-top:5px;color:var(--muted);font-size:11px;line-height:1.5}
.agent-summary-item{padding:12px 0;border-top:1px solid var(--line)}
.agent-summary-item:first-child{border-top:0}
.agent-summary-item h3{display:flex;justify-content:space-between;gap:10px;margin-bottom:8px;font-size:14px;color:var(--ink)}
.agent-summary-item h3 small{font-weight:600;color:var(--muted)}
.trace-row{display:grid;grid-template-columns:auto minmax(120px,auto) auto auto;gap:8px;align-items:start;padding:9px 0;border-top:1px solid var(--line);font-size:12px}
.trace-row small{grid-column:2/-1;display:flex;flex-wrap:wrap;gap:4px 12px;color:var(--muted)}

/* Simplified finance tables */
.finance-tables{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(300px,100%),1fr));gap:16px;margin-top:14px}
.fin-table{min-width:0;overflow-x:auto;padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--bg)}
.fin-table h3{font-size:14px;margin-bottom:10px;font-weight:800}
.fin-t{width:100%;border-collapse:collapse;font-size:13px}
.fin-t th,.fin-t td{padding:7px 10px;text-align:left;border-bottom:1px solid var(--line)}
.fin-t th{font-weight:700;color:var(--muted);font-size:12px;text-transform:uppercase}
.fin-t .fl{text-align:left}.fin-t .fr{text-align:right;font-weight:600}

/* "AI优化" badge */
.enhance-indicator {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 99px;
  background: linear-gradient(135deg, var(--purple) 0%, #a855f7 100%);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .03em;
  line-height: 1.4;
  box-shadow: 0 1px 4px rgba(124, 58, 237, .2);
}

/* ─────────────────────────────────────────────
   6. Anchor Navigation Bar
   ───────────────────────────────────────────── */

.wb-anchor-nav {
  position: sticky;
  top: var(--topbar-offset);
  z-index: 15;
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 8px 16px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
  overflow-x: auto;
  scrollbar-width: none;
}
.wb-anchor-nav::-webkit-scrollbar {
  display: none;
}

.wb-anchor-nav a {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: all .2s var(--ease);
  background: var(--bg);
  border: 1px solid transparent;
  cursor: pointer;
}
.wb-anchor-nav a:hover {
  color: var(--ink);
  background: var(--bg2);
  border-color: var(--line);
}
.wb-anchor-nav a.active {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
  box-shadow: 0 2px 8px rgba(37, 99, 235, .18);
}

/* ─────────────────────────────────────────────
   7. Backfill Action Banner
   ───────────────────────────────────────────── */

.backfill-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--blue-soft);
  border: 1px solid var(--blue-mid);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  margin-top: 12px;
  overflow: hidden;
  /* Slide-down animation */
  animation: backfillSlideDown .45s var(--ease) both;
  transform-origin: top center;
}
.backfill-banner .banner-icon {
  font-size: 18px;
  flex-shrink: 0;
}
.backfill-banner .banner-text {
  flex: 1;
}
.backfill-banner .banner-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.backfill-banner .btn-dismiss {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 11px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  color: var(--muted);
  transition: all .15s var(--ease);
}
.backfill-banner .btn-dismiss:hover {
  background: var(--bg2);
  color: var(--ink);
}

@keyframes backfillSlideDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
  }
  to {
    opacity: 1;
    transform: translateY(0);
    max-height: 80px;
    padding-top: 12px;
    padding-bottom: 12px;
    margin-top: 12px;
  }
}

/* Dismiss transition */
.backfill-banner.dismissing {
  animation: backfillDismiss .3s var(--ease) both;
}
@keyframes backfillDismiss {
  to {
    opacity: 0;
    transform: translateY(-12px);
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    border-width: 0;
  }
}

/* ─────────────────────────────────────────────
   8. Responsive Overrides
   ───────────────────────────────────────────── */

@media (max-width: 980px) {
  .priority-actions {
    grid-template-columns: 1fr;
  }
  .report-grid > * {
    min-width: 0;
    max-width: 100%;
  }
  .decision-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .evidence-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Anchor nav: allow full-width scroll */
  .wb-anchor-nav {
    padding: 6px 12px;
  }

  /* Evidence row becomes more compact */
  .evidence-row.interactive {
    grid-template-columns: 90px 1fr;
  }
  .evidence-row .ev-status-toggle {
    grid-column: 2;
    width: 100%;
  }

  /* Comparison table: horizontal scroll */
  .scenario-compare-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Plan timeline: slightly tighter spacing */
  .plan-timeline {
    padding-left: 24px;
  }
  .plan-timeline-connector {
    left: -17px;
  }
  .plan-timeline-dot {
    left: -24px;
    width: 12px;
    height: 12px;
  }
  .plan-timeline-content {
    padding: 10px 12px;
  }

  /* Material grid stays 2-col at this breakpoint but tighten */
  .material-card .ai-enhance-btn {
    font-size: 11px;
    padding: 5px 10px;
  }

  /* Radar chart: slightly smaller */
  .scenario-radar {
    max-width: 320px;
  }

  /* Backfill banner stack vertically on narrow */
  .backfill-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .backfill-banner .banner-actions {
    align-self: flex-end;
  }
}

@media (max-width: 680px) {
  .input-impact-legend {
    align-items: flex-start;
  }
  .input-impact-badge {
    margin-left: 3px;
  }
  .input-impact-badge:hover::after,
  .input-impact-badge:focus::after {
    left: 0;
    transform: none;
  }
  .field-label-line {
    align-items: flex-start;
  }
  .result-source-badge {
    margin-left: 3px;
  }
  .decision-change-head,
  .special-factor-title,
  .special-factor-row,
  .skill-trace-row {
    grid-template-columns: 1fr;
  }
  .decision-change-head,
  .special-factor-title {
    display: grid;
  }
  .decision-metrics,
  .evidence-form-grid,
  .evidence-natural-input {
    grid-template-columns: 1fr;
  }
  .evidence-form-wide {
    grid-column: auto;
  }
  .evidence-natural-input button {
    justify-self: start;
  }
  .evidence-natural-actions { display: flex; flex-wrap: wrap; }
  .evidence-natural-actions .btn { flex: 1 1 132px; }
  /* Anchor nav: tighter pill spacing */
  .wb-anchor-nav a {
    padding: 5px 10px;
    font-size: 11px;
  }

  /* Evidence row: single column */
  .evidence-row.interactive,
  .evidence-row.ai-inferred {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    border-radius: 10px;
    border-left: none;
  }
  .evidence-row.ai-inferred {
    border-top: 3px dashed var(--purple);
    border-radius: 10px;
    background: #faf5ff;
  }
  .evidence-row.ai-inferred::before {
    position: static;
    display: inline-block;
    margin-bottom: 2px;
    font-size: 9px;
    background: #ede9fe;
    padding: 1px 5px;
    border-radius: 4px;
  }
  .evidence-row .ev-status-toggle {
    width: 100%;
  }

  /* Comparison table: smaller font */
  .scenario-compare-table th,
  .scenario-compare-table td {
    padding: 8px;
    font-size: 11px;
  }

  /* Plan timeline: even more compact */
  .plan-timeline {
    padding-left: 20px;
  }
  .plan-timeline-connector {
    left: -14px;
  }
  .plan-timeline-dot {
    left: -20px;
    width: 10px;
    height: 10px;
  }
  .plan-timeline-content .tl-title {
    font-size: 13px;
  }
  .plan-timeline-content .tl-desc {
    font-size: 11px;
  }

  /* Material grid: single column */
  .material-grid,
  .material-card {
    border-radius: 10px;
  }
  .material-card .ai-enhance-btn {
    width: 100%;
    justify-content: center;
  }

  /* Radar chart: full width, smaller */
  .scenario-radar {
    max-width: 260px;
  }

  /* Backfill banner: more compact */
  .backfill-banner {
    font-size: 12px;
    padding: 10px 14px;
    border-radius: 10px;
  }
  .backfill-banner .banner-icon {
    font-size: 16px;
  }
}

/* ============================================================
 * 两铺位对比
 * ============================================================ */

.compare-plan-input {
  background: rgba(255,255,255,.55);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.cmp-summary {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.55);
  padding: 16px 18px;
  margin-bottom: 16px;
}
.cmp-summary-a {
  border-color: var(--green);
  background: var(--green-bg, rgba(34,197,94,.06));
}
.cmp-summary-b {
  border-color: var(--blue);
  background: var(--blue-soft, rgba(59,130,246,.06));
}

.cmp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 14px;
}
.cmp-table th {
  background: var(--bg2, #f5f5f5);
  color: var(--muted);
  font-weight: 600;
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.cmp-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.cmp-table tbody tr:hover td {
  background: rgba(0,0,0,.018);
}
.cmp-label {
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}
.cmp-val {
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.cmp-delta {
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.cmp-winner {
  text-align: center;
  white-space: nowrap;
}

.cmp-na {
  color: var(--muted);
  font-style: italic;
  font-size: 12px;
}
.cmp-delta-na {
  color: var(--muted);
}
.cmp-delta-zero {
  color: var(--muted);
}
.cmp-delta-good {
  color: var(--green);
  font-weight: 600;
}
.cmp-delta-bad {
  color: var(--red);
  font-weight: 600;
}
.cmp-win-a {
  display: inline-block;
  background: var(--green-bg, rgba(34,197,94,.1));
  color: var(--green);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}
.cmp-win-b {
  display: inline-block;
  background: var(--blue-soft, rgba(59,130,246,.1));
  color: var(--blue);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}
.cmp-tie {
  display: inline-block;
  background: var(--bg2, #f0f0f0);
  color: var(--muted);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.cmp-notes {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 8px;
}
.cmp-notes p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 6px;
}

/* 两铺位对比 — 手机端适配 */
@media (max-width: 390px) {
  #compareInputGrid {
    grid-template-columns: 1fr !important;
  }
  .cmp-table {
    font-size: 12px;
  }
  .cmp-table th,
  .cmp-table td {
    padding: 6px 6px;
  }
  .cmp-table th:nth-child(4),
  .cmp-table td:nth-child(4) {
    display: none;
  }
}

/* ============================================================
 * 2.0.0 interaction polish
 * ============================================================ */
.confidence-inputs {
  margin-top: 14px;
}
.confidence-input-guide {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-left: 4px solid var(--blue);
  background: var(--blue-soft);
  color: var(--ink);
}
.confidence-input-guide > strong { font-size: 14px; }
.confidence-input-guide > p {
  margin: 3px 0 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.confidence-missing-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.confidence-missing-list button {
  border: 1px solid var(--blue-mid);
  border-radius: 5px;
  padding: 5px 8px;
  background: #fff;
  color: var(--blue);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.confidence-inputs .form-grid { row-gap: 16px; }
.confidence-inputs .fg {
  min-width: 0;
  align-content: start;
}
.confidence-inputs .gaode-address-field {
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.confidence-inputs .gaode-status {
  margin-top: 4px;
  font-size: 12px;
}
.confidence-target {
  outline: 3px solid rgba(37,99,235,.16);
  outline-offset: 4px;
  border-radius: 8px;
}

.scenario-boundary {
  margin-top: 12px;
  padding: 13px 15px;
  border: 1px solid #f1c56b;
  border-left: 4px solid var(--yellow);
  border-radius: 8px;
  background: #fffaf0;
}
.scenario-boundary strong { color: #854d0e; font-size: 13px; }
.scenario-boundary p {
  margin: 3px 0 0;
  color: #713f12;
  font-size: 13px;
  line-height: 1.65;
}
.scenario-kind {
  display: inline-flex;
  margin-left: 5px;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  vertical-align: middle;
  letter-spacing: 0;
}
.scenario-kind.negotiable { color: #1d4ed8; background: #dbeafe; }
.scenario-kind.operating { color: #047857; background: #d1fae5; }
.scenario-kind.validation { color: #9a3412; background: #ffedd5; }
.scenario-field-note {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.compare-plan-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.compare-plan-head h3 { margin: 3px 0 0; font-size: 15px; }
.compare-plan-tag {
  display: inline-flex;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 900;
}
.compare-plan-tag.current { color: #065f46; background: #d1fae5; }
.compare-plan-tag.alternative { color: #1d4ed8; background: #dbeafe; }
.compare-differences {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 10px 0 14px;
}
.compare-differences span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}

/* Evidence ledger: two compact cards per row on desktop. */
#evidenceList {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
#evidenceList > .evidence-progress,
#evidenceList > .ev-progress-text {
  grid-column: 1 / -1;
}
#evidenceList .evidence-row.interactive {
  grid-template-columns: minmax(0, 1fr) 110px;
  align-items: start;
  gap: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255,255,255,.55);
}
#evidenceList .evidence-row > strong,
#evidenceList .ev-source-stack { min-width: 0; }
#evidenceList .ev-source-stack {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
}

@media (max-width: 760px) {
  .waterfall-svg { display: none; }
  .waterfall-mobile { display: grid; }
  #evidenceList { grid-template-columns: 1fr; }
  #evidenceList > .evidence-progress,
  #evidenceList > .ev-progress-text { grid-column: auto; }
}

@media print {
  .scenario-boundary,
  .confidence-input-guide { border-color: #94a3b8 !important; background: #f8fafc !important; }
  #evidenceList { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  #evidenceList .evidence-row.interactive { break-inside: avoid; page-break-inside: avoid; }
}
