/* ==========================================================================
   Estilos corporativos y canónicos: Escala Scoville interactiva de picantes
   Tipografías: Inter (cuerpo), Outfit (títulos), JetBrains Mono (cifras SHU)
   ========================================================================== */

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Colores temáticos dinámicos en modo oscuro (por defecto) */
  --bg-page: #0c0d12;
  --bg-card: #151821;
  --bg-card-subtle: #1c202d;
  --bg-input: #10131c;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: #f97316;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-fire: #ef4444;
  --accent-flame: #f97316;
  --accent-amber: #eab308;
  --accent-lime: #84cc16;
  --accent-purple: #a855f7;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --select-arrow-svg: 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='%23f8fafc' 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");
}

/* Modo claro */
[data-theme="light"] {
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-subtle: #f1f5f9;
  --bg-input: #ffffff;
  --border-subtle: #e2e8f0;
  --border-focus: #ea580c;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.12);

  --select-arrow-svg: 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='%230f172a' 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");
}

/* Reseteo y contención del layout */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.25s ease, color 0.25s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.tool-with-sidebar {
  display: flex;
  gap: 1.5rem;
  width: 100%;
}

.tool-main-content {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.card-main {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Hero y barra de bienvenida */
.hero-scoville {
  background: radial-gradient(circle at 80% 20%, rgba(249, 115, 22, 0.12) 0%, transparent 60%),
              radial-gradient(circle at 10% 80%, rgba(239, 68, 68, 0.08) 0%, transparent 50%),
              var(--bg-card);
  border-top: 3px solid var(--accent-flame);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.3);
  color: var(--accent-flame);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.85rem;
}

.hero-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-fire);
  box-shadow: 0 0 10px var(--accent-fire);
  animation: pulse-glow 1.8s infinite;
}

@keyframes pulse-glow {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.hero-title {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}

.hero-desc {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 850px;
  margin-bottom: 1.25rem;
}

/* Tabs de navegación rápida */
.tool-nav-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
}

.nav-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius-full);
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.nav-tab-btn:hover {
  color: var(--text-main);
  border-color: var(--accent-flame);
}

.nav-tab-btn.active {
  background: rgba(249, 115, 22, 0.15);
  border-color: var(--accent-flame);
  color: var(--accent-flame);
  font-weight: 600;
}

/* Encabezados de sección */
.section-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-icon-badge {
  font-size: 1.75rem;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.section-title {
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.25rem;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ==========================================================================
   SECCIÓN 1: TERMÓMETRO SCOVILLE
   ========================================================================== */

.level-pills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.level-pill-btn {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.55rem 0.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  min-height: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.level-pill-btn:hover {
  border-color: var(--accent-flame);
  color: var(--text-main);
}

.level-pill-btn.active {
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transform: translateY(-2px);
}

.gauge-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.gauge-slider-wrap {
  position: relative;
  margin-bottom: 2rem;
  padding: 0.5rem 0;
}

.gauge-track-background {
  width: 100%;
  height: 18px;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, 
    #10b981 0%, 
    #84cc16 12%, 
    #eab308 25%, 
    #f97316 38%, 
    #ef4444 50%, 
    #f43f5e 65%, 
    #a855f7 80%, 
    #6366f1 90%, 
    #18181b 100%
  );
  position: relative;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
}

.gauge-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.2s ease;
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
}

/* Slider accesible */
#scoville-slider {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 100%;
  height: 28px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
  z-index: 2;
  margin: 0;
}

#scoville-slider:focus-visible {
  outline: 2px solid var(--accent-flame);
  outline-offset: 4px;
}

#scoville-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #f97316;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  cursor: grab;
  transition: transform 0.15s ease;
}

#scoville-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

#scoville-slider::-moz-range-thumb {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #f97316;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  cursor: grab;
}

/* Telemetría */
.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.telemetry-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.telemetry-avatar-box {
  align-items: center;
  text-align: center;
}

.avatar-face {
  font-size: 3.5rem;
  line-height: 1;
  margin-bottom: 0.5rem;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.avatar-face.shake {
  animation: avatar-shake 0.4s ease;
}

@keyframes avatar-shake {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(-8deg) scale(1.1); }
  40% { transform: rotate(8deg) scale(1.1); }
  60% { transform: rotate(-6deg); }
  80% { transform: rotate(6deg); }
}

.avatar-tag {
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(249, 115, 22, 0.15);
  color: var(--accent-flame);
}

.telemetry-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 0.3rem;
  font-weight: 600;
}

.shu-counter {
  font-family: var(--font-mono);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 700;
  color: var(--accent-flame);
  letter-spacing: -0.03em;
  margin-bottom: 0.25rem;
}

.duration-val {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.telemetry-subtext {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Panel de síntomas */
.symptoms-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.symptom-column {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
}

.symptom-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-flame);
  margin-bottom: 0.4rem;
}

.symptom-text {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   SECCIÓN 2: COMPARADOR VS
   ========================================================================== */

.vs-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.vs-selectors-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

.vs-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.vs-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.vs-badge-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.vs-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

.vs-selected-info {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.vs-verdict-box {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
}

.vs-verdict-headline {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1.25rem;
}

.vs-bars-comparison {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 650px;
  margin: 0 auto 1rem;
  text-align: left;
}

.vs-bar-item {
  width: 100%;
}

.vs-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.vs-bar-shu {
  font-family: var(--font-mono);
  color: var(--accent-flame);
}

.vs-bar-track {
  width: 100%;
  height: 12px;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.vs-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.vs-bar-fill.fill-a {
  background: #38bdf8;
}

.vs-bar-fill.fill-b {
  background: linear-gradient(90deg, #f97316, #ef4444);
}

.vs-explanation {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto;
}

/* ==========================================================================
   SECCIÓN 3: CATÁLOGO Y TARJETAS (+35 REFERENCIAS)
   ========================================================================== */

.catalog-filters-bar {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.filter-search-wrap {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.search-input {
  padding-left: 42px;
  padding-right: 42px;
}

.btn-clear-search {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.35rem;
  cursor: pointer;
  line-height: 1;
}

.filter-pills-row {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
}

.filter-pill {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  transition: all 0.2s ease;
}

.filter-pill:hover {
  color: var(--text-main);
  border-color: var(--accent-flame);
}

.filter-pill.active {
  background: var(--accent-flame);
  color: #ffffff;
  border-color: var(--accent-flame);
}

.filter-tier-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 0.8125rem;
  color: var(--text-dim);
  font-weight: 600;
}

.filter-tier-buttons {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.tier-btn {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  min-height: 36px;
  transition: all 0.15s ease;
}

.tier-btn:hover {
  border-color: var(--accent-flame);
  color: var(--text-main);
}

.tier-btn.active {
  background: var(--text-main);
  color: var(--bg-page);
  border-color: var(--text-main);
}

.catalog-counter-bar {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* Grid de tarjetas */
.chilis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.15rem;
}

.chili-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.chili-card:hover {
  transform: translateY(-3px);
  border-color: rgba(249, 115, 22, 0.4);
  box-shadow: var(--shadow-md);
}

.chili-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--card-color, var(--accent-flame));
}

.chili-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.chili-card-flag {
  font-size: 1.5rem;
  line-height: 1;
}

.chili-card-tier-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.chili-card-name {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.25rem;
}

.chili-card-botanical {
  font-size: 0.75rem;
  font-style: italic;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
  display: block;
}

.chili-card-shu-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.85rem;
}

.chili-card-shu-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  color: var(--text-dim);
  display: block;
}

.chili-card-shu-val {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--card-color, var(--accent-flame));
}

.chili-card-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.chili-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
}

.btn-card-details {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-card-details:hover {
  background: var(--accent-flame);
  color: #ffffff;
  border-color: var(--accent-flame);
}

/* ==========================================================================
   SECCIÓN 4: SIMULADOR DE WILBUR SCOVILLE (1912)
   ========================================================================== */

.scoville-test-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.test-config-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

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

.dilution-result-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
}

.dilution-big-number {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 0.5rem;
}

.dilution-val {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: #38bdf8;
  line-height: 1.1;
}

.dilution-unit {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
}

.dilution-analogy {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-main);
  max-width: 650px;
  margin: 0.5rem auto 1.25rem;
}

.dilution-icons-grid {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.scoville-history-note {
  background: var(--bg-card-subtle);
  border-left: 4px solid #38bdf8;
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  text-align: left;
  display: flex;
  gap: 0.85rem;
}

.scoville-history-note .note-icon {
  font-size: 1.35rem;
}

.scoville-history-note p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ==========================================================================
   SECCIÓN 5: GUÍA DE ANTÍDOTOS
   ========================================================================== */

.antidotes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.antidote-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

.antidote-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.antidote-icon {
  font-size: 2rem;
  line-height: 1;
}

.antidote-title {
  font-size: 1.05rem;
  font-weight: 700;
}

.antidote-badges-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.badge-efficacy {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.antidote-mechanism {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 0.85rem;
}

.antidote-tip {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Protocolo de seguridad para ojos y piel */
.safety-protocol-card {
  background: var(--bg-card-subtle);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.protocol-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #ef4444;
  margin-bottom: 1.25rem;
}

.protocol-header h4 {
  font-size: 1.1rem;
  color: var(--text-main);
}

.protocol-body {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.protocol-step {
  display: flex;
  gap: 0.75rem;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ef4444;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.protocol-step strong {
  display: block;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.protocol-step p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ==========================================================================
   SECCIÓN 6: TEST DE TOLERANCIA
   ========================================================================== */

.quiz-container {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
}

.quiz-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f97316, #ef4444);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.quiz-step-indicator {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-flame);
  margin-bottom: 1.25rem;
}

.quiz-question-title {
  font-size: 1.15rem;
  margin-bottom: 1.25rem;
}

.quiz-options-grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.quiz-option-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  transition: all 0.15s ease;
}

.quiz-option-btn:hover {
  border-color: var(--accent-flame);
  background: rgba(249, 115, 22, 0.08);
  transform: translateX(4px);
}

.quiz-result-card {
  text-align: center;
  padding: 1rem 0;
}

.result-badge-top {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  background: rgba(249, 115, 22, 0.15);
  color: var(--accent-flame);
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
}

.result-avatar {
  font-size: 4rem;
  line-height: 1;
  margin-bottom: 0.75rem;
}

.result-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.result-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

.result-recommendation-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1rem;
  max-width: 600px;
  margin: 0 auto 1.5rem;
  text-align: left;
}

.rec-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-flame);
  display: block;
  margin-bottom: 0.25rem;
}

.result-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   SECCIÓN 7: FAQ Y ACORDEONES
   ========================================================================== */

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

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

.faq-item[open] {
  border-color: rgba(249, 115, 22, 0.4);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

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

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

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
  color: var(--accent-flame);
}

.faq-answer {
  padding: 0 1.25rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   MODALES ACCESIBLES (SIN ALERTS)
   ========================================================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.modal-overlay.active .modal-card {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modal-flag {
  font-size: 2rem;
  line-height: 1;
}

.modal-title {
  font-size: 1.25rem;
}

.modal-botanical {
  font-size: 0.75rem;
  font-style: italic;
  color: var(--text-dim);
  display: block;
}

.btn-modal-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.75rem;
  cursor: pointer;
  line-height: 1;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn-modal-close:hover {
  background: var(--bg-card-subtle);
  color: var(--text-main);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-shu-banner {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-shu-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.modal-shu-val {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--accent-flame);
}

.modal-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}

.modal-info-item {
  font-size: 0.8125rem;
}

.modal-info-item.full-width {
  grid-column: span 2;
}

.modal-info-item strong {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.2rem;
}

.modal-info-item p, .modal-info-item span {
  color: var(--text-muted);
  line-height: 1.45;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.modal-notice-card {
  max-width: 440px;
}

/* ==========================================================================
   FORMULARIOS, BOTONES Y CONTROLES RESPONSIVOS
   ========================================================================== */

.form-select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  height: 44px;
  padding: 0 40px 0 14px;
  font-size: 0.875rem;
  font-family: var(--font-sans);
  background-color: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  appearance: none;
  -webkit-appearance: none;
  background-image: var(--select-arrow-svg);
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.form-select:focus {
  outline: none;
  border-color: var(--accent-flame);
}

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

.form-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font-size: 0.875rem;
  font-family: var(--font-sans);
  background-color: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-flame);
}

.form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
}

.btn-primary {
  background: var(--accent-flame);
  color: #ffffff;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.btn-primary:hover {
  background: #ea580c;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-card-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

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

/* ==========================================================================
   RESPONSIVIDAD MÓVIL (TABLETS Y SMARTPHONES)
   ========================================================================== */

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

  .symptoms-panel {
    grid-template-columns: 1fr;
  }

  .vs-selectors-grid {
    grid-template-columns: 1fr;
  }

  .vs-badge-center {
    margin: 0.25rem 0;
  }

  .protocol-body {
    grid-template-columns: 1fr;
  }

  .test-config-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .card-main {
    padding: 1.25rem;
  }

  .level-pills-container {
    grid-template-columns: repeat(3, 1fr);
  }

  .modal-info-grid {
    grid-template-columns: 1fr;
  }

  .modal-info-item.full-width {
    grid-column: span 1;
  }

  .modal-footer {
    flex-direction: column-reverse;
  }

  .modal-footer button {
    width: 100%;
  }

  .result-actions {
    flex-direction: column;
    width: 100%;
  }

  .result-actions button {
    width: 100%;
  }
}
