/**
 * Fijate Tools - ¿Te va a sustituir la inteligencia artificial antes de 2030?
 * Hoja de estilos canónica corporativa: diseño equilibrado, responsive,
 * tema claro/oscuro completo y vista de informe para impresión.
 */

:root {
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Tema oscuro (por defecto) */
  --bg-page: #0b0f17;
  --bg-card: #111827;
  --bg-card-alt: #1a2234;
  --bg-input: #0b0f17;
  --border-color: #1f293d;
  --border-input: #334155;
  --border-focus: #3b82f6;

  --text-main: #f3f4f6;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --text-heading: #ffffff;
  --text-accent: #38bdf8;

  --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);

  --danger-color: #f43f5e;
  --danger-bg: rgba(244, 63, 94, 0.12);
  --danger-border: rgba(244, 63, 94, 0.3);

  --warning-color: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.12);
  --warning-border: rgba(245, 158, 11, 0.3);

  --success-color: #10b981;
  --success-bg: rgba(16, 185, 129, 0.12);
  --success-border: rgba(16, 185, 129, 0.3);

  --cyan-color: #06b6d4;
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

/* Tema claro */
[data-theme="light"],
html.light,
body.light {
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-alt: #f1f5f9;
  --bg-input: #ffffff;
  --border-color: #e2e8f0;
  --border-input: #cbd5e1;
  --border-focus: #2563eb;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-subtle: #64748b;
  --text-heading: #0f172a;
  --text-accent: #0284c7;

  --card-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.07);

  --danger-bg: rgba(244, 63, 94, 0.08);
  --danger-border: rgba(244, 63, 94, 0.25);

  --warning-bg: rgba(245, 158, 11, 0.08);
  --warning-border: rgba(245, 158, 11, 0.25);

  --success-bg: rgba(16, 185, 129, 0.08);
  --success-border: rgba(16, 185, 129, 0.25);

  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

/* Reglas base */
body {
  font-family: var(--font-main);
  background-color: var(--bg-page);
  color: var(--text-main);
  margin: 0;
  padding: 0;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.2s ease, color 0.2s ease;
}

h1, h2, h3, h4, h5, h6,
.brand-title,
.card-title,
.verdict-main-result,
.edu-title {
  font-family: var(--font-heading);
}

.mono,
.kpi-value,
.meter-score,
.dim-val,
.timeline-year-badge,
code {
  font-family: var(--font-mono);
}

/* Layout canónico */
.tool-layout {
  max-width: 1200px;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
  box-sizing: border-box;
  flex: 1 0 auto;
  width: 100%;
}

.tool-with-sidebar {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  width: 100%;
}

.tool-main-content {
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
}

.tools-ad-banner-section {
  width: 100%;
  margin-bottom: 1.5rem;
}

/* Tarjeta estándar unificada */
.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  box-sizing: border-box;
  margin-bottom: 1.75rem;
}

.card-header {
  margin-bottom: 1.25rem;
}

.card-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: var(--text-heading);
}

.card-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.45;
}

/* SECCIÓN 1: Cuadrícula principal superior (Entrada vs Veredicto) */
.main-calculator-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: stretch;
  margin-bottom: 1.75rem;
}

@media (min-width: 900px) {
  .main-calculator-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.main-calculator-grid .tool-card {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}

/* Formularios y controles */
.form-group {
  margin-bottom: 1.15rem;
  position: relative;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

@media (max-width: 520px) {
  .form-row-2 {
    grid-template-columns: 1fr;
  }
}

.form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.form-hint {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-subtle);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.form-control {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  color: var(--text-main);
  border-radius: 0.625rem;
  padding: 0.7rem 0.9rem;
  font-size: 0.925rem;
  font-family: var(--font-main);
  min-height: 44px;
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

select.form-control {
  appearance: none;
  -webkit-appearance: none;
  background-image: var(--select-arrow);
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  background-size: 16px;
  padding-right: 2.5rem;
  cursor: pointer;
}

select.form-control option {
  background: var(--bg-card);
  color: var(--text-main);
}

/* Buscador desplegable */
.search-results-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-input);
  border-radius: 0.625rem;
  margin-top: 4px;
  max-height: 260px;
  overflow-y: auto;
  z-index: 50;
  box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.5);
  display: none;
}

.search-results-dropdown.is-open {
  display: block;
}

.search-item {
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  transition: background 0.15s ease;
}

.search-item:last-child {
  border-bottom: none;
}

.search-item:hover {
  background: var(--bg-card-alt);
  color: var(--text-accent);
}

.search-item-cat {
  font-size: 0.725rem;
  color: var(--text-subtle);
  font-weight: 500;
}

.form-aux-link {
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--border-color);
  font-size: 0.825rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.text-link {
  color: #38bdf8;
  font-weight: 600;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

/* Panel derecho: Veredicto y medidores */
.verdict-summary-box {
  background: linear-gradient(145deg, var(--bg-card-alt) 0%, var(--bg-card) 100%);
  border: 1px solid var(--border-color);
  border-radius: 0.875rem;
  padding: 1.25rem;
  text-align: center;
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
}

.verdict-summary-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #f43f5e, #f59e0b, #10b981);
}

.verdict-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.775rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 0.65rem;
}

.verdict-badge-danger {
  background: var(--danger-bg);
  color: #fb7185;
  border: 1px solid var(--danger-border);
}

.verdict-badge-warning {
  background: var(--warning-bg);
  color: #fbbf24;
  border: 1px solid var(--warning-border);
}

.verdict-badge-success {
  background: var(--success-bg);
  color: #34d399;
  border: 1px solid var(--success-border);
}

.verdict-main-result {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 0.4rem;
  color: var(--text-heading);
}

.verdict-desc {
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text-muted);
  margin: 0 auto;
}

/* Medidores de barra dual limpios */
.meters-container {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.meter-block {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: 0.625rem;
  padding: 0.75rem 0.9rem;
}

.meter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.45rem;
}

.meter-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
}

.meter-score {
  font-size: 1.15rem;
  font-weight: 800;
}

.meter-track {
  height: 10px;
  background: var(--bg-input);
  border-radius: 9999px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.meter-fill {
  height: 100%;
  width: 0%;
  border-radius: 9999px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s ease;
}

.fill-danger { background: #f43f5e; }
.fill-warning { background: #f59e0b; }
.fill-success { background: #10b981; }
.aug-fill { background: linear-gradient(90deg, #2563eb, #06b6d4); }

.text-danger { color: #f43f5e; }
.text-warning { color: #f59e0b; }
.text-success { color: #10b981; }
.text-cyan { color: #38bdf8; }

/* KPIs */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.kpi-card {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: 0.625rem;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
}

.kpi-label {
  font-size: 0.75rem;
  color: var(--text-subtle);
  margin-bottom: 0.2rem;
}

.kpi-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-heading);
}

.kpi-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* Botón viral */
.btn-viral-share {
  margin-top: auto;
  width: 100%;
  min-height: 48px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border: none;
  border-radius: 0.75rem;
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-viral-share:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  transform: translateY(-1px);
}

/* SECCIÓN 2: Análisis profundo (6 dimensiones + Timeline) */
.deep-analysis-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

@media (min-width: 900px) {
  .deep-analysis-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.deep-analysis-grid .tool-card {
  margin-bottom: 0;
}

/* Barras horizontales de dimensiones */
.dimensions-bars-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.dim-bar-row {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: 0.625rem;
  padding: 0.75rem 0.9rem;
}

.dim-bar-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.dim-name-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dim-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-heading);
}

.dim-tag {
  font-size: 0.675rem;
  padding: 0.15rem 0.45rem;
  border-radius: 0.3rem;
  font-weight: 600;
}

.dim-tag.prot {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.dim-tag.vuln {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
}

.dim-val {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-accent);
}

.dim-track {
  height: 8px;
  background: var(--bg-input);
  border-radius: 9999px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  margin-bottom: 0.3rem;
}

.dim-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.5s ease;
}

.fill-prot { background: #10b981; }
.fill-vuln { background: #f43f5e; }

.dim-desc {
  display: block;
  font-size: 0.75rem;
  color: var(--text-subtle);
}

/* Timeline */
.timeline-milestones-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 500px) {
  .timeline-milestones-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.timeline-card-item {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: 0.625rem;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
}

.timeline-card-item.timeline-active {
  border-color: rgba(56, 189, 248, 0.4);
  background: linear-gradient(145deg, var(--bg-card-alt) 0%, rgba(37, 99, 235, 0.08) 100%);
}

.timeline-year-badge {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-accent);
  margin-bottom: 0.25rem;
}

.timeline-card-title {
  font-size: 0.875rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: var(--text-heading);
}

.timeline-card-desc {
  font-size: 0.775rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.35;
}

/* SECCIÓN 3: Factores vulnerables vs protegidos */
.factors-dual-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

@media (min-width: 640px) {
  .factors-dual-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.factors-dual-grid .tool-card {
  margin-bottom: 0;
}

.factor-card.factor-vulnerable {
  border-color: var(--danger-border);
}

.factor-card.factor-protected {
  border-color: var(--success-border);
}

.factor-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.factor-vulnerable .factor-header { color: #fb7185; }
.factor-protected .factor-header { color: #34d399; }

.factor-heading {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
}

.factor-clean-list {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.factor-clean-list li {
  margin-bottom: 0.45rem;
}

/* SECCIÓN 4: Transición y CCAA */
.transition-main-card {
  margin-bottom: 1.75rem;
}

.transition-inner-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 800px) {
  .transition-inner-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.transition-col {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1rem;
}

.transition-col-heading {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.3rem;
  color: var(--text-heading);
}

.transition-col-desc {
  font-size: 0.775rem;
  color: var(--text-subtle);
  margin: 0 0 0.75rem;
}

.bridge-chips-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.bridge-chip-btn {
  padding: 0.5rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-input);
  border-radius: 0.5rem;
  color: #38bdf8;
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.bridge-chip-btn:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.skills-badges-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.skill-badge-item {
  padding: 0.45rem 0.75rem;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.ccaa-select-group {
  margin-bottom: 0.65rem;
}

.ccaa-clean-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0.75rem;
}

.ccaa-clean-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.ccaa-clean-title {
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--text-heading);
}

.ccaa-clean-badge {
  font-size: 0.75rem;
  background: rgba(56, 189, 248, 0.15);
  color: var(--text-accent);
  padding: 0.15rem 0.45rem;
  border-radius: 0.3rem;
  font-weight: 600;
}

.ccaa-clean-desc {
  font-size: 0.775rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.35;
}

.report-action-row {
  display: flex;
  justify-content: center;
}

.btn-print-report {
  width: 100%;
  max-width: 480px;
  min-height: 44px;
  background: var(--bg-card-alt);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 0.625rem;
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-print-report:hover {
  background: var(--bg-input);
  border-color: var(--border-focus);
}

/* SECCIÓN 5: Comparador */
.comp-card-section {
  margin-bottom: 1.75rem;
}

.comp-selectors-row {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 640px) {
  .comp-selectors-row {
    flex-direction: column;
    align-items: stretch;
  }
}

.comp-select-item {
  flex: 1;
  margin-bottom: 0;
}

.comp-vs-badge {
  padding: 0.65rem 0.85rem;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-accent);
  text-align: center;
}

.comp-alert-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--text-accent);
  border-radius: 0.625rem;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.comp-cards-dual {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .comp-cards-dual {
    grid-template-columns: 1fr 1fr;
  }
}

.comp-single-card {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.15rem;
}

.comp-card-cat {
  font-size: 0.725rem;
  color: var(--text-subtle);
  font-weight: 600;
}

.comp-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0.2rem 0 0.85rem;
  color: var(--text-heading);
}

.comp-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.825rem;
  color: var(--text-muted);
}

.comp-stat-row:last-child {
  border-bottom: none;
}

.comp-stat-row strong {
  font-size: 0.925rem;
}

/* SECCIÓN 6: Test diagnóstico */
.test-card-section {
  margin-bottom: 1.75rem;
}

.test-progress-bar-container {
  margin-bottom: 1.25rem;
}

.test-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.test-step-meta-text {
  font-weight: 700;
  color: var(--text-accent);
}

.test-track-bg {
  height: 8px;
  background: var(--bg-card-alt);
  border-radius: 9999px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.test-bar-fill {
  height: 100%;
  width: 12.5%;
  background: #3b82f6;
  border-radius: 9999px;
  transition: width 0.3s ease;
}

.test-q-box {
  margin-bottom: 1.25rem;
}

.test-q-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-heading);
  margin: 0 0 0.35rem;
}

.test-q-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
  line-height: 1.45;
}

.test-options-stack {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.test-clean-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: 0.625rem;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.test-clean-option:hover {
  border-color: var(--border-focus);
}

.test-clean-option.checked {
  background: rgba(37, 99, 235, 0.14);
  border-color: #3b82f6;
  color: #38bdf8;
}

.test-input-radio {
  display: none;
}

.test-radio-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border-input);
  flex-shrink: 0;
  position: relative;
  transition: all 0.15s ease;
}

.test-clean-option.checked .test-radio-circle {
  border-color: #3b82f6;
  background: #3b82f6;
}

.test-clean-option.checked .test-radio-circle::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
}

.test-label-content {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.35;
}

.test-actions-footer {
  display: flex;
  gap: 0.75rem;
}

.btn-primary,
.btn-secondary {
  flex: 1;
  min-height: 44px;
  border-radius: 0.625rem;
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: #2563eb;
  color: #ffffff;
  border: none;
}

.btn-primary:hover:not(:disabled) {
  background: #1d4ed8;
}

.btn-secondary {
  background: var(--bg-card-alt);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-input);
}

.btn-primary:disabled,
.btn-secondary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.test-result-box {
  margin-top: 1.5rem;
}

.test-result-inner {
  background: linear-gradient(145deg, var(--bg-card-alt) 0%, var(--bg-card) 100%);
  border: 1px solid #3b82f6;
  border-radius: 0.875rem;
  padding: 1.5rem;
  text-align: center;
}

.test-result-tag {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.test-result-score-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 0 0 0.4rem;
  color: var(--text-heading);
}

.test-result-explanation {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
}

.test-result-btn-row {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

@media (max-width: 500px) {
  .test-result-btn-row {
    flex-direction: column;
  }
}

/* Acordeones interactivos FAQ */
.edu-section {
  margin-top: 2.5rem;
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
}

.edu-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-heading);
  margin: 0 0 1.25rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-accordion {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq-accordion:hover {
  border-color: var(--border-focus);
}

.faq-accordion[open] {
  border-color: #3b82f6;
}

.faq-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.faq-summary::-webkit-details-marker {
  display: none;
}

.faq-q {
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.4;
  padding-right: 1rem;
}

.faq-chevron {
  color: var(--text-subtle);
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.faq-accordion[open] .faq-chevron {
  transform: rotate(180deg);
  color: #38bdf8;
}

.faq-answer-body {
  padding: 0 1.25rem 1.25rem;
}

.faq-a {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

/* Vista imprimible editorial */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .app-header,
  .fijate-footer,
  .tools-ad-banner-section,
  .tool-ad-sidebar,
  .btn-viral-share,
  .btn-print-report,
  .form-aux-link,
  .comp-card-section,
  .test-card-section,
  .edu-section,
  .search-results-dropdown {
    display: none !important;
  }

  .tool-layout {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .tool-with-sidebar {
    display: block !important;
  }

  .main-calculator-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 1.5rem !important;
  }

  .tool-card {
    box-shadow: none !important;
    border: 1px solid #cccccc !important;
    background: #ffffff !important;
    page-break-inside: avoid;
    margin-bottom: 1.5rem;
  }

  .verdict-summary-box,
  .meter-block,
  .kpi-card,
  .dim-bar-row,
  .timeline-card-item,
  .transition-col {
    background: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
  }

  .verdict-main-result,
  .card-title,
  .dim-name {
    color: #000000 !important;
  }

  .verdict-desc,
  .card-subtitle,
  .dim-desc,
  .timeline-card-desc {
    color: #333333 !important;
  }
}
