/* ============================================================
   Site search results — the dropdown under every search box.
   Uses only the page's own tokens (--secondary, --heading, --r-*)
   so it reads as part of the header, not a bolt-on.
   ============================================================ */

.search-panel { width: min(420px, 92vw); }

.search-results {
  margin-top: .55rem;
  max-height: min(60vh, 420px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border-top: 1px solid rgba(8, 60, 113, .08);
  padding-top: .35rem;
}

/* the page a run of hits belongs to */
.search-group {
  font-size: var(--fs-xs, .75rem);
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--secondary, #1c84f5);
  padding: .7rem .55rem .3rem;
}
.search-group:first-child { padding-top: .25rem; }

.search-hit {
  display: block;
  padding: .55rem .55rem .6rem .7rem;
  border-radius: var(--r-sm, 10px);
  border-left: 2px solid transparent;
  text-decoration: none;
  transition: background-color .2s ease, border-color .2s ease, transform .2s cubic-bezier(.16, 1, .3, 1);
}
.search-hit:hover,
.search-hit:focus-visible,
.search-hit[aria-selected="true"] {
  background: var(--bg-alt, #eaf4fe);
  border-left-color: var(--secondary, #1c84f5);
  transform: translateX(2px);
}
.search-hit:focus-visible { outline: 2px solid var(--secondary, #1c84f5); outline-offset: 2px; }
.search-hit:active { transform: translateX(2px) scale(.995); }

.search-hit-title {
  display: block;
  font-size: var(--fs-base, .875rem);
  font-weight: 600;
  line-height: 1.35;
  color: var(--heading, #1d1729);
}
.search-hit-text {
  display: block;
  margin-top: .2rem;
  font-size: var(--fs-sm, .8125rem);
  line-height: 1.55;
  color: var(--text, #5c5c5d);
}
.search-hit-text mark {
  background: rgba(28, 132, 245, .16);
  color: var(--heading, #1d1729);
  border-radius: var(--r-hairline, 2px);
  padding: 0 .1em;
}

.search-note {
  padding: .7rem .55rem .2rem;
  font-size: var(--fs-base, .875rem);
  color: var(--heading, #1d1729);
}
.search-suggest {
  padding: 0 .55rem .5rem;
  font-size: var(--fs-sm, .8125rem);
  color: var(--text, #5c5c5d);
}
.search-suggest a {
  color: var(--secondary, #1c84f5);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.search-suggest a:hover, .search-suggest a:focus-visible { color: var(--primary, #083c71); }

/* ---- mobile drawer search ---- */
.mobile-search {
  position: relative;
  padding: .9rem 1.25rem .35rem;
}
.mobile-search .search-results {
  max-height: 45vh;
  margin-top: .4rem;
}

@media (prefers-reduced-motion: reduce) {
  .search-hit { transition: background-color .2s ease, border-color .2s ease; }
  .search-hit:hover,
  .search-hit:focus-visible,
  .search-hit[aria-selected="true"],
  .search-hit:active { transform: none; }
}
