/* Inline equation references and their shared preview surface. */
.eqref,
body[data-learn-slug] .eqref {
  appearance: none;
  display: inline;
  box-sizing: content-box;
  width: auto;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  text-align: inherit;
  vertical-align: baseline;
  white-space: normal;
  cursor: help;
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  touch-action: manipulation;
}
.eqref:hover { color: var(--accent); }
.eqref:focus-visible {
  color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.eq-tip {
  position: fixed;
  z-index: 1000;
  box-sizing: border-box;
  max-width: min(calc(100vw - 24px), 560px);
  max-height: calc(100vh - 24px);
  background: var(--paper);
  border: 1px solid var(--rule-2);
  border-radius: 8px;
  padding: 4px 16px;
  box-shadow: var(--shadow-card-h);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  overflow: auto;
  overscroll-behavior: contain;
}
.eq-tip.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.eq-tip .katex-display { margin: 6px 0; }
.eq-tip .eq-preview-title {
  display: block;
  margin: 6px 0 2px;
  font: 700 .84rem/1.5 var(--gothic);
  color: var(--ink);
}
.eq-tip .eq-preview-note p {
  margin: 4px 0 8px;
  color: var(--ink-2);
  font-size: .88rem;
  line-height: 1.65;
}
