/* ============================================
   eila26 · Guía App Grip — PDF / print
   Rendered to PDF via Chrome headless:
   chrome --headless --print-to-pdf=Guia-Grip-EILA26.pdf \
          --no-pdf-header-footer file:///.../index.html
   Keeps the dark brand look; removes screen-only chrome.
   ============================================ */

@media print {

  /* Force every background/gradient/color to actually print
     (browsers strip backgrounds by default to save ink). */
  *, *::before, *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Full-bleed: no white page gutters around the dark layout. */
  @page {
    margin: 0;
    size: A4;
  }

  html, body {
    background: var(--navy-deep) !important;
  }

  /* Remove screen-only / non-printable elements. */
  .topnav     { display: none !important; }  /* sticky nav — useless in a PDF */
  .stars      { display: none !important; }  /* star field — keeps text crisp */
  .quickcards { display: none !important; }  /* anchor shortcuts — dead links on paper */

  /* Give content breathing room from the physical page edges. */
  .hero     { padding: 22mm 16mm 16mm !important; }
  .doc      { padding: 14mm 16mm !important; }
  .org      { padding: 16mm 16mm 8mm !important; }
  .colophon { padding: 8mm 16mm 14mm !important; }

  /* --- FAQ: every accordion must be open, or the PDF loses all answers ---
     The actual opening is done by the beforeprint hook at the bottom of
     index.html — CSS alone cannot force a closed <details> open in Chrome.
     The rules below only handle the styling of the forced-open state, plus a
     no-JS fallback for engines that expose ::details-content. */
  .faq details { background: rgba(255,255,255,0.03) !important; border-color: var(--line) !important; }
  .faq details::details-content { content-visibility: visible !important; block-size: auto !important; }
  .faq details .faq__body { display: block !important; }
  .faq summary { padding-right: 1.15rem !important; }
  .faq summary::after { display: none !important; }  /* the +/− toggle means nothing on paper */

  /* Keep atomic blocks from being sliced across a page break. */
  .callout,
  .contact-card,
  .split__col,
  .spotlight,
  .specs li,
  .faq details,
  .steps li,
  .shot,
  .shot--web,
  .shots,
  .table-wrap,
  table.data tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Don't strand a heading at the bottom of a page. */
  .doc-section h2,
  .doc-section h3,
  .checklist__title {
    break-after: avoid;
    page-break-after: avoid;
  }

  /* Content flows continuously (no forced page break per chapter) so we
     don't get half-empty pages; atomic blocks above still stay intact. */

  /* Links: drop the underline glow, keep them readable as text. */
  a { text-decoration: none !important; }
}
