/* Actions stay attached to the expanded handoff section they change. */
body.handoff-expanded{min-width:0}
.expanded-handoff .handoff-card-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:12px;margin-top:28px;padding-top:23px;border-top:0;min-width:0}
.expanded-handoff .handoff-card-actions>.button{flex:0 1 auto;max-width:100%;min-height:46px;padding:11px 19px;font-size:13px;line-height:1.5;text-align:center}
.expanded-handoff .handoff-card-actions>.button>svg{width:15px;height:15px}
.expanded-handoff .handoff-card-actions>.button.secondary{border-color:var(--line);background:var(--surface)}
.expanded-handoff .handoff-card-actions>.button.secondary:hover{border-color:var(--control-border);background:var(--surface-subtle)}

/* The agent link is a distinct handoff destination with a clear return action. */
.expanded-handoff .handoff-agent-footer{display:flex;align-items:flex-end;flex-wrap:wrap;gap:20px;margin-top:30px;padding:0}
.expanded-handoff .handoff-agent-card{display:grid;grid-template-columns:44px minmax(0,1fr);align-items:start;gap:15px;flex:1 1 430px;min-width:0;padding:22px;border:1px solid var(--line);border-radius:22px;background:var(--surface);box-shadow:0 3px 14px #00000004}
.expanded-handoff .handoff-agent-symbol{display:grid;place-items:center;min-width:0;width:44px;height:44px;border-radius:13px;background:var(--ink);color:var(--surface)}
.expanded-handoff .handoff-agent-symbol>svg{width:21px;height:21px;stroke-width:1.5}
.expanded-handoff .handoff-agent-content{min-width:0}
.expanded-handoff .handoff-agent-heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 14px;min-height:44px}
.expanded-handoff .handoff-agent-heading>h2{font-size:27px;line-height:1.16;letter-spacing:-.02em;text-wrap:initial}
.expanded-handoff .handoff-agent-heading>small{display:inline-flex;align-items:center;min-height:25px;padding:4px 8px;border:1px solid var(--line);border-radius:6px;background:var(--surface-subtle);color:var(--muted);font-size:9px;line-height:1.4;white-space:nowrap}
.expanded-handoff .handoff-agent-content>p{margin-top:7px;font-size:12px;line-height:1.65;color:var(--body)}
.expanded-handoff .handoff-agent-card .agent-link.compact{display:grid;grid-template-columns:minmax(0,1fr) auto 44px;align-items:center;gap:7px;max-width:none;min-width:0;margin-top:17px;padding:7px 8px 7px 12px;border-color:var(--line);border-radius:12px;background:var(--paper)}
.expanded-handoff .handoff-agent-card .agent-link.compact input{grid-column:1;display:block;width:100%;min-width:0;min-height:44px;padding:0;border:0;background:transparent;font-size:11px;line-height:1.5;color:var(--body);text-overflow:ellipsis}
.expanded-handoff .handoff-agent-card .agent-link-open{grid-column:2;gap:6px;min-height:44px;padding:0 12px;border-color:var(--line);border-radius:8px;font-size:11px;justify-self:start}
.expanded-handoff .handoff-agent-card .agent-link-open>svg{width:13px;height:13px}
.expanded-handoff .handoff-agent-card .agent-link.compact .icon-button{grid-column:3;width:44px;height:44px;border:1px solid var(--line);border-radius:8px;background:var(--surface)}
.expanded-handoff .handoff-agent-card .agent-link.compact .icon-button:hover{background:var(--surface-subtle);border-color:var(--control-border)}
.expanded-handoff .handoff-return-button{flex:none;max-width:100%;min-height:46px;margin-left:auto;padding:11px 19px;font-size:13px;line-height:1.5;text-align:center}
.expanded-handoff .handoff-return-button>svg{width:16px;height:16px}

@media(max-width:640px){
 .expanded-handoff .handoff-card-actions{gap:10px;margin-top:24px;padding-top:19px}
 .expanded-handoff .handoff-card-actions>.button{min-height:44px;padding:10px 15px;font-size:11px;gap:8px}
 .expanded-handoff .handoff-card-actions>.button>svg{width:13px;height:13px}
 .expanded-handoff .handoff-agent-footer{gap:16px;margin-top:23px}
 .expanded-handoff .handoff-agent-card{flex-basis:100%;grid-template-columns:36px minmax(0,1fr);align-items:center;gap:12px;padding:18px;border-radius:20px}
 .expanded-handoff .handoff-agent-symbol{width:36px;height:36px;border-radius:11px}
 .expanded-handoff .handoff-agent-symbol>svg{width:18px;height:18px}
 .expanded-handoff .handoff-agent-content{display:contents}
 .expanded-handoff .handoff-agent-heading{min-height:36px;gap:6px 10px}
 .expanded-handoff .handoff-agent-heading>h2{font-size:25px}
 .expanded-handoff .handoff-agent-heading>small{min-height:22px;padding:3px 6px;font-size:8px}
 .expanded-handoff .handoff-agent-content>p{grid-column:1 / -1;margin-top:0;font-size:11px}
 .expanded-handoff .handoff-agent-card .agent-link.compact{grid-column:1 / -1;grid-template-columns:minmax(0,1fr) 44px;gap:7px;margin-top:2px;padding:8px}
 .expanded-handoff .handoff-agent-card .agent-link.compact input{grid-column:1 / -1;min-height:32px;padding:0 3px;font-size:10px}
 .expanded-handoff .handoff-agent-card .agent-link-open{grid-column:1;min-height:44px;font-size:10px}
 .expanded-handoff .handoff-agent-card .agent-link.compact .icon-button{grid-column:2}
 .expanded-handoff .handoff-return-button{min-height:44px;padding:10px 16px;font-size:12px}
}
