/* New posts on Home: the pill and the posts it brings in (18 November 2026, views/fresh.js). Loaded after the clean layer.

   A small white pill near the top of the feed's column: an up arrow, up to three small portraits of who wrote, and the words
   ("3 new posts in Cardiology"). Monochrome on the page's paper with a hairline and a soft shadow; the brand lilac is kept for
   the line that rings each post it brings in, which fades by itself. It sits under the top bar, and at the top edge once the
   bar has slid away, on the bar's own curve. It rises a few pixels into place and leaves by fading upwards; with reduced
   motion it only appears and disappears. index.html keeps the rules that make it unreachable while it is away
   (opacity, visibility). */

html body .newposts-pill {
  position: fixed; z-index: 64; left: var(--np-x, 50%); top: calc(var(--frame, 12px) + var(--top-h, 68px) + 6px);
  display: inline-flex; align-items: center; gap: 8px; max-width: min(440px, calc(100vw - 32px)); height: 40px; margin: 0; padding: 0 16px 0 12px;
  border: 1px solid var(--cl-line-2); border-radius: 999px; background: var(--cl-surface); color: var(--cl-ink);
  box-shadow: 0 1px 2px rgba(26, 26, 26, .05), 0 10px 28px -12px rgba(26, 26, 26, .28);
  font: 400 14.5px/1 var(--cl-sans); letter-spacing: 0; white-space: nowrap; cursor: pointer;
  /* away, it waits a few pixels lower, so it rises into place when it shows */
  transform: translate(-50%, 10px);
  transition: opacity .32s var(--cl-out), transform .5s var(--cl-spring), top .46s cubic-bezier(.32, .72, 0, 1), border-color .2s var(--cl-out), visibility 0s linear .32s;
}
html body .newposts-pill.show { transform: translate(-50%, 0); transition-delay: 0s; }
html body .newposts-pill.leaving { opacity: 0; pointer-events: none; transform: translate(-50%, -8px); }
html.is-down body .newposts-pill { top: calc(var(--frame, 12px) + 14px); }
@media (hover: hover) { html body .newposts-pill:hover { border-color: var(--cl-line-3); } }
html body .newposts-pill:active { scale: .97; }
html body .newposts-pill:focus-visible { outline: 2px solid var(--cl-lilac); outline-offset: 3px; }
html body .newposts-pill.has-faces { padding-left: 10px; }
html body .newposts-pill .np-arrow { flex: none; font-size: 15px; color: var(--cl-ink-3); }
html body .newposts-pill .np-faces { display: inline-flex; flex: none; align-items: center; }
html body .newposts-pill .np-faces:empty { display: none; }
html body .newposts-pill .np-face { display: grid; width: 24px; height: 24px; margin-left: -7px; border-radius: 50%; box-shadow: 0 0 0 2px var(--cl-surface); overflow: hidden; }
html body .newposts-pill .np-face:first-child { margin-left: 0; }
html body .newposts-pill .np-face__in { width: 24px !important; height: 24px !important; border: 0 !important; }
html body .newposts-pill .np-face__t { font-size: 10px !important; letter-spacing: 0; }
html body .newposts-pill .np-w { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* a phone: under the 60 px bar, at the top edge once the bars have slid away; centred on the screen */
@media (max-width: 1023.98px) {
  html body .newposts-pill { left: 50%; top: calc(env(safe-area-inset-top, 0px) + 68px); height: 38px; font-size: 14px; }
  html.top-away body .newposts-pill { top: calc(env(safe-area-inset-top, 0px) + 12px); }
}

/* the posts it brought in: a lilac line round each, which fades; they rise a few pixels as they come */
html #feed .feed-card.is-arrived { outline: 2px solid color-mix(in srgb, var(--cl-lilac) 70%, transparent); outline-offset: 4px; transition: outline-color 1.8s var(--cl-out); }
html #feed .feed-card.is-arrived.is-fading { outline-color: transparent; }
html #feed .feed-card.np-rise { animation: np-rise .55s var(--cl-spring) both; }
@keyframes np-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html body .newposts-pill, html body .newposts-pill.show, html body .newposts-pill.leaving { transform: translate(-50%, 0); transition: opacity .01s linear, visibility 0s linear; }
  html #feed .feed-card.np-rise { animation: none; }
}
html.a11y-reduce-motion body .newposts-pill { transition: opacity .01s linear, visibility 0s linear; }
