/* ==========================================================================
   Print styles — Scrimgeour & Company
   --------------------------------------------------------------------------
   Clients print the filing deadlines in particular — it needs 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;
  }

  /* The screen faces are self-hosted webfonts. Printing to PDF would embed
     them in the file for no benefit — print is black-on-white at 11pt, where
     the system faces are indistinguishable and hint better on paper. */
  body, p, li, td, th, dl, dt, dd, .lede {
    font-family: Georgia, "Times New Roman", Times, serif !important;
  }
  h1, h2, h3, h4, caption, .print-head__name {
    font-family: Georgia, "Times New Roman", Times, serif !important;
  }
  /* .person__contact dt was in this list until 2026-08-11. That block came off
     the person cards with BRIEF-v3 item 3 and the rule had nothing to match. */
  .eyebrow, .person__creds, .facts dt, .dates thead th {
    font-family: Arial, Helvetica, sans-serif !important;
  }

  /* --- Strip site furniture --- */
  .site-header,
  .site-footer,
  .skip-link,
  .nav,
  .chips,
  .hero,
  .no-print {
    display: none !important;
  }

  /* --- The map DOES print, as of 2026-08-11 ---
     .map used to be in the strip list above, because an embedded iframe prints
     as a blank grey box. It is a static image now, so that reason is gone and
     the map is genuinely useful on paper: this is the sheet somebody prints
     before driving in, and it carries both the office and the parking pin.
     Constrained so it cannot eat a whole page, and kept off a page break. */
  .map {
    max-width: 11cm;
    border: 0.75pt solid #666 !important;
    break-inside: avoid; page-break-inside: avoid;
  }
  .map img { width: 100%; height: auto; }
  /* ⚠️ The pins are position:absolute over the image. Print engines honour that
     poorly if the image reflows, so they are pinned to the .map box, which is
     sized above and cannot reflow. Do not make .map a flex or grid child here. */
  .map__pin span {
    background: #fff !important;
    color: #000 !important;
    border: 0.5pt solid #000 !important;
  }
  /* ⚠️ ATTRIBUTION MUST PRINT WITH THE IMAGE. ODbL and CARTO both require the
     credit to travel with the map — if the map is on the paper, the credit is
     too. index.html's .map__note carries .no-print in the markup; that is
     overridden here rather than in the HTML, because on the home page the note
     is hidden for layout reasons that only apply on screen. */
  .map__note, .map__note.no-print {
    display: block !important;
    font-size: 8pt;
    color: #000 !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 {
    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 { 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 { content: ""; }
  .ext::after { content: ""; }

  /* --- Components on paper --- */
  /* .person came out of this group on 2026-08-11 — it is no longer a card, so
     printing a box round it would invent an edge the screen does not have. It
     keeps break-inside:avoid below, which is the part that mattered on paper. */
  .card, .callout, .outbound {
    border: 0.75pt solid #666 !important;
    background: #fff !important;
    /* Screen elevation and rounded corners are noise on paper — a printed
       shadow is a grey smear and a 6pt radius just wastes the box edge. */
    box-shadow: none !important;
    border-radius: 0 !important;
    break-inside: avoid;
    page-break-inside: avoid;
    padding: 8pt;
  }
  .btn, .chips a, .map { border-radius: 0 !important; }
  .person { break-inside: avoid; page-break-inside: avoid; }
  /* .filter__btn and .person--todo were listed here. Both classes were removed
     from the site on 2026-08-10 (BRIEF-v3 item 9), so the rules had nothing
     left to match. */

  .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; }

  .service__list { columns: 2; }

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