/* Glossar-Popup: ergänzt style.css. Verwendung: <span data-gl="begriff">Text</span> (siehe js/glossar.js) */
:root {
  --gl-accent: #1c86ac;
  --gl-bg: #fff;
  --gl-text: #1f2933;
  --gl-muted: #5b6770;
}

.gl-term { white-space: nowrap; }

.gl-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 1.45em;
  height: 1.45em;
  min-width: 1.45em;
  margin: 0 0 0 .06em;
  padding: 0;
  vertical-align: .95em;
  border: 1.5px solid var(--gl-accent);
  border-radius: 50%;
  background: #fff;
  color: var(--gl-accent);
  font-family: inherit;
  font-size: .5em;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background-color .15s, color .15s;
}
/* größere Trefferfläche für Finger und Maus */
.gl-btn::after { content: ""; position: absolute; top: -8px; right: -8px; bottom: -8px; left: -8px; }
.gl-btn:hover,
.gl-btn[aria-expanded="true"] { background: var(--gl-accent); color: #fff; }
.gl-btn:focus-visible,
.gl-pop-close:focus-visible { outline: 2px solid var(--gl-accent); outline-offset: 2px; }

.gl-pop {
  position: fixed;
  z-index: 1000;
  box-sizing: border-box;
  width: min(22rem, calc(100vw - 1.5rem));
  padding: 1rem 2.6rem 1rem 1.1rem;
  background: var(--gl-bg);
  color: var(--gl-text);
  border-top: 4px solid var(--gl-accent);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 35, 50, .22), 0 2px 6px rgba(15, 35, 50, .12);
  font-size: .95rem;
  line-height: 1.5;
  text-align: left;
  white-space: normal;
  animation: gl-ein .14s ease-out;
}
.gl-pop[hidden] { display: none; }
.gl-pop:focus { outline: none; }
.gl-pop-titel { margin: 0 0 .15rem; font-size: 1.05rem; font-weight: 700; color: var(--gl-text); }
.gl-pop-herkunft { margin: 0 0 .6rem; font-size: .85rem; color: var(--gl-muted); }
.gl-pop-herkunft[hidden] { display: none; }
.gl-pop-text p { margin: 0 0 .6rem; }
.gl-pop-text p:last-child { margin-bottom: 0; }
.gl-pop-close {
  position: absolute;
  top: .4rem;
  right: .45rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--gl-muted);
  font-family: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.gl-pop-close:hover { background: #eef3f6; color: var(--gl-text); }

/* Link unten im Fenster */
.gl-pop-mehr { display: inline-block; margin-top: .75rem; font-size: .875rem; font-weight: 600; color: var(--gl-accent); text-decoration: none; }
.gl-pop-mehr:hover { text-decoration: underline; }
.gl-pop-mehr[hidden] { display: none; }
.gl-pop-mehr:focus-visible { outline: 2px solid var(--gl-accent); outline-offset: 2px; }

/* Übersichtsseite /wissen/glossar/ */
.gl-liste { max-width: 50rem; }
.gl-sprung { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.75rem; }
.gl-sprung a { padding: .35rem .9rem; border-radius: 999px; background: var(--primary-soft, #e3f3f7); color: var(--link, #166785); font-size: .9rem; font-weight: 600; text-decoration: none; }
.gl-sprung a:hover { background: var(--gl-accent); color: #fff; }
.gl-eintrag { margin: 0 0 1rem; padding: 1.25rem 1.4rem; border: 1px solid var(--border, #dfe7ea); border-radius: var(--radius-lg, 1.25rem); background: #fff; scroll-margin-top: 5.5rem; }
.gl-eintrag-titel { margin: 0 0 .15rem; font-family: var(--font-head, inherit); font-size: 1.3rem; line-height: 1.25; }
.gl-eintrag-herkunft { margin: 0 0 .7rem; color: var(--muted, #5a5f63); font-size: .9rem; }
.gl-eintrag p:last-child { margin-bottom: 0; }
.gl-eintrag.gl-ziel { border-color: var(--gl-accent); box-shadow: 0 0 0 3px var(--primary-soft, #e3f3f7); }

/* Schmale Bildschirme: Fenster als Leiste am unteren Rand */
@media (max-width: 600px) {
  .gl-pop { left: .75rem !important; right: .75rem !important; top: auto !important; bottom: .75rem; width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .gl-pop { animation: none; }
  .gl-btn { transition: none; }
}
@media print { .gl-btn, .gl-pop { display: none !important; } }

@keyframes gl-ein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
