/* The screen keeps the dashboard. Only the report participates in print layout. */
@media print {
  html:has(.biz-analysis-standalone :is(.report-root, .cr-root)),
  body:has(.biz-analysis-standalone :is(.report-root, .cr-root)) {
    display: block !important;
    position: static !important;
    width: 210mm !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  body:has(.biz-analysis-standalone) :has(.report-root, .cr-root) {
    display: contents !important;
  }

  :is(body, body *):has(.biz-analysis-standalone :is(.report-root, .cr-root)) > :not(:has(.report-root, .cr-root)):not(.report-root, .cr-root),
  .biz-analysis-standalone:has(.report-root, .cr-root) > :not(:has(.report-root, .cr-root)):not(.report-root, .cr-root),
  body:has(.biz-analysis-standalone :is(.report-root, .cr-root)) :has(.report-root, .cr-root) > :not(:has(.report-root, .cr-root)):not(.report-root, .cr-root),
  .biz-analysis-standalone :is(.toolbar, .cr-toolbar) {
    display: none !important;
  }

  .biz-analysis-standalone :is(.report-root, .cr-root, .pages, .cr-pages) {
    display: block !important;
    position: static !important;
    width: 210mm !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    transform: none !important;
    zoom: 1 !important;
  }

  .biz-analysis-standalone :is(.pages, .cr-pages) > :is(.a4, .cr-a4) {
    box-sizing: border-box !important;
    width: 210mm !important;
    height: 297mm !important;
    min-height: 0 !important;
    max-height: 297mm !important;
    margin: 0 !important;
    transform: none !important;
    break-inside: avoid-page;
    break-after: auto;
    box-shadow: none !important;
  }

  .biz-analysis-standalone :is(.pages, .cr-pages) > :is(.a4, .cr-a4) ~ :is(.a4, .cr-a4) {
    page-break-before: always;
    break-before: page;
  }
}

@media print {
  /* Keep the two endpoint dates inside the SVG's own viewport. */
  .biz-analysis-standalone .cr-chart g:has(.cr-chart-dot):last-child .cr-chart-label {
    text-anchor: end;
  }
  .biz-analysis-standalone .cr-chart g:has(.cr-chart-dot):not(:last-child) .cr-chart-label {
    text-anchor: start;
  }

  .biz-analysis-standalone .a4-inner:has(.toe-layout-single) {
    padding-block: 10mm;
    gap: 3mm;
  }
  .biz-analysis-standalone .page-body:has(.toe-layout-single) {
    gap: 3mm;
  }
}
