/* Printable worksheet + answer key layout.
   Loaded on worksheet detail pages; only takes effect during printing
   (media="print") or when body carries a .print-preview class for
   on-screen preview. */

.printable-sheet { display: none; }

@media print {
  .site-header, .site-footer, .no-print, .breadcrumbs, .related-worksheets,
  .detail-actions, .newsletter, nav, .quiz-footer { display: none !important; }

  body { background: #fff; color: #000; font-size: 12pt; }
  .container { max-width: 100%; padding: 0; }
  section { padding: 0; }

  .printable-sheet { display: block; }
  .printable-sheet .sheet-header {
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 3px solid #000; padding-bottom: 10px; margin-bottom: 16px;
  }
  .printable-sheet .sheet-header .brand { font-weight: 800; font-size: 16pt; }
  .printable-sheet h1 { font-size: 18pt; margin-bottom: 4px; }
  .printable-sheet .sheet-meta { font-size: 10pt; color: #333; margin-bottom: 14px; }
  .printable-sheet ol.sheet-questions { padding-left: 1.4em; }
  .printable-sheet ol.sheet-questions li { margin-bottom: 14px; break-inside: avoid; }
  .printable-sheet .sheet-options { list-style: upper-alpha; padding-left: 1.4em; margin-top: 6px; }
  .printable-sheet .answer-line { border-bottom: 1px solid #000; display: inline-block; min-width: 160px; }
  .printable-sheet .print-answer-only .answer { font-weight: 700; }
  .printable-sheet .print-answer-only .explain { color: #333; font-size: 10pt; }
  .printable-sheet .sheet-footer { margin-top: 24px; font-size: 9pt; color: #555; text-align: center; }

  /* Only show the answer lines when the answer-key print mode is active;
     the plain worksheet mode (default) hides them so students get a clean
     printable sheet. */
  body:not([data-print-mode="answers"]) .printable-sheet .print-answer-only { display: none; }
  body[data-print-mode="answers"] .printable-sheet .answer-line { display: none; }
}
