/* The Terms tab: the glossary and its study run. */

.term-tools { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin: var(--s3) 0 var(--s2); }
.term-search {
  flex: 1 1 160px; min-width: 0; min-height: 36px; padding: 0 var(--s3);
  border: 1px solid var(--line-strong); border-radius: var(--r2); background: var(--surface);
  font: inherit; color: var(--ink);
}
.term-tally { margin-bottom: var(--s3); }

.term-item { padding: var(--s3); }
.term-item.is-known { background: var(--paper, transparent); }
.term-head { display: flex; align-items: flex-start; gap: var(--s2); }
.term-name {
  flex: 1 1 auto; min-width: 0; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-weight: 600; color: var(--ink); text-align: left; overflow-wrap: anywhere;
}
.term-name:hover { text-decoration: underline; }
.term-grasp {
  flex: none; min-height: 26px; padding: 0 var(--s2); cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface);
  font: inherit; font-size: var(--fs-xs); color: var(--muted);
}
.term-grasp[data-grasp="learning"] { border-color: var(--you); color: var(--you); }
.term-grasp[data-grasp="known"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.term-meaning { margin: var(--s1, 4px) 0 0; font-size: var(--fs-sm); line-height: 1.45; overflow-wrap: anywhere; }
.term-item .field { margin: var(--s3) 0 var(--s2); }
.term-item .field textarea { font-family: var(--font-body); }

.term-seen { margin: var(--s3) 0; }
.term-place { margin-top: var(--s2); font-size: var(--fs-sm); }
.term-place a { color: var(--you); overflow-wrap: anywhere; }
.term-quote {
  margin: 4px 0 0; padding-left: var(--s3); border-left: 2px solid var(--line-strong);
  font-size: var(--fs-sm); color: var(--muted); line-height: 1.45; overflow-wrap: anywhere;
}

.term-study {
  margin-top: var(--s3); padding: var(--s5, 24px) var(--s4);
  border: 1px solid var(--line-strong); border-radius: var(--r2); background: var(--surface); text-align: center;
}
.term-study-count { margin: 0 0 var(--s3); font-size: var(--fs-xs); color: var(--muted); }
.term-study-word { margin: 0 0 var(--s2); font-size: 1.5rem; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.term-study-meaning { margin: var(--s4) 0 var(--s2); line-height: 1.5; text-align: left; }
.term-study .term-quote { text-align: left; }
.term-study .doc-actions { justify-content: center; margin-top: var(--s4); }
.term-link {
  margin-top: var(--s4); padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: var(--fs-sm); color: var(--muted); text-decoration: underline;
}

@media (max-width: 767px) {
  .term-search { min-height: 44px; font-size: 16px; }
  .term-grasp { min-height: 36px; padding: 0 var(--s3); }
  .term-study .btn { min-height: 48px; flex: 1 1 0; }
}

/* A glossary term where it is used, in the transcript or a lesson. */
.term-mark {
  display: inline; padding: 0; border: 0; background: none; cursor: help;
  font: inherit; color: inherit; text-align: inherit;
  text-decoration: underline dotted; text-decoration-thickness: 1.5px; text-underline-offset: 3px;
}
.term-mark:hover, .term-mark:focus-visible { background: var(--agent-tint); }
