/* The approved Emerald concept: quiet ivory, emerald selections, one clear result.
   Scoped after public-editorial.css so legacy hero rules cannot reorder the finder. */
.marketing-home .home-match--refined {
  --finder-paper: #fcfaf6;
  --finder-ink: var(--color-brand-ink);
  --finder-green: var(--color-brand-teal-deep);
  --finder-muted: #52635f;
  --finder-line: #e3ded4;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .4fr);
  align-items: stretch;
  min-height: 116px;
  border: 1px solid var(--finder-line);
  border-radius: 12px;
  color: var(--finder-ink);
  background: var(--finder-paper);
  box-shadow: 0 12px 32px rgb(7 26 32 / 12%);
  backdrop-filter: none;
}

.marketing-home .home-match--refined .home-match__options {
  display: grid;
  grid-template-columns: 1fr .95fr 1.25fr;
  align-items: center;
  min-width: 0;
  padding-block: 20px;
}

.marketing-home .home-match--refined fieldset {
  min-width: 0;
  margin: 0;
  padding: 0 clamp(16px, 1.7vw, 28px);
  border: 0;
}

.marketing-home .home-match--refined fieldset + fieldset {
  border-left: 1px solid var(--finder-line);
}

.marketing-home .home-match--refined legend {
  float: left;
  width: 100%;
  margin: 0 0 12px;
  padding: 0;
  color: var(--finder-muted);
  font: 700 .67rem/1.5 var(--font-body);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.marketing-home .home-match--refined .home-match__options fieldset > .home-match__choices {
  display: flex;
  flex-wrap: nowrap;
  clear: both;
  gap: 8px;
}

.marketing-home .home-match--refined fieldset button {
  display: inline-flex;
  width: auto;
  min-width: 44px;
  min-height: 44px;
  padding: 10px 14px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--finder-line);
  border-radius: 6px;
  color: var(--finder-ink);
  background: transparent;
  box-shadow: none;
  font: 500 .82rem/1.4 var(--font-body);
  white-space: nowrap;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.marketing-home .home-match--refined fieldset button:hover {
  border-color: #79918a;
  background: #f0f3ee;
  transform: none;
}

.marketing-home .home-match--refined fieldset button[aria-pressed="true"] {
  border-color: var(--finder-green);
  color: #fff;
  background: var(--finder-green);
  box-shadow: 0 2px 5px rgb(6 59 56 / 10%);
}

.marketing-home .home-match--refined fieldset button[aria-pressed="true"]:hover {
  background: #074943;
}

.marketing-home .home-match--refined :is(button, a):focus-visible {
  outline: 2px solid var(--color-brand-teal);
  outline-offset: 3px;
}

.marketing-home .home-match--refined .home-match__result {
  position: relative;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 14px;
  min-width: 0;
  min-height: 116px;
  padding: 18px 20px;
  border: 0;
  border-left: 1px solid var(--finder-line);
  color: var(--finder-ink);
  background: transparent;
  text-decoration: none;
  transition: background-color 160ms ease;
}

.marketing-home .home-match--refined .home-match__result:hover {
  background: #f2f3ed;
}

.marketing-home .home-match--refined .home-match__result:focus-visible {
  outline-offset: -5px;
}

.marketing-home .home-match--refined .home-match__result img {
  width: 82px;
  height: 72px;
  border: 0;
  border-radius: 6px;
  object-fit: cover;
  box-shadow: none;
}

.marketing-home .home-match--refined .home-match__result small {
  margin: 0 0 5px;
  color: var(--finder-muted);
  font: 700 .6rem/1.5 var(--font-body);
  letter-spacing: .1em;
}

.marketing-home .home-match--refined .home-match__result strong {
  margin: 0 0 6px;
  overflow: visible;
  color: var(--finder-ink);
  font: 500 clamp(1.1rem, 1.4vw, 1.4rem)/1.15 var(--font-display);
  letter-spacing: -.025em;
  white-space: normal;
  overflow-wrap: anywhere;
  text-overflow: clip;
}

.marketing-home .home-match--refined .home-match__result em {
  color: var(--finder-muted);
  font: 400 .7rem/1.5 var(--font-body);
}

.marketing-home .home-match--refined .home-match__result > i {
  position: static;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  background: var(--finder-green);
  box-shadow: none;
}

.marketing-home .home-match--refined .home-match__status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 801px) and (max-width: 1200px) {
  .marketing-home .home-showcase--build {
    min-height: 760px;
  }
  .marketing-home .home-film-control {
    bottom: 250px;
  }
  .marketing-home .home-film-progress {
    bottom: 236px;
  }
  .marketing-home .home-match--refined {
    grid-template-columns: minmax(0, 1fr);
  }
  .marketing-home .home-match--refined .home-match__options {
    grid-template-columns: 1fr 1fr 1.3fr;
    padding-block: 16px;
  }
  .marketing-home .home-match--refined .home-match__result {
    grid-template-columns: 70px minmax(0, 1fr) 44px;
    min-height: 88px;
    padding: 12px 24px;
    border-top: 1px solid var(--finder-line);
    border-left: 0;
  }
  .marketing-home .home-match--refined .home-match__result img {
    width: 70px;
    height: 56px;
  }
  .marketing-home .home-match--refined .home-match__result strong {
    font-size: 1.3rem;
  }
}

@media (max-width: 800px) {
  .marketing-home .home-match--refined {
    position: relative;
    inset: auto;
    order: 3;
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    margin: 0 clamp(16px, 5vw, 42px) 24px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgb(7 26 32 / 5%);
  }
  .marketing-home .home-match--refined .home-match__options {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: stretch;
    gap: 0;
    padding: 20px 16px;
  }
  .marketing-home .home-match--refined fieldset {
    padding: 0;
    border: 0;
  }
  .marketing-home .home-match--refined fieldset[data-match-group="bedrooms"] {
    grid-column: 1;
    grid-row: 1;
    padding-right: 16px;
    border-right: 1px solid var(--finder-line);
  }
  .marketing-home .home-match--refined fieldset[data-match-group="floors"] {
    grid-column: 2;
    grid-row: 1;
    padding-left: 16px;
    border: 0;
  }
  .marketing-home .home-match--refined fieldset[data-match-group="system"] {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 18px;
    padding-top: 18px;
    border: 0;
    border-top: 1px solid var(--finder-line);
  }
  .marketing-home .home-match--refined legend {
    margin-bottom: 10px;
    font-size: .65rem;
  }
  .marketing-home .home-match--refined .home-match__options fieldset > .home-match__choices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .marketing-home .home-match--refined .home-match__options fieldset[data-match-group="floors"] > .home-match__choices {
    grid-template-columns: minmax(0, 1fr);
  }
  .marketing-home .home-match--refined .home-match__options fieldset[data-match-group="system"] > .home-match__choices {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .marketing-home .home-match--refined fieldset button {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: 10px 6px;
    font-size: .8rem;
  }
  .marketing-home .home-match--refined .home-match__result {
    grid-template-columns: 76px minmax(0, 1fr) 44px;
    min-height: 112px;
    gap: 12px;
    padding: 16px;
    border-top: 1px solid var(--finder-line);
    border-left: 0;
  }
  .marketing-home .home-match--refined .home-match__result img {
    width: 76px;
    height: 68px;
  }
  .marketing-home .home-match--refined .home-match__result strong {
    font-size: 1.25rem;
  }
}

/* Only show a single line of room choices when every target still fits. */
@media (min-width: 560px) and (max-width: 800px) {
  .marketing-home .home-match--refined .home-match__options fieldset[data-match-group="bedrooms"] > .home-match__choices {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .marketing-home .home-match--refined .home-match__options fieldset[data-match-group="floors"] > .home-match__choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 360px) {
  .marketing-home .home-match--refined .home-match__options {
    padding-inline: 12px;
  }
  .marketing-home .home-match--refined fieldset[data-match-group="bedrooms"] {
    padding-right: 10px;
  }
  .marketing-home .home-match--refined fieldset[data-match-group="floors"] {
    padding-left: 10px;
  }
  .marketing-home .home-match--refined .home-match__result {
    grid-template-columns: 60px minmax(0, 1fr) 44px;
    gap: 10px;
    padding: 14px 12px;
  }
  .marketing-home .home-match--refined .home-match__result img {
    width: 60px;
    height: 64px;
  }
  .marketing-home .home-match--refined .home-match__result strong {
    font-size: 1.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .marketing-home .home-match--refined :is(button, a) {
    transition: none;
  }
}
