/* Printing the worksheet preview.
   A4 paper is narrower than 760px, so without these rules the "use a PC"
   notice for small screens replaces the page content when printing.

   On screen the preview splits questions into pages by an estimate. On paper
   the printer decides where pages end, so the questions of one sheet run on
   continuously: the title is printed once, and a new page is forced only
   where the answer sheet starts. */
@media print {
  .skip { display: none !important; }
  body[data-area=teacher] .teacher-pc-notice { display: none !important; }
  body[data-area=teacher] #main { display: block !important; }
  body[data-design-system], body[data-design-system] .layout { background: #fff !important; }
  body[data-design-system] main { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  body[data-design-system] .paper-area { padding: 0 !important; border: 0 !important; background: #fff !important; }
  body[data-design-system] .paper {
    margin: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important;
    box-shadow: none !important; border: 0 !important; max-width: none !important; min-height: 0 !important;
    break-before: auto !important; break-after: auto !important;
  }
  body[data-design-system] .paper + .paper.paper-first { break-before: page !important; }
  .paper-cont .paper-header, .paper-cont .paper-topline { display: none !important; }
  .paper:not(.paper-last) .paper-footer, .paper-page-no { display: none !important; }
  .paper-question { break-inside: avoid; }
}
