:root {
  --pico-background-color: #ffffff;
  --pico-color: #1a1a1a;
  --glossary-meta: #55606d;
}

@media (prefers-color-scheme: dark) {
  :root {
    --pico-background-color: #16181d;
    --pico-color: #e8e8e8;
    --glossary-meta: #9aa4b2;
  }
}

.term-meta {
  font-size: 0.85em;
  color: var(--glossary-meta);
  margin-bottom: 0.25rem;
}

/* ponytail: Pico's `nav ul { display: flex }` turns any nav list into a
   horizontal row by default; reclaim block/column layout for the index. */
#term-index {
  display: block;
  column-width: 12rem;
  list-style: none;
  padding: 0;
}

#term-index li {
  display: block;
  padding: 0.15rem 0;
}

/* ponytail: Pico's summary::after chevron is float:right (sits at the far
   edge of the block); reset to a plain inline glyph beside the text. */
details > summary::after {
  float: none;
  display: inline;
  width: auto;
  height: auto;
  margin-inline-start: 0.4rem;
  background: none;
  content: "▸";
  color: var(--glossary-meta);
  transform: none;
}

details[open] > summary::after {
  content: "▾";
  transform: none;
}

#category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.pill {
  display: inline-block;
  font-size: 0.8em;
  line-height: 1;
  padding: 0.35rem 0.7rem;
  margin: 0;
  border-radius: 999px;
  border: 1px solid var(--pico-primary);
  background: var(--pico-primary);
  color: var(--pico-primary-inverse);
  cursor: pointer;
}

.pill-off {
  background: transparent;
  color: var(--glossary-meta);
  border-color: var(--glossary-meta);
}

.term-categories .pill {
  cursor: default;
  padding: 0.15rem 0.6rem;
  margin-inline-end: 0.3rem;
  background: transparent;
  color: var(--glossary-meta);
  border-color: var(--glossary-meta);
}

.anchor-link {
  opacity: 0;
  margin-left: 0.4rem;
  font-size: 0.75em;
  color: var(--glossary-meta);
  text-decoration: none;
}

h2:hover .anchor-link,
.anchor-link:focus {
  opacity: 1;
}
