/* <nv-hos-feed> — HOS Monitoring System: a feed of example alerts, a new one every 2.5 s.
   Markup and behaviour: hos-feed.js (header). Not a messenger: no avatars, no bubbles, no app names — a dispatch board list.
   Colours: token names of nv.css only. Size: the card fills its column; the list has a fixed height of --fd-n rows (4) of
   --fd-row px (80; 74 from 520 px wide; override on `nv-hos-feed .fd`), so arrivals never change the page's layout: rows move by transform inside the list, nothing else moves. */
nv-hos-feed { display: block; min-width: 0; container-type: inline-size; color: var(--nv-ink); font-family: var(--nv-font); }
nv-hos-feed .fd { --fd-n: 4; --fd-row: 80px; position: relative; border-radius: var(--nv-r); overflow: hidden;
  background: radial-gradient(80% 50% at 0% 0%, color-mix(in srgb, var(--nv-hos) 9%, transparent), transparent 70%),
    linear-gradient(165deg, var(--nv-tile-2), var(--nv-tile) 55%, var(--nv-bg-2));
  box-shadow: inset 0 0 0 1px var(--nv-line-2); }
nv-hos-feed .fd-hd { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 12px 18px; border-bottom: 1px solid var(--nv-line); font-size: 14px; }
nv-hos-feed .fd-mark { flex: none; width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; color: var(--nv-ink);
  background: var(--nv-box); box-shadow: inset 0 0 0 1px var(--nv-line-2); }
nv-hos-feed .fd-mark .d { fill: var(--nv-hos); }
nv-hos-feed .fd-hd b { font-weight: 700; letter-spacing: -0.01em; }
nv-hos-feed .fd-hd .fd-sub { color: var(--nv-dim); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
nv-hos-feed .fd-live { margin-left: auto; flex: none; position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--nv-ok); }
nv-hos-feed .fd-live::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--nv-ok); opacity: 0; }
nv-hos-feed .fd-list { position: relative; height: calc(var(--fd-n) * var(--fd-row)); overflow: hidden; margin: 0; padding: 0; list-style: none; }
nv-hos-feed .fd-list > li { --s: var(--nv-info); position: relative; box-sizing: border-box; height: var(--fd-row); padding: 12px 18px 10px 20px;
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 7px 10px; align-items: center;
  border-bottom: 1px solid var(--nv-line); background: transparent; }
nv-hos-feed .fd-list > li[data-s="warn"] { --s: var(--nv-warn); }
nv-hos-feed .fd-list > li[data-s="bad"] { --s: var(--nv-bad); }
nv-hos-feed .fd-list > li[data-s="ok"] { --s: var(--nv-ok); }
nv-hos-feed .fd-list > li::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--s); }
nv-hos-feed .fd-chip { justify-self: start; font: 650 10.5px/1 var(--nv-mono); letter-spacing: 0.09em; text-transform: uppercase; padding: 5px 8px 4px; border-radius: 6px; white-space: nowrap;
  color: color-mix(in srgb, var(--s) 80%, var(--nv-ink)); background: color-mix(in srgb, var(--s) 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--s) 34%, transparent); }
nv-hos-feed .fd-list time { justify-self: end; font: 500 12px/1 var(--nv-mono); color: var(--nv-dim); font-variant-numeric: tabular-nums; }
nv-hos-feed .fd-list p { grid-column: 1 / -1; align-self: start; margin: 0; font-size: 13.5px; line-height: 1.38; color: var(--nv-muted);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
nv-hos-feed .fd-list p b { color: var(--nv-ink); font-weight: 700; }
nv-hos-feed .fd-cap { margin: 10px 4px 0; font-size: 12.5px; line-height: 1.45; color: var(--nv-dim); }

/* the script's mode: rows stand where they stood, then move by transform only */
nv-hos-feed .fd-list.is-live > li { position: absolute; inset-inline: 0; top: 0; transform: translateY(calc(var(--i, 0) * var(--fd-row)));
  transition: transform 0.65s var(--nv-ease), opacity 0.5s var(--nv-ease); }
nv-hos-feed .fd-list.is-live > li.is-enter { opacity: 0; }
nv-hos-feed .fd-list.is-still > li { transition: none !important; }
nv-hos-feed .fd-list.is-live > li.is-out { opacity: 0; }
nv-hos-feed .fd-list > li.is-new::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--s) 16%, transparent), transparent 75%); animation: fd-flash 2s var(--nv-ease); }
nv-hos-feed .fd.is-on .fd-live::after { animation: fd-pulse 2.5s var(--nv-ease) infinite; }
nv-hos-feed .fd.is-paused * { animation-play-state: paused !important; }
@keyframes fd-flash { 0% { opacity: 1; } 100% { opacity: 0; } }
@keyframes fd-pulse { 0% { opacity: 0.7; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(2.8); } }

@container (min-width: 520px) {
  nv-hos-feed .fd { --fd-row: 74px; }
  nv-hos-feed .fd-list > li { padding-inline: 22px 20px; }
  nv-hos-feed .fd-hd { padding-inline: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  nv-hos-feed *, nv-hos-feed *::before, nv-hos-feed *::after { animation: none !important; transition: none !important; }
}

/* phones: no label under 11 px */
@media (max-width: 640px) {
  nv-hos-feed .fd-chip { font-size: 11px; }
}
