/* Named agents + Tasks, inside the Running board (shell/core/agentrow.js, shell/core/tasks.js). Look tokens only.
   Board rows: .rw.two (working agent / the lead) > span.ag-sub (grid row 2: span.ag-role + span.ag-now)
               .rw.rep > .x > button.btn.sm.ag-rep ("Report" finished / "Read" still going)
               .rw.lead[data-who=lead][data-state=working|idle|unknown] — the lead's own row (needs-you stays .rw.hold)
   Tasks:      section.tk-box[data-panel=running] > h3.tk-h (span + em) · h4.tk-sub · p.tk-empty · p.tk-lim · button.rp-line.tk-more
               ol.tk-list[data-group=asks|earlier|apps] > li.tk-r[data-kind=ask|agent|call|app][data-state][data-who][data-hue][data-depth]
                 > p.tk-q · p.tk-m (span.tk-who, em.tk-st[data-state], span.tk-role) · button.tk-res | p.tk-note · pre.tk-full · ol.tk-kids */

/* ── named agents ── */
.rw.two { height: auto; min-height: 48px; padding-top: 4px; padding-bottom: 4px; grid-template-rows: auto auto; align-content: center; }
.rw > .ag-sub { grid-column: 2 / -1; grid-row: 2; display: flex; gap: 8px; min-width: 0; overflow: hidden; white-space: nowrap; font: var(--meta); color: var(--ink-3); padding-right: 12px; }
.ag-sub .ag-role { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ag-sub .ag-now { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.ag-sub .ag-now::before { content: "·"; margin-right: 8px; color: var(--ink-3); }
.rw.lead { cursor: default; }
.rw .x { gap: 8px; }
.rw .x .ag-rep { height: 28px; padding: 0 12px; }
.ag-rep:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.phone .rw.two, .phone .rw.rep { height: auto; min-height: 48px; padding-top: 4px; padding-bottom: 8px; }
.phone .rw.rep > .x { display: flex; grid-column: 2 / -1; grid-row: 3; justify-content: flex-start; padding: 4px 0 0; }
.phone .rw.rep > .x .btn { height: 44px; padding: 0 16px; }
.phone .rw > .ag-sub { padding-right: 0; }

/* ── tasks ── */
.tk-box { flex: none; padding: 4px 12px 12px; border-top: 1px solid var(--rule); }
.tk-h { display: flex; align-items: baseline; gap: 8px; margin: 0; padding: 12px 4px 4px; font: 700 13px/16px var(--sans); color: var(--ink); }
.tk-h em, .tk-sub em { font: var(--meta); font-style: normal; color: var(--ink-3); }
.tk-sub { display: flex; align-items: baseline; gap: 8px; margin: 12px 4px 4px; font: 700 13px/16px var(--sans); color: var(--ink-2); }
.tk-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tk-r { position: relative; min-width: 0; padding: 8px 4px 8px 20px; border-bottom: 1px solid var(--rule); border-radius: var(--r-2, 8px); }
/* who asked: the conversation's who-dot (blue = him, pink = Claude, an agent's hue), never a square stripe */
.tk-r::before { content: ""; position: absolute; left: 6px; top: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--who, transparent); }
.tk-list > .tk-r:last-child { border-bottom: 0; }
.tk-q { margin: 0; font: var(--do); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-m { margin: 4px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; font: var(--meta); color: var(--ink-3); min-width: 0; }
.tk-role { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.tk-st { font-style: normal; font-weight: 600; color: var(--ink-2); }
.tk-st[data-state="working"] { color: var(--run); }
.tk-st[data-state="waiting"] { color: var(--hold-ink, var(--hold)); }
.tk-st[data-state="failed"], .tk-st[data-state="lost"] { color: var(--stop); }
.tk-res { display: block; width: 100%; margin: 4px 0 0; padding: 0; border: 0; background: none; text-align: left; cursor: pointer;
  font: var(--meta); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-res:hover { color: var(--ink); text-decoration: underline; }
.tk-res:focus-visible, .tk-more:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.tk-note { margin: 4px 0 0; font: var(--meta); color: var(--ink-2); overflow-wrap: anywhere; }
.tk-full { margin: 8px 0 0; padding: 8px 12px; max-height: 320px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere;
  font: var(--meta); color: var(--ink); background: var(--well); border-radius: var(--r); }
.tk-kids { list-style: none; margin: 4px 0 0; padding: 0 0 0 12px; display: flex; flex-direction: column; }
.tk-kids > .tk-r { border-bottom: 0; padding: 4px 0 4px 12px; }
.tk-empty, .tk-lim { margin: 8px 4px 0; font: var(--meta); color: var(--ink-3); }
.tk-more { width: 100%; margin-top: 8px; }
.phone .tk-res { min-height: 44px; padding: 4px 0; white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.phone .tk-q { white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
/* Activity (now.js): the board as ONE view in sections — h2.act-h[data-sec=since|now|scheduled|ai|history] (span, em = a quiet
   note) and History's changes line button.act-chg[data-waiting] (b, span, i.chev). Tokens only; a look may restyle. */
.board .act-h { display: flex; align-items: baseline; gap: 10px; margin: 0; padding: 20px 16px 8px; font: 650 15px/20px var(--sans); letter-spacing: -.005em; color: var(--ink); }
.board .rows > .act-h:first-child { padding-top: 12px; }
.board .act-h em { font: var(--meta); font-style: normal; color: var(--ink-2); }
.board .act-h[data-sec="history"] { margin-top: 12px; border-top: 1px solid var(--rule); padding-top: 22px; }
.board .act-chg { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; width: calc(100% - 24px); min-height: 48px; margin: 0 12px 8px; padding: 0 14px;
  border: 1px solid var(--rule); border-radius: var(--r-4, 12px); background: var(--panel); color: var(--ink); text-align: left; cursor: pointer; }
.board .act-chg b { font: 600 14px/20px var(--sans); }
.board .act-chg span { font: var(--do); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .act-chg[data-waiting] span { color: var(--accent); font-weight: 600; }
.board .act-chg .chev { font-style: normal; color: var(--ink-3); }
.board .act-chg:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.board .act-since { display: flex; flex-direction: column; gap: 2px; margin: 0 12px 4px; padding: 4px; border-radius: var(--r-4, 12px); background: var(--panel); box-shadow: 0 0 0 1px var(--rule); }
.board .act-ln { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px; border: 0; border-radius: 9px; background: none; color: var(--ink); text-align: left; font: var(--do); cursor: pointer; }
.board .act-ln > .lamp { justify-self: center; }
.board .act-ln > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .act-ln[data-state="needs-you"] > span { color: var(--hold-ink); font-weight: 600; }
.board .act-ln .chev { font-style: normal; color: var(--ink-3); }
@media (hover: hover) { .board .act-ln:hover { background: var(--panel-2); } }
.board .act-ln:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.board .act-quiet { margin: 0; padding: 12px 12px; font: var(--do); color: var(--ink-2); }
/* Activity's platform sections (activity.js): Scheduled per Mac (failing / overdue first, the healthy folded), AI setups */
.board .act-sched, .board .act-ai { display: flex; flex-direction: column; gap: 2px; margin: 0 12px 4px; }
.board .as-mac { padding: 4px 0 6px; }
.board .as-mac + .as-mac { border-top: 1px solid var(--rule); }
.board .as-mac > h3 { display: flex; align-items: baseline; gap: 10px; margin: 0; padding: 8px 4px 4px; font: 600 13.5px/18px var(--sans); color: var(--ink); }
.board .as-mac > h3 em { font: var(--meta); font-style: normal; color: var(--ink-2); }
.board .as-job { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; column-gap: 10px; row-gap: 2px; align-items: center; padding: 8px 4px; }
.board .as-job > .lamp { justify-self: center; }
.board .as-job > b { font: 500 14px/20px var(--sans); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .as-job > .as-when { font: var(--meta); color: var(--ink-2); white-space: nowrap; }
.board .as-job > .as-what, .board .as-job > .as-why { grid-column: 2 / -1; font: var(--meta); color: var(--ink-2); overflow-wrap: anywhere; }
.board .as-job[data-state="failed"] > .as-why { color: var(--stop); }
.board .as-job[data-state="overdue"] > .as-why { color: var(--hold-ink); }
.board .as-fine { margin: 2px 0 0; }
.board .as-row { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 40px; padding: 0 4px; }
.board .as-row > .lamp { justify-self: center; }
.board .as-row > b { font: 500 14px/20px var(--sans); color: var(--ink); }
.board .as-row > span { font: var(--meta); color: var(--ink-2); }
.board .as-row[data-state="down"] > span { color: var(--stop); font-weight: 600; }
.board .as-skills input { width: 100%; height: 40px; margin: 6px 0; padding: 0 12px; border: 1px solid var(--rule-2); border-radius: 10px; background: var(--well, var(--panel)); color: var(--ink); font: var(--do); }
.board .as-skills ol { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow-y: auto; }
.board .as-skills li { display: flex; flex-direction: column; gap: 2px; padding: 8px 4px; border-bottom: 1px solid var(--rule); }
.board .as-skills li b { font: 500 14px/20px var(--sans); color: var(--ink); }
.board .as-skills li span { font: var(--meta); color: var(--ink-2); }
/* "Since you last looked": what finished and started, one line each, newest first: time · who · what */
.board .act-ev { display: grid; grid-template-columns: 44px auto minmax(0, 1fr); align-items: baseline; gap: 10px; min-height: 40px; padding: 10px 10px; border: 0; border-radius: 9px; background: none; color: var(--ink); text-align: left; font: var(--do); cursor: pointer; }
.board .act-ev time { font: var(--meta); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.board .act-ev b { font-weight: 600; white-space: nowrap; }
.board .act-ev span { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .act-ev[data-kind="finished"] span { color: var(--run); }
/* Activity mode (now.js html[data-activity]): only the sections under the one "Activity" title — no tab strip, no inner panel chrome */
html[data-activity] body.phone #side .tabs, html[data-activity] .board > .pane-h { display: none !important; }
html[data-activity] .board { border-top: 0; }
html[data-activity] body.phone #side .board { border-radius: 0; box-shadow: none; background: none; }
/* the board scrolls as ONE page on a wide screen too (Since you last looked and Now's counts sit above the rows) */
body:not(.phone) .pane.board { overflow-y: auto; overscroll-behavior: contain; }
body:not(.phone) .pane.board > .rows { flex: none; overflow: visible; }
body:not(.phone) .pane.board > .pane-h { position: sticky; top: 0; z-index: 2; }
/* Activity's connection lines (activity-links.js): one thin stroke in the rail's ink over the same view — a straight trunk,
   a smooth curve into each row that hangs off it. svg.al (pointer-events none) > path.al-line, circle.al-node */
.pane.board[data-links] { position: relative; }
.pane.board > svg.al { position: absolute; left: 0; top: 0; z-index: 1; pointer-events: none; overflow: visible; }
svg.al .al-line { fill: none; stroke: var(--rail, var(--rule-2)); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
svg.al .al-lane { stroke-width: 1.25; opacity: .72; }      /* helpers' lanes: lighter than the trunk, lighter still further out */
svg.al .al-lane.l1 { opacity: .56; } svg.al .al-lane.l2 { opacity: .42; }
svg.al .al-node { fill: var(--ground); stroke: var(--rail, var(--rule-2)); stroke-width: 1.5; }
.board .rw[data-al-dot]::before { top: var(--al-y, 50%); }          /* the row's who-dot sits on its first line, where the branch meets it */
.board .as-mac[data-al] > h3 { padding-left: 24px; }
.board .as-mac[data-al] > .as-job, .board .as-mac[data-al] > .as-fine { margin-left: 20px; }
/* Claude's waiting row on the board (now.js .rw.hold): a question of any length. The name and the time on the first line,
   the question under them on as many lines as it needs, Answer at the row's end (the phone: under the question).
   Before, the row kept a single fixed line, so a longer question ran over the name and the timer. */
.pane.board .rows > .rw.hold { height: auto; min-height: 48px; padding-top: 10px; padding-bottom: 10px; padding-right: 12px; grid-template-columns: 16px auto minmax(0, 1fr) auto auto; grid-template-rows: auto auto;
  column-gap: 0; row-gap: 2px; align-items: center; }
.pane.board .rows > .rw.hold > .lamp { grid-column: 1; grid-row: 1; }
.pane.board .rows > .rw.hold > .av { grid-column: 2; grid-row: 1; margin-right: 8px; }
.pane.board .rows > .rw.hold > b { grid-column: 3; grid-row: 1; min-width: 0; }
.pane.board .rows > .rw.hold > .t { grid-column: 4; grid-row: 1; margin-left: 10px; }
.pane.board .rows > .rw.hold > .w { display: block; grid-column: 3 / 5; grid-row: 2; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.pane.board .rows > .rw.hold > .w small { display: block; margin-left: 0; }
.pane.board .rows > .rw.hold > .x { display: flex; grid-column: 5; grid-row: 1 / 3; align-self: center; margin-left: 12px; padding: 0; }
.phone .pane.board .rows > .rw.hold { grid-template-rows: auto auto auto; padding-right: 12px; }
.phone .pane.board .rows > .rw.hold > .w { grid-column: 3 / 6; }
.phone .pane.board .rows > .rw.hold > .t { grid-column: 4 / 6; justify-self: end; }
.phone .pane.board .rows > .rw.hold > .x { grid-column: 3 / 6; grid-row: 3; justify-content: flex-start; margin-left: 0; padding: 8px 0 0; }
.phone .pane.board .rows > .rw.hold > .x .btn { min-height: 44px; }
