/* Deck theme on top of Reveal.js core (no Reveal theme is loaded).
   Preset: monochrome minimal (shadcn/ui style). Colours used from JS live in
   Deck.colors (lib.js); keep both in sync. */

:root {
  /* Preset: Monochrome minimal (shadcn/ui style). White + zinc greys, one blue for the protagonist concept. */
  --bg: #ffffff;
  --bg-2: #fafafa;
  --panel: #ffffff;
  --panel-strong: #f4f4f5;
  --line: #e4e4e7;
  --line-strong: #d4d4d8;
  --text: #09090b;
  --text-2: #3f3f46;
  --muted: #71717a;
  --heading: #09090b;

  /* Accent = the idea we explain (good views / JEPA); warm = the "old way" (next-token, scale) */
  --accent: #2563eb;
  --accent-2: #18181b;
  --warm: #71717a;
  --accent-rgb: 37, 99, 235;
  --warm-rgb: 113, 113, 122;

  --mark-a: #2563eb;
  --mark-b: #a1a1aa;

  --good: #16a34a;
  --warn: #ca8a04;
  --bad: #dc2626;

  --bg-dot-a: 113, 113, 122;
  --bg-dot-b: 37, 99, 235;

  --font-display: "Geist", "Inter", system-ui, sans-serif;
  --font-body: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

html,
body {
  background: var(--bg);
}

/* ---------- Background layers (remove from index.html for a flat style) ---------- */

#bg-field,
.bg-grid,
.bg-glow {
  position: fixed;
  z-index: 0;
  pointer-events: none;
}

#bg-field {
  inset: 0;
}

.bg-grid {
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 40%, black 30%, transparent 80%);
}

.bg-glow {
  inset: -20%;
  background:
    radial-gradient(circle at 15% 20%, rgba(var(--accent-rgb), 0.1), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(167, 139, 250, 0.1), transparent 45%);
}

.reveal-viewport {
  background: transparent;
}

/* ---------- Reveal base ---------- */

.reveal {
  font-family: var(--font-body);
  font-size: 30px;
  font-weight: 400;
  color: var(--text);
  z-index: 1;
}

.reveal .slides {
  text-align: left;
}

.reveal .slides section {
  height: 100%;
  padding: 64px 88px 56px;
  box-sizing: border-box;
}

.reveal h1,
.reveal h2,
.reveal h3,
.reveal h4 {
  font-family: var(--font-display);
  color: var(--heading);
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.reveal h1 {
  font-size: 104px;
  font-weight: 700;
}

.reveal h2 {
  font-size: 54px;
  font-weight: 600;
  margin-bottom: 14px;
}

.reveal h3 {
  font-size: 32px;
  font-weight: 600;
}

.reveal p {
  margin: 0 0 14px;
  line-height: 1.45;
}

.reveal ul,
.reveal ol {
  margin: 0;
  padding-left: 1.1em;
}

.reveal li {
  margin: 0.32em 0;
  line-height: 1.4;
}

.reveal li::marker {
  color: var(--accent);
}

.reveal a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.35);
}

/* Reveal's reset.css removes italics; restore them for titles and terms. */
.reveal em {
  font-style: italic;
}

.reveal strong {
  color: var(--heading);
  font-weight: 600;
}

.reveal code,
.mono {
  font-family: var(--font-mono);
  font-size: 0.86em;
}

.reveal :not(pre) > code {
  background: var(--panel-strong);
  padding: 0.08em 0.36em;
  border-radius: 6px;
}

.reveal .controls,
.reveal .progress {
  color: var(--accent);
}

.reveal .progress {
  height: 3px;
  background: rgba(148, 163, 184, 0.12);
}

/* Navigation arrows sit bottom-right (Reveal default); the n/M counter sits top-right. */
.reveal .controls {
  right: 12px;
  bottom: 12px;
}

.reveal .slide-number {
  top: 12px;
  right: 16px;
  bottom: auto;
  left: auto;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 14px;
}

/* Step markers drive animations; they never show anything themselves. */
.reveal .fragment.step {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ---------- Layout helpers ---------- */

.kicker {
  font-family: var(--font-mono);
  font-size: 18px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.kicker::before {
  content: "";
  width: 34px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
}

.lede {
  font-size: 30px;
  color: var(--text-2);
  max-width: 1250px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 22px;
}

.tiny {
  font-size: 17px;
}

.c-accent {
  color: var(--accent);
}

.c-accent-2 {
  color: var(--accent-2);
}

.c-warm {
  color: var(--warm);
}

.grad {
  background: linear-gradient(90deg, var(--accent), var(--accent-2) 60%, #f0abfc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.row {
  display: flex;
  gap: 32px;
}

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 32px;
}

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

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.stage {
  position: relative;
  width: 100%;
}

.stage svg {
  display: block;
  overflow: visible;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px 28px;
  backdrop-filter: blur(6px);
  position: relative;
}

.card h3 {
  margin-bottom: 10px;
}

.card.glow {
  border-color: rgba(var(--accent-rgb), 0.45);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.12), 0 0 40px rgba(var(--accent-rgb), 0.1);
}

.card.glow-warm {
  border-color: rgba(var(--warm-rgb), 0.45);
  box-shadow: 0 0 40px rgba(var(--warm-rgb), 0.08);
}

.card.dim {
  opacity: 0.72;
  border-style: dashed;
}

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 16px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--text-2);
  margin-right: 8px;
  white-space: nowrap;
}

.tag.accent {
  border-color: rgba(var(--accent-rgb), 0.5);
  color: var(--accent);
}

.tag.warm {
  border-color: rgba(var(--warm-rgb), 0.5);
  color: var(--warm);
}

/* One line at the bottom of the slide for sources and caveats. Keep it short. */
.footnote {
  position: absolute;
  left: 88px;
  right: 88px;
  bottom: 26px;
  font-size: 15px;
  color: var(--muted);
}

.callout {
  border-left: 3px solid var(--accent);
  padding: 8px 0 8px 22px;
  font-size: 28px;
  line-height: 1.4;
  color: var(--text);
}

.callout.warm {
  border-color: var(--warm);
}

.big-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 96px;
  line-height: 1;
  color: var(--accent);
  text-shadow: 0 0 30px rgba(var(--accent-rgb), 0.35);
}

/* ---------- Code / JSON ---------- */

.code {
  font-family: var(--font-mono);
  font-size: 17px;
  line-height: 1.5;
  background: rgba(3, 7, 15, 0.75);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 24px;
  white-space: pre;
  color: #c9d5e6;
  overflow: hidden;
  position: relative;
}

.code .k {
  color: #7dd3fc;
}

.code .s {
  color: #fcd34d;
}

.code .n {
  color: #f0abfc;
}

.code .p {
  color: #64748b;
}

.code .hl {
  background: rgba(var(--accent-rgb), 0.12);
  border-radius: 4px;
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.12);
}

.code-title {
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.code-title .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

/* ---------- Bars (HTML) ---------- */

.bars {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px 16px;
  align-items: center;
  font-size: 20px;
}

.bars .lbl {
  font-family: var(--font-mono);
  color: var(--text-2);
}

.bars .track {
  height: 14px;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.1);
  overflow: hidden;
}

.bars .fill {
  height: 100%;
  width: 0;
  border-radius: 4px;
  background: var(--mark-a);
}

.bars .fill.top {
  background: var(--accent);
  box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.6);
}

.bars .val {
  font-family: var(--font-mono);
  min-width: 3.2em;
  text-align: right;
}

/* ---------- Tables ---------- */

.reveal table.tbl {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: 21px;
  margin: 0;
}

.reveal table.tbl th,
.reveal table.tbl td {
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 11px 14px;
  text-align: left;
  vertical-align: top;
  line-height: 1.32;
}

.reveal table.tbl th {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.reveal table.tbl td:first-child {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--heading);
}

.reveal table.tbl td.hl {
  background: rgba(var(--accent-rgb), 0.06);
}

/* ---------- Title and divider slides ---------- */

.title-slide,
.divider {
  display: flex !important;
  flex-direction: column;
  justify-content: center;
}

.title-slide h1 {
  font-size: 128px;
  line-height: 0.98;
}

.title-slide .sub {
  font-size: 38px;
  color: var(--text-2);
  margin-top: 26px;
  font-family: var(--font-display);
}

.title-slide .tags {
  margin-top: 54px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.title-slide .tags .tag {
  font-size: 19px;
  padding: 7px 16px;
}

.divider .num {
  font-family: var(--font-mono);
  font-size: 22px;
  color: var(--accent);
  letter-spacing: 0.2em;
}

.divider h2 {
  font-size: 92px;
  margin-top: 18px;
}

.divider p {
  font-size: 32px;
  color: var(--text-2);
  margin-top: 18px;
  max-width: 1100px;
}

.replay-hint {
  position: absolute;
  right: 88px;
  bottom: 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: rgba(125, 138, 160, 0.6);
}

/* Closing "takeaways" list */
.takeaways {
  display: flex;
  flex-direction: column;
  gap: 34px;
  margin-top: 40px;
}

.takeaways .item {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: center;
  font-size: 34px;
  line-height: 1.35;
  color: var(--text-2);
}

.takeaways .n {
  font-family: var(--font-display);
  font-size: 88px;
  font-weight: 700;
  color: var(--accent);
  text-shadow: 0 0 30px rgba(var(--accent-rgb), 0.4);
  line-height: 1;
}

/* ---------- Screenshots with annotation boxes ---------- */

.shot {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.shot img {
  display: block;
  width: 100%;
  margin: 0;
}

.shot-label {
  position: absolute;
  left: 14px;
  top: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(6, 10, 19, 0.88);
  border-radius: 999px;
  padding: 4px 14px 4px 6px;
}

/* Position with left/top/width/height in % of the image */
.shot-mark {
  position: absolute;
  border: 2px solid var(--accent);
  border-radius: 10px;
  box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.45);
  z-index: 2;
}

.shot-mark span {
  position: absolute;
  left: -2px;
  top: -30px;
  font-family: var(--font-mono);
  font-size: 15px;
  background: var(--accent);
  color: #021015;
  padding: 2px 10px;
  border-radius: 6px;
  white-space: nowrap;
}

.shot-mark.below span {
  top: auto;
  bottom: -30px;
}

.shot-mark.left span {
  top: 4px;
  left: auto;
  right: calc(100% + 10px);
}

/* ---------- Interactive controls ---------- */

.slider-row {
  display: grid;
  grid-template-columns: 170px 1fr 80px;
  gap: 18px;
  align-items: center;
  font-size: 20px;
  margin: 10px 0;
}

.slider-row .lbl {
  font-family: var(--font-mono);
  color: var(--text-2);
}

.slider-row output {
  font-family: var(--font-mono);
  text-align: right;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(148, 163, 184, 0.2);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  border: 3px solid var(--bg);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
}

.btn {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--text-2);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 8px 14px;
  cursor: pointer;
}

.btn:hover,
.btn:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
  outline: none;
}

/* Chart tooltip */
.viz-tip {
  position: absolute;
  pointer-events: none;
  background: rgba(6, 10, 19, 0.95);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 16px;
  font-family: var(--font-mono);
  color: var(--text);
  opacity: 0;
  transition: opacity 0.12s;
  white-space: nowrap;
  z-index: 10;
}

/* ---------- PDF export (index.html?print-pdf) ----------
   Reveal's print layout resets the slide box and gradient text renders with a
   visible box, so restore/replace them. */
html.reveal-print .reveal .slides section {
  padding: 64px 88px 56px !important;
  box-sizing: border-box !important;
  height: 900px !important;
  min-height: 900px !important;
}

html.reveal-print .reveal .slides section.title-slide,
html.reveal-print .reveal .slides section.divider {
  display: flex !important;
}

html.reveal-print .grad {
  background: none;
  color: var(--accent);
}

html.reveal-print .replay-hint {
  display: none;
}

@media print {
  #bg-field,
  .bg-grid,
  .bg-glow {
    display: none;
  }
}

/* =====================================================================
   Monochrome minimal overrides (flat: no glows, no gradients)
   ===================================================================== */

.kicker::before { box-shadow: none; height: 1px; }
.kicker { color: var(--muted); font-size: 16px; letter-spacing: 0.16em; }
.reveal h1, .reveal h2 { letter-spacing: -0.035em; }
.reveal h2 { font-size: 50px; max-width: 1380px; }
.grad { background: none; color: var(--accent); -webkit-background-clip: initial; background-clip: initial; }
.card { border-radius: 10px; backdrop-filter: none; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); }
.card.glow { border-color: var(--accent); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); }
.card.glow-warm { border-color: var(--line-strong); box-shadow: none; background: var(--panel-strong); }
.big-num { text-shadow: none; color: var(--heading); letter-spacing: -0.04em; }
.big-num.c-accent { color: var(--accent); }
.callout { border-left-width: 2px; }
.callout.warm { border-color: var(--line-strong); }
.code { background: #fafafa; color: #27272a; border-radius: 8px; }
.code .k { color: #1d4ed8; }
.code .s { color: #18181b; }
.code .n { color: #2563eb; }
.code .p { color: #a1a1aa; }
.code-title .dot { box-shadow: none; }
.bars .fill.top { box-shadow: none; }
.reveal .progress { background: #f4f4f5; }
.tag { border-color: var(--line); color: var(--text-2); background: #fff; }
.tag.accent { border-color: rgba(var(--accent-rgb), 0.4); }
.replay-hint { color: #a1a1aa; }
.reveal .controls { color: #18181b; }
.reveal .progress { color: var(--accent); }

/* Labels for facts vs opinions vs press */
.lbl-tag { display: inline-block; font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; padding: 2px 8px; border-radius: 4px; border: 1px solid var(--line-strong); color: var(--text-2); margin-bottom: 10px; }
.lbl-tag.hecho { border-color: var(--accent); color: var(--accent); }
.lbl-tag.opinion { background: #18181b; color: #fff; border-color: #18181b; }
.lbl-tag.prensa { border-style: dashed; }

/* Real figures with annotation boxes */
.shot { position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.shot img { display: block; width: 100%; height: auto; margin: 0; }
.shot-mark { position: absolute; border: 2px solid var(--accent); border-radius: 6px; }
.shot-mark span { position: absolute; top: -14px; left: -14px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; font: 600 15px/26px var(--font-mono); text-align: center; }
.shot-cap { font-size: 15px; color: var(--muted); margin-top: 8px; }
.legend-list { list-style: none; padding: 0; margin: 0; }
.legend-list li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; font-size: 22px; margin: 0 0 16px; }
.legend-list .n { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; font: 600 15px/26px var(--font-mono); text-align: center; margin-top: 2px; }

/* Step captions under stepped diagrams */
.step-host { min-height: 84px; font-size: 25px; color: var(--text-2); border-left: 2px solid var(--accent); }
.step-cap strong { color: var(--heading); }

/* =====================================================================
   Slide-specific: PRH with JEPA
   ===================================================================== */

.hook-nums { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 28px; margin-top: 46px; }
.hook-nums .card { padding: 30px 30px 26px; }
.hook-nums .big-num { font-size: 104px; }
.hook-nums .lbl { font-size: 22px; color: var(--text-2); margin-top: 12px; line-height: 1.35; }

.quote { font-size: 30px; line-height: 1.4; color: var(--heading); font-weight: 500; letter-spacing: -0.01em; }
.quote::before { content: "“"; color: var(--accent); }
.quote::after { content: "”"; color: var(--accent); }
.quote-src { font-size: 17px; color: var(--muted); margin-top: 12px; font-family: var(--font-mono); }

.compare-2 { display: grid; grid-template-columns: 1fr 80px 1fr; align-items: stretch; gap: 0; margin-top: 30px; }
.compare-2 .arrow { display: flex; align-items: center; justify-content: center; font-size: 44px; color: var(--accent); }
.compare-2 ul { font-size: 24px; }
.compare-2 li::marker { color: var(--muted); }
.compare-2 .card.glow li::marker { color: var(--accent); }

.watch-list { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 28px; margin-top: 30px; }
.watch-list .card h3 { font-size: 26px; }
.watch-list .card p { font-size: 21px; color: var(--text-2); margin: 0; }

.sources-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 48px; font-size: 17px; margin-top: 18px; }
.sources-cols h4 { font-family: var(--font-mono); font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 10px 0 6px; font-weight: 500; }
.sources-cols ul { list-style: none; padding: 0; }
.sources-cols li { margin: 3px 0; line-height: 1.3; }
.reveal .sources-cols a { color: var(--text); border-bottom-color: var(--line-strong); }

.shot { box-shadow: none; border-color: var(--line); }
.shot-mark { box-shadow: none; z-index: 2; }
.takeaways .n { text-shadow: none; font-size: 72px; }
.viz-tip { background: #fff; color: var(--text); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); }

/* ---------- Sizing pass after the layout check (fill the canvas, larger type) ---------- */
.reveal sup { vertical-align: super; font-size: 0.62em; line-height: 0; }
.hook-nums { margin-top: 70px; }
.hook-nums .card { padding: 40px 34px 36px; }
.hook-nums .big-num { font-size: 136px; }
.hook-nums .lbl { font-size: 26px; margin-top: 18px; }
.hook-callout { margin-top: 64px !important; font-size: 34px; }
.obs-card .small { font-size: 26px; }
.obs-card h3 { font-size: 30px; }
.reveal table.lc-tbl { font-size: 25px; }
.reveal table.lc-tbl td { padding: 15px 14px; }
.lc-card .small { font-size: 25px; }
.lc-card { padding: 30px; }
.cv-card { padding: 34px 34px 36px; }
.cv-card .small { font-size: 26px; }
.reveal .cv-card h3 { font-size: 32px !important; }
.compare-2 { margin-top: 44px; }
.compare-2 .card { padding: 34px 36px; }
.compare-2 h3 { font-size: 38px; margin-bottom: 16px; }
.compare-2 ul { font-size: 28px; }
.reveal .quote.lv-q { font-size: 34px !important; margin-top: 60px !important; }
.bt-card .small, .ot-card .small { font-size: 25px; }
.bt-card, .ot-card { padding: 32px 30px; }
.reveal .bt-card h3, .reveal .ot-card h3 { font-size: 31px !important; margin-bottom: 14px; }
.callout.bt-card, .callout.ot-card { padding: 8px 0 8px 22px; margin-top: 50px !important; font-size: 30px; }
.rc-card { padding: 32px; }
.reveal .rc-card .quote { font-size: 33px !important; }
.reveal .callout.rc-card { padding: 8px 0 8px 22px; font-size: 27px !important; margin-top: 44px !important; }
.watch-list { gap: 28px 32px; margin-top: 44px; }
.watch-list .card { padding: 34px 34px 38px; }
.watch-list .card h3 { font-size: 32px; margin-bottom: 14px; }
.watch-list .card p { font-size: 26px; }
.takeaways { gap: 52px; margin-top: 56px; }
.takeaways .item { font-size: 38px; }
.sources-cols { font-size: 22px; gap: 10px 56px; margin-top: 26px; }
.sources-cols h4 { font-size: 16px; margin: 22px 0 8px; }
.sources-cols li { margin: 7px 0; }
.ap-el .small { font-size: 24px; }
