/* ==========================================================================
   Print styles — Scrimgeour & Company
   --------------------------------------------------------------------------
   Clients print two pages in particular: the filing deadlines and the
   personal tax checklist. Both need to come out clean, on white, with the
   firm's contact details on the page and no navigation furniture.
   ========================================================================== */

@media print {

  /* --- Page setup --- */
  @page {
    margin: 16mm 14mm;
  }

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

  /* --- Strip site furniture --- */
  .site-header,
  .site-footer,
  .skip-link,
  .nav,
  .filter,
  .chips,
  .route__go,
  .hero,
  .hero__mark,
  .map,          /* an iframe prints as a blank box — the written address stays */
  .no-print {
    display: none !important;
  }

  main { padding: 0 !important; }
  .wrap, .wrap--mid { width: 100% !important; max-width: none !important; }

  /* v2 bands: collapse the generous screen rhythm and flatten the grounds.
     Coloured bands would otherwise either waste ink or print as grey blocks
     that make the text on them hard to read. */
  .section, .band {
    padding-block: 0 !important;
    background: #fff !important;
    color: #000 !important;
  }
  .band--navy, .band--navy h2, .band--navy h3, .band--navy h4,
  .band--navy .eyebrow, .band--navy .lede, .band--navy a,
  .band--navy .facts dt, .band--navy .section-head__num {
    background: #fff !important;
    color: #000 !important;
  }
  .band + .band { margin-top: 14pt; }

  /* The split layout must not stay side-by-side on paper. */
  .split { display: block !important; }
  .split__aside { position: static !important; margin-bottom: 8pt; }

  .section-head__num { color: #000 !important; font-size: 11pt; }
  .section-head { margin-bottom: 10pt !important; }
  .section-head__line { border-top: 1pt solid #000; margin-top: 8pt; }

  .page-head { border-bottom: 1pt solid #000; padding-top: 0; padding-bottom: 8pt; }

  /* --- Print-only masthead ---
     Add <div class="print-head"> ... </div> at the top of a printable page.
     It is hidden on screen and appears only on paper, so the printout is
     identifiably the firm's. */
  .print-head {
    display: block !important;
    border-bottom: 2pt solid #000;
    padding-bottom: 6pt;
    margin-bottom: 14pt;
  }
  .print-head__name {
    font-family: Georgia, serif;
    font-size: 15pt;
    font-weight: 700;
    margin: 0 0 2pt;
  }
  .print-head__meta { font-size: 9pt; margin: 0; }

  /* --- Typography --- */
  h1 { font-size: 20pt; }
  h2 { font-size: 14pt; margin-top: 16pt; }
  h3 { font-size: 12pt; margin-top: 12pt; }
  h1, h2, h3, h4, caption { break-after: avoid; page-break-after: avoid; }
  p, li, tr { orphans: 3; widows: 3; }
  .lede { font-size: 11pt; color: #000 !important; }

  /* --- Show destinations for real links, but not for anchors or
         javascript/mailto noise --- */
  a { text-decoration: underline; color: #000 !important; }
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 8.5pt;
    word-break: break-all;
  }
  a[href^="#"]::after,
  a[href^="mailto"]::after,
  a[href^="tel"]::after,
  .brand::after { content: ""; }
  .ext::after { content: ""; }

  /* --- Components on paper --- */
  .card, .person, .callout, .outbound, .route {
    border: 0.75pt solid #666 !important;
    background: #fff !important;
    break-inside: avoid;
    page-break-inside: avoid;
    padding: 8pt;
  }
  .person { border-left-width: 2.5pt !important; }
  .person--todo { display: none !important; }  /* never print unconfirmed staff */

  .people-list, .grid { display: block !important; }
  .people-list > li, .grid > * { margin-bottom: 8pt; }

  .people-group__head { border-bottom: 1.5pt solid #000; }

  /* --- Deadline table ---
     Fixed layout so the Deadline column lines up across all four tables.
     Without this each table sizes independently and the printed page looks
     ragged. */
  .table-scroll { overflow: visible !important; }
  .dates { break-inside: auto; table-layout: fixed; }
  .dates th:first-child, .dates td:first-child { width: 68%; }
  .dates td:last-child { white-space: normal; }
  .dates thead { display: table-header-group; }  /* repeat header across pages */
  .dates tr { break-inside: avoid; }
  .dates th, .dates td { border-bottom: 0.5pt solid #999; padding: 4pt 8pt 4pt 0; }
  .dates thead th { border-bottom: 1.5pt solid #000; }

  /* --- Checklist: two columns on paper, with real tick boxes --- */
  .checklist { columns: 2; column-gap: 14mm; }
  .checklist li { break-inside: avoid; padding-left: 16pt; margin-bottom: 5pt; }
  .checklist li::before {
    border: 0.75pt solid #000;
    width: 9pt;
    height: 9pt;
    top: 3pt;
  }
  .service__list { columns: 2; }

  /* Colour accents flatten to black rules */
  .rule { border-top-color: #000; }
  .eyebrow, .person__creds, .facts dt, .who-link { color: #000 !important; }
}
