/* A term's meaning on a phone (js/term_tips.js). A defined term or
   abbreviation shows a dotted underline, the sign that it can be tapped. */
dfn[data-term-tip],
abbr[data-term-tip] {
  text-decoration: underline dotted;
  text-underline-offset: 0.2em;
  cursor: help;
}

dfn[data-term-tip]:focus-visible,
abbr[data-term-tip]:focus-visible {
  outline: 2px solid var(--bs-primary, #0d6efd);
  outline-offset: 2px;
  border-radius: 2px;
}

.term-tip-box {
  position: absolute;
  z-index: 1080;
  display: block;
  padding: 0.4rem 0.6rem;
  font-size: 0.875rem;
  font-style: normal;
  line-height: 1.35;
  color: var(--bs-body-color, #212529);
  background: var(--bs-body-bg, #fff);
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 0.375rem;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.15);
}

@media print {
  .term-tip-box { display: none; }
}

/* iOS Safari fires a click on a plain element only when it looks clickable,
   so on touch screens a term gets the pointer cursor (two final cold reads,
   2026-09-27, saw no box on tap). */
@media (hover: none) {
  dfn[data-term-tip],
  abbr[data-term-tip] { cursor: pointer; }
}
