/**
 * Estilos Canónicos del Entrenador de Respiración Guiada y Coherencia Cardíaca
 * Cumplimiento estricto del sistema de diseño fijate.com (Dark / Light Theme)
 */

/* ==========================================================================
   1. Variables de Diseño y Paleta de Color Dinámica
   ========================================================================== */
:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Tema Oscuro por defecto */
  --bg-body: #0b0f19;
  --bg-surface: #111827;
  --bg-card: #162032;
  --bg-card-hover: #1c2a42;
  --bg-input: #0e1626;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-focus: #06b6d4;
  --text-main: #f3f4f6;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.28);
  --accent-blue: #3b82f6;
  --accent-indigo: #6366f1;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] {
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #f8fafc;
  --border-color: #e2e8f0;
  --border-color-focus: #0284c7;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.06), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

/* ==========================================================================
   2. Reset y Contenedores Principales
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

.tool-layout {
  max-width: 1240px;
  margin: 1.5rem auto 3.5rem;
  padding: 0 1.25rem;
  width: 100%;
}

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

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

/* Migas de pan canónicas */
.tool-breadcrumbs {
  margin-bottom: -0.75rem;
}

.tool-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-dim);
}

.tool-breadcrumbs li + li::before {
  content: "/";
  margin-right: 0.5rem;
  color: var(--text-dim);
}

.tool-breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.tool-breadcrumbs a:hover {
  color: var(--accent-cyan);
}

.tool-breadcrumbs [aria-current="page"] {
  color: var(--text-main);
  font-weight: 500;
}

/* ==========================================================================
   3. Tarjeta del Escenario Inmersivo del Orbe
   ========================================================================== */
.card-main {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.orb-stage-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  background: radial-gradient(circle at center, rgba(6, 182, 212, 0.04) 0%, rgba(15, 23, 42, 0.2) 70%);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1rem 2rem;
  border: 1px solid var(--border-color);
}

.orb-container {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 0.5rem auto 1.25rem;
}

#breathing-orb-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

/* Botón flotante para Modo Zen */
.btn-zen-trigger {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.45rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
  z-index: 10;
}

.btn-zen-trigger:hover {
  color: #ffffff;
  border-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.2);
}

.btn-exit-zen {
  display: none;
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 0.6rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 500;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  z-index: 9999;
  backdrop-filter: blur(12px);
}

.orb-interactive-container.zen-fullscreen-mode {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  background: #05070e;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  margin: 0;
  padding: 0;
}

.orb-interactive-container.zen-fullscreen-mode .btn-exit-zen {
  display: inline-flex;
}

.orb-interactive-container.zen-fullscreen-mode .btn-zen-trigger {
  display: none;
}

/* Telemetría en vivo superior e inferior */
.telemetry-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  width: 100%;
  max-width: 640px;
  margin-bottom: 1.25rem;
}

.telemetry-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.5rem;
  text-align: center;
}

.telemetry-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: lowercase;
  margin-bottom: 0.25rem;
}

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

.font-mono {
  font-family: var(--font-mono);
}

/* Barra de progreso de la sesión */
.session-progress-track {
  width: 100%;
  max-width: 640px;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.session-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
  border-radius: 9999px;
  transition: width 0.25s linear;
}

/* Botonera de control táctil principal */
.orb-controls-actions {
  display: flex;
  gap: 1rem;
  width: 100%;
  max-width: 480px;
  justify-content: center;
}

.btn-action-primary {
  flex: 1 1 0%;
  min-height: 48px;
  border-radius: var(--radius-md);
  border: none;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), #0284c7);
  color: #ffffff;
  box-shadow: 0 4px 15px var(--accent-cyan-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
}

.btn-warning {
  background: linear-gradient(135deg, var(--accent-amber), #d97706);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.25);
}

.btn-action-secondary {
  min-height: 48px;
  padding: 0 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-action-secondary:hover:not(:disabled) {
  color: var(--text-main);
  border-color: var(--accent-cyan);
}

.btn-action-secondary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ==========================================================================
   4. Configuración de Presets y Sliders
   ========================================================================== */
.config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.section-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--text-main);
}

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

/* Selector de presets en lista táctil */
.presets-list-grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.preset-choice-btn {
  width: 100%;
  min-height: 44px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.preset-choice-btn:hover {
  border-color: rgba(6, 182, 212, 0.4);
  background: var(--bg-card-hover);
}

.preset-choice-btn.active {
  border-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.08);
  box-shadow: 0 0 0 1px var(--accent-cyan);
}

.preset-name-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.preset-name-txt {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
}

.preset-badge-ratio {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.08);
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  color: var(--accent-cyan);
}

.preset-desc-txt {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Sliders de modo personalizado */
.custom-sliders-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1rem;
}

.slider-group-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
}

.slider-group-row:last-child {
  margin-bottom: 0;
}

.slider-header-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.slider-header-wrap label {
  color: var(--text-main);
  font-weight: 500;
}

.slider-header-wrap span {
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  font-weight: 600;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent-cyan);
  cursor: pointer;
}

/* Duraciones predefinidas */
.duration-tabs-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.btn-duration-tab {
  min-height: 40px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-duration-tab:hover {
  color: var(--text-main);
  border-color: rgba(6, 182, 212, 0.3);
}

.btn-duration-tab.active {
  background: var(--accent-cyan);
  color: #0b0f19;
  border-color: var(--accent-cyan);
  font-weight: 700;
}

/* Ajustes de Sonido y Apariencia */
.options-stack {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.form-control-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-control-row label {
  font-size: 0.85rem;
  color: var(--text-main);
  font-weight: 500;
}

/* Select canónico anti-desborde */
.form-select-safe {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0.5rem 2.5rem 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-input);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  appearance: none;
  background-image: 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='%2306b6d4' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 14px;
}

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

.checkbox-toggle-label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.875rem;
  color: var(--text-main);
  cursor: pointer;
  min-height: 40px;
}

.checkbox-toggle-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-cyan);
  cursor: pointer;
}

/* ==========================================================================
   5. Racha de Días, Heatmap e Historial IndexedDB
   ========================================================================== */
.stats-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.kpi-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
}

.kpi-title {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.kpi-value {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
}

.kpi-value.highlight-streak {
  color: var(--accent-amber);
}

/* Heatmap de 30 días */
.heatmap-wrapper {
  margin-bottom: 1.5rem;
}

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

.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}

.legend-swatch.sw-none { background: rgba(255, 255, 255, 0.06); }
.legend-swatch.sw-low { background: rgba(6, 182, 212, 0.4); }
.legend-swatch.sw-mid { background: rgba(6, 182, 212, 0.75); }
.legend-swatch.sw-high { background: var(--accent-cyan); }

.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(15, minmax(0, 1fr));
  gap: 0.4rem;
}

.heatmap-cell {
  aspect-ratio: 1 / 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.15s ease;
}

.heatmap-cell:hover {
  transform: scale(1.15);
  z-index: 2;
  border-color: var(--accent-cyan);
}

.heatmap-cell .cell-day {
  font-size: 0.68rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.heatmap-cell.active.level-low {
  background: rgba(6, 182, 212, 0.35);
  border-color: rgba(6, 182, 212, 0.5);
}

.heatmap-cell.active.level-mid {
  background: rgba(6, 182, 212, 0.65);
  border-color: var(--accent-cyan);
}

.heatmap-cell.active.level-high {
  background: var(--accent-cyan);
  border-color: #ffffff;
}

.heatmap-cell.active .cell-day {
  color: #ffffff;
  font-weight: 700;
}

/* Lista de Historial */
.history-header-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.history-btns-wrap {
  display: flex;
  gap: 0.5rem;
}

.btn-mini-action {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.78rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.2s ease;
}

.btn-mini-action:hover {
  color: var(--text-main);
  border-color: var(--accent-cyan);
}

.sessions-history-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 0.35rem;
}

.history-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
}

.history-item-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.history-item-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.badge-preset-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.history-date {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.history-metrics-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-delete-session {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.btn-delete-session:hover {
  color: var(--accent-rose);
}

.empty-history-msg {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-dim);
  font-size: 0.875rem;
}

/* ==========================================================================
   6. Modales Canónicos Accesibles
   ========================================================================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.show {
  display: flex;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  max-width: 460px;
  width: 100%;
  padding: 2rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  text-align: center;
  position: relative;
  animation: modalPop 0.25s ease-out forwards;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-celebration-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.12);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.modal-body-text {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.modal-kpi-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.modal-summary-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.5rem;
}

.modal-summary-box span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.modal-summary-box strong {
  display: block;
  font-size: 1.15rem;
  color: var(--accent-cyan);
}

.modal-footer-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.modal-footer-actions .btn-action-primary,
.modal-footer-actions .btn-action-secondary {
  flex: 1 1 0%;
  min-height: 44px;
}

/* ==========================================================================
   7. Guía Clínica, Científica y Neurofisiológica (SEO)
   ========================================================================== */
.seo-clinical-guide {
  margin-top: 1rem;
}

.guide-hero-banner {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.08) 0%, rgba(99, 102, 241, 0.08) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 2rem;
}

.guide-hero-banner h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.guide-hero-banner p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.guide-grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.guide-article-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.guide-article-card h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.guide-article-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.85rem;
}

.guide-article-card p:last-child {
  margin-bottom: 0;
}

/* Tabla comparativa */
.table-responsive-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.clinical-comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.clinical-comparison-table th {
  background: var(--bg-surface);
  padding: 0.85rem 1rem;
  font-weight: 700;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.clinical-comparison-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-muted);
}

.clinical-comparison-table tr:last-child td {
  border-bottom: none;
}

/* Acordeón FAQ */
.faq-accordion-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.faq-accordion-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-accordion-trigger {
  width: 100%;
  padding: 1rem 1.25rem;
  text-align: left;
  background: none;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
}

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

/* ==========================================================================
   8. Responsive y Ergonomía Móvil
   ========================================================================== */
@media (max-width: 1024px) {
  .config-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .tool-layout {
    padding: 0 0.85rem;
    margin: 1rem auto 2.5rem;
  }

  .card-main {
    padding: 1.25rem 0.85rem;
  }

  .telemetry-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .duration-tabs-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stats-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .heatmap-grid {
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }

  .guide-grid-two {
    grid-template-columns: 1fr;
  }

  .orb-controls-actions {
    flex-direction: column;
  }

  .btn-action-primary,
  .btn-action-secondary {
    width: 100%;
  }
}
