/* =============================================================
   AIM DECK — render de diapositivas 16:9. Dirigido por variables
   de tema (inyectadas por themes.web_head). Anti-slop: SIN barra
   lateral de acento; motivo = color + tipografía + fondo en
   portada/cierre (sándwich). Escala fluida (cqw) => perfecto en móvil.
   ============================================================= */

.deck-topbar { position: sticky; top: 0; z-index: 40; background: var(--card); border-bottom: 1px solid var(--line); }
.deck-topbar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 16px; flex-wrap: wrap; padding: 8px 0; }
.deck-title { font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: -.3px; color: var(--ink); }
.deck-meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-soft); }
.deck-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; row-gap: 8px; justify-content: flex-end; }

.demo-banner { background: var(--banner-bg, var(--ink)); color: var(--banner-ink, var(--paper)); font-family: var(--font-mono); font-size: 12.5px; text-align: center; padding: 9px 16px; letter-spacing: .3px; }
.demo-banner b { color: var(--gold); }

.deck-stage { padding: 34px 0 80px; background: var(--paper); }
.deck-stage .container { max-width: 1000px; }

/* marco 16:9 */
.slide {
  position: relative; aspect-ratio: 16 / 9; background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
  padding: 6.2% 7%; margin: 0 auto 26px; overflow: hidden;
  display: flex; flex-direction: column; container-type: inline-size;
}
.slide .num { position: absolute; right: 5%; bottom: 4.6%; font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft); opacity: .7; }
.slide .eyebrow { color: var(--accent); margin-bottom: 3.2cqw; }

.slide h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.5px; line-height: 1.05; color: var(--ink); }
.s-title { font-size: 6.4cqw; }
.s-title-sm { font-size: 4.9cqw; }
.s-sub { font-size: 2.5cqw; color: var(--ink-soft); margin-top: 2.6cqw; max-width: 30ch; line-height: 1.45; }

/* portada / cierre: fondo lleno (sándwich) — el motivo, no una raya */
.slide.cover, .slide.closing { background: var(--hero-bg); color: var(--hero-ink); justify-content: center; }
.slide.cover h2, .slide.closing h2 { color: var(--hero-ink); }
.slide.cover .eyebrow, .slide.closing .eyebrow { color: var(--gold); }
.slide.cover .s-sub, .slide.closing .s-sub { color: var(--hero-ink); opacity: .82; }
.slide.cover .s-title { font-size: 7.4cqw; max-width: 18ch; }
.slide.cover .num, .slide.closing .num { color: var(--hero-ink); opacity: .5; }

/* section */
.slide.section { justify-content: center; }
.slide.section .big { font-family: var(--font-display); font-weight: 900; font-size: 3cqw; color: var(--accent); letter-spacing: 2px; }
.slide.section .s-title { font-size: 6.6cqw; max-width: 20ch; margin-top: 1.5cqw; }

/* Divisor de sección: mural Matisse a sangre + panel de tinta que garantiza legibilidad */
.slide.section.has-secart { padding: 0; overflow: hidden; }
.slide.section.has-secart .secart { position: absolute; inset: 0; z-index: 0; }
.slide.section.has-secart .secart img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slide.section.has-secart .secart-panel {
  position: absolute; inset: 0 auto 0 0; width: 50%; z-index: 1;
  background: linear-gradient(90deg, #17130F 0%, #17130F 52%, rgba(23,19,15,.55) 84%, rgba(23,19,15,0) 100%);
}
.slide.section.has-secart .sec-inner {
  position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center;
  height: 100%; padding: 0 6cqw; max-width: 46%;
}
.slide.section.has-secart .big { color: #E8452A; }
.slide.section.has-secart .s-title { color: #F5EFE4; max-width: 12ch; }

/* title-bullets */
.slide .bullets { list-style: none; margin: 3.4cqw 0 0; padding: 0; display: flex; flex-direction: column; gap: 1.9cqw; }
.slide .bullets li { position: relative; padding-left: 3.4cqw; font-size: 2.55cqw; line-height: 1.4; color: var(--ink); }
.slide .bullets li::before { content: ""; position: absolute; left: 0; top: .55em; width: 1.5cqw; height: 1.5cqw; border-radius: 3px; background: var(--accent); transform: rotate(45deg); }

/* two-column */
.slide .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 4cqw; margin-top: 3.4cqw; flex: 1; }
.slide .col h3 { font-family: var(--font-mono); font-size: 1.9cqw; letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent); }
.slide .col:last-child h3 { color: var(--teal); }
.slide .col p { font-size: 2.3cqw; line-height: 1.45; margin-top: 1.4cqw; color: var(--ink); }

/* stat */
.slide.stat .stats { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2.2cqw; margin-top: 3.4cqw; align-items: stretch; }
.slide.stat .stat-item { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 1cqw; padding: 3cqw 2.4cqw 2.6cqw; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.slide.stat .stat-item::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: .55cqw; background: var(--accent); }
.slide.stat .stat-item:nth-child(2)::before { background: var(--teal); }
.slide.stat .stat-item:nth-child(3)::before { background: var(--gold); }
.slide.stat .stat-item:nth-child(4)::before { background: var(--accent); }
.slide.stat .stat-v { font-family: var(--font-display); font-weight: 900; font-size: 6cqw; line-height: 1; color: var(--accent); letter-spacing: -1px; }
.slide.stat .stat-item:nth-child(2) .stat-v { color: var(--teal); }
.slide.stat .stat-item:nth-child(3) .stat-v { color: var(--gold); }
.slide.stat .stat-l { font-size: 1.9cqw; color: var(--ink-soft); margin-top: 1.4cqw; line-height: 1.35; }

/* quote */
.slide.quote { justify-content: center; }
.slide.quote .q-mark { font-family: var(--font-display); font-size: 12cqw; line-height: .4; color: var(--accent); }
.slide.quote .q-text { font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: 4.3cqw; line-height: 1.25; max-width: 24ch; margin-top: 2cqw; color: var(--ink); }
.slide.quote .q-attr { font-family: var(--font-mono); font-size: 1.9cqw; color: var(--ink-soft); margin-top: 3cqw; letter-spacing: .5px; }

/* bignumber — una cifra héroe a pantalla completa */
.slide.bignumber { justify-content: center; }
.slide.bignumber .bignum { display: flex; flex-direction: column; }
.slide.bignumber .bignum-v { font-family: var(--font-display); font-weight: 900; font-size: 18cqw; line-height: .9; letter-spacing: -3px; color: var(--accent); }
.slide.bignumber .bignum-l { font-family: var(--font-mono); font-size: 2.3cqw; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ink-soft); margin-top: 1.8cqw; }
.slide.bignumber .bignum-sub { font-size: 2.6cqw; line-height: 1.42; max-width: 34ch; color: var(--ink); margin-top: 3.6cqw; }

/* timeline — fases/hitos conectados */
.slide.timeline .timeline { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2cqw; margin-top: 4.4cqw; flex: 1; align-items: stretch; }
.slide.timeline .tl-step { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 1cqw; padding: 3cqw 2cqw 2.2cqw; overflow: hidden; display: flex; flex-direction: column; }
.slide.timeline .tl-step::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: .5cqw; background: var(--accent); }
.slide.timeline .tl-step:nth-child(2)::before { background: var(--teal); }
.slide.timeline .tl-step:nth-child(3)::before { background: var(--gold); }
.slide.timeline .tl-step:nth-child(4)::before { background: var(--accent); }
.slide.timeline .tl-step:nth-child(5)::before { background: var(--teal); }
.slide.timeline .tl-dot { width: 3.2cqw; height: 3.2cqw; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; font-size: 1.75cqw; color: #F5EFE4; margin-bottom: 1.6cqw; }
.slide.timeline .tl-step:nth-child(2) .tl-dot { background: var(--teal); }
.slide.timeline .tl-step:nth-child(3) .tl-dot { background: var(--gold); }
.slide.timeline .tl-step:nth-child(4) .tl-dot { background: var(--accent); }
.slide.timeline .tl-step:nth-child(5) .tl-dot { background: var(--teal); }
.slide.timeline .tl-label { font-family: var(--font-mono); font-size: 1.8cqw; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); }
.slide.timeline .tl-step:nth-child(2) .tl-label { color: var(--teal); }
.slide.timeline .tl-step:nth-child(3) .tl-label { color: var(--gold); }
.slide.timeline .tl-text { font-size: 1.95cqw; line-height: 1.4; color: var(--ink); margin-top: 1cqw; }

/* chart — barras/línea (SVG hereda tema y color de marca por variables CSS) */
.slide.chart .chart-wrap, .slide.diagram .chart-wrap { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; margin-top: 2cqw; }
.slide.chart .chart-svg, .slide.diagram .chart-svg { max-width: 100%; max-height: 100%; }
.slide.chart .chart-cap, .slide.diagram .chart-cap { font-family: var(--font-mono); font-size: 1.75cqw; color: var(--ink-soft); margin-top: 1.3cqw; letter-spacing: .3px; }

/* slide de marca free */
.deck-brandslide { aspect-ratio: 16 / 9; background: var(--ink); color: var(--paper); border-radius: 16px; margin: 0 auto 26px; padding: 6% 7%; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; container-type: inline-size; }
.deck-brandslide .b-dot { width: 3cqw; height: 3cqw; background: var(--accent); transform: rotate(45deg); }
.deck-brandslide .b-t { font-family: var(--font-display); font-weight: 900; font-size: 5cqw; margin-top: 2.4cqw; color: var(--paper); }
.deck-brandslide .b-s { font-family: var(--font-mono); font-size: 2cqw; color: var(--gold); margin-top: 1.6cqw; }

@media (max-width: 560px) { .deck-stage { padding: 18px 0 50px; } .deck-actions .btn { padding: 10px 14px; font-size: 14px; } }

/* --- IMPRESIÓN → PDF (1 slide por página, apaisado) --- */
@media print {
  @page { size: 297mm 167mm; margin: 0; }
  .nav, .footer, .deck-topbar, .demo-banner, .deck-actions { display: none !important; }
  body, .deck-stage { background: #fff !important; padding: 0 !important; }
  .deck-stage .container { max-width: none; padding: 0; }
  .slide, .deck-brandslide {
    width: 100%; margin: 0; border: none; border-radius: 0; box-shadow: none;
    break-after: page; page-break-after: always; aspect-ratio: 16 / 9;
  }
  .slide:last-of-type, .deck-brandslide:last-child { break-after: auto; page-break-after: auto; }
}

/* ============ F3 — afordances de edición ============ */
.deck-head { min-width: 0; }
.deck-title[contenteditable] { outline: none; cursor: text; }
.deck-title[contenteditable]:focus { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 5px; }

.edit-hint { max-width: 1000px; margin: 16px auto -8px; padding: 0 4px; font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); display: flex; gap: 7px; align-items: center; }
.edit-hint span { color: var(--accent); }

.save-pill { font-family: var(--font-mono); font-size: 11px; padding: 4px 9px; border-radius: 999px; color: var(--ink-soft); min-width: 10px; text-align: center; transition: color .15s; }
.save-pill.saving { color: var(--gold); }
.save-pill.saved { color: #2e9e6b; }
.save-pill.err { color: #d1453b; }

.slide-wrap { position: relative; }
.slide-tools { position: absolute; top: 10px; right: 10px; z-index: 6; display: flex; gap: 4px; align-items: center; opacity: 0; transform: translateY(-3px); transition: opacity .14s, transform .14s; background: var(--card); border: 1px solid var(--line); border-radius: 11px; padding: 4px 5px; box-shadow: var(--shadow); }
.slide-wrap:hover .slide-tools, .slide-tools:focus-within { opacity: 1; transform: none; }
.slide-tools button { width: 29px; height: 29px; border: none; background: transparent; color: var(--ink-soft); border-radius: 8px; cursor: pointer; font-size: 15px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.slide-tools button:hover { background: var(--line); color: var(--ink); }
.slide-tools button[data-act="regen"]:hover { background: var(--accent); color: #fff; }
.slide-tools button[data-act="del"]:hover { background: #d1453b; color: #fff; }
.slide-tools .lay-sel { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 8px; font-family: var(--font-mono); font-size: 11px; padding: 4px 5px; max-width: 130px; }

/* campos editables: foco + placeholder cuando están vacíos */
.slide [contenteditable] { outline: none; cursor: text; }
.slide [contenteditable]:hover { box-shadow: inset 0 0 0 1px var(--line-strong); border-radius: 4px; }
.slide [contenteditable]:focus { box-shadow: none; outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.slide [contenteditable]:empty::before { content: attr(data-ph); opacity: .4; }
.slide .eyebrow:empty, .slide .big:empty, .slide .stat-v:empty { display: inline-block; min-width: 54px; }
.slide.cover [contenteditable]:empty::before, .slide.closing [contenteditable]:empty::before { color: var(--hero-ink); }

@media print {
  .slide-tools, .edit-hint, .save-pill { display: none !important; }
  .slide [contenteditable] { outline: none !important; box-shadow: none !important; }
  .slide [contenteditable]:empty::before { content: "" !important; }
  .slide-wrap { break-after: page; page-break-after: always; }
  .slide-wrap:last-of-type { break-after: auto; page-break-after: auto; }
}

/* ============ F5 — compartir ============ */
.deck-actions { position: relative; }
.share-panel { position: absolute; top: calc(100% + 10px); right: 0; z-index: 30; width: 320px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 16px; text-align: left; }
.share-toggle { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14.5px; cursor: pointer; color: var(--ink); }
.share-toggle input { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.share-url-row { display: flex; gap: 8px; margin-top: 12px; }
.share-url-row input { flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); }
.share-url-row .btn { padding: 8px 12px; font-size: 13px; }
.share-open { display: inline-block; margin-top: 10px; font-size: 13px; color: var(--accent); text-decoration: none; }
.share-open:hover { text-decoration: underline; }
.share-hint { margin: 12px 0 0; font-size: 12px; color: var(--ink-soft); line-height: 1.45; }
@media (max-width: 560px) { .share-panel { width: min(320px, 86vw); } }
@media print { .share-panel { display: none !important; } }

.share-views { font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.share-views b { color: var(--accent); font-weight: 500; }

/* logo del brand kit en cover/closing: arriba-derecha, escala con la slide */
.slide .brand-logo { position: absolute; top: 6.2%; right: 7%; max-height: 6.5cqw; max-width: 20cqw; object-fit: contain; object-position: top right; }

/* analitica por slide (panel compartir): barra proporcional al maximo */
.share-slides { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); max-height: 180px; overflow-y: auto; }
.share-slides h4 { margin: 0 0 8px; font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft); }
.ss-row { display: grid; grid-template-columns: 26px 1fr 34px; align-items: center; gap: 8px; margin-bottom: 6px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft); }
.ss-row .ss-n { text-align: right; }
.ss-row .ss-bar { height: 8px; background: color-mix(in srgb, var(--accent) 14%, transparent); border-radius: 4px; overflow: hidden; }
.ss-row .ss-bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.ss-row .ss-v { color: var(--ink); text-align: right; }

.look-panel .look-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.look-panel .look-field span { font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft); letter-spacing: .3px; }
.look-panel select, .look-panel .hexin { font-family: var(--font-ui); font-size: 13px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); width: 100%; }
.look-panel .hexin { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .5px; }

.look-translate-row { display: flex; align-items: flex-end; gap: 8px; margin: 4px 0 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.look-translate-row .btn { padding: 8px 14px; font-size: 13px; white-space: nowrap; }

.hist-panel { max-height: 340px; overflow-y: auto; }
.hist-list { list-style: none; margin: 0 0 10px; padding: 0; }
.hist-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.hist-item:last-child { border-bottom: none; }
.hist-item form { margin: 0; }
.hist-meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-soft); }
.hist-meta b { color: var(--ink); font-weight: 500; }
.hist-empty { font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); margin: 4px 0 10px; }

/* --- panel exportar (agrupa lo que antes eran 4 botones sueltos) --- */
.export-panel { width: 340px; padding: 10px; }
.exp-row {
  display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 12px;
  width: 100%; padding: 11px 12px; border: 0; background: transparent; text-align: left;
  border-radius: var(--radius-sm); cursor: pointer; color: var(--ink);
  font-family: var(--font-ui); text-decoration: none;
  transition: background .16s var(--ease), transform .16s var(--ease);
}
.exp-row:hover { background: var(--paper-2); transform: translateX(2px); }
.exp-row .exp-k {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500; text-align: center;
  color: var(--ink-soft); background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 7px; padding: 8px 0;
}
.exp-row b { display: block; font-size: 14.5px; font-weight: 700; }
.exp-row small { display: block; font-size: 12px; color: var(--ink-soft); margin-top: 1px; }
.exp-row.exp-main { border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow-1); margin-bottom: 6px; }
.exp-row.exp-main .exp-k { background: var(--accent); color: #FFF7F2; border-color: transparent; }
.exp-row.exp-main:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }

/* --- edita con una frase (barra inline por slide) --- */
.regen-bar {
  position: absolute; top: 44px; right: 10px; z-index: 6; width: 340px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--edge), var(--shadow-2); padding: 10px;
}
.regen-row { display: flex; gap: 8px; }
.regen-in {
  flex: 1; min-width: 0; font-family: var(--font-ui); font-size: 14px;
  padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--paper); color: var(--ink);
}
.regen-in:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.regen-go {
  font-family: var(--font-ui); font-weight: 700; font-size: 13.5px; cursor: pointer;
  background: var(--accent); color: #FFF7F2; border: 0; border-radius: 8px; padding: 9px 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 6px 14px -8px rgba(196,54,30,.55);
  transition: transform .16s var(--ease), background .16s;
}
.regen-go:hover { background: var(--accent-press); transform: translateY(-1px); }
.regen-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.regen-chip {
  font-family: var(--font-mono); font-size: 11px; cursor: pointer;
  background: var(--paper-2); color: var(--ink-soft); border: 1px solid var(--line);
  border-radius: var(--radius-pill); padding: 5px 10px;
  transition: color .14s, border-color .14s, background .14s;
}
.regen-chip:hover { color: var(--ink); border-color: var(--line-strong); background: var(--card); }
@media (max-width: 560px) { .regen-bar { width: calc(100% - 20px); right: 10px; } }

/* ---- portada con arte (biblioteca curada, coste runtime cero) ---- */
.slide.cover.has-art, .slide.closing.has-art { position: relative; padding-right: 42%; overflow: hidden; }
.cover-art { position: absolute; top: 0; right: 0; bottom: 0; width: 38%; }
.cover-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slide.cover.has-art .brand-logo, .slide.closing.has-art .brand-logo { right: calc(38% + 18px); }
.look-art-row { margin: 2px 0 10px; }
@media (max-width: 640px) { .slide.cover.has-art, .slide.closing.has-art { padding-right: 46%; } .cover-art { width: 42%; } }


/* --- Espectacularidad de contenido: quote y bignumber como picos visuales Matisse --- */
.slide.quote.has-qart { padding: 0; overflow: hidden; }
.slide.quote.has-qart .qart { position: absolute; inset: 0; z-index: 0; }
.slide.quote.has-qart .qart img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slide.quote.has-qart .qart-panel { position: absolute; inset: 0 auto 0 0; width: 66%; z-index: 1;
  background: linear-gradient(90deg, #17130F 0%, #17130F 52%, rgba(23,19,15,.55) 84%, rgba(23,19,15,0) 100%); }
.slide.quote.has-qart .q-inner { position: relative; z-index: 2; display: flex; flex-direction: column;
  justify-content: center; height: 100%; padding: 0 7cqw; max-width: 60%; }
.slide.quote.has-qart .q-mark { color: #E8452A; }
.slide.quote.has-qart .q-text { color: #F5EFE4; max-width: 18ch; }
.slide.quote.has-qart .q-attr { color: rgba(245,239,228,.72); }

.slide.bignumber.has-bnart { padding: 0; overflow: hidden; }
.slide.bignumber.has-bnart .bnart { position: absolute; inset: 0; z-index: 0; }
.slide.bignumber.has-bnart .bnart img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slide.bignumber.has-bnart .bnart-veil { position: absolute; inset: 0 auto 0 0; width: 64%; z-index: 1;
  background: linear-gradient(90deg, #17130F 0%, #17130F 54%, rgba(23,19,15,.5) 86%, rgba(23,19,15,0) 100%); }
.slide.bignumber.has-bnart .bn-inner { position: relative; z-index: 2; display: flex; flex-direction: column;
  justify-content: center; height: 100%; padding: 0 8cqw; max-width: 60%; }
.slide.bignumber.has-bnart .eyebrow { color: #E0A43B; }
.slide.bignumber.has-bnart .bignum-v { color: #F5EFE4; font-size: 20cqw; }
.slide.bignumber.has-bnart .bignum-l { color: rgba(245,239,228,.85); }
.slide.bignumber.has-bnart .bignum-sub { color: rgba(245,239,228,.9); }

/* two-column: tarjetas Matisse (barra de acento rotando, no texto plano) */
.slide.two-column .cols { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2.2cqw; margin-top: 2.8cqw; }
.slide.two-column .col { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 1cqw; padding: 3cqw 2.6cqw 2.6cqw; overflow: hidden; }
.slide.two-column .col::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: .55cqw; background: var(--accent); }
.slide.two-column .col:nth-child(2)::before { background: var(--teal); }
.slide.two-column .col:nth-child(3)::before { background: var(--gold); }
.slide.two-column .col:nth-child(4)::before { background: var(--accent); }
.slide.two-column .col h3 { font-family: var(--font-display); font-weight: 800; font-size: 2.7cqw; line-height: 1.15; color: var(--ink); margin: 0 0 1.4cqw; }
.slide.two-column .col p { font-size: 1.95cqw; line-height: 1.5; color: var(--ink-soft); }

/* bullets: marcadores Matisse rotando color (no todos iguales) */
.slide .bullets li:nth-child(3n+2)::before { background: var(--teal); }
.slide .bullets li:nth-child(3n)::before { background: var(--gold); }
/* visual-split: contenido a la izquierda + ilustración a sangre a la derecha */
.slide.visual-split { position: relative; padding-right: 44%; overflow: hidden; justify-content: center; }
.slide.visual-split .vs-content { display: flex; flex-direction: column; }
.slide.visual-split .vs-art { position: absolute; top: 0; right: 0; bottom: 0; width: 40%; }
.slide.visual-split .vs-art img, .slide.visual-split .vs-art svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.slide.visual-split .bullets { margin-top: 3cqw; }
@media (max-width: 640px) { .slide.visual-split { padding-right: 46%; } .slide.visual-split .vs-art { width: 44%; } }

/* botón generar imagen IA en visual-split (solo editor) */
.slide.visual-split .vs-art { position: absolute; }
.vs-gen-btn { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); z-index: 3;
  background: rgba(10,15,26,.82); color: #F5EFE4; border: 1px solid rgba(245,239,228,.35);
  border-radius: 999px; padding: .6em 1.1em; font-size: 13px; font-weight: 600; cursor: pointer;
  opacity: 0; transition: opacity .16s ease, background .16s ease; backdrop-filter: blur(3px); white-space: nowrap; }
.slide.visual-split:hover .vs-gen-btn { opacity: 1; }
.vs-gen-btn:hover { background: rgba(10,15,26,.95); }
.vs-gen-btn:disabled { opacity: .7; cursor: default; }

/* panel de Variantes de layout (elegir maquetacion, no regenerar) */
.variants-bar { margin: 6px 0 10px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.variants-head { font-size: 12px; font-weight: 600; color: var(--ink-soft); margin-bottom: 10px; letter-spacing: .01em; }
.variants-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.variant-opt { border: 2px solid var(--line); border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--paper); transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; position: relative; }
.variant-opt:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 22px -12px rgba(0,0,0,.4); }
.variant-opt.is-current { border-color: var(--accent); }
.variant-thumb { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; pointer-events: none; position: relative; background: var(--paper); }
.variant-thumb .slide-wrap { position: absolute; top: 0; left: 0; width: 1280px; transform: scale(calc(190 / 1280)); transform-origin: top left; }
.variant-thumb .slide-tools, .variant-thumb .variants-bar, .variant-thumb .regen-bar { display: none !important; }
.variant-lab { display: flex; align-items: center; justify-content: space-between; padding: 7px 10px; font-size: 11px; font-weight: 600; color: var(--ink); background: var(--card); border-top: 1px solid var(--line); }
.variant-lab .vl-cur { font-size: 9px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }

/* panel del Agente IA */
.agent-panel { width: 340px; padding: 16px; }
.agent-head { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 12px; }
.agent-row { display: flex; gap: 8px; margin-bottom: 10px; }
.agent-in { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); color: var(--ink); font-size: 13.5px; font-family: var(--font-ui); }
.agent-in:focus { outline: none; border-color: var(--accent); }
.agent-go { padding: 10px 16px; border: none; border-radius: 9px; background: var(--accent); color: #fff; font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.agent-go:disabled { opacity: .6; cursor: default; }
.agent-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.agent-chip { padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink-soft); font-size: 12px; font-weight: 500; cursor: pointer; transition: border-color .14s, color .14s; }
.agent-chip:hover { border-color: var(--accent); color: var(--ink); }
.agent-status { margin-top: 12px; font-size: 12.5px; color: var(--ink-soft); display: flex; align-items: center; gap: 8px; }
.agent-status.err { color: var(--red, #e5484d); }
.agent-status .spin { width: 13px; height: 13px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: agSpin .7s linear infinite; }
@keyframes agSpin { to { transform: rotate(360deg); } }

/* ===== P0.5 elementos de negocio (unidades cqw, container inline-size) ===== */
/* proceso: flujo horizontal numerado */
.slide.process .process { display: flex; align-items: flex-start; margin-top: 3cqw; flex-wrap: wrap; }
.slide.process .proc-step { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 1cqw; padding: 0 1.2cqw; }
.slide.process .proc-num { width: 4cqw; height: 4cqw; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-family: var(--font-mono); font-weight: 700; font-size: 2cqw; }
.slide.process .proc-label { font-weight: 700; font-size: 2.4cqw; color: var(--ink); line-height: 1.15; }
.slide.process .proc-text { font-size: 1.75cqw; color: var(--ink-soft); line-height: 1.35; }
.slide.process .proc-arrow { color: var(--accent); font-size: 3cqw; opacity: .45; padding: 0 .3cqw; margin-top: .6cqw; }
/* tabla de datos / comparativa */
.slide.table .dtable-wrap { margin-top: 2.6cqw; border-radius: 1.2cqw; border: 1px solid var(--line); overflow: hidden; }
.slide.table .dtable { width: 100%; border-collapse: collapse; font-family: var(--font-ui); }
.slide.table .dtable th { background: var(--ink); color: var(--paper); text-align: center; padding: 1.8cqw; font-size: 1.9cqw; font-weight: 600; }
.slide.table .dtable th.dt-firstcol { text-align: left; }
.slide.table .dtable td { padding: 1.7cqw 1.8cqw; font-size: 1.9cqw; color: var(--ink); border-top: 1px solid var(--line); text-align: center; }
.slide.table .dtable td.dt-firstcol { text-align: left; font-weight: 600; }
.slide.table .dtable tbody tr:nth-child(even) { background: rgba(127,127,127,.06); }
.slide.table .dt-yes { color: var(--accent); font-weight: 700; font-size: 2.3cqw; }
.slide.table .dt-no { color: var(--ink-soft); opacity: .5; }
/* precios: tarjetas de planes */
.slide.pricing .pricing { display: flex; gap: 1.8cqw; margin-top: 2.6cqw; align-items: stretch; }
.slide.pricing .price-card { flex: 1 1 0; min-width: 0; border: 1px solid var(--line); border-radius: 1.4cqw; padding: 2.6cqw 2cqw; display: flex; flex-direction: column; gap: 1.2cqw; background: var(--card); position: relative; }
.slide.pricing .price-card.featured { border-color: var(--accent); border-width: 2px; }
.slide.pricing .price-badge { position: absolute; top: -1.4cqw; right: 1.4cqw; background: var(--accent); color: #fff; width: 2.8cqw; height: 2.8cqw; border-radius: 50%; display: grid; place-items: center; font-size: 1.6cqw; }
.slide.pricing .price-name { font-weight: 700; font-size: 2.3cqw; color: var(--ink); }
.slide.pricing .price-amt { display: flex; align-items: baseline; gap: .4cqw; }
.slide.pricing .price-v { font-family: var(--font-display); font-weight: 900; font-size: 4.6cqw; color: var(--accent); line-height: 1; }
.slide.pricing .price-per { font-size: 1.6cqw; color: var(--ink-soft); }
.slide.pricing .price-feats { list-style: none; padding: 0; margin: .4cqw 0 0; display: flex; flex-direction: column; gap: .9cqw; }
.slide.pricing .price-feats li { font-size: 1.75cqw; color: var(--ink-soft); padding-left: 2.6cqw; position: relative; line-height: 1.3; }
.slide.pricing .price-feats li::before { content: "\2713"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
/* comparación: pros/contras, lado a lado */
.slide.compare .compare { display: flex; gap: 2cqw; margin-top: 2.6cqw; align-items: stretch; }
.slide.compare .cmp-side { flex: 1 1 0; min-width: 0; border-radius: 1.4cqw; padding: 2.4cqw 2cqw; border: 1px solid var(--line); background: var(--card); }
.slide.compare .cmp-side.cmp-pos { border-top: .5cqw solid var(--green, #2fae66); }
.slide.compare .cmp-side.cmp-neg { border-top: .5cqw solid var(--red, #e5484d); }
.slide.compare .cmp-side.cmp-neutral { border-top: .5cqw solid var(--accent); }
.slide.compare .cmp-head { font-weight: 700; font-size: 2.5cqw; color: var(--ink); margin-bottom: 1.4cqw; }
.slide.compare .cmp-points { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 1.1cqw; }
.slide.compare .cmp-points li { font-size: 1.9cqw; color: var(--ink-soft); padding-left: 2.6cqw; position: relative; line-height: 1.3; }
.slide.compare .cmp-pos .cmp-points li::before { content: "\2713"; position: absolute; left: 0; color: var(--green, #2fae66); font-weight: 700; }
.slide.compare .cmp-neg .cmp-points li::before { content: "\2715"; position: absolute; left: 0; color: var(--red, #e5484d); font-weight: 700; }
.slide.compare .cmp-neutral .cmp-points li::before { content: "\2022"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

/* P1.2 control de acceso en el panel de compartir */
.share-access { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.share-access .sa-title { font-size: 12px; font-weight: 600; color: var(--ink); text-transform: uppercase; letter-spacing: .04em; opacity: .8; }
.share-access .sa-field { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--ink-soft); }
.share-access .sa-field input { padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); font-size: 13.5px; font-family: var(--font-ui); }
.share-access .sa-field input:focus { outline: none; border-color: var(--accent); }
.share-access .sa-check { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink); cursor: pointer; }
.share-access .sa-check input { width: 15px; height: 15px; accent-color: var(--accent); }
.share-access .sa-save { align-self: flex-start; }
.share-access .sa-status { font-size: 12px; color: var(--accent); font-weight: 600; }

/* P1.3 snippet de embed en el panel de compartir */
.share-embed { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.share-embed .embed-code { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg2, var(--paper)); color: var(--ink-soft); font-family: var(--font-mono); font-size: 11.5px; line-height: 1.4; resize: vertical; }
.share-embed .embed-code:focus { outline: none; border-color: var(--accent); }

/* P1.4 icon-grid (rejilla de características con iconos) */
.slide.icon-grid .ico-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.4cqw 2cqw; margin-top: 3cqw; }
.slide.icon-grid .ico-grid[data-n="2"], .slide.icon-grid .ico-grid[data-n="4"] { grid-template-columns: repeat(2, 1fr); }
.slide.icon-grid .ico-grid[data-n="1"] { grid-template-columns: 1fr; }
.slide.icon-grid .ico-item { display: flex; flex-direction: column; gap: 1cqw; }
.slide.icon-grid .ico-chip { width: 5cqw; height: 5cqw; border-radius: 1.3cqw; background: var(--accent); display: grid; place-items: center; color: #fff; }
.slide.icon-grid .ico-item:nth-child(3n+2) .ico-chip { background: var(--teal); }
.slide.icon-grid .ico-item:nth-child(3n) .ico-chip { background: var(--gold); }
.slide.icon-grid .ico-chip svg { width: 2.9cqw; height: 2.9cqw; }
.slide.icon-grid .ico-h { font-weight: 700; font-size: 2.4cqw; color: var(--ink); line-height: 1.15; }
.slide.icon-grid .ico-b { font-size: 1.75cqw; color: var(--ink-soft); line-height: 1.35; }

/* P2.3 layout sources (fuentes de la investigacion) */
.slide.sources .src-list { list-style: none; margin: 2.6cqw 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1.8cqw 3cqw; }
.slide.sources .src-item { display: flex; gap: 1.4cqw; align-items: flex-start; }
.slide.sources .src-n { font-family: var(--font-mono); font-size: 1.7cqw; color: var(--accent); font-weight: 700; padding-top: .25cqw; }
.slide.sources .src-body { display: flex; flex-direction: column; gap: .35cqw; min-width: 0; }
.slide.sources .src-t { font-weight: 650; font-size: 1.95cqw; color: var(--ink); line-height: 1.25; }
.slide.sources .src-u { font-family: var(--font-mono); font-size: 1.35cqw; color: var(--ink-soft); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slide.sources .src-u:hover { color: var(--accent); }

/* Imagen de fondo full-bleed (modo bg) — transforma cualquier slide de impacto */
.slide.has-bg { position: relative; overflow: hidden; padding-right: var(--pad, 8cqw); }
.slide.has-bg .slide-bg { position: absolute; inset: 0; z-index: 0; }
.slide.has-bg .slide-bg img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* velo para legibilidad: oscuro desde abajo-izquierda donde va el texto */
.slide.has-bg .slide-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(7,9,13,.90) 0%, rgba(7,9,13,.74) 40%, rgba(7,9,13,.46) 68%, rgba(7,9,13,.30) 100%), linear-gradient(0deg, rgba(7,9,13,.34) 0%, rgba(7,9,13,0) 55%); }
.slide.has-bg > *:not(.slide-bg) { position: relative; z-index: 1; }
/* texto claro + sombra sutil sobre la imagen, sea cual sea el tema */
.slide.has-bg, .slide.has-bg h2, .slide.has-bg h3, .slide.has-bg .s-title, .slide.has-bg .s-title-sm,
.slide.has-bg .s-sub, .slide.has-bg .lead, .slide.has-bg p, .slide.has-bg li, .slide.has-bg .stat-value,
.slide.has-bg .bn-value, .slide.has-bg .num { color: #ffffff !important; text-shadow: 0 1px 18px rgba(0,0,0,.35); }
.slide.has-bg .eyebrow { color: var(--gold) !important; text-shadow: 0 1px 12px rgba(0,0,0,.4); }
.slide.has-bg .bullets li::marker, .slide.has-bg .bullets li::before { color: var(--gold) !important; }
.slide.has-bg .cover-art, .slide.has-bg.has-art { padding-right: var(--pad, 8cqw); }
.slide.cover.has-bg, .slide.closing.has-bg { padding-right: 46cqw; }

/* Botón "Fondo IA" por slide de impacto — flotante abajo-derecha, aparece al pasar el ratón */
.bg-gen-btn { position: absolute; right: 4cqw; bottom: 3.4cqw; z-index: 5;
  background: rgba(10,15,26,.82); color: #F5EFE4; border: 1px solid rgba(245,239,228,.35);
  border-radius: 999px; padding: .55em 1em; font-size: 12.5px; font-weight: 600; cursor: pointer;
  opacity: 0; transition: opacity .16s ease, background .16s ease; backdrop-filter: blur(3px); white-space: nowrap; }
.slide:hover .bg-gen-btn { opacity: .95; }
.bg-gen-btn:hover { background: rgba(10,15,26,.96); opacity: 1; }
.bg-gen-btn:disabled { opacity: .7; cursor: default; }
.slide.has-bg .bg-gen-btn { background: rgba(10,15,26,.7); border-color: rgba(245,239,228,.5); }

/* P3 colaboradores */
.collab-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 8px 0 10px; }
.collab-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--bg2, #f4f2ee); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; color: var(--ink); }
.collab-rm { background: none; border: 0; cursor: pointer; color: var(--ink-soft); font-size: 15px; line-height: 1; padding: 0 2px; }
.collab-rm:hover { color: #b3261e; }
.collab-add { display: flex; gap: 8px; }
.collab-add input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 13.5px; background: var(--card); color: var(--ink); }
.sa-hint { font-size: 12.5px; color: var(--ink-soft); margin: 2px 0 4px; }
