.gl-term {
  appearance: none;
  display: inline;
  max-inline-size: 100%;
  border: 0;
  border-radius: 2px;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: inherit;
  text-decoration: underline dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  overflow-wrap: anywhere;
  white-space: normal;
  cursor: pointer;
}

.gl-term:hover,
.gl-term[aria-expanded="true"] {
  background: var(--mist);
  color: var(--royal);
}

.gl-popover {
  position: fixed;
  z-index: 50;
  box-sizing: border-box;
  width: min(22rem, calc(100% - 24px));
  max-height: calc(100% - 24px);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--border);
  border-top: 3px solid var(--royal);
  border-radius: 8px;
  padding: 12px 16px;
  background: var(--surface);
  box-shadow: 0 8px 26px rgb(11 23 66 / 15%);
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.gl-popover[hidden] { display: none; }

.gl-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
}

.gl-title {
  margin: 3px 0 0;
  font-size: 1.28rem;
}

.gl-close {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  color: var(--royal);
  font: 400 1.4rem/1 var(--body);
}

.gl-definition { margin: 4px 0 8px; }

.gl-example {
  margin: 0 0 8px;
  border-inline-start: 2px solid var(--border);
  padding-inline-start: 10px;
}

.gl-source {
  color: var(--muted);
  font-size: 0.77rem;
}
