.glossary-intro {
  max-width: 760px;
  padding-bottom: 32px;
}
.glossary-intro h1 {
  margin: 12px 0 16px;
}
.glossary-intro .section-lead {
  max-width: 690px;
  margin-bottom: 0;
  line-height: 1.8;
}
.glossary-page .toc-tabs {
  margin-bottom: 38px;
  border-bottom: 1px solid var(--border);
}
.glossary-family {
  padding-top: 22px;
  padding-bottom: 58px;
}
.glossary-family + .glossary-family {
  border-top: 1px solid var(--border);
}
.family-heading {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  max-width: 780px;
  margin-bottom: 25px;
}
.family-index {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  background: var(--cream);
  color: var(--cream-ink);
  font: 700 13px/1 var(--font-mono);
}
.family-heading h2 {
  margin: 1px 0 9px;
}
.family-heading p {
  margin: 0;
  color: var(--text-muted);
}
.term-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.glossary-page .term-card {
  scroll-margin-top: 150px;
}
.glossary-page .term-card:target {
  border-color: var(--accent);
}
.glossary-page .term-card h3 {
  overflow-wrap: anywhere;
}
.glossary-page .term-card p {
  line-height: 1.8;
}
.glossary-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--bg-panel);
}
.glossary-next h2 {
  margin: 0 0 8px;
  font-size: 23px;
}
.glossary-next p {
  margin: 0;
  color: var(--text-muted);
}
.glossary-next-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex-shrink: 0;
}
@media (max-width: 760px) {
  .term-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .glossary-family {
    padding-bottom: 46px;
  }
  .glossary-next {
    flex-direction: column;
    align-items: flex-start;
  }
}
@media (max-width: 420px) {
  .family-heading {
    gap: 12px;
  }
  .glossary-next-links {
    width: 100%;
  }
  .glossary-next-links .btn {
    flex: 1 1 130px;
  }
}