/* ==========================================================================
   Fijate Tools - Calibrador de pasos de extrusor (E-steps y Klipper)
   Estilos corporativos, layout AdSense, terminal CNC y simulador de filamento
   ========================================================================== */

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

  /* Tema claro */
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-sub: #f1f5f9;
  --bg-input: #ffffff;
  --border-color: #e2e8f0;
  --border-hover: #cbd5e1;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --accent-cyan: #0284c7;
  --accent-cyan-light: #e0f2fe;
  --accent-cyan-border: #bae6fd;
  --accent-cyan-text: #0369a1;

  --state-green: #16a34a;
  --state-green-light: #dcfce7;
  --state-green-text: #14532d;
  --state-green-border: rgba(34, 197, 94, 0.3);

  --state-amber: #d97706;
  --state-amber-light: #fef3c7;
  --state-amber-text: #78350f;
  --state-amber-border: rgba(217, 119, 6, 0.3);

  --state-red: #dc2626;
  --state-red-light: #fee2e2;
  --state-red-text: #7f1d1d;
  --state-red-border: rgba(220, 38, 38, 0.3);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 25px rgba(15, 23, 42, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

[data-theme="dark"] {
  --bg-page: #0b0f17;
  --bg-card: #111827;
  --bg-card-sub: #1e293b;
  --bg-input: #0f172a;
  --border-color: #334155;
  --border-hover: #475569;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-light: #64748b;

  --accent-cyan: #38bdf8;
  --accent-cyan-light: rgba(56, 189, 248, 0.14);
  --accent-cyan-border: rgba(56, 189, 248, 0.35);
  --accent-cyan-text: #bae6fd;

  --state-green: #22c55e;
  --state-green-light: rgba(34, 197, 94, 0.16);
  --state-green-text: #86efac;
  --state-green-border: rgba(34, 197, 94, 0.35);

  --state-amber: #fbbf24;
  --state-amber-light: rgba(251, 191, 36, 0.16);
  --state-amber-text: #fde68a;
  --state-amber-border: rgba(251, 191, 36, 0.35);

  --state-red: #f87171;
  --state-red-light: rgba(248, 113, 113, 0.16);
  --state-red-text: #fca5a5;
  --state-red-border: rgba(248, 113, 113, 0.35);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 28px rgba(0, 0, 0, 0.5);
}

*, *::before, *::after {
  box-sizing: border-box;
}

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

/* Barra de suite Maker 3D */
.suite-nav-strip {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 0.6rem 1rem;
}

.suite-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.suite-nav-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.suite-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.suite-link-item {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-muted);
  background: var(--bg-card-sub);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.suite-link-item:hover {
  color: var(--accent-cyan-text);
  border-color: var(--accent-cyan);
  background: var(--accent-cyan-light);
}

.suite-link-item.active {
  color: #ffffff;
  background: #0284c7;
  border-color: #0284c7;
}

/* Layout con Aside sticky para AdSense */
.tool-layout {
  max-width: 1200px;
  margin: 1.25rem auto 3rem;
  padding: 0 1rem;
  width: 100%;
  flex: 1;
}

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

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

.tool-ad-sidebar {
  display: none;
  width: 300px;
  flex-shrink: 0;
}

@media (min-width: 1536px) {
  .tool-ad-sidebar {
    display: block;
  }
}

.ad-sidebar-sticky {
  position: sticky;
  top: 80px;
}

.ad-sidebar-card {
  width: 300px;
  min-height: 600px;
  background: var(--bg-card-sub);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ==========================================================================
   Tarjeta principal y Cabecera Hero
   ========================================================================== */

.card-main {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .card-main {
    padding: 2rem;
  }
}

.hero-header {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.25rem;
}

.hero-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-cyan-text);
  background: var(--accent-cyan-light);
  border: 1px solid var(--accent-cyan-border);
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  margin-bottom: 0.6rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.6;
  max-width: 860px;
}

/* ==========================================================================
   Pestañas de Firmware (Marlin, Klipper, Slicer, Cubo)
   ========================================================================== */

.firmware-tabs-strip {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
}

.firmware-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card-sub);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 700;
  font-family: var(--font-main);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  min-height: 42px;
}

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

.firmware-tab-btn.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
}

/* Presets de extrusores */
.presets-container {
  background: var(--bg-card-sub);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.presets-title {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.6rem;
}

.presets-grid {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.preset-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 38px;
}

.preset-chip-btn:hover {
  border-color: var(--accent-cyan);
  background: var(--accent-cyan-light);
  color: var(--accent-cyan-text);
}

.preset-chip-btn.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

/* ==========================================================================
   Flujo Visual de 3 Pasos
   ========================================================================== */

.steps-flow-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
  background: var(--bg-card-sub);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

@media (min-width: 768px) {
  .steps-flow-card {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.step-col {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.step-num-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-cyan);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-col-title {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.step-col-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.45;
}

.step-col-desc code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.1rem 0.3rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

/* ==========================================================================
   Simulador Gráfico del Filamento y Extrusor
   ========================================================================== */

.filament-visualizer-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-sm);
}

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

.visualizer-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--state-green);
  box-shadow: 0 0 8px var(--state-green);
  animation: pulseDot 2s infinite ease-in-out;
}

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

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

.visualizer-badge {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  background: var(--accent-cyan-light);
  color: var(--accent-cyan-text);
  border: 1px solid var(--accent-cyan-border);
}

.svg-stage-container {
  width: 100%;
  background: var(--bg-card-sub);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ==========================================================================
   Layout de la Calculadora: Formulario (Izq) y Resultados (Der)
   ========================================================================== */

.app-calc-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

@media (min-width: 1024px) {
  .app-calc-layout {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
  }
}

.calc-inputs-column {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

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

.section-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.section-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.section-card-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-main);
}

.section-card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0.15rem 0 0;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

@media (min-width: 640px) {
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group.highlight-input-group {
  background: var(--accent-cyan-light);
  border: 1px solid var(--accent-cyan-border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

/* Reglas estrictas de controles táctiles canónicos */
.form-control {
  width: 100%;
  min-height: 42px;
  padding: 0.55rem 0.85rem;
  font-size: 0.95rem;
  font-family: var(--font-main);
  color: var(--text-main);
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px var(--accent-cyan-light);
}

/* Selectores estilizados canónicos con elipsis */
.form-select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  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='%2364748b' 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");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
  padding-right: 40px;
  cursor: pointer;
}

[data-theme="dark"] .form-select {
  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='%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");
}

/* Inputs en flexbox con sufijos */
.input-with-unit {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.input-with-unit input {
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  font-family: var(--font-mono);
  font-weight: 500;
}

.unit-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.75rem;
  background: var(--bg-card-sub);
  border: 1px solid var(--border-color);
  border-left: none;
  border-top-right-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.field-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  line-height: 1.4;
}

/* Slider táctil */
.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.slider-value-display {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent-cyan);
}

.range-slider {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--border-color);
  outline: none;
  cursor: pointer;
  accent-color: var(--accent-cyan);
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* ==========================================================================
   Resultados y Consola Terminal
   ========================================================================== */

.calc-results-column {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: sticky;
  top: 20px;
}

/* Tarjeta Hero de Nuevo Valor */
.price-hero-card {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.08) 0%, rgba(14, 165, 233, 0.03) 100%);
  border: 2px solid var(--accent-cyan);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .price-hero-card {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.12) 0%, rgba(15, 23, 42, 0.6) 100%);
  border-color: rgba(56, 189, 248, 0.45);
}

.price-hero-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-cyan-text);
  margin-bottom: 0.5rem;
}

.price-hero-value-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.price-hero-number {
  font-family: var(--font-mono);
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.03em;
  line-height: 1;
}

/* Caja de Estado / Diagnóstico */
.status-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1rem;
}

.status-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.status-pill {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  background: var(--state-green-light);
  color: var(--state-green-text);
  border: 1px solid var(--state-green-border);
}

.status-pill.status-badge-warning {
  background: var(--state-amber-light);
  color: var(--state-amber-text);
  border-color: var(--state-amber-border);
}

.status-pill.status-badge-danger {
  background: var(--state-red-light);
  color: var(--state-red-text);
  border-color: var(--state-red-border);
}

.status-delta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.status-title {
  display: block;
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

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

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

.metric-mini-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  display: flex;
  flex-direction: column;
}

.metric-mini-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.metric-mini-val {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text-main);
  margin-top: 0.15rem;
}

/* ==========================================================================
   Consola Terminal G-code CNC
   ========================================================================== */

.terminal-card {
  background: #0b0f17;
  border: 1px solid #1e293b;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.terminal-header {
  background: #111827;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #1e293b;
}

.terminal-dots {
  display: flex;
  gap: 0.35rem;
}

.terminal-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #94a3b8;
  font-weight: 600;
}

.btn-copy-terminal {
  background: #1e293b;
  border: 1px solid #334155;
  color: #f8fafc;
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-main);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-copy-terminal:hover {
  background: #334155;
  border-color: #475569;
}

.terminal-body {
  padding: 1rem;
}

.terminal-code {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: #38bdf8;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
}

.terminal-footer {
  background: #0f172a;
  padding: 0.65rem 1rem;
  border-top: 1px solid #1e293b;
}

.terminal-help {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.4;
  display: block;
}

/* Tarjeta de Síntomas */
.breakdown-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.breakdown-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.breakdown-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}

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

.symptoms-list li {
  margin-bottom: 0.35rem;
}

/* ==========================================================================
   Guía técnica y SEO
   ========================================================================== */

.seo-guide-section {
  margin-top: 2.5rem;
}

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

.guide-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 0.75rem;
}

.guide-intro {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.guide-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
  .guide-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.guide-topic h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 0.5rem;
}

.guide-topic p, .guide-topic li {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.guide-topic ul {
  padding-left: 1.25rem;
  margin: 0.5rem 0;
}

.formula-box {
  background: var(--bg-card-sub);
  border-left: 3px solid var(--accent-cyan);
  padding: 0.6rem 0.9rem;
  margin: 0.75rem 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.formula-box code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-cyan-text);
}

/* FAQ Accordion */
.faq-container {
  border-top: 1px solid var(--border-color);
  padding-top: 1.75rem;
}

.faq-heading {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 1rem;
}

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

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

.faq-question {
  padding: 0.85rem 1rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.faq-question::after {
  content: "+";
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-muted);
}

.faq-item[open] .faq-question::after {
  content: "−";
}

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

/* ==========================================================================
   Modales (sin alerts)
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: modalPop 0.2s ease-out;
}

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

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

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

.btn-modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.35rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  font-size: 0.95rem;
  color: var(--text-main);
}

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

.btn-primary-action {
  min-height: 44px;
  background: #0284c7;
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-primary-action:hover {
  background: #0369a1;
}
