/* Tablet bridge: keep the phone reading path while allowing roomier measures. */
@media (max-width: 64rem) {
  :root {
    --edge: clamp(1.75rem, 4vw, 2.75rem);
    --body: clamp(1.375rem, calc(1.25rem + .4vw), 1.5rem);
    --seam: clamp(3rem, 7.5vw, 3.5rem);
  }

  /* One compact reading composition across phone and tablet, with fluid spacing. */
  h2 { font-size: clamp(2.5rem, 4.5vw, 3.5rem); }
  .production .reading {
    padding-top: clamp(.5rem, 2vw, 1.25rem);
    padding-bottom: clamp(3rem, 6vw, 5rem);
  }
  .production .metrics {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(2rem, 4vw, 3rem);
    margin-top: clamp(3rem, 6vw, 4rem);
  }
  .production .metrics li,
  .production .metrics li:first-child,
  .production .metrics li:last-child { grid-column: auto; }
  .production .metrics li + li { margin-top: 0 !important; }
  .photo-sequence { padding-top: clamp(5rem, 10vw, 7.5rem); }
  .gallery-title { padding-bottom: clamp(1.5rem, 3vw, 2rem); }
  .scene.portrait .scene-visual {
    width: calc(100% - 2 * var(--edge));
    max-width: 30rem;
    margin-inline: auto;
  }
  .scene.voice .reading,
  .scene.photo-heading > .reading {
    padding-top: clamp(2rem, 5vw, 3rem);
    padding-bottom: clamp(3rem, 6vw, 4.5rem);
  }
  .closing-photo figcaption {
    padding: clamp(1.5rem, 3vw, 2rem) var(--edge)
      clamp(2rem, 5vw, 3rem);
  }
  .closing-photo:last-child figcaption { font-size: clamp(2.25rem, 4vw, 3rem); }

  /* The production gallery stays one image at a time and keeps every frame. */
  .gallery-row {
    display: block;
    margin: 0;
  }

  .gallery-frame {
    display: block;
    width: 100%;
    margin: 0 0 clamp(1rem, 2.5vw, 1.5rem);
  }

  .gallery-frame img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: var(--ratio);
    object-fit: contain;
    object-position: center;
    -webkit-mask-image: none;
    mask-image: none;
  }

  /* Let the existing full-screen hero use its accepted phone focal point. */
  .hero-photo img {
    object-position: 90.9091% 31.2321%;
  }

  .hero-photo::after {
    width: 100%;
    background: linear-gradient(
      to right,
      rgba(6, 12, 7, .9),
      rgba(6, 12, 7, .65) 46%,
      rgba(6, 12, 7, .15) 88%,
      transparent
    );
  }

  /* Undo 60rem desktop splits and return scenes to the mobile DOM order. */
  .fundraising,
  .scene.voice[data-source-panel="7"],
  .scene.voice[data-source-panel="8"],
  .invitation {
    display: block;
    grid-template-columns: none;
    align-items: initial;
  }

  .fundraising .scene-visual,
  .scene.voice[data-source-panel="7"] .scene-visual,
  .scene.voice[data-source-panel="8"] .scene-visual,
  .invitation .scene-visual {
    position: relative;
    inset: auto;
    display: block;
    width: auto;
    max-width: none;
    min-width: 0;
    min-height: 0;
    height: auto;
    margin: 0;
    overflow: visible;
    align-items: initial;
    background: transparent;
  }

  .scene-visual > img[data-report-photo] {
    position: relative;
    inset: auto;
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 0;
    margin: 0;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    flex: none;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .textile .reflection-sequence .scene-visual > img[data-report-photo="8"],
  .testimony .reflection-sequence .scene-visual > img[data-report-photo="12"],
  .scene.voice[data-source-panel="7"] .scene-visual > img[data-report-photo],
  .scene.voice[data-source-panel="8"] .scene-visual > img[data-report-photo] {
    position: relative;
    inset: auto;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 0;
    margin: 0;
    aspect-ratio: 4 / 3;
    object-fit: cover;
  }

  .fundraising .scene-visual > img[data-report-photo="11"] {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: 100% 67.39%;
  }

  /* Keep the intentionally framed portrait 13 composition. */
  .scene.portrait .scene-visual > img[data-report-photo="13"] {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: 51% 29%;
  }

  .fundraising .reading,
  .scene.voice[data-source-panel="7"] .reading,
  .scene.voice[data-source-panel="8"] .reading,
  .invitation .reading {
    display: block;
    grid-column: auto;
    grid-row: auto;
    width: 100%;
    padding: clamp(2rem, 5vw, 3rem) var(--edge)
      clamp(3rem, 6vw, 4.5rem);
  }

  .scene.voice[data-source-panel="7"] .reading-inner,
  .scene.voice[data-source-panel="8"] .reading-inner,
  .fundraising .reading-inner {
    width: 100%;
  }

  .fundraising .funder-marks {
    display: block;
    margin-top: 2rem;
    padding: 0;
  }

  .fundraising .mark-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1rem, 3vw, 2rem);
  }

  .fundraising .mark-row img {
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: 4rem;
    justify-self: start;
  }

  /* Ailine's paper overlay returns below its full photograph on tablet. */
  .scene[data-source-panel="9"] {
    display: block;
    grid-template-columns: none;
  }

  .scene[data-source-panel="9"] .reading {
    position: relative;
    grid-area: auto;
    justify-self: auto;
    width: 100%;
    margin: 0;
    padding: clamp(2rem, 5vw, 3rem) var(--edge)
      clamp(3rem, 6vw, 4rem);
    background: var(--forest);
    color: var(--paper);
  }

  .scene[data-source-panel="9"] .reading h2 {
    color: inherit;
    font-size: clamp(2.5rem, 5vw, 4rem);
  }

  /* Papers and their translations follow the same stacked reading order. */
  .reflection-stage-v8,
  .testimony .reflection-stage-v8,
  html.motion .reflection-stage-v8 {
    position: relative;
    top: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: clamp(1.5rem, 4vw, 2.5rem);
    min-height: 0;
    padding: clamp(3rem, 7vw, 5rem) var(--edge);
  }

  .reflection-stage-v8 .reflection-paper,
  .testimony .reflection-paper {
    position: relative;
    inset: auto;
    grid-column: auto;
    grid-row: auto;
    align-self: flex-end;
    width: min(25rem, 78%);
  }

  .reflection-stage-v8 .reflection-paper img {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: none;
    height: auto;
  }

  .reflection-stage-v8 blockquote,
  .testimony .reflection-stage-v8 blockquote {
    grid-column: auto;
    grid-row: auto;
    align-self: flex-start;
    width: 100%;
    max-width: 52rem;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
  }

  /* Keep tablet typography and intervals fluid instead of jumping at 640px. */
  .reading {
    padding-top: clamp(2rem, 5vw, 3rem);
    padding-bottom: clamp(3rem, 6vw, 4.5rem);
  }

  .reading h2,
  .voice h2 {
    font-size: clamp(2.5rem, 4.5vw, 3.5rem);
  }

  .invitation .reading-inner {
    display: block;
    max-width: var(--measure);
  }

  .invitation .reading h2 {
    max-width: 16ch;
    margin: 0 0 clamp(1.5rem, 4vw, 2.5rem);
  }

  .invitation .reading ul,
  .invitation .reading p:not(.contact-link) {
    font-size: clamp(1.2rem, 2.7vw, 1.55rem);
  }

  .invitation .reading ul:has([data-content="56"]) {
    white-space: normal;
  }

  .invitation .contact-link,
  .invitation .contact-link + p {
    margin-top: clamp(1.5rem, 4vw, 2.5rem);
  }

  .invitation .scene-visual > img[data-report-photo] {
    position: relative;
    inset: auto;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 0;
    margin: 0;
    aspect-ratio: auto;
    object-fit: contain;
  }

  .testimony .photo-testimony {
    width: calc(100% - 2 * var(--edge));
    margin: clamp(-2rem, -3vw, -1.25rem) auto 0 var(--edge);
    padding: clamp(2rem, 5vw, 3rem) clamp(1.5rem, 3.75vw, 3rem)
      clamp(3rem, 6vw, 4.5rem);
  }

  .title-composition,html.cinematic .title-composition{left:8%;width:84%;top:12%}
  .title-composition .opening-note{font-size:clamp(1.8rem,3.5vw,2.6rem)}
  .title-composition .brand-mark{margin-top:calc(100px - 15.84%);margin-left:calc(1px - 9.8406%)}
  .report-language{left:8%;right:auto}
  .scene-title,.scene.photo-heading .scene-title{font-size:clamp(2.5rem,5vw,4rem);line-height:1.05;left:var(--edge);top:clamp(1rem,3vw,2rem);max-width:calc(100% - 2 * var(--edge))}
  .textile .reflection-sequence .scene-visual{display:block;position:relative;top:auto;height:auto;min-height:0;overflow:visible}
  .textile .local-spending{position:relative;inset:auto;transform:none;width:100%;min-height:0;margin:0;padding:clamp(2rem,5vw,3rem) var(--edge);display:block}
  .scene.voice[data-source-panel="7"] .scene-visual > img[data-report-photo="20"]{object-position:41.1096256684492% 72.39884393063583%}
}

/* Move only the mobile signature down 100px; the report title stays in place. */
@media (max-width: 40rem) {
  /* A slightly shallower frame reveals about 30px more horizontal scenery on phones. */
  .opening, html.cinematic .opening,
  .opening-stage, html.cinematic .opening-stage {
    min-height: calc(100svh - 60px);
  }
  .hero-photo, .hero-photo img {
    height: calc(100svh - 60px);
  }
  .title-composition, html.cinematic .title-composition { top: 12svh; }
  .title-composition .brand-mark { margin-top: calc(200px - 15.84%); }
}
