/* Deck de evidencia — tokens y layout */

:root {
  --paper: #f1efe9;
  --card: #fbfaf7;
  --ink: #16161a;
  --muted: #6b6a64;
  --line: #d8d5cc;
  --acc: #d9541e;
  --acc-soft: #f3e2d8;
  --ok: #2e7d4f;
  --chip-bg: #e9e6de;
  --shadow: 0 1px 2px rgba(20, 18, 12, 0.06), 0 8px 28px rgba(20, 18, 12, 0.07);
}

[data-theme="dark"] {
  --paper: #0f1119;
  --card: #171a24;
  --ink: #eceaf2;
  --muted: #8f8ea0;
  --line: #2b2e3c;
  --acc: #ff7a3d;
  --acc-soft: #33251d;
  --ok: #5dbb87;
  --chip-bg: #232634;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 32px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans", "Helvetica Neue", -apple-system, "Segoe UI", sans-serif;
  line-height: 1.45;
}

a {
  color: inherit;
}

.mono {
  font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ————— Header ————— */

header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  row-gap: 0.4rem;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 1.25rem;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-meta {
  white-space: nowrap;
}

.spacer {
  flex: 1;
}

.seg {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--card);
}

.seg button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.32rem 0.85rem;
  cursor: pointer;
}

.seg button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

/* ————— Slide card ————— */

.slide {
  container-type: inline-size;
  aspect-ratio: 4 / 3;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* % en vez de cqw: las unidades cq del propio contenedor se resuelven contra el
     ancestro (o el viewport si no hay), no contra el slide — rompía las miniaturas. */
  padding: 4.6% 5.8% 3.2%;
}

.slide .kicker {
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  font-size: 1.7cqw;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--acc);
  margin-bottom: 1.8cqw;
}

.slide .kicker::before {
  content: "";
  display: block;
  width: 7cqw;
  height: 0.55cqw;
  background: var(--acc);
  margin-bottom: 1.6cqw;
}

.slide h2 {
  margin: 0;
  font-size: 4.3cqw;
  line-height: 1.14;
  letter-spacing: -0.015em;
  font-weight: 700;
}

.slide .sub {
  margin: 1.8cqw 0 0;
  font-size: 2.3cqw;
  color: var(--muted);
  max-width: 58cqw;
}

.slide .viz {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  margin-top: 2cqw;
}

.slide .nota {
  font-size: 1.9cqw;
  color: var(--muted);
  border-left: 0.5cqw solid var(--acc);
  padding-left: 1.8cqw;
  margin-top: 1.6cqw;
}

.slide footer {
  margin-top: auto;
  flex-shrink: 0;
  height: 9.5cqw;
  overflow: hidden;
  padding-top: 1.1cqw;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.7cqw;
}

.slide .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9cqw;
}

.chip {
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  font-size: 1.35cqw;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.5cqw 1.3cqw;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--muted);
}

.chip.warn {
  background: var(--acc-soft);
  color: var(--acc);
}

.chip.ok {
  color: var(--ok);
}

.slide .src {
  font-size: 1.5cqw;
  line-height: 1.35;
  color: var(--muted);
}

.slide .src a {
  color: inherit;
  text-decoration-color: var(--line);
}

.slide .conflicto {
  font-size: 1.55cqw;
  line-height: 1.4;
  color: var(--muted);
  background: var(--chip-bg);
  border-radius: 6px;
  padding: 0.9cqw 1.4cqw;
}

.slide .conflicto strong {
  color: var(--acc);
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  font-size: 1.4cqw;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-right: 0.8cqw;
}

/* portada / cierre */

.slide.cover h2 {
  font-size: 6.4cqw;
  max-width: 78cqw;
}

.slide .claims {
  list-style: none;
  margin: 3cqw 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.8cqw;
}

.slide .claims li {
  font-size: 2.7cqw;
  padding-left: 3cqw;
  position: relative;
  max-width: 68cqw;
}

.slide .claims li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.15cqw;
  width: 1.7cqw;
  height: 0.55cqw;
  background: var(--acc);
}

/* ————— Viz components ————— */

.stats-row {
  display: flex;
  gap: 2.5cqw;
  flex-wrap: wrap;
}

.stat {
  flex: 1 1 0;
  min-width: 16cqw;
  border-top: 0.55cqw solid var(--acc);
  padding-top: 1.4cqw;
}

.stat .n {
  font-size: 4.2cqw;
  font-weight: 700;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.stat .l {
  font-size: 1.9cqw;
  color: var(--muted);
  margin-top: 0.5cqw;
}

.defs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(24cqw, 1fr));
  gap: 2cqw 3cqw;
}

.def .t {
  font-weight: 700;
  font-size: 2.4cqw;
  border-top: 0.45cqw solid var(--acc);
  padding-top: 1cqw;
}

.def .d {
  font-size: 2cqw;
  color: var(--muted);
  margin-top: 0.5cqw;
}

.big-move {
  display: flex;
  align-items: center;
  gap: 3.5cqw;
  flex-wrap: wrap;
}

.big-move .v {
  font-size: 6.2cqw;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.big-move .v.antes {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 0.55cqw;
  text-decoration-color: var(--acc);
  font-size: 4.4cqw;
}

.big-move .arrow {
  font-size: 4.5cqw;
  color: var(--acc);
}

.big-move-label {
  font-size: 2cqw;
  color: var(--muted);
  margin-top: 1.2cqw;
}

.hbar-chart .row {
  display: grid;
  grid-template-columns: 26cqw 1fr;
  align-items: center;
  gap: 1.6cqw;
  margin: 1.35cqw 0;
}

.hbar-chart .label {
  font-size: 1.95cqw;
  text-align: right;
  color: var(--ink);
}

.hbar-chart .track {
  display: flex;
  align-items: center;
  gap: 1.2cqw;
}

.hbar-chart .bar {
  height: 2.9cqw;
  border-radius: 0.7cqw;
  background: var(--ink);
  opacity: 0.82;
  min-width: 0.6cqw;
}

.hbar-chart .bar.acc {
  background: var(--acc);
  opacity: 1;
}

.hbar-chart .val {
  font-size: 1.95cqw;
  font-weight: 700;
  white-space: nowrap;
}

.hbar-chart .barnote {
  font-size: 1.6cqw;
  color: var(--muted);
  white-space: nowrap;
}

.delta-chart .row {
  display: grid;
  grid-template-columns: 30cqw 1fr;
  align-items: center;
  gap: 1.6cqw;
  margin: 1.6cqw 0;
}

.delta-chart .label {
  font-size: 2cqw;
  text-align: right;
}

.delta-chart .track {
  position: relative;
  height: 3cqw;
}

.delta-chart .zero {
  position: absolute;
  left: 50%;
  top: -0.7cqw;
  bottom: -0.7cqw;
  width: 1px;
  background: var(--line);
}

.delta-chart .bar {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 0.7cqw;
}

.delta-chart .bar.neg {
  right: 50%;
  background: var(--muted);
}

.delta-chart .bar.pos {
  left: 50%;
  background: var(--acc);
}

.delta-chart .val {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2cqw;
  font-weight: 700;
  white-space: nowrap;
}

.pares {
  display: flex;
  flex-direction: column;
  gap: 3cqw;
}

.par .plabel {
  font-size: 1.95cqw;
  color: var(--muted);
  margin-bottom: 1cqw;
}

.par .vals {
  display: flex;
  align-items: baseline;
  gap: 4cqw;
}

.par .a .n,
.par .b .n {
  font-size: 5.4cqw;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.par .a .n {
  color: var(--acc);
}

.par .l {
  font-size: 1.85cqw;
  color: var(--muted);
}

.par .vs {
  font-size: 2.4cqw;
  color: var(--muted);
}

.quote-block {
  border-left: 0.7cqw solid var(--acc);
  padding-left: 3cqw;
  max-width: 72cqw;
}

.quote-block .q {
  font-size: 3.1cqw;
  line-height: 1.35;
  font-weight: 500;
}

.quote-block .de {
  font-size: 1.95cqw;
  color: var(--muted);
  margin-top: 1.6cqw;
}

.descartes {
  display: flex;
  flex-direction: column;
  gap: 1.7cqw;
}

.descarte .t {
  font-size: 2.25cqw;
  text-decoration: line-through;
  text-decoration-color: var(--acc);
  text-decoration-thickness: 0.4cqw;
  color: var(--muted);
}

.descarte .d {
  font-size: 1.8cqw;
  color: var(--acc);
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  margin-top: 0.3cqw;
}

.patrones-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3cqw;
}

.patron-grupo .t {
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  font-size: 1.6cqw;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--acc);
  border-top: 0.45cqw solid var(--acc);
  padding-top: 1cqw;
  margin-bottom: 1.2cqw;
}

.patron-grupo li {
  font-size: 1.85cqw;
  margin-bottom: 1cqw;
}

.patron-grupo ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.fuerzas-list {
  display: flex;
  flex-direction: column;
  gap: 1.6cqw;
}

.fuerza {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2cqw;
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.4cqw;
  /* En cqw: si hereda los 16px del documento, el strut de línea infla cada
     fila en las miniaturas y el contenido desborda el slide. */
  font-size: 1.9cqw;
}

.fuerza .t {
  font-weight: 700;
  font-size: 2.3cqw;
}

.fuerza .d {
  font-size: 1.9cqw;
  color: var(--muted);
}

.fuerza .badge {
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  font-size: 1.4cqw;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4cqw 1.2cqw;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--muted);
  white-space: nowrap;
}

.fuerza .badge.incierta {
  background: var(--acc-soft);
  color: var(--acc);
}

.cuadrante {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  grid-template-rows: 1fr 1fr auto;
  gap: 1.2cqw;
  height: 100%;
  min-height: 0;
}

.cuadrante .celda {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.6cqw;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cuadrante .celda.acc {
  border-color: var(--acc);
  background: var(--acc-soft);
}

.cuadrante .celda .t {
  font-weight: 700;
  font-size: 2.1cqw;
}

.cuadrante .celda .d {
  font-size: 1.7cqw;
  color: var(--muted);
  margin-top: 0.4cqw;
}

.cuadrante .eje-y {
  grid-row: span 1;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-align: center;
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  font-size: 1.5cqw;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.cuadrante .eje-x {
  text-align: center;
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  font-size: 1.5cqw;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2cqw;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0.85cqw;
  height: 1px;
  background: var(--line);
}

.hito {
  position: relative;
  padding-top: 2.6cqw;
}

.hito::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 1.8cqw;
  height: 1.8cqw;
  border-radius: 50%;
  background: var(--muted);
}

.hito.acc::before {
  background: var(--acc);
}

.hito .t {
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  font-size: 2cqw;
  font-weight: 700;
  color: var(--acc);
}

.hito .d {
  font-size: 1.75cqw;
  color: var(--muted);
  margin-top: 0.6cqw;
}

.acciones-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.8cqw 3cqw;
  counter-reset: accion;
}

.accion {
  counter-increment: accion;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.4cqw;
  align-items: start;
  font-size: 2.15cqw;
}

.accion::before {
  content: counter(accion);
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  font-weight: 700;
  color: var(--acc);
  font-size: 2.3cqw;
  border: 1px solid var(--acc);
  border-radius: 50%;
  width: 3.4cqw;
  height: 3.4cqw;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ————— Views ————— */

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.25rem 6rem;
}

/* Charla (talk) */

.talk-layout {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(220px, 3fr);
  gap: 2.5rem;
  align-items: start;
}

.talk-stage {
  /* Anclado a su posición inicial (header real + padding del main): el slide
     nunca se desplaza al hacer scroll ni queda debajo del header. */
  position: sticky;
  top: calc(var(--header-h, 56px) + 2rem);
}

.talk-stage .slide-holder .slide {
  width: 100%;
}

.talk-progress {
  margin-top: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.talk-progress .bar {
  flex: 1;
  height: 3px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}

.talk-progress .fill {
  height: 100%;
  background: var(--acc);
  width: 0;
  transition: width 0.25s ease;
}

.beats {
  display: flex;
  flex-direction: column;
}

.beat {
  min-height: 62vh;
  display: flex;
  align-items: center;
  padding: 1rem 0;
}

.beat p {
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--muted);
  border-left: 3px solid transparent;
  padding-left: 1rem;
  margin: 0;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.beat.active p {
  color: var(--ink);
  border-color: var(--acc);
}

/* Deck view */

.deck-list {
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
  max-width: 900px;
  margin: 0 auto;
}

.deck-item .slide-num {
  margin-bottom: 0.4rem;
}

.hidden {
  display: none !important;
}

/* ————— Responsive ————— */

@media (max-width: 1150px) {
  .header-meta {
    display: none;
  }
}

@media (max-width: 860px) {
  .talk-layout {
    grid-template-columns: 1fr;
  }

  .talk-stage {
    position: sticky;
    top: calc(var(--header-h, 56px) + 2rem);
    z-index: 10;
    background: var(--paper);
    padding-bottom: 0.5rem;
  }

  .beat {
    min-height: 46vh;
  }

  .header-meta {
    display: none;
  }

  .brand .deck-title {
    display: none;
  }
}

/* ————— Print (Deck → PDF) ————— */

@media print {
  header,
  .talk-layout,
  .tabla-wrap,
  .no-print {
    display: none !important;
  }

  body {
    background: #fff;
  }

  main {
    max-width: none;
    padding: 0;
  }

  .deck-list {
    display: block;
    max-width: none;
  }

  .deck-item {
    page-break-after: always;
    padding: 1cm;
  }

  .deck-item .slide {
    box-shadow: none;
  }

  .print-visible {
    display: flex !important;
  }
}

/* ————— Animación de entrada por slide ————— */

.slide .anim {
  opacity: 0;
  transform: translateY(1.6cqw);
}

.slide.in .anim {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: calc(var(--i, 0) * 90ms + 120ms);
}

.hbar-chart .bar {
  width: 0;
}

.slide.in .hbar-chart .bar {
  width: var(--w);
  transition: width 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: calc(var(--i, 0) * 110ms + 150ms);
}

.delta-chart .bar {
  width: 0;
}

.slide.in .delta-chart .bar {
  width: var(--w);
  transition: width 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: calc(var(--i, 0) * 110ms + 150ms);
}

.slide.no-anim .anim,
.slide.no-anim .hbar-chart .bar,
.slide.no-anim .delta-chart .bar,
.slide.no-anim .linea-path {
  transition: none !important;
}

/* ————— Gráfica de línea ————— */

.linea-chart {
  width: 100%;
  max-height: 34cqw;
}

.linea-base {
  stroke: var(--line);
  stroke-width: 0.25;
}

.linea-path {
  stroke: var(--ink);
  stroke-width: 0.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.linea-path.acc {
  stroke: var(--acc);
}

.slide.in .linea-path {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.4s cubic-bezier(0.3, 0, 0.2, 1);
  transition-delay: calc(var(--i, 0) * 250ms + 150ms);
}

.linea-val {
  font-size: 3.2px;
  font-weight: 700;
  fill: var(--ink);
}

.linea-val.acc {
  fill: var(--acc);
}

.linea-lab {
  font-size: 2.4px;
  fill: var(--muted);
}

.linea-axis {
  font-size: 2.4px;
  fill: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

/* ————— Lista numerada ————— */

.lista {
  display: flex;
  flex-direction: column;
  gap: 1.7cqw;
}

.lista-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.6cqw;
  align-items: start;
  font-size: 2.2cqw;
  max-width: 76cqw;
}

.lista-item .num {
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  font-weight: 700;
  color: var(--acc);
  font-size: 2.2cqw;
  border: 1px solid var(--acc);
  border-radius: 50%;
  width: 3.4cqw;
  height: 3.4cqw;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ————— Tabla dentro de slide ————— */

.tabla-viz {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.95cqw;
}

.tabla-viz th {
  text-align: left;
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  font-size: 1.5cqw;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.9cqw 1.2cqw;
  border-bottom: 1px solid var(--line);
}

.tabla-viz td {
  padding: 0.95cqw 1.2cqw;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.tabla-viz .mono-cell {
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  color: var(--acc);
  font-weight: 700;
}

/* ————— Light table ————— */

.tabla-grid {
  display: grid;
  /* Como la light table de Hanademi: 3 columnas amplias, no miniaturas sueltas. */
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem 1.2rem;
}

@media (max-width: 720px) {
  .tabla-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.tabla-cell {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
  text-align: left;
  font: inherit;
  color: inherit;
}

.tabla-cell .slide {
  pointer-events: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tabla-cell:hover .slide {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(20, 18, 12, 0.18);
}

.tabla-cell .cell-num {
  position: absolute;
  bottom: -1.2rem;
  left: 0.2rem;
}

/* ————— Modo presentación ————— */

#present {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
}

#present-holder {
  width: min(96vw, 122vh);
  cursor: pointer;
}

#present-holder .slide {
  box-shadow: none;
  border-radius: 10px;
}

.present-hud {
  position: fixed;
  bottom: 0.9rem;
  left: 1.1rem;
  right: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  z-index: 101;
  opacity: 0.25;
  transition: opacity 0.2s ease;
}

#present:hover .present-hud {
  opacity: 1;
}

.present-hud .spacer {
  flex: 1;
}

.present-hud button {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  cursor: pointer;
}

#present-notes {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 3.2rem;
  max-width: 720px;
  width: calc(100% - 4rem);
  background: color-mix(in srgb, var(--ink) 92%, transparent);
  color: var(--paper);
  border-radius: 10px;
  padding: 0.9rem 1.2rem;
  font-size: 0.95rem;
  line-height: 1.5;
  z-index: 102;
}

body.presenting {
  overflow: hidden;
}

/* ————— Print: estado final sin animación ————— */

@media print {
  .slide .anim,
  .slide .hbar-chart .bar,
  .slide .delta-chart .bar {
    opacity: 1 !important;
    transform: none !important;
    width: var(--w, auto) !important;
    transition: none !important;
  }

  .slide .linea-path {
    stroke-dashoffset: 0 !important;
  }

  #present,
  .present-hud {
    display: none !important;
  }
}

/* ————— Logo institucional ————— */

.slide-logo {
  position: absolute;
  top: 4.2cqw;
  right: 5.8cqw;
  height: 3.4cqw;
  width: auto;
  opacity: 0.85;
}

.slide {
  position: relative;
}

[data-theme="dark"] .slide-logo {
  filter: invert(1) hue-rotate(180deg);
  opacity: 0.8;
}

/* ————— Slides de interacción ————— */

.slide.interaccion {
  background: linear-gradient(135deg, var(--card) 55%, var(--acc-soft));
  border-color: var(--acc);
}

.slide.interaccion .kicker::before {
  width: 10cqw;
}

.qr-layout {
  display: flex;
  gap: 4cqw;
  align-items: center;
}

.qr-box {
  flex: 0 0 auto;
  text-align: center;
}

.qr-pattern {
  width: 20cqw;
  height: 20cqw;
  background: #fff;
  border-radius: 1.4cqw;
  padding: 1.6cqw;
  box-shadow: var(--shadow);
}

.qr-svg {
  width: 100%;
  height: 100%;
  fill: #111;
}

.qr-url {
  margin-top: 1cqw;
  font-size: 1.5cqw;
}

.qr-main {
  flex: 1;
  min-width: 0;
}

.qr-prompt {
  font-size: 3.6cqw;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.qr-opciones {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1cqw;
  margin-top: 2.2cqw;
}

.chip.qr-op {
  font-family: inherit;
  text-transform: none;
  letter-spacing: 0;
  font-size: 2cqw;
  padding: 0.9cqw 2cqw;
  background: var(--card);
  border: 1px solid var(--acc);
  color: var(--ink);
}

.qr-libre {
  margin-top: 2.2cqw;
  font-size: 2.1cqw;
  color: var(--muted);
  font-style: italic;
}

/* ————— Logo en el header de la plataforma ————— */

.brand-logo {
  height: 24px;
  width: auto;
  display: block;
}

[data-theme="dark"] .brand-logo {
  filter: invert(1) hue-rotate(180deg);
}

/* ————— Portada de evento ————— */

.slide.evento {
  justify-content: space-between;
}

.slide.evento .evento-logo {
  height: 4.6cqw;
}

.evento-centro {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 2.4cqw;
}

.evento-badge {
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  font-size: 1.7cqw;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--acc);
  border: 1px solid var(--acc);
  border-radius: 999px;
  padding: 0.8cqw 2.2cqw;
}

.slide.evento h2 {
  font-size: 7.4cqw;
  line-height: 1.06;
  letter-spacing: -0.02em;
  max-width: 82cqw;
  margin: 0;
}

.evento-fecha {
  font-size: 2.2cqw;
  letter-spacing: 0.12em;
}

.evento-speakers {
  display: flex;
  gap: 6cqw;
  border-top: 1px solid var(--line);
  padding-top: 2.2cqw;
}

.speaker .n {
  font-weight: 700;
  font-size: 2.5cqw;
}

.speaker .c {
  font-size: 1.85cqw;
  color: var(--muted);
  margin-top: 0.3cqw;
}

/* ————— Registro de verificación en el Guion ————— */

.beat-registro {
  margin-top: 0.6rem;
  padding-left: calc(1rem + 3px);
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0.03em;
}

.beat.active .beat-registro {
  color: var(--acc);
}

/* ————— La tesis: registro de proposiciones ————— */

.tesis {
  display: flex;
  flex-direction: column;
}

.proposicion {
  display: grid;
  grid-template-columns: 9cqw 1fr;
  gap: 2.4cqw;
  align-items: start;
  padding: 2.4cqw 0;
  border-top: 1px solid var(--line);
}

.proposicion:first-child {
  border-top: none;
  padding-top: 0;
}

.p-num {
  font-size: 2cqw;
  font-weight: 700;
  color: var(--acc);
  letter-spacing: 0.1em;
  padding-top: 0.6cqw;
}

.p-texto {
  font-size: 3.1cqw;
  line-height: 1.28;
  font-weight: 600;
  letter-spacing: -0.01em;
  max-width: 66cqw;
}

.p-texto .hl {
  color: var(--acc);
}

.p-sello {
  display: inline-block;
  margin-top: 1.2cqw;
  font-size: 1.35cqw;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px dashed var(--muted);
  border-radius: 999px;
  padding: 0.45cqw 1.5cqw;
  opacity: 0.85;
}

.tesis-compacta .proposicion {
  padding: 1.5cqw 0;
}

.tesis-compacta .p-texto {
  font-size: 2.35cqw;
  max-width: 72cqw;
}

.tesis-compacta .p-sello {
  margin-top: 0.7cqw;
}

/* ————— S5 opción A: número ancla + ledger ————— */

.hero-stat {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
}

.hero-top {
  display: flex;
  align-items: baseline;
  gap: 3cqw;
}

.hero-n {
  font-size: 19cqw;
  line-height: 0.85;
  font-weight: 700;
  letter-spacing: -0.05em;
}

.hero-frase {
  font-size: 2.6cqw;
  line-height: 1.3;
  max-width: 30cqw;
  color: var(--ink);
}

.hero-frase .hl {
  color: var(--acc);
  font-weight: 700;
}

.hero-ledger {
  margin-left: 30cqw;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 2.4cqw;
  align-items: baseline;
}

.hl-n {
  font-size: 2cqw;
  font-weight: 700;
  color: var(--acc);
  text-align: right;
  white-space: nowrap;
  padding: 1.3cqw 0;
  border-bottom: 1px solid var(--line);
}

.hl-t {
  font-size: 1.95cqw;
  color: var(--muted);
  padding: 1.3cqw 0;
  border-bottom: 1px solid var(--line);
}

.hero-ledger > :nth-last-child(-n + 2) {
  border-bottom: none;
}

/* ————— S5 opción B: prosa con números incrustados ————— */

.prosa p {
  margin: 0 0 2.6cqw;
  font-size: 3.5cqw;
  line-height: 1.42;
  font-weight: 500;
  max-width: 76cqw;
  letter-spacing: -0.005em;
}

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

.prosa .pnum {
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  font-size: 1.22em;
  font-weight: 700;
  color: var(--acc);
  letter-spacing: -0.02em;
}

/* ————— Iconos del header ————— */

.icon-group {
  display: inline-flex;
  gap: 0.35rem;
}

.icon-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.icon-btn:hover {
  color: var(--ink);
  border-color: var(--muted);
}

.icon-btn svg {
  width: 15px;
  height: 15px;
}

.icon-sun {
  display: none;
}

[data-theme="dark"] .icon-sun {
  display: block;
}

[data-theme="dark"] .icon-moon {
  display: none;
}

/* ————— Selector de acento ————— */

.icon-group {
  position: relative;
}

.acc-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--acc);
  display: block;
}

.acc-pop {
  position: absolute;
  top: 40px;
  right: 0;
  z-index: 30;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.6rem;
  display: flex;
  gap: 0.5rem;
  box-shadow: var(--shadow);
}

.acc-pop .swatch {
  appearance: none;
  border: 2px solid transparent;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
}

.acc-pop .swatch[aria-pressed="true"] {
  border-color: var(--ink);
}
