/* ═══════════════════════════════════════════════════════════════════
   unit-print.css: printing a 16 strand MYP unit page on A4.
   Linked with media="print" after the page's own styles, so nothing
   here touches the screen. unit-print.js opens every section and
   panel, loads the images and drops the colour theme first; this file
   decides how it sits on paper.

   The aim is the screen layout, smaller: the whole page is scaled down
   through the root font size, photos and tool cards shrink to a margin
   column, formative cards pack three to a row, and each criterion starts
   on a new page.
   ═══════════════════════════════════════════════════════════════════ */

@page { size: A4 portrait; margin: 13mm 14mm 14mm; }

/* Every size on the page is in rem, so this one value scales the lot. */
html { font-size: 12px !important; }
html, body { background: #fff !important; }
body { color: #111418; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

/* ── what paper has no use for ───────────────────────────────── */
.site-header, .site-footer, .curr-toc, .curr-expand-all-btn, .unit-print-btn,
.curr-toolbar-row, .theme-picker-wrap, .topic-page-nav, .case-modal, .case-lightbox,
.curr-chevron, .obj-chevron, .g9-checker, .unit-fcard-cta, .unit-meta a,
.topic-breadcrumb { display: none !important; }

/* ── one column, full width ──────────────────────────────────── */
.curr-page-layout { display: block !important; }
.curr-main, .myp-hero-inner { max-width: none !important; padding: 0 !important; margin: 0 !important; }
.myp-hero { padding: 0 0 4mm !important; background: none !important; border: 0 !important; }
.myp-title { font-size: 2.2rem !important; margin: 0 0 2mm !important; }

/* Sections print open whatever state the screen left them in. */
.curr-body, .obj-body { display: block !important; }
.curr-trigger, .obj-trigger { cursor: default; padding-top: 2mm !important; padding-bottom: 2mm !important; }

/* Each criterion, and the class sequence, starts a fresh page. */
.curr-section.crit-a, .curr-section.crit-b, .curr-section.crit-c, .curr-section.crit-d,
#sequence { break-before: page; }
.curr-trigger, .obj-trigger, .unit-h, h2, h3 { break-after: avoid; }

/* Boxes stay whole where they can. */
.concept-box, .caution-box, .discussion-box, .obj-outcome, .unit-desc,
.unit-fcard, .unit-toolcard, .lesson-list details, .unit-track, figure,
.content-table tr, .unit-facts { break-inside: avoid; }

/* ── photos: a narrow column at the right, not a centrepiece ─── */
.case-photo { width: 46% !important; margin: 2mm auto 3mm !important; }
.case-photo--right { float: right !important; width: 30% !important; margin: 0 0 3mm 4mm !important; }
.case-photo img { max-height: 55mm !important; border-radius: 2mm !important; cursor: default; }
.case-photo--right img { max-height: 42mm !important; }
.case-photo figcaption { font-size: 0.7rem !important; margin-top: 1mm !important; }

/* ── tool cards: a thumbnail beside the text ─────────────────── */
.unit-split { display: grid !important; grid-template-columns: minmax(0, 1fr) 38mm !important; gap: 5mm !important; }
.unit-split > aside { max-width: none !important; }
.g9-split-side { display: flex; flex-direction: column; gap: 3mm; }
.unit-toolcard { transform: none !important; box-shadow: none !important; border-radius: 2mm !important; }
.unit-toolcard-media { aspect-ratio: 4 / 3; }
.unit-toolcard-body { padding: 1.5mm 2mm 2mm !important; }
.unit-toolcard-title { font-size: 0.75rem !important; }

/* ── formative cards: three to a row, tight ──────────────────── */
.unit-fgrid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 2.5mm !important; margin: 3mm 0 !important; }
.unit-fcard { padding: 2mm 2.5mm 2.5mm !important; border-radius: 2mm !important; transform: none !important; box-shadow: none !important; }
.unit-fcard-title { font-size: 0.8rem !important; }
.unit-fcard-desc { font-size: 0.72rem !important; line-height: 1.45 !important; }

/* ── boxes and tables a little tighter ───────────────────────── */
.concept-box, .caution-box, .discussion-box { padding: 2.5mm 3mm !important; margin: 3mm 0 !important; }
.content-table-wrap { overflow: visible !important; }
.content-table { font-size: 0.8rem !important; }
.content-table th, .content-table td { padding: 1.2mm 1.8mm !important; }
.lesson-list details { margin-bottom: 1.5mm !important; }
.lesson-list summary { list-style: none; }
.lesson-list summary::-webkit-details-marker, .lesson-list summary::after { display: none !important; }

/* Links read as text on paper. */
a { color: inherit !important; text-decoration: none !important; }
