/* =============================================================
   VAI CONVERTER — PRINT (PDF A4)  ·  relatorio.html v2
   Tinta sobre papel: sempre claro, quebras por seção,
   rodapé corrido discreto. 2026-08-07
   ============================================================= */

@page {
  size: A4;
  margin: 16mm 15mm 18mm;
}

/* Impressão é sempre papel: força tokens claros mesmo em dark */
:root, [data-theme="dark"] {
  --bg:        #ffffff;
  --panel:     #ffffff;
  --panel-2:   #f5f4f0;
  --panel-3:   #ebe9e3;
  --line:      #ddd9d0;
  --line-2:    #c6c1b6;
  --ink:    #1d2129;
  --ink-2:  #3c4250;
  --ink-3:  #5c6270;
  --brand:        #8a6215;
  --brand-hover:  #8a6215;
  --brand-down:   #8a6215;
  --brand-soft:   #f4ecda;
  --brand-line:   #d9c79a;
  --on-brand:     #ffffff;
  --success:      #1d7a4b;
  --success-soft: #e3f2e9;
  --danger:       #a03434;
  --danger-soft:  #f6e4e4;
  --warn:         #8a6120;
  --warn-soft:    #f4ecda;
  --ok-text:      #1d7a4b;
  --warn-text:    #8a6120;
  --danger-text:  #8c2f2f;
  --temp-cold:  #4a6b96;
  --temp-mild:  #9a7440;
  --temp-warm:  #b07c2e;
  --temp-hot:   #bf8d1d;
  --temp-cold-text: #3a5578;
  --temp-mild-text: #7c5c30;
  --temp-warm-text: #8a6120;
  --temp-hot-text:  #8a6a10;
  --shadow-1: none;
  --shadow-2: none;
  --glow-brand: none;
  color-scheme: light;
}

html { scroll-behavior: auto; }

body {
  background: #ffffff !important;
  color: var(--ink) !important;
  font-size: 10.5pt;
  line-height: 1.55;
}

/* Sem cromo de app */
.sidebar,
.appbar,
.mobile-nav,
.search,
.skip-link,
.theme-toggle,
#print-btn,
.btn { display: none !important; }

/* Shell vira coluna única */
.app { display: block; }
.content { max-width: none; padding: 0; }

/* Painéis viram seções de papel */
.panel {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.panel-h { padding: 0 0 4mm; border-bottom: 1px solid var(--line-2); margin-bottom: 5mm; }
.panel-b { padding: 0; }
.lens-row { padding-left: 0; padding-right: 0; }

/* Capa (overview) ocupa a primeira página */
.overview { padding-bottom: 6mm; }
.overview-grid { padding: 0; }

/* Cada seção abre página nova */
.report-section {
  break-before: page;
  margin-bottom: 0;
}

/* Não fatiar unidades de leitura */
.split, .lens-row, .stat, .inset, .p-block,
.timeline > li, .ed-list > li, .pack, .persona-head, .persona-cols,
.task, .creative, .heat-band, .placeholder-art, .credit-card,
tr, thead { break-inside: avoid; }

h2, h3, h4 { break-after: avoid; }

/* Tarefas impressas sempre abertas (JS abre no beforeprint) */
.task summary::after { display: none; }
.task summary { cursor: default; }

/* Tabelas: repetir cabeçalho */
table { page-break-inside: auto; }
thead { display: table-header-group; }
.table th, .table td { padding-right: 4mm; }
.table-wrap { overflow: visible; }

a { color: var(--ink); }

/* Rodapé corrido discreto em toda página */
.print-running-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  font-size: 7pt;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  display: flex !important;
  justify-content: space-between;
  background: #ffffff;
  padding-top: 1.5mm;
  border-top: 0.3pt solid var(--line);
}

.report-footer { border-top: 1px solid var(--line); margin-top: 8mm; padding-top: 4mm; }

/* ===== Fase 3: mapa de calor inteiro no PDF + CTA execução ===== */
.heat-clamp { max-height: none !important; overflow: visible !important; }
.heat-clamp:not(.open)::after { display: none !important; }
.heat-toggle { display: none !important; }

/* Print da página no PDF: comparador vira os DOIS fullpages, empilhados */
.heat-switch { display: none !important; }
.heat-compare { display: block !important; }
.heat-compare .hc-page, .heat-compare .hc-heat { display: block !important; }
.hc-col { margin-bottom: 6mm; }
.hc-tag {
  position: static;
  display: inline-block;
  margin-bottom: 2mm;
  font-size: 7pt;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: none;
  border: 0;
  padding: 0;
}
.exec-cta { break-inside: avoid; }
.exec-cta .btn { display: inline-flex !important; }
.locked-over .btn { display: inline-flex !important; }

/* ===== Fase 4b: Dossiê Vivo no PDF ===== */
.evo-list > li { break-inside: avoid; }
