/* ==========================================================================
   Glossary (Klxm\Fluid\Glossary, from KLXM Studio, MIT): terms in the text (.gl, .gl-term, .gl-pop) and block „Glossar“ (.glx).
   Loaded only on pages with marked terms or the block. Kits replace css/glossary.css or set variables
   (on :root, a section or .gl/.glx):
     --gl-accent   underline on hover, link, focus                --gl-line    dotted underline
     --gl-bg       background of the popup                        --gl-text    text in the popup
     --gl-border   border of the popup                            --gl-radius  corner radius
     --gl-shadow   shadow                                         --gl-width   width of the popup
     --gl-font     font of the popup (default: like the text)
     --gl-pop-accent  link and focus in the popup (default: accent, mixed with the text colour)
   Defaults: accent from the core kits' link colours, background and text derived from the text colour (light/dark).
   ========================================================================== */
.gl{
  --_acc:var(--gl-accent,var(--kit-link,var(--b-link,var(--m-link,var(--e-link,var(--n-link,var(--f-link,var(--g-link,var(--s-link,var(--primary,currentColor))))))))));
  --_r:var(--gl-radius,10px)
}
.gl{display:inline}
.gl-term{
  display:inline;margin:0;padding:0;border:0;border-radius:2px;background:none;color:inherit;font:inherit;letter-spacing:inherit;
  line-height:inherit;text-align:inherit;text-transform:inherit;vertical-align:baseline;cursor:help;
  text-decoration:underline dotted var(--gl-line,color-mix(in srgb,currentColor 62%,transparent));
  text-decoration-thickness:max(1.5px,.09em);text-underline-offset:.24em;-webkit-tap-highlight-color:transparent
}
/* Sit above „whole card is a link“ (::after with inset:0, e.g. reference and service cards) – otherwise the term never
   opens its popup and the click would go to the card link. The rest of the card stays clickable. */
.gl-term{position:relative;z-index:2}
.gl-sr{position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.gl-term:hover,.gl-term[aria-expanded=true]{text-decoration-color:var(--_acc);text-decoration-style:solid}
.gl-term[aria-expanded=true]{background:color-mix(in srgb,var(--_acc) 14%,transparent)}
.gl-term:focus-visible{outline:2px solid var(--_acc);outline-offset:2px}

/* ---------------------------------------------------------------- Popup (popover; without Popover API: .is-open) */
.gl-pop{
  display:none;position:fixed;inset:auto 12px 12px;z-index:2147483000;box-sizing:border-box;width:max-content;max-width:var(--gl-width,min(22rem,calc(100vw - 24px)));
  margin:0 auto;padding:.85em 1em .9em;overflow:visible;border:1px solid var(--gl-border,color-mix(in srgb,currentColor 18%,transparent));
  border-radius:var(--_r);font:inherit;font-family:var(--gl-font,inherit);font-size:max(.9rem,15px);font-weight:400;font-style:normal;line-height:1.5;
  letter-spacing:normal;text-align:left;text-transform:none;white-space:normal;color:inherit;background:Canvas;
  box-shadow:var(--gl-shadow,0 12px 32px -8px rgb(0 0 0/.28),0 2px 6px rgb(0 0 0/.1))
}
/* Background and text from the surrounding text colour: dark text → light background, light text → dark background */
@supports (color:oklch(from red l c h)){
  .gl-pop{color:var(--gl-text,oklch(from currentColor clamp(.17,(l - .6) * 1000,.97) min(c,.02) h));
    background:var(--gl-bg,oklch(from currentColor clamp(.22,(.6 - l) * 1000,.995) min(c,.012) h))}
}
.gl-pop:popover-open{display:block}
.gl-pop.is-open{display:block}
.gl-pop__head{display:flex;align-items:baseline;gap:.5em;margin:0 0 .3em}
.gl-pop__t{flex:1;font-weight:700;font-size:1.02em}
.gl-pop__draft{padding:.05em .45em;border-radius:99px;background:color-mix(in srgb,#e8a33d 28%,transparent);font-size:.78em;font-weight:600}
.gl-pop__x{flex:none;display:grid;place-items:center;width:1.9em;height:1.9em;margin:-.45em -.5em 0 0;padding:0;border:0;border-radius:50%;
  background:none;color:inherit;font:inherit;font-size:1.1em;line-height:1;cursor:pointer;opacity:.7}
.gl-pop__x:hover{opacity:1;background:color-mix(in srgb,currentColor 10%,transparent)}
.gl-pop__x:focus-visible,.gl-pop__more:focus-visible{outline:2px solid var(--gl-pop-accent,var(--_acc));outline-offset:2px}
.gl-pop__d{display:block}
.gl-pop__more{display:inline-block;margin-top:.55em;color:var(--gl-pop-accent,var(--_acc));font-weight:600;text-decoration:underline;text-underline-offset:.2em}
@supports (color:oklch(from red l c h)){
  /* Link readable on the derived background: mix the accent with the text's lightness */
  .gl-pop__more{color:var(--gl-pop-accent,color-mix(in oklab,var(--_acc) 70%,currentColor))}
}
/* Narrow screens: at the bottom as a sheet across the full width */
@media (max-width:36em){
  .gl-pop{inset:auto 0 0 0;width:auto;max-width:none;padding:1.1em 1.25em calc(1.2em + env(safe-area-inset-bottom));border-width:1px 0 0;
    border-radius:var(--_r) var(--_r) 0 0;font-size:1rem;box-shadow:0 -10px 32px -6px rgb(0 0 0/.3)}
  .gl-pop__x{width:2.4em;height:2.4em}
}
@media (prefers-reduced-motion:no-preference){
  .gl-pop:popover-open{animation:gl-in .14s ease-out}
  @keyframes gl-in{from{opacity:0;translate:0 4px}}
}
@media (forced-colors:active){.gl-pop{border:1px solid CanvasText}.gl-term{text-decoration-color:LinkText}}

/* ---------------------------------------------------------------- Print: explanation in brackets after the term */
@media print{
  .gl-term{text-decoration:none;background:none}
  .gl-pop[popover],.gl-pop{display:inline!important;position:static!important;inset:auto;width:auto;max-width:none;margin:0;padding:0;border:0;
    background:none!important;color:inherit!important;box-shadow:none;font-size:.9em;animation:none}
  .gl-pop::before{content:" ("}
  .gl-pop::after{content:")"}
  .gl-pop__head,.gl-pop__more{display:none}
  .gl-pop__d{display:inline}
}

/* ---------------------------------------------------------------- Block „Glossar“: list A–Z and detail page */
.glx-group[hidden]{display:none}
.glx-list{display:grid;margin:0;border-top:1px solid var(--f-line-strong,currentColor)}
.glx-item{display:flex;flex-wrap:wrap;gap:.25rem 1.5rem;padding:.8rem 0;border-bottom:1px solid var(--f-line,rgb(0 0 0/.12))}
.glx-item[hidden]{display:none}
.glx-item dt{flex:1 1 min(12rem,100%);color:var(--f-ink,inherit);font-weight:650}
.glx-item dt a{color:var(--f-link,inherit)}
.glx-item dd{flex:999 1 0;min-width:min(100%,60%);margin:0;color:var(--f-text,inherit)}
.glx-draft{padding:.05em .45em;border-radius:99px;background:color-mix(in srgb,#e8a33d 28%,transparent);font-size:.78em;font-weight:600}
.glx-term__head{display:grid;gap:.6rem;max-width:48rem}
.glx-term__head .eyebrow{margin:0}
.glx-term__title{margin:0;color:var(--f-ink,inherit);font:var(--f-hw,700) max(var(--f-t3,2rem),min(var(--f-t5,3rem),9cqi))/1.05 var(--f-font-head,inherit);text-wrap:balance;hyphens:auto}
.glx-term__alt{margin:0;color:var(--f-muted,inherit)}
.glx-term__short{margin:0;color:var(--f-text,inherit);font-size:var(--f-t1,1.2rem);line-height:1.5}
.glx-term__long{margin-top:0}
