/**
 * Estación de investigación paranormal - Hoja de estilo principal
 * Diseño táctico de instrumentación de campo, pantallas fósforo, LEDs K-II y responsive
 */

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

  /* Paleta base de la estación paranormal */
  --bg-page: #0b0f17;
  --bg-card: #111827;
  --bg-card-subtle: #162032;
  --bg-chassis: #0d131f;
  --border-chassis: #1e293b;
  --border-tactical: #2d3e56;

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-cyan: #00f0ff;
  --accent-cyan-glow: rgba(0, 240, 255, 0.35);
  --accent-amber: #f59e0b;
  --accent-amber-glow: rgba(245, 158, 11, 0.35);
  --accent-green: #10b981;
  --accent-red: #ef4444;

  --lcd-bg: #060b11;
  --lcd-border: #132235;

  --shadow-chassis: 0 10px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  --radius-chassis: 16px;
  --radius-inner: 10px;
}

/* Modo claro corporativo adaptable */
[data-theme="light"] {
  --bg-page: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-subtle: #f8fafc;
  --bg-chassis: #1a2232; /* El chasis central mantiene estética de instrumento táctico oscuro para contraste de LEDs y displays fósforo */
  --border-chassis: #334155;
  --border-tactical: #475569;

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

  --lcd-bg: #080f18;
  --lcd-border: #1e2e42;
}

/* Reset y estructura global obligatoria */
*, *::before, *::after {
  box-sizing: border-box;
}

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;
}

h1, h2, h3, h4, h5, h6,
.brand-title,
.instrument-title,
.post-title,
.sim-title,
.faq-section-title {
  font-family: var(--font-heading);
}

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

/* Layout y cuadrícula canónica */
.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%;
}

/* Tarjeta principal de la estación */
.paranormal-station-card {
  background: var(--bg-card);
  border: 1px solid var(--border-chassis);
  border-radius: var(--radius-chassis);
  box-shadow: var(--shadow-chassis);
  overflow: hidden;
  margin-bottom: 2rem;
}

/* Barra de navegación de instrumentos */
.station-nav {
  display: flex;
  background: rgba(13, 19, 31, 0.95);
  border-bottom: 2px solid var(--border-chassis);
  overflow-x: auto;
  scrollbar-width: thin;
}

.station-tab {
  flex: 1 1 0%;
  min-width: 140px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 0.925rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.station-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
}

.station-tab.active {
  color: var(--accent-cyan);
  border-bottom-color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.06);
}

.station-tab svg {
  flex-shrink: 0;
}

.badge-log-count {
  background: var(--accent-amber);
  color: #000;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  margin-left: 0.25rem;
}

/* Paneles de instrumento */
.station-pane {
  display: none;
  padding: 1.5rem;
}

.station-pane.active {
  display: block;
  animation: fadeInPane 0.25s ease-out;
}

@keyframes fadeInPane {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.instrument-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

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

.instrument-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  max-width: 650px;
}

/* Indicadores de estado tipo píldora */
.sensor-pill-status,
.evp-pill-status,
.spirit-pill-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-tactical);
  color: var(--accent-cyan);
}

.sensor-pill-status::before,
.evp-pill-status::before,
.spirit-pill-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
}

/* =========================================================================
   CHASIS Y CONTROLES DEL MEDIDOR K-II
   ========================================================================= */
.k2-chassis,
.evp-chassis,
.spirit-chassis,
.log-chassis {
  background: var(--bg-chassis);
  border: 1px solid var(--border-chassis);
  border-radius: var(--radius-inner);
  padding: 1.5rem;
  color: #fff; /* Asegura contraste en fondo de instrumento táctico oscuro */
}

/* 5 LEDs K-II */
.k2-led-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  background: #080d14;
  border: 2px solid #1a2536;
  border-radius: 12px;
  padding: 1.25rem 1rem;
  margin-bottom: 1.5rem;
}

.k2-led-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.15s ease;
}

.k2-led-diode {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  margin-bottom: 0.5rem;
  border: 2px solid rgba(255, 255, 255, 0.15);
  background: #1c2738;
  transition: all 0.12s cubic-bezier(0.4, 0, 0.2, 1);
}

.k2-led-caption {
  font-family: var(--font-heading);
  font-size: 0.825rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.2rem;
}

.k2-led-range {
  font-family: var(--font-mono);
  font-size: 0.725rem;
  color: #475569;
}

/* Colores de los diodos K-II cuando están encendidos */
/* LED 1: Verde fondo */
.k2-led-slot.led-level-1.active .k2-led-diode {
  background: #10b981;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.9), inset 0 0 6px #fff;
  border-color: #34d399;
}
.k2-led-slot.led-level-1.active .k2-led-caption { color: #34d399; }

/* LED 2: Verde bajo */
.k2-led-slot.led-level-2.active .k2-led-diode {
  background: #84cc16;
  box-shadow: 0 0 16px rgba(132, 204, 22, 0.9), inset 0 0 6px #fff;
  border-color: #a3e635;
}
.k2-led-slot.led-level-2.active .k2-led-caption { color: #a3e635; }

/* LED 3: Amarillo medio */
.k2-led-slot.led-level-3.active .k2-led-diode {
  background: #eab308;
  box-shadow: 0 0 18px rgba(234, 179, 8, 0.95), inset 0 0 6px #fff;
  border-color: #facc15;
}
.k2-led-slot.led-level-3.active .k2-led-caption { color: #facc15; }

/* LED 4: Naranja alto */
.k2-led-slot.led-level-4.active .k2-led-diode {
  background: #f97316;
  box-shadow: 0 0 20px rgba(249, 115, 22, 1), inset 0 0 6px #fff;
  border-color: #fb923c;
}
.k2-led-slot.led-level-4.active .k2-led-caption { color: #fb923c; }

/* LED 5: Rojo extremo */
.k2-led-slot.led-level-5.active .k2-led-diode {
  background: #ef4444;
  box-shadow: 0 0 24px rgba(239, 68, 68, 1), inset 0 0 6px #fff;
  border-color: #f87171;
  animation: pulseRedDiode 0.4s infinite alternate;
}
.k2-led-slot.led-level-5.active .k2-led-caption { color: #f87171; }

@keyframes pulseRedDiode {
  from { transform: scale(1); filter: brightness(1); }
  to { transform: scale(1.1); filter: brightness(1.3); }
}

/* Pantallas LCD y aguja analógica */
.k2-screen-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.lcd-readout-panel,
.gauge-panel {
  background: var(--lcd-bg);
  border: 2px solid var(--lcd-border);
  border-radius: var(--radius-inner);
  padding: 1.25rem;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.7);
}

.lcd-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.lcd-mode-tag {
  color: #38bdf8;
  font-family: var(--font-mono);
}

.lcd-main-value {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.lcd-number {
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1;
  color: var(--accent-cyan);
  text-shadow: 0 0 16px var(--accent-cyan-glow);
}

.lcd-unit {
  font-size: 1.25rem;
  font-weight: 700;
  color: #38bdf8;
}

.lcd-sub-metrics {
  display: flex;
  gap: 1.5rem;
  border-top: 1px solid #132235;
  padding-top: 0.5rem;
}

.sub-metric {
  display: flex;
  flex-direction: column;
}

.sub-label {
  font-size: 0.725rem;
  color: var(--text-dim);
}

.sub-val {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

.highlight-red {
  color: #f87171;
}

/* Aguja analógica */
.gauge-panel {
  display: flex;
  align-items: center;
  justify-content: center;
}

.analog-gauge {
  width: 100%;
  max-width: 260px;
  height: auto;
}

.gauge-arc-track { fill: none; stroke: #1e293b; stroke-width: 12; stroke-linecap: round; }
.gauge-arc-green { fill: none; stroke: #10b981; stroke-width: 12; }
.gauge-arc-yellow { fill: none; stroke: #eab308; stroke-width: 12; }
.gauge-arc-red { fill: none; stroke: #ef4444; stroke-width: 12; stroke-linecap: round; }

.gauge-label {
  font-family: var(--font-mono);
  font-size: 10px;
  fill: #64748b;
  text-anchor: middle;
}

.gauge-needle-line {
  stroke: #f43f5e;
  stroke-width: 3.5;
  stroke-linecap: round;
  transition: transform 0.1s cubic-bezier(0.1, 0.9, 0.2, 1);
  transform-origin: 100px 95px;
}

.gauge-center-cap {
  fill: #e2e8f0;
  stroke: #0f172a;
  stroke-width: 2;
}

/* Osciloscopio continuo */
.scope-panel {
  background: #05090f;
  border: 1px solid #19273c;
  border-radius: var(--radius-inner);
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}

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

.scope-title {
  font-size: 0.75rem;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

.scope-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseDot 1.2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.scope-canvas {
  width: 100%;
  height: 90px;
  display: block;
  background: transparent;
}

/* Botonera táctica (mínimo 40px de altura y tacto firme) */
.k2-actions-row,
.evp-rec-bar,
.playback-controls-row,
.spirit-actions-row,
.log-actions-bar {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.btn-tactical {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  font-family: var(--font-heading);
  font-size: 0.925rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-primary {
  background: #0284c7;
  color: #ffffff;
}
.btn-primary:hover:not(:disabled) {
  background: #0369a1;
  box-shadow: 0 0 12px rgba(2, 132, 199, 0.4);
}

.btn-secondary {
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid #334155;
}
.btn-secondary:hover:not(:disabled) {
  background: #28374d;
  color: #ffffff;
}

.btn-rec {
  background: #dc2626;
  color: #ffffff;
}
.btn-rec:hover:not(:disabled) {
  background: #b91c1c;
  box-shadow: 0 0 14px rgba(220, 38, 38, 0.45);
}

.btn-download {
  background: #059669;
  color: #ffffff;
}
.btn-download:hover:not(:disabled) {
  background: #047857;
  box-shadow: 0 0 14px rgba(5, 150, 105, 0.4);
}

.btn-tactical:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(0.6);
}

.btn-sm {
  min-height: 36px;
  padding: 0.25rem 0.75rem;
  font-size: 0.825rem;
}

/* Panel de simulación para PC */
.simulation-aux-panel {
  margin-top: 1.5rem;
  background: #0a0e17;
  border: 1px dashed #24354c;
  border-radius: var(--radius-inner);
  padding: 1.25rem;
}

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

.sim-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-amber);
}

.sim-badge {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.sim-info {
  font-size: 0.825rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
  line-height: 1.4;
}

.sim-buttons-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.btn-sim-trigger,
.btn-sim-hold {
  min-height: 40px;
  background: #172336;
  border: 1px solid #2d415f;
  color: #cbd5e1;
  font-family: var(--font-heading);
  font-size: 0.825rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.btn-sim-trigger:hover,
.btn-sim-hold:hover {
  background: #23344e;
  color: #fff;
}

.btn-sim-hold:active {
  background: #e11d48;
  color: #fff;
  border-color: #f43f5e;
  box-shadow: 0 0 12px rgba(225, 29, 72, 0.6);
}

/* =========================================================================
   CHASIS Y CONTROLES DEL GRABADOR EVP
   ========================================================================= */
.evp-displays-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.spectrogram-container,
.oscilloscope-container {
  background: #04070c;
  border: 2px solid #142133;
  border-radius: var(--radius-inner);
  padding: 0.75rem 1rem;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.canvas-badge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 0.5rem;
}

.canvas-tag {
  font-family: var(--font-heading);
  font-weight: 600;
  text-transform: uppercase;
  color: #38bdf8;
}

.palette-indicator {
  font-family: var(--font-mono);
  color: #a7f3d0;
}

.waterfall-canvas {
  width: 100%;
  height: 200px;
  display: block;
  background: #020408;
  border-radius: 4px;
}

.freq-axis-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #475569;
  margin-top: 0.35rem;
}

.wave-canvas {
  width: 100%;
  height: 90px;
  display: block;
  background: #020408;
  border-radius: 4px;
}

.time-readout {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f43f5e;
}

.evp-rec-bar {
  background: #0a0f18;
  border: 1px solid #1c2b40;
  border-radius: var(--radius-inner);
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  display: inline-block;
  animation: pulseDot 0.8s infinite;
}

.rec-info-box {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
}

.rec-label { color: #64748b; }
.rec-val { font-weight: 600; color: #38bdf8; }

/* Panel post-procesado */
.evp-post-panel {
  background: #080d16;
  border: 1px solid #1a273b;
  border-radius: var(--radius-inner);
  padding: 1.25rem;
}

.post-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.post-title {
  font-size: 1.05rem;
  margin: 0;
  color: var(--text-main);
}

.post-badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: #152234;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  color: #94a3b8;
}

.speed-control-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.control-label {
  font-size: 0.825rem;
  color: #94a3b8;
  white-space: nowrap;
}

/* Desplegable accesible canónico */
.tactical-select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  height: 44px;
  padding: 0 40px 0 0.85rem;
  background: #131d2b 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") no-repeat calc(100% - 12px) center;
  border: 1px solid #2a3a50;
  border-radius: 8px;
  color: #fff;
  font-family: var(--font-main);
  font-size: 0.875rem;
  appearance: none;
  cursor: pointer;
}

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

.filters-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.filter-checkbox-card {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: #0f1724;
  border: 1px solid #1e2c3f;
  border-radius: 8px;
  padding: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-checkbox-card:hover {
  background: #141f30;
  border-color: #2b3e58;
}

.filter-checkbox-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.chk-custom {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: #1b2636;
  border: 2px solid #33445c;
  display: inline-block;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all 0.12s ease;
}

.filter-checkbox-card input[type="checkbox"]:checked + .chk-custom {
  background: #0284c7;
  border-color: #38bdf8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

.chk-info {
  display: flex;
  flex-direction: column;
}

.chk-title {
  font-size: 0.875rem;
  color: #e2e8f0;
  margin-bottom: 0.15rem;
}

.chk-sub {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.3;
}

/* =========================================================================
   CHASIS Y CONTROLES DE LA SPIRIT BOX
   ========================================================================= */
.spirit-radio-screen {
  background: #140d02;
  border: 3px solid #3d2605;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: inset 0 0 25px rgba(245, 158, 11, 0.15);
}

.radio-screen-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-family: var(--font-heading);
  letter-spacing: 0.08em;
  color: #b45309;
  margin-bottom: 0.5rem;
}

.radio-frequency-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.75rem;
  margin: 1rem 0;
}

.freq-digits {
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1;
  color: #fbbf24;
  text-shadow: 0 0 20px rgba(251, 191, 36, 0.6);
}

.freq-unit {
  font-size: 1.5rem;
  font-weight: 700;
  color: #d97706;
}

.radio-screen-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #3d2605;
  padding-top: 0.75rem;
}

.radio-voice-event {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #fde68a;
}

.voice-event-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
}

.radio-voice-event.active .voice-event-dot {
  background: #ef4444;
  box-shadow: 0 0 10px #ef4444;
}

.radio-cadence-meter {
  font-size: 0.8rem;
  color: #b45309;
}

.cadence-val {
  font-weight: 700;
  color: #fbbf24;
}

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

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

.range-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 44px;
}

.tactical-range {
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
  height: 8px;
  accent-color: #f59e0b;
}

.range-val {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fbbf24;
  min-width: 45px;
}

/* =========================================================================
   CHASIS Y CONTROLES DE LA BITÁCORA
   ========================================================================= */
.log-input-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.tactical-input {
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
  min-height: 44px;
  padding: 0.5rem 1rem;
  background: #080d16;
  border: 1px solid #1e2c3f;
  border-radius: 8px;
  color: #fff;
  font-family: var(--font-main);
  font-size: 0.9rem;
}

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

.log-stream-box {
  background: #05080f;
  border: 1px solid #152234;
  border-radius: var(--radius-inner);
  padding: 1rem;
  max-height: 380px;
  min-height: 200px;
  overflow-y: auto;
  margin-bottom: 1rem;
  scrollbar-width: thin;
}

.log-empty-msg {
  color: #64748b;
  font-size: 0.875rem;
  text-align: center;
  padding: 2.5rem 1rem;
}

.log-items-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.log-item {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  background: #090e1a;
  border-left: 3px solid #334155;
  font-size: 0.85rem;
}

.log-item.log-peak { border-left-color: #ef4444; background: rgba(239, 68, 68, 0.08); }
.log-item.log-evp { border-left-color: #0284c7; background: rgba(2, 132, 199, 0.08); }
.log-item.log-spirit { border-left-color: #f59e0b; background: rgba(245, 158, 11, 0.08); }
.log-item.log-note { border-left-color: #10b981; background: rgba(16, 185, 129, 0.08); }

.log-time {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #64748b;
  flex-shrink: 0;
}

.log-text {
  color: #e2e8f0;
  word-break: break-word;
}

/* Guía SEO y FAQ */
.content-guide-section {
  margin: 2.5rem 0 2rem;
}

.content-guide-section h2 {
  font-size: 1.45rem;
  margin-bottom: 1.25rem;
  color: var(--text-main);
}

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

.guide-card {
  background: var(--bg-card);
  border: 1px solid var(--border-chassis);
  border-radius: var(--radius-inner);
  padding: 1.25rem;
}

.guide-card h3 {
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
  color: var(--text-main);
}

.guide-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 0.5rem;
}

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

/* Acordeón FAQ */
.faq-section {
  margin: 2.5rem 0 2rem;
}

.faq-section-title {
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
  color: var(--text-main);
}

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

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-chassis);
  border-radius: var(--radius-inner);
  overflow: hidden;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-main);
  cursor: pointer;
  user-select: none;
  list-style: 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-cyan);
}

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

.faq-answer p {
  margin: 0;
}

/* Modales accesibles */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 9999;
}

.modal-backdrop.active {
  display: flex;
  animation: fadeInModal 0.15s ease-out;
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border-chassis);
  border-radius: var(--radius-chassis);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.7);
  width: 100%;
  max-width: 480px;
  overflow: hidden;
}

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

.modal-title {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text-main);
}

.btn-modal-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

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

.modal-body {
  padding: 1.25rem;
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  background: var(--bg-card-subtle);
  border-top: 1px solid var(--border-chassis);
}

/* =========================================================================
   RESPONSIVE DESIGN (MÓVIL Y TABLET)
   ========================================================================= */
@media (max-width: 992px) {
  .guide-grid {
    grid-template-columns: 1fr;
  }

  .spirit-controls-grid {
    grid-template-columns: 1fr;
  }

  .filters-grid {
    grid-template-columns: 1fr;
  }
}

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

  .station-pane {
    padding: 1rem;
  }

  .k2-chassis,
  .evp-chassis,
  .spirit-chassis,
  .log-chassis {
    padding: 1rem;
  }

  .k2-screen-grid {
    grid-template-columns: 1fr;
  }

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

  .k2-actions-row .btn-tactical,
  .evp-rec-bar .btn-tactical,
  .playback-controls-row .btn-tactical,
  .spirit-actions-row .btn-tactical,
  .log-actions-bar .btn-tactical {
    width: 100%;
    min-height: 44px;
  }

  .speed-control-wrapper {
    width: 100%;
  }

  .rec-info-box {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
  }

  .log-input-row {
    flex-direction: column;
  }

  .log-input-row .btn-tactical {
    width: 100%;
  }

  .freq-digits {
    font-size: 3.5rem;
  }

  .lcd-number {
    font-size: 2.75rem;
  }
}
