/* Glossary: /glossary/ index and /glossary/<slug>/ term pages.
   Site colours only: brand orange text #bf4c00, brand green #0f4503, greys. */

/* Links from the site's content to a glossary entry: the site's ordinary link
   style. Nothing extra, so a linked term reads as an ordinary link. */

/* ---------- Index ---------- */
.glossary-index .gloss-search { margin: 1.25rem 0 1rem; max-width: 520px; }
.glossary-index .gloss-search label { display: block; font-weight: 700; margin-bottom: .35rem; }
.glossary-index .gloss-search input {
  width: 100%; box-sizing: border-box; padding: .6rem .75rem; font: inherit;
  border: 2px solid #8a8a8a; border-radius: 5px; background: #fff; color: #000;
}
.glossary-index .gloss-search input:focus { outline: 3px solid var(--brand-green, #0f4503); outline-offset: 1px; border-color: var(--brand-green, #0f4503); }
.glossary-index .gloss-count { margin: .35rem 0 0; color: #555; font-size: .9rem; }

.gloss-letters ul { list-style: none; margin: 1rem 0 1.5rem; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.gloss-letters li a, .gloss-letters li span {
  display: inline-block; min-width: 2rem; text-align: center; padding: .35rem 0; border-radius: 4px;
  font-weight: 700;
}
.gloss-letters li a { border: 1px solid var(--brand-orange-text, #bf4c00); color: var(--brand-orange-text, #bf4c00); text-decoration: none; }
.gloss-letters li a:hover, .gloss-letters li a:focus { background: #fff7f0; }
.gloss-letters li span { color: #8a8a8a; border: 1px solid #e6e3e1; }

.gloss-letter h2 { border-bottom: 2px solid var(--brand-orange, #ff6600); padding-bottom: .2rem; margin-top: 1.75rem; }
.gloss-list { margin: 0; }
.gloss-row { padding: .6rem 0; border-bottom: 1px solid #e6e3e1; }
.gloss-row dt { font-weight: 700; font-size: 1.05rem; }
.gloss-row dd { margin: .2rem 0 0; }
.gloss-group { display: inline-block; margin-left: .35rem; font-size: .82rem; color: #555; }
.gloss-group::before { content: "("; } .gloss-group::after { content: ")"; }

/* ---------- Term page ---------- */
.gloss-figure { margin: 1rem 0 0; }
.gloss-figure svg { width: 100%; height: auto; max-width: 760px; display: block; }
.gloss-figure figcaption { margin-top: .6rem; font-size: .92rem; color: #333; line-height: 1.5; }

.gloss-quiz { margin: 2rem 0; padding: 1.25rem; border: 1px solid #d8d4d0; border-radius: 8px; background: #fff; }
.gloss-quiz-sub { color: #555; margin-top: 0; }
.gq { padding: 1rem 0; border-top: 1px solid #e6e3e1; }
.gq-q { font-weight: 700; margin: 0 0 .6rem; }
.gq-n { font-weight: 400; color: #555; }
.gq-opts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.gq-opt {
  width: 100%; text-align: left; font: inherit; padding: .65rem .8rem; min-height: 44px;
  border: 2px solid #8a8a8a; border-radius: 5px; background: #fff; color: #111; cursor: pointer;
}
.gq-opt:hover { border-color: var(--brand-orange-text, #bf4c00); background: #fff7f0; }
.gq-opt:focus-visible { outline: 3px solid var(--brand-green, #0f4503); outline-offset: 2px; }
.gq.answered .gq-opt { cursor: default; }
.gq.answered .gq-opt:hover { background: #fff; border-color: #8a8a8a; }
.gq-opt.correct, .gq.answered .gq-opt.correct:hover { border-color: #0f4503; background: #eef4ec; color: #0f4503; font-weight: 700; }
.gq-opt.wrong, .gq.answered .gq-opt.wrong:hover { border-color: #8b1e12; background: #fbeeec; color: #8b1e12; text-decoration: line-through; }
.gq-mark { font-weight: 700; text-decoration: none; display: inline; }
.gq-result { margin: .6rem 0 0; font-weight: 600; min-height: 1em; }

.gloss-related ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.gloss-related li a { display: inline-block; padding: .4rem .8rem; border: 1px solid var(--brand-orange-text, #bf4c00); border-radius: 18px; text-decoration: none; color: var(--brand-orange-text, #bf4c00); }
.gloss-related li a:hover, .gloss-related li a:focus { background: #fff7f0; }

.gloss-appears-label, .gloss-appears-group summary { font-weight: 700; margin: .8rem 0 .3rem; cursor: pointer; }
.gloss-appears-group ul { columns: 2; column-gap: 2rem; padding-left: 1.2rem; }
@media (max-width: 640px) { .gloss-appears-group ul { columns: 1; } }

@media print {
  .gloss-search, .gloss-letters, .gloss-quiz script { display: none; }
}
