:root {
  color-scheme: light dark;
  --bg: #0b0d12;
  --card-bg: #14171f;
  --text: #e8eaf0;
  --muted: #8b93a7;
  --accent: #6c5ce7;
  --accent-2: #00d2a0;
  --border: #262b38;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 20px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
}

.hero {
  text-align: center;
}

h1 {
  margin: 0 0 8px;
  font-size: 2rem;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  color: var(--muted);
  margin-bottom: 28px;
}

.audit-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 0.85rem;
  color: var(--muted);
}

.audit-form input,
.audit-form textarea {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0e1016;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
}

.audit-form button {
  padding: 12px 20px;
  border-radius: 10px;
  border: none;
  background: var(--accent);
  color: white;
  font-weight: 600;
  cursor: pointer;
}

.audit-form button:hover {
  opacity: 0.9;
}

.back-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.context-line {
  margin: 2px 0;
  font-size: 0.9rem;
}

.footer {
  text-align: center;
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.85rem;
}

.spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 20px;
  border-radius: 50%;
  border: 4px solid var(--border);
  border-top-color: var(--accent);
  animation: spin 1s linear infinite;
}

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

.score-block {
  margin: 20px 0 32px;
}

.score-number {
  font-size: 3rem;
  font-weight: 700;
}

.score-max {
  font-size: 1.2rem;
  color: var(--muted);
}

.score-bar {
  margin-top: 10px;
  height: 10px;
  border-radius: 6px;
  background: #0e1016;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.section {
  margin-bottom: 24px;
}

.section h2 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

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

ul {
  margin: 0;
  padding-left: 20px;
}

.muted {
  color: var(--muted);
}

.raw-responses {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.raw-item {
  margin-bottom: 16px;
}

.raw-item h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.raw-subhead {
  margin: 12px 0 2px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.score-compare {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.score-compare-row {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
}

.score-compare-label {
  font-weight: 600;
  margin-bottom: 6px;
}

.score-compare-nums {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.score-pill {
  background: #0e1016;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.85rem;
}

.trend {
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 3px 10px;
}

.trend-up {
  color: var(--accent-2);
  background: rgba(0, 210, 160, 0.12);
}

.trend-down {
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.12);
}

.trend-equal {
  color: var(--muted);
  background: rgba(139, 147, 167, 0.12);
}

.gap-note {
  margin: 8px 0 0;
  font-size: 0.9rem;
}

.channels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .channels {
    grid-template-columns: 1fr;
  }
}

.channel-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
}

.channel-item h3 {
  margin: 0 0 6px;
  font-size: 0.95rem;
}

.channel-geo {
  grid-column: 1 / -1;
  border-color: var(--accent-2);
  background: rgba(0, 210, 160, 0.06);
}

.channel-item p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.checklist-geo {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checklist-geo li {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
}

.checklist-estado,
.tip-tipo {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 2px 8px;
  margin-right: 6px;
  text-transform: capitalize;
}

.checklist-cubierto {
  color: var(--accent-2);
  background: rgba(0, 210, 160, 0.12);
}

.checklist-parcialmente {
  color: #f0b429;
  background: rgba(240, 180, 41, 0.12);
}

.checklist-no-detectado {
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.12);
}

.tip-quick_win {
  color: var(--accent-2);
  background: rgba(0, 210, 160, 0.12);
}

.tip-estrategico {
  color: var(--accent);
  background: rgba(108, 92, 231, 0.15);
}

.download-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.btn-secondary {
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 480px) {
  .download-actions {
    flex-direction: column;
  }
}

.ejes-chart {
  width: 100%;
  height: auto;
  max-width: 380px;
}

.ejes-label {
  fill: var(--muted);
  font-size: 11px;
  font-family: inherit;
}

.ejes-track {
  fill: #0e1016;
}

.ejes-fill {
  fill: var(--accent-2);
}

.ejes-value {
  fill: var(--text);
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
}

.alert-block {
  border: 1px solid var(--accent-2);
  background: rgba(0, 210, 160, 0.06);
  border-radius: 10px;
  padding: 16px;
}

.alert-block h2 {
  margin-top: 0;
}

.alert-icon {
  margin-right: 4px;
}

.divergence-item {
  padding: 8px 0;
  border-top: 1px solid var(--border);
}

.divergence-item:first-of-type {
  border-top: none;
}

.divergence-tema {
  font-weight: 600;
  margin-bottom: 4px;
}

.divergence-pair {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.divergence-side {
  background: #0e1016;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.85rem;
}

.divergence-vs {
  color: var(--muted);
  font-size: 0.8rem;
}

.source-subhead {
  margin: 0 0 6px;
  font-size: 0.85rem;
}

.source-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.source-chip {
  background: #0e1016;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.8rem;
  color: var(--muted);
}

.source-chip-common {
  color: var(--accent-2);
  border-color: var(--accent-2);
}

.source-chip-unique {
  color: var(--accent);
  border-color: var(--accent);
}

.source-by-model {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.source-model-row {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
}

.source-model-label {
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.sentiment-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sentiment-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.sentiment-chip {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 3px 10px;
  text-transform: capitalize;
  white-space: nowrap;
}

.sentiment-positivo {
  color: var(--accent-2);
  background: rgba(0, 210, 160, 0.12);
}

.sentiment-neutro {
  color: var(--muted);
  background: rgba(139, 147, 167, 0.12);
}

.sentiment-cauteloso {
  color: #f0b429;
  background: rgba(240, 180, 41, 0.12);
}

.sentiment-negativo {
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.12);
}

.sentiment-justificacion {
  font-size: 0.9rem;
}

.checklist-dot {
  font-size: 0.6rem;
  margin-right: 4px;
}

.checklist-dot-cubierto {
  color: var(--accent-2);
}

.checklist-dot-parcialmente {
  color: #f0b429;
}

.checklist-dot-no-detectado {
  color: #ff6b6b;
}

.tips-subtitle {
  font-size: 0.95rem;
  margin: 0 0 8px;
  color: var(--muted);
}

.model-summary {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 8px;
}

.model-summary summary {
  cursor: pointer;
  font-weight: 600;
}

.model-summary ul {
  margin-top: 10px;
}

.model-summary li {
  margin-bottom: 8px;
}

.cita-fase {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 8px;
  margin-right: 6px;
}

.limitaciones-note {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  font-size: 0.9rem;
}

.limitaciones-title {
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 6px;
}

.info-icon {
  margin-right: 4px;
}
