/**
 * PDF export layout — only active when body.pdf-export is set (generate-pdfs.mjs).
 * Screen layout is unchanged; Playwright PDF capture uses these rules instead of relying on @media print alone.
 * Typography: Outfit + DM Sans only (no system-ui / generic sans fallbacks).
 */

@font-face {
  font-family: 'Outfit';
  font-weight: 400;
  font-style: normal;
  font-display: block;
  src: url('/assets/fonts/outfit-latin-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Outfit';
  font-weight: 600;
  font-style: normal;
  font-display: block;
  src: url('/assets/fonts/outfit-latin-600.woff2') format('woff2');
}

@font-face {
  font-family: 'Outfit';
  font-weight: 700;
  font-style: normal;
  font-display: block;
  src: url('/assets/fonts/outfit-latin-700.woff2') format('woff2');
}

@font-face {
  font-family: 'DM Sans';
  font-weight: 400;
  font-style: normal;
  font-display: block;
  unicode-range: U+0020-007F, U+00A9, U+00B7, U+2013, U+2014, U+2018-201D;
  src: url('/assets/fonts/dm-sans-latin-400.woff2') format('woff2');
}

@font-face {
  font-family: 'DM Sans';
  font-weight: 500;
  font-style: normal;
  font-display: block;
  unicode-range: U+0020-007F, U+00A9, U+00B7, U+2013, U+2014, U+2018-201D;
  src: url('/assets/fonts/dm-sans-latin-500.woff2') format('woff2');
}

@font-face {
  font-family: 'DM Sans';
  font-weight: 600;
  font-style: normal;
  font-display: block;
  unicode-range: U+0020-007F, U+00A9, U+00B7, U+2013, U+2014, U+2018-201D;
  src: url('/assets/fonts/dm-sans-latin-600.woff2') format('woff2');
}

body.pdf-export,
body.pdf-export.insights-page,
body.pdf-export.insight-article-page,
body.pdf-export main,
body.pdf-export .section,
body.pdf-export .insight-article-body,
body.pdf-export .insight-article-body .container,
body.pdf-export .insight-article-main,
body.pdf-export .insight-prose {
  background: #fff !important;
  background-image: none !important;
  box-shadow: none !important;
}

/* Hide site chrome (footer is .footer, not .site-footer) */
body.pdf-export .header,
body.pdf-export .site-header,
body.pdf-export #header,
body.pdf-export .footer,
body.pdf-export .site-footer,
body.pdf-export .cookie-banner,
body.pdf-export #cookie-banner,
body.pdf-export .no-print,
body.pdf-export .floating-toc,
body.pdf-export .article-compact-header,
body.pdf-export .insight-article-actions,
body.pdf-export .forward-to-sponsor,
body.pdf-export .insight-article-hero,
body.pdf-export .insight-related,
body.pdf-export .back-to-top,
body.pdf-export .reading-progress,
body.pdf-export .section-divider,
body.pdf-export .heading-copy-link {
  display: none !important;
}

body.pdf-export .insight-article-body {
  padding: 4mm 0 6mm !important;
}

body.pdf-export .article-print-header {
  margin-top: 1mm;
}

body.pdf-export .insight-article-layout {
  display: block !important;
}

body.pdf-export .insight-article-main {
  max-width: 100% !important;
  width: 100% !important;
}

/* Print cover block */
body.pdf-export .article-print-header {
  display: block !important;
  margin: 0 0 1.75rem;
  padding: 0 0 1.1rem;
  border-bottom: 1pt solid #c5cbc7;
  background: #fff !important;
}

body.pdf-export .article-print-header__kicker {
  margin-bottom: 0.35rem;
}

body.pdf-export .article-print-header__title {
  font-family: 'Outfit' !important;
  font-size: 21pt;
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: #1c352d;
  margin: 0.15rem 0 0;
  max-width: none;
}

body.pdf-export .article-print-header__subtitle {
  font-family: 'DM Sans' !important;
  font-size: 11pt;
  font-weight: 600;
  line-height: 1.4;
  color: #3d4a44;
  margin: 0.45rem 0 0;
}

body.pdf-export .article-print-header__byline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.35rem;
  font-family: 'DM Sans' !important;
  font-size: 9.5pt;
  line-height: 1.45;
  color: #5a7268;
  margin: 1.1rem 0 0;
  padding-top: 0.85rem;
  border-top: 0.5pt solid #e5e3d8;
}

body.pdf-export .article-print-header__author {
  font-weight: 600;
  color: #1c352d;
}

body.pdf-export .article-print-header__sep {
  color: #9aa8a1;
}

/* Body typography */
body.pdf-export .insight-prose {
  max-width: 100% !important;
  font-family: 'DM Sans' !important;
  font-size: 10.5pt;
  line-height: 1.5;
  column-count: 1 !important;
  color: #1f2421;
}

body.pdf-export .insight-about-zanor,
body.pdf-export .insight-about-zanor__body,
body.pdf-export .callout-block,
body.pdf-export .pull-quote,
body.pdf-export table {
  font-family: 'DM Sans' !important;
}

body.pdf-export .insight-prose h2,
body.pdf-export .insight-prose h3,
body.pdf-export .insight-prose h4 {
  break-after: avoid;
  page-break-after: avoid;
  color: #1c352d;
  font-family: 'Outfit' !important;
}

body.pdf-export .insight-prose a {
  color: #1c352d;
  text-decoration: none;
}

body.pdf-export .insight-prose > h2#executive-summary + p::first-letter,
body.pdf-export .insight-prose > h2[id='executive-summary'] + p::first-letter {
  float: none;
  margin: 0;
  font-family: 'DM Sans' !important;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
}

/* Printer-friendly blocks — borders, no fills */
body.pdf-export .insight-prose .callout-block,
body.pdf-export .callout-block,
body.pdf-export .callout-block--case,
body.pdf-export .callout-block--industry,
body.pdf-export .callout-block--peer,
body.pdf-export .pull-quote,
body.pdf-export .insight-author-card,
body.pdf-export .maturity-ladder,
body.pdf-export .maturity-ladder__step,
body.pdf-export .capability-diagram {
  background: #fff !important;
  box-shadow: none !important;
  break-inside: avoid;
  page-break-inside: avoid;
}

/* Printable A4 width (~688px) wrongly matched max-width:720px — keep three columns in PDF */
body.pdf-export .capability-diagram__grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 0.5rem 0.65rem !important;
  max-width: 100% !important;
}

body.pdf-export .capability-diagram__col {
  min-width: 0;
  break-inside: avoid;
  page-break-inside: avoid;
}

body.pdf-export .capability-diagram__col-title {
  font-size: 8pt;
  margin-bottom: 0.2rem;
}

body.pdf-export .capability-diagram__col ul {
  font-size: 7.5pt;
  line-height: 1.35;
  padding-left: 0.9rem;
}

body.pdf-export .capability-diagram__chart {
  max-width: 14rem;
  margin: 0 auto 0.65rem;
}

body.pdf-export .insight-prose .callout-block,
body.pdf-export .callout-block {
  margin-left: 0 !important;
  margin-right: 0 !important;
  border: 0.5pt solid #c5cbc7;
  padding: 0.65rem 0.75rem;
}

body.pdf-export .insight-prose .pull-quote {
  border-left: 2pt solid #cc8a24;
  padding-left: 0.75rem;
}

body.pdf-export .insight-prose .table-scroll-wrap {
  overflow: visible !important;
}

body.pdf-export .insight-prose thead th {
  background: #1c352d !important;
  color: #fff !important;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

body.pdf-export .insight-prose tbody td,
body.pdf-export .insight-prose tbody tr:nth-child(even) td,
body.pdf-export .insight-prose tbody tr:nth-child(even) td:first-child,
body.pdf-export .insight-prose table:not(.capability-dimensions__table) tbody td:first-child {
  background: #fff !important;
}

/* Running header/footer are rendered by Playwright (generate-pdfs.mjs), not CSS @page boxes.
   Margin-box suppression is injected in generate-pdfs.mjs during capture to avoid duplicates. */
body.pdf-export .print-running-header,
body.pdf-export .print-page-footer {
  display: none !important;
}

/* Legacy in-body footer (browser print fallback only) */
body.pdf-export .print-page-footer--legacy {
  display: grid !important;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 0 0.75rem;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.35rem 0 0;
  border-top: 0.5pt solid #c5cbc7;
  background: #fff !important;
  font-family: 'DM Sans' !important;
  font-size: 7.5pt;
  line-height: 1.25;
  color: #5a7268;
}

body.pdf-export .print-page-footer__col--brand {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

body.pdf-export .print-page-footer__brand {
  font-family: 'Outfit' !important;
  font-weight: 600;
  font-size: 8pt;
  color: #1c352d;
}

body.pdf-export .print-page-footer__url {
  font-size: 7pt;
  color: #7b8580;
}

body.pdf-export .print-page-footer__col--page {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.25rem;
  white-space: nowrap;
}

body.pdf-export .print-page-footer__page-label {
  font-size: 7pt;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9aa8a1;
}

body.pdf-export .print-page-footer__page-num::before {
  content: counter(page);
  font-weight: 600;
  color: #1c352d;
}

body.pdf-export .print-page-footer__col--meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: baseline;
  gap: 0.15rem 0.3rem;
  text-align: right;
}

body.pdf-export .print-page-footer__sep {
  color: #c5cbc7;
}

/* PDF-only closing block (hidden on web) */
.pdf-only {
  display: none;
}

body.pdf-export .pdf-only {
  display: block !important;
  break-inside: avoid;
  margin-top: 18mm;
}

body.pdf-export .pdf-only .forward-to-sponsor {
  display: none !important;
}

body.pdf-export .pdf-only .insight-about-zanor {
  display: block !important;
}

body.pdf-export figure {
  margin: 0 0 12mm;
}

body.pdf-export figure + h2,
body.pdf-export figcaption + h2 {
  margin-top: 14mm;
}

body.pdf-export h2 {
  break-after: avoid;
}

body.pdf-export p {
  orphans: 3;
  widows: 3;
}
