/* ==========================================================================
   Glossary: the index (search, A–Z bar, terms by topic, A–Z list) and the
   term pages (breadcrumb, demo card, sources). Built by
   components/glossary/build.mjs; content styles come from /resources/site.css
   and the related-links blocks from /assets/related.css.
   ========================================================================== */

.gl-index [hidden], .gl-term [hidden] { display: none !important; }

.gl-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- Breadcrumb */
.gl-crumbs ol, .page .gl-crumbs ol {
  list-style: none; display: flex; flex-wrap: wrap; align-items: center;
  margin: 0 0 20px; padding: 0; font-size: 13px; line-height: 1.5; color: var(--muted, #475569);
}
.gl-crumbs li, .page .gl-crumbs li { margin: 0; }
.gl-crumbs li + li::before { content: '›'; margin: 0 8px; color: #94a3b8; }
.gl-crumbs a, .page .gl-crumbs a { color: var(--link, #3F7D4E); text-decoration: none; }
.gl-crumbs a:hover { text-decoration: underline; }
.gl-crumbs a[aria-current="page"], .page .gl-crumbs a[aria-current="page"] { color: inherit; }

.gl-crumbs--hero ol { justify-content: center; margin-bottom: 18px; color: rgba(255,255,255,0.6); }
.gl-crumbs--hero a { color: rgba(255,255,255,0.78); }
.gl-crumbs--hero a[aria-current="page"] { color: #fff; }
.gl-crumbs--hero li + li::before { color: rgba(255,255,255,0.4); }

/* ---- Term page */
/* .page ul (site.css) outranks .rel-list (related.css) and indented the
   related-terms grid; the glossary pages line it up with the text. */
.page .rel-list { margin: 0; }
.page .rel-list li { margin: 0; }
.gl-term .gl-def a { color: var(--link, #3F7D4E); }

.gl-cta {
  margin: 48px 0 8px; padding: 24px 28px; border-radius: 16px;
  background: linear-gradient(101deg, #0C1F14 0%, #183826 50%, #24503A 100%);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px;
}
.page .gl-cta-title {
  flex: 1 1 280px; margin: 0; color: #fff;
  font: 600 18px/1.4 Poppins, Inter, sans-serif;
}
.page .gl-cta-btn {
  display: inline-block; padding: 12px 20px; border-radius: 999px;
  background: #fff; color: #122A1C; text-decoration: none; white-space: nowrap;
  font: 600 14px/1.2 Inter, system-ui, sans-serif;
  transition: background .16s ease, transform .16s ease;
}
.page .gl-cta-btn:hover { background: #E7F1E8; transform: translateY(-1px); }
.page .gl-cta-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.gl-sources { margin-top: 40px; }
.page .gl-sources h2 {
  margin: 0 0 10px; font: 700 11px/1 Inter, system-ui, sans-serif;
  letter-spacing: .13em; text-transform: uppercase; color: #3F7D4E;
}
.page .gl-sources ol { margin: 0 0 0 1.25rem; font-size: 14px; }
.page .gl-sources li { margin-bottom: 6px; }
.page .gl-sources a { overflow-wrap: anywhere; }

/* ---- Index */
.gl-wrap { max-width: 1000px; margin: 0 auto; padding: 36px 1.5rem 80px; }

.gl-tools { display: flex; flex-direction: column; gap: 16px; }
.gl-search { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.gl-search input {
  flex: 1 1 280px; min-width: 0; padding: 12px 16px;
  font: 400 16px/1.4 Inter, system-ui, sans-serif; color: var(--ink, #0f172a);
  background: #fff; border: 1px solid #cbd5e1; border-radius: 12px;
}
.gl-search input:focus { outline: 2px solid #3F7D4E; outline-offset: 1px; border-color: #3F7D4E; }
.gl-count { margin: 0; font-size: 13px; color: var(--muted, #475569); }

.gl-az ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.gl-az a, .gl-az span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px; height: 32px; padding: 0 4px; border-radius: 8px;
  font: 600 13px/1 Inter, system-ui, sans-serif;
}
.gl-az a { color: #122A1C; background: #EEF4EF; text-decoration: none; transition: background .14s ease, color .14s ease; }
.gl-az a:hover, .gl-az a:focus-visible { background: #3F7D4E; color: #fff; outline: none; }
.gl-az a[aria-disabled="true"] { opacity: .35; pointer-events: none; }
.gl-az span { color: #cbd5e1; }

.gl-group { margin-top: 44px; scroll-margin-top: 96px; }
.gl-group h2 { margin: 0 0 16px; font: 700 22px/1.25 Poppins, Inter, sans-serif; color: var(--navy, #101828); }
.gl-group-n {
  display: inline-block; margin-left: 8px; padding: 4px 9px; border-radius: 999px; vertical-align: 3px;
  font: 600 12px/1 Inter, system-ui, sans-serif; color: #3F7D4E; background: #EEF4EF;
}
.gl-cards {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px;
}
.gl-cards li { display: flex; }
.gl-card { flex: 1; padding: 20px 22px; }
.gl-card h3 { font-size: 17px; line-height: 1.3; }
.gl-card p { line-height: 1.55; }

.gl-empty { margin: 40px 0 0; color: var(--muted, #475569); }
.gl-clear { padding: 0; font: inherit; color: var(--link, #3F7D4E); background: none; border: 0; text-decoration: underline; cursor: pointer; }

.gl-azlist { margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--line, #e2e8f0); }
.gl-azlist h2 { margin: 0 0 12px; font: 700 22px/1.25 Poppins, Inter, sans-serif; color: var(--navy, #101828); }
.gl-az-letter {
  display: grid; grid-template-columns: 44px 1fr; gap: 0 16px; padding: 12px 0;
  border-bottom: 1px solid #f1f5f9; scroll-margin-top: 96px;
}
.gl-az-letter h3 { margin: 0; font: 700 20px/1.5 Poppins, Inter, sans-serif; color: #3F7D4E; }
.gl-az-letter ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.gl-az-letter a { color: #1e293b; text-decoration: none; font-size: 15px; line-height: 1.9; }
.gl-az-letter a:hover { color: var(--link, #3F7D4E); text-decoration: underline; }

@media (max-width: 767px) {
  .gl-wrap { padding: 28px 1rem 56px; }
  .gl-cards { grid-template-columns: 1fr; }
  .gl-az a, .gl-az span { min-width: 30px; height: 30px; }
  .gl-cta { padding: 20px; }
  .page .gl-cta-title { font-size: 17px; }
  .page .gl-cta-btn { white-space: normal; }
  .gl-az-letter { grid-template-columns: 32px 1fr; }
  .gl-group h2, .gl-azlist h2 { font-size: 20px; }
}
