.pareto {
  min-height: 275px;
  display: block;
  border: 1px solid var(--line);
  background: #fbfdfe;
  padding: 8px;
  overflow-x: auto;
}

.pareto svg {
  display: block;
  width: 100%;
  min-width: 480px;
  height: auto;
}

.pareto .grid { stroke: #dce5eb; stroke-width: 1; }
.pareto .axis { stroke: #8092a2; stroke-width: 1.2; }
.pareto .bar-shape { fill: var(--steel); }
.pareto .bar-focus { fill: #176a97; }
.pareto .cumulative { fill: none; stroke: var(--amber); stroke-width: 3; }
.pareto .point { fill: #fff; stroke: var(--amber); stroke-width: 3; }
.pareto .threshold { stroke: var(--red); stroke-width: 2; stroke-dasharray: 7 5; }
.pareto text { font: 12px Inter, ui-sans-serif, system-ui, sans-serif; fill: #536679; }
.pareto .value-label, .pareto .percent-label { font-weight: 800; fill: var(--ink); }
.pareto .threshold-label { font-weight: 800; fill: var(--red); }
.pareto-legend { display: flex; gap: 14px; flex-wrap: wrap; margin: 10px 0 6px; font-size: .72rem; color: var(--muted); }
.pareto-legend span { display: flex; align-items: center; gap: 6px; }
.pareto-legend i { display: inline-block; width: 21px; height: 4px; }
.legend-bar { background: var(--steel); height: 10px !important; }
.legend-line { background: var(--amber); }
.legend-threshold { border-top: 2px dashed var(--red); height: 0 !important; }

.defect-actions { display: flex; gap: 6px; justify-content: flex-end; }
.defect-actions button { border: 1px solid #c8d4dd; background: #fff; color: var(--steel); border-radius: 4px; padding: 4px 8px; font-size: .72rem; font-weight: 800; }
.defect-actions .delete-defect { color: var(--red); border-color: #e5bcbc; }
.defect-clear { color: var(--red); white-space: nowrap; }
.defect-empty { color: var(--muted); padding: 24px 8px; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.decision-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.scenario-save { display: flex; gap: 8px; align-items: center; min-width: 360px; }
.scenario-save input { margin: 0; }
.scenario-delete { border: 0; background: transparent; color: var(--red); font-weight: 900; margin-left: 7px; }
.sensitivity-results { margin-top: 16px; overflow: auto; }
.sensitivity-results table { width: 100%; border-collapse: collapse; }
.sensitivity-results th, .sensitivity-results td { padding: 8px; border-bottom: 1px solid var(--line); text-align: left; font-size: .78rem; }
.checkline { display: flex; gap: 9px; align-items: center; }
.checkline input { width: auto; margin: 0; }
.investigation-list { display: grid; gap: 9px; margin-top: 16px; }
.investigation { border: 1px solid var(--line); border-left: 4px solid var(--amber); padding: 12px; }
.investigation.confirmed { border-left-color: var(--green); }
.investigation div { display: flex; justify-content: space-between; gap: 8px; }
.investigation span, .investigation p { font-size: .76rem; color: var(--muted); }
.investigation p { margin: 8px 0; }
.investigation button { border: 0; background: transparent; color: var(--red); padding: 0; }
.report-actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.import-label { margin: 0; border: 1px solid #ccd7df; background: #fff; color: var(--navy); border-radius: 5px; padding: 9px 13px; font-weight: 700; font-size: inherit; cursor: pointer; }
.import-label input { display: none; }
.how-simulated { margin: 0 0 18px; padding: 12px 14px; border: 1px solid #c8dce8; border-left: 4px solid var(--steel); background: #f3f9fc; }
.how-simulated summary { color: var(--navy); font-weight: 850; cursor: pointer; }
.how-simulated ol { margin: 12px 0 8px; padding-left: 22px; }
.how-simulated li, .how-simulated p { font-size: .79rem; color: #405367; margin: 6px 0; }
.field-help { display: block; margin-top: 6px; color: var(--muted); font-weight: 500; font-size: .72rem; }
.sequence-actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.sequence-actions button:disabled { opacity: .45; cursor: not-allowed; }
.sequence-empty { width: 100%; padding: 28px; border: 1px dashed #9db3c3; background: #f5f9fb; text-align: center; }
.sequence-empty b, .sequence-empty span { display: block; }
.sequence-empty span { margin: 6px 0 14px; color: var(--muted); font-size: .8rem; }
@media (max-width: 700px) { .sequence-actions { justify-content: flex-start; margin-top: 10px; } .sequence-actions button { flex: 1 1 auto; } }
.run-actions { display: flex; gap: 8px; align-items: center; }
.simulation-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.simulation-steps article { border: 1px solid var(--line); border-left: 3px solid var(--steel); padding: 12px; background: #f8fbfd; }
.simulation-steps article b { color: var(--navy); }
.simulation-steps article p { margin: 5px 0 0; color: var(--muted); font-size: .82rem; }
@media (max-width: 700px) { .run-status { align-items: flex-start; gap: 8px; } .run-actions { display: grid; } .simulation-steps { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .decision-grid { display: block; } .scenario-save { min-width: 0; display: block; } .scenario-save button { width: 100%; margin-top: 8px; } .report-actions { justify-content: flex-start; } .investigation div { display: block; } }
