/* Search results layout; facet rail styling below. */
.gt-results { max-width: var(--gt-maxw); margin: 0 auto; }
/* On-page search field, mirroring the header entry. */
.gt-results__searchbar { display: flex; gap: 10px; max-width: 680px; margin-bottom: var(--gt-space-8); }
.gt-results__searchbar .gt-input-group { flex: 1; }
.gt-results__count { margin: 0 0 var(--gt-space-6); font-size: var(--gt-text-sm); color: var(--gt-ink-2); }
.gt-results__count strong { color: var(--gt-ink); }
.gt-result { padding: 22px 0; border-bottom: var(--gt-border-width) solid var(--gt-border); }
.gt-result:first-of-type { padding-top: 0; }
.gt-result__meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; font-size: var(--gt-text-xs); color: var(--gt-ink-3); }
.gt-result h3 { font-size: var(--gt-text-lg); margin: 0 0 6px; }
.gt-result h3 a { color: var(--gt-ink); text-decoration: none; }
.gt-result h3 a:hover { color: var(--gt-primary); text-decoration: underline; }
.gt-result p { margin: 0; font-size: var(--gt-text-sm); color: var(--gt-ink-2); line-height: var(--gt-leading-normal); }
/* Centred pagination under the results. */
.gt-results .gt-pagination { justify-content: center; margin-top: var(--gt-space-8); }

/* Search results grid — facet rail beside the result list. */
.gt-results__grid { display: grid; grid-template-columns: 284px 1fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .gt-results__grid { grid-template-columns: 1fr; gap: 28px; } }

/* Facet rail — grouped checkbox refinements on the search page. */
.gt-facetgroup { padding: 16px 0; border-bottom: var(--gt-border-width) solid var(--gt-border); }
/* Facets are sibling blocks inside gt-results__facets; reset the first one's top padding. */
.gt-facetgroup:first-child { padding-top: 0; }
.gt-facetgroup:last-child { border-bottom: none; }
.gt-facetgroup__title { font-family: var(--gt-font-head); font-weight: var(--gt-w-bold); font-size: var(--gt-text-sm); margin-bottom: 12px; letter-spacing: var(--gt-head-tracking); }
.gt-facetgroup__list { list-style: none; margin: 0; padding: 0; gap: 10px; }
/* Facets renders each row as a plain link; its checkbox-widget JS lifts that
   link into a real <input>+<label> pair, so `gt-check` styles the `<li>` row
   as a whole (forms.css's `gt-check`/`gt-box` rules already reach it via
   descendant selectors) while these rules lay out whichever wrapper — the
   link (pre-JS) or the generated label (post-JS) — sits inside it. */
.gt-facetgroup__list .gt-check > a,
.gt-facetgroup__list .gt-check > label { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; cursor: pointer; text-decoration: none; color: inherit; }
.gt-facetgroup__list .gt-hint { margin-left: auto; }
/* Checked/focus state: the generated <label> sits after <input> as a sibling,
   with `gt-box` nested inside it — one level deeper than forms.css's SDC
   markup assumes — so reach it with a sibling + descendant combinator. */
.gt-facetgroup__list .gt-check input:checked ~ label .gt-box,
.gt-facetgroup__list .gt-check > a.is-active .gt-box { background: var(--gt-primary); border-color: var(--gt-primary); }
.gt-facetgroup__list .gt-check input:checked ~ label .gt-box svg,
.gt-facetgroup__list .gt-check > a.is-active .gt-box svg { opacity: 1; }
.gt-facetgroup__list .gt-check input:focus-visible ~ label .gt-box { box-shadow: var(--gt-focus-ring); }

/* Dropdown facet (e.g. Year): the JS-generated select adopts the site's select styling.
   height + matching line-height vertically centres the value across browsers that
   otherwise top-align an appearance:none select. */
.gt-facetgroup.facets-widget-dropdown select {
  width: 100%; height: var(--gt-control-h); line-height: var(--gt-control-h);
  padding: 0 40px 0 14px;
  font-family: var(--gt-font-body); font-size: var(--gt-text-sm); color: var(--gt-ink);
  background: var(--gt-surface); border: var(--gt-border-width-strong) solid var(--gt-border-2);
  border-radius: var(--gt-radius-input);
  appearance: none;
  background-image: var(--gt-select-chevron); background-repeat: no-repeat; background-position: right 14px center;
  transition: border-color .15s, box-shadow .15s;
}
.gt-facetgroup.facets-widget-dropdown select:hover { border-color: var(--gt-ink-3); }
.gt-facetgroup.facets-widget-dropdown select:focus-visible { outline: none; border-color: var(--gt-primary); box-shadow: var(--gt-focus-ring); }

/* Header search entry — compact field + primary submit (no command palette). */
.gt-search { display: flex; align-items: center; gap: 8px; }
.gt-search .gt-input-group { width: 240px; }
/* Strip the Views exposed-form / form-item chrome so the field sits flush in the header bar. */
.gt-site-header .views-exposed-form,
.gt-site-header .views-exposed-form form { margin: 0; }
.gt-search .form-item { flex: 1; margin: 0; }
/* Label is the field's accessible name — hidden visually, kept for assistive tech. */
.gt-search .gt-label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.gt-search input[type="text"], .gt-search input[type="search"] {
  width: 100%; min-height: var(--gt-control-h); padding: 0 14px 0 42px;
  font-family: var(--gt-font-body); font-size: var(--gt-text-sm); color: var(--gt-ink);
  background: var(--gt-surface); border: var(--gt-border-width-strong) solid var(--gt-border-2);
  border-radius: var(--gt-radius-input); transition: border-color .15s, box-shadow .15s;
}
.gt-search input:hover { border-color: var(--gt-ink-3); }
.gt-search input:focus { outline: none; border-color: var(--gt-primary); box-shadow: var(--gt-focus-ring); }
/* Header entry collapses on narrow widths; mobile search lives in the drawer. */
@media (max-width: 900px) { .gt-site-header .gt-search { display: none; } }
