/* =========================================================
   PRESENTACIÓN ACADÉMICA — SISTEMA DE DISEÑO SLUSH
   Tokens: Electric Blue, Mint Pop, Sunburst, Ember,
           Voltage Violet, Lavender / Syne + DM Sans
   ========================================================= */

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  --electric-blue:  #4da2ff;
  --mint-pop:       #55db9c;
  --lavender:       #e9ccff;
  --ember:          #fb4903;
  --sunburst:       #ffd731;
  --violet:         #5c4ade;
  --carbon:         #000000;
  --gray:           #cccccc;
  --mist:           #e9e9e9;
  --sky:            #dceeff;
  --white:          #ffffff;

  --font-display:   'Syne', system-ui, sans-serif;
  --font-body:      'DM Sans', system-ui, sans-serif;

  /* Slush border rule: 1px solid #000 on all interactive elements */
  --border:         1px solid #000000;
  --border-muted:   1px solid var(--gray);

  /* Slush radius scale */
  --r-card:         20px;
  --r-body:         30px;
  --r-elevated:     40px;
  --r-pill:         1600px;

  /* Projection font sizes */
  --fs-title:       clamp(38px, 4vw, 52px);
  --fs-lead:        clamp(22px, 2.2vw, 28px);
  --fs-body:        clamp(19px, 1.9vw, 24px);
  --fs-secondary:   clamp(16px, 1.6vw, 20px);
  --fs-table:       clamp(14px, 1.4vw, 17px);
  --fs-label:       12px;
  --fs-topbar:      13px;
}

/* ── RESET ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--mist);
  color: var(--carbon);
  font-family: var(--font-body);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── PRESENTATION STRUCTURE ──────────────────────────────── */
#presentation {
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--white);
  opacity: 0;
  pointer-events: none;
  transform: translateX(48px);
  transition: opacity .38s ease, transform .38s ease;
}

.slide.active {
  opacity: 1;
  pointer-events: all;
  transform: translateX(0);
}

.slide.prev {
  opacity: 0;
  transform: translateX(-48px);
}

/* ── TOPBAR ──────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 32px;
  background: var(--white);
  border-bottom: 2px solid var(--carbon);
  flex-shrink: 0;
}

.topbar-logos {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-logos img {
  height: 60px;
  width: auto;
  object-fit: contain;
}

.logo-placeholder {
  height: 60px;
  padding: 6px 14px;
  border: var(--border-muted);
  border-radius: var(--r-pill);
  font-size: var(--fs-topbar);
  color: var(--gray);
  display: flex;
  align-items: center;
}

.topbar-meta {
  text-align: right;
  font-size: var(--fs-topbar);
  color: #666;
  line-height: 1.5;
  font-family: var(--font-body);
}

.topbar-meta strong {
  color: var(--carbon);
  font-weight: 700;
}

/* ── SLIDE BODY ───────────────────────────────────────────── */
.slide-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 48px 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--gray) transparent;
}

.slide-body::-webkit-scrollbar { width: 5px; }
.slide-body::-webkit-scrollbar-thumb { background: var(--gray); border-radius: 3px; }

/* ── BOTTOMBAR ────────────────────────────────────────────── */
.bottombar {
  position: fixed;
  bottom: 20px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 300;
}

.nav-btn {
  background: var(--white);
  border: var(--border);
  color: var(--carbon);
  padding: 5px 14px;
  border-radius: var(--r-pill);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  transition: background .16s, color .16s;
  letter-spacing: .01em;
}

.nav-btn:hover  { background: var(--carbon); color: var(--white); }
.nav-btn:disabled { opacity: .35; cursor: not-allowed; }
.nav-btn:disabled:hover { background: var(--white); color: var(--carbon); }
.nav-btn--sq { padding: 8px 16px; font-size: 14px; }

.slide-counter {
  font-family: var(--font-body);
  font-size: var(--fs-secondary);
  font-weight: 700;
  min-width: 72px;
  text-align: center;
  color: #666;
}

.progress-bar {
  position: fixed;
  bottom: 0; left: 0;
  height: 4px;
  background: var(--electric-blue);
  transition: width .38s ease;
  z-index: 200;
}

.fs-hint {
  position: fixed;
  top: 10px; right: 14px;
  font-family: var(--font-body);
  font-size: 12px;
  color: #999;
  background: var(--white);
  border: var(--border-muted);
  padding: 4px 12px;
  border-radius: var(--r-pill);
  z-index: 999;
  pointer-events: none;
}

/* ── TYPOGRAPHY ───────────────────────────────────────────── */
.slide-title {
  font-family: var(--font-display);
  font-size: var(--fs-title);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.02em;
  color: var(--carbon);
  margin-bottom: 6px;
}

.section-label {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 14px;
}

/* ── PILL BADGE ───────────────────────────────────────────── */
.pill-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 36px;
  padding: 0 14px;
  background: var(--badge-color, var(--electric-blue));
  border: var(--border);
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--carbon);
  flex-shrink: 0;
}

/* ── CARD BASE (Slush: black border, 20px radius, no shadow) ─ */
.s-card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--r-card);
  padding: 20px 24px;
}

/* =========================================================
   SLIDE 1 — PORTADA
   ========================================================= */
.slide[data-type="cover"] .slide-body {
  background: var(--sky);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 64px;
}

.cover-inner {
  width: 100%;
  max-width: 900px;
  text-align: center;
}

.cover-module-tag {
  display: inline-block;
  background: var(--white);
  border: var(--border);
  border-radius: var(--r-pill);
  padding: 6px 22px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--carbon);
  margin-bottom: 20px;
}

.cover-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 80px);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: .95;
  color: var(--carbon);
  margin-bottom: 20px;
}

.cover-subtitle {
  font-family: var(--font-body);
  font-size: var(--fs-lead);
  font-weight: 500;
  color: #444;
  max-width: 680px;
  margin: 0 auto 28px;
  line-height: 1.5;
}

.cover-divider {
  width: 60px; height: 4px;
  background: var(--carbon);
  border-radius: 2px;
  margin: 0 auto 24px;
}

.cover-meta {
  display: inline-flex;
  flex-direction: column;
  gap: 7px;
  background: var(--white);
  border: var(--border);
  border-radius: var(--r-card);
  padding: 20px 32px;
  text-align: left;
}

.cover-meta li {
  list-style: none;
  font-family: var(--font-body);
  font-size: var(--fs-secondary);
  color: #555;
  line-height: 1.4;
}

.cover-meta li:first-child {
  font-size: var(--fs-body);
  font-weight: 700;
  color: var(--carbon);
}

.cover-color-bar {
  display: flex;
  gap: 0;
  margin-top: 28px;
  border-radius: var(--r-pill);
  overflow: hidden;
  border: var(--border);
  height: 10px;
}

.cover-color-bar span {
  flex: 1;
  height: 100%;
}

/* =========================================================
   SLIDE 2 — CONTEXTO
   ========================================================= */
.context-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}

.context-card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--r-card);
  padding: 18px 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.context-label {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 7px;
}

.context-text {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 500;
  color: var(--carbon);
  line-height: 1.5;
}

/* =========================================================
   SLIDE 3 — RESULTADO DE APRENDIZAJE
   ========================================================= */
.ra-block {
  background: var(--sky);
  border: var(--border);
  border-radius: var(--r-card);
  padding: 16px 22px;
  margin-bottom: 14px;
}

.ra-block .block-label {
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 8px;
}

.ra-block p {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 500;
  line-height: 1.6;
  color: var(--carbon);
}

.og-block {
  background: var(--mist);
  border: var(--border);
  border-radius: var(--r-card);
  padding: 16px 22px;
  margin-bottom: 16px;
}

.og-block .block-label {
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 8px;
}

.og-block p {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 500;
  line-height: 1.6;
  color: var(--carbon);
}

.oe-list { display: flex; flex-direction: column; gap: 10px; }

.oe-item {
  background: var(--white);
  border: var(--border);
  border-radius: var(--r-card);
  padding: 14px 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.oe-num {
  flex-shrink: 0;
  width: 34px; height: 34px;
  background: var(--carbon);
  color: var(--white);
  border-radius: var(--r-pill);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 12px; font-weight: 800;
}

.oe-item p {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 500;
  color: var(--carbon);
  line-height: 1.55;
}

/* =========================================================
   SLIDE 4 — HERRAMIENTAS
   ========================================================= */
.tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}

.tool-card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--r-card);
  padding: 20px;
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform .18s;
}

.tool-card:hover { transform: translateY(-3px); }

.tool-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.tool-name {
  font-family: var(--font-display);
  font-size: var(--fs-lead);
  font-weight: 800;
  color: var(--carbon);
}

.tool-uso {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 700;
  color: var(--carbon);
  margin-bottom: 6px;
}

.tool-pert {
  font-family: var(--font-body);
  font-size: var(--fs-secondary);
  font-weight: 500;
  color: #555;
  line-height: 1.5;
}

/* =========================================================
   SLIDE 5 — SECUENCIA (TABLA)
   ========================================================= */
.seq-wrapper {
  margin-top: 14px;
  border: var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
}

.seq-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-body);
  font-size: var(--fs-table);
}

.seq-table thead th {
  background: var(--carbon);
  color: var(--white);
  padding: 10px 12px;
  text-align: left;
  font-weight: 700;
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: .08em;
  white-space: nowrap;
}

.seq-table tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--mist);
  vertical-align: top;
  line-height: 1.4;
  color: var(--carbon);
  font-weight: 500;
}

.seq-table tbody tr:last-child td { border-bottom: none; }
.seq-table tbody tr:nth-child(even) td { background: var(--mist); }

.seq-etapa { font-weight: 700; }
.seq-tiempo { white-space: nowrap; font-weight: 800; color: var(--electric-blue); text-align: center; }
.seq-herr   { white-space: nowrap; font-weight: 700; }
.seq-ev     { color: #666; font-size: calc(var(--fs-table) - 1px); }

/* =========================================================
   SLIDE 6 — DIAGNÓSTICO
   ========================================================= */
.diag-header {
  background: var(--mist);
  border: var(--border);
  border-radius: var(--r-card);
  padding: 14px 20px;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 700;
  color: var(--carbon);
  margin-bottom: 14px;
}

.diag-wrapper {
  border: var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
  margin-bottom: 14px;
}

.diag-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-body);
  font-size: var(--fs-table);
}

.diag-table thead th {
  background: var(--carbon);
  color: var(--white);
  padding: 9px 12px;
  text-align: left;
  font-weight: 700;
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.diag-table tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--mist);
  vertical-align: top;
  line-height: 1.4;
  color: var(--carbon);
  font-weight: 500;
}

.diag-table tbody tr:last-child td { border-bottom: none; }

.tipo-pill {
  display: inline-block;
  padding: 3px 12px;
  border-radius: var(--r-pill);
  border: var(--border);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.diag-analisis {
  background: var(--white);
  border: var(--border);
  border-radius: var(--r-card);
  padding: 14px 20px;
  font-family: var(--font-body);
  font-size: var(--fs-secondary);
  font-weight: 500;
  color: #444;
  line-height: 1.6;
}

.diag-analisis strong { color: var(--carbon); font-weight: 700; }

/* =========================================================
   SLIDE 7 — TRASPASO
   ========================================================= */
.transfer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}

.transfer-card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
}

.transfer-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: var(--border);
  background: var(--mist);
}

.transfer-title {
  font-family: var(--font-display);
  font-size: var(--fs-secondary);
  font-weight: 800;
  color: var(--carbon);
}

.transfer-body { padding: 14px 18px; }

.transfer-desc {
  font-family: var(--font-body);
  font-size: var(--fs-secondary);
  font-weight: 500;
  color: #444;
  line-height: 1.55;
  margin-bottom: 12px;
}

.img-placeholder {
  background: var(--mist);
  border: var(--border-muted);
  border-radius: var(--r-card);
  padding: 14px;
  text-align: center;
  font-family: var(--font-body);
  font-size: var(--fs-secondary);
  font-weight: 700;
  color: #888;
}

.transfer-card img { width: 100%; height: 90px; object-fit: cover; }

/* =========================================================
   SLIDE 8 — EVALUACIÓN
   ========================================================= */
.eval-header {
  background: var(--sky);
  border: var(--border);
  border-radius: var(--r-card);
  padding: 14px 20px;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 700;
  color: var(--carbon);
  margin-bottom: 16px;
}

.eval-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.eval-metric {
  background: var(--white);
  border: var(--border);
  border-radius: var(--r-card);
  padding: 16px 14px;
}

.eval-metric-name {
  font-family: var(--font-display);
  font-size: var(--fs-secondary);
  font-weight: 800;
  color: var(--carbon);
  margin: 10px 0 7px;
  line-height: 1.2;
}

.eval-metric-desc {
  font-family: var(--font-body);
  font-size: calc(var(--fs-secondary) - 2px);
  font-weight: 500;
  color: #555;
  line-height: 1.45;
}

.eval-comp {
  background: var(--mist);
  border: var(--border);
  border-radius: var(--r-card);
  padding: 14px 20px;
  font-family: var(--font-body);
  font-size: var(--fs-secondary);
  font-weight: 500;
  color: #444;
  line-height: 1.6;
}

.eval-comp strong { color: var(--carbon); font-weight: 700; }

/* =========================================================
   SLIDE 9 — AVA
   ========================================================= */
.ava-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 18px;
  margin-top: 16px;
  align-items: start;
}

.ava-sections { display: flex; flex-direction: column; gap: 10px; }

.ava-section {
  background: var(--white);
  border: var(--border);
  border-radius: var(--r-card);
  padding: 12px 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.ava-sec-name {
  font-family: var(--font-display);
  font-size: var(--fs-secondary);
  font-weight: 800;
  color: var(--carbon);
  margin-bottom: 3px;
}

.ava-sec-cont {
  font-family: var(--font-body);
  font-size: calc(var(--fs-secondary) - 1px);
  font-weight: 500;
  color: #555;
  line-height: 1.4;
}

.ava-image-box {
  background: var(--white);
  border: var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
  min-height: 280px;
  display: flex;
  flex-direction: column;
}

.ava-image-box img { width: 100%; height: auto; object-fit: cover; }

.ava-placeholder {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: var(--mist);
}

.ava-ph-text {
  font-family: var(--font-body);
  font-size: var(--fs-secondary);
  font-weight: 700;
  color: #888;
  text-align: center;
}

/* =========================================================
   SLIDE 10 — CRITERIOS DE ÉXITO
   ========================================================= */
.success-list { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }

.success-card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--r-card);
  padding: 16px 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.success-title {
  font-family: var(--font-display);
  font-size: var(--fs-body);
  font-weight: 800;
  color: var(--carbon);
  margin-bottom: 5px;
}

.success-desc {
  font-family: var(--font-body);
  font-size: var(--fs-secondary);
  font-weight: 500;
  color: #555;
  line-height: 1.5;
}

/* =========================================================
   SLIDE 11 — BIBLIOGRAFÍA
   ========================================================= */
.bib-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }

.bib-item {
  background: var(--white);
  border: var(--border);
  border-radius: var(--r-card);
  padding: 13px 20px;
  font-family: var(--font-body);
  font-size: var(--fs-secondary);
  font-weight: 500;
  color: #444;
  line-height: 1.6;
}

.bib-item em { font-style: italic; color: var(--carbon); }

/* =========================================================
   SLIDE 12 — CIERRE
   ========================================================= */
.closing-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  margin-top: 16px;
  align-items: start;
}

.closing-sintesis { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }

.sintesis-item {
  background: var(--mist);
  border: var(--border);
  border-radius: var(--r-card);
  padding: 14px 20px;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 500;
  color: var(--carbon);
  line-height: 1.5;
}

.closing-tools { display: flex; flex-direction: column; gap: 10px; }

.closing-tool {
  background: var(--white);
  border: var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
}

.closing-tool-header {
  padding: 10px 16px;
  border-bottom: var(--border);
}

.closing-tool-name {
  font-family: var(--font-display);
  font-size: var(--fs-secondary);
  font-weight: 800;
  color: var(--carbon);
}

.closing-tool-body {
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: var(--fs-secondary);
  font-weight: 500;
  color: #555;
  line-height: 1.5;
}

.closing-final {
  background: var(--sky);
  border: var(--border);
  border-radius: var(--r-elevated);
  padding: 28px 24px;
  text-align: center;
}

.closing-big {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 800;
  color: var(--carbon);
  line-height: 1.05;
  margin-bottom: 12px;
}

.closing-sub {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 700;
  color: #444;
  margin-bottom: 14px;
}

.closing-contact {
  font-family: var(--font-body);
  font-size: var(--fs-secondary);
  color: #666;
}

.closing-contact a { color: var(--carbon); font-weight: 700; text-decoration: none; }
.closing-contact a:hover { text-decoration: underline; }

.closing-color-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.closing-color-dots span {
  width: 14px; height: 14px;
  border-radius: var(--r-pill);
  border: var(--border);
}

/* =========================================================
   QUIZ MODAL — estilo presentación Mentimeter
   ========================================================= */
.qm {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.qm.active { display: flex; }

.qm-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
}

/* ── PANEL ANCHO ── */
.qm-wide {
  position: relative;
  width: 100%;
  max-width: 900px;
  max-height: 88vh;
  background: var(--white);
  border: var(--border);
  border-radius: var(--r-elevated);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.qm-close {
  position: absolute;
  top: 14px; right: 18px;
  z-index: 10;
  background: none;
  border: var(--border-muted);
  border-radius: var(--r-pill);
  width: 32px; height: 32px;
  font-size: 20px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--carbon);
  font-family: var(--font-body);
  transition: background .15s;
}
.qm-close:hover { background: var(--mist); }

/* ── VIEW ── */
.qm-view {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* ── TOPBAR (timer + progress) ── */
.qm-topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px 12px;
  border-bottom: var(--border-muted);
  flex-shrink: 0;
}

.qm-prog-wrap { flex: 1; }

.qm-prog-label {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 6px;
}

.qm-prog-track {
  height: 6px;
  background: var(--mist);
  border-radius: var(--r-pill);
  overflow: hidden;
  border: 1px solid var(--gray);
}

.qm-prog-fill {
  height: 100%;
  background: var(--electric-blue);
  border-radius: var(--r-pill);
  transition: width .4s ease;
}

.qm-timer {
  flex-shrink: 0;
  width: 52px; height: 52px;
  background: var(--mint-pop);
  border: var(--border);
  border-radius: var(--r-pill);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 22px; font-weight: 800;
  color: var(--carbon);
  transition: background .3s;
}
.qm-timer.urgent { background: var(--ember); color: var(--white); }

/* ── STAGE (2 columnas) ── */
.qm-stage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.qm-q-side {
  padding: 24px 20px 20px 28px;
  border-right: var(--border-muted);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--gray) transparent;
}

.qm-r-side {
  padding: 24px 28px 20px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 12px;
  scrollbar-width: thin;
}

/* ── WAITING ANIMATION ── */
.qm-waiting {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 16px;
  color: #888;
  font-family: var(--font-body);
  font-size: var(--fs-secondary);
  text-align: center;
}

.qm-wait-dots {
  display: flex;
  gap: 8px;
}

.qm-wait-dots span {
  width: 12px; height: 12px;
  background: var(--gray);
  border-radius: var(--r-pill);
  animation: qm-pulse 1.2s ease-in-out infinite;
}
.qm-wait-dots span:nth-child(2) { animation-delay: .2s; }
.qm-wait-dots span:nth-child(3) { animation-delay: .4s; }

@keyframes qm-pulse {
  0%,100% { opacity: .3; transform: scale(.8); }
  50%      { opacity: 1;   transform: scale(1.1); }
}

/* ── QUESTION ── */
.qm-q-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: var(--carbon);
  color: var(--white);
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-size: 13px; font-weight: 800;
  flex-shrink: 0;
}

.qm-q-text {
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 800;
  color: var(--carbon);
  line-height: 1.25;
}

/* ── OPCIONES BOTÓN ── */
.qm-opts { display: flex; flex-direction: column; gap: 8px; }

.qm-opt-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  border: var(--border);
  border-radius: var(--r-card);
  background: var(--white);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: var(--fs-secondary);
  font-weight: 500;
  color: var(--carbon);
  text-align: left;
  transition: background .15s, transform .1s;
}
.qm-opt-btn:hover  { background: var(--mist); transform: translateX(3px); }
.qm-opt-btn.selected { background: var(--sky); border-color: var(--carbon); font-weight: 700; }

.qm-opt-key {
  flex-shrink: 0;
  width: 28px; height: 28px;
  background: var(--mist);
  border: var(--border-muted);
  border-radius: var(--r-pill);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 12px; font-weight: 800;
  transition: background .15s, color .15s;
}
.qm-opt-btn.selected .qm-opt-key {
  background: var(--carbon);
  color: var(--white);
}

/* ── LIKERT BOTONES ── */
.qm-lik-row {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.qm-lik-btn {
  flex: 1;
  height: 52px;
  border: var(--border);
  border-radius: var(--r-card);
  background: var(--white);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 20px; font-weight: 800;
  color: var(--carbon);
  transition: background .15s;
}
.qm-lik-btn:hover    { background: var(--mist); }
.qm-lik-btn.selected { background: var(--carbon); color: var(--white); }

.qm-lik-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-body);
  font-size: 12px;
  color: #888;
  margin-top: 6px;
}

/* ── TEXTAREA ── */
.qm-textarea {
  width: 100%;
  border: var(--border-muted);
  border-radius: var(--r-card);
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: var(--fs-secondary);
  color: var(--carbon);
  resize: vertical;
  outline: none;
  background: var(--white);
}
.qm-textarea:focus { border-color: var(--carbon); }
.qm-textarea:disabled { opacity: .6; }

/* ── CHART SIDE ── */
.qm-chart-lbl {
  font-family: var(--font-body);
  font-size: var(--fs-secondary);
  font-weight: 700;
  color: var(--carbon);
  line-height: 1.4;
  margin-bottom: 10px;
}

.qm-resp-count {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #888;
  margin-top: 8px;
  text-align: right;
}

.qm-text-reveal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  gap: 12px;
}

/* ── FOOTER ── */
.qm-footer {
  display: flex;
  justify-content: flex-end;
  padding: 12px 24px;
  border-top: var(--border-muted);
  flex-shrink: 0;
}

.qm-next-btn { min-width: 160px; }

/* ── DONE VIEW ── */
.qm-done-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex: 1;
  padding: 40px;
  text-align: center;
}

/* ── RESULTS VIEW ── */
.qm-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px 28px 16px;
  border-bottom: var(--border-muted);
  flex-shrink: 0;
}

.qm-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 800;
  color: var(--carbon);
  margin: 0;
}

.qm-sub {
  font-family: var(--font-body);
  font-size: var(--fs-secondary);
  color: #666;
  line-height: 1.5;
}

.qm-all-charts {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 28px;
  overflow-y: auto;
  flex: 1;
}

.qm-chart-block {
  background: var(--white);
  border: var(--border-muted);
  border-radius: var(--r-card);
  padding: 16px 18px;
}

/* ── CORRECT ANSWER BADGE ── */
.qm-correct-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--mint-pop);
  border: var(--border);
  border-radius: var(--r-pill);
  padding: 8px 18px;
  font-family: var(--font-body);
  font-size: var(--fs-secondary);
  font-weight: 700;
  color: var(--carbon);
  margin-top: 10px;
  flex-wrap: wrap;
  line-height: 1.4;
}

.qm-autopercepcion-note {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #888;
  margin-top: 10px;
}

/* ── MISC ── */
.qm-loading, .qm-no-data {
  font-family: var(--font-body);
  font-size: var(--fs-secondary);
  color: #888;
  text-align: center;
  padding: 32px;
}

/* ── DIAG ACTIONS BUTTON ROW ── */
.diag-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.diag-url-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  background: var(--sunburst);
  border: var(--border);
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-size: var(--fs-secondary);
  font-weight: 800;
  color: var(--carbon);
  text-decoration: none;
  letter-spacing: .01em;
  transition: background .15s;
}

/* ── IMAGEN ENLAZABLE ────────────────────────────────────── */
.img-link {
  display: block;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
}
.img-link::after {
  content: 'Abrir \2197';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(13px, 1.4vw, 18px);
  font-weight: 800;
  letter-spacing: .04em;
  opacity: 0;
  transition: opacity .2s;
  border-radius: 12px;
}
.img-link:hover::after { opacity: 1; }
.img-link img { display: block; }
.diag-url-badge:hover { background: var(--carbon); color: var(--white); }
