/* Give home, product and comparison pages a clear first action. */
html body.sn2-home .sn2-cats-with-chart {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 108px), 1fr));
}

html body.sn2-home .sn2-cats-with-chart a {
  min-inline-size: 0;
  min-block-size: 44px;
}

html body.sn2-home .sn2-cats-with-chart .sn2-cat-chart {
  border-color: color-mix(in srgb, var(--wine) 38%, var(--line));
  background: var(--wash);
  color: var(--wine);
}

.sn2-cat-chart .icon {
  inline-size: 21px;
  block-size: 21px;
}

.sn2-line .sn2-detail-lead > .bpa-actions > .bpa-compare {
  display: none;
}

.sn2-line .sn2-detail-lead > .bpa-actions:not(:has(> :not(.bpa-compare))) {
  display: none;
}

.sn2-line .sn2-detail-lead > .bpa-actions {
  margin-block: 8px 0;
}

.sn2-line .bpa-actions > .sn2-detail-cd.bpa-batch-source {
  margin-block: 0;
  padding-block: 0;
}

.sn2-line .sn2-line-actions {
  display: grid;
  grid-column: 1/-1;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 95px), 1fr));
  align-items: stretch;
  gap: 6px;
}

.sn2-line .sn2-line-actions .sn2-detail-shortcut {
  min-inline-size: 0;
  min-block-size: 44px;
  height: auto;
  justify-content: center;
  text-align: center;
  overflow-wrap: anywhere;
}

.sn2-line .sn2-line-actions .is-official {
  justify-self: end;
}

.sn2-line .sn2-find .sn2-fd-res:focus-visible,
.sn2-home .sn2-pick :is(.sn2-pick-prod select, .sn2-pick-more):focus-visible,
.sn2-home .sn2-cmp-swap:focus-within {
  outline: 2px solid var(--wine);
  outline-offset: 2px;
}

.sn2-cv #facts > .sn2-cv-head {
  margin-block: 0 12px;
}

@media (max-width: 899px) {
  html body.sn2-home .sn2-cats-with-chart {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  html body.sn2-home .sn2-cats-with-chart a {
    display: flex;
    justify-content: center;
    padding: 6px;
    text-align: center;
  }

  .sn2-cats-with-chart .sn2-cat-pic,
  .sn2-cats-with-chart .sn2-cat-chart .icon {
    display: none;
  }

  .sn2-cats-with-chart .sn2-way-t b {
    hyphens: auto;
  }
}

@media (max-width: 599px) {
  html body.sn2-home .sn2-home-top {
    padding-block: 10px 11px;
  }

  html body.sn2-home #main .sn2-home-wrap > .sn2-cat-sec {
    padding-block-start: 12px;
  }

  html body.sn2-home #main .sn2-pick .sn2-pick-prod select {
    min-block-size: 44px;
    font-size: 16px !important;
  }

  html body.sn2-home #main .sn2-pick-more,
  html body.sn2-home #main .sn2-cmp-swap {
    min-block-size: 44px;
  }

  .sn2-line .sn2-line-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-block: 0;
  }

  .sn2-line .sn2-line-actions:not(:has(a[href="#convert"])) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sn2-line .sn2-line-actions .sn2-detail-shortcut {
    padding: 6px 8px;
  }

  .sn2-line .sn2-line-actions .is-official {
    grid-column: 1/-1;
    justify-self: start;
    padding-inline-start: 0;
    color: var(--muted);
    background: transparent;
    border-color: transparent;
  }

  .sn2-line .sn2-lhead > .sn2-find {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    align-items: end;
    gap: 6px 8px;
  }

  .sn2-line .sn2-find > :is(h2, .field:first-of-type, .sn2-fd-note) {
    grid-column: 1/-1;
  }

  .sn2-line .sn2-find > :is(h2, .field, .sn2-fd-res, .sn2-fd-note) {
    min-inline-size: 0;
    margin: 0;
  }

  .sn2-line .sn2-find .sn2-fd-res {
    align-self: stretch;
    min-block-size: 44px;
    gap: 4px;
    padding: 4px 6px;
  }

  .sn2-line .sn2-find .sn2-fd-res .sn2-swatch {
    inline-size: 18px;
    block-size: 18px;
    flex-basis: 18px;
  }

  .sn2-line .sn2-find .sn2-fd-res i {
    font-size: 12px;
  }

  .sn2-cv .sn2-cv-jump {
    margin-block-start: 10px;
  }

  .sn2-cv .sn2-cv-jump a {
    gap: 4px;
    padding: 6px 8px;
  }
}

/* Home results keep the action beside its heading, before the individual matches. */
.sn2-home .sn2-cat-sec .sn2-res:has(> .sn2-res-go) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) fit-content(52%);
  align-items: center;
  gap: 10px 8px;
}

.sn2-home .sn2-cat-sec .sn2-res > .sn2-res-h {
  margin: 0;
  line-height: 1.35;
}

.sn2-home .sn2-cat-sec .sn2-res > .sn2-res-go {
  width: auto;
  min-block-size: 44px;
  height: auto;
  margin: 0;
  padding: 6px 10px;
  text-align: center;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.sn2-home .sn2-cat-sec .sn2-res > .sn2-res-go .icon {
  flex: none;
  inline-size: 14px;
}

.sn2-home .sn2-cat-sec .sn2-res > .sn2-res-row {
  grid-column: 1/-1;
}

.sn2-home .sn2-res-product {
  display: block;
  margin-block-start: 2px;
  color: var(--muted);
  font: 400 11px/1.3 var(--sans);
  overflow-wrap: anywhere;
}

.sn2-home .sn2-cat-sec .sn2-ways.is-fdways a {
  min-block-size: 44px;
}

.sn2-home .sn2-cat-sec.is-fd .sn2-pick-more.is-mobile-more {
  display: none;
}

@media (max-width: 439px) {

  .sn2-home .sn2-home-wrap .section-head > div {
    min-inline-size: 0;
  }

  .sn2-home .sn2-home-wrap .section-head > .sn2-more {
    flex: 0 1 auto;
    max-inline-size: 42%;
    min-inline-size: 0;
    min-block-size: 44px;
    align-items: center;
    margin: 0;
    text-align: end;
    white-space: normal;
    overflow-wrap: anywhere;
    hyphens: auto;
  }
  html body.sn2-home #main .sn2-cat-sec .sn2-pick.is-img .sn2-pick-lines {
    padding-block-start: 8px;
  }

  html body.sn2-home #main .sn2-cat-sec .sn2-pick.is-img .sn2-pl-img {
    inline-size: 44px;
    block-size: 44px;
  }

  html body.sn2-home #main .sn2-cat-sec .sn2-pick.is-img .sn2-pl-name {
    height: auto;
    min-block-size: 14px;
  }

  html body.sn2-home #main .sn2-cat-sec.is-fd .sn2-pick-chips {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    row-gap: 4px;
    padding-block: 6px 4px;
  }

  .sn2-home .sn2-cat-sec.is-fd .sn2-pick-g:is(.is-short, .is-narrow-short) .sn2-pick-chips a:nth-child(n+13) {
    display: none;
  }

  .sn2-home .sn2-cat-sec.is-fd .sn2-pick-g.is-narrow-short .sn2-pick-more.is-mobile-more {
    display: block;
  }

  .sn2-home .sn2-cat-sec.is-fd .sn2-pick-g:not(:has(.sn2-pick-chips a:nth-child(13))) .sn2-pick-more.is-mobile-more {
    display: none;
  }

  html body.sn2-home .sn2-cat-sec .sn2-res {
    padding: 8px 12px 12px;
  }

  .sn2-home .sn2-cat-sec .sn2-res .sn2-res-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  html body.sn2-home .sn2-cat-sec .sn2-res .sn2-res-row > .is-from {
    grid-column: 1/-1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: start;
    gap: 7px;
    min-block-size: 29px;
    padding-inline: 4px;
  }

  .sn2-home .sn2-cat-sec .sn2-res-row > .is-from .sn2-swatch.is-disc {
    inline-size: 21px;
    block-size: 21px;
    margin: 0;
  }

  .sn2-home .sn2-cat-sec .sn2-res-row > i {
    display: none;
  }

  .sn2-home .sn2-cat-sec .sn2-res-row > .sn2-res-link {
    min-inline-size: 0;
    min-block-size: 44px;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    grid-auto-rows: min-content;
    align-self: stretch;
    align-items: center;
    align-content: start;
    justify-items: start;
    gap: 2px 5px;
    padding: 7px 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
  }

  .sn2-home .sn2-cat-sec .sn2-res-row > .sn2-res-link .sn2-swatch.is-disc {
    inline-size: 24px;
    block-size: 24px;
    margin: 0;
  }

  .sn2-home .sn2-cat-sec .sn2-res-row > .sn2-res-link small {
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 12px;
    line-height: 1.15;
  }

  .sn2-home .sn2-cat-sec .sn2-res-row > .sn2-res-link :is(b, .sn2-res-product) {
    grid-column: 1/-1;
  }

  .sn2-home .sn2-cat-sec .sn2-res-row > .sn2-res-link b {
    overflow-wrap: anywhere;
  }

  .sn2-home .sn2-cat-sec .sn2-res-row > .sn2-res-link .sn2-res-product {
    margin: 0;
    font-size: 11px;
  }

  .sn2-home .sn2-cat-sec .sn2-res-row > p {
    grid-column: 1/-1;
  }
}

@media (max-width: 344px) {

  html body.sn2-home #main .sn2-home-top h1.sn2-h1 {
    font-size: 20px !important;
    line-height: 1.24 !important;
  }

  .sn2-home .sn2-cat-sec .sn2-res > .sn2-res-go {
    padding-inline: 7px;
    font-size: 12px;
  }
  html body.sn2-home #main .sn2-cat-sec.is-fd .sn2-pick-chips {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .sn2-home .sn2-cat-sec.is-fd .sn2-pick-g:is(.is-short, .is-narrow-short) .sn2-pick-chips a:nth-child(n+11) {
    display: none;
  }

  .sn2-home .sn2-cat-sec.is-fd .sn2-pick-g.is-narrow-short:has(.sn2-pick-chips a:nth-child(11)) .sn2-pick-more.is-mobile-more {
    display: block;
  }
}
