/* ============================================================
   ARCANE DRUID — GLOSSARY STYLING (failsafe + JS-friendly)
   ============================================================ */

/* ---- Palette / tokens ---- */
.glossary-section {
  --glossary-ink: #2a2724;
  --glossary-subtle: #7a6f66;
  --glossary-bg: #f6f1e9;
  --glossary-card: #fffaf2;
  --glossary-accent: #c6a15b;
  --glossary-accent-ink: #231f1c;
  --glossary-radius: 14px;
  --glossary-shadow: 0 6px 24px rgba(0,0,0,.06);
  color: var(--glossary-ink);
}

/* ===== Arcane Druid — Glossary Search Field ===== */
.glossary-search-wrap {
  margin: 0;
  /* background: linear-gradient(180deg, var(--glossary-card), var(--glossary-bg) 85%);
  border: 1px solid #e6dccf;
  border-radius: var(--glossary-radius);
  box-shadow: var(--glossary-shadow); */
}

.glossary-search-wrap label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--glossary-ink);
  font-size: 0.95em;
}

.glossary-search-wrap input {
  width: 100%;
  border: 1px solid #d5c7aa;
  border-radius: 8px;
  background: var(--glossary-card);
  color: #30302f;
  font-size: 1em;
  transition: all 0.2s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
 
}

.glossary-search-input:focus {
  outline: none;
  border-color: var(--glossary-accent);
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.05),
    0 0 0 3px rgba(198, 161, 91, 0.15);
}

.glossary-search-input::placeholder {
  color: var(--glossary-subtle);
  opacity: 0.8;
}

/* ===== Arcane Druid — Glossary Letter Bar (targets your exact HTML) ===== */
/* outer bar */
.glossary-term-bar {
  position: sticky;
  top: 0; /* adjust if your header has height */
  z-index: 50;
  background: rgba(247, 240, 227, 0.95); /* warm parchment, slightly transparent */
  backdrop-filter: blur(2px);
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0.65rem 1.25rem;
  border-bottom: 1px solid rgba(195, 171, 131, 0.35);
  overflow-x: auto;              /* allow scroll on small screens */
  white-space: nowrap;           /* keep on one line */
  scrollbar-width: none;         /* Firefox hide scrollbar */
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);

}
.glossary-term-bar::-webkit-scrollbar {
  display: none;                 /* Chrome hide scrollbar */
}

/* individual letters that are links */
.glossary-link-initial-item,
.glossary-no-link-initial-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  background: #fefbf5;
  border: 1px solid rgba(0,0,0,0.02);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  font-family: "Crimson Text", serif;
  font-weight: 600;
  font-size: 1rem;
  color: #2a4f34;
  transition: all 0.15s ease-in-out;
}

/* clickable letters */
.glossary-link-initial-item a {
  text-decoration: none;
  color: inherit;
  display: inline-block;
  width: 100%;
  text-align: center;
}

/* hover / active state */
.glossary-link-initial-item:hover,
.glossary-link-initial-item.is-active {
  border-color: rgba(163, 129, 52, 0.6); /* gold-ish */
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  color: #214129;
    background: #fff8e8;
  transform: translateY(-1px);
}

/* letters with no link */
.glossary-no-link-initial-item {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
  background: rgba(254, 251, 245, 0.5);
}

/* optional label before the letters */
.glossary-term-bar::before {
  content: "Jump to:";
  font-family: "Crimson Text", serif;
  font-weight: 600;
  color: #234b33;
  margin-right: 0.75rem;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .glossary-term-bar::before {
    display: none;
  }
}



/* end of bar styling */






/* Anchor landing: make sure jumps clear the sticky header */
.glossary-section [id^="glossary-"] {
  scroll-margin-top: 110px; /* adjust if your header height differs */
}

/* Optional: style the letter headings right above the cards */
.glossary-section h2[id^="glossary-"] {
  margin: 26px 0 10px;
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 800;
  color: #231f1c;
}
.glossary-section h2[id^="glossary-"]::after {
  content: "";
  display: block;
  width: 44px; height: 3px;
  background: #c6a15b;
  border-radius: 2px;
  margin-top: 8px;
}

/* Safety net: nothing above should block clicks */
.glossary-section .glossary-term-bar, 
.glossary-section .glossary-term-bar * {
  pointer-events: auto !important;
}

/* ============================================================
   LIST / TERM CARDS
   ============================================================ */

.glossary-section ul,
.glossary-section .azindex-list {
  list-style: none;
  padding: 0;
  margin: 6px 0 24px 0;
  display: grid;
  gap: 10px;
}

@media (min-width: 860px) {
  .glossary-section ul,
  .glossary-section .azindex-list {
    grid-template-columns: 1fr 1fr;
  }
}

.glossary-section li,
.glossary-section .azindex-item {
  background: var(--glossary-card);
  border: 1px solid #efe5d7;
  border-radius: var(--glossary-radius);
  padding: 10px 12px;
  box-shadow: var(--glossary-shadow);
  line-height: 1.35;
}

.glossary-section li a,
.glossary-section .azindex-item a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: color .15s ease, border-color .15s ease;
}

.glossary-section li a:hover,
.glossary-section .azindex-item a:hover {
  color: var(--glossary-accent-ink);
  border-bottom-color: var(--glossary-accent);
}

/* small subtext under items, if present */
.glossary-section li small,
.glossary-section .azindex-item small,
.glossary-section .glossary-note {
  display: block;
  color: var(--glossary-subtle);
  margin-top: 2px;
  font-size: 13px;
}

/* Top spacing rhythm when a new letter block starts */
.glossary-section * + h2[id],
.glossary-section * + .azindex-letter {
  margin-top: 30px;
}



