/* Section dividers */
.reveal section[data-background-color] h3 {
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Tables — cleaner look */
.reveal table {
  font-size: 0.72em;
  border-collapse: collapse;
}
.reveal table th {
  background: #1e293b;
  color: white;
  font-weight: 600;
  padding: 0.5em 0.8em;
}
.reveal table td {
  padding: 0.4em 0.8em;
  border-bottom: 1px solid #e2e8f0;
}
.reveal table tr:nth-child(even) td {
  background: #f8fafc;
}

/* Blockquotes — accent bar */
.reveal blockquote {
  border-left: 4px solid #FFA166;
  background: rgba(255, 161, 102, 0.06);
  padding: 0.6em 1em;
  border-radius: 0 8px 8px 0;
  font-style: normal;
  margin-top: 0.5em;
}

/* Code blocks — subtle background */
.reveal pre {
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* Images — subtle shadow */
.reveal section img:not(.hero-img) {
  border-radius: 8px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.1);
}

/* Lists — more spacing */
.reveal ul li, .reveal ol li {
  margin-bottom: 0.3em;
}

/* Slide number */
.reveal .slide-number {
  color: #94a3b8;
  font-size: 0.7em;
}

/* Flow diagrams (cómo funciona Prophecy) */
.flow {
  display: flex;
  align-items: stretch;
  justify-content: center;
  margin: 0.9em 0 0.6em;
}
.flow .step {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #1e293b;
  color: #fff;
  border-radius: 10px;
  padding: 0.6em 0.5em;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}
.flow .step .t {
  font-weight: 700;
  font-size: 0.58em;
  line-height: 1.25;
}
.flow .step .s {
  font-size: 0.46em;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 0.35em;
  line-height: 1.3;
}
.flow .step .s code {
  font-size: 1em;
  color: inherit;
  background: rgba(255, 255, 255, 0.12);
  padding: 0 0.25em;
  border-radius: 4px;
}
.flow .step.prophecy { background: #593196; }
.flow .step.dbt { background: #FFA166; color: #1e293b; }
.flow .step.dbt .s { color: rgba(30, 41, 59, 0.75); }
.flow .step.dbt .s code { background: rgba(30, 41, 59, 0.1); }
.flow .step.slow { background: #dc2626; }
.flow .arrow {
  flex: 0 0 auto;
  align-self: center;
  color: #94a3b8;
  font-weight: 700;
  font-size: 0.75em;
  padding: 0 0.28em;
}
.flow .arrow.slow { color: #dc2626; }

/* ── Diff de la PR: lista de archivos (slide "El problema") ── */
.pr-files {
  display: flex;
  flex-direction: column;
  gap: 0.3em;
  margin: 0.8em 0 0.4em;
}
.pr-file {
  display: flex;
  align-items: center;
  gap: 0.55em;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.26em 0.6em;
}
.pr-file .st {
  flex: 0 0 auto;
  font-family: var(--r-code-font, monospace);
  font-size: 0.46em;
  font-weight: 800;
  padding: 0.25em 0.6em;
  border-radius: 6px;
}
.pr-file.mod .st { background: #fef3c7; color: #b45309; }
.pr-file.new .st { background: #dcfce7; color: #15803d; }
.pr-file .path {
  font-family: var(--r-code-font, monospace);
  font-size: 0.55em;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.pr-file .path b { color: #1e293b; font-weight: 700; }

/* Chips de tipo de archivo — mismo color en todo el deck */
.chip {
  flex: 0 0 auto;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.3em 0.85em;
  border-radius: 999px;
  color: #fff;
  white-space: nowrap;
}
.pr-file .chip { margin-left: auto; font-size: 0.44em; }
.chip.modelo { background: #FFA166; color: #1e293b; }
.chip.tests  { background: #2563eb; }
.chip.config { background: #dc2626; }
.chip.macro  { background: #059669; }
.chip.pkg    { background: #0d9488; }
.chip.meta   { background: #593196; }

/* ── Diff cards: una slide por tipo de archivo ────────── */
.diff-card {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  margin: 0.7em 0 0.4em;
}
.diff-card .dhead {
  display: flex;
  align-items: center;
  gap: 0.6em;
  background: #1e293b;
  color: #fff;
  padding: 0.5em 0.9em;
  font-family: var(--r-code-font, monospace);
  font-size: 0.6em;
  font-weight: 600;
}
.dhead .chip { margin-left: auto; font-size: 0.82em; }
.diff-card .dline {
  display: flex;
  align-items: baseline;
  font-family: var(--r-code-font, monospace);
  font-size: 0.58em;
  line-height: 1.75;
  padding: 0.04em 0.9em;
  background: #fff;
  color: #475569;
}
.diff-card .dline > span:first-child {
  white-space: pre;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.diff-card .dline.add { background: #e6ffec; }
.diff-card .dline.del { background: #ffebe9; }
.diff-card .dline .why {
  margin-left: auto;
  flex: 0 0 auto;
  padding-left: 1.2em;
  font-family: var(--r-main-font, sans-serif);
  font-size: 0.85em;
  font-weight: 600;
  color: #dc2626;
  white-space: nowrap;
}
.diff-card .dline .why.ok { color: #15803d; }

/* ── Las dos mitades del diff ─────────────────────────── */
.halves {
  display: flex;
  align-items: stretch;
  gap: 0.7em;
  margin: 0.8em 0 0.5em;
}
.half {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  background: #fff;
}
.half .h-head {
  display: flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.5em 0.9em;
  font-size: 0.55em;
  font-weight: 800;
  color: #fff;
}
.half.yes .h-head { background: #15803d; }
.half.no .h-head { background: #64748b; }
.half .h-head .tag {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.22);
  padding: 0.2em 0.75em;
  border-radius: 999px;
  font-size: 0.8em;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.half .h-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.32em;
  padding: 0.55em 0.75em;
}
.half .h-row {
  display: flex;
  align-items: center;
  gap: 0.6em;
}
.half .h-row .chip { font-size: 0.42em; }
.half .h-row .lbl {
  font-size: 0.5em;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.half .h-note {
  margin-top: auto;
  padding-top: 0.55em;
  border-top: 1px dashed #e2e8f0;
  font-size: 0.48em;
  line-height: 1.45;
  color: #64748b;
}

/* ── Anatomía dbt: modelo, Jinja, macros, paquetes, adapter ── */
.anat {
  display: grid;
  grid-template-columns: 1fr auto 1.2fr auto 1fr auto 1.15fr auto 1fr;
  align-items: stretch;
  margin: 0.9em 0 0.5em;
}
.anat .a-top {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  gap: 0.35em;
  justify-content: center;
}
.anat .mini {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  padding: 0.35em 0.4em;
  text-align: center;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.anat .mini .t { font-weight: 700; font-size: 0.5em; line-height: 1.2; }
.anat .mini .s {
  font-family: var(--r-code-font, monospace);
  font-size: 0.38em;
  opacity: 0.85;
  margin-top: 0.25em;
}
.anat .mini.mac { background: #059669; }
.anat .mini.pkg { background: #0d9488; }
.anat .a-down {
  grid-column: 3;
  grid-row: 2;
  display: flex;
  justify-content: space-around;
  color: #94a3b8;
  font-size: 0.5em;
  font-weight: 700;
  line-height: 1.5;
}
.anat .step {
  grid-row: 3;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #1e293b;
  color: #fff;
  border-radius: 10px;
  padding: 0.6em 0.5em;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}
.anat .step .t { font-weight: 700; font-size: 0.58em; line-height: 1.25; }
.anat .step .s {
  font-size: 0.46em;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 0.35em;
  line-height: 1.3;
}
.anat .step .s code {
  font-size: 1em;
  color: inherit;
  background: rgba(255, 255, 255, 0.12);
  padding: 0 0.25em;
  border-radius: 4px;
}
.anat .step.modelo { background: #FFA166; color: #1e293b; }
.anat .step.modelo .s { color: rgba(30, 41, 59, 0.75); }
.anat .step.sqlf { background: #64748b; }
.anat .step.adapter {
  background: #fff;
  color: #1e293b;
  border: 2px solid #1e293b;
  box-shadow: none;
}
.anat .step.adapter .s { color: #475569; }
.anat .step.adapter .s code { background: rgba(30, 41, 59, 0.08); }
.anat .arrow {
  grid-row: 3;
  align-self: center;
  color: #94a3b8;
  font-weight: 700;
  font-size: 0.75em;
  padding: 0 0.28em;
}

/* ── Mensajes del Studio (toasts) ─────────────────────── */
.studio-msgs {
  display: flex;
  flex-direction: column;
  gap: 0.26em;
  margin: 0.7em 0 0.4em;
}
.smsg {
  display: flex;
  align-items: center;
  gap: 0.6em;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.28em 0.7em;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
}
.smsg .dot {
  flex: 0 0 auto;
  width: 0.3em;
  height: 0.3em;
  border-radius: 50%;
}
.smsg.s .dot { background: #94a3b8; }
.smsg.p .dot { background: #593196; }
.smsg.d .dot { background: #FFA166; }
.smsg.a .dot { background: #dc2626; }
.smsg.w .dot { background: #1e293b; }
.smsg .mtxt {
  flex: 0 0 auto;
  font-family: var(--r-code-font, monospace);
  font-size: 0.52em;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
}
.smsg .mnote {
  font-size: 0.48em;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.smsg .chip { margin-left: auto; font-size: 0.42em; }
.chip.st-studio   { background: #94a3b8; }
.chip.st-prophecy { background: #593196; }
.chip.st-dbt      { background: #FFA166; color: #1e293b; }
.chip.st-automate { background: #dc2626; }
.chip.st-wh       { background: #1e293b; }

/* ── Del pipeline al Job: los >> como dbt tasks ───────── */
.jobmap {
  display: flex;
  align-items: stretch;
  margin: 0.8em 0 0.4em;
}
.jm-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  background: #fff;
}
.jm-head {
  display: flex;
  align-items: center;
  gap: 0.6em;
  background: #1e293b;
  color: #fff;
  padding: 0.5em 0.9em;
  font-family: var(--r-code-font, monospace);
  font-size: 0.55em;
  font-weight: 600;
}
.jm-head .chip { margin-left: auto; font-size: 0.8em; }
.jm-code {
  flex: 1;
  padding: 0.6em 1em;
  font-family: var(--r-code-font, monospace);
  font-size: 0.55em;
  line-height: 1.9;
  color: #334155;
  white-space: pre;
  overflow: hidden;
}
.jm-code .op { color: #dc2626; font-weight: 800; }
.jm-code .dim { color: #94a3b8; }
.jm-arrow {
  flex: 0 0 auto;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 0.6em;
}
.jm-arrow .a { font-size: 0.95em; font-weight: 800; color: #FFA166; line-height: 1; }
.jm-arrow .lbl {
  font-family: var(--r-code-font, monospace);
  font-size: 0.4em;
  font-weight: 600;
  color: #64748b;
  margin-top: 0.5em;
}
.jm-tasks {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.12em;
  padding: 0.5em 0.7em;
}
.jm-task {
  display: flex;
  align-items: center;
  gap: 0.55em;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.28em 0.6em;
}
.jm-task .tt {
  flex: 0 0 auto;
  font-size: 0.4em;
  font-weight: 800;
  letter-spacing: 0.03em;
  background: #FFA166;
  color: #1e293b;
  padding: 0.25em 0.6em;
  border-radius: 999px;
}
.jm-task .tn {
  font-family: var(--r-code-font, monospace);
  font-size: 0.5em;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
}
.jm-task .cmd {
  margin-left: auto;
  font-family: var(--r-code-font, monospace);
  font-size: 0.42em;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.jm-dep {
  text-align: center;
  color: #94a3b8;
  font-size: 0.45em;
  font-weight: 700;
  line-height: 1;
}

/* Veredicto bajo el diff */
.verdict-row {
  display: flex;
  align-items: center;
  gap: 0.9em;
  margin-top: 0.8em;
}
.verdict {
  flex: 0 0 auto;
  font-size: 0.58em;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 0.5em 1.1em;
  border-radius: 999px;
}
.verdict.yes  { background: #dcfce7; color: #15803d; }
.verdict.warn { background: #fef3c7; color: #b45309; }
.verdict.no   { background: #e2e8f0; color: #475569; }
.verdict-row .q { font-size: 0.78em; line-height: 1.4; }
