/* Joe layout: one geometry for each reader mode. */
.magazine:not(.narrow) .cover .joe-intro {
  --title-size: clamp(30px, 4.9vw, 83px);
  --title-half: calc(var(--title-size) * .52);
  --edge: max(24px, calc(12dvh - var(--title-half)));
  --pad-x: clamp(14px, 2.6vw, 52px);
  display: grid !important;
  grid-template-columns: minmax(0,1fr) !important;
  grid-template-rows: max-content minmax(0, 1fr) max-content minmax(0,1fr) max-content !important;
  gap: 0 !important;
  justify-content: stretch !important;
  align-content: stretch !important;
  box-sizing: border-box !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  padding: var(--edge) var(--pad-x) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}
.magazine:not(.narrow) .cover .joe-intro-heading { display: contents !important; }
.magazine:not(.narrow) .cover .joe-intro-heading h1 {
  grid-column: 1 !important;
  grid-row: 1 !important;
  align-self: start !important;
  margin: 0 !important;
  transform: none !important;
  font-size: var(--title-size) !important;
  line-height: 1.04 !important;
}
.magazine:not(.narrow) .cover .joe-intro-heading .joe-lead {
  grid-column: 1 !important;
  grid-row: 3 !important;
  align-self: center !important;
  margin: 0 !important;
  transform: none !important;
}
.magazine:not(.narrow) .cover .joe-intro-lower {
  grid-column: 1 !important;
  grid-row: 5 !important;
  display: grid !important;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important;
  grid-template-rows: minmax(0,auto) !important;
  align-items: center !important;
  column-gap: clamp(20px,2.1vw,36px) !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}
.magazine:not(.narrow) .cover .joe-portrait {
  grid-column: 1 !important;
  grid-row: 1 !important;
  justify-self: start !important;
  align-self: center !important;
  width: min(100%,42dvh) !important;
  max-width: 100% !important;
  height: min(58dvh,550px) !important;
  margin: 0 !important;
}
.magazine:not(.narrow) .cover .joe-portrait picture,
.magazine:not(.narrow) .cover .joe-portrait img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}
.magazine:not(.narrow) .cover .joe-promises {
  grid-column: 2 !important;
  grid-row: 1 !important;
  align-self: center !important;
  justify-self: stretch !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
@media (max-width:1199px), (max-height:700px) {
  .magazine:not(.narrow) .cover .joe-intro {
    --portrait-height: min(40dvh, 615px, max(190px, calc(100dvh - 478px)));
    grid-template-rows: max-content minmax(0, 1fr) max-content minmax(0,1fr) max-content minmax(0,1fr) var(--portrait-height) !important;
  }
  .magazine:not(.narrow) .cover .joe-intro-lower { display: contents !important; }
  .magazine:not(.narrow) .cover .joe-promises {
    grid-column: 1 !important;
    grid-row: 5 !important;
    align-self: center !important;
  }
  .magazine:not(.narrow) .cover .joe-portrait {
    grid-column: 1 !important;
    grid-column: 1 !important;
    grid-row: 7 !important;
    justify-self: center !important;
    align-self: center !important;
    width: min(calc(100% - 24px),600px) !important;
    height: var(--portrait-height) !important;
    aspect-ratio: auto !important;
    /* The outer curve ends at 682/749 of the 39vw cover panel. */
    translate: -1.744326vw 0 !important;
  }
  .magazine:not(.narrow) .cover .joe-portrait picture,
  .magazine:not(.narrow) .cover .joe-portrait img { aspect-ratio: auto !important; }
}
@media (max-width:999px) {
  /* Six-leaf reader; the initial leaf is the left-hand desktop cover. */
  .mobile-page .joe-mobile-page .joe-intro {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) !important;
    grid-template-rows: auto minmax(24px,1fr) auto minmax(24px,1fr) auto minmax(24px,1fr) auto !important;
    align-content: stretch !important;
    gap: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 100dvh !important;
    overflow: visible !important;
    box-sizing: border-box !important;
    padding: 7.2dvh var(--inset) 12dvh !important;
  }
  .mobile-page .joe-mobile-page .joe-intro-heading,
  .mobile-page .joe-mobile-page .joe-intro-lower { display: contents !important; }
  .mobile-page .joe-mobile-page .joe-intro-heading h1,
  .mobile-page .joe-mobile-page .joe-lead,
  .mobile-page .joe-mobile-page .joe-promises,
  .mobile-page .joe-mobile-page .joe-portrait {
    grid-column: 1 !important;
    margin: 0 !important;
    transform: none !important;
    align-self: center !important;
  }
  /* Keep the heading; scale every other piece of Joe copy by exactly 85%. */
  .mobile-page .joe-mobile-page .joe-lead,
  .mobile-page .joe-mobile-page .joe-promises p,
  .mobile-page .joe-mobile-page .joe-promises span {
    font-size: clamp(17.85px, 4.5475vw, 23.8px) !important;
    line-height: 1.43 !important;
  }
  .mobile-page .joe-mobile-page .joe-promises strong {
    font-size: clamp(21.25px, 5.355vw, 31.45px) !important;
  }
  .mobile-page .joe-mobile-page .joe-intro-heading h1 { grid-row: 1 !important; }
  .mobile-page .joe-mobile-page .joe-lead { grid-row: 3 !important; }
  .mobile-page .joe-mobile-page .joe-promises { grid-row: 5 !important; }
  .mobile-page .joe-mobile-page .joe-portrait {
    grid-row: 7 !important;
    translate: none !important;
    width: min(100%,520px) !important;
    height: min(38dvh,425px) !important;
    justify-self: center !important;
  }
  .mobile-page .joe-mobile-page .joe-portrait picture,
  .mobile-page .joe-mobile-page .joe-portrait img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }
}
@media (max-height:700px) and (min-width:1000px) {
  .magazine:not(.narrow) .cover .joe-portrait {
    width: min(100%,56dvh) !important;
    aspect-ratio: 3/2 !important;
  }
  .magazine:not(.narrow) .cover .joe-portrait picture,
  .magazine:not(.narrow) .cover .joe-portrait img { aspect-ratio: 3/2 !important; }
}

/* On shorter reader screens, leave the fixed page controls clear of the photo. */
@media (max-width:999px) and (max-height:800px) {
  .mobile-page .joe-mobile-page .joe-portrait {
    height: min(32dvh,425px) !important;
  }
}

/* ProSol cover-copy gap: preserve local Joe styles; only shift the promise block. */
@media (min-width: 1200px) and (min-height: 701px) {
  .magazine:not(.narrow) .cover .joe-intro-lower .joe-promises {
    translate: calc(-15px - max(0px, 50% - 21dvh)) 0 !important;
  }
}
