/* Publication filter controls */
#pub-filters select {
  font-family: inherit;
  font-size: 1.1rem;
  padding: 0.3em 0.5em;
  border: 1px solid var(--theme-table-border);
  border-radius: 4px;
  background: var(--theme-bg);
  color: var(--theme-text);
  cursor: pointer;
}

#pub-filters select:focus {
  outline: 1px solid var(--theme-secondary-text);
}

/* Row 1: year range + role */
#pub-filters {
  margin-top: 1.5rem;
}

.filter-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Row 2: journal + reset/count */
.filter-row2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

#filter-reset {
  font-family: inherit;
  font-size: 1.1rem;
  padding: 0.15em 0.5em;
  border: 1px solid var(--theme-table-border);
  border-radius: 4px;
  background: none;
  color: var(--theme-secondary-text);
  cursor: pointer;
}

#filter-reset:hover {
  color: var(--theme-text);
  border-color: var(--theme-text);
}

#filter-count {
  color: var(--theme-secondary-text);
}

#no-results {
  font-style: italic;
  color: var(--theme-secondary-text);
}

/* Publication entry spacing -------------------------------------------------
   Uniform vertical rhythm across entries. Older Typst <p>-wrapped the
   margin-note, leaking the <p>'s margin onto entries with links — drop it so
   link and no-link entries match. */

li > p:has(> .marginnote-meta),
.pub-item > p:has(> .marginnote-meta) {
  margin: 0;
}

section > ul > li {
  margin-bottom: 0.75em;
}

/* Expanded abstract: match the gap above it (below the summary) to the gap
   below it (the li's bottom margin) so it sits symmetrically. */
li details[open] > summary {
  margin-bottom: 0.75em;
}

@media (max-width: 760px) {
  section > ul > li {
    margin-bottom: 0.75rem;
  }

  li details[open] > summary {
    margin-bottom: 0.75rem;
  }
}
