/* Performance metrics grid with better spacing */
.p-cases .case-card .performance-metrics {
  margin: 24px 0 0;
  padding: 18px;
  background: linear-gradient(135deg, rgb(255 255 255 / 5%) 0%, rgb(255 255 255 / 2%) 100%);
  border-radius: 10px;
  border: 1px solid rgb(255 255 255 / 10%);
}

body.light-mode.p-cases .case-card .performance-metrics {
  background: rgb(248 250 252);
  border: 1px solid rgb(226 232 240);
}

.p-cases .case-card .metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
}

/* metric-grid/item/label/value blocks verified singular (grep duplicate was same line reference) */


.p-cases .case-card .metric-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.p-cases .case-card .metric-label {
  font-size: 0.75rem;
  color: var(--muted-text);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.p-cases .case-card .metric-value {
  font-size: 0.9rem;
  color: var(--light-text);
  font-weight: 600;
}

body.light-mode.p-cases .case-card .metric-label {
  color: rgb(100 116 139);
}

body.light-mode.p-cases .case-card .metric-value {
  color: rgb(30 41 59);
}

.p-cases .case-card .difficulty-level {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border: 1px solid transparent;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.p-cases .case-card .difficulty-level.beginner {
  background: rgb(209 250 229);
  color: rgb(4 120 87);
  border: 1px solid rgb(134 239 172);
}

.p-cases .case-card .difficulty-level.intermediate {
  background: rgb(219 234 254);
  color: rgb(37 99 235);
  border: 1px solid rgb(147 197 253);
}

.p-cases .case-card .difficulty-level.advanced {
  background: rgb(254 236 220);
  color: rgb(194 65 12);
  border: 1px solid rgb(253 186 116);
}

.p-cases .case-card .difficulty-level.expert {
  background: rgb(233 213 255);
  color: rgb(134 25 143);
  border: 1px solid rgb(214 188 250);
}

/* Impact severity styling */
.p-cases .case-card .impact-severity {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border: 1px solid transparent;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.p-cases .case-card .impact-severity.low {
  background: rgb(209 250 229);
  color: rgb(4 120 87);
  border: 1px solid rgb(134 239 172);
}

.p-cases .case-card .impact-severity.medium {
  background: rgb(254 249 195);
  color: rgb(161 98 7);
  border: 1px solid rgb(250 204 21);
}

.p-cases .case-card .impact-severity.high {
  background: rgb(254 226 226);
  color: rgb(185 28 28);
  border: 1px solid rgb(248 113 113);
}

.p-cases .case-card .impact-severity.critical {
  background: rgb(254 215 215);
  color: rgb(185 28 28);
  border: 1px solid rgb(248 113 113);
  box-shadow: 0 0 0 1px rgb(248 113 113 / 18%);
}

/* Success rate indicator */
.p-cases .case-card .success-rate {
  background: linear-gradient(135deg, rgb(34 197 94 / 20%) 0%, rgb(34 197 94 / 15%) 100%);
  color: #22c55e;
  border: 1px solid rgb(34 197 94 / 30%);
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
}

/* Sources info styling */

/* sources-info moved after pagination block to satisfy ordering */

/* Trust score indicator */
.p-cases .case-card .trust-indicator {
  background: linear-gradient(135deg, rgb(147 51 234 / 20%) 0%, rgb(147 51 234 / 15%) 100%);
  color: #a855f7;
  border: 1px solid rgb(147 51 234 / 30%);
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
}

/* spacing preserved by moved block above */

.p-cases .case-card .risk-level {
  font-weight: 700;
}

.p-cases .case-card .risk-low {
  color: #10b981;
  border-color: rgb(16 185 129 / 30%);
  background: linear-gradient(135deg, rgb(16 185 129 / 14%) 0%, rgb(16 185 129 / 10%) 100%);
}

.p-cases .case-card .risk-medium {
  color: #f59e0b;
  border-color: rgb(245 158 11 / 30%);
  background: linear-gradient(135deg, rgb(245 158 11 / 14%) 0%, rgb(245 158 11 / 10%) 100%);
}

.p-cases .case-card .risk-high {
  color: #ef4444;
  border-color: rgb(239 68 68 / 30%);
  background: linear-gradient(135deg, rgb(239 68 68 / 14%) 0%, rgb(239 68 68 / 10%) 100%);
}

body.light-mode.p-cases .case-card .risk-low {
  background: rgb(209 250 229);
  border-color: rgb(134 239 172);
  color: rgb(4 120 87);
}

body.light-mode.p-cases .case-card .risk-medium {
  background: rgb(254 236 220);
  border-color: rgb(253 186 116);
  color: rgb(194 65 12);
}

body.light-mode.p-cases .case-card .risk-high {
  background: rgb(254 226 226);
  border-color: rgb(248 113 113);
  color: rgb(185 28 28);
}
