/* Publications explorer: 100x pass (2026-09-28). Loaded after the page's inline <style>, so these
   rules override it on purpose; see the report for exactly which inline rules go dead. Tokens are
   all pulled from site.css :root, nothing new invented. */

/* "Papers I led" moves out of the Kind row and into row one, next to Search, so it never hides
   behind the mobile Filters tap: it is a headline fact about the list, not a secondary facet. */
.ex__lead { display: inline-flex; }
.toggle--lead[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); }

/* Sort as a two-way switch: a plate glides under Newest/Oldest instead of a native dropdown. */
.seg { position: relative; display: inline-flex; padding: 3px; background: var(--mist-2); border-radius: 8px; }
.seg__plate {
  position: absolute; top: 3px; left: 3px; width: calc(50% - 3px); height: calc(100% - 6px);
  background: #fff; border-radius: 6px; box-shadow: var(--shadow-1);
  transition: transform 0.45s var(--ease-spring);
}
.seg[data-v="old"] .seg__plate { transform: translateX(100%); }
.seg__opt {
  position: relative; z-index: 1; height: 30px; padding: 0 1rem; border: 0; background: none;
  font-family: var(--label); font-weight: 600; font-size: 0.86rem; color: var(--muted);
  cursor: pointer; border-radius: 6px; transition: color 0.3s;
}
.seg__opt[aria-pressed="true"] { color: var(--ink); }
.seg__opt:active { transform: scale(0.97); }

/* Year histogram: bars grow up from nothing the first time they scroll into view, staggered left
   to right, the same reveal already used by the co-author bars and the waffle on this page. */
.hist:not(.is-in) .hist__bars .bar { height: 0; }
.hist.is-in .hist__bars .bar { height: var(--h, 4%); }

/* Result rows: a soft plate on hover/focus shows the row is a live control, and FLIP-moved rows
   skip their own entrance fade so the glide reads clean instead of fading and sliding at once. */
.pub {
  margin-inline: -1rem; padding: 1.15rem 1rem; border-radius: 14px;
  transition: background 0.3s var(--ease-out);
}
.pub:hover, .pub:focus-within { background: var(--mist); }
.pub--flip { animation: none; }

/* The "more" chevron: always visible (unlike Cite, which is a hover utility), because it is the
   only way to reach the region, the problem and the full author list for this paper. */
.pub__more {
  width: 24px; height: 24px; margin-left: auto; padding: 0; border-radius: 50%;
  border: 1px solid var(--line-2); background: #fff; color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background 0.25s, border-color 0.25s, color 0.25s;
}
.pub__more:hover { border-color: var(--ink); color: var(--ink); }
.pub__more svg { transition: transform 0.4s var(--ease-out); }
.pub__more[aria-expanded="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.pub__more[aria-expanded="true"] svg { transform: rotate(180deg); }

/* The detail panel: a grid-rows trick animates height without measuring it, so the row below settles
   into place instead of jumping; the text cross-fades in with a slight rise and blur-to-sharp. */
.pub__detail-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.5s var(--ease-out); }
.pub__detail-wrap.is-open { grid-template-rows: 1fr; }
.pub__detail { overflow: hidden; min-height: 0; }
.pub__detail-in {
  display: grid; gap: 0.3rem; padding-top: 0.9rem; margin-top: 0.2rem; border-top: 1px solid var(--line);
  opacity: 0; translate: 0 -4px; filter: blur(3px);
  transition: opacity 0.35s var(--ease-out), translate 0.35s var(--ease-out), filter 0.35s var(--ease-out);
}
.pub__detail-wrap.is-open .pub__detail-in { opacity: 1; translate: 0 0; filter: blur(0); transition-delay: 0.08s; }
.pub__detail-row { font-size: 0.92rem; color: var(--ink-2); line-height: 1.5; }
.pub__detail-row b { color: var(--ink); font-weight: 600; }
.pub__detail-lbl { font-family: var(--label); font-weight: 600; font-size: 0.82rem; color: var(--muted); margin-right: 0.5rem; }

@media (max-width: 600px) {
  .pub { margin-inline: -0.6rem; padding-inline: 0.6rem; }
}

/* pass 3 (whole page): a hand-off from another section lands the list below the nav island, not under it */
.ex { scroll-margin-top: calc(var(--nav-h) + 20px); }
