/*
 * Pressroom Production Masthead Contract v1.4
 *
 * Keep the publication identity stable while the reader scrolls. Earlier
 * sticky/condensing behavior changed the layout during scroll and caused
 * visible jumps and repaint glitches on the live paper.
 */

html { scroll-padding-top: 16px; }

.masthead {
  position: static !important;
  z-index: auto;
  transform: none !important;
  transition: none !important;
  background: var(--paper);
}

.masthead.is-condensed {
  box-shadow: none;
}

.front-page-brand[hidden],
.section-edition-heading[hidden] {
  display: none !important;
}

.masthead-art {
  overflow: hidden;
  background: var(--paper);
  transition: none !important;
}

.masthead-art img {
  display: block;
  width: min(100%, 1180px);
  height: auto;
  max-height: none;
  margin: 0 auto;
  object-fit: contain;
  object-position: center center;
  filter: none !important;
  opacity: 1 !important;
  mix-blend-mode: normal !important;
  transform: none !important;
  transition: none !important;
}

.section-edition-heading {
  position: relative;
  padding: 16px 20px 15px 24px;
  text-align: left;
  border-top: 4px double var(--ink-heavy);
  border-bottom: 4px double var(--ink-heavy);
  background: linear-gradient(90deg,var(--paper-light),var(--paper) 68%);
}

.section-edition-heading::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 6px;
  background: var(--ink-heavy);
}

.section-edition-heading::after {
  content: "SECTION EDITION";
  position: absolute;
  right: 18px;
  top: 16px;
  font: 700 9px Arial, sans-serif;
  letter-spacing: 1.45px;
  color: var(--ink-secondary);
}

.section-edition-eyebrow {
  margin: 0 0 3px;
  font: 700 10px Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 1.55px;
  color: var(--ink-secondary);
}

.section-edition-heading h1 {
  margin: 0;
  font-family: var(--font-news);
  font-size: clamp(46px, 6vw, 76px);
  line-height: .9;
  letter-spacing: -.035em;
  color: var(--ink-heavy);
}

.section-edition-deck {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.35;
  color: var(--ink-secondary);
}

/* Tablet: preserve the complete Front Page plate within the approved band. */
@media (min-width: 651px) and (max-width: 999px) {
  .masthead-art img {
    width: min(100%, 900px);
  }
}

/*
 * Phone: keep the title/globe identity large enough to read on the Front Page.
 * Other pages retain only their compact section heading.
 */
@media (max-width: 650px) {
  .masthead-art {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .masthead-art img {
    width: min(100%, 495px);
    min-width: 360px;
    max-width: none;
    height: auto;
    flex: 0 0 auto;
  }

  .section-edition-heading {
    margin: 0 10px;
    padding: 10px 0 8px;
  }

  .section-edition-heading h1 {
    font-size: clamp(34px, 12vw, 48px);
  }
}
