.reference-note {
  color: #4b5563;
  font-size: 0.94rem;
}

.metric-strip {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  margin: 1rem 0;
}

.metric-tile {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 0.75rem;
}

.metric-tile span {
  color: #4b5563;
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.metric-tile strong {
  color: #111827;
  display: block;
  font-size: 1.6rem;
  line-height: 1.2;
  margin-top: 0.2rem;
}

.control-row {
  align-items: end;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  margin: 1rem 0;
}

.metric-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
}

.metric-card {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 0.75rem;
}

.metric-card h3 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
}

.assistant-section {
  border-top: 1px solid #d1d5db;
  margin-top: 1.5rem;
  padding-top: 1rem;
}

.diff-note {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  margin: 1rem 0;
  padding: 0.75rem 1rem;
}

.diff-note--initial {
  background: #ecfeff;
  color: #155e75;
}

.diff-note--empty {
  background: #f8fafc;
  color: #475569;
}

.diff-grid {
  display: grid;
  gap: 0.5rem;
  margin: 0.75rem 0 1.5rem;
}

.change-meta {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  margin: 1rem 0;
  padding: 0.85rem;
}

.change-meta span {
  color: #64748b;
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.diff-row {
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  display: grid;
  gap: 0.5rem;
  grid-template-columns: minmax(10rem, 1fr) minmax(12rem, 1.5fr);
  padding: 0.7rem 0.85rem;
}

.diff-row--changed {
  background: #f0fdf4;
  border-color: #22c55e;
  color: #14532d;
  font-weight: 700;
}

.diff-row--unchanged {
  background: #f8fafc;
  color: #64748b;
  opacity: 0.68;
}

.diff-row--initial {
  background: #f8fafc;
  color: #334155;
}

.diff-label {
  font-weight: 700;
}

.diff-value {
  font-variant-numeric: tabular-nums;
}

.diff-token-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0.75rem 0 1.5rem;
  padding: 0;
}

.diff-token {
  border-radius: 999px;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
}

.diff-token--added {
  background: #dcfce7;
  color: #166534;
}

.diff-token--removed {
  background: #fee2e2;
  color: #991b1b;
  text-decoration: line-through;
}

.diff-token--retained {
  background: #f1f5f9;
  color: #64748b;
  font-weight: 500;
}

.diff-empty {
  color: #64748b;
  font-style: italic;
  margin: 0.75rem 0 1.5rem;
}

@media (max-width: 720px) {
  .diff-row {
    grid-template-columns: 1fr;
  }
}
