/* The timeline's Chart view (docs/content/timeline.md#view=chart): A4 landscape sheets drawn by
 * app/src/components/chronology/HistoryChart.jsx. Same approach as memory-verses.css: the sheet is
 * paper in both palettes, and printing hides everything but the sheets. .hc-root exists only while
 * the Chart view is open, so the Timeline and Family tree print as ordinary pages. */

.hc-sheet {
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

@page history-chart {
  size: A4 landscape;
  margin: 0;
}

@media print {
  body:has(.hc-root) :is(.md-header, .md-tabs, .md-sidebar, .md-footer, .md-top, .md-source-file,
    .md-path, .md-content__button, .hc-controls),
  body:has(.hc-root) .md-content__inner > :not(#timeline-root) {
    display: none !important;
  }
  /* The whole body, not only the sheets: Chrome sizes the first page from whatever precedes the
     first named-page box, even when all of it is hidden. */
  body:has(.hc-root) { page: history-chart; }
  body:has(.hc-root) :is(.md-main__inner, .md-content, .md-content__inner, .md-grid) {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
  }
  .hc-sheet-wrap { margin: 0 !important; }
  .hc-sheet {
    width: 297mm !important;
    /* Short of 210 mm so a few px of offset cannot spill a blank page after each sheet. */
    height: 206mm !important;
    box-shadow: none !important;
  }
  .hc-sheet-wrap + .hc-sheet-wrap { break-before: page; }
}
