/* Article-only stylesheet, enqueued with media=print. Screen layouts remain unchanged. */
@media print {
  @page { margin: 14mm; }
  /* Search and consent widgets can be siblings of body rather than descendants. */
  html:has(body.single-post) :is(.voice-search__icon, .voice-search__overlay, .grecaptcha-badge,
    #cmpbox, #cmpbox2, #cmpboxrecall, .cmpboxrecall,
    #qc-cmp2-container, #qc-cmp2-ui, .qc-cmp2-container,
    #qc-cmp2-persistent-link, .qc-cmp2-persistent-link,
    #onesignal-bell-container, .onesignal-bell-container,
    #onesignal-slidedown-container, .onesignal-slidedown-container) { display: none !important; }
  html:has(body.single-post) { margin-top: 0 !important; }
  body.single-post {
    margin: 0 !important; padding: 0 !important; background: #fff !important; color: #000 !important;
    font: 11pt/1.45 Georgia, "Times New Roman", serif !important;
  }
  body.single-post :is(#wpadminbar, .wp-site-blocks > header, .wp-site-blocks > footer,
    .vn-header, .vn-navigation, .vn-ticker, #voice-header, .voice-header, .wp-block-navigation,
    .voice-header-search-backdrop, .voice-header-mobile-menu,
    .vn-design[data-vn-part="header"], .vn-design[data-vn-part="navigation"],
    .vn-design[data-vn-part="ticker"], .vn-design[data-vn-part="footer"],
    .vn-native-post-main .vn-native-sidebar-column,
    .vn-design[data-vn-part="article"] #main > aside.adx,
    .vn-article-ad-position, .vn-article-ad-placeholder, .voice-ads-placement, .vn-ad-slot,
    .vn-reference-share, .vn-share, .vn-print, .vn-related, .vn-article-viber,
    [data-vn-article-viber], .vn-google-source,
    #cmpbox, #cmpbox2, .cmpbox, .cmpboxrecall, #qc-cmp2-container, #qc-cmp2-ui,
    .qc-cmp2-container, .fc-consent-root, #onetrust-consent-sdk, #CybotCookiebotDialog, #didomi-host) {
    display: none !important;
  }
  body.single-post .vn-design:is([data-vn-part="article"], [data-vn-part="article-content"])
    article > section:has(> .g3 > article[data-vn-slot^="related:"]) { display: none !important; }
  body.single-post .vn-reference-content img[src*="our-viber-1"] { display: none !important; }

  /* Flatten both the native Columns wrapper and the preserved legacy article flex layout. */
  body.single-post :is(.wp-site-blocks, .vn-native-post-main, .vn-post-columns,
    .vn-native-main-column, .vn-design[data-vn-part="article"],
    .vn-design[data-vn-part="article-content"], main#main, main#main > article,
    .vn-design[data-vn-part="article-content"] > article, .vn-reference-content) {
    display: block !important; position: static !important; float: none !important;
    width: 100% !important; min-width: 0 !important; max-width: none !important;
    height: auto !important; min-height: 0 !important; max-height: none !important;
    margin: 0 !important; padding: 0 !important; gap: 0 !important;
    overflow: visible !important; background: #fff !important; box-shadow: none !important;
    break-inside: auto !important; page-break-inside: auto !important;
  }
  body.single-post .vn-reference-content,
  body.single-post .vn-reference-content :is(p, li, blockquote, td, th, figcaption) {
    color: #000 !important; font-size: 11pt !important; line-height: 1.45 !important;
  }
  body.single-post .vn-reference-content :is(p, ul, ol, blockquote) { margin: 0 0 3.5mm !important; }
  body.single-post .vn-reference-content :is(p, li) { orphans: 3; widows: 3; }
  body.single-post :is(h1, h2, h3, h4, h5, h6) {
    color: #000 !important; break-after: avoid-page; page-break-after: avoid;
  }
  body.single-post .vn-design:is([data-vn-part="article"], [data-vn-part="article-content"]) article > h1 {
    margin: 0 0 5mm !important; padding: 0 !important; font-size: 22pt !important; line-height: 1.2 !important;
  }
  body.single-post .vn-reference-content :is(figure, picture) {
    max-width: 100% !important; margin: 3mm 0 !important;
    break-inside: avoid-page; page-break-inside: avoid;
  }
  body.single-post .vn-reference-content img {
    position: static !important; max-width: 100% !important; width: auto !important;
    height: auto !important; max-height: 170mm !important; object-fit: contain !important;
    break-inside: avoid-page; page-break-inside: avoid;
  }
  body.single-post .vn-design:is([data-vn-part="article"], [data-vn-part="article-content"]) article > figure {
    margin: 4mm 0 !important; break-inside: avoid-page; page-break-inside: avoid;
  }
  body.single-post .vn-design:is([data-vn-part="article"], [data-vn-part="article-content"]) article > figure .im {
    position: static !important; aspect-ratio: auto !important; height: auto !important;
    overflow: visible !important; background: transparent !important;
  }
  body.single-post .vn-design:is([data-vn-part="article"], [data-vn-part="article-content"]) article > figure :is(picture, img) {
    position: static !important; inset: auto !important; display: block !important;
    width: auto !important; max-width: 100% !important; height: auto !important;
    max-height: 70mm !important; margin: 0 auto !important; object-fit: contain !important;
  }
  body.single-post .vn-reference-content a { color: #000 !important; text-decoration: underline; overflow-wrap: anywhere; }
  body.single-post .vn-reference-content a::after { content: none !important; }
  body.single-post .vn-reference-content pre { white-space: pre-wrap; overflow-wrap: anywhere; }
}
