/*
 * Public home page (design HOME-0 to HOME-2, AdSense epic #1059), loaded after landing.css and catalogue.css: the search and this month's report in the hero, the
 * department tiles, the cheapest-today cards and the one ad beside or after them. Server-rendered, no JavaScript.
 */
.hero h1 {
  text-wrap: balance;
}
.hm-find {
  margin-top: 20px;
}
.hm-find label {
  display: block;
  margin: 0 0 6px;
  font-size: var(--text-row-title-size);
  font-weight: var(--text-body-weight);
  color: var(--ink);
}
.hm-box {
  display: flex;
  align-items: center;
  height: 52px;
  padding: 0 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: var(--paper);
}
.hm-box:focus-within {
  border-color: var(--brand);
  border-width: 2px;
}
.hm-box button {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-button);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.hm-box input {
  flex: 1;
  min-width: 0;
  height: 48px;
  margin: 0;
  padding: 0 4px 0 12px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: var(--text-row-title-size);
  color: var(--ink);
  outline: 0;
  text-overflow: ellipsis;
}
.hm-box input::placeholder {
  color: var(--muted);
}
.hm-report {
  margin-top: 28px;
}
.hm-report h2 {
  margin: 0 0 12px;
  font-size: var(--text-title-card-size);
  line-height: 1.3;
  text-wrap: balance;
}
.hm-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}
.hm-links a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font-weight: var(--text-button-weight);
}
.hm-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}
.hm-head h2 {
  margin: 0;
}
.hm-head a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font-weight: var(--text-button-weight);
  white-space: nowrap;
}
.hm-dept {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.hm-dept .product-card {
  min-height: 64px;
  align-content: center;
}
main section .ad-slot {
  margin: 20px 0 0;
}
.hm-src p.hm-line {
  margin: 0 0 14px;
  color: var(--neutral-text);
}
.hm-src .hm-links {
  margin-top: 8px;
}
#how .steps {
  margin-bottom: 8px;
}
#how .cta {
  margin-top: 16px;
}
/* The ad beside the cards is one slot: on a phone it follows them, and a slot that did not fill takes no room. */
.hm-side {
  gap: 0;
}
.hm-side > aside.ad-slot:not([hidden]) {
  display: block;
}
/* While the slot is still asking it takes no room and shows nothing; the filled mark (page-ads.js) gives it its card. */
.with-side.hm-side > .ad-slot:not([data-filled]) {
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.with-side.hm-side > .ad-slot:not([data-filled]) .ad-label {
  display: none;
}
.with-side.hm-side > .ad-slot:not([data-filled]) ins.adsbygoogle {
  min-height: 0;
  background: transparent;
}
.with-side.hm-side > .ad-slot[data-filled] {
  margin-top: 20px;
}
@media (min-width: 640px) {
  .hm-dept {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (min-width: 900px) {
  /* The report starts at the heading's top, not centred against the taller column beside it. */
  .hero {
    align-items: flex-start;
  }
  .hm-report {
    margin-top: 0;
  }
  .hm-report h2 {
    font-size: var(--text-title-page-size);
  }
}
@media (min-width: 1024px) {
  .hm-side {
    gap: 24px;
  }
  main section .with-side > .ad-slot,
  .with-side.hm-side > .ad-slot[data-filled] {
    margin: 0;
  }
  .with-side.hm-side > .ad-slot ins.adsbygoogle {
    min-height: 200px;
  }
  .hm-side:has(> .ad-slot[hidden]) {
    grid-template-columns: minmax(0, 1fr);
  }
}
