/* A presentation (dashboards/deck.html): each slide is drawn at 1280x720
   and scaled to the stage (--k, set by deck.js), so a slide looks the same
   on a laptop, a projector and a printed page. Below 720px the slides
   stack, unscaled, one under the other. */
.dk { --k: 1; display: flex; flex-direction: column; gap: 12px; max-width: 1280px; margin: 0 auto; }
.dk-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 14px; border: 1px solid var(--border); background: var(--card); box-shadow: 0 1px 2px var(--shadow); }
.dk-stage:fullscreen { border: 0; border-radius: 0; background: #000; display: grid; place-items: center; }
.dk-track { position: absolute; inset: 0; }
.dk-stage:fullscreen .dk-track { inset: auto; width: calc(1280px * var(--k)); height: calc(720px * var(--k)); position: relative; background: var(--card); }
.dk-slide {
  position: absolute; top: 0; left: 0; width: 1280px; height: 720px; transform: scale(var(--k)); transform-origin: 0 0;
  display: flex; flex-direction: column; padding: 44px 56px 22px; gap: 18px; background: var(--card); color: var(--text);
  visibility: hidden; opacity: 0; transition: opacity .18s var(--ease-out-cubic);
}
.dk-slide.is-on { visibility: visible; opacity: 1; }

.dk-kicker { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }
.dk-head { display: flex; flex-direction: column; gap: 6px; }
.dk-title { margin: 0; font-size: 32px; line-height: 1.15; font-weight: 700; letter-spacing: -.01em; max-width: 1080px; }
.dk-sub { margin: 0; font-size: 18px; line-height: 1.4; color: var(--muted); max-width: 1000px; }
.dk-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 16px; }

.dk-grid { display: grid; gap: 14px; align-items: stretch; }
.dk-grid > .dv-block { min-width: 0; grid-column: auto; }
.dk .dk-kpis { flex: 0 0 auto; }
.dk .is-n1 { grid-template-columns: 1fr; }
.dk .is-n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dk .is-n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dk .is-n4, .dk .is-n5, .dk .is-n6 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dk .dk-cards.is-n5, .dk .dk-cards.is-n6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dk .dv-kpi-value { font-size: 34px; }
/* One row that takes the height left; text over blocks (is-stack) gets its
   own height and the blocks the rest. Two auto rows split the height in
   halves and left a gap under a short text. */
.dk-main { flex: 1 1 auto; min-height: 0; display: grid; gap: 22px; grid-template-rows: minmax(0, 1fr); }
.dk-main.is-stack { grid-template-rows: auto minmax(0, 1fr); gap: 16px; }
.dk-main.is-side { grid-template-columns: 1fr 2fr; }
.dk-prose { font-size: 17px; line-height: 1.5; overflow: hidden; }
.dk .dk-figs { min-height: 0; height: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); }
.dk .dk-figs.is-n1 { grid-template-columns: 1fr; }
.dk-figs .dv-block { grid-column: auto; min-height: 0; overflow: hidden; }
.dk-figs .dv-chart { min-height: 0; }
.dk-figs .dv-table-wrap { max-height: none; overflow: hidden; }

.dk-cards { display: grid; gap: 16px; }
.dk-card { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px; border-radius: 12px; border: 1px solid var(--border); border-top: 3px solid var(--primary); background: var(--surface); font-size: 16px; line-height: 1.45; }
.dk-card > b { font-size: 19px; }
.dk-commit { width: 100%; border-collapse: collapse; font-size: 17px; }
.dk-commit th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 8px 12px; border-bottom: 2px solid var(--border); }
.dk-commit td { padding: 14px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.dk-commit td:first-child { width: 60%; font-weight: 500; }

.dk-cover, .dk-divider { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; gap: 14px; max-width: 1000px; }
.dk-cover-title { margin: 0; font-size: 60px; line-height: 1.05; font-weight: 700; letter-spacing: -.02em; }
.dk-cover-sub { margin: 0; font-size: 22px; color: var(--muted); }
.dk-meta { margin: 18px 0 0; font-size: 14px; color: var(--muted); }
.is-cover { border-left: 14px solid var(--primary); }
.dk-divider-num { font-size: 96px; font-weight: 700; line-height: 1; color: var(--primary); }
.dk-divider-title { margin: 0; font-size: 44px; line-height: 1.1; font-weight: 700; }

.dk-foot { flex: 0 0 auto; display: flex; justify-content: space-between; gap: 24px; font-size: 12px; color: var(--muted); }
.dk-foot span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.dk-nav { display: flex; align-items: center; justify-content: center; gap: 10px; }
.dk-count { min-width: 64px; text-align: center; font-size: 14px; color: var(--muted); }
.dk-count b { color: var(--text); }

.dk-strip { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.dk-thumb {
  width: 100%; height: 100%; display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 11px; text-align: left; cursor: pointer;
  border: 1px solid var(--border); border-radius: 10px; background: var(--card); color: var(--text); font: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.dk-thumb:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); }
.dk-thumb.is-on { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.dk-thumb.is-divider, .dk-thumb.is-cover { background: color-mix(in srgb, var(--primary) 6%, var(--card)); }
.dk-thumb-top { display: flex; gap: 8px; align-items: baseline; font-size: 11px; color: var(--muted); }
.dk-thumb-top .num { font-weight: 600; color: var(--text); }
.dk-thumb-kicker { font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-thumb-title { font-size: 13px; line-height: 1.3; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dk-thumb-has { margin-top: auto; font-size: 11px; color: var(--muted); }

@media (max-width: 720px) {
  .dk-stage { aspect-ratio: auto; overflow: visible; border: 0; background: none; box-shadow: none; }
  .dk-track { position: static; display: flex; flex-direction: column; gap: 14px; }
  .dk-slide { position: static; width: auto; height: auto; min-height: 0; transform: none; visibility: visible; opacity: 1; padding: 22px 18px 14px; border: 1px solid var(--border); border-radius: 12px; }
  .dk-title { font-size: 22px; } .dk-sub { font-size: 15px; } .dk-cover-title { font-size: 34px; } .dk-divider-num { font-size: 56px; } .dk-divider-title { font-size: 28px; }
  .dk .dk-main.is-side, .dk .dk-figs, .dk .dk-cards, .dk .dk-kpis { grid-template-columns: 1fr; }
  .dk .dk-main { grid-template-rows: none; }
  .dk-figs .dv-chart { min-height: 240px; }
  .dk-nav, .dk-strip { display: none; }
}

@media print {
  @page { size: 13.333in 7.5in; margin: 0; }
  body:has(.dk) .app-shell > :not(.main), body:has(.dk) .topbar, body:has(.dk) .fab-wrap,
  .dk-nav, .dk-strip, .dk > .rp-foot, .sa-suspended { display: none !important; }
  html:has(.dk) { zoom: 1 !important; }
  body:has(.dk), body:has(.dk) .app-shell, body:has(.dk) .main, body:has(.dk) .content, body:has(.dk) .page {
    display: block !important; height: auto !important; min-height: 0 !important; overflow: visible !important;
    margin: 0 !important; padding: 0 !important; background: #fff !important;
  }
  .dk { max-width: none; gap: 0; }
  .dk-stage { aspect-ratio: auto; overflow: visible; border: 0; border-radius: 0; box-shadow: none; }
  .dk-track { position: static; }
  .dk-slide { position: relative; transform: none; visibility: visible; opacity: 1; break-after: page; }
}

/* "Hay cambios nuevos" (canvas.css .dv-news) over the stage, taking no room. */
.dk-news { position: sticky; top: 8px; z-index: var(--z-sticky); height: 0; display: flex; justify-content: center; overflow: visible; }
@media print { .dk-news { display: none; } }
