/* ============================================================
   JCC RESULT LAYOUT SAFETY
   Pure layout containment. No application logic is changed.
============================================================ */

.summary-grid,
.evidence-grid,
.unified-evidence-grid,
.compare-panels-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 1rem !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  align-items: start !important;
  overflow: hidden !important;
}

.summary-grid > *,
.evidence-grid > *,
.unified-evidence-grid > *,
.compare-panels-grid > * {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.summary-grid .card,
.summary-grid .summary-card,
.summary-grid .info-card,
.summary-grid .evidence-card,
.evidence-grid .card,
.unified-evidence-grid .card,
.compare-panels-grid .card {
  position: relative !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  isolation: isolate !important;
}

.summary-grid table,
.evidence-grid table,
.unified-evidence-grid table,
.compare-panels-grid table {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
  margin: 0 !important;
}

.summary-grid th,
.summary-grid td,
.evidence-grid th,
.evidence-grid td,
.unified-evidence-grid th,
.unified-evidence-grid td,
.compare-panels-grid th,
.compare-panels-grid td {
  min-width: 0 !important;
  max-width: 100% !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  vertical-align: middle !important;
}

.summary-grid table th:first-child,
.summary-grid table td:first-child,
.evidence-grid table th:first-child,
.evidence-grid table td:first-child,
.unified-evidence-grid table th:first-child,
.unified-evidence-grid table td:first-child {
  width: 31% !important;
}

.summary-grid table th:last-child,
.summary-grid table td:last-child,
.evidence-grid table th:last-child,
.evidence-grid table td:last-child,
.unified-evidence-grid table th:last-child,
.unified-evidence-grid table td:last-child {
  width: 69% !important;
}

.summary-grid a,
.summary-grid span,
.summary-grid strong,
.summary-grid p,
.evidence-grid a,
.evidence-grid span,
.evidence-grid strong,
.evidence-grid p,
.unified-evidence-grid a,
.unified-evidence-grid span,
.unified-evidence-grid strong,
.unified-evidence-grid p {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
}

@media (max-width: 1180px) {
  .summary-grid,
  .evidence-grid,
  .unified-evidence-grid,
  .compare-panels-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

@media (max-width: 640px) {
  .summary-grid table th:first-child,
  .summary-grid table td:first-child,
  .evidence-grid table th:first-child,
  .evidence-grid table td:first-child,
  .unified-evidence-grid table th:first-child,
  .unified-evidence-grid table td:first-child {
    width: 42% !important;
  }

  .summary-grid table th:last-child,
  .summary-grid table td:last-child,
  .evidence-grid table th:last-child,
  .evidence-grid table td:last-child,
  .unified-evidence-grid table th:last-child,
  .unified-evidence-grid table td:last-child {
    width: 58% !important;
  }
}
