/* ==========================================================================
   Impulso Proveedor — Design System
   Marca: Impulso Proveedor / por CML Soluciones
   ========================================================================== */

:root {
  /* Identidad CML: oscuro + rojo + azul + blanco */
  --bg: #0a0e17;
  --bg-elevated: #10151f;
  --bg-card: #141a26;
  --bg-card-hover: #19212f;
  --border: #232b3d;
  --border-soft: #1a2130;

  --text-primary: #f7f8fa;
  --text-secondary: #aab2c5;
  --text-muted: #6b7688;

  /* Rojo CML — acento primario (CTAs, foco, marca) */
  --accent: #e8384a;
  --accent-soft: #e8384a1a;
  --accent-strong: #ff5f70;

  /* Azul CML — acento secundario (informativo, "en curso", enlaces) */
  --brand-blue: #2f6fed;
  --brand-blue-soft: #2f6fed1a;
  --brand-blue-strong: #6b9bff;

  --brand-emerald: #22c07d;
  --brand-emerald-soft: #22c07d1a;
  --brand-rose: #f2536b;
  --brand-rose-soft: #f2536b1a;

  --success: #22c07d;
  --error: #f2536b;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-card: 0 10px 30px -12px rgba(0, 0, 0, 0.55);
  --shadow-elevated: 0 20px 45px -18px rgba(0, 0, 0, 0.65);

  --max-width: 1120px;

  --font-display: "Sora", "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Light theme override (in case the OS/browser prefers light — we keep the
   product intentionally dark-first for the "premium" feel, but never break
   readability). */
@media (prefers-color-scheme: light) {
  :root { color-scheme: dark; }
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 15% -10%, #e8384a14, transparent 60%),
    radial-gradient(900px 500px at 110% 10%, #4f86f71a, transparent 55%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
/* Safety net: any icon SVG rendered without an explicit sizing wrapper
   falls back to a sane 20px box instead of its unconstrained intrinsic
   size (which browsers otherwise blow up to ~300px and, inside a flex
   row with no fixed width, can stretch to fill the entire row). Every
   icon container below (.icon-tile, .module-card__lock, etc.) sets its
   own more specific size and wins over this fallback. */
svg { width: 20px; height: 20px; flex-shrink: 0; }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; color: var(--text-secondary); }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Navbar ---------- */

.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 18, 32, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--text-primary);
}

.brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--accent), #a8222e);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #1a1206;
  font-size: 14px;
  flex-shrink: 0;
}

.brand__sub {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 10.5px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand__logo {
  height: 32px;
  width: auto;
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}

.brand__logo--lg {
  height: 52px;
}

@media (max-width: 480px) {
  .brand__logo--lg {
    height: 40px;
  }
}

.nav-links {
  display: none;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-links a:hover { color: var(--text-primary); background: var(--bg-card); }
.nav-links a.active { color: #1a1206; background: var(--accent); }

@media (min-width: 860px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex !important; }
}

.nav-cta {
  display: none !important;
}

.nav-avatar-link {
  display: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  align-items: center; justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.nav-avatar-link svg { width: 18px; height: 18px; }
.nav-avatar-link:hover, .nav-avatar-link.active { color: var(--accent-strong); border-color: var(--accent); }

@media (min-width: 860px) {
  .nav-avatar-link { display: flex; }
}

.profile-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #1a0d0f;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(232, 56, 74, 0.35);
}

/* Mobile bottom tab bar — prioridad móvil, gran parte del tráfico llega desde Instagram */
.mobile-tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  display: flex;
  background: rgba(17, 26, 46, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-soft);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (min-width: 860px) {
  .mobile-tabbar { display: none; }
}

.mobile-tabbar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 4px 8px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.mobile-tabbar a svg { width: 20px; height: 20px; }
.mobile-tabbar a.active { color: var(--accent); }

.page-shell { padding-bottom: 90px; }
@media (min-width: 860px) { .page-shell { padding-bottom: 0; } }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  border-radius: var(--radius-pill);
  padding: 13px 24px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent-strong), var(--accent) 60%, #a8222e);
  color: #1a1206;
  box-shadow: 0 12px 24px -10px #e8384a55;
}
.btn-primary:hover { box-shadow: 0 14px 30px -8px #e8384a70; }

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

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover { color: var(--text-primary); }

.btn-block { width: 100%; }

.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none !important;
}

/* ---------- Cards ---------- */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.card-pad { padding: 22px; }

/* ---------- Badges ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
}

.badge-accent { background: var(--accent-soft); color: var(--accent-strong); }
.badge-emerald { background: var(--brand-emerald-soft); color: var(--brand-emerald); }
.badge-muted { background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border); }
.badge-rose { background: var(--brand-rose-soft); color: var(--brand-rose); }
.badge-blue { background: var(--brand-blue-soft); color: var(--brand-blue-strong); }

.pill-review {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #ffb3ba;
  background: #e8384a1f;
  border: 1px dashed #e8384a66;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

/* ---------- Progress ---------- */

.progress-track {
  width: 100%;
  height: 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-fill.is-emerald { background: linear-gradient(90deg, #189a63, var(--brand-emerald)); }

.progress-ring { position: relative; width: 92px; height: 92px; flex-shrink: 0; }
.progress-ring svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.progress-ring circle { fill: none; stroke-width: 8; }
.progress-ring .ring-bg { stroke: var(--bg-elevated); }
.progress-ring .ring-fill {
  stroke: var(--accent);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.progress-ring__label {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.progress-ring__label strong { font-family: var(--font-display); font-size: 20px; }
.progress-ring__label span { font-size: 10px; color: var(--text-muted); }

.sim-report-score {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  margin-bottom: 4px;
}

/* ---------- Hero (landing) ---------- */

.hero {
  padding: 48px 0 40px;
  text-align: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

@media (min-width: 980px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 24px; text-align: left; }
  .hero-grid .hero-copy { text-align: left; }
  .hero-grid .hero h1,
  .hero-grid .hero-copy .eyebrow,
  .hero-grid .hero p.lead { margin-left: 0; margin-right: 0; }
  .hero-grid .hero-actions { justify-content: flex-start; }
  .hero-grid .hero-stats { margin-left: 0; }
}

.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-strong);
  background: var(--accent-soft);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(32px, 5.4vw, 50px);
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

.hero h1 .accent-text {
  background: linear-gradient(100deg, var(--accent-strong) 15%, var(--brand-blue-strong) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lead {
  font-size: clamp(15px, 2.4vw, 18px);
  max-width: 520px;
  margin: 0 auto 28px;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

@media (min-width: 560px) {
  .hero-actions { flex-direction: row; justify-content: center; flex-wrap: wrap; }
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 480px;
  margin: 36px auto 0;
}

.hero-stats .stat strong { display: block; font-family: var(--font-display); font-size: 22px; }
.hero-stats .stat span { font-size: 12px; color: var(--text-muted); }

/* Hero mockup: una vista estilizada del dashboard, hecha en CSS (no una
   captura real), para dar contexto visual de producto sin depender de
   imágenes externas. */
.hero-visual { display: flex; justify-content: center; }

.mockup-frame {
  width: 100%;
  max-width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-elevated);
  overflow: hidden;
  transform: perspective(1000px) rotateY(-4deg) rotateX(1deg);
}

@media (max-width: 979px) {
  .mockup-frame { transform: none; }
}

.mockup-frame__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-soft);
}

.mockup-frame__bar span {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--border);
}
.mockup-frame__bar span:nth-child(1) { background: var(--accent); }
.mockup-frame__bar span:nth-child(2) { background: #ffcf5c; }
.mockup-frame__bar span:nth-child(3) { background: var(--brand-emerald); }

.mockup-frame__body { padding: 18px; }

.mockup-ring {
  width: 56px; height: 56px; border-radius: 50%;
  background: conic-gradient(var(--accent) 0deg 245deg, var(--border-soft) 245deg 360deg);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.mockup-ring::after {
  content: "68%";
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--bg-card);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; font-family: var(--font-display);
  color: var(--text-primary);
}

.mockup-row { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.mockup-row h4 { margin: 0 0 4px; font-size: 13.5px; }
.mockup-row p { margin: 0; font-size: 11.5px; color: var(--text-muted); }

.mockup-bar { height: 8px; border-radius: var(--radius-pill); background: var(--bg-elevated); overflow: hidden; margin-bottom: 16px; }
.mockup-bar span { display: block; height: 100%; width: 68%; background: linear-gradient(90deg, var(--accent), var(--accent-strong)); border-radius: var(--radius-pill); }

.mockup-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mockup-card {
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 10px;
  background: var(--bg-elevated);
}
.mockup-card .dot { width: 18px; height: 18px; border-radius: 6px; margin-bottom: 8px; display:flex; align-items:center; justify-content:center; font-size: 10px; }
.mockup-card.is-done .dot { background: var(--brand-emerald-soft); color: var(--brand-emerald); }
.mockup-card.is-active .dot { background: var(--accent-soft); color: var(--accent-strong); }
.mockup-card.is-locked .dot { background: var(--bg-card); color: var(--text-muted); }
.mockup-card strong { display: block; font-size: 11.5px; margin-bottom: 2px; }
.mockup-card span.tag { font-size: 9.5px; color: var(--text-muted); }

/* ---------- Cómo funciona (landing) ---------- */

.how-steps {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  counter-reset: how-step;
}

@media (min-width: 900px) { .how-steps { grid-template-columns: repeat(4, 1fr); } }

.how-step {
  position: relative;
  padding: 22px 20px 20px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
}

.how-step__num {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: #2a0508;
  margin-bottom: 14px;
}

.how-step h3 { font-size: 15.5px; margin-bottom: 6px; }
.how-step p { font-size: 13.5px; margin: 0; }

/* ---------- Diagnóstico inicial CML ---------- */

.diag-progress-dots {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
}
.diag-progress-dots span {
  height: 5px;
  flex: 1;
  border-radius: var(--radius-pill);
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
}
.diag-progress-dots span.is-done { background: var(--accent); border-color: var(--accent); }
.diag-progress-dots span.is-current { background: var(--brand-blue); border-color: var(--brand-blue); }

.diag-question-card {
  padding: 26px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
}

.diag-question-card .q-label { font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.03em; }
.diag-question-card h2 { font-size: clamp(18px, 3vw, 22px); margin-bottom: 20px; }

.diag-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 10px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.diag-option:hover { border-color: var(--brand-blue-strong); }
.diag-option.is-selected { border-color: var(--brand-blue); background: var(--brand-blue-soft); }
.diag-option .radio-dot {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.diag-option.is-selected .radio-dot { border-color: var(--brand-blue); }
.diag-option.is-selected .radio-dot::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--brand-blue); }

.diag-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 20px; }

/* ---------- Resultado diagnóstico / Mi preparación ---------- */

.prep-hero {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  margin-bottom: 20px;
}

.prep-route {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--brand-blue-soft);
  border: 1px solid #2f6fed44;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 18px;
}
.prep-route strong { color: var(--text-primary); }

.req-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  background: var(--bg-card);
  margin-bottom: 10px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
a.req-item:hover { border-color: var(--brand-blue-strong); background: var(--bg-card-hover); }
.req-item__icon {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.req-item__icon.is-ready { background: var(--brand-emerald-soft); color: var(--brand-emerald); }
.req-item__icon.is-missing { background: var(--accent-soft); color: var(--accent-strong); }
.req-item__title { font-weight: 600; font-size: 14px; }
.req-item__sub { font-size: 12px; color: var(--text-muted); }

.req-detail-block {
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  margin-bottom: 14px;
}
.req-detail-block h4 {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em;
  color: var(--brand-blue-strong); margin-bottom: 8px;
}
.req-detail-block p { margin: 0; font-size: 14.5px; }

/* ---------- Sections ---------- */

.section { padding: 48px 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 32px; }
.section-head h2 { font-size: clamp(24px, 4vw, 34px); }

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.value-card {
  padding: 22px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
}

.icon-tile {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft);
  color: var(--accent-strong);
}
.icon-tile svg { width: 24px; height: 24px; }

.value-card .icon-tile {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft);
  color: var(--accent-strong);
  margin-bottom: 14px;
}

.value-card h3 { font-size: 17px; margin-bottom: 6px; }
.value-card p { font-size: 14px; margin: 0; }

/* ---------- Module cards ---------- */

.module-card {
  position: relative;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

a.module-card:hover, .module-card.is-clickable:hover {
  transform: translateY(-4px);
  border-color: #e8384a55;
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-elevated);
}

.module-card.is-locked { opacity: 0.6; }
.module-card.is-locked:hover { transform: none; border-color: var(--border-soft); box-shadow: var(--shadow-card); }

.module-card.is-progress { border-color: #2f6fed4d; }
.module-card.is-done { border-color: #22c07d40; }

.module-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.module-card__index {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.module-card__lock {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
}
.module-card__lock svg { width: 16px; height: 16px; }
.module-card__lock.is-done { background: var(--brand-emerald-soft); color: var(--brand-emerald); border-color: transparent; }
.module-card__lock.is-progress { background: var(--brand-blue-soft); color: var(--brand-blue-strong); border-color: transparent; }

.module-card__body { display: flex; flex-direction: column; gap: 6px; }

.module-card h3 { font-size: 17px; line-height: 1.3; margin: 0; }
.module-card p.desc {
  font-size: 13.5px;
  margin: 0;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.module-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.module-card__meta-dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

.module-card__progress {
  display: flex;
  align-items: center;
  gap: 10px;
}
.module-card__progress .progress-track { flex: 1; }
.module-card__progress-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
  min-width: 32px;
  text-align: right;
}

.module-card__footer {
  margin-top: auto;
  padding-top: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.module-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-strong);
}
.module-card__cta svg { width: 14px; height: 14px; transition: transform 0.15s ease; }
a.module-card:hover .module-card__cta svg, .module-card.is-clickable:hover .module-card__cta svg {
  transform: translateX(2px);
}

/* ---------- Continue card (dashboard) ---------- */

.continue-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #1a2442, #131b30 60%);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

@media (min-width: 700px) {
  .continue-card { flex-direction: row; align-items: center; justify-content: space-between; }
}

.continue-card__glow {
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, #e8384a33, transparent 70%);
  pointer-events: none;
}

/* ---------- Module summary card (module detail header) ---------- */

.module-summary {
  padding: 26px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
}

.module-summary__desc {
  max-width: 620px;
  color: var(--text-secondary);
  margin: 10px 0 0;
}

.module-summary__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
}

.module-summary__progress { flex: 1; min-width: 220px; max-width: 360px; }
.module-summary__progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 8px;
}

/* ---------- Lesson list within module ---------- */

.lesson-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  background: var(--bg-card);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

a.lesson-row:hover { background: var(--bg-card-hover); border-color: #e8384a44; transform: translateX(2px); }
.lesson-row.is-locked { opacity: 0.5; }
.lesson-row.is-active { border-color: var(--accent); background: var(--accent-soft); }

.lesson-row__marker {
  width: 34px; height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}
.lesson-row__marker svg { width: 16px; height: 16px; }
.lesson-row__marker.is-done { background: var(--brand-emerald-soft); color: var(--brand-emerald); border-color: transparent; }
.lesson-row__marker.is-current { background: var(--accent-soft); color: var(--accent-strong); border-color: transparent; }

.lesson-row__body { flex: 1; min-width: 0; }
.lesson-row__title {
  font-weight: 600;
  font-size: 14.5px;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 560px) {
  .lesson-row__title {
    white-space: normal;
    text-overflow: clip;
    line-height: 1.3;
  }
}
.lesson-row__type { font-size: 12px; color: var(--text-muted); margin-top: 1px; }

.lesson-row__chevron {
  width: 26px; height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
}
.lesson-row__chevron svg { width: 16px; height: 16px; }
a.lesson-row:hover .lesson-row__chevron { color: var(--accent-strong); }

/* ---------- Lesson navigation drawer (inside the lesson page) ---------- */

.lesson-nav-drawer {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  margin: 20px 0;
  overflow: hidden;
}

.lesson-nav-drawer__summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
  font-size: 13.5px;
}
.lesson-nav-drawer__summary::-webkit-details-marker { display: none; }

.lesson-nav-drawer__summary .chev {
  display: inline-flex;
  width: 16px; height: 16px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.lesson-nav-drawer__summary .chev svg { width: 16px; height: 16px; transform: rotate(90deg); }
.lesson-nav-drawer[open] .lesson-nav-drawer__summary .chev { transform: rotate(180deg); }

.lesson-nav-drawer__list {
  padding: 0 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lesson-nav-drawer__list .lesson-row { padding: 11px 14px; }
.lesson-nav-drawer__list .lesson-row__marker { width: 28px; height: 28px; font-size: 12px; }
.lesson-nav-drawer__list .lesson-row__marker svg { width: 14px; height: 14px; }
.lesson-nav-drawer__list .lesson-row__title { font-size: 13.5px; }

/* ---------- Lesson content page ---------- */

.lesson-progress-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  margin-bottom: 18px;
}
.lesson-progress-strip .progress-track { flex: 1; }
.lesson-progress-strip__label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.lesson-header {
  padding: 24px 0 18px;
  border-bottom: 1px solid var(--border-soft);
}

.lesson-crumb {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.lesson-body {
  padding: 28px 0 40px;
  max-width: 680px;
}

.content-block { margin-bottom: 26px; }
.content-block p { font-size: 15.5px; line-height: 1.7; color: var(--text-secondary); }
.content-block h3 { font-size: 19px; margin-bottom: 10px; }

.content-list { margin: 0 0 1em; padding-left: 20px; }
.content-list li { margin-bottom: 10px; font-size: 15px; line-height: 1.6; color: var(--text-secondary); }

.callout {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  font-size: 14px;
  color: var(--text-secondary);
}

.callout.callout-review {
  border-color: #e8384a55;
  background: var(--accent-soft);
}
.callout.callout-review strong { color: var(--accent-strong); }

.callout .callout-icon { flex-shrink: 0; font-size: 18px; line-height: 1; }

/* Checklist interactivo (módulo 2) */
.checklist { display: flex; flex-direction: column; gap: 10px; }

.checklist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  background: var(--bg-card);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.checklist-item:hover { border-color: #e8384a44; }

.checklist-item__box {
  width: 22px; height: 22px;
  border-radius: 7px;
  border: 2px solid var(--border);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: transparent;
  transition: all 0.15s ease;
}

.checklist-item.is-checked .checklist-item__box {
  background: var(--brand-emerald);
  border-color: var(--brand-emerald);
  color: #06210f;
}

.checklist-item.is-checked span.label { color: var(--text-muted); text-decoration: line-through; }

.checklist-item span.label { font-size: 14.5px; font-weight: 500; }

/* ---------- Quiz ---------- */

.quiz-box {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-card);
}

.quiz-question {
  font-family: var(--font-display);
  font-size: 18px;
  margin-bottom: 18px;
}

.quiz-options { display: flex; flex-direction: column; gap: 10px; }

.quiz-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.quiz-option:hover:not(:disabled) { border-color: #e8384a77; }
.quiz-option:active:not(:disabled) { transform: scale(0.99); }

.quiz-option__letter {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  flex-shrink: 0;
  color: var(--text-muted);
}

.quiz-option:disabled { cursor: default; }

.quiz-option.is-correct {
  border-color: var(--success);
  background: var(--brand-emerald-soft);
}
.quiz-option.is-correct .quiz-option__letter { background: var(--success); color: #06210f; border-color: var(--success); }

.quiz-option.is-incorrect {
  border-color: var(--error);
  background: var(--brand-rose-soft);
}
.quiz-option.is-incorrect .quiz-option__letter { background: var(--error); color: #2a0508; border-color: var(--error); }

.quiz-option.is-dimmed { opacity: 0.5; }

.quiz-feedback {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  padding: 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  animation: feedback-in 0.25s ease;
}

@keyframes feedback-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.quiz-feedback.is-correct { background: var(--brand-emerald-soft); border: 1px solid var(--success); color: #c9f5df; }
.quiz-feedback.is-incorrect { background: var(--brand-rose-soft); border: 1px solid var(--error); color: #ffd9de; }
.quiz-feedback strong { display: block; margin-bottom: 4px; font-family: var(--font-display); }

.lesson-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 10px;
  padding: 16px 0 calc(16px + env(safe-area-inset-bottom, 0px));
  margin-top: 24px;
  background: linear-gradient(0deg, var(--bg) 60%, transparent);
}

.lesson-footer .btn-block { flex: 1; }
.lesson-footer .btn-secondary { flex: 0 0 auto; }

@media (min-width: 860px) {
  .lesson-footer { position: static; background: none; }
}

/* ---------- Empty / locked states ---------- */

.state-box {
  text-align: center;
  padding: 48px 24px;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border);
  background: var(--bg-card);
}

.state-box .icon-tile {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 32px 0 40px;
  margin-top: 40px;
}

.site-footer .foot-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}

@media (min-width: 700px) {
  .site-footer .foot-row { flex-direction: row; align-items: center; justify-content: space-between; }
}

.site-footer p { font-size: 12.5px; color: var(--text-muted); margin: 0; }

/* ---------- Utilities ---------- */

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 6px; }
.gap-2 { gap: 12px; }
.gap-3 { gap: 20px; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 13px; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.w-full { width: 100%; }
.hidden { display: none !important; }

.fade-in { animation: fade-in 0.4s ease; }
@keyframes fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Error común (variante de callout) ---------- */

.callout.callout-mistake {
  border-color: #f2a33d55;
  background: #f2a33d1a;
}
.callout.callout-mistake strong { color: #f2a33d; }

/* ---------- Elección de servicio (dentro de una lección) ---------- */

.service-choice {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 18px;
  background: var(--bg-card);
}
.service-choice__prompt { margin: 0 0 14px; font-weight: 600; font-size: 14.5px; }
.service-choice__options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 560px) { .service-choice__options { grid-template-columns: 1fr 1fr; } }

.service-choice__btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.service-choice__btn strong { font-size: 13.5px; letter-spacing: 0.01em; }
.service-choice__btn span { font-size: 12.5px; color: var(--text-muted); }
.service-choice__btn:hover { border-color: var(--brand-blue-strong); }
.service-choice__btn.is-selected { border-color: var(--brand-blue); background: var(--brand-blue-soft); }
.service-choice__btn.is-cml.is-selected { border-color: var(--accent); background: var(--accent-soft); }
.service-choice__note { margin: 14px 0 0; font-size: 13px; color: var(--text-secondary); }
.service-choice__note a { color: var(--brand-blue-strong); font-weight: 600; }

/* ---------- Formularios simples (solicitud de servicio) ---------- */

.form-input {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font: inherit;
  font-size: 14px;
}
.form-input:focus { outline: none; border-color: var(--brand-blue); }
textarea.form-input { resize: vertical; font-family: inherit; }

.module-card.is-highlighted { border-color: var(--brand-blue); box-shadow: 0 0 0 1px var(--brand-blue); }

/* ---------- Precio (landing) ---------- */

.pricing-card {
  position: relative;
  padding: 32px 28px;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--bg-card) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border-soft);
  text-align: center;
  max-width: 460px;
  margin: 0 auto;
  overflow: hidden;
}
.pricing-card::before {
  content: "";
  position: absolute;
  inset: -40% -40% auto auto;
  width: 220px; height: 220px;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
  pointer-events: none;
}
.pricing-card .price-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--brand-emerald);
  background: var(--brand-emerald-soft);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
  text-transform: uppercase;
}
.pricing-card .price-amount {
  font-family: var(--font-display);
  font-size: clamp(38px, 7vw, 52px);
  font-weight: 800;
  margin: 0 0 4px;
}
.pricing-card .price-amount span { font-size: 16px; font-weight: 600; color: var(--text-muted); }
.pricing-card .price-list {
  text-align: left;
  margin: 22px 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pricing-card .price-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}
.pricing-card .price-list li::before {
  content: "✓";
  color: var(--brand-emerald);
  font-weight: 700;
  flex-shrink: 0;
}

/* ---------- Explorador de oportunidades (Módulo 3 + Simulador) ---------- */

.op-explorer__intro { margin-bottom: 14px; font-size: 14px; }
.op-explorer__controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
@media (min-width: 760px) {
  .op-explorer__controls { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}
.op-explorer__count { margin: 0 0 12px; }
.op-explorer__results {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 760px) {
  .op-explorer__results { grid-template-columns: 1fr 1fr; }
}
.op-card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.op-card__top { display: flex; gap: 8px; flex-wrap: wrap; }
.op-card h4 { margin: 0; font-size: 15px; }
.op-card__meta { margin: 0; font-size: 12.5px; color: var(--text-muted); }
.op-card__desc { margin: 0; font-size: 13.5px; }
.op-card__facts {
  display: flex;
  gap: 14px;
  font-size: 12.5px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.op-card__req { margin: 0; font-size: 12px; color: var(--text-muted); }
.op-card__follow { margin-top: 4px; align-self: flex-start; }

/* ---------- Stat tile (Calculadora CML y otros resultados numéricos) ---------- */

.stat-tile {
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  text-align: center;
}
.stat-tile strong {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  margin-bottom: 2px;
}
.stat-tile span {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.stat-tile.is-accent { border-color: #e8384a55; background: var(--accent-soft); }
.stat-tile.is-accent strong { color: var(--accent-strong); }
.stat-tile.is-emerald { border-color: #22c07d55; background: var(--brand-emerald-soft); }
.stat-tile.is-emerald strong { color: var(--brand-emerald); }

/* ---------- Filas de ítems (Plantilla de cotización) ---------- */

.item-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}
@media (max-width: 640px) {
  .item-row { grid-template-columns: 1fr 1fr; }
  .item-row .item-row__remove { grid-column: span 2; }
}

/* ---------- Tarjetas de registro (Kit CML: proveedores, oportunidades) ---------- */

.record-card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  padding: 16px;
  margin-bottom: 12px;
}
.record-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.record-card__title { font-weight: 700; font-size: 15px; margin: 0; }
.record-card__meta { font-size: 12.5px; color: var(--text-muted); margin: 0 0 8px; }
.record-card__notes { font-size: 13.5px; color: var(--text-secondary); margin: 0 0 10px; }
.record-card__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.record-card__actions .btn { padding: 8px 14px; font-size: 13px; }

.select-status {
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 700;
}

/* ---------- Simulador CML: pasos ---------- */

.sim-steps {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.sim-steps span {
  height: 6px;
  flex: 1;
  min-width: 20px;
  border-radius: var(--radius-pill);
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
}
.sim-steps span.is-done { background: var(--brand-emerald); border-color: var(--brand-emerald); }
.sim-steps span.is-current { background: var(--accent); border-color: var(--accent); }
