/* LIST.ENERGY 6.6.2 — matched homepage wordmark/search widths and viewport fit.
   Only the homepage is affected; other directory/search templates are untouched.
   Logo remains proportional; input stays usable with text wrapping. */

/* The brand and search are a single-width vertical group, never two separate
   widths.  This corrects v6.6.0's 820px logo against a 940px search field. */
body.home .homepage .home-top .brand-search,
body.home .homepage .home-top .brand-link,
body.home .homepage .home-top .brand-link picture,
body.home .homepage .home-top .brand-link .list-logo,
body.home .homepage .home-top .explanatory-search,
body.home .homepage .home-top .requirement-field,
body.home .homepage .home-top .requirement-input-shell,
body.home .homepage .home-top .requirement-input-shell textarea {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}
body.home .homepage .home-top .brand-link .list-logo {
  display: block !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center !important;
  margin-inline: auto !important;
}

/* Desktops: the 750px logo is modestly smaller than the earlier 820px one.
   Search and button group now use exactly the same 750px width. The preceding
   left-offset and modest downward placement are retained. */
@media (min-width: 901px) {
  body.home .homepage .home-top {
    width: min(750px, calc(100vw - 280px)) !important;
    max-width: calc(100vw - 280px) !important;
  }
}
/* Narrow tablets use the same matched-width principle. */
@media (min-width: 701px) and (max-width: 900px) {
  body.home .homepage .home-top {
    width: min(620px, calc(100vw - 88px)) !important;
    max-width: calc(100vw - 88px) !important;
  }
}
/* Phones: slightly scale down the wordmark and its matching search field,
   with equal margins and no horizontal spill at 320px. */
@media (max-width: 700px) {
  body.home .homepage .home-top {
    left: 50% !important;
    right: auto !important;
    width: min(342px, calc(100vw - 34px)) !important;
    max-width: calc(100vw - 34px) !important;
    min-width: 0 !important;
    transform: translate(-50%, -50%) !important;
  }
  body.home .homepage .home-top .brand-link .list-logo {
    width: 100% !important;
    max-width: 100% !important;
  }
}
/* Let an enlarged/zoomed browser or small landscape screen scroll rather than
   cut off interactive search, footer or open menus. Standard sizes stay 1-screen. */
@media (max-height: 480px) {
  html:has(body.home), body.home { height: auto !important; overflow-y: auto !important; }
  body.home .homepage { min-height: 570px !important; height: auto !important; max-height: none !important; overflow-y: auto !important; }
}
