@import url('/insights.css');
/* Activity reads as a plain chronological list. Words carry status and evidence;
   spacing separates entries. Literal operations and receipts stay inspectable. */
.activity-refresh-controls { display:flex; align-items:center; gap:var(--ds-space-3); }
.activity-refresh-label { color:var(--ds-muted); font-size:var(--ds-text-sm); white-space:nowrap; }
.activity-kind-switcher, .activity-switcher { display:flex; flex-wrap:wrap; align-items:center; gap:var(--ds-space-1) var(--ds-space-6); margin:0 0 var(--ds-space-4); }
.activity-switcher { margin-bottom:var(--ds-space-6); }
:is(.workspace, .detail) :is(.activity-kind-switcher button, .activity-filter-tab) { gap:var(--ds-space-2); min-height:32px; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; color:var(--ds-muted); font-size:var(--ds-text-base); font-weight:450; white-space:nowrap; }
:is(.workspace, .detail) :is(.activity-kind-switcher button, .activity-filter-tab)[aria-pressed="true"] { color:var(--ds-ink); font-weight:600; }
.filter-count { color:var(--ds-muted); font-weight:450; font-variant-numeric:tabular-nums; }
.activity-filter-tab:focus-visible, .activity-kind-switcher button:focus-visible { outline-offset:2px; }
.activity-search-filters { gap:var(--ds-space-2); margin-bottom:0; }
.activity-search-filters .search-field { max-width:420px; flex:1.4; }
.activity-search-filters select { max-width:185px; width:auto; text-overflow:ellipsis; }
.activity-filter-summary { display:flex; flex-wrap:wrap; align-items:center; gap:var(--ds-space-2) var(--ds-space-4); padding-top:var(--ds-space-4); }
.workspace .activity-filter-chip { gap:var(--ds-space-1); padding:0; min-height:32px; border:0; background:transparent; color:var(--ds-ink); font-size:var(--ds-text-sm); }
.activity-filter-chip span { max-width:220px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.activity-filter-chip > svg { color:var(--ds-muted); }

.activity-feed { padding-top:0; }
.activity-section-title { margin:var(--ds-space-8) 0 var(--ds-space-2); }
.activity-feed > .activity-section-title:first-child { margin-top:0; }
.activity-section-title h2 { color:var(--ds-muted); font-size:var(--ds-text-sm); font-weight:450; }
.activity-card { min-width:0; }
.activity-row { display:grid; grid-template-columns:minmax(0,1fr) max-content; gap:var(--ds-space-6); padding:var(--ds-space-4) 0; margin:0; border:0; border-radius:0; background:transparent; box-shadow:none; }
/* The whole row is the hit area for its open button; inner controls stay on top. */
.workspace .activity-row:has(.activity-open) { position:relative; transition:background-color var(--ds-duration-fast) var(--ds-ease-out); }
.workspace .activity-row .activity-open::after { content:""; position:absolute; inset:0; }
.workspace .activity-row :is(button, a, summary):not(.activity-open) { position:relative; z-index:1; }
.activity-row-main { min-width:0; }
.workspace .activity-row .activity-open { display:flex; justify-content:flex-start; width:fit-content; max-width:100%; min-height:28px; padding:0; margin:0; border:0; border-radius:var(--ds-radius-control); background:transparent; box-shadow:none; text-align:left; }
.activity-title { color:var(--ds-ink); font-size:var(--ds-text-base); font-weight:500; line-height:1.6; overflow-wrap:anywhere; }
.activity-row-context { margin:var(--ds-space-1) 0 0; color:var(--ds-muted); font-size:var(--ds-text-sm); line-height:1.65; white-space:pre-wrap; overflow-wrap:anywhere; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.activity-context-label { color:var(--ds-muted); }
.activity-row-meta { display:flex; flex-wrap:wrap; align-items:center; gap:0 var(--ds-space-3); min-width:0; margin-top:var(--ds-space-1); color:var(--ds-muted); font-size:var(--ds-text-sm); }
.activity-row-contributors, .activity-contributors, .activity-tools { display:inline-flex; flex-wrap:wrap; align-items:center; gap:0 var(--ds-space-3); min-width:0; }
:is(.workspace, .detail) :is(.activity-agent-chip, .activity-tool-chip, .activity-more-agents, .activity-resource) { display:inline-flex; align-items:center; gap:var(--ds-space-1); min-width:0; min-height:28px; padding:0; border:0; border-radius:var(--ds-radius-control); background:transparent; box-shadow:none; color:var(--ds-muted); font-size:var(--ds-text-sm); font-weight:450; }
:is(.workspace, .detail) :is(.activity-agent-chip, .activity-tool-chip)[aria-pressed="true"] { color:var(--ds-ink); font-weight:600; }
.activity-agent-chip > span, .activity-tool-chip > span, .activity-resource-label { max-width:200px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
:is(.workspace, .detail) button.activity-resource { color:var(--ds-ink); }
.activity-row-query { max-width:270px; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.activity-evidence, .activity-step-count, .activity-tool-overflow { color:var(--ds-muted); white-space:nowrap; }
.activity-row-aside { display:grid; justify-items:end; align-content:start; gap:var(--ds-space-1); min-width:0; padding-top:var(--ds-space-1); font-size:var(--ds-text-sm); }
.activity-row-aside time { color:var(--ds-muted); white-space:nowrap; }
.activity-status { font-size:inherit; white-space:nowrap; }
.activity-status.running { color:var(--ds-ink); }

.activity-list-footer { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:var(--ds-space-3); margin-top:var(--ds-space-6); color:var(--ds-muted); font-size:var(--ds-text-sm); }
.activity-history-paused { display:flex; flex-wrap:wrap; align-items:center; gap:var(--ds-space-2); margin-top:var(--ds-space-4); color:var(--ds-muted); font-size:var(--ds-text-sm); }
.activity-key-hint { display:flex; align-items:center; gap:var(--ds-space-1); margin-left:auto; }
.activity-key-hint kbd, .detail-close-controls kbd { padding:0; border:0; background:transparent; color:var(--ds-muted); font:inherit; }
.activity-key-hint kbd:last-of-type { margin-left:var(--ds-space-2); }
.activity-footnote { margin-top:var(--ds-space-6); color:var(--ds-muted); font-size:var(--ds-text-sm); line-height:1.7; }
.activity-skeleton { display:grid; gap:var(--ds-space-6); padding-top:var(--ds-space-6); }
.skeleton-card { display:grid; gap:var(--ds-space-2); }
.skeleton-card > .skeleton-line { max-width:60%; }
.skeleton-card > .skeleton-line.short { max-width:35%; margin:0; }

/* The detail drawer: heading, report, then the plain step list. */
.activity-detail { width:580px; }
.activity-detail .detail-header { position:sticky; top:0; z-index:3; height:64px; padding:0 var(--ds-space-6); background:var(--ds-surface); }
.detail-close-controls { display:flex; align-items:center; gap:var(--ds-space-3); }
.activity-detail .detail-body { padding:var(--ds-space-2) var(--ds-space-6) var(--ds-space-8); }
.activity-detail-kicker { color:var(--ds-muted); font-size:var(--ds-text-sm); }
.activity-detail-heading { display:grid; gap:var(--ds-space-2); margin:var(--ds-space-2) 0 var(--ds-space-3); }
.activity-detail-intro h2 { min-width:0; margin:0; font-size:var(--ds-text-xl); font-weight:600; line-height:1.35; overflow-wrap:anywhere; }
.activity-detail-meta { display:flex; flex-wrap:wrap; align-items:center; gap:var(--ds-space-4); color:var(--ds-muted); font-size:var(--ds-text-sm); }
.activity-stale-note { margin-top:var(--ds-space-4); color:var(--ds-warning); font-size:var(--ds-text-sm); line-height:1.7; }
.activity-detail-panel { min-height:0; }
.activity-detail-content { padding-top:var(--ds-space-6); }
.activity-report { min-width:0; }
.activity-report-label, .activity-last-step > span { display:block; margin-bottom:var(--ds-space-1); color:var(--ds-muted); font-size:var(--ds-text-sm); }
.activity-report p { color:var(--ds-ink); font-size:var(--ds-text-base); line-height:1.75; white-space:pre-wrap; overflow-wrap:anywhere; }
.activity-last-step { margin-top:var(--ds-space-5); color:var(--ds-ink); font-size:var(--ds-text-base); line-height:1.75; white-space:pre-wrap; overflow-wrap:anywhere; }
.activity-detail-resources { display:flex; flex-wrap:wrap; gap:0 var(--ds-space-4); margin-top:var(--ds-space-5); }
.activity-detail-section { padding-top:var(--ds-space-8); }
.activity-section-heading, .activity-log-heading { display:flex; justify-content:space-between; align-items:baseline; gap:var(--ds-space-4); margin-bottom:var(--ds-space-3); }
.activity-section-heading h3, .activity-log-heading h3 { font-size:var(--ds-text-base); font-weight:600; }
.activity-section-heading > span, .activity-log-heading > span { color:var(--ds-muted); font-size:var(--ds-text-sm); }
.activity-approaches { display:grid; gap:var(--ds-space-5); }
.approach-author { color:var(--ds-muted); font-size:var(--ds-text-sm); }
.approach-card p { margin-top:var(--ds-space-1); color:var(--ds-ink); font-size:var(--ds-text-base); line-height:1.75; white-space:pre-wrap; overflow-wrap:anywhere; }
.activity-source-note { margin-top:var(--ds-space-8); color:var(--ds-muted); font-size:var(--ds-text-sm); line-height:1.7; }
.activity-detail-footer { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:flex-start; gap:var(--ds-space-3); margin-top:var(--ds-space-8); color:var(--ds-muted); font-size:var(--ds-text-sm); }
.activity-options { position:relative; margin:0 0 0 auto; }
.activity-options > summary { display:flex; align-items:center; min-height:32px; padding:0; list-style:none; color:var(--ds-ink); font-size:var(--ds-text-sm); }
.activity-options > summary::-webkit-details-marker { display:none; }
.activity-options-menu { display:grid; justify-items:end; gap:var(--ds-space-2); margin-top:var(--ds-space-2); }
.activity-steps-expander { margin-top:var(--ds-space-8); }
.activity-steps-expander > summary { display:flex; align-items:baseline; gap:var(--ds-space-2); min-height:32px; padding:0; list-style:none; color:var(--ds-ink); font-size:var(--ds-text-base); font-weight:600; }
.activity-steps-expander > summary::-webkit-details-marker { display:none; }
.activity-steps-caption { color:var(--ds-muted); font-size:var(--ds-text-sm); font-weight:450; }
.activity-steps-expander .activity-work-log { padding:0; }
.activity-log-heading { margin:var(--ds-space-5) 0 var(--ds-space-3); }
.work-log-list { display:grid; gap:var(--ds-space-6); margin:0; padding:0; list-style:none; }
.work-log-content { min-width:0; }
.work-log-meta { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:baseline; gap:var(--ds-space-2); color:var(--ds-muted); font-size:var(--ds-text-sm); }
.work-log-agent { min-width:0; overflow-wrap:anywhere; }
.work-log-meta-end { display:inline-flex; gap:var(--ds-space-3); }
.work-log-step.failed .work-log-state { color:var(--ds-danger); }
.work-log-content h4 { margin:var(--ds-space-1) 0; font-size:var(--ds-text-base); font-weight:500; line-height:1.6; overflow-wrap:anywhere; }
.work-log-result, .work-log-current { margin:var(--ds-space-1) 0 var(--ds-space-2); color:var(--ds-ink); font-size:var(--ds-text-base); line-height:1.75; white-space:pre-wrap; overflow-wrap:anywhere; }
.work-log-content .activity-resource { margin-bottom:var(--ds-space-1); }
.work-log-details { margin-top:var(--ds-space-1); }
.work-log-details > summary { display:flex; align-items:center; width:fit-content; min-height:32px; padding:0; list-style:none; color:var(--ds-muted); font-size:var(--ds-text-sm); }
.work-log-details > summary::-webkit-details-marker { display:none; }
.activity-receipt-fields { display:grid; grid-template-columns:96px minmax(0,1fr); gap:var(--ds-space-1) var(--ds-space-4); margin:var(--ds-space-2) 0 0; font-size:var(--ds-text-sm); line-height:1.7; }
.activity-receipt-fields dt { color:var(--ds-muted); }
.activity-receipt-fields dd { margin:0; color:var(--ds-ink); overflow-wrap:anywhere; white-space:pre-wrap; }
.activity-receipt-detail { margin-top:var(--ds-space-3); font-size:var(--ds-text-sm); }
.activity-compact-receipt { margin-top:var(--ds-space-6); }
.work-log-note { margin-top:var(--ds-space-6); color:var(--ds-muted); font-size:var(--ds-text-sm); line-height:1.7; }
@media (hover:hover) and (pointer:fine) {
  .workspace .activity-row .activity-open:hover:not(:disabled) { background:transparent; }
  .workspace .activity-row:has(.activity-open:hover) { background:var(--ds-hover-bg); }
  :is(.workspace, .detail) :is(.activity-kind-switcher button, .activity-filter-tab, .activity-agent-chip, .activity-tool-chip, .activity-more-agents, .activity-resource, .activity-filter-chip):hover:not(:disabled) { color:var(--ds-ink); background:var(--ds-hover-bg); border-color:transparent; }
  .activity-options > summary:hover, .work-log-details > summary:hover, .activity-steps-expander > summary:hover { color:var(--ds-ink); background:var(--ds-hover-bg); }
}
@media (max-width:1100px) {
  .activity-search-filters .search-field { flex-basis:auto; max-width:none; }
  .activity-search-filters select { flex:0 1 150px; max-width:150px; width:auto; }
}
@media (max-width:840px) {
  .activity-refresh-label { display:none; }
  .activity-search-filters .search-field { flex-basis:100%; }
  .activity-search-filters select { flex:1; max-width:none; }
}
@media (max-width:620px) {
  .activity-row { grid-template-columns:minmax(0,1fr); gap:var(--ds-space-1); }
  .activity-row-aside { display:flex; flex-wrap:wrap; justify-content:flex-start; gap:var(--ds-space-3); padding:0; }
  .activity-kind-switcher, .activity-switcher { gap:0 var(--ds-space-5); }
  :is(.workspace, .detail) :is(.activity-kind-switcher button, .activity-filter-tab) { min-height:44px; }
  .filters.activity-search-filters { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:var(--ds-space-2); }
  .activity-search-filters .search-field { grid-column:1 / -1; width:100%; min-width:0; }
  .activity-search-filters .activity-intent-button { grid-column:1 / -1; justify-self:start; }
  .filters.activity-search-filters select { width:100%; min-width:0; max-width:none; }
  .activity-agent-chip > span, .activity-tool-chip > span, .activity-resource-label { max-width:150px; }
  .activity-row-query { max-width:180px; }
  .activity-key-hint { display:none; }
  .activity-detail { width:100%; }
  .activity-detail .detail-header { height:58px; padding:0 var(--ds-space-5); }
  .activity-detail .detail-body { padding:var(--ds-space-2) var(--ds-space-5) var(--ds-space-8); }
  .activity-receipt-fields { grid-template-columns:minmax(0,1fr); gap:0; }
  .activity-receipt-fields dd { margin-bottom:var(--ds-space-2); }
}

/* Activity owns both its history and the checks drawn from that history. */
.activity-section-tabs { margin-bottom: var(--ds-space-6); }
.activity-checks { min-width: 0; max-width: 960px; }
.activity-check-toolbar { align-items: flex-end; gap: var(--ds-space-3); margin-bottom: var(--ds-space-3); }
.activity-check-query { flex: 1; min-width: 0; }
.activity-check-query .search-field { display: flex; width: 100%; min-width: 0; }
.activity-check-toolbar .search { min-height: 44px; width: 100%; }
.activity-check-toolbar > button { flex-shrink: 0; }
.activity-check-hint { margin-bottom: var(--ds-space-5); max-width: 75ch; }
.activity-checks > .ds-notice { margin-bottom: var(--ds-space-5); }
@media (max-width: 600px) {
  .activity-check-toolbar .activity-check-query { flex-basis: 100%; }
  .activity-check-toolbar > button { width: 100%; }
}

/* Handoffs: saved continuation records. Shared primitives come from the design system. */
.handoffs-view { display:grid; gap:var(--ds-space-5); min-width:0; }
.handoffs-intro { display:grid; gap:var(--ds-space-4); }
.handoffs-intro .ds-heading-group > p { max-width:720px; color:var(--ds-muted); font-size:var(--ds-text-base); line-height:1.7; }
.handoffs-view .field-hint { display:flex; gap:var(--ds-space-2); align-items:flex-start; margin:0; color:var(--ds-muted); font-size:var(--ds-text-sm); line-height:1.7; }
.handoffs-view .field-hint > svg { flex:none; margin-top:3px; }
.handoffs-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:var(--ds-space-4); }
.handoffs-toolbar .activity-switcher { margin:0; border-bottom:0; }
.handoffs-toolbar .search-field { flex:1 1 240px; max-width:390px; }
.handoffs-results { display:grid; gap:var(--ds-space-4); min-width:0; }
.handoff-card { display:grid; gap:var(--ds-space-4); min-width:0; }
.handoff-card-heading { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:flex-start; gap:var(--ds-space-3); }
.handoff-card-heading h3 { flex:1 1 280px; min-width:0; margin:0; font-size:var(--ds-text-base); line-height:1.5; overflow-wrap:anywhere; }
.handoff-badges { display:flex; flex-wrap:wrap; gap:var(--ds-space-2); min-width:0; }
.handoff-next { display:grid; gap:var(--ds-space-1); margin:0; font-size:var(--ds-text-base); line-height:1.7; overflow-wrap:anywhere; }
.handoff-next > span { color:var(--ds-muted); font-size:var(--ds-text-sm); }
.handoff-meta { display:flex; flex-wrap:wrap; align-items:center; gap:var(--ds-space-2) var(--ds-space-4); color:var(--ds-muted); font-size:var(--ds-text-xs); min-width:0; }
.handoff-author { display:inline-flex; align-items:center; gap:var(--ds-space-2); color:var(--ds-ink); min-width:0; overflow-wrap:anywhere; }
.handoffs-view .form-actions { display:flex; flex-wrap:wrap; gap:var(--ds-space-3); align-items:center; margin:0; }
.handoff-detail { display:grid; gap:var(--ds-space-5); padding-top:var(--ds-space-4); min-width:0; }
.handoff-detail[hidden] { display:none; }
.handoff-history > summary { min-height:44px; padding-block:var(--ds-space-3); cursor:pointer; font-size:var(--ds-text-sm); }
.handoff-delete { display:inline-flex; flex-wrap:wrap; gap:var(--ds-space-2); }
.handoffs-feedback { margin:0; color:var(--ds-muted); font-size:var(--ds-text-sm); }
.handoffs-feedback:empty, .handoffs-more:has(> [hidden]:only-child) { display:none; }
.handoff-deleted { display:flex; flex-wrap:wrap; align-items:center; gap:var(--ds-space-3); }
.handoffs-empty h2 { margin-top:var(--ds-space-4); }
@media (max-width:600px) {
  .handoffs-toolbar { align-items:stretch; }
  .handoffs-toolbar .search-field { max-width:none; flex-basis:100%; }
  .handoff-card-heading { flex-direction:column; }
  .handoff-card-heading h3 { flex:none; }
  .handoffs-view .form-actions > * { flex:1 1 auto; }
}

/* Identity, icons and motion (design-system identityMark, ds-status-icon, ds-row-hover). */
:is(.workspace, .detail) .activity-agent-chip { gap: 6px; }
:is(.workspace, .detail) .activity-tool-chip { gap: 5px; }
.activity-tool-chip > :is(svg, img) { flex-shrink: 0; width: 13px; height: 13px; opacity: .9; }
.activity-tool-chip > svg.icon:not(.brand-icon) { color: var(--ds-muted); }
.activity-row.ds-row-hover { margin-inline: calc(var(--ds-space-3) * -1); padding-inline: var(--ds-space-3); }
.activity-status.ds-status-icon > span { min-width: 0; }
.activity-status.running { color: var(--ds-ink); }
.activity-evidence { display: inline-flex; align-items: center; gap: 4px; }
.activity-evidence > .icon { opacity: .8; }
.activity-evidence[data-evidence='observed'] > .icon { color: var(--ds-success); opacity: 1; }
.activity-detail-meta > span, .activity-stale-note { display: inline-flex; align-items: center; gap: 6px; }
.activity-source-note { display: flex; align-items: flex-start; gap: var(--ds-space-2); }
.activity-source-note > .icon { flex-shrink: 0; margin-top: 4px; color: var(--ds-muted); }
.activity-steps-expander > summary { align-items: center; cursor: pointer; }
.activity-steps-expander > summary > .icon:first-child { color: var(--ds-accent); }
.work-log-details > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; color: var(--ds-muted); font-size: var(--ds-text-sm); }
.work-log-details > summary::-webkit-details-marker { display: none; }
.disclosure-chevron { transition: transform var(--ds-duration-base) var(--ds-ease-out); }
details[open] > summary > .disclosure-chevron { transform: rotate(180deg); }
.approach-author { display: inline-flex; align-items: center; gap: 6px; }
.work-log-agent { display: inline-flex; align-items: center; gap: 6px; }
/* Steps read as a timeline: a status icon on a hairline rail. */
.work-log-list { position: relative; }
.work-log-step { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: var(--ds-space-3); }
.work-log-step:not(:last-child)::before { content: ''; position: absolute; top: 24px; bottom: calc(var(--ds-space-6) * -1 + 4px); left: 10px; width: 1px; background: var(--ds-hairline-strong); }
.work-log-marker { display: grid; place-items: center; width: 22px; height: 22px; margin-top: 1px; background: var(--ds-paper); border-radius: 50%; }
@media (prefers-reduced-motion: reduce) { .disclosure-chevron { transition: none; } }
.handoff-author { display: inline-flex; align-items: center; gap: 6px; }

/* ── Dashboard grammar: bordered activity panel, segmented filters, toolbar ── */
.activity-panel { margin-top: var(--ds-space-4); }
.activity-panel-head > span:first-child { flex: 1; }
.activity-panel-head > span:nth-child(2) { width: 150px; text-align: right; }
.activity-panel-head > span:nth-child(3) { width: 72px; text-align: right; }
.activity-panel .activity-feed { display: grid; }
.activity-panel .activity-section-title { position: sticky; top: var(--ds-topbar-height); z-index: 2; margin: 0; padding: 6px var(--ds-space-4); background: var(--ds-paper); border-bottom: 1px solid var(--ds-hairline); }
.activity-panel .activity-section-title:not(:first-child) { border-top: 1px solid var(--ds-hairline-strong); }
.activity-panel .activity-section-title h2 { color: var(--ds-muted); font-family: var(--ds-font-mono); font-size: var(--ds-mono-label); font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
.activity-panel .activity-row.ds-row-hover { margin: 0; padding: var(--ds-space-4); border-radius: 0; }
.activity-panel .activity-row + .activity-row { border-top: 1px solid var(--ds-hairline); }
.activity-panel .activity-row-aside { display: grid; grid-template-columns: 150px 72px; align-items: start; text-align: right; }
.activity-panel .activity-row-aside > .activity-status { justify-self: end; }
.activity-panel .activity-row.is-running { box-shadow: inset 2px 0 0 var(--ds-accent); }
.activity-list-footer.ds-panel-foot { justify-content: space-between; margin: 0; }
.activity-list-footer.ds-panel-foot button { min-height: 26px; }
.activity-skeleton .ds-panel-head { font-family: var(--ds-font-mono); }
/* Status filter as a segmented control with counts. */
.workspace .activity-switcher { display: inline-flex; gap: 0; padding: 2px; margin-bottom: var(--ds-space-4); background: var(--ds-surface-raised); border: 1px solid var(--ds-hairline-strong); border-radius: var(--ds-radius-control); }
:is(.workspace, .detail) .activity-switcher .activity-filter-tab { min-height: 28px; padding: 0 10px; border-radius: 4px; font-size: var(--ds-text-sm); font-weight: 450; transition: background-color var(--ds-duration-fast) var(--ds-ease-out), color var(--ds-duration-fast) var(--ds-ease-out); }
:is(.workspace, .detail) .activity-switcher .activity-filter-tab[aria-pressed="true"] { color: var(--ds-ink); background: var(--ds-paper); font-weight: 500; box-shadow: 0 0 0 1px var(--ds-hairline-strong); }
/* With a sliding indicator, the pill moves instead of each tab filling in. */
.activity-switcher > .ds-slide-indicator { background: var(--ds-paper); border-radius: 4px; box-shadow: 0 0 0 1px var(--ds-hairline-strong); }
:is(.workspace, .detail) .activity-switcher.ds-slide-host .activity-filter-tab[aria-pressed="true"] { background: transparent; box-shadow: none; }
.activity-switcher .filter-count { padding: 0 5px; margin-left: 2px; color: var(--ds-muted); background: var(--ds-paper); border-radius: 4px; font-size: var(--ds-text-xs); }
.activity-switcher .activity-filter-tab[aria-pressed="true"] .filter-count { background: var(--ds-surface-raised); color: var(--ds-ink); }
/* Kind tabs: underline tabs on a hairline. */
.workspace .activity-kind-switcher { gap: var(--ds-space-5); margin-bottom: var(--ds-space-5); padding-bottom: 6px; border-bottom: 1px solid var(--ds-hairline); }
.workspace .activity-kind-switcher .ds-tab-underline::after { bottom: -7px; }
/* Toolbar: compact controls, dashboard sizing. */
.workspace .activity-search-filters { align-items: center; }
.workspace .activity-search-filters .search-field :is(input, .search) { min-height: 34px; font-size: var(--ds-text-sm); }
.workspace .activity-search-filters .ds-select-trigger, .workspace .activity-search-filters select { min-height: 34px; font-size: var(--ds-text-sm); }
.workspace .activity-intent-button { min-height: 34px; }
@media (max-width: 700px) {
  .activity-panel-head > span:not(:first-child) { display: none; }
  .activity-panel .activity-row-aside { grid-template-columns: auto auto; gap: var(--ds-space-3); text-align: left; }
  .activity-list-footer .activity-key-hint { display: none; }
  .workspace .activity-switcher { display: flex; overflow-x: auto; max-width: 100%; }
}

/* Checks: bordered query card, dashed empty state, external-processing panel. */
.activity-checks .insight-privacy { overflow: hidden; margin-top: var(--ds-space-8); padding: 0; border: 1px solid var(--ds-hairline-strong); border-radius: var(--ds-radius-card); }
.activity-checks .insight-privacy-head { gap: var(--ds-space-2); }
.activity-checks .insight-privacy > p { margin: 0; padding: var(--ds-space-4) var(--ds-space-4) 0; color: var(--ds-muted); font-size: var(--ds-text-sm); }
.activity-checks .insight-config { display: grid; margin: var(--ds-space-4) 0 0; }
.activity-checks .insight-config > div { display: flex; justify-content: space-between; gap: var(--ds-space-4); padding: var(--ds-space-3) var(--ds-space-4); border-top: 1px solid var(--ds-hairline); }
.activity-checks .insight-config dt { color: var(--ds-ink); font-size: var(--ds-text-sm); }
.activity-checks .insight-config dd { margin: 0; color: var(--ds-muted); font-size: var(--ds-text-sm); }
.activity-checks .insight-settings-link { display: flex; padding: var(--ds-space-3) var(--ds-space-4); background: var(--ds-surface-raised); border-top: 1px solid var(--ds-hairline-strong); font-size: var(--ds-text-xs); }
.activity-checks .insight-empty { margin-top: var(--ds-space-6); }
.activity-checks .insight-card { padding: var(--ds-space-4); border: 1px solid var(--ds-hairline-strong); border-radius: var(--ds-radius-card); }

/* Handoffs: segmented status, toolbar, bordered task cards. */
.handoffs-view .handoffs-intro { padding: var(--ds-space-5); margin-bottom: var(--ds-space-5); background: var(--ds-surface-raised); border: 1px solid var(--ds-hairline-strong); border-radius: var(--ds-radius-card); }
.handoffs-view .handoffs-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: var(--ds-space-2); margin-bottom: var(--ds-space-4); }
.handoffs-view .handoffs-toolbar .activity-switcher { margin: 0; }
.handoffs-view .handoffs-toolbar .search-field { flex: 1; max-width: 420px; }
.handoffs-results { display: grid; gap: 0; overflow: hidden; border: 1px solid var(--ds-hairline-strong); border-radius: var(--ds-radius-card); }
.handoffs-results:empty, .handoffs-results:has(> .ds-empty), .handoffs-results:has(> .ds-loading), .handoffs-results:has(> .notice) { border: 0; }
.handoffs-results > .handoff-card { padding: var(--ds-space-4); transition: background-color var(--ds-duration-fast) var(--ds-ease-out); }
.handoffs-results > .handoff-card + .handoff-card { border-top: 1px solid var(--ds-hairline); }
@media (hover: hover) { .handoffs-results > .handoff-card:hover { background: var(--ds-surface-raised); } }
.handoff-next > span:first-child { color: var(--ds-muted); font-family: var(--ds-font-mono); font-size: var(--ds-mono-label); letter-spacing: .04em; text-transform: uppercase; margin-right: var(--ds-space-2); }
.handoffs-empty[data-variant='dashed'], .handoffs-empty { border: 1px dashed var(--ds-hairline-strong); border-radius: var(--ds-radius-card); }
