/* September 23 scoped amendments. Preserve Option 8, PGA 2028's locked
   opening, Ryder S1-O2, and the protected Ryder package font and photo content. */

/* Pages 2 and 4 already use the canonical band generated by presidents-footer.js.
   Use that same band for PGA 2027's opening and shadow-root package page. */
.pilot-page.terry-sept23.pga-2027 #pga-opening-8 .slide-footer {
  display: none;
}
.pilot-page.terry-sept23.pga-2027 .presidents-slide-frame:has(> #slide-1) > .presidents-readable-band,
.pilot-page.terry-sept23.pga-2027 .presidents-slide-frame:has(> #slide-3) > .presidents-readable-band {
  display: grid !important;
}

/* This stylesheet is also loaded within the existing declarative shadow root.
   Its footer is superseded by the exact same external band as the other pages. */
#approved-bar-art .deck-contact-footer {
  display: none;
}
#approved-bar-art .package-photo {
  object-position: 50% 60%;
}

/* The two headline spans deliberately inherit the existing "Major Golf"
   rules at every breakpoint: no separate em/small type treatments remain. */
.terry-sept23.pga-2027 #pga-opening-8 .heading > span:last-child {
  margin-bottom: 0;
}

/* Match the controlling 2028 page-2 right-column vertical layout, keeping
   2027 event facts and the existing photographs. Shared centering is separate. */
@media (min-width: 801px) and (min-height: 501px), (min-width: 951px) {
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23.pga-2027 #slide-2 .ism-hero {
    width: 50%;
  }
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23.pga-2027 #slide-2 .ism-readability {
    left: 50%;
    width: 50%;
  }
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23.pga-2027 #slide-2 .ism-narrative {
    left: auto;
    right: 3.8%;
    width: 44.5%;
    top: 10%;
    bottom: 6%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0;
  }
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23.pga-2027 #slide-2 .ism-phase-stack {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    gap: 1.2cqw;
    margin: 1.5cqw 0;
  }
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23.pga-2027 #slide-2 .ism-rationale {
    margin: 0;
  }
}

/* Keep captions as native text. Removing perspective, persistent transforms
   and raster filters avoids the tiny rotated/composited caption treatment. */
.deck-presidents.jason-final.pc-terry-sept10.terry-sept23:is(.pga-2028,.ryder-2029) #slide-3 .package-hospitality-popouts {
  perspective: none;
  transform-style: flat;
}
.deck-presidents.jason-final.pc-terry-sept10.terry-sept23:is(.pga-2028,.ryder-2029) #slide-3 .hospitality-popout {
  --popout-transform: none;
  transform: none;
  transform-style: flat;
  will-change: auto;
  animation: none !important;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  padding: 3px 3px 4px;
}
.deck-presidents.jason-final.pc-terry-sept10.terry-sept23:is(.pga-2028,.ryder-2029) #slide-3 .hospitality-popout img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
  object-fit: cover;
  filter: none;
  backface-visibility: visible;
}
.deck-presidents.jason-final.pc-terry-sept10.terry-sept23:is(.pga-2028,.ryder-2029) #slide-3 .hospitality-popout figcaption {
  position: static;
  inset: auto;
  width: auto;
  margin: 4px 0 0;
  font-size: clamp(10px, .78cqw, 13px);
  letter-spacing: .035em;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
  text-shadow: none;
}

@media (min-width: 801px) and (min-height: 501px), (min-width: 951px) {
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23.pga-2028 #slide-3 .package-hospitality-popouts {
    left: 18%;
    top: auto;
    bottom: 8%;
    width: 31%;
    height: 46%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: .8cqw;
  }
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23.pga-2028 #slide-3 .hospitality-popout {
    position: relative;
    inset: auto;
    width: 100%;
    height: 100%;
    margin: 0;
  }
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23.pga-2028 #slide-3 .hospitality-popout--swing {
    grid-column: 1 / -1;
    width: calc((100% - .8cqw) / 2);
    justify-self: center;
  }
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23.ryder-2029 #slide-3 .package-hospitality-popouts {
    top: 4%;
    bottom: 5%;
    height: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(5, minmax(0, 1fr));
    gap: .5cqw;
  }
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23.ryder-2029 #slide-3 .hospitality-popout {
    position: relative;
    inset: auto;
    width: 100%;
    height: 100%;
    margin: 0;
  }
}

/* The existing landscape deck also reflows at a wide but short viewport. */
@media (max-width: 800px), (max-width: 950px) and (max-height: 500px) {
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23:is(.pga-2028,.ryder-2029) #slide-3 .package-hospitality-popouts {
    position: relative;
    inset: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    gap: 14px;
    width: auto;
    max-width: none;
    height: auto;
    margin: 0 20px 25px;
  }
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23:is(.pga-2028,.ryder-2029) #slide-3 .hospitality-popout {
    position: relative;
    inset: auto;
    grid-column: auto;
    width: 100%;
    height: auto;
    margin: 0;
    grid-template-rows: auto auto;
  }
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23:is(.pga-2028,.ryder-2029) #slide-3 .hospitality-popout img {
    height: auto;
    aspect-ratio: 1.4;
  }
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23:is(.pga-2028,.ryder-2029) #slide-3 .hospitality-popout figcaption {
    font-size: 11px;
  }
}

@media (max-width: 800px), (max-width: 950px) and (max-height: 500px) {
  .pilot-page.terry-sept23.pga-2027 .presidents-slide-frame:has(> #slide-1) > .presidents-readable-band,
  .pilot-page.terry-sept23.pga-2027 .presidents-slide-frame:has(> #slide-3) > .presidents-readable-band {
    display: flex !important;
  }
}

/* The legacy landscape sheet extends some 800px rules to 950px, while its
   desktop absolute columns remain more specific. Keep these content pages
   entirely in document flow in that overlap range; openings are excluded. */
@media (min-width: 801px) and (max-width: 950px) and (max-height: 500px) {
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23:is(.pga-2027,.pga-2028,.ryder-2029) #slide-2 {
    height: auto;
    min-height: 0;
    aspect-ratio: auto;
    overflow: visible;
    padding: 310px 0 28px;
  }
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23:is(.pga-2027,.pga-2028,.ryder-2029) #slide-2 .ism-hero {
    inset: 0 0 auto;
    width: 100%;
    height: 290px;
    object-fit: cover;
  }
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23:is(.pga-2027,.pga-2028,.ryder-2029) #slide-2 .ism-readability {
    display: none;
  }
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23:is(.pga-2027,.pga-2028,.ryder-2029) #slide-2 .ism-narrative {
    position: relative;
    inset: auto;
    width: auto;
    max-width: none;
    height: auto;
    margin: 0 24px;
    padding: 0;
    display: block;
  }
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23:is(.pga-2027,.pga-2028,.ryder-2029) #slide-2 .ism-phase-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 22px 0;
  }
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23:is(.pga-2027,.pga-2028,.ryder-2029) #slide-2 .ism-narrative h2 {
    width: auto;
    max-width: none;
    font-size: 32px;
    line-height: 1.12;
  }
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23:is(.pga-2027,.pga-2028,.ryder-2029) #slide-2 :is(.ism-course-clarifier,.ism-rationale,.ism-phase-detail p:not(.ism-phase-number)) {
    font-size: 16px;
    line-height: 1.5;
  }
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23:is(.pga-2027,.pga-2028,.ryder-2029) #slide-2 .ism-phase-detail h3 {
    font-size: 20px;
    line-height: 1.3;
  }
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23:is(.pga-2027,.pga-2028,.ryder-2029) #slide-2 .ism-phase-number {
    font-size: 28px;
    line-height: 1.2;
  }
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23:is(.pga-2027,.pga-2028,.ryder-2029) #slide-2 .ism-marker-rail {
    position: relative;
    inset: auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    width: auto;
    height: auto;
    margin: 28px 24px 0;
    padding: 0;
    transform: none;
  }
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23:is(.pga-2027,.pga-2028,.ryder-2029) #slide-2 .ism-marker-line {
    display: none;
  }
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23:is(.pga-2027,.pga-2028,.ryder-2029) #slide-2 .ism-marker-rail:not(:has(figure:nth-of-type(4))) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23:is(.pga-2027,.pga-2028,.ryder-2029) #slide-2 .ism-marker-rail figure {
    position: static;
    inset: auto;
    width: auto;
    height: auto;
    margin: 0;
    transform: none;
  }
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23:is(.pga-2027,.pga-2028,.ryder-2029) #slide-2 .ism-marker-rail figure img {
    display: block;
    width: 100%;
    max-width: 180px;
    height: auto;
    aspect-ratio: 1;
    margin: 0 auto;
    object-fit: cover;
    border-radius: 50%;
  }
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23:is(.pga-2027,.pga-2028,.ryder-2029) #slide-2 .ism-marker-rail figcaption {
    position: static;
    inset: auto;
    width: auto;
    height: auto;
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.3;
    text-align: center;
    transform: none;
  }
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23:is(.pga-2028,.ryder-2029) #slide-3 {
    height: auto;
    min-height: 0;
    aspect-ratio: auto;
    overflow: visible;
    padding: 310px 0 28px;
    background: #082718;
  }
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23:is(.pga-2028,.ryder-2029) #slide-3 .package-photo {
    inset: 0 0 auto;
    width: 100%;
    height: 290px;
    object-fit: cover;
  }
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23:is(.pga-2028,.ryder-2029) #slide-3 .package-hospitality-popouts {
    width: calc(100% - 48px);
    max-width: 560px;
    margin: 0 24px 28px;
  }
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23:is(.pga-2028,.ryder-2029) #slide-3 .package-editorial-field {
    position: relative;
    inset: auto;
    display: block;
    width: auto;
    max-width: none;
    height: auto;
    margin: 0 24px;
    padding: 0;
  }
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23:is(.pga-2028,.ryder-2029) #slide-3 .package-investment {
    position: relative;
    inset: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    width: auto;
    height: auto;
    margin: 24px 0 0;
  }
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23:is(.pga-2028,.ryder-2029) #slide-3 .package-editorial-field h2 {
    font-size: 28px;
    line-height: 1.15;
  }
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23:is(.pga-2028,.ryder-2029) #slide-3 :is(.package-intro,.package-bullets) {
    font-size: 16px;
    line-height: 1.5;
  }
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23:is(.pga-2028,.ryder-2029) #slide-3 .package-ledger {
    gap: 16px;
    margin-top: 20px;
  }
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23:is(.pga-2028,.ryder-2029) #slide-3 .package-ledger article {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 12px;
    padding: 16px 0;
  }
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23:is(.pga-2028,.ryder-2029) #slide-3 .package-ledger h3 {
    font-size: 18px;
    line-height: 1.3;
    margin-bottom: 8px;
  }
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23:is(.pga-2028,.ryder-2029) #slide-3 .package-ledger article > strong {
    font-size: 24px;
    line-height: 1.2;
  }
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23:is(.pga-2028,.ryder-2029) #slide-3 .package-size {
    flex: 1 1 330px;
    width: auto;
    max-width: none;
  }
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23:is(.pga-2028,.ryder-2029) #slide-3 .package-size b {
    max-width: none;
  }
  .deck-presidents.jason-final.pc-terry-sept10.terry-sept23:is(.pga-2028,.ryder-2029) #slide-3 .package-price {
    flex: 0 0 auto;
  }
}
