/* K13 NEWS 1.0.62 | Digital article reading layout.
   Scope: story pages on screens ONLY. Never change the cover, advertising,
   other site pages, PDF composition, or print styles.
   Prevent a 50%-floated lead photo from squeezing two newspaper columns
   into illegible 200px strips (e.g. story 69, np-article-1). */
@media screen {
  .story-design .article-main {
    min-width: 0;
  }

  /* The hero image occupies a complete editorial row before the copy.
     Do not float it beside a separate multi-column prose element. */
  .story-design .article-main > figure.k13-photo-wrap {
    display: block !important;
    float: none !important;
    clear: both !important;
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 clamp(18px, 2.4vw, 28px) !important;
    padding: 0 !important;
    break-inside: avoid;
  }
  .story-design .article-main > figure.k13-photo-wrap > img.k13-photo {
    display: block;
    width: 100% !important;
    height: auto !important;
    max-height: 500px;
    object-fit: cover;
    object-position: center;
  }
  .story-design .article-main > figure.k13-photo-wrap > figcaption {
    max-width: 100%;
    margin-top: 6px;
    text-align: end;
  }

  /* Let the available ARTICLE width, not viewport width, determine whether
     to use one or two readable columns. Never split a narrowed text strip. */
  .story-design .article-main .article-prose.newspaper-prose {
    display: block;
    float: none !important;
    clear: both !important;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    column-count: auto !important;
    column-width: 355px !important;
    column-gap: clamp(24px, 2.8vw, 38px) !important;
    column-rule: 1px solid var(--line);
    column-fill: balance;
    text-align: start !important;
    hyphens: auto;
    overflow-wrap: break-word;
    word-break: normal;
    line-height: 1.68;
  }

  /* A paragraph longer than one column may continue in the next column;
     avoid the huge whitespace generated by break-inside:avoid-column. */
  .story-design .article-main .newspaper-prose p {
    break-inside: auto !important;
    orphans: 3;
    widows: 3;
    text-align: inherit !important;
    word-spacing: normal;
  }

  /* Automatic drop caps corrupt manual prose beginning with e.g. "Resumo:".
     Deliberate pull quotes, subheads and typography remain unchanged. */
  .story-design .article-main .newspaper-prose p:first-of-type::first-letter {
    float: none !important;
    font: inherit !important;
    color: inherit !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* No image or ad may force the columns wider than the article's container. */
  .story-design .article-main .newspaper-prose :is(img,video,iframe,figure) {
    max-width: 100%;
  }
}

/* On a narrow phone, stay in a conventional single-column reading flow. */
@media screen and (max-width: 760px) {
  .story-design .article-main .article-prose.newspaper-prose {
    column-count: 1 !important;
    column-width: auto !important;
    column-rule: 0 !important;
  }
  .story-design .article-main > figure.k13-photo-wrap > img.k13-photo {
    max-height: none;
  }
}

/* Preserve the related-news and advertising rail on individual stories.
   Earlier NEW article mode hid the rail and expanded text to the full page. */
@media screen and (min-width: 1050px) {
  .story-design.k13-frame-bottom .article-layout {
    display: grid !important;
    max-width: none !important;
    width: 100%;
    grid-template-columns: minmax(0, 3fr) minmax(245px, 1fr) !important;
    gap: clamp(24px, 3vw, 42px);
    align-items: start;
  }
  .story-design.k13-frame-bottom .article-main {
    min-width: 0;
    width: auto !important;
    grid-column: 1;
  }
  .story-design.k13-frame-bottom .article-aside {
    display: flex !important;
    grid-column: 2;
    min-width: 0;
    flex-direction: column;
    justify-content: flex-start;
    gap: 16px;
    border-left: 1px solid var(--line);
    padding-left: clamp(14px, 1.7vw, 24px);
    align-self: stretch;
  }
}
@media screen and (max-width: 1049px) {
  .story-design.k13-frame-bottom .article-layout {
    display: block !important;
    width: 100%;
    max-width: none;
  }
  .story-design.k13-frame-bottom .article-aside {
    display: block !important;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 20px 0 0;
    margin-top: 24px;
  }
}

