/* OPORA tooltip hoverfix · 13px refinement — isolated term hints for article headings and prose.
   The native [hidden] attribute guarantees a compact, clean title even when CSS/JS fail. */
.opora-term-card[hidden] { display: none !important; }
.article-page .opora-term {
  position: relative;
  display: inline-block;
  vertical-align: baseline;
  white-space: nowrap;
  padding-inline-end: 15px;
  line-height: inherit;
}
.article-page .opora-term-word { display: inline; }
.article-page .opora-term-help {
  box-sizing: border-box;
  position: absolute;
  inset-block-start: .08em;
  inset-inline-end: 0;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px !important;
  height: 13px !important;
  min-width: 13px !important;
  min-height: 13px !important;
  max-width: 13px !important;
  max-height: 13px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid #98aa8c;
  border-radius: 50%;
  background: #f1f5eb;
  color: #34563f;
  font: 700 9px/1 system-ui,-apple-system,"Segoe UI",sans-serif !important;
  letter-spacing: 0;
  text-decoration: none;
  cursor: help;
  transition: background-color .15s ease,border-color .15s ease,transform .15s ease;
  box-shadow: 0 1px 3px rgba(27,53,37,.12);
}
.article-page .opora-term-help::after {
  content: '';
  position: absolute;
  inset: -7px;
  border-radius: 50%;
}
.article-page .opora-term-help:hover,
.article-page .opora-term-help[aria-expanded="true"] {
  background: #dce8d4;
  border-color: #58735a;
}
.article-page .opora-term-help:focus-visible {
  outline: 2px solid #204b37;
  outline-offset: 3px;
}
.article-page .opora-term-card:not([hidden]) {
  box-sizing: border-box;
  display: flex;
  position: absolute;
  z-index: 100;
  inset-block-start: calc(.08em + 16px); /* 3px below 13px help badge, even in H1 */
  inset-inline-start: 0;
  flex-direction: column;
  gap: 9px;
  width: min(330px, calc(100vw - 30px));
  max-height: min(60vh, 370px);
  overflow-y: auto;
  padding: 18px 20px;
  border: 1px solid #c9d8c4;
  border-radius: 14px;
  background: #fffefb;
  color: #203a2d;
  box-shadow: 0 14px 35px rgba(17,42,29,.17);
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: left;
  font: 400 15px/1.55 system-ui,-apple-system,"Segoe UI",sans-serif;
  letter-spacing: 0;
}
.article-page .opora-term.is-flipped .opora-term-card:not([hidden]) {
  inset-inline-start: auto;
  inset-inline-end: 0;
}
.article-page .opora-term-card strong {
  display: block;
  font: 700 16px/1.4 system-ui,-apple-system,"Segoe UI",sans-serif;
  color: #1d402f;
}
.article-page .opora-term-card > span { display: block; color: #425b4e; }
.article-page .opora-term-card a {
  display: inline-block;
  width: fit-content;
  color: #24593c;
  font: 600 14px/1.5 system-ui,-apple-system,"Segoe UI",sans-serif;
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (max-width: 700px) {
  .article-page .opora-term-help { width: 13px !important; height: 13px !important; }
  .article-page .opora-term-card:not([hidden]),
  .article-page .opora-term.is-flipped .opora-term-card:not([hidden]) {
    position: fixed;
    inset: auto 12px max(14px, env(safe-area-inset-bottom)) 12px;
    width: auto;
    max-width: none;
    max-height: min(60dvh, 420px);
    padding: 18px;
    font-size: 15px;
    z-index: 1200;
  }
}
@media (prefers-reduced-motion: reduce) {
  .article-page .opora-term-help { transition: none; }
}
