.herbarium-results-page {
  background: #fcfbf7
}

/* Search-results hero: the curve and overlapping circle are separate elements. */
#main.herbarium-results-page .specimens-page-header {
  min-height: 300px !important;
  padding: 58px 0 112px !important;
  overflow: hidden;
  background: linear-gradient(112deg, #f7f4eb 0%, #f8f6ef 58%, #f5f1e7 100%);
}

#main.herbarium-results-page .specimens-page-header::before,
#main.herbarium-results-page .specimens-page-image,
#main.herbarium-results-page .specimens-page-curve,
#main.herbarium-results-page .specimens-page-curve-secondary {
  display: none;
}

#main.herbarium-results-page .specimens-page-header-inner {
  width: min(1340px, 100%);
  margin: 0;
  padding-left: 110px;
  box-sizing: border-box;
}

#main.herbarium-results-page .specimens-page-header h1 {
  position: relative;
  z-index: 3;
  margin: 0 0 12px;
  font-size: clamp(54px, 5.6vw, 82px);
  line-height: .95;
  letter-spacing: -.045em;
}

#main.herbarium-results-page .specimens-page-header h1::after {
  content: '';
  position: absolute;
  bottom: -7px;
  left: 0;
  width: 42px;
  height: 1.5px;
  background: linear-gradient(90deg, #9b742b, #d5b66d);
  border-radius: 999px;
}

#main.herbarium-results-page .specimens-page-header h1 em {
  color: #b28e4d;
  font-weight: 500;
}

#main.herbarium-results-page .specimens-page-header h1 span {
  color: #164f42;
}

#main.herbarium-results-page .specimens-page-header p:not(.eyebrow) {
  position: relative;
  z-index: 3;
  margin: 0;
  color: #758074;
  font-size: 20px;
}

.results-hero-curve {
  position: absolute;
  /* Keep every hero element inside the upper side of the SVG boundary.
     The solid lower part of this SVG acts as the foreground mask. */
  z-index: 5;
  right: 0;
  bottom: -1px;
  left: 0;
  display: block;
  width: 100%;
  height: 330px;
  overflow: visible;
  pointer-events: none;
}

.results-hero-curve path {
  fill: #fcfbf7;
  stroke: #b49355;
  stroke-opacity: .6;
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
}

.hero-visual-zone {
  position: absolute;
  /* Do not create a stacking context: the ring can sit above the curve while
     the botanical layers remain behind its foreground mask. */
  z-index: auto;
  top: 0;
  right: 0;
  width: min(48vw, 720px);
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.hero-visual-layer,
.hero-visual-ring {
  position: absolute;
  display: block;
  max-width: none;
  height: auto;
  pointer-events: none;
  user-select: none;
}

.hero-visual-sage {
  z-index: 1;
  top: -10%;
  left: -490px;
  width: 76%;
  opacity: .15;
  filter: sepia(.14) hue-rotate(32deg) saturate(.68) contrast(.9);
}

.hero-visual-blush {
  z-index: 3;
  top: calc(18% - 80px);
  left: 32%;
  width: 52%;
  opacity: .41;
  filter: saturate(.72) contrast(.9);
}

.hero-visual-ring {
  z-index: 6;
  top: 84px;
  left: 18%;
  width: 176px;
  overflow: visible;
}

.hero-ring-arc {
  fill: none;
  stroke: #b49355;
  stroke-width: 1.25;
  stroke-linecap: round;
  transform-origin: 88px 88px;
}

.hero-ring-arc--outer {
  fill: #f6f0e2;
  fill-opacity: 1;
  stroke: url('#hero-ring-gold');
  stroke-width: .8;
  stroke-dasharray: none;
  transform: none;
  filter: drop-shadow(0 .5px .6px rgba(111, 77, 19, .1));
}

.hero-ring-leaf {
  opacity: .82;
}

.hero-ring-orbit-dot {
  transform-origin: 88px 88px;
  transform-box: view-box;
}

.hero-ring-orbit-dot--gold {
  color: #c7a45a;
  animation: hero-ring-dot-clockwise 14s linear infinite;
}

.hero-ring-orbit-dot--sage {
  color: #91a89c;
  animation: hero-ring-dot-counter 16s linear infinite;
}

.hero-ring-orbit-dot circle {
  fill: currentColor;
  stroke: #f6f0e2;
  stroke-width: 1;
}

@keyframes hero-ring-dot-clockwise {
  from { transform: rotate(145deg); }
  to { transform: rotate(505deg); }
}

@keyframes hero-ring-dot-counter {
  from { transform: rotate(165deg); }
  to { transform: rotate(-195deg); }
}

/* Match the established accent motion used by primary page headings. */
.results-title-accent-motion {
  opacity: 0;
  filter: blur(20px);
  transform: scale(1.3);
  animation: results-title-accent-in 1s ease 80ms both;
  will-change: opacity, filter, transform;
}

@keyframes results-title-accent-in {
  to {
    opacity: 1;
    filter: blur(.1px);
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .results-title-accent-motion {
    opacity: 1;
    filter: none;
    transform: none;
    animation: none;
    will-change: auto;
  }

  .hero-ring-orbit-dot--gold,
  .hero-ring-orbit-dot--sage {
    animation: none;
  }

  .hero-ring-orbit-dot--gold { transform: rotate(145deg); }
  .hero-ring-orbit-dot--sage { transform: rotate(165deg); }
}

.hero-ring-label {
  fill: #175748;
  font: 600 11.5px/1 'Cormorant Garamond', Georgia, serif;
  letter-spacing: .18em;
}

.hero-visual-botanical {
  /* The botanical artwork stays in front of both watercolor layers. */
  display: none;
  z-index: 4;
  top: -24%;
  left: 38%;
  width: 50%;
  opacity: .82;
  filter: saturate(.78) contrast(.95);
}

@media(max-width:1100px) {
  .hero-visual-zone {
    width: 55%;
  }

  .hero-visual-sage {
    width: 82%;
    opacity: .14;
  }

  .hero-visual-blush {
    left: 30%;
    width: 58%;
    opacity: .47;
  }

  .hero-visual-ring {
    top: 90px;
    left: 14%;
    width: 144px;
  }

  .hero-visual-botanical {
    top: -8%;
    left: 34%;
    width: 64%;
    opacity: .72;
  }
}

@media(max-width:760px) {
  #main.herbarium-results-page .specimens-page-header {
    min-height: 236px !important;
    padding: 48px 0 86px !important;
  }

  #main.herbarium-results-page .specimens-page-header-inner {
    width: calc(100% - 32px);
    margin: 0 auto;
    padding-left: 0;
  }

  #main.herbarium-results-page .specimens-page-header h1 {
    font-size: clamp(44px, 13vw, 62px);
  }

  #main.herbarium-results-page .specimens-page-header h1::after {
    width: 34px;
  }

  #main.herbarium-results-page .specimens-page-header p:not(.eyebrow) {
    font-size: 16px;
  }

  .results-hero-curve {
    height: 118px;
    transform: none;
    width: 100%;
  }

  .hero-visual-zone {
    right: -16%;
    width: 68%;
  }

  .hero-visual-sage {
    top: 14%;
    left: -4%;
    width: 86%;
    opacity: .09;
  }

  .hero-visual-blush {
    display: none;
  }

  .hero-visual-ring {
    top: 108px;
    left: 4%;
    width: 112px;
  }

  .hero-visual-botanical {
    top: 16%;
    left: 38%;
    width: 75%;
    opacity: .48;
  }
}

.herbarium-results-shell {
  padding: 42px 0 64px
}

.herbarium-results-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid #dedfd6
}

.herbarium-results-toolbar .eyebrow {
  margin: 0 0 5px;
  color: #8a713d;
  font-size: 11px
}

.herbarium-results-toolbar h2 {
  margin: 0;
  font: 600 38px/1.1 'Cormorant Garamond', Georgia, serif;
  color: #30412f
}

.herbarium-results-toolbar p {
  margin: 7px 0 0;
  color: #697269;
  font-size: 14px
}

.herbarium-results-toolbar p strong {
  color: #344b32
}

.herbarium-sort {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  color: #61704e;
  font-size: 13px
}

.herbarium-sort select {
  border: 1px solid #cfcdbb;
  border-radius: 6px;
  padding: 9px 28px 9px 10px;
  background: #fffdf6;
  color: #30412f
}

.herbarium-filter-row {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  padding: 18px 0 25px
}

.filter-chip {
  border: 1px solid #d7d4c3;
  border-radius: 20px;
  padding: 7px 12px;
  background: #fffef9;
  color: #68705f;
  font-size: 12px
}

.filter-chip span {
  margin-left: 5px;
  color: #9a967c
}

.filter-chip.is-active {
  border-color: #65764e;
  background: #65764e;
  color: #fff
}

.filter-chip.is-active span {
  color: #e5ead8
}

.herbarium-filter-row>a {
  margin-left: auto;
  color: #63734d;
  font-size: 13px
}

.herbarium-results-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px
}

.herbarium-result-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 15px;
  padding: 14px;
  border: 1px solid #e1dfd3;
  border-radius: 10px;
  background: #fffef9;
  box-shadow: 0 4px 13px #3141290b
}

.result-sheet {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 190px;
  overflow: hidden;
  border-radius: 6px;
  background: #eeece1
}

.result-sheet img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: saturate(.72)
}

.result-sheet span {
  position: absolute;
  bottom: 7px;
  left: 7px;
  padding: 2px 6px;
  border-radius: 3px;
  background: #fffef1e8;
  color: #65705c;
  font-size: 9px
}

.result-family {
  margin: 12px 0 0;
  color: #90794b;
  font-size: 6px;
  letter-spacing: 0em
}

.herbarium-result-card h3 {
  margin: 0;
  font: 600 25px/1.05 'Cormorant Garamond', Georgia, serif;
  color: #30412f
}

.herbarium-result-card h3 i {
  font-style: italic;
}

.herbarium-result-card h3 a,
.result-link {
  color: inherit
}

.result-thai {
  margin: 5px 0 0;
  color: #767c70;
  font-size: 12px
}

.herbarium-result-card ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #737b70;
  font-size: 11px
}

.herbarium-result-card li i {
  width: 15px;
  color: #89966e
}

.result-link {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid #eceae0;
  color: #61704e;
  font-size: 12px
}

.herbarium-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 36px
}

.herbarium-pagination a,
.herbarium-pagination .pagination-disabled {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  box-sizing: border-box;
  padding: 0 8px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #173e33;
  text-decoration: none;
  font: 400 15px/1 var(--herbarium-font-body);
}

.herbarium-pagination a:hover { background:#e9eee4; }
.herbarium-pagination a[aria-current="page"] {
  background: #173e33;
  color: #fff;
  font-weight: 600;
}
.herbarium-pagination a:focus-visible { outline:2px solid #a58140; outline-offset:3px; }
.herbarium-pagination .pagination-disabled { opacity:.3; }
.herbarium-pagination .pagination-gap { display:grid; place-items:center; width:24px; color:#73796f; }

@media(max-width:1050px) {
  .herbarium-results-hero-inner {
    grid-template-columns: 1fr;
    gap: 24px
  }

  .herbarium-results-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }
}

@media(max-width:700px) {
  .herbarium-results-hero {
    padding: 34px 0
  }

  .herbarium-results-title h1 {
    font-size: 45px
  }

  .herbarium-results-toolbar {
    align-items: start;
    flex-direction: column
  }

  .herbarium-sort {
    width: 100%;
    justify-content: space-between
  }

  .herbarium-sort select {
    max-width: 72%
  }

  .herbarium-filter-row>a {
    width: 100%;
    margin: 7px 0 0
  }

  .herbarium-results-grid {
    grid-template-columns: 1fr
  }

  .herbarium-result-card {
    grid-template-columns: 110px minmax(0, 1fr)
  }

  .result-sheet {
    min-height: 178px
  }
}

/* Reference prototype: two equal rectangles layered at the same center point. */
.herbarium-result-card.is-frame-reference {
  position: relative;
  isolation: isolate;
  overflow: visible;
  z-index: 1;
  border: 1px solid #d6c9ad;
  border-radius: 0;
  background: #fffef9;
  box-shadow: 0 5px 12px rgba(50, 45, 35, .10);
}

.herbarium-result-card.is-frame-reference>* {
  position: relative;
  z-index: 2;
}

.herbarium-result-card.is-frame-reference::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  box-sizing: border-box;
  border: 1px solid #d6c9ad;
  border-radius: 0;
  transform: rotate(3deg);
  box-shadow: 0 5px 12px rgba(50, 45, 35, .10);
  pointer-events: none;
}

.herbarium-result-card.is-frame-reference::before {
  content: "";
  position: absolute;
  z-index: 3;
  top: -18px;
  right: -32px;
  width: calc(36% - 5px);
  aspect-ratio: 1;
  background: url("../img/search-card-botanical-v2.png") center / contain no-repeat;
  opacity: .55;
  transform:scaleX(1);
  pointer-events: none;
}

.herbarium-result-card.is-frame-reference>div {
  padding-top: 25px;
  padding-right: 38px;
  transform: translateX(15px);
}

@media(max-width:700px) {
  .herbarium-result-card.is-frame-reference::before {
    top: -10px;
    right: -25px;
    width: calc(29% - 5px);
    opacity: .55;
  }

  .herbarium-result-card.is-frame-reference>div {
    padding-top: 18px;
    padding-right: 24px;
  }
}

@media(max-width:700px) {
  .herbarium-results-grid {
    gap: 22px
  }
}

/* First-card content hierarchy refined from the approved reference. */
.herbarium-result-card.is-frame-reference {
  grid-template-columns: 127px minmax(0, 1fr);
  gap: 20px;
  border-width: 2px;
}

.herbarium-result-card.is-frame-reference>.result-sheet {
  width: 127px;
  min-height: 200px;
  align-self: center;
  transform: translate(10px, -5px);
}

.herbarium-result-card.is-frame-reference h3 {
  color: #3c4934;
  font: 600 23px/1.04 'Cormorant Garamond', Georgia, serif;
  letter-spacing: -.02em;
}

.herbarium-result-card.is-frame-reference .result-thai {
  margin-top: 5px;
  color: #9b8d7c;
  font-size: 14px;
  line-height: 1.35;
}

.herbarium-result-card.is-frame-reference .result-family {
  position: relative;
  margin: 8px 0 0;
  padding-bottom: 1px;
  color: #5a3a20;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .05em;
}

.herbarium-result-card.is-frame-reference ul {
  position:relative;
  margin-top:6px;
  padding-top:6px;
  gap:2px;
  color:#71685d;
  font-size:13px;
}
.herbarium-result-card.is-frame-reference ul::before {
  content:"";
  position:absolute;
  top:0;
  left:0;
  width:76%;
  height:1px;
  background:#8e9a81;
}

.herbarium-result-card.is-frame-reference ul li:first-child {
  color: #40543b;
}

.herbarium-result-card.is-frame-reference ul li i {
  color: #7b8e69;
}

@media(max-width:700px) {
  .herbarium-result-card.is-frame-reference {
    grid-template-columns: 105px minmax(0, 1fr);
    gap: 17px;
  }

  .herbarium-result-card.is-frame-reference>.result-sheet {
    width: 105px;
    min-height: 173px;
  }

  .herbarium-result-card.is-frame-reference h3 {
    font-size: 23px;
  }
}
/* Prototype card: retain its canvas while reducing the specimen panel slightly. */
.herbarium-result-card.is-frame-reference {
  min-height:232px;
}
.herbarium-result-card.is-frame-reference > .result-sheet {
  min-height:195px;
}
.herbarium-result-card.is-frame-reference .result-link {
  position:absolute;
  right:18px;
  bottom:16px;
  display:grid;
  justify-content:center;
  place-items:center;
  width:25px;
  height:25px;
  margin:0;
  padding:0;
  border:0;
  color:#fff;
  border-radius:50%;
  background:#8a725d;
  font-size:12px;
  line-height:1;
}
@media(max-width:700px) {
  .herbarium-result-card.is-frame-reference { min-height:205px; }
  .herbarium-result-card.is-frame-reference > .result-sheet { min-height:168px; }
  .herbarium-result-card.is-frame-reference .result-link { right:12px; bottom:11px; }
}
.herbarium-result-card.is-frame-reference h3,
.herbarium-result-card.is-frame-reference .result-thai {
  transform:translateY(-5px);
}
.herbarium-result-card.is-frame-reference .result-link > i {
  display:grid;
  place-items:center;
  width:100%;
  height:100%;
  font-size:12px;
  line-height:1;
  transform:none;
}
.herbarium-result-card.is-frame-reference {
  transition:transform .24s ease, box-shadow .24s ease;
}
.herbarium-result-card.is-frame-reference:hover {
  transform:translateY(-5px);
  box-shadow:0 9px 18px rgba(50, 45, 35, .13);
}

/* Live records use the approved card hierarchy without generic paragraph spacing. */
.herbarium-result-card.is-frame-reference > .result-sheet {
  margin:0;
  padding:0;
  height:195px;
  overflow:hidden;
}
.herbarium-result-card.is-frame-reference > .result-copy {
  padding-top:18px;
  padding-bottom:14px;
  min-width:0;
}
.herbarium-result-card.is-frame-reference .result-copy > .eyebrow {
  margin:0 0 10px;
  font-size:11px;
  line-height:1.3;
}
.herbarium-result-card.is-frame-reference .result-metadata {
  margin-top:12px;
  padding-top:10px;
  gap:7px;
  line-height:1.55;
  overflow-wrap:anywhere;
}
.herbarium-result-card.is-frame-reference .result-metadata li { margin:0; }
@media(max-width:700px) {
  .herbarium-result-card.is-frame-reference > .result-sheet { height:168px; }
  .herbarium-result-card.is-frame-reference > .result-copy { padding-top:12px; padding-bottom:10px; }
}

.results-main-search { margin:0 0 32px; max-width:820px; }
.results-main-search > label { display:block; margin-bottom:10px; color:#304b3c; font-family:var(--herbarium-font-body); font-size:16px; font-weight:600; }
.results-main-search-field { display:flex; gap:6px; padding:6px; border:1px solid #d8d6c8; border-radius:8px; background:#fffef9; box-shadow:0 3px 14px rgba(50,45,35,.04); }
.results-main-search-field:focus-within { border-color:#7b8e69; outline:2px solid #7b8e6926; }
.results-main-search input { flex:1; min-width:0; border:0; background:transparent; padding:12px 16px; font-family:var(--herbarium-font-body); font-size:16px; color:#263e2d; outline:none; }
.results-main-search button { display:flex; align-items:center; gap:22px; border:0; border-radius:5px; padding:12px 24px; background:#315a44; color:#fff; font-family:var(--herbarium-font-body); font-size:16px; cursor:pointer; }
.results-main-search button:hover { background:#224732; }
.results-main-search button:focus-visible { outline:2px solid #8f7841; outline-offset:3px; }
@media(max-width:700px) {
 .results-main-search { max-width:none; margin-bottom:24px; }
 .results-main-search input { padding:10px 8px; font-size:16px; }
 .results-main-search button { padding:10px 16px; gap:8px; }
}

/* Filters refine the current search in a modal side panel. */
.results-filter-tools { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:0 0 16px; }
.results-filter-toggle { border:1px solid #b8bca9; border-radius:6px; padding:10px 18px; background:#fffef9; color:#315a44; font:500 15px/1.4 var(--herbarium-font-body); cursor:pointer; }
.results-filter-toggle:hover { background:#f0f3e9; }
.results-filter-tools a, .results-active-filters > a { color:#49634b; text-decoration:none; font-size:14px; }
.results-active-filters { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-bottom:26px; }
.results-active-filters:empty { display:none; }
.results-active-filters .results-filter-chip { display:inline-block; padding:6px 12px; border:1px solid #d9ddce; border-radius:20px; background:#edf1e7; color:#315a44; font-size:14px; }
.results-filter-chip:hover { background:#e2e9d8; }
.results-filter-panel { box-sizing:border-box; position:fixed; inset:0 0 0 auto; margin:0; width:min(440px,100%); max-width:100%; height:100dvh; max-height:100dvh; border:0; padding:28px; background:#fcfbf7; color:#30412f; box-shadow:-12px 0 45px #1c30282b; overflow-y:auto; }
.results-filter-panel::backdrop { background:rgba(25,40,30,.38); }
.results-filter-panel-header { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.results-filter-panel-header h2 { margin:0; font:600 24px/1.5 var(--herbarium-font-body); }
.results-filter-panel-header button { border:0; background:transparent; color:#53674e; width:40px; height:40px; font:400 30px/1 var(--herbarium-font-body); cursor:pointer; }
.results-filter-context { margin:8px 0 28px; color:#737b70; font-size:14px; line-height:1.6; }
.results-filter-panel .results-filter-form { display:grid; gap:20px; margin:0; padding:0; border:0; }
.results-filter-form label { display:grid; gap:8px; color:#40533c; font-size:15px; font-weight:500; }
.results-filter-form select { box-sizing:border-box; width:100%; padding:11px 12px; border:1px solid #d8d6c8; border-radius:5px; background:#fffef9; color:#30412f; font:400 16px/1.4 var(--herbarium-font-body); }
.results-filter-form select:disabled { color:#96998e; background:#eeeee6; }
.results-filter-form .filter-chip { border:0; border-radius:5px; background:#315a44; color:#fff; padding:12px; margin-top:8px; font:500 16px/1.5 var(--herbarium-font-body); cursor:pointer; }
.results-filter-panel .results-filter-form > a { margin:0; width:auto; text-align:center; color:#49634b; font:400 14px/1.5 var(--herbarium-font-body); }
html:has(.results-filter-panel[open]) { overflow:hidden; }
.results-filter-toggle:focus-visible, .results-filter-chip:focus-visible { outline:2px solid #8f7841; outline-offset:3px; }
@media(max-width:700px) {
 .results-filter-panel { padding:22px; }
 .results-filter-tools { flex-wrap:wrap; }
 .results-database-back { font-size:12px; }
}

/* A single action row, with a gentle modal entrance and exit. */
.results-database-back { display:inline-block; margin-bottom:18px; color:#73806d; font-size:13px; text-decoration:none; }
.results-database-back:hover { color:#315a44; text-decoration:none; }
.herbarium-results-toolbar { align-items:flex-end; gap:24px; padding-bottom:20px; border-bottom:1px solid #e2e2d5; margin-bottom:20px; }
.herbarium-results-toolbar .results-filter-tools { justify-content:flex-end; flex-wrap:wrap; gap:14px; margin:0 0 4px; }
.results-filter-toggle { display:inline-flex; align-items:center; justify-content:center; gap:9px; min-height:44px; background:#f1f4eb; border-color:#d5ddc9; border-radius:8px; white-space:nowrap; transition:background .2s ease,border-color .2s ease; }
.results-filter-toggle:hover { background:#e6ecdd; border-color:#a9bb98; }
.results-filter-toggle [data-filter-count]:empty { display:none; }
.results-filter-tools .herbarium-sort { gap:10px; font-size:13px; color:#73806d; }
.results-filter-tools .herbarium-sort select { min-height:44px; background:#fffef9; border-radius:8px; border:1px solid #deded0; padding:9px 12px; }
.results-filter-panel { opacity:0; transform:translateX(32px); transition:opacity 260ms ease,transform 260ms cubic-bezier(.22,.61,.36,1); }
.results-filter-panel.is-visible { opacity:1; transform:translateX(0); }
.results-filter-panel::backdrop { background:rgba(25,40,30,0); transition:background 260ms ease; }
.results-filter-panel.is-visible::backdrop { background:rgba(25,40,30,.38); }
.results-filter-panel-header { padding-bottom:16px; border-bottom:1px solid #e2e2d5; }
.results-filter-panel-header button { border-radius:50%; background:#eff1e8; transition:background .2s ease; }
.results-filter-panel-header button:hover { background:#e2e8d8; }
.results-filter-context { margin-top:18px; }
@media(max-width:700px) {
 .herbarium-results-toolbar .results-filter-tools { width:100%; justify-content:space-between; align-items:center; gap:12px; }
 .results-filter-tools .herbarium-sort { width:auto; flex:1; justify-content:flex-end; }
 .results-filter-tools .herbarium-sort select { max-width:100%; width:100%; }
 .results-filter-tools .herbarium-sort { flex-direction:column; align-items:flex-end; gap:5px; }
}
@media(prefers-reduced-motion:reduce) {
 .results-filter-panel, .results-filter-panel::backdrop { transition:none; transform:none; }
}

.herbarium-results-grid { transition:opacity .18s ease; }
.herbarium-results-grid[aria-busy="true"] { opacity:.45; pointer-events:none; }
.results-filter-feedback, .results-load-status { color:#536b4f; font:400 14px/1.6 var(--herbarium-font-body); }
.results-filter-feedback:empty, .results-load-status:empty { display:none; }
.results-filter-feedback { margin:0; }
.results-load-status { margin:0 0 16px; }
@media(prefers-reduced-motion:reduce) { .herbarium-results-grid { transition:none; } }

.results-main-search { margin-bottom:12px; }
.results-advanced-search { max-width:100%; margin:0 0 32px; }
.results-advanced-search > summary { display:flex; align-items:center; gap:10px; width:fit-content; cursor:pointer; color:#49634b; font:500 14px/1.5 var(--herbarium-font-body); list-style:none; padding:4px 0; }
.results-advanced-search > summary::-webkit-details-marker { display:none; }
.results-advanced-search > summary span { transition:transform .2s ease; }
.results-advanced-search[open] > summary span { transform:rotate(45deg); }
.results-advanced-form { margin-top:14px; padding:24px; border:1px solid #deded0; border-radius:8px; background:#f5f5ec; }
.results-advanced-form > p { margin:0 0 20px; font-size:14px; color:#737b70; }
.results-advanced-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
.results-advanced-fields label { display:grid; gap:8px; font:500 14px/1.5 var(--herbarium-font-body); color:#40533c; }
.results-advanced-fields input { box-sizing:border-box; width:100%; min-width:0; padding:11px 12px; border:1px solid #d8d6c8; border-radius:5px; background:#fffef9; color:#30412f; font:400 16px/1.4 var(--herbarium-font-body); }
.results-advanced-actions { display:flex; flex-wrap:wrap; align-items:center; gap:14px; margin-top:24px; }
.results-advanced-actions button { border:0; padding:11px 20px; border-radius:5px; font:500 15px/1.5 var(--herbarium-font-body); cursor:pointer; }
.results-advanced-actions button[type="submit"] { background:#315a44; color:white; }
.results-advanced-actions button[type="reset"] { background:transparent; color:#65705c; }
.results-advanced-fields input:focus-visible, .results-advanced-search summary:focus-visible { outline:2px solid #8f7841; outline-offset:3px; }
@media(max-width:1050px) { .results-advanced-fields { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) { .results-advanced-fields { grid-template-columns:1fr; gap:16px; } .results-advanced-form { padding:18px; } }
@media(prefers-reduced-motion:reduce) { .results-advanced-search > summary span { transition:none; } }

.results-advanced-search { overflow:hidden; }
.results-advanced-search[data-closing="true"] > summary span { transform:rotate(0); }

.results-advanced-fields select { box-sizing:border-box; width:100%; min-width:0; padding:11px 12px; border:1px solid #d8d6c8; border-radius:5px; background:#fffef9; color:#30412f; font:400 16px/1.4 var(--herbarium-font-body); }
.results-advanced-fields select:disabled { background:#eeeee6; color:#96998e; }
.results-advanced-fields select:focus-visible { outline:2px solid #8f7841; outline-offset:3px; }
.advanced-location-status:empty { display:none; }
.advanced-location-status { color:#925315; font-size:14px; }

.result-sheet > a { display:grid; place-items:center; width:100%; height:100%; color:inherit; }
.result-sheet > a:focus-visible { outline:2px solid #8f7841; outline-offset:-3px; }

/* Share the mega-search field grouping and type styles with the header panel. */
.results-advanced-form.results-advanced-mega {background:#eef2e8;border-color:#d5ddcd;}
.results-advanced-query {margin-bottom:24px;}
.results-advanced-mega .results-advanced-fields {padding-top:24px;border-top:1px solid #ccd6c3;}
.results-advanced-mega .results-advanced-actions {margin:0;}
.results-advanced-mega .header-search-mega-footer {margin-top:8px;}
.results-advanced-query input:focus {outline:none;box-shadow:none;}

/* Search and advanced-search action share one row, matching Living's placement. */
.results-search-row {display:flex;align-items:stretch;gap:16px;margin-bottom:20px;}
.results-search-row .results-main-search {flex:1;min-width:0;max-width:none;margin:0;}
.results-search-row .results-main-search-field {height:100%;box-sizing:border-box;}
.results-search-row .results-main-search > .sr-only {position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;}
.results-advanced-toggle {display:inline-flex;align-items:center;justify-content:center;gap:12px;flex-shrink:0;padding:14px 22px;border:1px solid #bdc9b1;border-radius:7px;background:#315a44;color:#fff;font:600 16px/1.5 var(--herbarium-font-body);cursor:pointer;transition:background .2s ease;}
.results-advanced-toggle:hover,.results-advanced-toggle[aria-expanded="true"] {background:#244832;}
.results-advanced-toggle:focus-visible {outline:2px solid #8f7841;outline-offset:3px;}
.results-advanced-chevron {transition:transform .25s ease;}
.results-advanced-toggle[aria-expanded="true"] .results-advanced-chevron {transform:rotate(180deg);}
.results-advanced-search > summary {display:none;}
.results-advanced-search:not([open]) {margin-bottom:24px;}
.results-advanced-form.results-advanced-mega {margin-top:0;}
@media(max-width:600px) {
 .results-search-row {flex-wrap:wrap;gap:10px;}
 .results-search-row .results-main-search {flex-basis:100%;}
 .results-advanced-toggle {margin-left:auto;padding:10px 16px;font-size:14px;}
}
@media(prefers-reduced-motion:reduce) {.results-advanced-toggle,.results-advanced-chevron {transition:none;}}

/* Match the Database hero's search controls. */
.results-search-row {gap:16px;}
.results-search-row .results-main-search-field {display:flex;align-items:center;gap:0;height:64px;padding:0;overflow:hidden;border:1px solid rgba(70,111,100,.48);border-radius:999px;background:rgba(255,255,255,.55);box-shadow:0 7px 22px rgba(37,58,49,.035);}
.results-main-search-field > i {flex-shrink:0;margin-left:24px;font-size:23px;color:#16453c;}
.results-search-row .results-main-search input {padding:0 16px;border:0;background:transparent;color:#274a41;font:400 17px/1.4 var(--herbarium-font-body);outline:none;box-shadow:none;}
.results-search-row .results-main-search button {display:grid;place-items:center;flex:0 0 64px;width:64px;height:64px;padding:0;border:0;border-radius:50%;background:#064333;color:#fff;font-size:32px;line-height:1;}
.results-search-row .results-main-search button span {transform:translateY(-2px);}
.results-search-row .results-main-search-field:focus-within {outline:none;}
.results-search-row .results-advanced-toggle {gap:12px;padding:12px 20px;border:1px solid #9dae94;border-radius:8px;background:rgba(255,253,247,.65);color:#315a44;font:500 15px/1.5 var(--herbarium-font-body);}
.results-search-row .results-advanced-toggle:hover,.results-search-row .results-advanced-toggle[aria-expanded="true"] {background:#e4ecdb;border-color:#7d9570;}
@media(max-width:760px) {
 .results-search-row .results-main-search-field {height:56px;}
 .results-search-row .results-main-search button {flex-basis:56px;width:56px;height:56px;}
 .results-main-search-field > i {margin-left:18px;font-size:18px;}
 .results-search-row .results-advanced-toggle {padding:10px 16px;font-size:14px;}
}

.results-range { margin:0 0 22px; color:#697269; font-size:14px; }
.results-range:empty { display:none; }
.results-empty { grid-column:1 / -1; padding:36px 24px; border:1px solid #dedfd6; background:#f5f5ec; text-align:center; }
.results-empty h3 { margin:0 0 10px; color:#30412f; font-size:22px; }
.results-empty p { margin:0 0 18px; color:#697269; }
.results-empty a { display:inline-block; padding:10px 18px; border-radius:6px; background:#315a44; color:#fff; }

/* Match the letterbox area to the image placeholder state. */
.herbarium-result-card .result-sheet[data-image-state="missing"] { background:#eeefea; }
.herbarium-result-card .result-sheet[data-image-state="failed"] { background:#f8e8c8; }
.result-sheet[data-image-state] img { filter:none; }

