/* Publications page: the list, and the bar chart under it. */

.pub-list { padding-left: 2em; }
.pub-list li { margin-bottom: 0.9em; }
.pub-meta { color: var(--ink-soft); }


/* The bar chart of papers per site. Each row is a site name, then its bar with
   the count at the tip. To restyle: bar colour and thickness are on
   .pub-chart__bar; the row spacing is the 0.3rem padding. */
.pub-chart {
  display: grid;
  grid-template-columns: max-content 1fr;   /* names as wide as the longest; bars take the rest */
  max-width: 46rem;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
}
.pub-chart li { display: contents; }         /* the two spans below are the grid cells */
.pub-chart__site { padding: 0.3rem 0.75rem 0.3rem 0; text-align: right; }
.pub-chart__track {
  display: flex;
  align-items: center;
  padding: 0.3rem 0;
  border-left: 1px solid var(--rule);        /* the baseline the bars grow from */
}
.pub-chart__bar {
  flex: none;
  height: 1.1rem;
  background: var(--accent);
  border-radius: 0 4px 4px 0;                /* square at the baseline, rounded at the tip */
}
.pub-chart__count { margin-left: 0.5rem; font-variant-numeric: tabular-nums; }

/* Narrow screens: the name goes above its bar. */
@media (max-width: 40rem) {
  .pub-chart { grid-template-columns: 1fr; }
  .pub-chart__site { padding: 0.5rem 0 0; text-align: left; }
  .pub-chart__track { padding: 0.1rem 0 0.3rem; border-left: 0; }
}
