/* The feed (Stage 4 B3, Paul 2026-10-09): v2 signal rows, name first (design system §2.2 revision 4),
   ported from the Stage 3 prototype (components-v2.css §5 importance, §6 signal row, filters, pager,
   fold; stage3.css .dl-signal--namefirst, .dl-feed__summary) onto TODAY's tokens, scoped to .dl-feed
   and its chrome. The trial page's history keeps its own scoped copy in trial.css until the shared-row
   dedupe (its own commit). Marks reuse the shared .dl-mark so a row's mark matches the level key.
   DOM order per row: importance, trial name, change sentence, reason, also-line, sponsor line, date.
   Below 768px the slots stack; from 768px the grid is importance (9rem) | body | date (8.5rem). */

.dl-feed-block { position: relative; }
.dl-feed-block[aria-busy="true"] .dl-feed { opacity: .55; }

.dl-feed__summary { margin: 0 0 12px; font-size: .9375rem; line-height: 1.5; color: var(--dl-ink-2); }
.dl-feed__summary b { font-weight: 600; color: var(--dl-ink-1); }

/* The feed's filter bar is the All Trials bar (.dl-filter-bar) with the same control widths. */
.dl-feed__filter { margin: 0 0 12px; }
.dl-feed__filter select[name="status"] { max-width: 200px; }
.dl-feed__filter select[name="phase"] { max-width: 150px; }

/* The type-ahead filter box (_filter_typeahead.html, app.js dlTypeahead): the one look for every text
   filter on the disease and sponsor pages, All Trials bar and Recent Changes feed alike. The "x" sits
   inside the box and shows only while it holds a value ([hidden] does the hiding; never display:none
   on the class, or the attribute cannot show it). */
.dl-filter-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.dl-typeahead { position: relative; max-width: 260px; flex: 0 1 260px; }
.dl-typeahead input { padding-right: 24px; }
.dl-clear-filter {
  background: none; border: none; cursor: pointer; color: var(--dl-ink-3); font-size: 14px;
  line-height: 1; padding: 0; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
}
.dl-clear-filter:hover { color: var(--dl-ink-1); }

/* Column heads from 768px only: the stacked row names its own slots. */
.dl-feed__colhead { display: none; }
@media (min-width: 768px) {
  .dl-feed__colhead { display: grid; grid-template-columns: 9rem minmax(0, 1fr) 8.5rem; gap: 16px; padding: 8px 0; color: var(--dl-ink-3); font-size: .8125rem; }
  .dl-feed__colhead span:last-child { text-align: right; }
}

.dl-feed { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--dl-rule); }
.dl-feed > li { border-bottom: 1px solid var(--dl-rule); }

.dl-feed .dl-imp { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; font-weight: 600; line-height: 1.2; white-space: nowrap; }
.dl-feed .dl-imp--critical { color: var(--dl-critical-ink); font-weight: 700; }
.dl-feed .dl-imp--notable { color: var(--dl-notable-ink); }
.dl-feed .dl-imp--minor { color: var(--dl-minor-ink); font-weight: 500; }

.dl-feed .dl-signal {
  display: grid; grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "imp" "head" "change" "reason" "also" "id" "date";
  row-gap: 2px; padding: 12px 0;
}
.dl-feed .dl-signal > * { margin: 0; max-width: 80ch; }
.dl-feed .dl-signal__imp { grid-area: imp; padding-top: 3px; display: flex; align-items: center; gap: 8px; }
.dl-feed .dl-signal__head { grid-area: head; font-family: var(--dl-font-sans); font-size: 1.0625rem; line-height: 1.4; font-weight: 600; color: var(--dl-ink-1); overflow-wrap: anywhere; }
.dl-feed .dl-signal__head a { color: inherit; text-decoration: none; }
.dl-feed .dl-signal__head a:hover, .dl-feed .dl-signal__head a:focus-visible { text-decoration: underline; }
.dl-feed .dl-signal__change { grid-area: change; font-size: .9375rem; line-height: 1.5; font-weight: 500; color: var(--dl-ink-1); overflow-wrap: anywhere; }
.dl-feed .dl-signal__reason { grid-area: reason; color: var(--dl-ink-2); font-size: .875rem; line-height: 1.55; }
.dl-feed .dl-signal__reason b { color: var(--dl-ink-1); font-weight: 600; }
.dl-feed .dl-signal__also { grid-area: also; color: var(--dl-ink-2); font-size: .8125rem; line-height: 1.45; overflow-wrap: anywhere; }
.dl-feed .dl-signal__id { grid-area: id; color: var(--dl-ink-3); font-size: .8125rem; line-height: 1.45; margin-top: 2px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 0; }
.dl-feed .dl-signal__id a { color: inherit; }
.dl-feed .dl-signal__id .dl-sep { padding: 0 .35em; }
.dl-feed .dl-signal__id .dl-nct { font-family: var(--dl-font-mono); font-size: .92em; white-space: nowrap; }
.dl-feed .dl-signal__id .dl-source { white-space: nowrap; }
/* "Changed <date>" stays visible at every width (a bare date is ambiguous: filing or detection?). */
.dl-feed .dl-signal__date { grid-area: date; color: var(--dl-ink-3); font-size: .8125rem; line-height: 1.45; margin-top: 4px; }
.dl-feed .dl-signal__date time { white-space: nowrap; }
@media (min-width: 768px) {
  .dl-feed .dl-signal {
    grid-template-columns: 9rem minmax(0, 1fr) 8.5rem; column-gap: 16px;
    grid-template-areas: "imp head date" ". change ." ". reason ." ". also ." ". id .";
    padding: 14px 0;
  }
  .dl-feed .dl-signal__date { text-align: right; margin-top: 3px; }
}

/* Inbox state on a row: only the unread dot (inside the importance slot). The Done/Undo half
   (receipt line, hide-done toggle, keyboard focus ring) was removed 2026-10-11 (Paul; never used). */

/* The registry sweep line: one row standing for a day's "status -> Unknown" batch, members behind a fold. */
.dl-feed .dl-sweep-details > summary { cursor: pointer; font-weight: 600; color: var(--dl-link); font-size: 1rem; }
.dl-feed .dl-sweep-members { list-style: none; margin: 6px 0 0 12px; padding: 0; border-top: 0; border-left: 2px solid var(--dl-rule); }
.dl-feed .dl-sweep-members > li { padding-left: 12px; }
.dl-feed .dl-sweep-members > li:last-child { border-bottom: 0; }

/* Pager and the updates-only fold. */
.dl-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 0; color: var(--dl-ink-3); font-size: .8125rem; }
.dl-pager__links { display: flex; gap: 8px; }
.dl-pager a[aria-disabled="true"] { pointer-events: none; opacity: .5; }
.dl-fold { border-top: 1px solid var(--dl-rule); border-bottom: 1px solid var(--dl-rule); margin-top: 16px; }
.dl-feed + .dl-fold, .dl-pager + .dl-fold { margin-top: 16px; }
.dl-fold > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; list-style: none; font-weight: 600; color: var(--dl-link); }
.dl-fold > summary::-webkit-details-marker { display: none; }
.dl-fold > summary::before { content: "\25B8"; font-size: .9em; transition: transform .15s ease; }
.dl-fold[open] > summary::before { transform: rotate(90deg); }
.dl-fold__body .dl-feed { border-top: 0; }

/* The level key under the rows (B2, Paul 2026-10-08): a rule above it so it reads as a footnote. */
.dl-feed-block > .dl-level-key { margin: 8px 0 0; padding-top: 10px; border-top: 1px solid var(--dl-rule); }

/* A live region that only screen readers hear. */
.dl-feed-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
