/* glossary block.
   No literal colour: every value is a token (hard rules 1 and 6).

   The search field reuses the short_courses and annual_calendar control so the
   three listings on this estate look like one system. The terms themselves are
   a plain definition grid rather than cards: these are one-line answers, and
   giving each a card border makes a page of them read as heavier than the
   content warrants. */

.glossary__head { margin-bottom: 1.4rem; max-width: var(--measure); }
.glossary__head .section-intro { margin-top: .6rem; }

/* ----------------------------------------------------------------- search */
.gl-search { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; margin-bottom: 1.8rem; }
.gl-search__input {
  font-family: inherit;
  font-size: var(--fs-min);
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--control-border);
  border-radius: var(--radius-sm);
  padding: .55rem .8rem;
  min-width: 240px;
  flex: 1 1 240px;
  max-width: 380px;
}
.gl-count { font-size: var(--fs-min); color: var(--muted); margin: 0; }

/* ------------------------------------------------------------------ terms */
.gl-terms { display: grid; gap: 1.2rem 2rem; }
.glossary--cols-2 .gl-terms { grid-template-columns: repeat(2, 1fr); }
.glossary--cols-3 .gl-terms { grid-template-columns: repeat(3, 1fr); }
/* [hidden] is how the JS filters, and a grid item ignores it without this. */
.gl-term[hidden] { display: none; }

.gl-term {
  padding-left: 1rem;
  border-left: var(--card-edge) solid var(--accent);
}
.gl-term__name {
  font-size: 1.2rem;
  line-height: 1.3;
  margin: 0 0 .3rem;
  color: var(--text-heading);
}
.gl-term__def {
  font-size: var(--fs-min);
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

.gl-empty {
  font-size: 1.2rem;
  color: var(--muted);
  text-align: center;
  padding: 2.5rem 0;
  margin: 0;
}

/* ------------------------------------------------------------- responsive */
@media (max-width: 64em) {
  .glossary--cols-3 .gl-terms { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 40em) {
  .gl-terms { grid-template-columns: 1fr !important; }
  .gl-search__input { max-width: none; }
}
