/* ==========================================================================
   Component: Feed
   Description: Primitives for date-grouped, avatar-led activity feeds —
   the canonical "what people did, organized chronologically" surface used
   by Activity Element (Web Participation + PDF Report), dashboards, and
   any future feed-style aggregation.

   Two primitives:

   .ds-feed-divider — Centered uppercase label on a hairline rule that
                       spans the row. Used to delimit groups (typically
                       date groups) in the feed.

   .ds-feed-row     — Avatar column + body column. Body holds a bold
                       name above a vertical bulleted list of icon+text
                       items. Each item = 16px Material Symbol in
                       --accent-primary + descriptive text in
                       --text-secondary.

   The COMPOSITION (.participation-activity*) lives here too — it used to sit in
   `pages/participation/activity.css`, which the member bundle EXCLUDES
   (COACH_MEMBER_CSS_EXCLUDED_PREFIXES: "pages/participation/"). The Activity
   partial is Multi-Use — it renders on /d, /people and /organizations as well as
   /p — so on every member surface its rhythm rules silently never loaded: no
   space above a date divider, none above a category eyebrow (fix 2026-07-13).
   A shared partial's layout belongs in the component layer, which every bundle
   carries.
   ========================================================================== */

/* ── Rhythm ─────────────────────────────────────────────────────────────
   ONE vertical system, so every configuration reads correctly — headers on or
   off, filters on or off, one category or four:

     day group   ──24px──  (the biggest gap: a new day)
     divider     ──16px──  to whatever follows it (eyebrow OR the first row)
     category    ──20px──  to the next category inside the same day
     eyebrow     ──12px──  to its rows (.ds-section-heading's own margin)
     row         ──16px──  to the next row

   Each label therefore has more space above it than below, so it binds to the
   content it introduces rather than to the block it follows.
   ────────────────────────────────────────────────────────────────────── */

/* ── Divider ────────────────────────────────────────────────────────── */

/* ── The two labels ─────────────────────────────────────────────────────
   ONE family, distinguished by weight and colour — never by a line (user ruling
   2026-07-13). The hairline that used to flank the date was --border-subtle
   (#eef2f6) drawn on a TINTED zone surface: invisible, and it left the date
   reading LIGHTER than the category beneath it — the hierarchy upside down.

     DATE      the dominant label — --text-secondary, weight 700
     CATEGORY  the quieter one    — --text-tertiary,  weight 600

   Both are the same scale, tracking and case, so they are obviously a pair; the
   date wins on contrast, as the bigger division deserves. No rule to maintain
   against white (/p) and tinted (dashboard zone) backgrounds alike.
   ────────────────────────────────────────────────────────────────────── */

/* Space ABOVE the divider is the group gap (.participation-activity__list);
   below it is this margin — deliberately smaller, so the date binds to its day. */
.ds-feed-divider {
  display: flex;
  align-items: center;
  margin: 0 0 var(--space-4);
}

.ds-feed-divider__label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* The category eyebrow. Its own class, NOT .ds-section-heading — that component
   is shared by 15 views (and carries an icon slot); the feed's labels belong to
   the feed, defined next to the date they must agree with. */
.ds-feed-eyebrow {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin: 0 0 var(--space-3);
}

/* ── Row ────────────────────────────────────────────────────────────── */

.ds-feed-row {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: var(--space-3);
}

.ds-feed-row + .ds-feed-row {
  margin-top: var(--space-4);
}

.ds-feed-row__name {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin: 0 0 var(--space-1-5);
}

.ds-feed-row__items {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.ds-feed-row__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.ds-feed-row__item .material-symbols-rounded {
  font-size: 16px;
  color: var(--accent-primary);
  flex-shrink: 0;
  padding-top: 2px;
}

/* Activity row name follows the soul display voice (dividers/headings stay chrome). */
.ds-feed-row__name { font-family: var(--soul-font-display); }

/* ── Activity composition ───────────────────────────────────────────────
   The Activity element's wrappers. Lives in the COMPONENT layer (not
   pages/participation/) because the partial is Multi-Use: /p, My Activities,
   Org Activities, and both dashboard Stage zones all render it, and the member
   bundle carries no pages/participation/* sheet.
   ────────────────────────────────────────────────────────────────────── */

.participation-activity {
  display: block;
}

/* Filter bar — stacks at <640px, row above it. */
.participation-activity__filter {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  align-items: center;
  margin-bottom: var(--space-5);
}

/* Day-group spacing is the list's `gap`, NOT an adjacent-sibling margin: pages
   after the first arrive inside a chain frame (shared/_lazy_next_page), so the
   first group of page 2 is not a DOM sibling of the last group of page 1 and a
   `+` rule would drop the gap at every page seam. `gap` spans the chain because
   the frame is display:contents. This gap IS the space above each date divider. */
.participation-activity__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* Categories within one day. The first sits directly under the divider (16px);
   each further one opens its own block. */
.participation-activity__category + .participation-activity__category {
  margin-top: var(--space-5);
}
