/* Activity feed — a live event stream with day groups.
   Tokens only. GSAP owns transforms on the pill and on arriving events, so
   nothing here sets a transform on them. */

.feed__tools { display: flex; align-items: center; gap: var(--sp-2); }

.feed__live[aria-pressed="true"] { color: var(--ink); }
.feed__pulse {
  width: 7px; height: 7px;
  border-radius: var(--radius-pill);
  background: var(--ink-faint);
  transition: background-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.feed__live[aria-pressed="true"] .feed__pulse {
  background: var(--ok);
  box-shadow: 0 0 0 3px var(--ok-wash);
}

.feed__body { position: relative; }

.feed__scroll {
  /* Vertical-only scroller: data-lenis-prevent belongs here and nowhere else
     in this component. */
  max-height: calc(var(--sp-7) * 8);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 var(--sp-5) var(--sp-4);
}
.feed__scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* ---------- day groups ---------- */

.feed__day {
  position: sticky; top: 0; z-index: 2;
  margin: 0 calc(var(--sp-5) * -1);
  padding: var(--sp-3) var(--sp-5) var(--sp-2);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  color: var(--ink-faint);
  font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
}

.feed__list { list-style: none; margin: 0; padding: 0; }

/* ---------- events ---------- */

.feed__item {
  position: relative;
  display: flex; align-items: flex-start; gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--line);
}
/* The arrival flash is a wash overlay driven by one custom property, so the
   script tweens --flash rather than typing a colour. */
.feed__item::before {
  content: ''; position: absolute; z-index: 0;
  inset: 0 calc(var(--sp-3) * -1);
  background: var(--accent-wash);
  opacity: var(--flash, 0);
  pointer-events: none;
}
.feed__dot, .feed__content { position: relative; z-index: 1; }
.feed__list > .feed__item:last-child { border-bottom: 0; }

/* The arriving item is measured and tweened open, so it must be able to
   collapse to nothing: no min-height, and the box clips while it grows. */
.feed__item[data-arriving] { overflow: hidden; }

.feed__dot {
  flex: 0 0 auto;
  width: 8px; height: 8px; margin-top: 6px;
  border-radius: var(--radius-pill);
  background: var(--ink-faint);
}
.feed__dot--ok { background: var(--ok); }
.feed__dot--warn { background: var(--warn); }
.feed__dot--danger { background: var(--danger); }
.feed__dot--info { background: var(--info); }

.feed__content { min-width: 0; }
.feed__text { color: var(--ink); font-size: var(--text-sm); }
.feed__text strong { font-weight: 600; }
.feed__ref {
  padding: 1px var(--sp-1);
  border-radius: var(--radius-sm);
  background: var(--accent-wash); color: var(--accent);
  font-family: var(--font-mono); font-size: var(--text-xs);
}
.feed__meta {
  margin-top: 2px;
  color: var(--ink-faint);
  font-family: var(--font-mono); font-size: var(--text-xs);
}

/* ---------- "N new" pill ---------- */

.feed__pill {
  position: absolute; z-index: 5;
  top: var(--sp-3); left: 50%; margin-left: -60px;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  width: 120px; height: var(--control-h-sm);
  border: 1px solid var(--accent); border-radius: var(--radius-pill);
  background: var(--accent); color: var(--accent-ink);
  box-shadow: var(--shadow-2);
  cursor: pointer; font: inherit; font-size: var(--text-xs); font-weight: 600;
  opacity: 0;
}
.feed__pill[hidden] { display: none; }
.feed__pill:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.feed__pill:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.feed__pill-icon { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2.5; }

@media (max-width: 640px) {
  .feed__scroll { max-height: calc(var(--sp-7) * 7); padding: 0 var(--sp-4) var(--sp-4); }
  .feed__day { margin: 0 calc(var(--sp-4) * -1); padding: var(--sp-3) var(--sp-4) var(--sp-2); }
}

@media (pointer: coarse) {
  .feed__pill { height: var(--control-h); }
}
