/* ── Cards ─────────────────────────────────────────────── */

.cards-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color 0.15s;
}

.card:hover {
  border-color: var(--bg-surface-3);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.badge-green {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.badge-blue {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.badge-yellow {
  background: rgba(234, 179, 8, 0.15);
  color: #facc15;
}

.badge-red {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.card-explanation {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.card-feedback {
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.star-rating {
  display: flex;
  align-items: center;
  gap: 2px;
}

.star-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--text-dim);
  padding: 0 2px;
  transition: color 0.1s, transform 0.1s;
}

.star-btn:hover,
.star-btn.star-active {
  color: var(--yellow);
}

.star-btn:hover {
  transform: scale(1.1);
}

.feedback-saved {
  margin-left: 8px;
  font-size: 12px;
  color: var(--green);
  font-weight: 500;
}

.comment-area {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.comment-input {
  font-size: 13px;
  resize: vertical;
}

/* ── Rerank Button ──────────────────────────────────────── */

.rerank-section {
  padding: 16px 0 32px;
  display: flex;
  justify-content: center;
}

.btn-rerank {
  padding: 12px 28px;
  background: var(--bg-surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn-rerank:hover:not(:disabled) {
  background: var(--bg-surface-3);
  border-color: var(--accent);
  color: var(--accent);
}

.btn-rerank:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
