/* Content imagery is evidence: show the whole photo/device, never stretch or crop it.
   Fixed-size product tiles use contain; editorial photographs keep their own ratio. */
main img {
  max-width: 100%;
  object-fit: contain !important;
  object-position: center !important;
}
main :is(picture, figure) { min-width: 0; max-width: 100%; }
html body main .official-model-card__image img {
  height: 100% !important;
  min-height: 0;
  max-height: 100% !important;
  aspect-ratio: auto !important;
  transform: none !important;
}
main .quick-reference__media.official-product-media img,
main #oneplus .official-product-media img { object-fit: contain !important; }

/* Only explicitly decorative background layers may fill and crop their frame. */
main :is([aria-hidden="true"], .hero-dual, .portfolio-card,
  .direction-card--vision, .phone-inquiry__background,
  .final-inquiry__background) img {
  object-fit: cover !important;
}

/* Shared by all article templates, including PNG/JPEG photography and SVG diagrams. */
main :is(.quick-reference__media, .article-overview > figure,
  .article-figure, .article-summary > picture, .article-faq__heading > picture,
  .article-inquiry picture, .related-card > picture) {
  display: block;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  align-self: start;
}
main :is(.quick-reference__media, .article-overview > figure,
  .article-figure, .article-summary > picture, .article-faq__heading > picture,
  .article-inquiry picture, .related-card > picture) :is(picture, img) {
  display: block;
  position: static;
  width: 100%;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  transform: none !important;
}
main :is(.article-overview, .article-summary) { align-items: start; }
/* Reserve a frame before lazy-loaded images arrive; use their true ratio once loaded. */
main :is(.quick-reference__media, .article-overview > figure, .article-figure,
  .article-summary > picture, .article-faq__heading > picture,
  .article-inquiry picture, .related-card > picture) img {
  aspect-ratio: auto 3 / 2 !important;
}
main :is(.article-hero__grid, .article-overview, .article-summary, .quick-reference) > * { min-width: 0; }
.quick-reference__table { width: 100%; min-width: 0; max-width: 100%; }
.quick-reference__table table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed;
}
.quick-reference__table :is(th, td) {
  white-space: normal !important;
  overflow-wrap: anywhere;
  vertical-align: top;
}
/* Short editorial tables fit the reading column; wide specifications can scroll. */
.article-table table:not(:has(tr > :nth-child(4))) {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed;
}
.article-table table:not(:has(tr > :nth-child(4))) :is(th, td) {
  white-space: normal;
  overflow-wrap: anywhere;
  vertical-align: top;
}
@media (max-width: 600px) {
  .quick-reference__table :is(th, td) { padding: 10px 8px; font-size: .8rem; }
}


/* Fixed-frame business photography: preserve the original full-bleed presentation.
   Product galleries, model cards and editorial diagrams retain contain above. */
main :is(.quality__image, .telecom-band__image, .faq__intro,
  .about-hero__image, .company-section__aside, .values-feature,
  .advantages-section figure, .story-section__image, .about-inquiry__grid,
  .products-dual-images, .portfolio-brief__image, .project-path__grid,
  .products-faq figure, .path-card,
  .contact-information figure, .contact-inquiry__copy figure, .company-address__image,
  .phone-hero__image, .telecom-hero__media, .telecom-split figure,
  .telecom-capabilities figure, .telecom-inquiry__copy) img,
main img.products-inquiry__image {
  object-fit: cover !important;
}
