/* S1 Feed (s1-feed.js). The page is the approved mockup's t-feed, drawn by redesign-v3.css (.hd .fbar .seg .split2 .day .dl .fi .fa .vb .fb .acts .res .ft .st .grp .grpb .side .mini-l).
 * Only the glue the mockup does not draw is here: state hooks, loading / empty / error, the unread mark, the reply form and a rendered Apex note. */
.s1feed-host { display: block; }
.s1feed .hdr { padding-bottom: calc(14px * var(--s1-scale, 1)); }
.s1feed-segb { flex: none; }
.s1feed .fbar .btn.s1feed-readall { display: inline-flex; margin-left: auto; } /* the phone keeps it: the mockup's phone rule hides every quiet button of the bar */
.split2.s1feed-solo { grid-template-columns: minmax(0, 1fr); }
.s1feed .av { position: relative; } /* a profile photo fills the circle (the kit lays it over the initials) */
.s1feed .sch:empty { display: none; } /* the school slot fills in once the directory is known */
.s1feed .fi.nb { cursor: default; }
.s1feed .fi.is-unread::before { content: ""; position: absolute; left: 3px; top: 21px; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.s1feed-body > .day:last-child { border-bottom: 0; }
.s1feed-state, .s1feed-degraded { margin: 0; padding: calc(18px * var(--s1-scale, 1)) var(--gut); font-size: var(--s1-fs-2); }
.s1feed-tip { padding: calc(14px * var(--s1-scale, 1)) var(--gut) 0; }
.s1feed-needsline { margin: 0; padding: calc(12px * var(--s1-scale, 1)) var(--gut) 0; font-size: var(--s1-fs-2); }

/* An Apex note, opened: its paragraphs and lists inside the quote. */
.s1feed-md p { margin: 0 0 8px; }
.s1feed-md p:last-child, .s1feed-md ul:last-child { margin-bottom: 0; }
.s1feed-md ul { margin: 0 0 8px; padding-left: calc(20px * var(--s1-scale, 1)); }
.s1feed-md code { font: var(--s1-fs-2) ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--well); padding: 1px 5px; border-radius: 5px; }
.s1feed-md a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* A reply to a message, opened under its row. */
.s1feed-replyform { display: grid; gap: calc(8px * var(--s1-scale, 1)); margin-top: 10px; max-width: 64ch; }
.s1feed-ta { font: inherit; line-height: 1.4; min-height: 64px; max-height: 200px; resize: vertical; }

/* Proposal cards waiting for approval (shared RWTProposalCard nodes, in the first day group). */
.s1feed-sugg-note { margin: 2px 0 0; font-size: var(--s1-fs-1); }
.s1feed-attn-body { display: grid; gap: calc(12px * var(--s1-scale, 1)); padding: calc(14px * var(--s1-scale, 1)) 0; }
.s1feed-slot > .s1pc-card { max-width: none; margin: 0; }

/* The Project dropdown (.dd in the mockup) sits at the bar's right edge; Mark all read follows it. */
.s1feed-proj { margin-left: auto; }
.s1feed-proj ~ .btn.s1feed-readall { margin-left: 0; }
.s1feed .fi a.pl, .s1feed .mini-l a { text-decoration: none; } /* the mockup's frame removes link underlines; only .ob keeps its own */

/* r19: blue is waiting on others only. Your own waiting items are ink; links in a sentence are the object only. */
.s1feed .st.you { color: var(--ink-2); }
.s1feed .mini-l .wait { color: var(--ink-2); }
.s1feed .fi .ob { text-decoration-color: var(--line); }

/* Clear for one day sits under the date, in the date column; a plain quiet button, always visible. */
.s1feed .dl .s1feed-clearday { display: block; margin-top: 6px; font-weight: 500; }

/* Phone: a project's name breaks between words (and a very long word at its end), never cut off mid-word; the tabs wrap onto a second line instead of running off the edge. */
.s1feed .fb p .pl, .s1feed .fb p .ob, .s1feed .fb p .rl { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .s1feed .fbar .seg { flex-wrap: wrap; overflow: visible; max-width: 100%; width: 100%; }
  .s1feed .fbar .seg button { flex: 1 1 auto; justify-content: center; padding-inline: 8px; }
}

/* Suggestions (proposal cards such as "Add a key date", and the stuck rows): everything after the heading sits in the main column beside the heading, never in the narrow date-label column. */
.s1feed .day.s1feed-attn > :not(.dl) { grid-column: 2; min-width: 0; }
.s1feed .day.s1feed-attn > .dl { grid-column: 1; grid-row: 1 / span 4; }
@media (max-width: 640px) { .s1feed .day.s1feed-attn > :not(.dl), .s1feed .day.s1feed-attn > .dl { grid-column: 1; grid-row: auto; } }
