/* Publications page (/publications/): every paper in one look, whatever the order or grouping.
   Markup: _includes/pubs/entry.html. Colours come from the thread (th1 ... th6). */
.pubs { max-width: 880px; margin: 0 auto; }
.pubs .th1, .pctl .th1 { --c: var(--t1); --soft: var(--t1-soft); } .pubs .th6 { --c: var(--t6); --soft: var(--t6-soft); }
.pubs h1 { font-size: 1.75rem; line-height: 1.2; margin: 0 0 0.3rem; font-weight: 700; }
.pubs-intro { font-size: 0.98rem; margin: 0 0 0.35rem; }

/* the paper's number, drawn as a node: ring in the thread colour, dashed while under review, filled for Start here */
.pn { width: 1.75rem; height: 1.75rem; border-radius: 50%; border: 2px solid var(--c); display: grid; place-items: center;
      font-family: var(--sans); font-weight: 700; font-size: 0.72rem; color: var(--c); background: var(--paper);
      font-variant-numeric: tabular-nums; line-height: 1; text-decoration: none; flex: none; }
a.pn:hover { text-decoration: none; box-shadow: 0 0 0 3px var(--soft); }
.is-rev .pn { border-style: dashed; }
.is-start .pn { background: var(--c); color: var(--paper); }
.pn.mini { width: 0.8rem; height: 0.8rem; border-width: 1.5px; background: var(--muted); border-color: var(--muted); }

/* controls: one quiet band */
.pctl { font-family: var(--sans); font-size: 0.78rem; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 0.5rem 0; margin: 0.75rem 0 0.2rem; }
.pctl-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem 0.7rem; }
.pctl-row + .pctl-row { margin-top: 0.45rem; }
.pctl button { font: inherit; cursor: pointer; }
.pctl-tog { display: none; }
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; overflow: hidden; background: var(--card); }
.seg button { background: none; border: 0; padding: 0.22rem 0.7rem; color: var(--muted); }
.seg button + button { border-left: 1px solid var(--rule); }
.seg button[aria-pressed="true"] { background: var(--tint); color: var(--ink); font-weight: 700; }
.tog, .tchip { display: inline-flex; align-items: center; gap: 0.4rem; border: 1px solid var(--rule); border-radius: 999px; padding: 0.22rem 0.7rem; background: var(--card); color: var(--muted); }
.tog[aria-pressed="true"] { background: var(--tint); color: var(--ink); font-weight: 700; border-color: var(--muted); }
.tchip .dot, .ptag .dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--c); display: inline-block; flex: none; }
.tchip:hover, .tog:hover { border-color: var(--c, var(--muted)); }
.tchip[aria-pressed="true"] { background: var(--soft); border-color: var(--c); color: var(--ink); font-weight: 700; }
.pcount { color: var(--muted); margin-left: auto; }
.pclear { background: none; border: 0; padding: 0; color: var(--link); font-weight: 700; }
.pempty { font-family: var(--sans); font-size: 0.86rem; color: var(--muted); text-align: center; margin: 2rem 0; }

/* groups: a year (or Under review), or a thread with its glyph and a way to its page */
.pg-h { display: flex; align-items: baseline; gap: 0.6rem; font-size: 1.1rem; font-weight: 700; margin: 1.15rem 0 0.25rem; padding-bottom: 0.2rem; border-bottom: 1px solid var(--rule); }
.pg-rev .pg-h .pg-t { color: var(--muted); }
.g-thread .pg-h { color: var(--c); align-items: center; }
.g-thread .pg-h svg { width: 1.7rem; height: 1.25rem; color: var(--c); flex: none; }
.pg-read { font-family: var(--sans); font-size: 0.76rem; font-weight: 700; margin-left: auto; order: 3; }
.g-thread .ptag { display: none; }

/* one paper */
.plist-wrap .pub { display: grid; grid-template-columns: 1.75rem 112px minmax(0, 1fr); grid-template-areas: "n thumb body"; gap: 0.85rem;
  padding: 0.45rem 0.65rem; margin: 0.15rem -0.65rem; border-radius: 8px; align-items: start; scroll-margin-top: 1rem; }
.plist-wrap .pub > .pn { grid-area: n; margin-top: 0.1rem; }
.plist-wrap .pub > .pthumb { grid-area: thumb; }
.plist-wrap .pub > .pbody { grid-area: body; min-width: 0; }
.plist-wrap .pub.is-start { background: color-mix(in srgb, var(--soft) 55%, transparent); }
.pub:target { box-shadow: 0 0 0 2px var(--c); }
/* the text side is set about 12% smaller than the Research cards; the thumbnail keeps its size */
.pub .ptop { display: flex; align-items: flex-start; gap: 0.75rem; }
.pub .ptop h5 { flex: 1 1 auto; min-width: 0; font-size: 0.89rem; }
.pub .ptop .abbr { flex: none; margin: 0.12rem 0 0; font-size: 0.68rem; }
.pub .badge { font-size: 0.64rem; }
.pub .authors { font-size: 0.77rem; }
.pub .venue { font-size: 0.78rem; margin: 0.02rem 0 0.18rem; }
.pub .venue i { font-style: italic; }
.pshort { font-size: 0.83rem; margin: 0 0 0.12rem; }
.pub .tldr { font-size: 0.83rem; }
.pub .res-links { font-size: 0.71rem; }
.pub .tldr { display: none; }
.pub.open .tldr { display: block; }
.pub.open .pshort { display: none; }
.res-links { display: flex; flex-wrap: wrap; align-items: baseline; row-gap: 0.15rem; }
.pub .res-links .na { margin-right: 0.9em; }
.psum { background: none; border: 0; padding: 0; margin-right: 0.9em; color: var(--link); font: inherit; font-weight: 700; cursor: pointer; }
.ptag { margin-left: auto; display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 400; color: var(--muted); white-space: nowrap; }
.res-links a.ptag { margin-right: 0; }
.ptag:hover { color: var(--c); }

@media (max-width: 680px) {
  .pctl-tog { display: flex; width: 100%; justify-content: space-between; background: none; border: 0; padding: 0.1rem 0; color: var(--link); font-weight: 700; }
  .pcount-m { color: var(--muted); font-weight: 400; }
  .pctl:not(.open) .pctl-row { display: none; }
  .pctl.open .pctl-tog { margin-bottom: 0.5rem; }
  .pcount { flex-basis: 100%; margin-left: 0; }
  .plist-wrap .pub { grid-template-columns: 1.75rem minmax(0, 1fr); grid-template-areas: "n body"; gap: 0.7rem; }
  .plist-wrap .pub > .pthumb { display: none; }
  .ptag { margin-left: 0; flex-basis: 100%; }
  .pub .ptop { flex-direction: column; gap: 0.15rem; }
  .pub .ptop .abbr { order: 2; margin: 0 0 0.1rem; }
}
