/* Publication browser - uses the site's :root variables */
#pubs-app { --lead: var(--wcm-red); }
#pubs-app .ic { width: 1.05em; height: 1.05em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
#pubs-app button { font-family: inherit; cursor: pointer; }
#pubs-app .note { margin: 0 0 12px; }

/* packages */
.pk-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; margin-bottom: 10px; }
.pkc { display: flex; gap: 10px; align-items: center; text-align: left; background: #fff; border: 1px solid var(--rule); border-radius: 6px; padding: 5px 8px; color: var(--ink); }
.pkc:hover { border-color: #bbb; }
.pkc[aria-pressed="true"] { border-color: var(--wcm-red); box-shadow: 0 0 0 1px var(--wcm-red); }
.pkc img, .pkc .pkt { width: 26px; height: 34px; object-fit: cover; flex: none; border-radius: 2px; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.pkc .pkt { display: grid; place-items: center; background: #e9e6e1; color: #777; box-shadow: none; font-size: 20px; }
.pkc b { display: block; font-size: 13.5px; line-height: 1.25; font-weight: 600; }
.pkc small { color: var(--muted); font-size: 12px; }
.pk-info { background: #fff; border-left: 3px solid var(--wcm-red); padding: 10px 14px; font-size: 15px; margin-bottom: 14px; }
.pk-info a { margin-left: 10px; font-weight: 600; }

/* toolbar */
.bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 0 0 8px; }
.seg { display: inline-flex; border: 1px solid #c9c9c9; border-radius: 6px; overflow: hidden; background: #fff; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 5px 11px; font-size: 14px; font-weight: 600; color: var(--muted); border-right: 1px solid #e2e2e2; }
.seg button:last-child { border-right: 0; }
.seg button i { font-style: normal; font-weight: 400; margin-left: 6px; font-size: 13px; opacity: .75; }
.seg button[aria-selected="true"] { background: var(--wcm-red); color: #fff; }
.search { flex: 1 1 220px; }
.search input { width: 100%; font: inherit; font-size: 14px; padding: 5px 10px; border: 1px solid #c9c9c9; border-radius: 6px; background: #fff; }
.sort { font-size: 14px; color: var(--muted); }
.sort select { font: inherit; font-size: 14px; padding: 4px 6px; border: 1px solid #c9c9c9; border-radius: 6px; background: #fff; margin-left: 4px; }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-bottom: 4px; }
#f-theme { flex-basis: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
.fg { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.fl { font-size: 12px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); font-weight: 700; margin-right: 2px; }
.chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid #cfcfcf; background: #fff; border-radius: 999px; padding: 1px 9px; font-size: 13px; color: var(--ink); line-height: 1.5; white-space: nowrap; flex: none; }
.chip i { font-style: normal; font-size: 11.5px; color: var(--muted); }
.chip[data-theme] .ic { color: var(--c); }
.chip[data-theme][aria-pressed="true"] { background: var(--c); border-color: var(--c); color: #fff; }
.chip[data-theme][aria-pressed="true"] .ic, .chip[data-theme][aria-pressed="true"] i { color: #fff; }
.chip.role[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.more-f summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.more-f[open] { flex-basis: 100%; }
.fmore { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; padding: 6px 0; font-size: 13px; }
.clear { border: 0; background: none; color: var(--wcm-red); font-size: 14px; font-weight: 600; text-decoration: underline; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }
.count { font-weight: 700; color: var(--ink); }

/* list */
.plist { list-style: none; margin: 0; padding: 0; }
.plist .yr { font-family: "Source Serif 4", Georgia, serif; font-size: 16px; font-weight: 600; letter-spacing: .5px; color: var(--wcm-red); padding: 18px 0 2px; }
.plist .empty { padding: 30px 0; color: var(--muted); }
.pub { display: grid; grid-template-columns: 68px minmax(0, 1fr) 170px 48px 76px; gap: 18px; padding: 16px 0 16px 14px; border-bottom: 1px solid var(--rule); border-left: 3px solid var(--c); margin-top: 0; }
.pub .thumb { position: relative; width: 68px; height: 88px; background: color-mix(in srgb, var(--c) 10%, #fff); border-radius: 3px; display: grid; place-items: center; color: var(--c); font-size: 26px; overflow: hidden; }
.pub .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pub .thumb.is-cover { box-shadow: 0 3px 10px rgba(0,0,0,.22); }
.pub .thumb .cov { position: absolute; left: 0; bottom: 0; right: 0; background: rgba(34,34,34,.85); color: #fff; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; text-align: center; padding: 1px 0; font-weight: 700; }
.pub .thumb a.cov:hover { background: var(--wcm-red, #b31b1b); text-decoration: none; }
.pub .t { font-weight: 600; font-size: 18px; line-height: 1.35; color: var(--ink); display: block; }
.pub a.t:hover { color: var(--wcm-red); text-decoration: none; }
.pub .au { font-size: 15.5px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.me { color: var(--wcm-red); font-weight: 700; }
.lab { color: var(--ink); font-weight: 700; }
.pub .v { font-size: 15px; color: var(--muted); margin-top: 2px; }
.pub .v em { color: var(--ink); font-weight: 600; }
.pub .if { background: #f0eeea; border-radius: 3px; padding: 0 6px; font-size: 13px; color: #555; }
.au-btn { border: 0; background: #efede9; border-radius: 3px; padding: 0 6px; font-size: 13px; color: #555; line-height: 1.5; }
.au-btn:hover { background: #e2dfd9; color: var(--ink); }
.tags { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-top: 8px; font-size: 13px; }
.tags .th { display: inline-flex; align-items: center; gap: 5px; color: var(--c); background: color-mix(in srgb, var(--c) 11%, #fff); border-radius: 999px; padding: 1px 10px 1px 8px; font-weight: 600; }
.tags .th i { font-style: normal; font-weight: 400; opacity: .85; }
.rb { border-radius: 3px; padding: 1px 8px; font-weight: 700; font-size: 12px; letter-spacing: .2px; }
.rb.lead { background: var(--lead); color: #fff; }
.rb.co { background: #1d6f8f; color: #fff; }
.pk, .med, .xl { display: inline-flex; align-items: center; gap: 4px; border: 1px solid #cfcfcf; background: #fff; border-radius: 3px; padding: 0 7px; font-size: 12.5px; color: #555; }
.pk:hover, .med:hover, .xl:hover { border-color: var(--wcm-red); color: var(--wcm-red); text-decoration: none; }
.tags .mt { color: #8a8a8a; font-size: 12.5px; }
.pub .side { text-align: right; }
.cit { display: inline-flex; flex-direction: column; align-items: center; min-width: 58px; padding: 4px 8px 3px; border-radius: 6px; background: #f6e9e9; color: var(--wcm-red); line-height: 1.1; white-space: nowrap; }
.cit b { font-size: 20px; font-weight: 700; font-family: "Source Serif 4", Georgia, serif; }
.cit small { font-size: 10.5px; letter-spacing: .6px; text-transform: uppercase; opacity: .8; }
.cit.none { background: none; color: #aaa; }
.pub .jn { font-size: 14.5px; color: var(--muted); line-height: 1.35; }
.pub .jn em { display: block; color: var(--ink); font-weight: 600; font-style: italic; }
.pub .jn small { display: block; font-size: 12.5px; }
.pub .jn .if { display: inline-block; margin-top: 4px; font-weight: 700; color: var(--ink); }
.pub .jn .if.approx { font-weight: 600; color: #555; }
.pub .yc { font-size: 15px; color: var(--ink); font-weight: 600; text-align: center; }
.colhead { display: grid; grid-template-columns: 68px minmax(0, 1fr) 170px 48px 76px; gap: 18px; padding: 6px 0 4px 17px; margin-top: 6px; border-bottom: 2px solid var(--rule); font-size: 12px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); font-weight: 700; }
.colhead span { grid-column: 1 / 3; }
.colhead button { border: 0; background: none; padding: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; text-align: left; }
.colhead button:nth-of-type(2) { text-align: center; }
.colhead button:nth-of-type(3) { text-align: right; }
.colhead button:hover { color: var(--wcm-red); }
.chip.hlchip .ic { color: #c9930c; }
.chip.hlchip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.hlchip[aria-pressed="true"] .ic, .chip.hlchip[aria-pressed="true"] i { color: #fff; }
.loadmore { display: block; font-size: 15px; margin: 24px auto 0; background: #fff; border: 1px solid #bbb; border-radius: 6px; padding: 10px 22px; font-weight: 600; color: var(--ink); }
.loadmore[hidden], .clear[hidden], .pk-info[hidden] { display: none; }
.loadmore:hover { border-color: var(--wcm-red); color: var(--wcm-red); }

@media (max-width: 700px) {
  .colhead { display: none; }
  .pub { grid-template-columns: 52px 1fr auto; gap: 6px 12px; }
  .pub .thumb { width: 52px; height: 68px; grid-row: 1 / 4; }
  .pub .body { grid-column: 2 / 4; }
  .pub .jn { grid-column: 2; grid-row: 2; }
  .pub .yc { grid-column: 3; grid-row: 2; text-align: right; }
  .pub .side { grid-column: 2 / 4; grid-row: 3; text-align: left; }
  .pub .t { font-size: 17px; }
  .seg button { padding: 5px 8px; font-size: 13px; }
  .stats .src { margin-left: 0; flex-basis: 100%; }
}

/* equal-contribution / corresponding marks take the colour and weight of the name (or badge) they follow;
   after other authors' names they are regular black */
.mk { font-weight: inherit; color: inherit; font-size: .8em; line-height: 0; margin-left: 1px; }
.pub .au .mk, .legend .mk { color: var(--ink); font-weight: 400; }
.pub .au .me .mk, .pub .au .lab .mk { color: inherit; font-weight: inherit; }
.fg[hidden] { display: none; }

/* shared first / corresponding authorship: purple (name and badge); sole roles stay WCM red */
.me.sh { color: #6a3d9a; }
.rb.co { background: #6a3d9a; }
.rb.ne { background: #e9e6e1; color: #444; }

/* moved with the browser from the homepage's inline styles (the browser now lives on publications/) */
.stats { display: flex; gap: 6px 22px; align-items: baseline; flex-wrap: wrap; margin: 0 0 12px; font-size: 14px; color: var(--muted); }
.stat b { font-family: "Source Serif 4", Georgia, serif; font-size: 20px; font-weight: 600; color: var(--wcm-red); margin-right: 2px; }
.stats .src { font-size: 12.5px; margin-left: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Homepage: compact publication browser (pubs-app.compact) */
#pubs-app.compact .pk-strip, #pubs-app.compact .pk-info, #pubs-app.compact .legend > span:not(.count) { display: none; }
