/* Icons hinter Links im Seiteninhalt:
   - Glossar-Links (glossary/#anker): Buch, nicht die Navigation aufs Glossar
   - externe Links (http/https): Pfeil nach außen; interne Links sind relativ */
:root {
  /* lucide "book-open" */
  --glossary-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 7v14"/><path d="M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z"/></svg>');
  /* lucide "external-link" */
  --external-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 3h6v6"/><path d="M10 14 21 3"/><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/></svg>');
}

.md-typeset a[href*="glossary/#"]::after,
.md-typeset a[href^="http://"]::after,
.md-typeset a[href^="https://"]::after {
  content: "";
  display: inline-block;
  width: 0.75em;
  height: 0.75em;
  margin-left: 0.15em;
  vertical-align: 0.05em;
  background-color: currentColor;
  -webkit-mask: var(--link-icon) no-repeat center / contain;
  mask: var(--link-icon) no-repeat center / contain;
}

.md-typeset a[href*="glossary/#"] {
  --link-icon: var(--glossary-icon);
}

.md-typeset a[href^="http://"],
.md-typeset a[href^="https://"] {
  --link-icon: var(--external-icon);
}
