.glossary-mast {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(18rem, .74fr);
  align-items:end;
  gap:32px 48px;
  margin-bottom:40px;
}

.glossary-lead h1 {
  margin:14px 0 16px;
}

.glossary-lead > p:last-child {
  max-width:36em;
  margin-bottom:0;
}

.glossary-index .toc-inline {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:4px 8px;
}

.glossary-index a {
  display:flex;
  align-items:center;
  gap:9px;
  min-height:44px;
  border:1px solid var(--clear);
}

.glossary-index a::before {
  content:"";
  width:5px;
  height:5px;
  flex:none;
  background:var(--border-strong);
}

.glossary-index a:hover {
  border-color:var(--border);
}

.glossary-index a:is(:hover,:focus-visible)::before {
  background:var(--accent);
}

.glossary-shelves {
  display:grid;
  gap:28px;
}

.glossary-section-head {
  padding-bottom:18px;
}

.glossary-section-head h2 {
  display:flex;
  align-items:baseline;
  gap:12px;
  margin:0 0 8px;
}

.glossary-section-head h2::before {
  content:"";
  width:8px;
  height:8px;
  flex:none;
  align-self:center;
  background:var(--accent);
}

.glossary-section-head p {
  margin-bottom:0;
}

.glossary-shelf .grid-pair {
  gap:16px;
}

.glossary-wide-term {
  grid-column:1 / -1;
}

.glossary-wide-term p {
  max-width:var(--reading-width);
}

.glossary-shelf:target .glossary-section-head h2 {
  text-decoration:underline;
  text-decoration-color:var(--accent);
  text-decoration-thickness:1px;
  text-underline-offset:.22em;
}

.glossary-shelf .term-card:target {
  border-color:var(--accent);
  outline:var(--focus-ring);
  outline-offset:2px;
}

.glossary-related {
  margin-top:32px;
  padding-top:16px;
  border-top:1px solid var(--border);
  column-gap:24px;
  row-gap:4px;
  font-size:var(--small-size);
}

.glossary-related a {
  display:inline-flex;
  align-items:center;
  min-height:44px;
  text-decoration-color:var(--border-strong);
}

@media (max-width:768px) {
  .glossary-mast {
    grid-template-columns:minmax(0,1fr);
    gap:24px;
    margin-bottom:28px;
  }

  .glossary-shelves {
    gap:20px;
  }

  .glossary-shelf .grid-pair {
    gap:12px;
  }
}