.jd-concierge {
  border: 1px solid #d6d9de;
  border-radius: 14px;
  padding: 1rem;
  background: #fbfcfe;
  color: #1f2937;
}

.jd-concierge__title {
  margin: 0;
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.jd-concierge__avatar {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  object-fit: cover;
}

.jd-concierge__subtitle {
  margin: 0.5rem 0 1rem;
  color: #4b5563;
}

.jd-concierge__label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.jd-concierge__textarea {
  width: 100%;
  min-height: 160px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.75rem;
  font: inherit;
  resize: vertical;
}

.jd-concierge__counter {
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
  color: #64748b;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.jd-concierge__actions {
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.jd-concierge__button {
  border: none;
  border-radius: 8px;
  background: #1e40af;
  color: #ffffff;
  padding: 0.6rem 1rem;
  font-weight: 600;
  cursor: pointer;
}

.jd-concierge__button--muted {
  background: #334155;
}

.jd-concierge__button:disabled {
  opacity: 0.6;
  cursor: default;
}

/* Ensure [hidden] is respected even when display is set explicitly. */
.jd-concierge__loading[hidden] {
  display: none;
}

.jd-concierge__loading {
  color: #334155;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.jd-concierge__spinner {
  width: 14px;
  height: 14px;
  border: 2px solid #cbd5e1;
  border-top-color: #1e40af;
  border-radius: 999px;
  animation: jd-spin 0.9s linear infinite;
}

@keyframes jd-spin {
  to {
    transform: rotate(360deg);
  }
}

.jd-concierge__error {
  margin-top: 0.75rem;
  color: #b91c1c;
  font-weight: 600;
}

.jd-concierge__results {
  margin-top: 1rem;
  border-top: 1px solid #e2e8f0;
  padding-top: 1rem;
}

.jd-concierge__summary {
  display: grid;
  gap: 0.65rem;
}

.jd-concierge__score-card {
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  border: 1px solid transparent;
  width: fit-content;
  min-width: 180px;
}

.jd-concierge__score-card--strong {
  background: #ecfdf3;
  border-color: #86efac;
  color: #14532d;
}

.jd-concierge__score-card--moderate {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #78350f;
}

.jd-concierge__score-card--limited {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #7f1d1d;
}

.jd-concierge__score-value {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.jd-concierge__score-value span {
  font-size: 1rem;
  font-weight: 600;
}

.jd-concierge__score-label {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.jd-concierge__confidence {
  margin: 0;
}

.jd-concierge__request-id {
  margin: 0;
  font-size: 0.82rem;
  color: #475569;
}

.jd-concierge__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.jd-concierge__grid h3,
.jd-concierge__results h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.jd-concierge__grid ul,
.jd-concierge__results ul {
  margin: 0;
  padding-left: 1.2rem;
}

.jd-concierge__grid li,
.jd-concierge__results li {
  margin-bottom: 0.55rem;
}

.jd-concierge__evidence-missing {
  color: #b91c1c;
  font-weight: 600;
}

.jd-concierge__rubric {
  margin-top: 1rem;
}

.jd-concierge__rubric summary {
  cursor: pointer;
  font-weight: 700;
}

.jd-concierge__table-wrap {
  overflow-x: auto;
  margin-top: 0.6rem;
}

.jd-concierge__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.jd-concierge__table th,
.jd-concierge__table td {
  border: 1px solid #dbe1ea;
  padding: 0.5rem;
  text-align: left;
  vertical-align: top;
}

.jd-concierge__disclaimer {
  margin: 0.85rem 0 0;
  font-size: 0.82rem;
  color: #64748b;
}

@media (min-width: 860px) {
  .jd-concierge__grid {
    grid-template-columns: 1fr 1fr;
  }
}
