/* ============================================================
   Handbook PMBM SIFA — Print / Save as PDF
   ============================================================ */

@media print {
  @page { margin: 16mm 14mm; }

  html { scroll-behavior: auto; }

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

  .site-header,
  .sidebar,
  .nav-overlay,
  .reading-progress,
  .search-modal,
  .to-top,
  .toast,
  .toc,
  .pager,
  .anchor-copy,
  .skip-link,
  .checklist-bar,
  .btn-row,
  .cta,
  .hero__meta { display: none !important; }

  .shell { display: block; max-width: none; padding: 0; }
  .main { padding: 0; }
  .page-grid { display: block; }

  h1, h2, h3 { color: #000; break-after: avoid-page; page-break-after: avoid; }
  h1 { font-size: 20pt; }
  h2 { font-size: 15pt; margin-top: 14pt; }
  h3 { font-size: 12.5pt; }

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

  .hero {
    background: #fff !important;
    color: #000;
    border: 1.5pt solid #14513F;
    border-radius: 0;
    padding: 12pt;
    box-shadow: none;
  }
  .hero h1, .hero__series, .hero__kicker, .hero__tagline, .hero__sub { color: #000 !important; }

  .card, .navcard, .fact, .statuscard, .cost, .datagroup, .acc, .linklist a, .contact div {
    border: 0.6pt solid #B9BDB8 !important;
    box-shadow: none !important;
    background: #fff !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Kartu langkah boleh terpotong antar halaman agar tidak menyisakan ruang kosong,
     tetapi kepala kartu tidak boleh terpisah dari isinya. */
  .step {
    border: 0.6pt solid #B9BDB8 !important;
    box-shadow: none !important;
    background: #fff !important;
    break-inside: auto;
  }
  .step__head { background: #F2F2EF !important; break-after: avoid; page-break-after: avoid; }
  .step__result, .actions > li { break-inside: avoid; page-break-inside: avoid; }

  .btn, .icon-btn {
    background: transparent !important;
    color: #000 !important;
    border: 0.6pt solid #7A7F7B !important;
    min-height: 0;
    padding: 2pt 5pt;
    font-size: 10pt;
  }

  .print-masthead {
    display: flex !important;
    flex-direction: column;
    gap: 2pt;
    border-bottom: 1pt solid #14513F;
    padding-bottom: 6pt;
    margin-bottom: 12pt;
    font-size: 9.5pt;
  }
  .print-masthead strong { font-size: 11pt; }
  .print-masthead span { color: #444; }
  .step__num { background: #14513F !important; color: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  .callout {
    border: 0.6pt solid #7A7F7B !important;
    border-left: 3pt solid #14513F !important;
    background: #F7F7F4 !important;
    break-inside: avoid;
  }

  .schedule { background: #fff !important; color: #000 !important; border: 0.6pt solid #B9BDB8; }
  .schedule__label, .schedule__value { color: #000 !important; }

  table.rt { border: 0.6pt solid #B9BDB8; font-size: 10pt; break-inside: auto; }
  table.rt thead { display: table-header-group; background: #F2F2EF !important; }
  table.rt tr { break-inside: avoid; page-break-inside: avoid; }
  table.rt th, table.rt td { border-bottom: 0.5pt solid #D5D8D3; }

  .acc[open] > summary, .acc > summary { color: #000; }
  .acc:not([open]) .acc__body { display: block !important; }

  a { color: #000; text-decoration: underline; }
  main a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 8.5pt;
    color: #444;
    word-break: break-all;
  }
  .breadcrumb a::after, .navcard a::after { content: ""; }

  .site-footer {
    background: #fff !important;
    color: #000;
    border-top: 1pt solid #14513F;
    margin-top: 14pt;
    padding: 10pt 0 0;
  }
  .site-footer a, .site-footer h2, .site-footer h3, .site-footer__brand,
  .site-footer__tag, .site-footer__title, .site-footer__legal { color: #000 !important; }

  .print-only { display: block !important; }
}

.print-only { display: none; }
