/* Papel timbrado A4: proposta comercial e relatório de evolução.
   Na tela aparece como prévia; no "Imprimir → Salvar como PDF" sai em A4. */
@page { size: A4; margin: 0; }

.doc-visor { position: fixed; inset: 0; z-index: 70; background: #5a554d; overflow-y: auto; display: flex; flex-direction: column; }
.doc-barra {
  position: sticky; top: 0; z-index: 2; background: var(--grafite); color: var(--sobre-escuro);
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: calc(10px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px));
}
.doc-barra .btn.contorno { color: var(--sobre-escuro); box-shadow: inset 0 0 0 1.5px var(--grafite-3); }
.doc-barra .btn.contorno:hover { background: var(--grafite-2); }
.doc-folhas { display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 24px 12px 60px; }
.doc-escala { transform-origin: top center; }

.folha {
  width: 210mm; height: 297mm; background: #fff; color: #1a1918; position: relative; overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35); font-family: var(--f-texto); font-size: 10.5pt; line-height: 1.5;
  display: flex; flex-direction: column;
}
.folha .f-topo { padding: 14mm 16mm 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 10mm; }
.folha .f-marca { display: flex; align-items: center; gap: 4mm; }
.folha .f-marca svg { width: 16mm; height: 16mm; }
.folha .f-marca b { display: block; font-family: var(--f-display); font-stretch: 78%; font-weight: 800; font-size: 17pt; letter-spacing: 0.02em; line-height: 1; text-transform: uppercase; }
.folha .f-marca small { display: block; font-size: 7.5pt; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: #6e685e; margin-top: 1.5mm; }
.folha .f-tipo { text-align: right; font-size: 7.5pt; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; color: #6e685e; }
.folha .f-tipo b { display: block; color: #1a1918; font-size: 9pt; }
.folha .f-faixa { margin: 6mm 0 0; height: 2.2mm; background: #f27a1a; position: relative; }
.folha .f-faixa::after { content: ""; position: absolute; right: 16mm; top: 0; width: 26mm; height: 100%; background: #1a1918; transform: skewX(-30deg); }
.folha .f-corpo { flex: 1; padding: 9mm 16mm 6mm; display: flex; flex-direction: column; gap: 6.5mm; }
.folha .f-rodape {
  background: #1a1918; color: #ebe5d8; padding: 5mm 16mm; font-size: 7.6pt; display: flex; justify-content: space-between; gap: 6mm; align-items: center; position: relative;
}
.folha .f-rodape::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6mm; background: #f27a1a; }
.folha .f-rodape span { display: block; }
.folha .f-rodape .pag { color: #f27a1a; font-weight: 800; letter-spacing: 0.1em; white-space: nowrap; }

.folha h1 { font-family: var(--f-display); font-stretch: 78%; font-weight: 900; font-size: 30pt; line-height: 0.95; text-transform: uppercase; letter-spacing: -0.005em; }
.folha h1 em { font-style: normal; background: linear-gradient(transparent 80%, #f27a1a 80%, #f27a1a 92%, transparent 92%); }
.folha h2 { font-family: var(--f-display); font-stretch: 78%; font-weight: 800; font-size: 14pt; text-transform: uppercase; display: flex; align-items: center; gap: 3mm; }
.folha h2::before { content: ""; width: 3mm; height: 5mm; background: #f27a1a; transform: skewX(-18deg); flex: none; }
.folha .rotulo-doc { font-size: 7.5pt; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: #6e685e; }
.folha .meta-doc { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4mm; border-top: 0.3mm solid #e7e2d7; border-bottom: 0.3mm solid #e7e2d7; padding: 3.5mm 0; }
.folha .meta-doc b { display: block; font-size: 10.5pt; }
.folha .passos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4mm; }
.folha .passo { border-top: 1mm solid #1a1918; padding-top: 2.5mm; }
.folha .passo .n { font-family: var(--f-display); font-stretch: 78%; font-weight: 900; font-size: 20pt; line-height: 1; }
.folha .passo b { display: block; margin: 1.5mm 0 1mm; font-size: 10pt; }
.folha .passo p { font-size: 8.8pt; color: #4f4a43; }
.folha ul.lista-check { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2.5mm 6mm; }
.folha ul.lista-check li { display: grid; grid-template-columns: 5mm 1fr; gap: 2mm; align-items: start; }
.folha ul.lista-check li::before { content: "✓"; width: 5mm; height: 5mm; border-radius: 50%; background: #f27a1a; display: grid; place-items: center; font-weight: 900; font-size: 8pt; }
.folha .investimento { background: #1a1918; color: #f5f1e8; border-radius: 3mm; padding: 6mm 7mm; display: grid; grid-template-columns: 1.1fr 1fr; gap: 6mm; align-items: center; position: relative; overflow: hidden; }
.folha .investimento::after { content: ""; position: absolute; right: -8mm; top: -6mm; width: 22mm; height: 60mm; background: #f27a1a; transform: skewX(-18deg); opacity: 0.95; }
.folha .investimento > * { position: relative; z-index: 1; }
.folha .valor-doc { font-family: var(--f-display); font-stretch: 78%; font-weight: 900; font-size: 34pt; line-height: 1; color: #f27a1a; }
.folha .valor-doc small { font-size: 12pt; color: #f5f1e8; font-weight: 700; }
.folha .investimento dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 1.5mm 4mm; font-size: 9pt; padding-right: 18mm; }
.folha .investimento dt { color: #c3bbad; }
.folha .investimento dd { margin: 0; font-weight: 700; }
.folha .assinatura { margin-top: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 14mm; padding-top: 8mm; }
.folha .assinatura div { border-top: 0.3mm solid #1a1918; padding-top: 2mm; font-size: 8.8pt; }
.folha .caixa { border: 0.3mm solid #e7e2d7; border-radius: 2.5mm; padding: 4mm 5mm; }
.folha .duas { display: grid; grid-template-columns: 1fr 1fr; gap: 6mm; }
.folha .tres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4mm; }
.folha .grande-num { font-family: var(--f-display); font-stretch: 78%; font-weight: 900; font-size: 22pt; line-height: 1; }
.folha table { width: 100%; border-collapse: collapse; font-size: 9pt; }
.folha th { text-align: left; font-size: 7pt; letter-spacing: 0.12em; text-transform: uppercase; color: #6e685e; padding: 1.5mm 2mm; border-bottom: 0.4mm solid #1a1918; }
.folha td { padding: 1.6mm 2mm; border-bottom: 0.2mm solid #e7e2d7; font-variant-numeric: tabular-nums; }
.folha td.n, .folha th.n { text-align: right; }
.folha .grafico .dica { display: none; }
.folha .nota-rodape { font-size: 7.8pt; color: #6e685e; }

@media print {
  html, body { background: #fff !important; height: auto; }
  body > *:not(.doc-visor) { display: none !important; }
  body::before { display: none !important; }
  .doc-visor { position: static; background: #fff; overflow: visible; display: block; }
  .doc-barra, .doc-ajuda { display: none !important; }
  .doc-folhas { padding: 0; gap: 0; display: block; }
  .doc-escala { transform: none !important; height: auto !important; }
  .folha { box-shadow: none; break-after: page; page-break-after: always; }
  .folha:last-child { break-after: auto; page-break-after: auto; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
