/* Editorial finishing pass. One shared content grid for the three inside pages.
   Homepage and phone reader are intentionally unaffected. */
@media (min-width: 1400px) {
  .magazine:not(.narrow) .slide:is(.feature, .venues, .model) .spread-grid {
    box-sizing: border-box !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: minmax(0, 1fr) auto !important;
    column-gap: 0 !important;
    row-gap: clamp(24px, 3.4vh, 34px) !important;
    min-height: calc(100svh - 50px) !important;
    height: auto !important;
    padding: clamp(124px, 15vh, 150px) 0 clamp(70px, 10vh, 96px) !important;
    align-content: center !important;
    overflow: visible !important;
  }

  /* The two left-hand articles share the same starting height. */
  .magazine:not(.narrow) .feature .feature-copy,
  .magazine:not(.narrow) .model .model-story-column {
    grid-area: 1 / 1 !important;
    align-self: start !important;
    justify-content: flex-start !important;
    padding-bottom: 0 !important;
  }
  .magazine:not(.narrow) .venues .venue-copy {
    grid-area: 1 / 2 / 3 / 3 !important;
    align-self: center !important;
    justify-content: flex-start !important;
  }
  /* Images and article share the same vertical reading area. */
  .magazine:not(.narrow) .feature .feature-photo,
  .magazine:not(.narrow) .model .model-economics {
    grid-area: 1 / 2 !important;
    align-self: center !important;
    justify-content: center !important;
    height: auto !important;
  }
  /* The legacy economics rule is more specific than the shared image rule. */
  .magazine:not(.narrow) .slide.model .model-art-column .model-economics {
    grid-area: 1 / 2 !important;
    align-self: center !important;
    height: auto !important;
  }
  /* Survey and contact occupy the SAME row (and therefore same vertical center). */
  .magazine:not(.narrow) :is(.feature, .model) .spread-grid > .survey-cta {
    grid-area: 2 / 1 !important;
    align-self: center !important;
    justify-self: stretch !important;
    margin: 0 !important;
  }
  .magazine:not(.narrow) .feature .feature-contact,
  .magazine:not(.narrow) .model .model-art-column > .model-contact {
    grid-area: 2 / 2 !important;
    align-self: center !important;
    justify-content: center !important;
    margin: 0 !important;
  }
  /* Two-photo gallery is centered as ONE unit; retain the diagonal stagger. */
  .magazine:not(.narrow) .venues .venue-photos {
    grid-area: 1 / 1 / 3 / 2 !important;
    align-self: center !important;
    justify-content: center !important;
    height: auto !important;
    gap: clamp(13px, 1.6vh, 22px) !important;
  }
  .magazine:not(.narrow) .venues .venue-photos figure:first-child,
  .magazine:not(.narrow) .venues .venue-photos figure:nth-child(2) {
    align-self: center !important;
  }
}

/* iPad/stacked: narrative, image, then survey, then contact (in that order).
   The magazine's article-content remains the scroll container. */
@media (min-width: 768px) and (max-width: 1399px) {
  .magazine:not(.narrow) :is(.feature, .model) .spread-grid {
    grid-template-rows: repeat(4, max-content) !important;
    align-content: start !important;
    height: auto !important;
    min-height: 92vh !important;
    overflow: visible !important;
  }
  .magazine:not(.narrow) .feature .feature-copy,
  .magazine:not(.narrow) .model .model-story-column { grid-area: 1 / 1 !important; }
  .magazine:not(.narrow) .feature .feature-photo,
  .magazine:not(.narrow) .model .model-economics {
    grid-area: 2 / 1 !important;
    align-self: center !important;
  }
  .magazine:not(.narrow) :is(.feature, .model) .spread-grid > .survey-cta {
    grid-area: 3 / 1 !important;
    align-self: center !important;
    justify-self: center !important;
    margin: 0 !important;
  }
  .magazine:not(.narrow) .feature .feature-contact,
  .magazine:not(.narrow) .model .model-art-column > .model-contact {
    grid-area: 4 / 1 !important;
    align-self: center !important;
    justify-content: center !important;
    margin: 0 !important;
  }


  /* Intrinsic image ratios don't give these legacy flex wrappers any height.
     Reserve that height in the grid so following rows cannot overlap the image. */
  .magazine:not(.narrow) .feature .feature-photo,
  .magazine:not(.narrow) .model .model-economics {
    min-height: min(60vw, 430px) !important;
    height: auto !important;
    align-self: stretch !important;
  }
  .magazine:not(.narrow) .feature .feature-contact,
  .magazine:not(.narrow) .model .model-art-column > .model-contact {
    width: 100% !important;
    max-width: 100% !important;
    justify-self: stretch !important;
    align-items: center !important;
  }


  .magazine:not(.narrow) .feature .feature-photo figure {
    height: auto !important;
    max-height: none !important;
    aspect-ratio: 520 / 345 !important;
  }
  .magazine:not(.narrow) .model .model-economics-frame {
    height: auto !important;
    max-height: none !important;
    aspect-ratio: 1202 / 869 !important;
  }


  .magazine:not(.narrow) .slide.model .model-art-column .model-economics {
    grid-area: 2 / 1 !important;
    min-height: min(60vw, 430px) !important;
    height: auto !important;
    align-self: stretch !important;
  }


  .magazine:not(.narrow) .slide.model .model-art-column .model-economics-frame img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain !important;
  }
}
/* iPad reader: center the questions, but leave the newspaper copy full-width.
   The phone reader and wide two-column spreads keep their original styling. */
@media (min-width: 768px) and (max-width: 1399px) {
  .magazine:not(.narrow) .slide.feature .feature-copy .feature-questions {
    padding-inline: 0 !important;
    text-align: center !important;
  }
  .magazine:not(.narrow) .feature .feature-questions p {
    text-align: center !important;
  }
}

/* Roomy iPad/stacked: article across the top; photo left; survey and contact
   form one centered block on the right. At narrower widths the earlier
   image -> survey -> contact stack remains, protecting table readability. */
@media (min-width: 1080px) and (max-width: 1399px) {
  .magazine:not(.narrow) :is(.feature, .model) .spread-grid {
    grid-template-columns: minmax(0, 57fr) minmax(0, 40fr) !important;
    grid-template-rows: max-content auto auto !important;
    column-gap: 3% !important;
    row-gap: clamp(20px, 2.8vh, 32px) !important;
  }
  .magazine:not(.narrow) :is(.feature, .model)
    :is(.feature-copy, .model-story-column) {
    grid-area: 1 / 1 / 2 / -1 !important;
  }
  .magazine:not(.narrow) .feature .feature-photo,
  .magazine:not(.narrow) .slide.model .model-art-column .model-economics {
    grid-area: 2 / 1 / 4 / 2 !important;
    height: auto !important;
    align-self: center !important;
    justify-content: flex-start !important;
  }
  /* The old photo flex wrapper otherwise reports zero intrinsic height. */
  .magazine:not(.narrow) .slide.feature .feature-photo {
    width: min(100%, clamp(500px, 68vh, 650px)) !important;
    aspect-ratio: 520 / 345 !important;
    min-height: auto !important;
    align-self: stretch !important;
  }
  .magazine:not(.narrow) .feature .feature-photo figure {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
  }
  .magazine:not(.narrow) .slide.model .model-art-column .model-economics-frame {
    width: min(100%, clamp(500px, 68vh, 650px)) !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
  }
  /* Two automatic rows place these next to the image as a cohesive unit. */
  .magazine:not(.narrow) :is(.feature, .model) .spread-grid > .survey-cta {
    grid-area: 2 / 2 !important;
    justify-self: center !important;
    align-self: end !important;
    max-width: 100% !important;
    white-space: normal !important;
    margin: 0 !important;
  }
  .magazine:not(.narrow) .feature .feature-contact,
  .magazine:not(.narrow) .model .model-art-column > .model-contact {
    grid-area: 3 / 2 !important;
    align-self: start !important;
    justify-self: stretch !important;
    justify-content: flex-start !important;
    margin: 0 !important;
  }
}
