/* Print stylesheet: loaded with media="print" on every non-AMP page, so it
   never blocks screen rendering. Articles, service pages and case studies
   print as clean black-on-white documents (no header, floating buttons,
   search panel, share bar or pager), and external links show their URL. */
@page {
  margin: 16mm 14mm;
}

@media print {
  :root,
  [data-theme="dark"] {
    color-scheme: light;
    --surface: #fff;
    --surface-soft: #fff;
    --ink: #000;
    --body: #1a1a1a;
    --muted: #444;
    --line: #bbb;
  }

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

  .skip-link,
  .site-header,
  .floating-actions,
  .search-dialog,
  .article-share,
  .article-pager,
  .article-toc,
  .breadcrumb,
  .contact-section,
  .contact-form,
  .blog-filters,
  .blog-search,
  .pagination,
  .footer-social-links,
  .social-links,
  .hero-canvas,
  canvas,
  [data-theme-toggle],
  [data-nav-toggle],
  script {
    display: none !important;
  }

  /* Flatten the dark hero band so the title prints as plain text. */
  .section-dark,
  .page-intro {
    background: none !important;
    color: #000 !important;
    padding: 0 0 8pt !important;
  }

  .section-dark *,
  .page-intro * {
    color: inherit !important;
  }

  .section {
    padding: 8pt 0 !important;
    background: none !important;
  }

  .container,
  .narrow {
    width: 100% !important;
    max-width: none !important;
    padding-inline: 0 !important;
  }

  /* Scroll-reveal elements start transparent until JS reveals them. */
  .reveal,
  .reveal-scale {
    opacity: 1 !important;
    transform: none !important;
  }

  .page-intro h1,
  .article-body h2,
  .article-body h3 {
    text-align: start !important;
  }

  h1,
  h2,
  h3,
  h4 {
    color: #000 !important;
    break-after: avoid;
    page-break-after: avoid;
  }

  p,
  li,
  blockquote {
    orphans: 3;
    widows: 3;
  }

  img,
  picture,
  figure,
  table,
  pre,
  blockquote,
  .project-card,
  .faq-item {
    break-inside: avoid;
    page-break-inside: avoid;
  }

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

  .article-hero {
    max-height: 90mm;
    overflow: hidden;
  }

  pre,
  code {
    background: #f3f3f3 !important;
    color: #000 !important;
    border: 1px solid #ccc;
    white-space: pre-wrap !important;
    word-break: break-word;
  }

  * {
    box-shadow: none !important;
    text-shadow: none !important;
    animation: none !important;
    transition: none !important;
  }

  a,
  a:visited {
    color: #000 !important;
    text-decoration: underline;
  }

  /* Show where external links point; internal links keep the page tidy. */
  .article-body a[href^="http"]::after,
  .site-footer a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    font-weight: 400;
    color: #444;
    word-break: break-all;
  }

  /* Footer: keep only the company contact lines. */
  .site-footer {
    background: none !important;
    color: #000 !important;
    border-top: 1px solid #999;
    margin-top: 12pt;
    padding-top: 8pt;
  }

  .site-footer * {
    color: #000 !important;
  }

  .site-footer img {
    display: none !important;
  }
}
