/*
 * WOC 3.0 RC39 — regression repair.
 * One purpose-built tail stylesheet. No reset of Rank Math, accounts, WordPress, Jarvis, APIs.
 * Replaces conflicting legacy image fixed heights, restores article tools and print hierarchy.
 */

/* Native content centered with the editorial masthead. */
main#main-content.woc3-native-content{
 box-sizing:border-box!important;width:100%!important;max-width:1220px!important;
 margin-inline:auto!important;padding-inline:24px!important;
}
.woc3-native-content .woc3-archive,
.woc3-native-content .woc-native-index{
 box-sizing:border-box!important;width:100%!important;max-width:100%!important;
 margin-inline:auto!important;
}
.woc3-native-content .woc3-archive .archive-grid{max-width:100%!important;margin-inline:auto!important;}
@media(max-width:767px){
 main#main-content.woc3-native-content{padding-inline:16px!important;}
}

/* Desktop masthead: consistent newspaper grid, no compressed nav beside overscaled panda. */
@media(min-width:1051px){
 .site-header .utility-row,
 .site-header .masthead-inner{max-width:1172px!important;}
 .site-header .masthead-inner{
   display:grid!important;grid-template-columns:235px minmax(0,1fr)!important;
   gap:27px!important;min-height:128px!important;height:auto!important;
   padding:11px 0 13px!important;align-items:center!important;
 }
 .site-header .masthead-logo{width:235px!important;max-width:235px!important;min-width:0!important;}
 .site-header .masthead-logo img{width:100%!important;max-height:112px!important;object-fit:contain!important;}
 .site-header .main-nav.masthead-navigation{
   width:100%!important;min-width:0!important;display:flex!important;
   flex-direction:column!important;justify-content:center!important;gap:5px!important;
 }
 .site-header .masthead-primary{
   display:flex!important;justify-content:space-between!important;align-items:center!important;
   gap:clamp(8px,1vw,17px)!important;width:100%!important;flex-wrap:nowrap!important;
   min-height:47px!important;
 }
 .site-header .masthead-primary .woc9-entry>a{font-size:clamp(13px,1.13vw,16px)!important;}
 .site-header .woc8-strip{
   width:100%!important;max-width:100%!important;background:transparent!important;
   border-top:1px solid #dddfe2!important;border-bottom:0!important;
   margin:0!important;padding:0!important;box-shadow:none!important;
 }
 .site-header .woc8-strip-inner{max-width:none!important;width:100%!important;min-width:0!important;}
 .site-header .masthead-secondary{
   display:flex!important;align-items:center!important;justify-content:space-between!important;
   gap:clamp(6px,.7vw,12px)!important;flex-wrap:nowrap!important;
 }
 .site-header .woc8-strip .woc9-entry>a{font-size:clamp(10px,.78vw,11.5px)!important;}
 .site-header .woc8-app{font-size:11px!important;white-space:nowrap!important;}
 .site-header .masthead-band{overflow:visible!important;}
 .site-header .woc9-host{z-index:950!important;}
}
@media(min-width:1051px) and (max-width:1240px){
 .site-header .utility-row,.site-header .masthead-inner{margin-inline:24px!important;max-width:calc(100% - 48px)!important;}
 .site-header .masthead-inner{grid-template-columns:208px minmax(0,1fr)!important;gap:21px!important;}
 .site-header .masthead-logo{width:208px!important;max-width:208px!important;}
 .site-header .masthead-primary .woc9-entry>a{font-size:clamp(12px,1vw,14px)!important;}
 .site-header .woc8-app{font-size:10px!important;}
}
/* Match the publisher's clean one-column header on iPhone; no duplicate sticky bar. */
@media(max-width:767px){
 .site-header .masthead-logo img{max-height:64px!important;height:auto!important;}
 .site-header{box-shadow:0 2px 5px rgba(17,22,26,.05)!important;}
}

/* Do not coerce published photographs to 576px / crop their original content.
   Any portrait asset is contained rather than enlarged and cut off. */
.article-page.woc3-article-polished figure.main-media,
.article-page.woc3-article-polished figure.main-media>a{
 width:100%!important;height:auto!important;min-height:0!important;
 max-height:none!important;aspect-ratio:auto!important;
 overflow:visible!important;position:relative!important;
 margin-inline:auto!important;transform:none!important;
}
.article-page.woc3-article-polished figure.main-media>a img.main-img,
.article-page.woc3-article-polished figure.main-media img{
 display:block!important;position:relative!important;
 width:auto!important;max-width:100%!important;min-width:0!important;
 height:auto!important;max-height:min(70vh,760px)!important;min-height:0!important;
 aspect-ratio:auto!important;object-fit:contain!important;object-position:center center!important;
 transform:none!important;float:none!important;margin:0 auto!important;
}
.article-page.woc3-article-polished figure.main-media figcaption{
 display:block!important;position:static!important;
 height:auto!important;min-height:0!important;max-height:none!important;
 font:500 12px/1.5 system-ui,-apple-system,sans-serif!important;
 padding:9px 2px 0!important;margin:0!important;
 white-space:normal!important;overflow-wrap:anywhere!important;
 color:#606673!important;text-align:left!important;
}
@media(min-width:761px){
 .article-page.woc3-article-polished figure.main-media>a img.main-img{
  max-height:min(70vh,710px)!important;
 }
}

/* Action toolbar: real width for full localized "min czytania"; print and share preserved. */
.article-page.woc3-article-polished .article-actions .reading-time{
 display:inline-flex!important;align-items:center!important;width:auto!important;max-width:none!important;
 min-width:max-content!important;height:auto!important;flex:0 0 auto!important;
 white-space:nowrap!important;overflow:visible!important;text-overflow:clip!important;
 font:650 12px/1.3 system-ui,-apple-system,sans-serif!important;
 letter-spacing:0!important;margin:0 auto 0 0!important;
}
@media(min-width:380px) and (max-width:760px){
 .article-page.woc3-article-polished .article-actions{
  display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;
  align-items:center!important;justify-content:space-between!important;
  width:100%!important;max-width:100%!important;min-width:0!important;
  grid-template-columns:none!important;gap:4px!important;margin:7px 0 16px!important;
 }
 .article-page.woc3-article-polished .article-actions .reading-time{
  min-width:94px!important;margin-right:auto!important;font-size:11px!important;
 }
 .article-page.woc3-article-polished .article-actions .share-controls>button,
 .article-page.woc3-article-polished .article-actions [data-article-print]{
  width:36px!important;min-width:36px!important;height:39px!important;min-height:39px!important;
 }
 .article-page.woc3-article-polished .article-actions .font-actions{width:62px!important;flex:0 0 62px!important;height:39px!important}
 .article-page.woc3-article-polished .article-actions .font-actions>button{width:31px!important;min-width:31px!important;flex:0 0 31px!important;height:39px!important;min-height:39px!important;}
 .article-page.woc3-article-polished .article-actions .listen{width:96px!important;min-width:96px!important;height:39px!important;min-height:39px!important;padding:0 4px!important;font-size:11px!important;}
}
@media(max-width:379px){
 .article-page.woc3-article-polished .article-actions{
  display:grid!important;grid-template-columns:minmax(0,1fr) 40px 40px!important;
  grid-template-rows:40px 40px!important;gap:7px!important;align-items:center!important;
  width:100%!important;margin:7px 0 14px!important;
 }
 .article-page.woc3-article-polished .article-actions .reading-time{
  grid-column:1!important;grid-row:1!important;min-width:max-content!important;justify-self:start!important;
 }
 .article-page.woc3-article-polished .article-actions .share-controls{grid-column:2!important;grid-row:1!important}
 .article-page.woc3-article-polished .article-actions [data-article-print]{grid-column:3!important;grid-row:1!important}
 .article-page.woc3-article-polished .article-actions .font-actions{grid-column:1 / 3!important;grid-row:2!important}
 .article-page.woc3-article-polished .article-actions .listen{grid-column:3!important;grid-row:2!important;justify-self:end!important;}
}

/* Branded print edition, with a real byline baseline and consistent text rhythm. */
@media print{
 @page{size:A4 portrait;margin:16mm 17mm 17mm;}
 html,body{font-family:Georgia,"Times New Roman",serif!important;}
 .article-page.woc3-article-polished{width:100%!important;max-width:none!important;min-width:0!important;margin:0!important;padding:0!important;}
 .article-page .woc-print-masthead{border-bottom:1.5pt solid #b21f38!important;padding-bottom:4mm!important;margin-bottom:6mm!important;}
 .article-page .woc-print-masthead img{width:41mm!important;max-height:22mm!important;}
 .article-page.woc3-article-polished .article-head{margin:0 0 2mm!important;padding:0!important;break-inside:avoid!important;}
 .article-page.woc3-article-polished .article-head .kicker{
  margin:0 0 2.5mm!important;font:750 8pt/1.2 Arial,sans-serif!important;
  letter-spacing:1pt!important;color:#a21f38!important;
 }
 .article-page.woc3-article-polished .article-head h1{
  margin:0 0 4.5mm!important;
  font:700 23pt/1.14 Georgia,"Times New Roman",serif!important;
  letter-spacing:-.3pt!important;break-after:avoid!important;
 }
 .article-page.woc3-article-polished .article-head .standfirst{
  display:block!important;margin:0 0 4mm!important;padding:0!important;
  font:400 11pt/1.38 Georgia,serif!important;color:#383c43!important;
 }
 .article-page.woc3-article-polished .article-head .article-meta{
  display:block!important;border-top:1px solid #bfc3c7!important;border-bottom:1px solid #e1e3e5!important;
  margin:0 0 3.5mm!important;padding:2.7mm 0!important;min-height:0!important;
  text-align:left!important;break-inside:avoid!important;
 }
 .article-page.woc3-article-polished .article-head .article-meta .byline{
  display:block!important;position:static!important;width:100%!important;max-width:100%!important;
  margin:0!important;padding:0!important;text-align:left!important;
  font:700 9pt/1.3 Arial,system-ui,sans-serif!important;justify-content:flex-start!important;
 }
 .article-page.woc3-article-polished .article-head .article-meta .byline span{
  display:block!important;margin:0!important;padding:0!important;text-align:left!important;
 }
 .article-page.woc3-article-polished .article-head .article-meta .byline b{
  display:inline!important;font-weight:700!important;
 }
 .article-page.woc3-article-polished .article-head .article-meta .byline small{
  display:inline!important;margin:0 0 0 4mm!important;
  font:400 8pt/1.4 Arial,system-ui,sans-serif!important;color:#5a626a!important;
 }
 .article-page.woc3-article-polished .article-head .article-meta .byline small.updated-label{
  display:block!important;margin:1mm 0 0!important;font-size:7.7pt!important;
 }
 .article-page.woc3-article-polished .article-head .article-actions{display:none!important;}
 .article-page.woc3-article-polished figure.main-media{margin:2mm 0 4mm!important;padding:0!important;max-height:none!important;break-inside:avoid!important;}
 .article-page.woc3-article-polished figure.main-media>a{display:block!important;max-height:none!important;overflow:visible!important;}
 .article-page.woc3-article-polished figure.main-media>a img.main-img{
  width:auto!important;max-width:100%!important;height:auto!important;
  max-height:76mm!important;min-height:0!important;
  aspect-ratio:auto!important;object-fit:contain!important;object-position:left center!important;
  margin:0!important;break-inside:avoid!important;
 }
 .article-page.woc3-article-polished figure.main-media figcaption{
  font:400 7.4pt/1.35 Arial,system-ui,sans-serif!important;color:#555c64!important;
  padding:1.8mm 0 0!important;margin:0!important;
 }
 .article-page.woc3-article-polished .article-body{
  font:400 10.4pt/1.5 Georgia,"Times New Roman",serif!important;overflow:visible!important;
 }
 .article-page.woc3-article-polished .article-body p{
  font:inherit!important;line-height:1.5!important;margin:0 0 3mm!important;
  orphans:3!important;widows:3!important;
 }
 .article-page.woc3-article-polished .article-body h2{
  font:700 15pt/1.16 Georgia,serif!important;margin:5mm 0 2mm!important;break-after:avoid!important;
 }
 .article-page.woc3-article-polished .woc-print-footer{display:block!important;border-top:1pt solid #b21f38!important;margin:5mm 0 0!important;padding:2.5mm 0 0!important;}
 .article-page.woc3-article-polished .woc-print-footer p{font:400 7.2pt/1.4 Arial,sans-serif!important;}
}

/* RC39 native 24h newsroom timeline: no empty archive filler; honest RSS and chronology. */
.woc24-archive .woc24-head{padding-bottom:13px!important;border-bottom:2px solid #1d2530!important;margin-bottom:0!important;}
.woc24-head-actions{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-top:19px;font:650 12px/1.3 system-ui,sans-serif}
.woc24-feed-status{color:#4a505d!important;display:inline-flex;align-items:center;gap:8px;}
.woc24-feed-status>span{color:#bc1a36!important;font-size:12px!important;}
.woc24-rss{display:inline-flex;align-items:center;gap:7px;color:#a71a34!important;text-decoration:underline!important;text-underline-offset:4px!important;white-space:nowrap;}
.woc24-context{max-width:950px!important;margin:16px 0 13px!important;padding:13px 17px!important;border-left:3px solid #ba1d35!important;background:#f8f6f4!important;color:#444c58!important;font:500 14px/1.5 system-ui,sans-serif!important;}
.woc24-stream{display:block!important;max-width:1070px!important;margin:13px 0 0!important;padding:0!important;}
.woc24-story{display:grid!important;grid-template-columns:125px minmax(0,1fr) 25px!important;gap:25px!important;align-items:start!important;border-bottom:1px solid #e1ddd8!important;margin:0!important;padding:17px 0 18px!important;background:transparent!important;box-shadow:none!important;}
.woc24-stamp time{display:block;color:#73757b!important;font:500 12px/1.45 system-ui,sans-serif!important;white-space:nowrap;}
.woc24-stamp strong{display:block;color:#ad1d36!important;font:750 22px/1.2 Georgia,serif!important;margin-top:5px;}
.woc24-category{display:block;color:#ae1f38!important;font:800 10px/1.4 system-ui,sans-serif!important;letter-spacing:.08em;text-transform:uppercase!important;margin:0 0 5px!important;}
.woc24-copy h2{margin:0!important;max-width:70ch!important;font:700 clamp(17px,1.65vw,22px)/1.3 Georgia,serif!important;letter-spacing:-.012em!important;}
.woc24-copy h2 a{color:#1d222a!important;text-decoration:none!important;}
.woc24-copy h2 a:hover{color:#b31d38!important;text-decoration:underline!important;}
.woc24-story-arrow{font-size:21px!important;color:#a8233f!important;align-self:center!important;justify-self:end!important;}
@media(max-width:600px){
 .woc24-head-actions{margin-top:12px;gap:8px;flex-wrap:wrap;}
 .woc24-context{margin:12px 0!important;padding:11px 12px!important;font-size:12.5px!important;}
 .woc24-story{grid-template-columns:78px minmax(0,1fr) 10px!important;gap:10px!important;padding:13px 0 16px!important;}
 .woc24-stamp time{font-size:10.5px!important;}
 .woc24-stamp strong{font-size:18px!important;}
 .woc24-copy h2{font-size:17px!important;line-height:1.3!important;}
 .woc24-story-arrow{font-size:14px!important;}
}
@media print{
 .woc24-rss{display:none!important;}
}

/* RC40 no orphan footer: author/date/logo are already in the print masthead and byline.
   The redundant standalone web URL footer made a third, otherwise empty A4 sheet. */
@media print{
 .article-page.woc3-article-polished .woc-print-footer{display:none!important;visibility:hidden!important;}
}

/* RC41 tested compact print sheet: Chromium/PDF pagination QA reduced the sample 3->2 A4 pages,
   without removing text, photos, byline or sources. */
@media print{
 @page{size:A4 portrait;margin:12mm 14mm 12mm;}
 .article-page.woc3-article-polished .article-body{
  font-size:10pt!important;line-height:1.45!important;
 }
}

/* RC42: full-width, uncropped photos on editorial print edition. Verified two A4 sheets
   on 2 distinct live WP articles before deployment. Only printer layout is touched. */
@media print{
 .article-page.woc3-article-polished figure.main-media,
 .article-page.woc3-article-polished figure.main-media>a{
    width:100%!important;max-width:100%!important;max-height:none!important;
    min-height:0!important;height:auto!important;overflow:visible!important;
 }
 .article-page.woc3-article-polished figure.main-media>a img.main-img,
 .article-page.woc3-article-polished figure.main-media img.main-img{
    display:block!important;width:100%!important;max-width:100%!important;
    max-height:none!important;min-height:0!important;height:auto!important;
    object-fit:contain!important;object-position:center center!important;
    margin:0 auto!important;transform:none!important;
 }
 .article-page.woc3-article-polished .article-body figure img{
    width:100%!important;max-width:100%!important;height:auto!important;
    object-fit:contain!important;
 }
}

/* RC42 full-column photo in print: tested on InnoCarnival and Chinese railway
   with original image proportion (752x423 at A4 preview width), 2 pages each. */
@media print{
 .article-page.woc3-article-polished figure.main-media,
 .article-page.woc3-article-polished figure.main-media>a{
   display:block!important;width:100%!important;max-width:100%!important;
   max-height:none!important;height:auto!important;
   margin-left:0!important;margin-right:0!important;
 }
 .article-page.woc3-article-polished figure.main-media>a img.main-img,
 .article-page.woc3-article-polished figure.main-media img.main-img{
   display:block!important;width:100%!important;max-width:100%!important;
   max-height:none!important;height:auto!important;
   object-fit:contain!important;object-position:center center!important;
   margin:0 auto!important;
 }
 .article-page.woc3-article-polished .article-body figure img{
   width:100%!important;max-width:100%!important;height:auto!important;
   object-fit:contain!important;
 }
}

/* RC43 hide modified metadata on paper; the web article keeps it. */
@media print {
  .article-page.woc3-article-polished .article-head .article-meta .byline small.updated-label,
  .article-page.woc3-article-polished .article-head .article-meta .byline .updated-label,
  .article-page.woc3-article-polished .woc-print-footer span.updated-label {
     display:none!important;visibility:hidden!important;margin:0!important;padding:0!important;
  }
}
