/* Fernando Kylas Brand System. print.css
   Rules only: the reasoning is in the repository, at lab/publication-engine/platform/design-system/css/print.css.
   Nothing else is altered. No value, selector or declaration differs
   from source. See publications/brand-system/build/assemble.py. */
@page {
  size: A4;
  margin: 20mm 20mm 18mm 20mm;
}

@page :first {
  margin-top: 24mm;
}

@media print {

  :root,
  :root[data-theme="dark"],
  [data-theme="dark"] {
    --fk-surface:        #ffffff;
    --fk-surface-raised: #fbfbfa;
    --fk-surface-accent: #eef2ec;
    --fk-text-primary:   #0A0A0A;
    --fk-text-secondary: #3d3d3d;
    --fk-text-tertiary:  #565656;
    --fk-border:         #d7d6db;
    --fk-border-strong:  #4A4A4A;
    --fk-accent:         #869F75;
    --fk-accent-ink:     #0A0A0A;

    --fk-body-size:        10.5pt;
    --fk-body-l-size:      11.5pt;
    --fk-lead-size:        13pt;
    --fk-body-s-size:      9.5pt;
    --fk-caption-size:     8.5pt;
    --fk-footnote-size:    8pt;
    --fk-label-size:       8pt;

    --fk-display-size:        34pt;
    --fk-report-title-size:   28pt;
    --fk-section-title-size:  20pt;
    --fk-subsection-size:     13pt;
    --fk-card-title-size:     12pt;
    --fk-quote-size:          16pt;
    --fk-metric-size:         26pt;
    --fk-metric-lg-size:      34pt;
  }

  html { font-size: 12pt; }

  body {
    background: #ffffff;
    color: var(--fk-text-primary);
  }

  *, *::before, *::after {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    box-shadow: none !important;
  }

  .fk-topbar,
  .fk-skip-link,
  .fk-no-print,
  .fk-btn,
  .fk-themetoggle,
  [data-back-top] { display: none !important; }
  .fk-print-only { display: revert !important; }

  .fk-toc__item { grid-template-columns: 2.5rem minmax(0, 1fr) auto; }
  .fk-toc__page { display: block; text-align: right; }

  .fk-pubfooter { display: none; }
  .fk-colophon { break-before: auto; max-width: none; }

  .fk-report {
    max-width: none;
    margin: 0;
    padding: 0;
  }

  p, li, dd, figcaption,
  .fk-body, .fk-body-l, .fk-lead,
  .fk-prose, .fk-flow, .fk-callout, .fk-note {
    max-width: 68ch;
  }

  .fk-section, .fk-cover, .fk-contents, .fk-part,
  .fk-split, .fk-duo, .fk-grid, .fk-table-wrap, .fk-summary { max-width: none; }

  .fk-toc__item, .fk-references > li, .fk-footnotes > li,
  .fk-pubfooter__nav li { max-width: none; }

  .fk-split, .fk-duo { grid-template-columns: 1fr; }
  .fk-split__aside { padding-left: 0; border-left: 0; padding-top: var(--fk-space-5); border-top: var(--fk-hairline); }

  .fk-cover { break-after: page; min-height: 0; }
  .fk-contents,
  .fk-section,
  .fk-part,
  .fk-closing { break-before: page; }

  .fk-cover + * { break-before: auto; }

  .fk-part + .fk-section { break-before: auto; }

  h1, h2, h3, h4,
  .fk-section-title, .fk-subsection-title, .fk-card-title,
  .fk-section__head { break-after: avoid; }

  .fk-finding, .fk-blocker, .fk-callout, .fk-insight, .fk-summary,
  .fk-kpi, .fk-score, .fk-rec, .fk-evidence, .fk-pullquote,
  .fk-phase__head, figure, .fk-figure, blockquote, .fk-compare,
  .fk-bars__row, .fk-meter, .fk-def > div,

  .fk-scoreline, .fk-threshold, .fk-check, .fk-estimate,
  .fk-perspective, .fk-signal, .fk-masthead {
    break-inside: avoid;
  }

  .fk-phase, .fk-timeline, .fk-table-wrap { break-inside: auto; }

  p { orphans: 3; widows: 3; }

  .fk-table-wrap,
  .fk-scroll-x { overflow: visible; padding-block-end: 0; }
  .fk-table thead { display: table-header-group; }
  .fk-table tfoot { display: table-footer-group; }
  .fk-table tr, tr { break-inside: avoid; }
  .fk-table :is(th, td) { padding: 4pt 6pt; }
  .fk-table--wide { font-size: 8.5pt; }

  details { display: block; }
  details::details-content { content-visibility: visible !important; block-size: auto !important; }
  details > *:not(summary) { display: block !important; }
  summary { list-style: none; }
  summary::-webkit-details-marker { display: none; }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    color: var(--fk-text-tertiary);
    word-break: break-all;
  }
  a[href^="#"]::after,
  a[href^="mailto"]::after { content: none; }

  .fk-report-footer { display: none; }
  .fk-running-footer {
    display: block;
    margin-top: var(--fk-space-6);
    padding-top: var(--fk-space-3);
    border-top: 1px solid var(--fk-border);
    font-size: 8pt;
    color: var(--fk-text-tertiary);
  }

  @page {
    @bottom-right {
      content: counter(page) " / " counter(pages);
      font-family: "Geomanist", sans-serif;
      font-size: 8pt;
      color: #565656;
    }
  }
}
