/* Mobile fixes for quiz results: image frames, readable type, and tighter cards. */

.rr-first-result-card .rr-almost-image,
.rr-first-result-card .rr-almost-image img {
  width: 100%;
}

.rr-first-result-card .rr-almost-image {
  min-height: 220px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e7ebef;
}

.rr-first-result-card .rr-almost-image img {
  display: block;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.rr-first-result-card .rr-almost-image.rr-image-unavailable {
  min-height: 180px;
  background: #e7ebef;
}

.rr-narrative-trait,
.rr-narrative-trait * {
  color: #17283f !important;
}

.rr-narrative-trait {
  background: #ffffff !important;
  border-color: rgba(23, 40, 63, 0.2) !important;
}

.rr-narrative-trait .rr-trait-index,
.rr-narrative-trait .rr-trait-label {
  color: #40536b !important;
  opacity: 1 !important;
}

.rr-narrative-trait .rr-trait-value {
  color: #17283f !important;
  opacity: 1 !important;
}

@media (max-width: 640px) {
  .rr-first-results-grid {
    gap: 20px !important;
  }

  .rr-first-result-card {
    overflow: hidden;
  }

  .rr-first-result-card .rr-almost-image {
    min-height: 210px;
    aspect-ratio: 16 / 10;
    margin: 0 !important;
  }

  .rr-first-result-copy {
    padding: 24px 20px 28px !important;
  }

  .rr-first-result-copy h3 {
    font-size: clamp(2rem, 10vw, 3rem) !important;
    line-height: 1 !important;
  }

  .rr-first-result-copy h4 {
    margin-top: 24px !important;
    font-size: 1.15rem !important;
    line-height: 1.35 !important;
  }

  .rr-first-result-copy p,
  .rr-first-result-copy li {
    font-size: 1rem !important;
    line-height: 1.65 !important;
  }

  .rr-ranking-explanation {
    font-size: 1rem !important;
    line-height: 1.6 !important;
  }

  .rr-narrative-traits {
    gap: 14px !important;
  }

  .rr-narrative-trait {
    min-height: 120px !important;
    padding: 20px !important;
  }
}
