/* =====================================================================
   Publications page (owner: publications-page agent). Tokens only.
   ===================================================================== */
main [hidden] { display: none !important; }

/* ---------- hero ---------- */
.pubs-hero { padding-bottom: clamp(84px, 9vw, 120px); }
.pubs-hero h1 { max-width: none; }
.pubs-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(36px, 5vw, 60px); border-top: 4px solid var(--text);
}
.pubs-stats .stat { padding: 22px 20px 0 0; position: relative; }
.pubs-stats .stat + .stat { padding-left: 22px; border-left: 1px solid var(--line); }
.pubs-stats .num { font-variant-numeric: tabular-nums; }
.pubs-stats-note { font-size: .82rem; margin: 18px 0 0; max-width: 78ch; }
@media (max-width: 760px) {
  .pubs-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pubs-stats .stat { padding: 18px 12px 18px 0; }
  .pubs-stats .stat + .stat { padding-left: 0; border-left: 0; }
  .pubs-stats .stat:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line); }
  .pubs-stats .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---------- selected publications ---------- */
.feat-grid { display: grid; gap: clamp(32px, 4vw, 44px) clamp(24px, 3vw, 36px); grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 960px) { .feat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .feat-grid { grid-template-columns: 1fr; } }
.feat-card {
  --c: var(--accent);
  position: relative; display: flex; flex-direction: column; gap: 10px;
  border-top: var(--rule); padding: 16px 0 0; transition: border-color .2s, opacity .7s var(--ease);
}
.feat-card:hover { border-top-color: var(--accent); }
.feat-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font: 600 .9rem/1.3 var(--font-body); }
.feat-venue { color: var(--text); font-style: italic; }
.feat-year { color: var(--text); font: 800 .9rem/1.3 var(--font-display); flex: none; font-variant-numeric: tabular-nums; }
.feat-title { font-family: var(--font-display); font-size: 1.22rem; font-weight: 700; line-height: 1.22; letter-spacing: -0.015em; margin: 0; }
.feat-title a { color: var(--text); text-decoration: none; }
.feat-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.feat-card:hover .feat-title a { color: var(--accent); }
.feat-title a:focus-visible { outline: none; }
.feat-title a:focus-visible::after { outline: 2px solid var(--accent); outline-offset: 4px; }
.feat-authors { color: var(--text-2); font-size: .88rem; line-height: 1.5; margin: 0; }
.feat-authors .me, .pub-authors .me { color: var(--text); font-weight: 600; }
.feat-authors .group, .pub-authors .group { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.feat-note { margin: 0; font: 700 .8rem/1.4 var(--font-display); color: var(--accent); }
.feat-foot { margin-top: auto; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.feat-chips { display: flex; gap: 6px; flex-wrap: wrap; position: relative; z-index: 2; }
.feat-chips .chip { font-size: .7rem; padding: .2em .55em; }
.feat-cites { font: 600 .8rem var(--font-display); color: var(--text-3); white-space: nowrap; }
.feat-cites b { color: var(--text); font-weight: 800; font-size: 1.05em; }
.feat-more { text-align: center; margin-top: 28px; }
/* DOI / PDF / Supplement row: sits above the card-wide title link (z-index 1), on its own line in the foot */
.feat-links { flex: 1 0 100%; display: flex; flex-wrap: wrap; gap: 6px; position: relative; z-index: 2; }
.feat-links .pub-btn { height: 26px; padding: 0 9px; font-size: .74rem; }

/* ---------- student theses (window.THESES) ---------- */
.theses-list .pub { grid-template-columns: minmax(0, 1fr); }
.theses-list .pub-venue-line { font-size: .92rem; }

/* ---------- analytics band ---------- */
.pubs-viz { display: grid; grid-template-columns: minmax(0, 2.15fr) minmax(0, 1fr); gap: 20px; margin-bottom: 28px; }
@media (max-width: 960px) { .pubs-viz { grid-template-columns: minmax(0, 1fr); } }
.pubs-viz > * { min-width: 0; }
.lg-item.lg-line { display: inline; white-space: normal; }
.lg-item.lg-line i { display: inline-block; vertical-align: middle; margin: -2px 6px 0 0; }
.pubs-viz { gap: clamp(28px, 3.5vw, 44px); }
.card.viz-card { margin: 0; padding: 16px 0 6px; }
.viz-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 14px; }
.viz-title { font: 700 .8rem/1.2 var(--font-display); letter-spacing: .06em; text-transform: uppercase; color: var(--text); }
.viz-sub { font: 600 .76rem var(--font-display); }
.viz-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.lg-item { display: inline-flex; align-items: center; gap: 6px; font: 600 .76rem/1.4 var(--font-display); color: var(--text-2); white-space: nowrap; }
.lg-item i { width: 10px; height: 10px; border-radius: 0; flex: none; }
.lg-line i { position: relative; width: 18px; height: 0; border-top: 1.6px solid var(--text); border-radius: 0; opacity: .75; }
.lg-line i::after { content: ""; position: absolute; left: 6px; top: -3.8px; width: 6px; height: 6px; border-radius: 50%; background: var(--text); }

.chart-wrap { position: relative; width: 100%; min-height: 220px; }
.pub-chart-svg { display: block; width: 100%; height: auto; overflow: visible; }
.pub-chart-svg .c-grid line { stroke: var(--line); stroke-width: 1; }
.pub-chart-svg .c-tick { font: 600 11px var(--font-display); fill: var(--text-3); font-variant-numeric: tabular-nums; }
.pub-chart-svg .c-tick-r { fill: var(--text-3); opacity: .85; }
.pub-chart-svg .c-base { stroke: var(--line-strong); }
.pub-chart-svg .c-ghost { opacity: 0; transition: opacity .7s var(--ease) 1s; }
.pub-chart-svg.built .c-ghost { opacity: 1; }
.pub-chart-svg .c-ghost rect { fill: var(--line-strong); }
.pub-chart-svg .c-col { transition: opacity .3s var(--ease), filter .2s; }
.pub-chart-svg.has-year .c-col:not(.is-on) { opacity: .26; }
.pub-chart-svg.hovering .c-col.is-hover { filter: brightness(1.15) saturate(1.1); opacity: 1; }
.pub-chart-svg .c-cum { fill: none; stroke: var(--text); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; opacity: .72; }
.pub-chart-svg .c-cum-partial { stroke-dasharray: 3 3; }
.pub-chart-svg .c-dot { fill: var(--text); stroke: var(--surface); stroke-width: 1.2; opacity: .85; }
.pub-chart-svg .c-dot-partial { fill: var(--surface); stroke: var(--text); stroke-width: 1.5; }
.pub-chart-svg .c-line { pointer-events: none; transition: opacity .3s; }
.pub-chart-svg.has-year .c-line { opacity: .45; }
.pub-chart-svg .c-hitrect { fill: transparent; cursor: pointer; }
.pub-chart-svg .c-focus { fill: none; stroke: transparent; stroke-width: 1.5; pointer-events: none; }
.pub-chart-svg .c-hitcol { outline: none; }
.pub-chart-svg .c-hitcol.is-on .c-focus { stroke: var(--text-3); stroke-dasharray: 3 3; }
.pub-chart-svg .c-hitcol:focus-visible .c-focus { stroke: var(--accent-2); stroke-dasharray: none; }

.chart-tip {
  position: absolute; left: 0; top: 0; z-index: 5; min-width: 176px; max-width: 250px; pointer-events: none;
  padding: 10px 12px 9px; border: 1px solid var(--text); border-top: 3px solid var(--text);
  background: var(--bg); font-size: .8rem; color: var(--text-2); opacity: 0; transition: opacity .15s var(--ease);
}
.chart-tip.show { opacity: 1; }
.chart-tip .tt-y { font: 800 1.15rem/1.1 var(--font-display); color: var(--text); letter-spacing: -0.02em; }
.chart-tip .tt-n { font: 600 .78rem/1.5 var(--font-display); margin-top: 2px; }
.chart-tip .tt-n b { color: var(--text); font-weight: 800; }
.chart-tip ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 3px; }
.chart-tip li { display: flex; align-items: center; gap: 8px; font-size: .8rem; }
.chart-tip li i { width: 8px; height: 8px; border-radius: 0; flex: none; }
.chart-tip li b { margin-left: auto; font: 700 .78rem var(--font-display); color: var(--text); }
.chart-tip .tt-partial { font: 700 .64rem/1 var(--font-display); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); border: 1px solid var(--line); padding: 2px 5px; vertical-align: 3px; margin-left: 4px; }
.chart-tip .tt-cum, .chart-tip .tt-hint { margin-top: 8px; padding-top: 7px; border-top: 1px solid var(--line); font: 600 .72rem/1.3 var(--font-display); color: var(--text-3); }
.chart-tip .tt-cum { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; }
.chart-tip .tt-cum b { color: var(--text); font-weight: 500; text-align: right; }
.viz-note { margin: 8px 0 0; font-size: .74rem; line-height: 1.5; }
.viz-note a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 2px; }
.viz-note a:hover { color: var(--text); }
.chart-tip .tt-hint { color: var(--accent-2); }

.venue-list { list-style: none; margin: 0 -8px; padding: 0; display: grid; gap: 1px; }
.venue-btn {
  width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 10px; align-items: baseline;
  padding: 7px 8px 8px; border: 0; background: transparent; color: var(--text-2);
  font: 500 .9rem/1.3 var(--font-body); text-align: left; cursor: pointer; transition: background .2s, color .2s;
}
.venue-btn:hover { background: var(--bg-2); color: var(--text); }
.venue-btn.is-on { background: var(--bg-2); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.venue-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-style: italic; }
.venue-n { font: 700 .8rem var(--font-display); color: var(--text); font-variant-numeric: tabular-nums; }
.venue-bar { grid-column: 1 / -1; height: 4px; background: var(--surface-3); overflow: hidden; }
.venue-bar { height: 3px; }
.venue-bar i { display: block; height: 100%; width: calc(var(--w) * 100%); background: var(--text-3); transition: width .5s var(--ease); }
.venue-btn:hover .venue-bar i { background: var(--text); }
.venue-btn.is-on .venue-bar i { background: var(--accent); }
.venue-empty { padding: 8px; font-size: .85rem; }

/* ---------- controls ---------- */
.pubs-controls { border-top: var(--rule); border-bottom: var(--hair); padding: 18px 0; }
.pc-top { display: flex; gap: 10px; align-items: center; }
.pc-search { position: relative; flex: 1; min-width: 0; }
.pc-search input {
  width: 100%; height: 50px; padding: 0 44px; border-radius: 0; border: 1px solid var(--line-strong);
  background: var(--bg); color: var(--text); font: 500 1.02rem var(--font-body); transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none; appearance: none;
}
.pc-search input::placeholder { color: var(--text-3); }
.pc-search input:focus { outline: none; border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.pc-search input::-webkit-search-cancel-button { filter: grayscale(1); cursor: pointer; }
.pc-search-ico { position: absolute; left: 15px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.pc-kbd { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; transition: opacity .15s; }
.pc-search input:focus ~ .pc-kbd, .pc-search input:not(:placeholder-shown) ~ .pc-kbd { opacity: 0; }
.pc-drawer-btn {
  display: none; align-items: center; gap: 8px; height: 50px; padding: 0 14px; border-radius: 0; flex: none;
  border: 2px solid var(--text); background: var(--bg); color: var(--text); font: 700 .9rem var(--font-display); cursor: pointer;
}
.pc-drawer-btn svg { width: 18px; height: 18px; }
.pc-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 0; display: inline-grid; place-items: center; background: var(--accent); color: var(--on-accent); font: 700 .74rem/1 var(--font-display); }
.pc-drawer { display: grid; grid-template-rows: 1fr; }
.pc-drawer-inner { min-height: 0; display: grid; gap: 14px; padding-top: 16px; }
.pc-row { display: flex; align-items: flex-start; gap: 10px 16px; }
.pc-label { font: 700 .74rem/1 var(--font-display); letter-spacing: .06em; text-transform: uppercase; color: var(--text); padding-top: 10px; min-width: 52px; }
.pc-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.pc-chips .chip { padding: .45em .8em; font-size: .8rem; transition: background .2s, color .2s, border-color .2s; }
.chip-n { opacity: .65; font-size: .9em; margin-left: 2px; font-variant-numeric: tabular-nums; }
.pc-opts { align-items: center; flex-wrap: wrap; gap: 12px 22px; padding-top: 14px; border-top: 1px solid var(--line); }
.pc-field { display: flex; align-items: center; gap: 10px; }
.pc-field .pc-label { padding-top: 0; min-width: 0; }
.pc-select { position: relative; }
.pc-select select {
  -webkit-appearance: none; appearance: none; height: 38px; padding: 0 34px 0 12px; border-radius: 0;
  border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); font: 600 .88rem var(--font-display); cursor: pointer;
}
.pc-select select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pc-select select option { background: var(--surface); color: var(--text); }
.pc-select::after {
  content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; pointer-events: none;
  border-right: 1.5px solid var(--text-2); border-bottom: 1.5px solid var(--text-2); transform: translateY(-70%) rotate(45deg);
}
.pc-switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font: 600 .88rem var(--font-display); color: var(--text-2); }
.pc-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.pc-switch .sw { position: relative; width: 36px; height: 20px; flex: none; border-radius: 0; background: var(--bg); border: 2px solid var(--text); transition: background .2s, border-color .2s; }
.pc-switch .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 0; background: var(--text); transition: transform .2s var(--ease), background .2s; }
.pc-switch input:checked + .sw { background: var(--accent); border-color: var(--accent); }
.pc-switch input:checked + .sw::after { transform: translateX(16px); background: var(--on-accent); }
.pc-switch input:checked ~ span:last-child { color: var(--text); }
.pc-switch input:focus-visible + .sw { outline: 2px solid var(--accent); outline-offset: 2px; }
.pc-sort { margin-left: auto; }
.seg { display: inline-flex; padding: 0; border-radius: 0; background: var(--bg); border: 2px solid var(--text); }
.seg label { position: relative; cursor: pointer; }
.seg label + label { border-left: 1px solid var(--line); }
.seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg span { display: block; padding: 6px 12px; border-radius: 0; font: 600 .84rem/1.3 var(--font-display); color: var(--text-2); white-space: nowrap; transition: background .2s, color .2s; }
.seg label:hover span { color: var(--text); background: var(--bg-2); }
.seg input:checked + span { background: var(--text); color: var(--on-dark); box-shadow: none; }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }

.pubs-status { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin: 22px 0 8px; min-height: 34px; }
.pc-count { margin: 0; font-size: .95rem; color: var(--text-2); }
.pc-count b { color: var(--text); font: 800 1em var(--font-display); }
.pc-active { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pc-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px 5px 12px; border-radius: 0; cursor: pointer;
  border: 1px solid var(--text); background: var(--bg);
  color: var(--text); font: 600 .82rem/1.2 var(--font-display); max-width: 100%;
}
.pc-pill svg { width: 13px; height: 13px; flex: none; opacity: .7; }
.pc-pill:hover { border-color: var(--accent); color: var(--accent); }
.pc-pill:hover svg { opacity: 1; }
.pc-reset { background: none; border: 0; padding: 5px 6px; color: var(--accent); font: 700 .86rem var(--font-display); cursor: pointer; }
.pc-reset:hover { text-decoration: underline; text-underline-offset: 3px; }

.pubs-legend { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0 0 20px; font-size: .86rem; color: var(--text-3); }
.lg-me { color: var(--text); font-weight: 600; }
.lg-group { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.lg-cite-n { font: 800 .8rem var(--font-display); color: var(--text); margin-right: 2px; }

/* ---------- list ---------- */
.pubs-list { transition: opacity .2s var(--ease); }
.pubs-list.is-fading { opacity: 0; }
.pub-group { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 0 28px; border-top: var(--rule); }
.pub-group + .pub-group { margin-top: 18px; }
.pub-group-head { position: sticky; top: calc(var(--nav-h) + 16px); align-self: start; padding-top: 18px; display: flex; flex-direction: column; gap: 6px; }
.pub-group-year { font-family: var(--font-display); font-size: 2.3rem; font-weight: 800; line-height: 1; letter-spacing: -0.04em; margin: 0; color: var(--text); font-variant-numeric: lining-nums tabular-nums; }
.pub-group-count { font: 600 .76rem/1.2 var(--font-display); letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.pub-group-items .pub:last-child { border-bottom: 0; }

.pubs-list .pub { grid-template-columns: minmax(0, 1fr) 96px; gap: 24px; padding: 22px 0; position: relative; }
.pubs-list .pub.ranked { grid-template-columns: 64px minmax(0, 1fr) 96px; }
.pubs-list .pub-title { font-family: var(--font-body); font-size: 1.04rem; font-weight: 600; letter-spacing: 0; line-height: 1.42; margin: 0 0 .35rem; }
.pub-title a { color: var(--text); text-decoration: none; transition: color .2s; }
.pub-title a:hover { color: var(--accent); text-decoration: underline; text-decoration-color: var(--accent); }
.pubs-list mark { background: color-mix(in srgb, var(--gold) 22%, transparent); color: inherit; border-radius: 0; padding: 0 1px; }
.pubs-list .pub-authors { font-size: .95rem; line-height: 1.55; overflow-wrap: anywhere; }
.authors-toggle {
  margin-left: 2px; padding: 1px 7px; border-radius: 0; border: 1px solid var(--line); background: transparent;
  color: var(--text); font: 700 .74rem/1.5 var(--font-display); cursor: pointer; vertical-align: 1px; white-space: nowrap;
}
.authors-toggle:hover { color: var(--accent); border-color: var(--text); }
.pub-venue-line { font-size: .95rem; color: var(--text-2); margin-top: .15rem; }
.pub-vol { font-variant-numeric: tabular-nums; }
.pub-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: .65rem; }
.pub-meta .chip { font-size: .7rem; padding: .18em .55em; }
.pub-type { font: 700 .7rem/1.5 var(--font-display); letter-spacing: .05em; text-transform: uppercase; color: var(--text-2); border: 1px solid var(--line); padding: .12em .55em; border-radius: 0; }
.pub-flag { display: inline-flex; align-items: center; gap: 4px; font: 700 .72rem/1.5 var(--font-display); color: var(--accent); padding: .12em .55em; border-radius: 0; background: transparent; border: 1px solid var(--accent); }
.pub-flag svg { width: 11px; height: 11px; }
.pub-note { font: 700 .8rem/1.4 var(--font-display); color: var(--accent); }
.pubs-list .pub-links { margin-top: .75rem; gap: 6px; }
.pub-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 0; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--text); font: 600 .78rem/1 var(--font-display);
  transition: color .2s, border-color .2s, background .2s;
}
.pub-btn svg { width: 13px; height: 13px; flex: none; }
.pub-btn:hover { color: var(--text); border-color: var(--text); background: transparent; }
.pub-btn.copied { color: var(--t-lithosphere); border-color: currentColor; }
.pub-cites { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; padding-top: 3px; text-align: right; }
.pub-cites .n { font: 800 1.2rem/1 var(--font-display); color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.pub-cites .l { font: 600 .68rem/1.2 var(--font-display); letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.pub-cites .bar { width: 64px; height: 4px; margin-top: 6px; border-radius: 0; background: var(--surface-3); overflow: hidden; }
.pub-cites .bar i { display: block; height: 100%; width: calc(var(--w) * 100%); border-radius: 0; background: var(--text); }
.pub.ranked .pub-year { display: flex; flex-direction: column; gap: 4px; }
.pub-rank { font: 800 1.7rem/1 var(--font-display); color: var(--text); letter-spacing: -0.04em; }
.pub-ry { font: 600 .8rem var(--font-display); color: var(--text-3); }
.pub-ranked .pub:first-child { border-top: var(--rule); }
.pub.is-target { animation: pub-flash 2.6s var(--ease); }
@keyframes pub-flash {
  0%, 35% { background: var(--bg-2); box-shadow: 0 0 0 12px var(--bg-2); }
  100% { background: transparent; box-shadow: 0 0 0 12px transparent; }
}

.pubs-empty { text-align: center; padding: 56px 20px; color: var(--text-2); border-top: var(--rule); border-bottom: var(--hair); }
.pubs-empty svg { width: 120px; margin: 0 auto 14px; color: var(--text-3); }
.pubs-empty p { max-width: 46ch; margin: 0 auto 18px; }
.pubs-empty strong { color: var(--text); }
.pubs-footnote { margin: 44px 0 0; padding-top: 20px; border-top: 1px solid var(--line); color: var(--text-3); font-size: .88rem; max-width: 76ch; }

/* ---------- toast ---------- */
.pubs-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 300; display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px 10px 14px; border-radius: 0; background: var(--text); color: var(--bg); border-left: 4px solid var(--accent);
  font: 600 .86rem/1.2 var(--font-body); opacity: 0; pointer-events: none; transform: translate(-50%, 14px);
  transition: opacity .25s var(--ease), transform .3s var(--ease);
}
.pubs-toast.show { opacity: 1; transform: translate(-50%, 0); }
.pubs-toast.err { background: var(--accent); color: var(--on-accent); }
.pubs-toast svg { width: 16px; height: 16px; }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .pub-group { display: block; border-top: 0; }
  .pub-group + .pub-group { margin-top: 10px; }
  .pub-group-head {
    top: var(--nav-h); z-index: 3; flex-direction: row; align-items: baseline; justify-content: space-between;
    margin: 0 -16px; padding: 10px 16px; background: var(--bg); border-bottom: 1px solid var(--line); border-top: var(--rule);
  }
  .pub-group-year { font-size: 1.5rem; }
}
@media (max-width: 640px) {
  .pubs-controls { padding: 14px 0; }
  .pc-kbd { display: none; }
  .pc-search input { padding-right: 14px; }
  .pc-drawer-btn { display: inline-flex; }
  .pc-drawer { grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease); }
  .pc-drawer-inner { overflow: hidden; padding-top: 0; visibility: hidden; transition: visibility 0s linear .35s, padding-top .35s var(--ease); }
  .pc-drawer.open { grid-template-rows: 1fr; }
  .pc-drawer.open .pc-drawer-inner { visibility: visible; padding-top: 14px; transition: visibility 0s, padding-top .35s var(--ease); }
  .pc-row { flex-direction: column; gap: 8px; }
  .pc-label { padding-top: 0; }
  .pc-opts { align-items: stretch; gap: 14px; }
  .pc-field { justify-content: space-between; }
  .pc-sort { margin-left: 0; flex-direction: column; align-items: flex-start; gap: 8px; }
  .seg { width: 100%; }
  .seg label { flex: 1; }
  .seg span { text-align: center; }
  .pubs-list .pub, .pubs-list .pub.ranked { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .pubs-list .pub.ranked { grid-template-columns: 40px minmax(0, 1fr); }
  .pubs-list .pub.ranked .pub-cites { grid-column: 2; }
  .pub-rank { font-size: 1.3rem; }
  .pub-cites { flex-direction: row; align-items: baseline; justify-content: flex-start; gap: 6px; padding-top: 10px; text-align: left; }
  .pub-cites .n { font-size: .9rem; }
  .pub-cites .bar { width: 48px; margin: 0 0 0 4px; align-self: center; }
  .viz-card { padding: 16px 14px 10px; }
  .venue-list li:nth-child(n+7) { display: none; }
}

@media print {
  .site-nav, .pubs-viz, .pubs-controls, .pubs-status, .pub-links, .pubs-toast, .seismo-line, .pubs-selected { display: none !important; }
  .pub-group-head { position: static; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}
