/* /glossary: A-Z bar, letter groups, entries on --rule hairlines. Sizes: h1, 1.5rem, 1.125rem, 0.875rem. */
.glossary { font-size: 1.125rem; padding-bottom: 4rem; }
.glossary h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; margin: 1.5rem 0 1rem; }

.az { padding-block: 0.5rem; border-bottom: 1px solid var(--rule); background: var(--paper); }
.az ul { display: flex; flex-wrap: wrap; gap: 0 0.25rem; list-style: none; margin: 0; padding: 0; }
.az a, .az span { display: inline-flex; align-items: center; justify-content: center; min-width: 2rem; min-height: 2.75rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.az a { text-decoration: none; }
.az a:hover { background: var(--hover); }
.az span { color: var(--muted); font-weight: 400; }

.g-letter, .g-entry { scroll-margin-top: var(--space); }
.g-letter > h2 { font-size: 1.5rem; font-weight: 700; line-height: 1.2; margin: 2rem 0 0.5rem; }

.g-entry { border-top: 1px solid var(--rule); padding: 1.5rem 0; }
.g-term { font-size: 1.125rem; font-weight: 700; line-height: 1.4; margin: 0 0 0.25rem; }
.g-house { margin-left: 0.5rem; color: var(--muted); font-family: var(--font); font-size: 0.875rem; font-weight: 400; font-variant: small-caps; letter-spacing: 0.04em; }

.g-entry .prose > :first-child { margin-top: 0; }
.g-entry .prose > :last-child { margin-bottom: 0; }
.g-entry .prose p { margin: 0.75rem 0; }

.g-links { display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 0.75rem; margin: 1rem 0 0; }
.g-links dt { color: var(--muted); }
.g-links dd { margin: 0; }

/* Sticky only where the bar is one row; on a phone it wraps to three and would cover the entries. */
@media (min-width: 48rem) {
  .az { position: sticky; top: var(--band-pin); z-index: 1; }
  .az ul { flex-wrap: nowrap; justify-content: space-between; gap: 0; }
  .az a, .az span { min-width: 1.5rem; }
  /* Keeps an anchor target and a keyboard-focused link clear of the sticky bar (WCAG 2.4.11). */
  html:has(.glossary) { scroll-padding-top: calc(var(--band-pin) + 4.5rem); }
}
