/* ==========================================================================
   Site search (/search) — questions grouped by field, one table per field.
   ========================================================================== */

.srch { max-width: 1080px; margin: 0 auto; padding-bottom: 3rem; }

/* Search box */
.srch-form { position: relative; display: flex; gap: .5rem; margin: .5rem 0 2rem; }
.srch-form__icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--bs-secondary-color); pointer-events: none; }
.srch-form__input { padding-left: 2.75rem; border-radius: .75rem; }
.srch-form__btn { border-radius: .75rem; flex-shrink: 0; margin-bottom: 0; }
@media (max-width: 575.98px) { .srch-form__btn { padding-inline: 1rem; } }

/* Headings */
.srch-head { margin-bottom: 1.25rem; }
.srch-title { font-family: "Geist", sans-serif; font-weight: 700; font-size: clamp(1.35rem, 1.1rem + .9vw, 1.75rem); letter-spacing: -.015em; margin-bottom: .25rem; }
.srch-sub { color: var(--bs-secondary-color); margin-bottom: 0; }
.srch-back { display: inline-flex; align-items: center; gap: .2rem; font-size: .875rem; font-weight: 600; text-decoration: none; margin-bottom: .5rem; }

/* Field jump pills */
.srch-fields { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.srch-field-pill {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .4rem .55rem .4rem .8rem; border-radius: 999px;
  border: 1px solid var(--bs-border-color); background: var(--bs-body-bg);
  color: var(--bs-emphasis-color); font-size: .875rem; font-weight: 500; text-decoration: none;
}
.srch-field-pill i { color: var(--bs-primary); }
.srch-field-pill:hover, .srch-field-pill:focus-visible { border-color: var(--bs-primary); color: var(--bs-primary); }
.srch-count {
  display: inline-grid; place-items: center; min-width: 1.6rem; height: 1.35rem; padding: 0 .4rem;
  border-radius: 999px; font-size: .72rem; font-weight: 600;
  background: rgba(var(--bs-primary-rgb), .1); color: var(--bs-primary);
}

/* Matching topics */
.srch-topics { margin-bottom: 2rem; }
.srch-topics__title { font-size: .9rem; font-weight: 600; color: var(--bs-secondary-color); margin-bottom: .6rem; }
.srch-topics__list { display: flex; flex-wrap: wrap; gap: .5rem; }
.srch-topic {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .45rem .55rem .45rem .75rem; border-radius: .6rem;
  background: var(--bs-body-bg); border: 1px solid var(--bs-border-color);
  text-decoration: none; color: var(--bs-body-color); font-size: .875rem;
}
.srch-topic:hover, .srch-topic:focus-visible { border-color: rgba(var(--bs-primary-rgb), .4); }
.srch-topic__cat { color: var(--bs-secondary-color); }
.srch-topic__cat::after { content: "›"; margin-left: .5rem; }
.srch-topic__name { font-weight: 600; color: var(--bs-emphasis-color); }

/* Field group */
.srch-group {
  margin-bottom: 1.75rem; border: 1px solid var(--bs-border-color-translucent);
  border-radius: 1rem; background: var(--bs-body-bg); overflow: hidden;
  scroll-margin-top: 6rem;
}
/* The theme pads every <section>; the field card supplies its own spacing. */
section.srch-group { padding-top: 0; padding-bottom: 0; }
.srch-group__head {
  display: flex; align-items: center; gap: .85rem;
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--bs-border-color-translucent);
  background: rgba(var(--bs-primary-rgb), .04);
}
.srch-group__icon {
  width: 2.5rem; height: 2.5rem; border-radius: .7rem; flex-shrink: 0;
  display: grid; place-items: center; font-size: 1.15rem;
  background: rgba(var(--bs-primary-rgb), .12); color: var(--bs-primary);
}
.srch-group__title { font-family: "Geist", sans-serif; font-size: 1.15rem; font-weight: 700; margin: 0; }
.srch-group__meta { font-size: .825rem; color: var(--bs-secondary-color); margin: 0; }
.srch-group__more { padding: .85rem 1.25rem; border-top: 1px solid var(--bs-border-color-translucent); }

/* Table */
.srch-table { --bs-table-bg: transparent; font-size: .925rem; }
.srch-table thead th {
  font-size: .75rem; font-weight: 600; color: var(--bs-secondary-color);
  background: var(--bs-tertiary-bg); border-bottom-width: 1px; padding: .6rem .75rem; white-space: nowrap;
}
.srch-table td { padding: .8rem .75rem; border-color: var(--bs-border-color-translucent); }
.srch-table tbody tr { position: relative; }
.srch-table tbody tr:hover { background: rgba(var(--bs-primary-rgb), .04); }
.srch-table__no { width: 3rem; color: var(--bs-secondary-color); font-variant-numeric: tabular-nums; padding-left: 1.25rem !important; }
.srch-table__tech { white-space: nowrap; color: var(--bs-secondary-color); }
.srch-table__topic { position: relative; z-index: 2; white-space: nowrap; text-decoration: none; font-weight: 500; }
.srch-table__topic:hover { text-decoration: underline; }
.srch-table td:last-child { padding-right: 1.25rem; }

.srch-q { color: var(--bs-emphasis-color); font-weight: 500; text-decoration: none; line-height: 1.45; }
.srch-q:hover, .srch-q:focus-visible { color: var(--bs-primary); text-decoration: underline; }
/* Whole row is clickable; the topic link sits above it (z-index 2). */
.srch-q.stretched-link-row::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.srch-q__path { display: block; font-size: .78rem; color: var(--bs-secondary-color); margin-top: .2rem; }

.srch mark { padding: 0 .1em; border-radius: .2em; background: rgba(250, 204, 21, .45); color: inherit; }

/* Empty states */
.srch-empty { text-align: center; padding: 3rem 1rem; max-width: 560px; margin: 0 auto; }
.srch-empty > i { font-size: 2.5rem; color: var(--bs-primary); display: block; margin-bottom: 1rem; }
.srch-suggest { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.srch-chip {
  padding: .35rem .8rem; border-radius: 999px; font-size: .875rem; text-decoration: none;
  background: rgba(var(--bs-primary-rgb), .08); color: var(--bs-primary); font-weight: 500;
}
.srch-chip:hover { background: rgba(var(--bs-primary-rgb), .16); }

/* ---------- Single question page ---------- */
.qd-title { font-family: "Geist", sans-serif; font-weight: 700; font-size: clamp(1.35rem, 1.1rem + 1vw, 1.9rem); line-height: 1.25; letter-spacing: -.015em; }
.qd-answer { font-size: 1rem; line-height: 1.75; white-space: pre-wrap; }
.qd-answer-label { font-size: .8rem; font-weight: 600; color: var(--bs-primary); margin-bottom: .4rem; }
.qd-pager { display: grid; gap: .75rem; margin-top: 2rem; }
@media (min-width: 768px) { .qd-pager { grid-template-columns: 1fr 1fr; } }
.qd-pager a {
  display: block; padding: .9rem 1rem; border-radius: .75rem; text-decoration: none;
  border: 1px solid var(--bs-border-color); color: var(--bs-body-color);
}
.qd-pager a:hover, .qd-pager a:focus-visible { border-color: var(--bs-primary); }
.qd-pager small { display: block; color: var(--bs-secondary-color); font-size: .75rem; margin-bottom: .2rem; }
.qd-pager span { font-weight: 500; color: var(--bs-emphasis-color); }
.qd-pager .qd-next { text-align: right; }
.qd-related .list-group-item { font-size: .875rem; line-height: 1.4; }
