.plant-finder {
  padding-block: clamp(44px, 5.7vw, 95px);
  background: var(--paper);
  scroll-margin-top: 18px;
}
.finder-spread {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  grid-template-areas: "photo form";
  max-width: 1680px;
  margin-inline: auto;
  background: #f0ecdf;
}
.finder-form {
  grid-area: form;
  min-width: 0;
  align-self: center;
  padding: clamp(30px, 3.9vw, 72px);
}
.finder-overline {
  display: flex;
  align-items: center;
  gap: .65rem;
  color: #515942;
  font: 600 .76rem/1.5 var(--sans);
  letter-spacing: .13em;
  text-transform: uppercase;
}
.finder-overline .line { width: 24px; flex-shrink: 0 }
#finder-heading {
  margin: .95rem 0 1.35rem;
  max-width: 15ch;
  font: 400 clamp(3rem, 4.4vw, 5.6rem)/.99 var(--serif);
  letter-spacing: -.035em;
  scroll-margin-block-start: 1.4rem;
}
#finder-heading:focus { outline: none }
.finder-options { border-top: 1px solid #b4b59e }
.finder-option {
  width: 100%;
  min-height: 49px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  border: 0;
  border-bottom: 1px solid #b4b59e;
  background: transparent;
  color: var(--ink);
  text-align: left;
  padding: .8rem .35rem .8rem 0;
  cursor: pointer;
  font: 500 clamp(.96rem, 1.08vw, 1.15rem)/1.35 var(--sans);
  transition: background .13s, padding .13s;
}
.finder-option::after { content: "→"; flex-shrink: 0; font-size: 1.16rem; line-height: 1 }
.finder-option:hover { padding-left: .65rem; background: #e4e3d0 }
.plant-finder button:focus-visible, .plant-finder summary:focus-visible, .plant-finder a:focus-visible {
  outline: 3px solid #865123;
  outline-offset: 3px;
  position: relative;
  z-index: 1;
}
.finder-photo {
  grid-area: photo;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 0;
  min-height: clamp(425px, 33vw, 570px);
  background: #414a38;
}
.finder-photo img, .finder-photo::after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.finder-photo img { display: block; object-fit: cover }
.finder-photo::after {
  content: "";
  background: linear-gradient(0deg, #101709ae, transparent 31%);
  pointer-events: none;
}
.finder-photo figcaption {
  position: absolute;
  isolation: isolate;
  z-index: 1;
  bottom: clamp(16px, 1.6vw, 27px);
  left: clamp(17px, 2.1vw, 35px);
  right: 17px;
  color: #fffdf1;
  font: italic clamp(1.23rem, 1.5vw, 1.75rem)/1.2 var(--serif);
  text-shadow: 0 1px 4px #152113;
}
.finder-history, .finder-result-actions { display: flex; align-items: center; gap: 1.15rem; flex-wrap: wrap }
.finder-history { margin-top: 1.15rem }
.finder-history button, .finder-text-link, .finder-remove {
  display: inline-block;
  border: 0;
  background: transparent;
  color: #414938;
  padding: .25rem 0;
  font: 500 .86rem/1.4 var(--sans);
  text-decoration: underline;
  text-underline-offset: .22em;
  cursor: pointer;
}
.finder-history button:first-child::before { content: "←"; display: inline-block; padding-right: .35rem }
.plant-finder [hidden] { display: none }
.finder-copy { max-width: 42ch; color: #414938; font-size: 1.02rem; line-height: 1.55; text-wrap: pretty }
.finder-copy + .finder-options, .finder-result-actions { margin-top: 1.2rem }
.finder-add, .finder-email {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  min-height: 44px;
  border: 1px solid var(--dark);
  padding: .7rem 1.15rem;
  background: var(--dark);
  color: #fbfaf3;
  font: 500 .93rem/1.38 var(--sans);
  cursor: pointer;
  text-decoration: none;
}
.finder-add:hover, .finder-email:hover { background: #475538 }
.finder-add[aria-pressed="true"] { background: transparent; color: var(--ink) }
.finder-list { max-width: 1680px; margin: 14px auto 0; border-block: 1px solid var(--rule) }
.finder-list summary {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 2px;
  cursor: pointer;
  font: 400 1.7rem/1.2 var(--serif);
  list-style: none;
}
.finder-list summary::-webkit-details-marker { display: none }
#finder-count { margin-left: .24rem; color: var(--muted); font: 500 .9rem var(--sans); vertical-align: middle }
.finder-expand { font: 400 1.4rem/1 var(--sans) }
.finder-list[open] .finder-expand { transform: rotate(45deg) }
.finder-list-body { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; padding-block: 0 1.35rem }
.finder-list-body > div { min-width: 0 }
#finder-list-note { margin: .25rem 0 .45rem; color: var(--muted); font: 400 .94rem/1.5 var(--sans) }
#finder-selections { margin: 0; padding: 0; list-style: none }
#finder-selections li { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .85rem; font-size: 1rem; overflow-wrap: anywhere }
.finder-remove { font-size: .8rem }
.finder-email { flex-shrink: 0 }
.finder-sr { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(100%); white-space: nowrap }
@media (max-width: 900px) {
  .finder-spread { grid-template-columns: minmax(0,.85fr) minmax(0,1fr) }
  .finder-form { padding: clamp(24px, 3.4vw, 38px) }
  #finder-heading { font-size: clamp(2.7rem, 5.5vw, 4rem) }
}
@media (max-width: 660px) {
  .plant-finder { padding-block: 35px }
  .finder-spread { grid-template-columns: 1fr; grid-template-areas: "photo" "form" }
  .finder-form { padding: clamp(20px, 5.5vw, 32px) }
  .finder-photo { min-height: 0; height: clamp(150px, 46vw, 260px) }
  .finder-photo figcaption { left: clamp(16px, 5vw, 24px); bottom: 12px; font-size: 1.2rem }
  #finder-heading { margin: .65rem 0 1.05rem; font-size: clamp(2.65rem, 9vw, 3.75rem) }
  .finder-option { min-height: 48px }
  .finder-list-body { flex-direction: column; gap: .85rem }
}

.illustrated-options {
  border: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.illustrated-options .finder-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr;
  align-items: end;
  align-content: start;
  gap: 7px 6px;
  border: 1px solid #c3c3ad;
  padding: clamp(10px, 1vw, 17px);
  background: #f9f7ec;
  font-size: clamp(.93rem, 1.03vw, 1.08rem);
  line-height: 1.28;
  transition: border-color .15s, background-color .15s;
}
.choice-drawing {
  display: block;
  grid-column: 1 / -1;
  width: clamp(74px, 6.2vw, 96px);
  max-width: 100%;
  height: auto;
  aspect-ratio: 72 / 56;
}
.illustrated-options .finder-option:hover,
.illustrated-options .finder-option:focus-visible {
  background: #e9ecd8;
  border-color: #818e69;
}
.illustrated-options .finder-option::after {
  font-size: 1.05rem;
  align-self: end;
  color: #505e40;
}
.illustrated-options .finder-option:only-child { grid-column: 1 / -1 }
@media (min-width: 661px) and (max-width: 830px), (max-width: 350px) {
  .illustrated-options { grid-template-columns: 1fr; gap: 5px }
  .illustrated-options .finder-option {
    grid-template-columns: 55px minmax(0, 1fr) auto;
    grid-template-rows: auto;
    align-items: center;
    gap: 9px;
    padding: 5px 11px 5px 6px;
  }
  .illustrated-options .choice-drawing { grid-column: 1; width: 55px }
  .illustrated-options .finder-option::after { align-self: center }
}
/* Keep the full caption width available for plant names. */
@media (min-width:831px), (min-width:351px) and (max-width:660px) {
  .illustrated-options .choice-drawing { grid-column: 1; grid-row: 1 }
  .illustrated-options .choice-label { grid-column: 1 / -1; grid-row: 2 }
  .illustrated-options .finder-option::after { grid-column: 2; grid-row: 1; align-self: center }
  .illustrated-options .finder-option:last-child:nth-child(3) {
    grid-column: 1 / -1;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto;
    align-items: center;
    gap: 12px;
  }
  .illustrated-options .finder-option:last-child:nth-child(3) .choice-label { grid-row: 1; grid-column: 2 }
  .illustrated-options .finder-option:last-child:nth-child(3)::after { grid-column: 3 }
}
