/* Print / PDF stylesheet — loaded with media="print", so it never affects the screen.
 *
 * The docs pages double as downloadable whitepapers (the LawNext directory listing
 * links to PDF exports of several of them). Printed as-is they carry the nav, the
 * Resources dropdown, the WhatsApp button, the footer and the floating assistant
 * bubble, which makes the result read as a saved webpage rather than a document.
 * This strips the site chrome and leaves <main>.
 *
 * Regenerate the PDFs with:
 *   chrome --headless --print-to-pdf=out.pdf --no-pdf-header-footer <live URL>
 * The live URL matters — printing a local file skips the absolute /assets paths.
 */

@page {
  size: letter;
  margin: 16mm 15mm 18mm;
}

/* Tailwind's palette is applied as backgrounds on the callout and CTA blocks;
   without this Chrome drops them and the sections lose their boundaries. */
* {
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

body {
  background: #fff !important;
  font-size: 11pt;
  line-height: 1.5;
}

/* Site chrome: nav, footer, mobile menu panel, and every node the assistant
   widget injects at runtime (all of its ids are bra-* prefixed). */
header,
footer,
#mobile-menu,
#mobile-menu-btn,
[id^="bra-"] {
  display: none !important;
}

main {
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* First-page masthead, standing in for the hidden site header so a forwarded
   PDF still says who wrote it. */
main::before {
  content: "Beamreach AI  ·  beamreach.ai  ·  Yura — governed AI agents for law firms";
  display: block;
  font-size: 9.5pt;
  font-weight: 600;
  letter-spacing: .02em;
  color: #2563eb;
  border-bottom: 2px solid #2563eb;
  padding-bottom: 7px;
  margin-bottom: 22px;
}

h1 { font-size: 20pt; }
h2 { font-size: 14pt; }
h3 { font-size: 12pt; }

h1, h2, h3, h4 {
  break-after: avoid;
  page-break-after: avoid;
}

/* Deliberately not <section>: the docs pages wrap most of their body in long
   sections, and asking Chrome to keep one whole leaves half-empty pages. */
figure, img, li, blockquote {
  break-inside: avoid;
  page-break-inside: avoid;
}

/* Tables must stay breakable for the same reason grids do — the comparison
   tables on these pages run longer than a page, and holding one together
   pushes it whole to the next sheet and strands the one before it. Rows are
   the unit that should not split, and the header repeats on each page. */
tr { break-inside: avoid; page-break-inside: avoid; }
thead { display: table-header-group; }
tfoot { display: table-footer-group; }

/* Chrome does not fragment a grid container across printed pages: a long card
   built with .grid stays atomic and jumps whole to the next page, stranding
   half a page of white behind it. Flattening to block flow lets it break. */
.grid {
  display: block !important;
}
/* Not break-inside:avoid on the children — several of these cards run half a
   page on their own, so holding them together just moves the blank space
   rather than removing it. Let them split; the <li> rule keeps individual
   bullets intact, which is the level that actually reads badly when broken. */
.grid > * {
  margin-bottom: 11px;
}

table { width: 100% !important; font-size: 9.5pt; }

img, svg { max-width: 100% !important; height: auto !important; }

/* Screen hover/shadow treatments print as grey mush. */
.shadow-md, .shadow-lg, .shadow-xl { box-shadow: none !important; }

a { text-decoration: none; color: inherit; }
/* Except real outbound references, which are worth keeping legible on paper. */
main a[href^="http"] { color: #2563eb; }
