/* Lightweight tooltips for inline <code> terms (not code blocks). */
code.pt-tip {
  position: relative;
  cursor: help;
  border-bottom: 1px dotted rgba(238, 76, 44, 0.65);
  padding-bottom: 1px;
}

code.pt-tip::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(4px);
  opacity: 0;
  pointer-events: none;
  background: rgba(10, 10, 10, 0.98);
  color: #e5e7eb;
  border: 1px solid rgba(238, 76, 44, 0.35);
  border-radius: 10px;
  padding: 10px 12px;
  width: max-content;
  max-width: min(340px, 80vw);
  font-size: 0.8rem;
  line-height: 1.35;
  white-space: normal;
  z-index: 9999;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.45);
  transition: opacity 140ms ease, transform 140ms ease;
}

code.pt-tip::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 2px);
  transform: translateX(-50%);
  opacity: 0;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 7px solid rgba(10, 10, 10, 0.98);
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35));
  transition: opacity 140ms ease;
}

code.pt-tip:hover::after,
code.pt-tip:focus::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

code.pt-tip:hover::before,
code.pt-tip:focus::before {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  code.pt-tip::after,
  code.pt-tip::before {
    transition: none;
  }
}

