/* Mobile layout corrections. Loaded after the original theme styles. */
.nav-compare .compare-label,
.nav-compare .compare-label-detail {
  display: inline;
  width: auto;
  height: auto;
  background: transparent;
  color: inherit;
  border-radius: 0;
  line-height: inherit;
}

@media (max-width: 760px) {
  .site-header .header-inner {
    width: 100%;
    padding: 14px 20px;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
  }

  .site-header .wordmark {
    flex: 1 1 auto;
    min-width: 0;
  }

  .site-header .brand-kicker {
    font-size: .75rem;
    line-height: 1.5;
    letter-spacing: 0;
    margin-bottom: 4px;
  }

  .site-header .wordmark > span:last-child {
    display: block;
    font-size: clamp(1rem, 4.2vw, 1.125rem);
    line-height: 1.5;
    letter-spacing: 0;
    overflow-wrap: anywhere;
  }

  .site-header nav {
    flex: 0 0 auto;
    width: auto;
    gap: 0;
  }

  .site-header .nav-compare {
    min-height: 44px;
    margin: 0;
    padding: 10px 12px;
    gap: 6px;
    font-size: .875rem;
    white-space: nowrap;
  }

  .nav-compare .compare-label-detail {
    display: none;
  }

  .site-header .nav-compare [data-selected-count] {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    line-height: 1.25rem;
  }

  .hero.wrap {
    display: block;
    width: 100%;
    padding: 26px 20px 38px;
  }

  .hero-copy {
    min-width: 0;
  }

  .hero .eyebrow {
    font-size: .75rem;
    letter-spacing: .12em;
    margin-bottom: 10px;
  }

  .hero h1 {
    font-size: clamp(1.5rem, 7vw, 2rem);
    line-height: 1.5;
    letter-spacing: .015em;
    margin-bottom: 14px;
    overflow-wrap: normal;
    line-break: strict;
  }

  .hero-intro {
    font-size: 1rem;
    line-height: 1.85;
  }

  .hero .home-search {
    margin-top: 20px;
  }

  .hero .home-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .hero .home-search-row select {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    font-size: 1rem;
  }

  .hero .home-search-row > .button {
    min-height: 48px;
    padding: 10px 16px;
    font-size: 1rem;
    gap: 10px;
    white-space: nowrap;
  }

  .hero .quick-links {
    flex-wrap: wrap;
    font-size: .875rem;
    gap: 8px 14px;
  }

  .hero .quick-links > span {
    font-size: .75rem;
  }

  /* Keep the image in normal flow so its parent cannot collapse to zero.
     The note shares only the image row, never the introduction/search area. */
  .hero-photo {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-self: auto;
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    aspect-ratio: auto;
    margin: 24px 0 0;
  }

  .hero-photo img {
    grid-area: 1 / 1;
    position: static;
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    align-self: stretch;
    object-fit: cover;
    object-position: 50% 56%;
    border-radius: 48px 10px 10px 10px;
  }

  .hero-photo .photo-note {
    grid-area: 1 / 1;
    position: relative;
    inset: auto;
    align-self: end;
    justify-self: end;
    min-width: 0;
    max-width: calc(100% - 24px);
    margin: 12px;
    padding: 9px 14px;
    line-height: 1.65;
    transform: none;
    box-shadow: 3px 3px 0 #dcd0a2;
    overflow-wrap: anywhere;
  }

  .hero-photo .photo-note span {
    font-size: .75rem;
  }

  .hero-photo .photo-note strong {
    font-size: 1rem;
    letter-spacing: .02em;
  }

  .hero-photo figcaption {
    grid-area: 2 / 1;
    position: static;
    width: 100%;
    padding-top: 6px;
    text-align: right;
    font-size: .75rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 359px) {
  .site-header .header-inner {
    padding-inline: 16px;
    gap: 8px;
  }

  .site-header .nav-compare {
    padding-inline: 10px;
  }

  .hero.wrap {
    padding-inline: 16px;
  }
}
