/*!
 * glossary — the A-Z filter bar and search on the glossary hub.
 *
 * Letters with no entries are shown but not clickable, because a gap in the
 * alphabet is information: it tells the reader the list is complete rather than
 * truncated. Hiding them would make the bar look arbitrary.
 */

.glossary-tools {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 28px 0 40px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid #e2eaee;
  border-radius: 999px;
  box-shadow: 0 6px 22px rgba(21, 54, 75, .06);
}

.glossary-az {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px;
  flex: 1 1 420px;
  min-width: 0;
}

.glossary-az button,
.glossary-az span {
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  border: 0;
  border-radius: 50%;
  background: transparent;
}

.glossary-az button {
  color: #0f5c4a;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.glossary-az button:hover { background: #e4f2ed; }
.glossary-az button[aria-pressed="true"] { background: #0f5c4a; color: #fff; }
.glossary-az button:focus-visible { outline: 2px solid #0f5c4a; outline-offset: 2px; }

/* A letter with no entries: present, but plainly not a control. */
.glossary-az span { color: #b6c3cb; cursor: default; }

.glossary-az .glossary-all {
  min-width: auto;
  padding: 0 13px;
  border-radius: 999px;
  font-size: 13px;
}

.glossary-search {
  position: relative;
  flex: 0 1 300px;
  display: flex;
  align-items: center;
}
.glossary-search svg {
  position: absolute;
  left: 14px;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #7e8f9b;
  stroke-width: 2;
  pointer-events: none;
}
.glossary-search input {
  width: 100%;
  height: 42px;
  padding: 0 16px 0 40px;
  font: inherit;
  font-size: 15px;
  color: #1b2b38;
  background: #f7fafb;
  border: 1px solid #e2eaee;
  border-radius: 999px;
}
.glossary-search input::placeholder { color: #8fa0ac; }
.glossary-search input:focus {
  outline: none;
  border-color: #0f5c4a;
  background: #fff;
}

/* -- the letter band ------------------------------------------------------- */
.glossary-letter {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 46px 0 20px;
}
.glossary-letter h2 {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  background: #0f5c4a;
  border-radius: 16px;
}
.glossary-letter i {
  flex: 1;
  height: 1px;
  background: #e3ebee;
}

/* -- the cards ------------------------------------------------------------- */
.glossary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 20px;
}

.glossary-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  background: #fff;
  border: 1px solid #e3ebee;
  border-radius: 16px;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.glossary-card:hover {
  border-color: #bcded1;
  box-shadow: 0 14px 30px rgba(21, 54, 75, .08);
  transform: translateY(-2px);
}
.glossary-card:focus-within {
  border-color: #0f5c4a;
  box-shadow: 0 0 0 3px rgba(15, 92, 74, .15);
}

.glossary-card h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.3;
}
.glossary-card h3 a {
  color: #10283b;
  text-decoration: none;
}
/* The whole card is the target; the heading link covers it. */
.glossary-card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
}
.glossary-card:hover h3 a { color: #0f5c4a; }

.glossary-card p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: #5c7183;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.glossary-more {
  margin-top: auto;
  font-size: 14px;
  font-weight: 600;
  color: #0f5c4a;
  text-decoration: none;
}

.glossary-group[hidden], .glossary-card[hidden] { display: none; }
.glossary-empty {
  margin: 32px 0;
  padding: 24px;
  text-align: center;
  color: #64798a;
  background: #f7fafb;
  border-radius: 16px;
}

@media (max-width: 640px) {
  .glossary-tools { border-radius: 20px; gap: 10px; }
  .glossary-search { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .glossary-az button { transition: none; }
}
