/* #agents Together: where each shot's window sits (app px in a 700 x 438 canvas, or 380 x 475 on
   phones) and the parts the rows add: the lead's tile, a task's own view, Settings, Skills.
   The look of a shot lives in features.css. */

/* the window these rows share: orbit-api's tile wide on the left, orbit-web beside it */
#agents .aq-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
#agents .ag-api .pui-th { flex-wrap: nowrap; overflow: hidden; }
#agents .pui-tab[hidden] { display: none; }

/* 1 the tree: the eye lands on the lead's tab strip, its helpers beside it */
#agents-tree .shot-win { --x: 44px; --y: 48px; --w: 1000px; --h: 372px; }
.shot[data-shot='tree'] .shot-light { --lx: 34%; --ly: 26%; }
.sm > #agents-tree .shot-win { --x: 14px; --y: 40px; --w: 620px; }

/* 2 spawn: the lead's terminal and the tabs it opens, toward the words on the right */
#agents-spawn .shot-win { --x: 22px; --y: 40px; --w: 1000px; --h: 380px; }
.shot[data-shot='spawn'] .shot-light { --lx: 46%; --ly: 30%; }
.sm > #agents-spawn .shot-win { --x: 14px; --y: 40px; --w: 620px; }

/* 3 claims: the tests helper's terminal, the refusal on the optical centre */
#agents-claims .shot-win { --x: 44px; --y: -10px; --w: 1000px; --h: 430px; }
.shot[data-shot='claims'] .shot-light { --lx: 36%; --ly: 42%; }
.sm > #agents-claims .shot-win { --x: 14px; --y: 30px; --w: 620px; }

/* 4 wait: the helper tabs turning idle, the lead's read below them */
#agents-wait .shot-win { --x: 6px; --y: 26px; --w: 1000px; --h: 396px; }
.shot[data-shot='wait'] .shot-light { --lx: 44%; --ly: 26%; }
.sm > #agents-wait .shot-win { --x: 14px; --y: 40px; --w: 620px; }

/* 5 a task's own view, from the top */
#agents-task .shot-win { --x: 50px; --y: -24px; --w: 860px; --h: 620px; }
.shot[data-shot='task'] .shot-light { --lx: 36%; --ly: 40%; }
.sm > #agents-task .shot-win { --x: 14px; --y: 34px; --w: 560px; --h: 640px; }

/* 6 roll back and apply: the actions and the checkpoints, a narrower view so both fit */
#agents-apply .shot-win { --x: 30px; --y: 34px; --w: 690px; --h: 640px; }
.shot[data-shot='apply'] .shot-light { --lx: 52%; --ly: 40%; }
.sm > #agents-apply .shot-win { --x: 6px; --y: 28px; --w: 368px; --h: 680px; }

/* 7 Settings, Skills: the boxes on the right edge of the section stay in the shot */
#agents-skills .shot-win { --x: 56px; --y: 46px; --w: 640px; --h: 620px; }
.shot[data-shot='skills'] .shot-light { --lx: 40%; --ly: 40%; }
.sm > #agents-skills .shot-win { --x: -150px; --y: 34px; --w: 520px; --h: 640px; }

/* a task's view, laid out as the app's task board draws it */
#agents .ag-tw .pui-win { grid-template-rows: 34px 1fr; grid-template-columns: minmax(0, 1fr); }
#agents .ag-task > * { min-width: 0; }
#agents .ag-task { display: flex; flex-direction: column; gap: 10px; min-height: 0; padding: 16px 24px 18px; border-top: 1px solid var(--line); background: var(--panel); }
#agents .ag-title { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--fg); }
#agents .ag-title b { font-weight: 600; }
#agents .ag-title svg { width: 14px; height: 14px; color: var(--st); }
#agents .ag-title.st-working { --st: var(--s-working); } #agents .ag-title.st-idle { --st: var(--s-idle); }
#agents .ag-stat { margin-left: auto; font-size: 12.5px; color: var(--fg-3); }
#agents .ag-meta { display: flex; gap: 14px; font: 400 12px var(--font-mono); color: var(--fg-3); white-space: nowrap; overflow: hidden; transition: opacity 400ms var(--ease); }
#agents .ag-meta.is-gone { opacity: 0.4; text-decoration: line-through; }
#agents .ag-prompt { margin: 0; font-size: 13px; line-height: 1.5; color: var(--fg-2); }
#agents .ag-acts { display: flex; align-items: center; gap: 8px; }
#agents .ag-msg { min-width: 220px; min-height: 32px; display: flex; align-items: center; }
#agents .ag-lab { font-size: 12.5px; color: var(--fg-3); margin-top: 4px; }
#agents .ag-cps { display: flex; flex-direction: column; gap: 4px; }
#agents .ag-all { align-self: flex-start; font-size: 12.5px; color: var(--fg-2); background: var(--sel); border-radius: 6px; padding: 5px 10px; }
#agents .ag-cp { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--fg); min-height: 34px; transition: opacity 400ms var(--ease); }
#agents .ag-cp .n { font: 400 12px var(--font-mono); color: var(--fg-3); width: 14px; text-align: center; }
#agents .ag-cp .t { margin-left: auto; font: 400 12px var(--font-mono); color: var(--fg-3); }
#agents .ag-cp .pui-btn { min-height: 30px; padding: 4px 11px; }
#agents .ag-conf { display: flex; align-items: center; gap: 8px; }
#agents .ag-conf .q { font-size: 12.5px; color: var(--fg-2); }
#agents .ag-file { align-self: flex-start; display: flex; gap: 10px; font: 400 12.5px var(--font-mono); color: var(--fg); background: var(--sel); border-radius: 6px; padding: 6px 11px; }
#agents .ag-file .dim { color: var(--fg-3); }
#agents .ag-file .a { color: var(--s-working); }
#agents .ag-file .d { color: var(--s-limit); margin-left: -4px; }
#agents .ag-diff { flex: 1; min-height: 0; border: 1px solid var(--line); border-radius: 7px; background: var(--ground); padding: 10px 14px; transition: opacity 400ms var(--ease); }
#agents .ag-diff.is-gone { opacity: 0.3; }
#agents [data-cp][data-in], #agents [data-file][data-in] { transition: opacity 400ms var(--ease); }

/* Settings, Skills, as the app draws them */
#agents .ag-skw .pui-set { height: 100%; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05); }
#agents .ag-skw .pui-set section { gap: 0; overflow: hidden; }
#agents .ag-skw h4 { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
#agents .ag-sk { display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
#agents .ag-sk .n { color: var(--fg); font-size: 13px; }
#agents .ag-sk .w { color: var(--fg-3); font-size: 12.5px; margin-top: 3px; line-height: 1.45; }
#agents .ag-sk .pui-check { align-self: start; margin-top: 4px; width: 18px; height: 18px; }
#agents .ag-skr { display: flex; gap: 8px; grid-column: 1 / -1; }
#agents .ag-skr .pui-field { display: inline-flex; align-items: center; gap: 18px; min-height: 30px; padding: 4px 10px; }
#agents .ag-skr .pui-field i { width: 6px; height: 6px; border: solid var(--fg-3); border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); }
#agents .ag-skr .pui-btn { min-height: 30px; padding: 4px 12px; }

/* the phone layout: the window narrows to the lead's tile */
.sm > [id^='agents-'] .aq-grid { grid-template-columns: minmax(0, 1fr); }
.sm > [id^='agents-'] .aq-grid > [data-tile='web'] { display: none; }
.sm > [id^='agents-'] .pui-top .pui-new { display: none; }
.sm > #agents-skills .pui-set { grid-template-columns: 180px 1fr; }

/* the helper whose claim refused another's: a brief ring on its tab */
#agents .pui-tab.ag-ping { box-shadow: 0 0 0 1.5px rgba(228, 229, 232, 0.5); }

/* the skills list beside the shot: one dense line each */
#agents .fx-facts--list dt, #agents .fx-facts--list dd { padding: 7px 0; }
#agents .ag-acts .pui-btn { white-space: nowrap; }
.sm > #agents-apply .ag-acts { flex-wrap: wrap; }
.sm > #agents-apply .ag-msg { min-width: 0; flex: 1 1 140px; }
