/* Small, borderless nodes leave room for the work moving between them. */
.space-cell.agent-graph-section { padding: 0; }
.agent-graph-section > .agent-graph { padding: 16px 24px 24px; box-sizing: border-box; }
.agent-graph {
  --ease-out-sine: cubic-bezier(0.61, 1, 0.88, 1);
  --ag-ink: #120f11;
  --ag-muted: #746d77;
  --ag-link: rgb(222 219 222 / 35%);
  container-type: inline-size;
  color: var(--ag-ink);
  font: inherit;
}
/* Keep the grid rails while opening only the illustration onto page traffic. */
.space-group[data-layout="agent-graph-full-width"] {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--grid-line);
}
.space-cell.agent-graph-section { background: transparent; }
.agent-graph-section .graph-section-header { background: var(--paper); }
.agent-graph-section > .agent-graph[data-agent-graph] {
  align-self: stretch;
  display: grid;
  align-items: center;
  position: relative;
  isolation: isolate;
}
.ag-paper, .agent-graph::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.ag-paper { background: var(--paper); }
.agent-graph::before {
  content: '';
  /* The margins meet the page seamlessly. Attenuate motion behind the hub. */
  background: radial-gradient(ellipse at center, var(--paper), transparent 78%);
}
.ag-panel { position: relative; overflow: clip; }
.ag-stage { position: relative; height: 560px; isolation: isolate; }
.ag-links { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.ag-traffic { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; }
.ag-edge { fill: none; stroke: var(--ag-link); stroke-width: 1px; stroke-linecap: butt; stroke-linejoin: miter; transition: opacity 150ms, stroke 150ms; }
.ag-edge[data-dim] { opacity: .3; }
.ag-edge[data-flash] { stroke: var(--ag-signal-color); }
.ag-node { position: absolute; left: 0; top: 0; z-index: 2; width: 96px; height: 34px; margin: -17px 0 0 -48px; user-select: none; }
.ag-node[data-kind="agent"] { height: 44px; margin-top: -22px; }
.ag-node[data-kind="inbox"] { height: 44px; margin-top: -22px; z-index: 3; }
.ag-node-body { width: 100%; height: 100%; opacity: 1; transition: opacity 150ms; }
.ag-node[data-changing] { pointer-events: none; }
.ag-node[data-changing] .ag-node-body { transition: none; }
.ag-node[data-dim] .ag-node-body { opacity: .32; }
.ag-disc { position: relative; display: grid; place-items: center; width: 34px; height: 34px; margin-inline: auto; padding: 0; border: 0; border-radius: 11px; background: var(--paper); color: var(--ag-ink); font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ag-node[data-kind="agent"] .ag-disc { width: 44px; height: 44px; border-radius: 11px; }
.ag-node[data-dragging] { z-index: 4; }
.ag-node[data-dragging] .ag-disc { cursor: grabbing; }
.ag-disc:focus-visible { outline: 2px solid #916479; outline-offset: 5px; }
.ag-node-visual { position: relative; display: grid; place-items: center; width: 100%; height: 100%; border-radius: inherit; background: #efedef; transition: background-color 180ms; }
.ag-node-mark { display: grid; place-items: center; }
.ag-disc img, .ag-icon { display: block; width: 28px; height: 28px; object-fit: contain; }
.ag-icon-claude { background: #d97757; mask: url('avatars/claude-spark.svg?v=591dcb40a8c0') center / contain no-repeat; }
.ag-node[data-kind="tool"] .ag-node-visual { background: #f1eff1; }
.ag-node[data-kind="tool"] .ag-disc img { width: 24px; height: 24px; }
.ag-node[data-kind="person"] .ag-disc { border-radius: 50%; }
.ag-node[data-kind="person"] .ag-node-visual { background: transparent; }
.ag-node[data-kind="inbox"] .ag-disc { width: 44px; height: 44px; border-radius: 14px; }
.ag-node[data-kind="inbox"] .ag-node-visual { background: #efedef; }
.ag-icon-nodebox { width: 36px; height: 36px; color: #edb5c2; }
@media (hover: hover) and (pointer: fine) {
  .ag-node:not([data-anchor]) .ag-disc:hover .ag-node-visual { background: #f0edf1; }
  .ag-node:not([data-anchor]) .ag-disc:hover + .ag-node-copy .ag-node-name { color: var(--ag-ink); }
}
.ag-person { width: 34px; height: 34px; display: block; border-radius: 50%; overflow: hidden; background: #dcd4de; color: #563963; }
.ag-person-sage { background: #d5dfdd; color: #4a6e5e; }
.ag-person-sand { background: #ded9d4; color: #75603f; }
.ag-person-rose { background: #ead7df; color: #925870; }
.ag-person-blue { background: #d7deeb; color: #5b7095; }
.ag-person svg { width: 100%; height: 100%; fill: currentColor; }

.ag-node-copy { position: absolute; top: calc(100% + 7px); left: 50%; transform: translateX(-50%); text-align: center; white-space: nowrap; padding-inline: 3px; background: var(--paper); pointer-events: none; }
.ag-stage[data-layout="wide"] .ag-node[data-node="your-tool-d"] .ag-node-copy,
.ag-stage[data-layout="wide"] .ag-node[data-node="their-tool-a"] .ag-node-copy { top: auto; bottom: calc(100% + 8px); }
.ag-node-name { display: block; font-size: 12px; line-height: 16px; font-weight: 500; }
.ag-node-detail { display: block; font-size: 10px; line-height: 14px; color: var(--ag-muted); }
.ag-node[data-kind="tool"] .ag-node-name { font-weight: 400; color: var(--ag-muted); }
.ag-node[data-kind="inbox"] .ag-node-name { color: #7b6c76; }
.ag-stage[data-layout="stacked"] .ag-node { width: 84px; margin-left: -42px; }
.ag-stage[data-layout="stacked"] .ag-node-name { font-size: 11px; }
.ag-stage[data-layout="stacked"] .ag-node-detail { font-size: 9px; }
@media (max-width: 620px) { .space-cell.agent-graph-section { padding: 28px 12px; } }
@media (prefers-reduced-motion: reduce) { .ag-node-body, .ag-node-visual { transition-duration: 150ms; } }

/* A quiet neutral edge acknowledges a transfer without recoloring the icon. */
.ag-node-visual { position: relative; }
.ag-node-visual::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 1px solid #5d5962; opacity: var(--ag-flow-opacity, 0); pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .ag-node-visual::after { transition: opacity 150ms; }
  .ag-node[data-active] .ag-node-visual::after { opacity: .1; }
}

/* Ownership travels with the agent, rather than taking a separate graph node. */
.ag-node[data-kind="agent"] .ag-node-mark { position: relative; width: 100%; height: 100%; }
/* Ownership is labeled once per group, without shifting any graph nodes. */
.ag-owner-group { position: absolute; box-sizing: border-box; border: 0; background: transparent; pointer-events: none; z-index: 0; }
.ag-owner-label { position: absolute; left: 50%; top: 0; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px; background: var(--paper); color: var(--ag-muted); font-size: 11px; font-weight: 500; line-height: 18px; white-space: nowrap; }
.ag-owner-label .ag-person { flex: none; width: 18px; height: 18px; border-radius: 50%; transform: scale(1.777778); transform-origin: center; }

/* A centered introduction shares the graph's full-width panel. */
.graph-section-header { padding: 24px 24px 20px; text-align: center; border-bottom: 1px solid var(--grid-line); }
.graph-section-header h2 { margin: 0; font-size: clamp(28px, 3.5vw, 44px); font-weight: 500; line-height: 1.12; letter-spacing: -.045em; text-wrap: balance; }
.graph-section-header h2 span { color: #746d77; }
.graph-section-header p { max-width: 76ch; margin: 14px auto 0; font-size: 16px; line-height: 1.55; color: #5f5962; text-wrap: pretty; }
@media (max-width: 600px) {
  .graph-section-header { padding: 20px; }
  .graph-section-header h2 { font-size: 28px; }
  .graph-section-header p { font-size: 15px; margin-top: 16px; }
}

.graph-section-header h2 .graph-brand { display: inline-flex; align-items: center; gap: .12em; white-space: nowrap; color: #161416; }
.graph-brand svg { width: .9em; height: .9em; flex: none; }

.graph-subtitle-sentence { display: block; text-wrap: pretty; }

/* One introduction above a broad, shared coordination diagram. */
.space-cell.agent-graph-section { display: block; padding: 0; }
.agent-graph-section .graph-section-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: 32px;
  text-align: left;
  border-left: 0;
  border-bottom: 1px solid var(--grid-line);
}
.agent-graph-section .graph-section-header h2 { font-size: clamp(28px, 2.8vw, 36px); }
.agent-graph-section .graph-section-header p { margin: 0; max-width: 44ch; }
.agent-graph-section > .agent-graph { min-width: 0; padding: 24px; }
@media (max-width: 759px) {
  .agent-graph-section .graph-section-header { grid-template-columns: 1fr; gap: 16px; }
  .agent-graph-section > .agent-graph { padding: 16px 12px 24px; }
}

/* Match visible agent marks, compensating for padding baked into each asset. */
.ag-node[data-kind="agent"] .ag-node-mark img[data-icon="codex"] { width: 40px; height: 40px; }
.ag-node[data-kind="agent"] .ag-node-mark img[data-icon="cursor"] { width: 36px; height: 36px; }
.ag-node[data-kind="agent"] .ag-node-mark img[data-icon="goose"] { width: 44px; height: 44px; }
.ag-node[data-kind="agent"] .ag-node-mark img[data-icon="cline"] { width: 34px; height: 34px; }

/* Bare logos retain their hit areas and keyboard focus without tile surfaces. */
.ag-disc,
.ag-node[data-kind] .ag-node-visual {
  background: transparent;
}
.ag-node-visual::after { content: none; }
.ag-node-mark img { mix-blend-mode: multiply; }
@media (hover: hover) and (pointer: fine) {
  .ag-node:not([data-anchor]) .ag-disc:hover .ag-node-visual { background: transparent; }
}

/* Enlarge only the artwork; node geometry, labels, and connections stay fixed. */
.ag-node-mark > img,
.ag-node-mark > .ag-icon {
  transform: scale(1.15);
  transform-origin: center;
}

/* Logos identify the nodes; buttons retain accessible names and tooltips. */
.ag-node-copy { display: none; }

/* People lead the composition; each agent has only one supporting app. */
.ag-owner-label { flex-direction: column; gap: 6px; padding: 0; background: transparent; }
.ag-owner-label .ag-person { width: 46px; height: 46px; transform: none; }
.ag-node[data-kind="tool"] .ag-node-mark img { width: 22px; height: 22px; transform: none; }
@media (max-width: 759px) {
  .ag-owner-label .ag-person { width: 38px; height: 38px; }
}

/* Keyboard focus follows the logo silhouette, without a surrounding tile. */
.ag-node[data-kind="inbox"] .ag-disc:focus-visible { outline: none; }
.ag-node[data-kind="inbox"] .ag-disc:focus-visible .ag-icon-nodebox {
  filter: drop-shadow(0 0 2px #916479);
}

.ag-node[data-kind="inbox"] .ag-icon-nodebox { width: 44px; height: 44px; transform: none; }
