/* Keep repair evidence and device photos fully visible inside responsive cards. */
body .reviews-section .review-card .repair-image-container {
  aspect-ratio: 4 / 5;
  max-block-size: clamp(176px, 39vw, 390px);
  background: #edf3ee;
}

body .reviews-section .repair-image-container img,
body .reviews-section .repair-image-container:hover img,
body .contact-social-lite .contact-card-img-wrap > img,
body .contact-social-lite .contact-card:hover .contact-card-img-wrap > img {
  object-fit: contain;
  object-position: center;
  transform: none;
}

body .reviews-section .review-card .image-label {
  font-size: .75rem;
  line-height: 1.4;
}

body main.sp .sp-hero .sp-hero-media {
  block-size: auto;
  min-inline-size: 0;
  aspect-ratio: auto;
  background: #edf3ee;
}

body main.sp .sp-hero .sp-hero-media img {
  display: block;
  inline-size: 100%;
  block-size: auto;
  max-block-size: clamp(260px, 52vw, 520px);
  object-fit: contain;
  object-position: center;
}

body .screen-hero-xfp .screen-device-media img,
body .works-gallery .gallery-item:hover > img,
body .xfp-gallery .gallery-item:hover .gallery-thumb > img {
  transform: none;
}

/* Give the content shell its full width and keep individual reading columns readable. */
body :is(main.sp .sp-hero, .article-hero, .reviews-hero, .services-hero,
  .screen-hero-xfp, .hero-charging, .hero-camera, .hero-battery, .hero-mb-app)
  h1 {
  text-wrap: balance;
}

body :is(main.sp, .article-content, .bat-article, .chg-article,
  .services-hero, .reviews-section, .works-gallery, .cta-full, .faq-sec, .xfp-faq-section)
  p {
  overflow-wrap: break-word;
  text-wrap: pretty;
}

body :is(main.sp .sp-lead, main.sp .sp-box, .faq-answer, .xfp-faq-a,
  .chg-section, .chg-container, .article-content .tip-box, .article-content .warning-box) > p,
body .services-hero .sh-note,
body .cta-full .cta-text {
  max-inline-size: 68ch;
}

body :is(section .section-header, section .faq-head) > p {
  max-inline-size: 68ch;
  margin-inline: auto;
  text-wrap: pretty;
}

body .promo-wrap .promo-note {
  max-inline-size: 72ch;
  margin-inline: auto;
}

body .xfp-estimate-app :is(.xfp-control > label, .xfp-note, .xfp-aside-list > li, .xfp-aside-step-body span),
body:has(> header.top + section.hero > .eye) > .body :is(.sec-s, .feat p, .info p),
body .hero-charging ~ section .card-content h3 {
  font-size: .9375rem;
  line-height: 1.6;
}

@media (min-width: 1024px) {
  body main.sp:has(> .sp-hero + section.sp-c > figure) {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(290px, 1fr);
    align-items: center;
  }

  body main.sp:has(> .sp-hero + section.sp-c > figure) > * {
    grid-column: 1 / -1;
  }

  body main.sp:has(> .sp-hero + section.sp-c > figure) > .sp-hero {
    grid-column: 1;
  }

  body main.sp > .sp-hero + section.sp-c:has(> figure) {
    grid-column: 2;
    padding-block: clamp(18px, 3vw, 36px);
  }

  body main.sp > .sp-hero + section.sp-c > figure img {
    max-block-size: min(66vh, 530px);
    object-fit: contain;
  }
}

body main.sp :is(.sp-faq details, .li-cause, .sp-author > div) > p,
body main.sp p.warn,
body :is(.bat-section, .bat-container, .bat-cta, .article-content .article-cta) > p {
  max-inline-size: 68ch;
}

body main.sp :is(.sp-author p, .li-cause p, .sp-crumb, p.warn),
body .article-content .bullets > .li,
body .xfp-estimate-app .xfp-aside-timeline > li,
body:has(> header.top + section.hero > .eye) > .body .why p {
  font-size: .875rem;
  line-height: 1.65;
}

/* Avoid a single wide card on its own row when a three-card group fits. */
@media (min-width: 1024px) {
  body main.sp .sp-two:has(> .sp-box:nth-child(3):last-child) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
