/* Print-only styles for activity and pack pages (WEB-014), loaded with
   media="print" so they never block the screen render (WEB-074). The page's
   own CSS keeps the small print rules that sit beside each feature. */

/* ---------- Print: one Activity Card on one A4 or US Letter sheet (WEB-014) ----------
   Two text columns below the title; the back-of-card page break is gone. Checked by
   scripts/check-print.mjs. */
@media print {
  @page {
    margin: 6mm 9mm;
  }
  .activity-layout {
    display: block !important;
  }
  .activity-aside,
  .activity-about,
  .activity-next {
    display: none !important;
  }
  /* WEB-014: body text 12 pt for older readers; headings scale with it. */
  .activity {
    font-size: 12pt;
    line-height: 1.25;
  }
  .activity-head {
    padding: 0 0 2mm;
  }
  .activity-head h1 {
    font-size: 22pt;
    margin: 0 0 0.5mm;
  }
  .activity-head__summary,
  .activity-glance {
    font-size: 12pt;
    margin-bottom: 0.5mm;
  }
  .activity-materials {
    display: none;
  }
  /* DESIGN.md §8: the back of the card starts with "Make it easier or different". */
  .activity-main .activity-adapt {
    break-before: page;
  }
  /* One column, so the page break before the back side always applies. */
  .activity-main {
    columns: auto;
  }
  .activity-main section {
    margin-bottom: 1mm;
    break-inside: avoid;
  }
  .activity-main h2 {
    font-size: 14pt;
    margin: 0 0 0.5mm;
  }
  .activity-main h3 {
    font-size: 12pt;
    margin: 0.8mm 0 0.3mm;
  }
  /* The "need" section's own heading rule (studio-activity.css) is more specific; match it here. */
  .activity-page .activity-main .activity-need h3 {
    margin: 0.8mm 0 0.3mm;
  }
  .activity-main p,
  .activity-main li {
    margin-block: 0;
  }
  .activity-list li + li {
    margin-top: 0;
  }
  .activity-steps {
    gap: 0.6mm;
  }
  .activity-steps li {
    grid-template-columns: 7mm 1fr;
    gap: 2mm;
    padding: 0;
    border: 0;
    background: none;
    break-inside: avoid;
  }
  .activity-steps li::before {
    width: 6mm;
    height: 6mm;
    font-size: 10pt;
    background: none;
    border: 1.5pt solid #000;
  }
  /* Two sides (DESIGN.md › Activity Cards): need and do on the front, adapt and safety on the back. */
  .activity-variations {
    grid-template-columns: 1fr 1fr;
    gap: 1.5mm;
  }
  .activity-variations div {
    break-inside: avoid;
  }
  .activity-stop,
  .activity-safety,
  .activity-variations div {
    background: none !important;
    border: 1pt solid #000 !important;
    padding: 1.5mm 2.5mm;
  }
  .activity-byline {
    font-size: 7.5pt;
    line-height: 1.3;
  }
  .activity-byline p {
    margin: 0;
  }
  .print-qr {
    display: flex !important;
    align-items: center;
    gap: 3mm;
    margin-top: 1.5mm;
    break-inside: avoid;
  }
  .print-qr svg {
    flex: none;
    width: 16mm;
    height: 16mm;
  }
  .print-qr p {
    margin: 0;
    font-size: 8pt;
  }
  /* WEB-016: the back of each printed card says which version it is and where the live card is. */
  .print-version {
    margin: 1.5mm 0 0;
    font-size: 8pt;
  }
  .pack-card {
    break-before: page;
    border-top: 0;
    padding-top: 0;
    margin: 0;
  }
  .pack-supplies {
    grid-template-columns: 1fr 1fr;
    gap: 2mm 6mm;
  }
  .pack-supplies h3 {
    font-size: 12pt;
    margin: 0 0 1mm;
  }
  .pack-checklist li {
    font-size: 11pt;
  }
  .pack-checklist li + li {
    margin-top: 0.5mm;
  }
  .pack-cover h2 {
    font-size: 15pt;
    margin: 4mm 0 1mm;
  }
  /* One sheet per card: smaller type than a single card, still 12pt. */
  .pack {
    font-size: 12pt;
    line-height: 1.35;
  }
  .pack h1 {
    font-size: 22pt;
  }
  .pack-card h2 {
    font-size: 18pt;
    margin: 0 0 1mm;
  }
  .pack-card h3 {
    font-size: 13pt;
    margin: 3mm 0 1mm;
  }
  .pack-card p,
  .pack-card li {
    margin-block: 0.5mm;
  }
  .pack-card .eyebrow,
  .pack-card .activity-glance {
    font-size: 11pt;
    margin-bottom: 1mm;
  }
  .pack-card .activity-steps {
    gap: 1mm;
  }
  .pack-card .activity-steps li {
    grid-template-columns: 7mm 1fr;
    gap: 2mm;
  }
  .pack-card .activity-steps li::before {
    width: 6mm;
    height: 6mm;
    font-size: 10pt;
  }
  .pack-card .activity-stop {
    padding: 2mm 3mm;
    margin-top: 3mm;
  }
  .pack-card__columns {
    grid-template-columns: 1fr 1fr;
  }
  .pack-card h2 a {
    text-decoration: none;
  }
  .activity-byline {
    font-size: 10pt;
    padding: 0;
  }
}

/* Print rules that sit beside individual features, kept in their original order. */
/* Print: a small preview image, so the card stays one sheet, two sides. */
@media print {
  .activity-figure {
    break-inside: avoid;
  }
  /* The drawing sits beside the steps, not above them, so text stays 12 pt. */
  .activity-figure {
    float: inline-end;
    width: 30mm;
    margin: 0 0 1.5mm 4mm;
  }
  .activity-figure img {
    max-height: 30mm;
    width: 100%;
    height: auto;
  }
  .activity-figure figcaption {
    font-size: 9pt;
  }
  /* Our own drawings: the credit stays on the web page; the card's source line covers print. */
  .activity-figure__credit {
    display: none;
  }
  /* The stop note never runs under the drawing. */
  .activity-stop {
    clear: both;
  }
}

@media print {
  .activity-figure--materials {
    display: none;
  }
}

/* The back of the card stays one side: the changelog list is web-only (the
   printed footer carries the version line, WEB-016), and the crisis note keeps
   its words and numbers in a compact box. */
@media print {
  .activity-changes__list,
  .activity-changes__note,
  .activity-changes h2 {
    display: none;
  }
  .crisis-route {
    margin: 1.5mm 0;
    padding: 1.5mm 2.5mm;
    border: 1px solid #000;
    border-radius: 0;
    box-shadow: none;
    background: none;
    font-size: 10pt;
    line-height: 1.3;
    break-inside: avoid;
  }
  .crisis-route h2,
  .crisis-route h3 {
    font-size: 11pt;
    margin: 0 0 0.5mm;
  }
  .crisis-route ul {
    margin: 0.5mm 0;
  }
  .crisis-route .muted {
    display: none;
  }
}
