@page {
  margin: 16mm;

  @bottom-right {
    content: counter(page) " / " counter(pages);
    font-size: 9pt;
  }
}

@media print {
  * {
    color: var(--print-ink) !important;
    background: transparent !important;
  }

  body {
    background: var(--print-paper) !important;
    margin: 0;
    font-size: 10.5pt;
    line-height: 1.45;
  }

  .site-header,
  .site-footer,
  .preview-notice,
  .fg-breadcrumb,
  .fg-skip,
  .fg-next,
  .fg-print-tools {
    display: none !important;
  }

  .fg-wrap,
  .fg-guide {
    display: block;
    max-width: none;
    padding: 0;
  }

  .fg-article h1 {
    font-size: 24pt;
    margin: 0 0 10pt;
  }

  .fg-intro {
    font-size: 12pt;
  }

  .fg-glance {
    padding: 10pt;
    margin-bottom: 16pt;
    break-inside: avoid;
  }

  .fg-glance dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8pt 16pt;
    font-size: 10pt;
  }

  .fg-glance dl > div {
    display: grid;
    grid-template-columns: 48pt minmax(0, 1fr);
    gap: 6pt;
  }

  .guide-content > h2 {
    font-size: 16pt;
    margin: 18pt 0 8pt;
  }

  h2, h3, summary {
    break-after: avoid;
  }

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

  .guide-content {
    counter-reset: step;
  }

  .fg-step {
    border: 1pt solid var(--print-ink);
    padding: 12pt 12pt 12pt 34pt;
    break-inside: auto;
  }

  .fg-step::before {
    left: 10pt;
    top: 12pt;
    font-size: 12pt;
  }

  .fg-step > h3, .fg-step > h4 {
    font-size: 13pt;
    margin: 0 0 8pt;
  }

  .fg-step:not(.fg-highlight) > h3::after, .fg-step:not(.fg-highlight) > h4::after {
    content: '';
    display: inline-block;
    width: 11pt;
    height: 11pt;
    border: 1pt solid var(--print-ink);
    margin-left: 10pt;
    vertical-align: middle;
  }

  .fg-step p,
  .fg-step li {
    font-size: 10.5pt;
    margin-bottom: 6pt;
  }

  .fg-step ol {
    list-style: none;
    padding-left: 18pt;
  }

  .fg-step ol > li {
    position: relative;
    margin: 6pt 0;
  }

  .fg-step ol > li::before {
    content: '';
    position: absolute;
    left: -18pt;
    top: 3pt;
    width: 9pt;
    height: 9pt;
    border: 1pt solid var(--print-ink);
  }

  details > * {
    display: block !important;
  }

  details::details-content {
    display: block !important;
    content-visibility: visible !important;
  }

  .wp-block-details {
    break-inside: auto;
    padding: 6pt 0;
  }

  summary {
    min-height: 0 !important;
    padding: 3pt 0 !important;
    font-weight: 600;
  }

  summary::marker {
    content: '';
  }

  a[href]::after {
    content: ' (' attr(href) ')';
    font-size: 8pt;
    overflow-wrap: anywhere;
  }

  a[href^='#']::after {
    content: '';
  }

  .fg-print-record,
  .fg-print-notes {
    display: block;
    font-size: 10pt;
  }

  .fg-print-notes {
    margin-top: 20pt;
    break-inside: avoid;
  }

  .fg-print-notes h2 {
    font-size: 14pt;
  }

  .fg-note-lines {
    height: 22pt;
    border-top: 1pt solid var(--print-ink);
    border-bottom: 1pt solid var(--print-ink);
  }
}

@media print {
  .fg-print-chapter {
    break-before: page;
  }

  .fg-print-chapter > h2 {
    font-size: 22pt;
  }

  .fg-print-chapter .guide-content > h3 {
    font-size: 15pt;
    margin-top: 16pt;
  }

  .fg-book .fg-print-tools {
    display: none !important;
  }
}

@media print {
  .fg-book .fg-print-chapter .fg-print-notes {
    margin-top: 10pt;
    break-before: avoid;
  }

  .fg-book .fg-print-chapter p {
    margin-bottom: 8pt;
  }
}

@media print {
  #emergency .guide-content > ol > li {
    padding-left: 18pt;
    position: relative;
    margin: 8pt 0;
  }

  #emergency .guide-content > ol > li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 3pt;
    width: 9pt;
    height: 9pt;
    border: 1pt solid var(--print-ink);
  }
}

@media print {
  .fg-article > .guide-content,
  .fg-article > .fg-intro,
  .fg-article > .fg-glance {
    display: none !important;
  }

  .fg-print-checklist {
    display: block;
  }

  .fg-checklist-content h3 {
    font-size: 12pt;
    margin: 14pt 0 6pt;
  }

  .fg-checklist-content li {
    font-size: 10pt;
    line-height: 1.3;
    margin: 3pt 0;
    break-inside: avoid;
  }

  .fg-checklist-content li::before {
    width: 9pt;
    height: 9pt;
    top: 3pt;
  }

  .fg-book .fg-print-chapter {
    margin-top: 0;
  }
}

@media print {
  .fg-article > .fg-print-notes {
    margin-top: 6pt;
  }

  .fg-article > .fg-print-notes h2,
  .fg-article > .fg-print-notes .fg-note-lines {
    display: none;
  }
}

@media print {
  .fg-interactive-checklist {
    display: none !important;
  }
}
