.contingency-wrapper {
  margin-top: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem;
  background: #fafbff;
}

.contingency-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.label-input-row th {
  border: none;
  padding: 0 0.75rem 0.75rem;
  background: transparent;
  text-align: left;
}

.editable-label {
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  padding: 0.35rem 0.5rem;
  min-height: 2.1rem;
  background: #fff;
}

.editable-label:focus {
  outline: 2px solid var(--app-accent);
  outline-offset: 2px;
}

.editable-label.heading {
  font-weight: 600;
  text-align: center;
}

.editable-label.vertical {
  writing-mode: initial;
  transform: none;
  display: inline;
  text-align: left;
  white-space: normal;
}

.row-label {
  font-weight: 600;
}

.contingency-table th,
.contingency-table td {
  border: 1px solid #e5e7eb;
  padding: 0.65rem;
  text-align: center;
}

.contingency-table input[type="number"] {
  width: 100%;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  padding: 0.35rem 0.5rem;
  text-align: center;
}

.row-axis-label {
  font-weight: 600;
  background: #f1f5f9;
  text-align: center;
  padding: 0.75rem 0.5rem;
}

.axis-label-col {
  width: 24px;
}

.totals-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.95rem;
}

.analysis-card .analysis-guidance {
  margin: 1rem 0;
  padding: 1rem;
  border-radius: 12px;
  background: #f8fbff;
  border: 1px solid #e0e7ff;
}

.analysis-guidance ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}

.visual-output .chart-placeholder {
  min-height: 340px;
}

.stats-card {
  margin-top: 1.5rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.stats-grid .stat-pill,
.stats-grid p {
  margin: 0;
}

.summary-table-card {
  margin-top: 1.5rem;
}

.stat-pill {
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid rgba(15, 31, 71, 0.08);
  background: #f9fbff;
}

.stat-pill h4 {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
}

.stat-pill p {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
