/* Term cards (public/js/term-cards.js): a glossary term or a short note opens
   a small card on hover, focus or tap. The term keeps the text colour and a
   quiet dotted underline, so nothing new shows until someone asks.
   The custom properties are the record page's theme tokens; the fallbacks
   make the same file work on a page without them. */
.rk-term {
  color: inherit;
  cursor: help;
  text-decoration: underline dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: var(--text-soft, #999);
}
a.rk-term:hover,
a.rk-term:focus { color: inherit; text-decoration-color: var(--accent-gold, #C5A875); }
/* A chip that carries a note keeps its own look: no underline. */
.rk-tip-plain { cursor: help; }

.rk-term-card {
  position: absolute;
  z-index: 70;
  box-sizing: border-box;
  width: max-content;
  max-width: min(18rem, calc(100vw - 16px));
  padding: 0.75rem 0.875rem;
  border-radius: 12px;
  background: var(--bg-card, #fff);
  color: var(--text-main, #222);
  border: 1px solid var(--accent-gold-soft, rgba(197, 168, 117, 0.4));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: normal;
  text-align: left;
  text-transform: none;
  white-space: normal;
}
.rk-term-card[hidden] { display: none; }
.rk-term-card-head { font-weight: 600; }
.rk-term-card-alt { margin-top: 0.125rem; font-size: 0.75rem; color: var(--text-soft, #777); }
.rk-term-card-alt > span + span::before { content: "\00a0\00b7\00a0"; }
.rk-term-card-def { margin-top: 0.375rem; color: var(--text-subtle, #444); }
.rk-term-card-def:first-child { margin-top: 0; }
.rk-term-card-more {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-gold, #92700c);
  text-decoration: none;
}
.rk-term-card-more:hover { text-decoration: underline; }
