/* THE SITE-SEARCH OVERLAY (W392).
 *
 * One central query for PAGES — guides, tools, references. A database appears
 * only as a destination line, never as rows: each table has its own columns and
 * its own layout, and flattening three of them into one dropdown would say less
 * about each than the tables already say properly.
 */
.hp-nav-search {
  appearance: none; border: none; background: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 9px; margin-left: 4px;
  color: var(--muted);
  transition: background .18s, color .18s;
}
.hp-nav-search:hover { background: var(--accent-tint); color: var(--accent-ink); }

.ss-overlay {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(11, 20, 28, .45);
  backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 12vh 20px 20px;
}
.ss-overlay[hidden] { display: none; }

.ss-panel {
  width: 100%; max-width: 620px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow-float);
  overflow: hidden;
}

.ss-field {
  display: flex; align-items: center; gap: 11px;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.ss-field input {
  flex: 1; border: none; background: none; outline: none;
  font-family: var(--font-ui); font-size: 15px; color: var(--ink);
}
.ss-field input::placeholder { color: var(--muted); }
.ss-close {
  appearance: none; cursor: pointer;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 6px; padding: 3px 7px;
}

/* Bounded, and scrolls inside itself: a result list that grows the panel past
   the fold puts the last answers somewhere the reader cannot see. */
.ss-results { max-height: 52vh; overflow-y: auto; padding: 6px; }

.ss-group {
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  padding: 10px 12px 5px;
}
.ss-item {
  display: block; text-decoration: none; color: inherit;
  padding: 9px 12px; border-radius: 10px;
}
.ss-item:hover, .ss-item.is-on { background: var(--accent-tint); }
.ss-item-t { font-size: 14px; font-weight: 600; color: var(--ink); }
.ss-item-s {
  font-size: 12.5px; color: var(--muted); line-height: 1.45; margin-top: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}

/* A DESTINATION, not a row (see site_search.py). It reads as a way INTO a table
   rather than as an answer, so it is styled as an action with a count. */
.ss-dest {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  text-decoration: none; color: inherit;
  padding: 9px 12px; border-radius: 10px;
}
.ss-dest:hover, .ss-dest.is-on { background: var(--accent-tint); }
.ss-dest-t { font-size: 14px; font-weight: 600; color: var(--accent-ink); }
.ss-dest-n {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  color: #fff; background: var(--gradient);
  border-radius: 100px; padding: 2px 9px;
}

.ss-empty { padding: 22px 14px; text-align: center; color: var(--muted); font-size: 13.5px; }
.ss-hint { padding: 14px; text-align: center; color: var(--muted); font-size: 12.5px; }

@media (max-width: 700px) {
  .ss-overlay { padding: 8vh 12px 12px; }
  .ss-results { max-height: 62vh; }
}
