.glossary {
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
  padding: 8px 20px 48px 20px;
}

.glossary h1 {
  font-size: 1.4rem;
  margin: 8px 0 4px 0;
}

.glossary-intro {
  color: var(--muted);
  margin: 0 0 20px 0;
  line-height: 1.5;
}

.glossary-section {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--btn-bg);
  margin-bottom: 12px;
  overflow: hidden;
}

.glossary-section summary {
  padding: 16px 18px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.glossary-section summary::-webkit-details-marker {
  display: none;
}

.glossary-section summary::after {
  content: "+";
  float: right;
  color: var(--muted);
  font-weight: 400;
}

.glossary-section[open] summary::after {
  content: "–";
}

.glossary-body {
  padding: 0 18px 18px 18px;
}

.glossary-body .rule {
  font-weight: 600;
  line-height: 1.5;
  margin: 0 0 14px 0;
}

.glossary-body .subhead {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 16px 0 8px 0;
}

.kv-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kv-row {
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
}

.kv-key {
  flex-shrink: 0;
  min-width: 64px;
  font-weight: 700;
  color: var(--accent);
}

.kv-val {
  font-size: 0.92rem;
  line-height: 1.45;
}

.glossary-body .note {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--fg);
  margin: 12px 0 0 0;
}
