/* What comes out of the printer. Loaded with media="print". */

@page{size:letter portrait;margin:0.55in 0.6in}

@media print{

  html,body{background:#fff !important;color:#000 !important;font-size:11.5pt}

  /* app chrome never prints */
  .topbar,.site-foot,.sidebar,.app-foot,.no-print,.sticky-actions,.wizard,.flash,.skip,
  .btn,.btn-row,.filters,.recipe,.panel,.card-head .badge,
  .side,.margin-note,.tape,.sticker,.desk-arrow{display:none !important}
  .cols-side{display:block !important}

  .main,.wrap{padding:0 !important;margin:0 !important;max-width:none !important}
  .shell{display:block !important}
  .shell-main{display:block !important;min-height:0 !important}
  .card,.sheet-frame{
    border:0 !important;border-radius:0 !important;padding:0 !important;
    margin:0 !important;box-shadow:none !important;
  }
  .sheet-frame::before,.sheet-frame::after{display:none !important}

  .sheet{max-width:none;font-size:11.5pt;color:#000}
  .sheet-title{font-size:19pt}
  .sheet-sub{font-size:10.5pt}
  .wq,.wcell,.wchoice{font-size:11.5pt}
  .wsec-title{font-size:12.5pt}

  /* keep questions whole */
  .witem,.wcell,.wsec-title,.wordbank,.wpassage,.wnote,.sheet-head{
    page-break-inside:avoid;break-inside:avoid;
  }
  .wsec-title{page-break-after:avoid;break-after:avoid}
  .page-break{page-break-before:always;break-before:page}

  /* answer key always starts on its own page */
  .answer-key{page-break-before:always;break-before:page}

  /* scroll-reveal sections have never been scrolled past when printing */
  .js-reveal .rv{opacity:1 !important;translate:none !important}

  a{color:#000 !important;text-decoration:none !important}

  /* The theme prints.
     A teacher who picked Ocean should get an ocean sheet on paper, not a
     black one — so the accent colour and the drawn mark both survive. Two
     things make that safe. Every accent in worksheet_themes() is dark enough
     to fall to legible grey on a black-only printer, and the accent only ever
     touches headings and hairlines, never body copy and never a filled panel,
     so it costs a rounding error in toner.

     `print-color-adjust:exact` is what stops a browser helpfully dropping the
     colour on the way to the printer. Everything else on the sheet is already
     black on white and stays that way. */
  .sheet-title,.wsec-title,.wmark{
    -webkit-print-color-adjust:exact;print-color-adjust:exact;
  }
  .wmark{stroke:var(--sheet-accent) !important}
  .wmark-lg{width:20px;height:20px}
  .wmark-sm{width:13px;height:13px}

  .wgrid.cols-3{grid-template-columns:repeat(3,1fr)}
  .wgrid.cols-4{grid-template-columns:repeat(4,1fr)}
  .wgrid.cols-5{grid-template-columns:repeat(5,1fr)}
  .wchoices{grid-template-columns:1fr 1fr}
  .wmatch{grid-template-columns:1fr 1fr}

  .sheet-directions{background:#f2f2f2 !important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
}
