/* ZST CV Builder v9.6 - compact print pagination, all eight layout families. */
@media print {
  @page { size: A4; margin: 0; }
  .zst-cv-sheet {
    min-height: 0 !important;
    height: auto !important;
    break-inside: auto !important;
    page-break-inside: auto !important;
    align-content: start !important;
  }
  /* Header-style designs (layout 3 / 7, e.g. Fresh Green):
     prevent the coloured banner from growing to page height. */
  .zst-cv-sheet.layout-3,
  .zst-cv-sheet.layout-7 { display: flex !important; flex-direction: column !important; }
  .zst-cv-sheet.layout-3 .cv-side,
  .zst-cv-sheet.layout-7 .cv-side {
    flex: 0 0 auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 7mm 11mm !important;
  }
  .zst-cv-sheet.layout-3 .cv-main,
  .zst-cv-sheet.layout-7 .cv-main {
    flex: 0 0 auto !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 8mm 11mm !important;
  }
  .zst-cv-sheet.layout-3 .cv-side h1,
  .zst-cv-sheet.layout-7 .cv-side h1 { margin: 2mm 0 !important; }
  .zst-cv-sheet.layout-3 .cv-side h2,
  .zst-cv-sheet.layout-7 .cv-side h2 { margin: 3mm 0 1.5mm !important; }
  /* Preserve existing sidebars and the geometry of other layouts. */
  .zst-cv-sheet .cv-side, .zst-cv-sheet .cv-main {
    break-inside: auto !important;
    page-break-inside: auto !important;
  }
  .zst-cv-sheet h2 { break-after: avoid !important; }
}
