.product-story-hero.product-hero-text-only {
  min-height: 0;
  padding: 154px 0 88px;
  background: #ffffff;
}

.product-hero-text-only .product-story-grid,
.product-hero-text-only .product-story-grid-single {
  display: block;
  min-height: 0;
}

.product-hero-text-only .product-story-copy {
  width: 100%;
  max-width: 1080px;
  margin: 0;
  padding: 0;
  text-align: left;
}

.product-hero-text-only .signal-label {
  display: none;
}

.product-hero-text-only .product-hero-title {
  max-width: none;
  margin: 0;
}

.product-hero-text-only .product-hero-caption {
  max-width: 760px;
  margin: 20px 0 0;
}

.product-hero-text-only .product-story-visual,
.product-hero-text-only .talkbot-hero-media {
  display: none !important;
}

@media (max-width: 700px) {
  .product-story-hero.product-hero-text-only {
    padding: 118px 0 62px;
  }
}

/* Match the reference product media format across every product page. */
.product-media-unified {
  display: block !important;
  overflow: hidden;
}

.product-story-hero.product-media-unified {
  padding-bottom: 72px !important;
}

.product-media-unified .product-story-copy {
  max-width: 900px;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.product-media-unified .product-hero-caption {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.product-media-unified .wizlynn-hero-video,
.product-media-unified .product-story-visual,
.product-media-unified .talkbot-hero-media {
  position: relative;
  left: 50%;
  width: min(1600px, calc(100vw - 48px)) !important;
  max-width: none !important;
  height: auto;
  aspect-ratio: 1600 / 700;
  margin: 48px 0 0;
  overflow: hidden;
  border: 0;
  border-radius: 32px;
  background: #8fc5e8;
  box-shadow: none;
  transform: translateX(-50%);
}

.product-media-unified .wizlynn-hero-video {
  display: block !important;
}

.product-media-unified .product-story-visual,
.product-media-unified .talkbot-hero-media {
  display: flex !important;
}

.product-media-unified .wizlynn-hero-video,
.product-media-unified .talkbot-hero-media video {
  flex: 0 0 auto;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.product-media-unified .product-story-visual {
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 4vw, 64px);
}

.product-media-unified .qm-hero-media {
  background-color: #8fc5e8;
  background-image: linear-gradient(rgba(255,255,255,0.45), rgba(255,255,255,0.45)),
                    url("../assets/qm-media-background.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.product-media-unified .product-story-visual > svg {
  width: auto;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
}

/* Shared spacing and alignment for the first product card section. */
.product-media-unified + .product-operating-section {
  padding-top: 96px !important;
  padding-bottom: 104px !important;
}

.product-media-unified + .product-operating-section .product-operating-grid {
  align-items: stretch;
  gap: 22px;
}

.product-media-unified + .product-operating-section .product-operating-card {
  display: flex;
  min-height: 360px;
  flex-direction: column;
  align-items: stretch;
  padding: 36px;
}

.product-media-unified + .product-operating-section .product-metric-icon {
  flex: 0 0 auto;
  margin: 0 0 48px;
}

.product-media-unified + .product-operating-section .product-operating-card h3,
.product-media-unified + .product-operating-section .product-operating-card > span:not(.product-metric-icon) {
  min-height: 2.5em;
  margin: 0 0 28px;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.25;
}

.product-media-unified + .product-operating-section .product-operating-card p,
.product-media-unified + .product-operating-section .product-operating-card ul {
  margin-top: 0;
  margin-bottom: 0;
}

.product-media-unified + .talkbot-operating-section .talkbot-operating-grid,
.product-media-unified + .product-operating-section .product-operating-grid-five:has(> :nth-child(4):last-child) {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1100px) {
  .product-media-unified + .talkbot-operating-section .talkbot-operating-grid,
  .product-media-unified + .product-operating-section .product-operating-grid-five:has(> :nth-child(4):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .product-story-hero.product-media-unified {
    padding-bottom: 56px !important;
  }

  .product-media-unified .wizlynn-hero-video,
  .product-media-unified .product-story-visual,
  .product-media-unified .talkbot-hero-media {
    width: calc(100vw - 32px) !important;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 32px;
    border-radius: 14px;
  }

  .product-media-unified .product-story-visual {
    padding: 20px;
  }

  .product-media-unified + .product-operating-section {
    padding-top: 72px !important;
    padding-bottom: 80px !important;
  }

  .product-media-unified + .talkbot-operating-section .talkbot-operating-grid,
  .product-media-unified + .product-operating-section .product-operating-grid-five:has(> :nth-child(4):last-child) {
    grid-template-columns: 1fr;
  }

  .product-media-unified + .product-operating-section .product-operating-card {
    min-height: 0;
    padding: 28px;
  }

  .product-media-unified + .product-operating-section .product-metric-icon {
    margin-bottom: 36px;
  }

  .product-media-unified + .product-operating-section .product-operating-card h3,
  .product-media-unified + .product-operating-section .product-operating-card > span:not(.product-metric-icon) {
    min-height: 0;
    margin-bottom: 22px;
  }
}

.language-engine-page .product-media-unified .product-story-visual {
  background: radial-gradient(ellipse at 25% 25%, #5b9bd4 0%, transparent 55%),
              radial-gradient(ellipse at 75% 75%, #f09030 0%, transparent 55%),
              #ddd0c4;
}
