/* Only approved badge/legend colors. No application palette overrides. */
[data-tph-band="low"] {
  --tph-fill: #dc2626;
  --tph-ink: #ffffff;
}
[data-tph-band="mid"] {
  --tph-fill: #b45309;
  --tph-ink: #ffffff;
}
[data-tph-band="high"] {
  --tph-fill: #15803d;
  --tph-ink: #ffffff;
}
[data-tph-band="excellent"] {
  --tph-fill: #1d4ed8;
  --tph-ink: #ffffff;
}
[data-tph-band="neutral"] {
  --tph-fill: var(--line, #d8d8d8);
  --tph-ink: var(--ink, #111111);
}
.tph-badge[data-tph-band] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  min-width: 48px;
  padding: 3px 10px !important;
  border: 1px solid var(--tph-fill) !important;
  border-radius: 999px;
  background: var(--tph-fill) !important;
  color: var(--tph-ink) !important;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.3;
  text-align: center;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  vertical-align: middle;
  transform: none !important;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}
.tph-guide {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  font-size: 12px;
  line-height: 1.5;
}
.tph-key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  color: var(--muted);
}
.tph-key:before {
  content: "";
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 50%;
  background: var(--tph-fill);
  border: 1px solid var(--tph-fill);
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}
.performance-card .perf-table .week-total-start[colspan] {
  box-shadow: inset 0 3px 0 var(--brand);
  font-weight: 850;
}
.performance-card .perf-table .total-col {
  font-weight: 800;
}
.performance-breakdown summary,
.performance-explanation,
.table-foot > p {
  font-size: 12px;
  line-height: 1.45;
}
.performance-card .perf-table tbody tr.total-row td {
  font-weight: 800;
}
@media print {
  .tph-badge[data-tph-band] {
    min-height: 20px;
    font-size: 12px !important;
    line-height: 1.2 !important;
    min-width: 40px;
    padding: 2px 5px !important;
    -webkit-text-stroke: 0.6px #111111;
  }
  .tph-badge[data-tph-band="neutral"] {
    -webkit-text-stroke: 0.4px #ffffff;
  }
  /* A thin dark glyph outline preserves numeric legibility if a print engine
    disregards print-color-adjust and drops the solid background. */
  body.print-grid
    #performanceCaptureDialog
    #performanceCaptureContent
    .tph-guide {
    display: flex !important;
    font-size: 9px;
    gap: 4px 10px;
    margin-top: 4px;
  }
  .tph-key:before {
    width: 8px;
    height: 8px;
  }
}
