/* 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 ------------------------------------------------
   Typst wraps inline margin-notes in a <p>, leaking its default margin and
   giving items with sidebar links extra vertical space. Neutralize that
   accidental spacing and apply one uniform rhythm so every entry matches,
   regardless of whether it has sidebar meta links. */

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

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

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