* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f5f7;
  color: #1f1f1f;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

header h1 {
  margin-bottom: 0.5rem;
}

header p {
  margin-top: 0;
  color: #4a5568;
}

.card {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.75rem;
  margin-top: 1.5rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.05);
}

form {
  display: grid;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

label {
  font-weight: 600;
}

input,
textarea {
  border: 1px solid #cbd5e0;
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #4c51bf;
  box-shadow: 0 0 0 2px rgba(76, 81, 191, 0.1);
}

button {
  background: #4c51bf;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 0.85rem 1.2rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

button:disabled {
  background: #a3a8f0;
  cursor: wait;
}

button:hover:not(:disabled) {
  background: #393fb7;
}

.secondary-button {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.7rem 1.2rem;
  border-radius: 8px;
  border: 1px solid #4c51bf;
  background: #ffffff;
  color: #4c51bf;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.secondary-button:hover:not(:disabled) {
  background: #4c51bf;
  color: #ffffff;
}

.secondary-button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.error-message {
  color: #e53e3e;
  font-size: 0.85rem;
  min-height: 1em;
}

#status {
  margin-bottom: 1rem;
  font-weight: 600;
  color: #2d3748;
}

#progress-container {
  margin-bottom: 1rem;
}

.progress-bar {
  width: 100%;
  height: 10px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #4c51bf, #667eea);
  transition: width 0.2s ease;
}

.eta {
  font-size: 0.85rem;
  color: #4a5568;
  margin-top: 0.5rem;
}

#status[data-variant="error"] {
  color: #e53e3e;
}

#status[data-variant="success"] {
  color: #2f855a;
}

.report-group {
  margin-bottom: 1.5rem;
}

.report-group h3 {
  margin-bottom: 0.5rem;
  text-transform: capitalize;
}

.qa-pair {
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-top: 0.75rem;
  background: #f9fafc;
}

.question-meta {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #718096;
  margin-bottom: 0.35rem;
}

.qa-pair strong {
  display: block;
  margin-bottom: 0.35rem;
}

.chart-description {
  margin-top: 0.5rem;
  color: #4a5568;
  font-size: 0.9rem;
}

.chart-wrapper {
  position: relative;
  width: 100%;
  min-height: 220px;
  margin-top: 0.75rem;
}

.chart-wrapper-gauge {
  min-height: 260px;
}

.gauge-score {
  font-size: 2.5rem;
  font-weight: 700;
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
  color: #1a202c;
  text-align: center;
}

.report-title {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.empty-state {
  color: #718096;
}
