/* ==========================================================================
   Print stylesheet — Higher Ground
   Optimised for the printable incident cards in Go Dark. Ink-light, high
   contrast, one card per page, fill-in blanks preserved.
   ========================================================================== */
@media print {
  @page { size: letter portrait; margin: 14mm; }

  :root {
    --ink: #ffffff; --ink-raise: #ffffff; --ink-raise-2: #ffffff;
    --text: #000000; --text-dim: #1a1a1a; --text-faint: #333333;
    --paper: #ffffff; --paper-2: #ffffff; --paper-text: #000000; --paper-dim: #333333;
    --paper-line: #999999; --ink-line: #999999; --ink-line-strong: #666666;
    --signal: #000000; --signal-deep: #000000; --amber: #000000; --amber-deep: #000000;
    --shadow: none; --shadow-paper: none;
  }

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

  /* Chrome that should never print */
  .site-header, .site-footer, .nav-toggle, .site-nav,
  .no-print, .hero-media, .print-hide,
  .skip-link, video, iframe { display: none !important; }

  .print-only { display: block !important; }

  main { padding: 0 !important; }
  .section, .section-lg { padding-block: 0 !important; }
  .wrap, .wrap-narrow { width: 100% !important; max-width: none !important; }

  a { color: #000 !important; text-decoration: none !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8.5pt; color: #444; word-break: break-all; }
  a[href^="#"]::after, a[href^="/"]::after, a[href^="./"]::after { content: ""; }

  .card, .note, details.panel {
    background: #fff !important;
    border: 1px solid #999 !important;
    box-shadow: none !important;
    break-inside: avoid;
  }
  details.panel > summary::after { content: "" !important; }
  details.panel[open] > summary::after { content: "" !important; }
  details { display: block !important; }
  details > *:not(summary) { display: block !important; }

  .badge { border: 1px solid #666 !important; color: #000 !important; background: #fff !important; }

  h1, h2, h3, h4 { break-after: avoid; color: #000 !important; }
  p, li, tr { break-inside: avoid; }

  /* ---- Incident cards ---- */
  .print-card {
    break-before: page;
    break-inside: avoid;
    border: 2px solid #000 !important;
    border-radius: 0 !important;
    padding: 8mm !important;
    margin: 0 0 0 0 !important;
    background: #fff !important;
  }
  .print-card:first-of-type { break-before: auto; }
  .print-card h2 { font-size: 17pt; margin-bottom: 2mm; }
  .print-card .card-kicker {
    font-size: 8.5pt; letter-spacing: 0.18em; text-transform: uppercase;
    border-bottom: 1px solid #000; padding-bottom: 2mm; margin-bottom: 4mm; display: block;
  }
  .print-card .checklist li { margin-bottom: 1.5mm; }
  .print-card .check {
    border: 0 !important; background: #fff !important; padding: 0 !important;
    min-height: 0 !important; align-items: flex-start;
  }
  .print-card .check input[type="checkbox"] { display: none !important; }
  .print-card .check::before {
    content: ""; flex: none; width: 4mm; height: 4mm;
    border: 1px solid #000; margin-top: 1.2mm; margin-right: 2.5mm;
  }
  .print-card .fill { display: block; margin: 2.5mm 0; font-size: 10pt; }
  .print-card .fill::after {
    content: ""; display: block; border-bottom: 1px solid #000; height: 5mm;
  }
  .print-card .fill-2::after { height: 11mm; }
  .print-card .footer-rule {
    margin-top: 5mm; padding-top: 2mm; border-top: 1px solid #000;
    font-size: 8.5pt; display: flex; justify-content: space-between; gap: 4mm;
  }
  /* One card must fit on one page, so the cards print tighter than the
     screen layout. Measured against Letter portrait at 14mm margins. */
  .print-card {
    font-size: 9.8pt; line-height: 1.32;
    padding: 6mm !important;
  }
  .print-card h2 { font-size: 14.5pt; margin-bottom: 1.5mm; }
  .print-card .card-kicker { font-size: 7.6pt; padding-bottom: 1.5mm; margin-bottom: 2.5mm; }
  .print-card .phase { margin: 0 0 2mm !important; }
  .print-card .phase-head { margin-bottom: 1mm !important; }
  .print-card .phase-label {
    font-size: 7.6pt !important; letter-spacing: 0.16em;
    padding: 0.6mm 2mm !important; border: 1px solid #000 !important;
    background: #fff !important; color: #000 !important; border-radius: 0 !important;
  }
  .print-card .phase-line { display: none !important; }
  .print-card .checklist { margin: 0 !important; max-width: none !important; }
  .print-card .checklist li,
  .print-card .phase ul li { margin-bottom: 1mm !important; }
  .print-card .check::before { width: 3.4mm; height: 3.4mm; margin-top: 0.9mm; margin-right: 2mm; }
  .print-card .check span { max-width: none; }
  .print-card .fills h3 { font-size: 7.6pt; letter-spacing: 0.16em; text-transform: uppercase; margin: 3mm 0 1mm; }
  .print-card .fill { margin: 1.4mm 0 !important; font-size: 8.6pt; }
  .print-card .fill::after { height: 4mm; }
  .print-card .fill-2::after { height: 6.5mm; }
  .print-card .footer-rule { margin-top: 3mm; padding-top: 1.5mm; font-size: 7.6pt; }

  .print-intro { break-after: page; }
}
