dialog:has(.haul-comparison) {
  width: min(810px, calc(100vw - 22px));
}
.haul-comparison .dialog-body { gap: 16px; }
.haul-comparison h4 { margin: 0; font-size: .89rem; font-weight: 605; }
.haul-comparison h3 { margin-bottom: 9px; }
.hc-scope, .hc-route, .hc-check-title, .hc-layouts li, .hc-readings dd {
  display: grid;
  gap: 3px;
  overflow-wrap: anywhere;
}
.hc-scope strong, .hc-route strong { font-size: .92rem; font-weight: 600; }
.hc-controls { display: grid; grid-template-columns: 1.5fr 1fr; align-items: end; gap: 10px 18px; }
.hc-origin { margin-top: -5px; }
.hc-results { display: grid; gap: 20px; min-width: 0; }
.hc-results:empty { display: none; }
.hc-results > section {
  min-width: 0;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.hc-weights { width: 100%; border-collapse: collapse; text-align: right; font-size: .92rem; }
.hc-weights th, .hc-weights td { padding: 6px 5px; overflow-wrap: anywhere; }
.hc-weights thead th { border-bottom: 1px solid var(--line); font-size: .79rem; color: var(--muted); font-weight: 550; }
.hc-weights tr > :first-child { text-align: left; padding-left: 0; }
.hc-weights tr > :last-child { padding-right: 0; }
.hc-weights tbody th { font-weight: 540; }
.hc-weights tbody tr:nth-child(2) { border-bottom: 1px solid var(--line); font-weight: 635; }
.hc-layouts, .hc-readings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.hc-layouts section + section { padding-left: 12px; border-left: 1px solid var(--line); }
.hc-layouts ul { padding: 0; margin: 6px 0 0; list-style: none; }
.hc-layouts li { font-size: .83rem; margin-top: 7px; }
.hc-layouts strong, .hc-readings strong { font-weight: 565; }
.hc-layouts li span, .hc-readings dt { font-size: .78rem; color: var(--muted); }
.hc-issue, .hc-error { color: var(--warn); font-size: .86rem; line-height: 1.4; }
.hc-issue { margin-top: 8px; }
.hc-answer { border-left: 3px solid var(--teal); background: #f4f7f6; padding: 11px 13px; }
.hc-summary { font-size: .95rem; line-height: 1.4; font-weight: 600; margin: 0 0 6px; }
.hc-check-group { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; }
.hc-check-group > summary { padding: 2px 0; }
.hc-check { border: 1px solid var(--line); border-radius: 3px; padding: 10px 12px; margin-top: 9px; color: var(--ink); }
.hc-check-title { grid-template-columns: 1fr auto; gap: 2px 10px; }
.hc-check-title .small { text-align: right; }
.hc-outcome { font-weight: 550; margin-top: 4px; font-size: .86rem; }
.hc-readings { margin-top: 9px; }
.hc-readings dd { font-size: .85rem; }
.hc-status { font-size: .76rem; color: var(--muted); }
.hc-over { color: var(--over); font-weight: 610; }
.hc-conditional, .hc-near { color: var(--warn); }
.hc-detail { margin-top: 8px; overflow-wrap: anywhere; }
.hc-detail a { color: var(--teal); }
@media (max-width: 530px) {
  .haul-comparison .dialog-body, .haul-comparison .dialog-head { padding-inline: 13px; }
  .hc-controls { grid-template-columns: minmax(0, 1fr); }
  .hc-layouts { grid-template-columns: 1fr; gap: 9px; }
  .hc-layouts section + section { border: 0; border-top: 1px solid var(--line); padding: 8px 0 0; }
  .hc-layouts li { display: block; }
  .hc-layouts li span { margin-inline-start: 7px; }
  .hc-layouts ul { margin-top: 0; }
  .hc-check-title { grid-template-columns: 1fr; }
  .hc-check-title .small { text-align: left; }
  .hc-readings { gap: 5px; }
  .hc-weights { font-size: .82rem; }
  .hc-weights th, .hc-weights td { padding-inline: 3px; }
}
