/* Global header search */

.hub-search {
  position: relative;
  /* Grow/shrink with leftover header space; only clamp extremes. */
  flex: 1 1 12rem;
  width: auto;
  max-width: 16rem;
  min-width: 0;
  margin: 0;
}
.hub-search__input {
  width: 100%;
  min-height: 0;
  height: var(--hub-control-xs);
  padding: 0 var(--hub-pad-chrome-x);
  border: 1px solid var(--hub-border, #9aa3ad);
  border-radius: 6px;
  background: var(--hub-input-bg, var(--hub-surface));
  color: var(--hub-text);
  font: inherit;
  font-size: 0.8rem;
  line-height: 1.2;
}
.hub-search__input:focus {
  outline: 2px solid color-mix(in srgb, var(--hub-accent, #2a6f4e) 45%, transparent);
  outline-offset: 1px;
}
.shell--landing .hub-search {
  flex: 1 1 14rem;
  max-width: 18rem;
  min-width: 0;
}
.shell--landing .hub-search__input {
  padding: calc(0.4rem * var(--hub-density)) calc(0.7rem * var(--hub-density));
  font-size: inherit;
}
.hub-search__results {
  position: absolute;
  z-index: 40;
  top: calc(100% + 0.25rem);
  left: 0;
  right: 0;
  max-height: 22rem;
  overflow: auto;
  border: 1px solid var(--hub-border, #9aa3ad);
  background: var(--hub-dropdown-bg, var(--hub-surface));
  box-shadow: 0 8px 24px color-mix(in srgb, #000 18%, transparent);
}
.hub-search__hit {
  display: grid;
  gap: calc(0.1rem * var(--hub-density));
  padding: var(--hub-pad-cell-y) var(--hub-space-md);
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid color-mix(in srgb, var(--hub-border, #9aa3ad) 55%, transparent);
}
.hub-search__hit:hover,
.hub-search__hit:focus {
  background: color-mix(in srgb, var(--hub-accent, #2a6f4e) 10%, var(--hub-surface, #fff));
}
.hub-search__title {
  font-weight: 600;
  font-size: 0.92rem;
}
.hub-search__sub {
  font-size: 0.78rem;
  color: var(--hub-muted, #5c6670);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hub-search__type {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--hub-muted, #5c6670);
}
.hub-search__empty {
  padding: var(--hub-space-md);
  color: var(--hub-muted, #5c6670);
  font-size: 0.9rem;
}
