.agent-overview { margin:0 0 var(--ds-space-8); }
.agent-overview.is-loading,.agent-overview.unavailable { display:flex; align-items:center; flex-wrap:wrap; gap:var(--ds-space-3); color:var(--ds-muted); font-size:var(--ds-text-sm); }
.agent-overview-heading { display:flex; align-items:baseline; justify-content:space-between; gap:var(--ds-space-4); margin-bottom:var(--ds-space-2); }
.agent-overview-heading>div { display:flex; align-items:baseline; flex-wrap:wrap; gap:var(--ds-space-1) var(--ds-space-3); min-width:0; }
.agent-overview-heading h2 { font-size:var(--ds-text-base); font-weight:600; }
.agent-overview-heading span { color:var(--ds-muted); font-size:var(--ds-text-sm); }
.agent-presence-list { display:flex; flex-wrap:wrap; gap:0 var(--ds-space-8); }
.workspace .agent-presence { justify-content:flex-start; min-height:44px; padding:0; border:0; border-radius:var(--ds-radius-control); background:transparent; box-shadow:none; text-align:left; }
.agent-presence-copy { display:grid; min-width:0; }
.agent-presence-copy strong { color:var(--ds-ink); font-size:var(--ds-text-base); font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.agent-presence-copy>span { color:var(--ds-muted); font-size:var(--ds-text-sm); }
.agent-presence.reconnect .agent-presence-copy>span { color:var(--ds-danger); }
.workspace .agent-presence[aria-pressed="true"] { background:var(--ds-selected-bg); }
.workspace .agent-presence[aria-pressed="true"] strong { font-weight:600; }
.agent-overview-note { display:flex; align-items:center; flex-wrap:wrap; gap:var(--ds-space-2); margin-top:var(--ds-space-3); color:var(--ds-muted); font-size:var(--ds-text-sm); line-height:1.65; }
.workspace :is(.agent-overview-note, .agent-overview-heading, .agent-overview.unavailable) button { color:var(--ds-ink); }
@media (hover:hover) and (pointer:fine) { .workspace .agent-presence:hover:not(:disabled) { background:var(--ds-hover-bg); } }
@media (max-width:580px) { .agent-presence-list { gap:0 var(--ds-space-6); } }
.connection-inventory { margin:var(--ds-space-8) 0; }
.connection-list-filter { width:100%; max-width:280px; margin-top:var(--ds-space-5); }
.connection-management { margin:var(--ds-space-5) 0; gap:var(--ds-space-3); }
.connection-management > :is(h3,.detail-note) { margin:0; }
.agent-identity { margin:var(--ds-space-5) 0; gap:var(--ds-space-3); }
.agent-identity :is(h3,.detail-note) { margin:0; }
.agent-identity-head { display:flex; align-items:center; gap:var(--ds-space-2); }
.agent-identity-preview { display:flex; align-items:center; gap:var(--ds-space-3); padding:var(--ds-space-3); background:var(--ds-surface-raised); border:1px solid var(--ds-hairline); border-radius:var(--ds-radius-card); }
.agent-identity-copy { display:grid; gap:2px; min-width:0; }
.agent-identity-copy > strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.agent-identity-lock { display:flex; align-items:flex-start; gap:var(--ds-space-3); cursor:pointer; }
.agent-identity-lock > span { display:grid; gap:2px; }
.connection-name .connection-identity { margin-right:var(--ds-space-2); vertical-align:middle; }
.connection-inventory>section+section { margin-top:var(--ds-space-8); }
.connection-section-title { display:flex; align-items:center; gap:7px; margin-bottom:7px; }
.connection-section-title h3 { font-size:var(--ds-text-base); font-weight:600; }
.connection-section-title>span { font-size:var(--ds-text-sm); color:var(--ds-muted); font-variant-numeric:tabular-nums; }
.connection-row { display:flex; align-items:flex-start; gap:var(--ds-space-6); padding:var(--ds-space-4) 0; }
.connection-copy { flex:1; min-width:0; }
.connection-copy p { overflow-wrap:anywhere; }
.connection-name { display:flex; flex-wrap:wrap; align-items:baseline; gap:var(--ds-space-1) var(--ds-space-3); }
.connection-name strong { font-size:var(--ds-text-base); font-weight:500; overflow-wrap:anywhere; }
.connection-auth-kind { font-size:var(--ds-text-xs); color:var(--ds-muted); }
.connection-copy p { margin-top:var(--ds-space-1); font-size:var(--ds-text-sm); color:var(--ds-muted); line-height:1.65; }
.connection-counts { font-variant-numeric:tabular-nums; }
.connection-row-end { display:grid; justify-items:end; gap:7px; min-width:0; max-width:46%; }
.connection-state { font-size:var(--ds-text-sm); color:var(--ds-muted); overflow-wrap:anywhere; }
.connection-state .icon { flex-shrink:0; }
.connection-state.reconnect { color:var(--ds-danger); }
.connection-row-end .connection-actions { gap:9px; flex-wrap:wrap; justify-content:flex-end; }
.connection-row-end button { font-size:var(--ds-text-sm); padding:0; min-height:32px; }
.connection-empty { font-size:var(--ds-text-sm); color:var(--ds-muted); padding:var(--ds-space-4) 0; }
.connection-explainer { font-size:var(--ds-text-sm); color:var(--ds-muted); line-height:1.7; margin-top:var(--ds-space-8); max-width:650px; }
.connection-guide { font-size:var(--ds-text-sm); line-height:1.7; color:var(--ds-muted); }
.connection-guide .endpoint { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:var(--ds-space-3); }
.connection-guide > .ds-stack { margin-top:var(--ds-space-3); gap:var(--ds-space-3); min-width:0; }
.connection-guide > .ds-stack > :is(p,ol) { margin-block:0; }
.connection-guide > .ds-stack > button { justify-self:start; }
.connection-guide ol { padding-left:19px; }
.connection-guide li { margin:9px 0; }
.connection-key-form { scroll-margin-top:24px; }
.connection-key-form .form-feedback { flex-basis:100%; margin:0; }
@media (max-width:580px) { .agent-overview-heading>div { display:grid; gap:0; } .connection-row { flex-wrap:wrap; gap:var(--ds-space-1); } .connection-row-end { flex:1 0 100%; max-width:100%; margin-left:0; display:flex; flex-wrap:wrap; align-items:center; gap:var(--ds-space-3); } .connection-row-end .connection-actions { flex-direction:row; align-items:center; } }
.connection-memory-use { padding-block: var(--ds-space-5); margin-block: var(--ds-space-4); min-width: 0; }
.connection-memory-use h3 { margin: 0; }
.connection-memory-use .ds-toolbar { justify-content: space-between; align-items: flex-start; }
.connection-memory-use summary { cursor: pointer; font-size: var(--ds-text-sm); color: var(--ds-muted); }
.connection-memory-use details > p { margin-top: var(--ds-space-3); }
.connection-workflow-checks > .ds-evidence-list { margin-top: var(--ds-space-3); }

/* Connection creation is a focused dialog; the page owns the inventory. */
.connection-page-actions { flex-shrink: 0; }
.connection-setup, .connection-result { min-width: 0; gap: var(--ds-space-5); }
.connection-setup :is(h2,h3,p), .connection-result :is(h2,h3,p) { margin: 0; }
.connection-setup .field, .connection-result .field { min-width: 0; }
.connection-setup-endpoint { min-width: 0; gap: var(--ds-space-3); }
.connection-create-form { gap: var(--ds-space-3); }
.connection-setup-disclosure { min-width: 0; margin: 0; }
.connection-setup-disclosure > .ds-stack { margin-top: var(--ds-space-4); gap: var(--ds-space-3); }
.connection-setup-disclosure pre { margin: 0; }
.connection-result .connection-secret-row { margin: 0; align-items: stretch; }
.connection-result details { margin: 0; }
.connection-result details > :not(summary) { margin-top: var(--ds-space-3); }
@media (max-width: 600px) {
  .connect-layout > .page-heading { flex-wrap: wrap; align-items: flex-start; }
  .connection-page-actions { width: 100%; }
  .connection-page-actions > .primary { flex: 1; }
}

/* Agent marks (design-system identityMark) in the overview strip and connection rows. */
.workspace .agent-presence { display: inline-flex; align-items: center; gap: var(--ds-space-3); padding: 6px 10px 6px 6px; margin-left: -6px; border-radius: var(--ds-radius-card); transition: background-color var(--ds-duration-fast) var(--ds-ease-out); }
.agent-presence-list { gap: var(--ds-space-1) var(--ds-space-4); }
@media (hover: hover) and (pointer: fine) { .workspace .agent-presence:hover:not(:disabled) { background: var(--ds-surface-raised); } .workspace .agent-presence:hover .ds-mark { border-color: var(--ds-input-border); } }
.workspace .agent-presence[aria-pressed="true"] { background: var(--ds-surface-raised); }
.workspace .agent-presence[aria-pressed="true"] .ds-mark { border-color: var(--ds-accent); }
.agent-presence.recent .agent-presence-copy > span { color: var(--ds-success); }
.connection-row { align-items: center; padding: var(--ds-space-4) var(--ds-space-3); margin-inline: calc(var(--ds-space-3) * -1); }
.connection-row > .ds-mark { align-self: flex-start; margin-top: 2px; }
.connection-copy { flex: 1; min-width: 0; }
@media (max-width: 580px) { .connection-row > .ds-mark { --size: var(--ds-mark-md); } }
.connect-computer .ds-mark-stack { gap: 6px; }
.connect-computer .ds-mark-stack > .ds-mark { box-shadow: none; }
.connect-computer .ds-mark-stack > .ds-mark + .ds-mark { margin-left: 0; }
.connect-computer .ds-mark-stack { margin-bottom: var(--ds-space-1); }

/* Your agents: a segmented card panel (dashboard "Get connected" grammar). */
.agent-overview:not(.is-loading, .unavailable) { overflow: hidden; border: 1px solid var(--ds-hairline-strong); border-radius: var(--ds-radius-card); }
.agent-overview:not(.is-loading, .unavailable) > .agent-overview-heading { align-items: center; min-height: var(--ds-panel-head); margin: 0; padding: 0 var(--ds-space-4); background: var(--ds-surface-raised); border-bottom: 1px solid var(--ds-hairline-strong); }
.agent-overview-heading h2 { color: var(--ds-muted); font-family: var(--ds-font-mono); font-size: var(--ds-mono-label) !important; font-weight: 500 !important; letter-spacing: .04em; text-transform: uppercase; }
.agent-overview-heading span { font-size: var(--ds-text-xs) !important; }
.agent-overview .agent-presence-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0; }
.workspace .agent-overview .agent-presence { width: 100%; margin: 0; padding: var(--ds-space-4); border-radius: 0; box-shadow: inset -1px -1px 0 var(--ds-hairline); }
.workspace .agent-overview .agent-presence[aria-pressed="true"] { box-shadow: inset -1px -1px 0 var(--ds-hairline), inset 0 -2px 0 var(--ds-accent); }
.agent-overview .agent-overview-note { margin: 0; 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); }

/* Connections: grouped bordered panels and a Quick setup card. */
.connection-inventory { display: grid; gap: var(--ds-space-6); }
.connection-panel .connection-section-title { justify-content: space-between; margin: 0; }
.connection-panel .connection-section-title h3 { margin: 0; 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; }
.connection-panel[data-tone='danger'] .connection-section-title h3 { color: var(--ds-danger); }
.connection-count { padding: 0 6px; color: var(--ds-muted); background: var(--ds-paper); border: 1px solid var(--ds-hairline-strong); border-radius: 4px; font-family: var(--ds-font-sans); font-size: var(--ds-text-xs); text-transform: none; letter-spacing: normal; }
.connection-rows { display: grid; }
.connection-panel .connection-row { margin: 0; padding: var(--ds-space-4); border-radius: 0; }
.connection-rows > .connection-row + .connection-row { border-top: 1px solid var(--ds-hairline); }
.connect-computer.ds-panel-list { margin-bottom: var(--ds-space-8); }
.connect-computer .ds-panel-head { gap: var(--ds-space-2); }
.connect-computer-body { padding: var(--ds-space-5) var(--ds-space-4); }
.memory-row-title > strong { display: inline; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
