/* ============================================================
   The Investigator (js/agentview.js) and "Connect an AI tool"
   (js/connectorsview.js).
   ============================================================ */

/* ---- the task ---- */
.ag-ask textarea { width: 100%; box-sizing: border-box; resize: vertical; min-height: 74px; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--border-bright); background: var(--surface); color: var(--text); font: 400 15px/1.5 var(--sans); }
.ag-ask textarea:focus { outline: none; border-color: var(--border-gold); box-shadow: var(--glow-gold); }
.ag-sugg { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.ag-chip { all: unset; cursor: pointer; font-size: 12.5px; color: var(--text-2); padding: 6px 11px; border-radius: 999px; border: 1px solid var(--border); line-height: 1.35; }
.ag-chip:hover { border-color: var(--border-gold); color: var(--text); }
.ag-actions { display: flex; align-items: center; gap: 10px; margin: 14px 0 6px; flex-wrap: wrap; }
.ag-status { font-size: 13px; color: var(--text-3); }
.ag-status.ag-running, .ag-status.ag-reporting { color: var(--gold); }
.ag-status.ag-failed { color: var(--red); }
.ag-rules { margin: 10px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--text-3); line-height: 1.65; }
.ag-rules b { color: var(--text-2); font-weight: 500; }

/* ---- the steps ---- */
.ag-steps { list-style: none; margin: 22px 0 0; padding: 0; position: relative; }
.ag-steps:empty { display: none; }
.ag-step { display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding: 0 0 16px; position: relative; }
.ag-step::before { content: ''; position: absolute; left: 14px; top: 28px; bottom: 0; width: 1px; background: var(--border); }
.ag-step:last-child::before { display: none; }
.ag-n { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12.5px;
  border: 1px solid var(--border-gold); color: var(--gold); background: var(--bg); position: relative; z-index: 1; }
.ag-fin .ag-n { background: var(--gold); color: #17120a; border-color: var(--gold); }
.ag-say { font-size: 14px; color: var(--text); padding-top: 4px; }
.ag-why { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.ag-docs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.ag-res { margin-top: 6px; }
.ag-res summary { cursor: pointer; font-size: 12px; color: var(--text-3); }
.ag-res pre { white-space: pre-wrap; word-break: break-word; font: 12px/1.55 var(--mono, ui-monospace, monospace); color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin: 6px 0 0; max-height: 320px; overflow: auto; }

/* ---- the report ---- */
.ag-report:empty { display: none; }
.ag-report { margin-top: 10px; }
.ag-report .msg.a { max-width: none; }
.ag-none { padding: 14px 16px; border: 1px dashed var(--border-bright); border-radius: 10px; color: var(--text-2); font-size: 13.5px; }

/* ---- connect an AI tool ---- */
.cn-lead { font-size: 13.5px; color: var(--text-2); line-height: 1.6; margin: 0 0 8px; }
.cn-rules { margin: 0 0 14px; padding-left: 18px; font-size: 13px; color: var(--text-2); line-height: 1.6; }
.cn-k { font-size: 12px; color: var(--text-3); margin: 12px 0 6px; }
.cn-keys { display: flex; flex-direction: column; gap: 8px; }
.cn-key { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; }
.cn-key b { display: block; font-weight: 500; font-size: 14px; }
.cn-key span { font-size: 12px; color: var(--text-3); }
.cn-cfg { margin: 10px 0; }
.cn-cfg summary { cursor: pointer; font-size: 12.5px; color: var(--text-2); }
.cn-cfg pre { white-space: pre-wrap; word-break: break-all; font: 12px/1.5 var(--mono, ui-monospace, monospace); background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px; margin: 8px 0; }
.cn-ready code { word-break: break-all; }

/* ---- 1.0.44: the plan, proposals, the other side, going deeper, kept investigations, watch ---- */
.ag-task { font: 400 20px/1.35 var(--serif, Georgia, serif); color: var(--text); margin: 22px 0 6px; }
.ag-tagline { display: inline-block; font: 500 11px/1 var(--sans); color: var(--gold); border: 1px solid var(--border-gold); border-radius: 999px; padding: 4px 8px; margin-left: 6px; vertical-align: 2px; }
.ag-task .ag-tagline { margin: 0 6px 0 0; }
.ag-plan { margin-top: 14px; }
.ag-plan ol { margin: 4px 0 0; padding-left: 20px; font-size: 13.5px; color: var(--text-2); line-height: 1.7; }
.ag-prop .ag-n { border-style: dashed; }
.ag-more { font-size: 11.5px; color: var(--text-3); align-self: center; }
.ag-lead { font-size: 13px; color: var(--text-2); margin: 0 0 12px; line-height: 1.55; }
.ag-props, .ag-challenge, .ag-saved, .ag-deeper { margin-top: 18px; }
.ag-pcard { display: flex; gap: 14px; justify-content: space-between; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; }
.ag-pcard.ag-pending { border-color: var(--border-gold); }
.ag-pcard.ag-approved { opacity: .75; }
.ag-pcard.ag-dismissed { opacity: .5; }
.ag-pmain b { display: block; font-weight: 500; font-size: 14px; }
.ag-plabel { font-size: 13px; color: var(--text-2); }
.ag-pact { display: flex; gap: 8px; flex-shrink: 0; align-items: center; }
.ag-pstate { font-size: 12.5px; color: var(--text-3); }
.ag-pall { margin-top: 6px; }
.ag-k { font-size: 12px; color: var(--text-3); margin: 12px 0 6px; }
.ag-ci { font-size: 13px; color: var(--text-2); margin: 4px 0; line-height: 1.5; }
.ag-ci .citation { margin-right: 6px; }
.ag-since { margin: 14px 0 0; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border-gold); font-size: 13px; color: var(--text-2); }
.ag-since .ag-docs { display: inline-flex; margin: 0 0 0 6px; }
.ag-drow { display: flex; gap: 10px; }
.ag-drow input { flex: 1; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--border-bright); background: var(--surface); color: var(--text); font: 400 14px var(--sans); }
.ag-srow { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); }
.ag-srow b { display: block; font-weight: 500; font-size: 13.5px; }
.ag-srow span { font-size: 12px; color: var(--text-3); }
.ag-sact { display: flex; gap: 6px; flex-shrink: 0; }
.ag-saved #agSave { margin-top: 10px; }
.ag-watch { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 13px; color: var(--text-2); line-height: 1.5; cursor: pointer; }
.ag-watch input { margin-top: 3px; accent-color: var(--gold); }
/* ---- the Case Home card for what Watch found ---- */
.hm-watch { margin-top: 18px; }
.hm-watch .hm-wtitle { font-size: 14px; color: var(--text); margin-bottom: 4px; }
.hm-watch .hm-wsub { font-size: 12.5px; color: var(--text-3); margin-bottom: 10px; }
/* One main action on the screen (Investigate): Approve and Go deeper are gold-edged, not gold-filled. */
.panel .ag-pcard .btn.ag-approve, .panel .ag-deeper .btn.ag-gold { border-color: var(--border-gold); color: var(--gold); }
.panel .ag-pcard .btn.ag-approve:hover, .panel .ag-deeper .btn.ag-gold:hover { background: rgba(201,169,98,.12); color: var(--gold-bright); }
