/* Runs by agent: each run is led by its agent's dashed mark; execution state stays
   a badge in agent colours. Also holds the provider usage summary on All runs. */

.activity-layout { display:grid; grid-template-columns:minmax(260px,320px) minmax(0,1fr); gap:22px; align-items:start; }
.activity-sidebar { position:sticky; top:18px; }
.activity-controls { padding:16px 18px 14px; border-bottom:1px solid var(--line); }
.activity-select { width:100%; min-height:38px; font-size:13px; }
.activity-caption { color:var(--muted); font-size:12.5px; line-height:1.55; overflow-wrap:anywhere; }
.activity-controls .activity-caption { margin-top:8px; }
.activity-runs { list-style:none; padding:0; margin:0; max-height:65vh; overflow:auto; }
.activity-runs li+li .activity-run { border-top:1px solid var(--line); }
.activity-run { display:grid; justify-items:start; gap:4px; width:100%; padding:12px 18px; border:0; background:transparent; color:var(--ink); text-align:left; }
.activity-run:hover { background:var(--surface-hover); }
.activity-run[aria-current="true"] { background:var(--surface-hover); box-shadow:inset 3px 0 var(--agent); }
.activity-run-agent { display:inline-flex; align-items:center; gap:8px; font-size:12.5px; font-weight:550; color:var(--agent); overflow-wrap:anywhere; }
.activity-run-agent::before { content:""; width:12px; height:12px; flex-shrink:0; border:1.5px dashed var(--agent); border-radius:50%; background:var(--agent-soft); }
.activity-run-title { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; font-size:13.5px; line-height:1.45; font-weight:540; overflow-wrap:anywhere; }
.activity-run-meta { font-size:12px; color:var(--muted); overflow-wrap:anywhere; }
.activity-run .badge { margin-top:2px; }
.activity-empty { padding:18px; color:var(--muted); font-size:13px; line-height:1.6; }

.activity-conversation { min-width:0; min-height:480px; }
.activity-conversation-header { display:flex; gap:18px; align-items:flex-start; justify-content:space-between; padding:22px 26px 14px; }
.activity-conversation-header>div { min-width:0; }
.activity-conversation-header h2 { display:flex; align-items:center; gap:12px; font-size:20px; overflow-wrap:anywhere; }
.activity-conversation-header h2::before { content:""; width:26px; height:26px; flex-shrink:0; border:1.5px dashed var(--agent); border-radius:50%; background:var(--agent-soft) radial-gradient(circle,var(--agent) 0 3.5px,transparent 4px); }
.activity-conversation-header .activity-caption { margin-top:6px; padding-left:38px; }
.activity-conversation-header .badge { flex-shrink:0; margin-top:4px; }
.activity-conversation .message { margin:0 26px 14px; }
.activity-observation { padding:0 26px 16px; }
.activity-state-note { margin:0 26px 16px; padding:10px 14px; background:var(--surface-subtle); border-left:3px solid var(--line-strong); border-radius:var(--radius-control); font-size:13px; line-height:1.6; white-space:pre-wrap; overflow-wrap:anywhere; }
.activity-context { border-top:1px solid var(--line); padding:12px 26px; }
.activity-context>summary { font-size:13px; color:var(--muted); }
.activity-context>summary:hover { color:var(--ink); }
.activity-context[open]>summary { margin-bottom:10px; color:var(--ink); }
.activity-prompt { margin-top:8px; max-width:75ch; white-space:pre-wrap; font-size:13.5px; line-height:1.65; overflow-wrap:anywhere; }
.activity-profile { min-width:0; }
.activity-skill { margin-top:12px; padding-top:10px; border-top:1px solid var(--line); font-size:13px; }
.activity-skill>.activity-caption { font-family:var(--font-mono); font-size:12px; }
.activity-response { padding:20px 26px 26px; border-top:1px solid var(--line); }
.activity-response>h3 { margin:0 0 2px; font-size:14px; }
.activity-response>.activity-caption { margin:0 0 14px; }
.activity-response .agent-message { max-width:76ch; padding-left:14px; border-left:2px solid var(--agent); }
.activity-earlier { border-top:1px solid var(--line); padding:12px 26px; }
.activity-earlier>summary { font-size:13px; color:var(--muted); }
.activity-message-list { margin-top:10px; }
.activity-message { padding:14px 0 14px 14px; border-left:2px solid var(--line-strong); }
.activity-message+.activity-message { border-top:1px solid var(--line); }
.activity-message>h4 { margin:0 0 8px; color:var(--muted); font-size:12px; font-weight:500; overflow-wrap:anywhere; }
.activity-footer { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; padding:12px 18px 12px 26px; border-top:1px solid var(--line); }
.activity-footer .activity-caption { max-width:48ch; }
.activity-welcome { min-height:480px; display:flex; flex-direction:column; align-items:flex-start; justify-content:center; padding:40px; }
.activity-welcome-mark.mark { width:32px; height:32px; }
.activity-welcome h2 { font-size:20px; margin:16px 0 8px; }
.activity-welcome p { max-width:52ch; color:var(--muted); line-height:1.6; margin:0 0 10px; }

/* Provider usage (All runs). Unknown reads as unknown: muted words, never a zero. */
.usage-summary>.help { margin:0 0 8px; }
.usage-totals { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); margin-bottom:10px; border:1px solid var(--line); border-radius:var(--radius-panel); background:var(--surface-subtle); }
.usage-totals .metric { padding:12px 18px; }
.usage-totals .metric strong { font-size:20px; }
.usage-totals .metric small { font-size:12px; }
.usage-totals .usage-unknown { font-family:var(--font-ui); font-weight:450; color:var(--muted); }
.usage-people>summary { font-size:13px; color:var(--muted); padding:4px 0; }
.usage-people>summary:hover { color:var(--ink); }
.usage-people h3 { margin:12px 0 6px; font-size:13px; }

@media(max-width:1180px) { .activity-layout { grid-template-columns:minmax(220px,270px) minmax(0,1fr); gap:16px; } }
@media(max-width:960px) { .usage-totals { grid-template-columns:1fr 1fr; } .usage-totals .metric:nth-child(3) { border-left:0; } .usage-totals .metric:nth-child(n+3) { border-top:1px solid var(--line); } }
@media(max-width:700px) {
  .activity-layout { grid-template-columns:1fr; }
  .activity-sidebar { position:static; }
  .activity-runs { max-height:300px; }
  .activity-conversation-header { flex-wrap:wrap; }
  .activity-conversation-header,.activity-response,.activity-earlier,.activity-context,.activity-footer { padding-left:18px; padding-right:18px; }
  .activity-conversation-header .activity-caption { padding-left:0; }
  .activity-state-note,.activity-conversation .message { margin-left:18px; margin-right:18px; }
  .activity-observation { padding-left:18px; padding-right:18px; }
  .activity-welcome { min-height:280px; padding:24px; }
}
