/* fhg-term-cards.css — exam term cards (assets/fhg-term-cards.js). Release 50.
 *
 * One card for the lesson's term triggers, the dashboard's exam and domain
 * names and the glossary. It reads the page's theme tokens, so Paper, Bronze
 * and Gold all get it in their own colors. On a phone it is a sheet along the
 * bottom of the screen, so it can never run off the edge.
 */

/* The trigger: the word stays the word, with a dotted underline that says
   "there is more here". No color change, so prose keeps its reading color. */
.exam-term { color: inherit; border-bottom: 1px dotted var(--gold, #c9a24d); cursor: help;
  -webkit-user-select: text; user-select: text; border-radius: 1px; }
.exam-term:hover, .exam-term[aria-expanded="true"] { border-bottom-style: solid; }
.exam-term:focus-visible { outline: 2px solid var(--gold, #c9a24d); outline-offset: 2px; }
span[data-xt], text[data-xt] { cursor: help; }
span[data-xt] { border-bottom: 1px dotted var(--gold-dim, rgba(201,162,77,.55)); }
[data-xt]:focus-visible { outline: 2px solid var(--gold, #c9a24d); outline-offset: 2px; }

.xt-card { position: fixed; z-index: 1000; box-sizing: border-box; width: 360px; max-width: calc(100vw - 32px);
  padding: 14px 18px 12px; background: var(--bg-elev, #1c1712); color: var(--text, #f3ede2);
  border: 1px solid var(--gold-dim, rgba(201,162,77,.55)); border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .28); font-family: var(--sans, inherit); font-size: var(--fs-body);
  line-height: 1.55; text-align: center; overflow-wrap: anywhere; }
.xt-card[hidden] { display: none; }
.xt-card.is-pinned { padding: 16px 40px 12px; }
.xt-card p { margin: 0; max-width: none; }
.xt-title { font-family: var(--serif, Georgia, serif); font-size: var(--fs-body); line-height: 1.35; color: var(--text, #f3ede2); margin-bottom: 6px !important; }
.xt-sub { font-family: var(--sans, inherit); font-size: var(--fs-small); color: var(--text-dim, #a89f92); }
.xt-def { color: var(--text, #f3ede2); margin-bottom: 8px !important; }
.xt-meta { font-size: var(--fs-small); color: var(--text-dim, #a89f92); margin-top: 3px !important; }
.xt-link { color: var(--gold, #c9a24d); text-decoration: underline; text-underline-offset: 2px; }
.xt-link:focus-visible, .xt-close:focus-visible { outline: 2px solid var(--gold, #c9a24d); outline-offset: 2px; }
.xt-close { position: absolute; top: 4px; right: 4px; width: 36px; height: 36px; border: 0; background: none;
  color: var(--text-dim, #a89f92); font-size: var(--fs-1); line-height: 1; cursor: pointer; border-radius: 8px; }
.xt-close[hidden] { display: none; }
.xt-close:hover { color: var(--text, #f3ede2); }

/* A phone: a sheet along the bottom, inside a 16px gutter. */
.xt-card.xt-sheet { left: 16px !important; right: 16px; bottom: 16px; top: auto !important; width: auto !important;
  max-width: none; max-height: 60vh; overflow-y: auto; }

@media print { .xt-card { display: none !important; } .exam-term { border-bottom: 0; } }
